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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benson <david@draw.io>2022-10-19 20:19:03 +0300
committerDavid Benson <david@draw.io>2022-10-19 20:19:03 +0300
commitdc89d67cf6f89a487b135f2afeed8f86dcbab64f (patch)
treeffd840acecaf60797fa8719127ca86d982ffdea0
parent60171270c79bf4be5dac03ec35c97586c97ea5e6 (diff)
20.4.2 releasev20.4.2
-rw-r--r--ChangeLog22
-rw-r--r--VERSION2
-rw-r--r--src/main/java/com/mxgraph/online/ProxyServlet.java6
-rw-r--r--src/main/webapp/js/app.min.js5885
-rw-r--r--src/main/webapp/js/diagramly/App.js36
-rw-r--r--src/main/webapp/js/diagramly/Devel.js4
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js129
-rw-r--r--src/main/webapp/js/diagramly/DrawioFile.js179
-rw-r--r--src/main/webapp/js/diagramly/DrawioFileSync.js62
-rw-r--r--src/main/webapp/js/diagramly/Editor.js71
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js187
-rw-r--r--src/main/webapp/js/diagramly/Menus.js35
-rw-r--r--src/main/webapp/js/diagramly/Settings.js2
-rw-r--r--src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js20
-rw-r--r--src/main/webapp/js/diagramly/sidebar/Sidebar-Rack.js8
-rw-r--r--src/main/webapp/js/diagramly/sidebar/Sidebar-Sysml.js69
-rw-r--r--src/main/webapp/js/grapheditor/Editor.js4
-rw-r--r--src/main/webapp/js/grapheditor/EditorUi.js83
-rw-r--r--src/main/webapp/js/grapheditor/Format.js148
-rw-r--r--src/main/webapp/js/grapheditor/Menus.js4
-rw-r--r--src/main/webapp/js/integrate.min.js5490
-rw-r--r--src/main/webapp/js/shapes-14-6-5.min.js25
-rw-r--r--src/main/webapp/js/viewer-static.min.js2796
-rw-r--r--src/main/webapp/js/viewer.min.js2771
-rw-r--r--src/main/webapp/mxgraph/mxClient.js6
-rw-r--r--src/main/webapp/resources/dia.txt2
-rw-r--r--src/main/webapp/resources/dia_am.txt2
-rw-r--r--src/main/webapp/resources/dia_ar.txt2
-rw-r--r--src/main/webapp/resources/dia_bg.txt2
-rw-r--r--src/main/webapp/resources/dia_bn.txt2
-rw-r--r--src/main/webapp/resources/dia_bs.txt2
-rw-r--r--src/main/webapp/resources/dia_ca.txt2
-rw-r--r--src/main/webapp/resources/dia_cs.txt2
-rw-r--r--src/main/webapp/resources/dia_da.txt2
-rw-r--r--src/main/webapp/resources/dia_de.txt2
-rw-r--r--src/main/webapp/resources/dia_el.txt2
-rw-r--r--src/main/webapp/resources/dia_eo.txt2
-rw-r--r--src/main/webapp/resources/dia_es.txt2
-rw-r--r--src/main/webapp/resources/dia_et.txt2
-rw-r--r--src/main/webapp/resources/dia_eu.txt2
-rw-r--r--src/main/webapp/resources/dia_fa.txt2
-rw-r--r--src/main/webapp/resources/dia_fi.txt2
-rw-r--r--src/main/webapp/resources/dia_fil.txt2
-rw-r--r--src/main/webapp/resources/dia_fr.txt24
-rw-r--r--src/main/webapp/resources/dia_gl.txt2
-rw-r--r--src/main/webapp/resources/dia_gu.txt2
-rw-r--r--src/main/webapp/resources/dia_he.txt2
-rw-r--r--src/main/webapp/resources/dia_hi.txt2
-rw-r--r--src/main/webapp/resources/dia_hr.txt2
-rw-r--r--src/main/webapp/resources/dia_hu.txt2
-rw-r--r--src/main/webapp/resources/dia_i18n.txt2
-rw-r--r--src/main/webapp/resources/dia_id.txt2
-rw-r--r--src/main/webapp/resources/dia_it.txt2
-rw-r--r--src/main/webapp/resources/dia_ja.txt2
-rw-r--r--src/main/webapp/resources/dia_kn.txt2
-rw-r--r--src/main/webapp/resources/dia_ko.txt2
-rw-r--r--src/main/webapp/resources/dia_lt.txt2
-rw-r--r--src/main/webapp/resources/dia_lv.txt2
-rw-r--r--src/main/webapp/resources/dia_ml.txt2
-rw-r--r--src/main/webapp/resources/dia_mr.txt2
-rw-r--r--src/main/webapp/resources/dia_ms.txt2
-rw-r--r--src/main/webapp/resources/dia_my.txt2
-rw-r--r--src/main/webapp/resources/dia_nl.txt2
-rw-r--r--src/main/webapp/resources/dia_no.txt2
-rw-r--r--src/main/webapp/resources/dia_pl.txt2
-rw-r--r--src/main/webapp/resources/dia_pt-br.txt2
-rw-r--r--src/main/webapp/resources/dia_pt.txt2
-rw-r--r--src/main/webapp/resources/dia_ro.txt2
-rw-r--r--src/main/webapp/resources/dia_ru.txt2
-rw-r--r--src/main/webapp/resources/dia_si.txt2
-rw-r--r--src/main/webapp/resources/dia_sk.txt2
-rw-r--r--src/main/webapp/resources/dia_sl.txt2
-rw-r--r--src/main/webapp/resources/dia_sr.txt2
-rw-r--r--src/main/webapp/resources/dia_sv.txt2
-rw-r--r--src/main/webapp/resources/dia_sw.txt2
-rw-r--r--src/main/webapp/resources/dia_ta.txt2
-rw-r--r--src/main/webapp/resources/dia_te.txt2
-rw-r--r--src/main/webapp/resources/dia_th.txt2
-rw-r--r--src/main/webapp/resources/dia_tr.txt2
-rw-r--r--src/main/webapp/resources/dia_uk.txt2
-rw-r--r--src/main/webapp/resources/dia_vi.txt2
-rw-r--r--src/main/webapp/resources/dia_zh-tw.txt2
-rw-r--r--src/main/webapp/resources/dia_zh.txt2
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
-rw-r--r--src/main/webapp/shapes/mxSysML.js125
-rw-r--r--src/main/webapp/shapes/rack/mxRack.js151
-rw-r--r--src/main/webapp/styles/dark.css6
-rw-r--r--src/main/webapp/styles/grapheditor.css15
89 files changed, 9641 insertions, 8842 deletions
diff --git a/ChangeLog b/ChangeLog
index fb47c934..9a4fda84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+19-OCT-2022: 20.4.2
+
+- Fixes draggable elements problem in Chrome [3112]
+
+13-OCT-2022: 20.4.1
+
+- Adds Gliffy file size error message [DS-920]
+- Only hides current menu for mouse down event types [DS-921]
+- Fixes possible #ERROR fill for invalid fillStyles [DS-922]
+- Bugfixes for Rack Cabinet shape [3052]
+- Fixes DOM for empty status message
+- Fixes status alert style in dark mode
+- Fixes spaces, missing HTML tag in C4 shapes [3082]
+- Uses data attribute for status event handling code [DS-923]
+- Uses svg icons, fixes revisions dialog for mobile
+- Adds new port shape to the SysML library [3015]
+- Inverts order of toolbar items in revision dialog
+- Adds editing for relative positions in Arrange tab
+- Fixes possible overflow of library preview [3080]
+- Handles data-effect attribute for status bar items
+- Fixes key insert position if mouse outside diagram [DS-924]
+
29-SEP-2022: 20.4.0
- [conf cloud] Fixed bug that instances without configuration store diagrams as compressed XML [DID-6387]
diff --git a/VERSION b/VERSION
index ae189ec2..feefbc39 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-20.4.0 \ No newline at end of file
+20.4.2 \ No newline at end of file
diff --git a/src/main/java/com/mxgraph/online/ProxyServlet.java b/src/main/java/com/mxgraph/online/ProxyServlet.java
index 1223f1e8..90de9d6f 100644
--- a/src/main/java/com/mxgraph/online/ProxyServlet.java
+++ b/src/main/java/com/mxgraph/online/ProxyServlet.java
@@ -78,12 +78,6 @@ public class ProxyServlet extends HttpServlet
try(OutputStream out = response.getOutputStream())
{
- if ("draw.io".equals(ua))
- {
- log.log(Level.SEVERE, "Infinite loop detected, proxy should not call itself");
- throw new UnsupportedContentException();
- }
-
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 17122705..b447c67a 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -145,7 +145,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.4.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.4.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/"),
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]"!==
@@ -462,7 +462,7 @@ mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGrad
mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement(e==mxConstants.DIRECTION_RADIAL?"radialGradient":"linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");
e=this.createElement("stop");e.setAttribute("offset","0%");e.style.stopColor=a;e.style.stopOpacity=c;f.appendChild(e);e=this.createElement("stop");e.setAttribute("offset","100%");e.style.stopColor=b;e.style.stopOpacity=d;f.appendChild(e);return f};mxSvgCanvas2D.prototype.createFillPatternId=function(a,b,c){c=mxUtils.rgba2hex(c);"#"==c.charAt(0)&&(c=c.substring(1));return("mx-pattern-"+a+"-"+b+"-"+c).toLowerCase()};
mxSvgCanvas2D.prototype.getFillPattern=function(a,b,c,d){var e=this.createFillPatternId(a,b,c),f=this.fillPatterns[e];if(null==f){var g=this.root.ownerSVGElement,k=0,l=e+"-"+k;if(null!=g)for(f=g.ownerDocument.getElementById(l);null!=f&&f.ownerSVGElement!=g;)l=e+"-"+k++,f=g.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;if(null==f){switch(a){case "hatch":f=this.createHatchPattern(b,c,d);break;case "dots":f=this.createDotsPattern(b,c,d);break;case "cross-hatch":f=this.createCrossHatchPattern(b,
-c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return"ERROR"}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
+c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return null}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
mxSvgCanvas2D.prototype.createHatchPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1","0");e.setAttribute("x2","0");e.setAttribute("y2",c);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
a);d.appendChild(e);return d};
mxSvgCanvas2D.prototype.createDashedPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1",c/4);e.setAttribute("x2","0");e.setAttribute("y2",3*c/4);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
@@ -476,7 +476,7 @@ mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(nu
c.setAttribute("transform",d.transform);this.pointerEvents?c.setAttribute("pointer-events",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute("pointer-events","none");d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&(!a||null==d.fillColor)&&this.addTolerance(c);("rect"!=c.nodeName&&"path"!=c.nodeName&&"ellipse"!=c.nodeName||"none"!=c.getAttribute("fill")&&"transparent"!=c.getAttribute("fill")||"none"!=c.getAttribute("stroke")||"none"!=
c.getAttribute("pointer-events"))&&this.root.appendChild(c);this.node=null}};mxSvgCanvas2D.prototype.addTolerance=function(a){this.root.appendChild(this.createTolerance(a))};
mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);var b=!1;if(null!=a.fillColor)if(null!=a.gradientColor&&a.gradientColor!=mxConstants.NONE){b=!0;var c=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection);if(this.root.ownerDocument==document&&this.useAbsoluteIds){var d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");d="url("+d+"#"+c+
-")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();b||null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?this.node.setAttribute("fill",d):(a=this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale),this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")"))};
+")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();a=null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?null:this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale);b||null==a?this.node.setAttribute("fill",d):this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")")};
mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};
mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",String(a.strokeColor).toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);var b=this.getCurrentStrokeWidth();1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern((a.fixDash?1:a.strokeWidth)*a.scale))};
mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null==a.miterLimit||this.styleEnabled&&10==a.miterLimit||this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
@@ -1986,8 +1986,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,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;
+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,h){this.status=e;this.statusFunction=h;this.fireEvent(new mxEventObject("statusChanged"))};
+this.getStatus=function(){return this.status};this.graphChangeListener=function(e,h){e=null!=h?h.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;
(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="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=";Editor.lightCheckmarkImage="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=";
Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";
@@ -2014,17 +2014,17 @@ Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My
Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==";
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==";
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
-Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;
-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.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.compareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE1Ljg1IDQwLTIuMS0yLjEgNi4wNS02LjA1SDR2LTNoMTUuOGwtNi4wNS02LjA1IDIuMS0yLjEgOS42NSA5LjY1Wm0xNi4zLTEyLjctOS42NS05LjY1TDMyLjE1IDhsMi4xIDIuMS02LjA1IDYuMDVINDR2M0gyOC4ybDYuMDUgNi4wNVoiLz48L3N2Zz4=";
+Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;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.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{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.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(a){return Editor.darkMode};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),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};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.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,h){g=d.substring(g+8,g+8+h);"zTXt"==e?(h=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,h)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(h+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};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,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.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.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=
@@ -2036,223 +2036,223 @@ 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(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()};
+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(h){return!(h 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()};
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,e,g,d,k,n,u,m,r){var x=u?57:0,B=f,D=e,F=u?0:64,I=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var C=I.height,N=Math.max(1,Math.round((I.width-f-F)/2)),R=Math.max(1,Math.round((C-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,C-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=C+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";N+=I.x;R+=I.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-R+=a.embedViewport.y,N+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var S=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(N,R,f,e);N=g.x;R=g.y;S.style.width=f+"px";S.style.height=e+"px";S.style.left=N+"px";S.style.top=R+"px";S.style.zIndex=this.zIndex;S.appendChild(b);document.body.appendChild(S);!n&&b.clientHeight>S.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=R+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 Q=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(aa){Q=!0}),null,mxUtils.bind(this,function(aa){Q&&(a.hideDialog(!0),Q=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var aa=m();
-null!=aa&&(B=f=aa.w,D=e=aa.h)}aa=mxUtils.getDocumentSize();C=aa.height;this.bg.style.height=C+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");N=Math.max(1,Math.round((aa.width-f-F)/2));R=Math.max(1,Math.round((C-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(D,C-F);aa=this.getPosition(N,R,f,e);N=aa.x;R=aa.y;S.style.left=N+"px";S.style.top=R+"px";S.style.width=f+"px";S.style.height=e+
-"px";!n&&b.clientHeight>S.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=R+14+"px",this.dialogImg.style.left=N+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=S;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(a,b,f,d,g,e,h,n,u,m,r){var x=u?57:0,B=f,D=d,F=u?0:64,H=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var C=H.height,N=Math.max(1,Math.round((H.width-f-F)/2)),Q=Math.max(1,Math.round((C-d-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;d=Math.min(d,C-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=C+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";N+=H.x;Q+=H.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 T=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(N,Q,f,d);N=g.x;Q=g.y;T.style.width=f+"px";T.style.height=d+"px";T.style.left=N+"px";T.style.top=Q+"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(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 R=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(ba){R=!0}),null,mxUtils.bind(this,function(ba){R&&(a.hideDialog(!0),R=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var ba=m();
+null!=ba&&(B=f=ba.w,D=d=ba.h)}ba=mxUtils.getDocumentSize();C=ba.height;this.bg.style.height=C+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");N=Math.max(1,Math.round((ba.width-f-F)/2));Q=Math.max(1,Math.round((C-d-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;d=Math.min(D,C-F);ba=this.getPosition(N,Q,f,d);N=ba.x;Q=ba.y;T.style.left=N+"px";T.style.top=Q+"px";T.style.width=f+"px";T.style.height=d+
+"px";!n&&b.clientHeight>T.clientHeight-F&&(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=h;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,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 D=mxUtils.button(e,function(){u&&a.hideDialog();null!=g&&g()});
-D.className="geBtn";f.appendChild(D);null!=k&&(e=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),e.className="geBtn gePrimaryBtn",f.appendChild(e));this.init=function(){D.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(D){var F=k.checked||m.checked,I=parseInt(x.value)/100;isNaN(I)&&(I=1,x.value="100%");I*=.75;var C=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/f.pageScale;if(F){var R=k.checked?1:parseInt(r.value);isNaN(R)||(N=mxUtils.getScaleForPageCount(R,f,C))}f.getGraphBounds();var S=R=0;C=mxRectangle.fromRectangle(C);C.width=Math.ceil(C.width*I);C.height=Math.ceil(C.height*I);N*=I;!F&&f.pageVisible?(I=f.getPageLayout(),R-=I.x*C.width,S-=I.y*C.height):
-F=!0;F=PrintDialog.createPrintPreview(f,N,C,0,R,S,F);F.open();D&&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(D){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(D)});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(D){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(D)});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;
+var ErrorDialog=function(a,b,f,d,g,e,h,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 D=mxUtils.button(d,function(){u&&a.hideDialog();null!=g&&g()});
+D.className="geBtn";f.appendChild(D);null!=h&&(d=mxUtils.button(h,function(){u&&a.hideDialog();null!=n&&n()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){D.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(D){var F=h.checked||m.checked,H=parseInt(x.value)/100;isNaN(H)&&(H=1,x.value="100%");H*=.75;var C=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/f.pageScale;if(F){var Q=h.checked?1:parseInt(r.value);isNaN(Q)||(N=mxUtils.getScaleForPageCount(Q,f,C))}f.getGraphBounds();var T=Q=0;C=mxRectangle.fromRectangle(C);C.width=Math.ceil(C.width*H);C.height=Math.ceil(C.height*H);N*=H;!F&&f.pageVisible?(H=f.getPageLayout(),Q-=H.x*C.width,T-=H.y*C.height):
+F=!0;F=PrintDialog.createPrintPreview(f,N,C,0,Q,T,F);F.open();D&&PrintDialog.printPreview(F)}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 h=document.createElement("input");h.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(h);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+n.appendChild(u);mxEvent.addListener(u,"click",function(D){h.checked=!h.checked;m.checked=!h.checked;mxEvent.consume(D)});mxEvent.addListener(h,"change",function(){m.checked=!h.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(D){m.checked=!m.checked;h.checked=!m.checked;mxEvent.consume(D)});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");h.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;
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);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};
+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,h){b=new mxPrintPreview(a,b,f,d,g,e);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=h;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 C=F;null!=C&&Graph.isPageLink(C.src)&&(C=a.createImageForPageLink(C.src,null));null!=C&&null!=C.src?(D.setAttribute("src",C.src),D.style.display=""):(D.removeAttribute("src"),D.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(C){a.pickColor(r||"none",function(N){r=N;b()});mxEvent.consume(C)});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 C=parseInt(x.value);x.value=Math.max(1,isNaN(C)?e.getGridSize():C)});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 D=document.createElement("img");D.setAttribute("valign","middle");D.style.verticalAlign="middle";D.style.border="1px solid lightGray";D.style.borderRadius="4px";D.style.marginRight="14px";D.style.maxWidth="100px";D.style.cursor="pointer";D.style.height=
-"60px";D.style.padding="4px";var F=e.backgroundImage,I=function(C){a.showBackgroundImageDialog(function(N,R){R||(F=N,f())},F);mxEvent.consume(C)};mxEvent.addListener(B,"click",I);mxEvent.addListener(D,"click",I);f();n.appendChild(D);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);I=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var C=parseInt(x.value);isNaN(C)||e.gridSize===C||e.setGridSize(C);C=new ChangePageSetup(a,r,F,u.get());C.ignoreColor=e.background==r;C.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=F?F.src:null);e.pageFormat.width==C.previousFormat.width&&e.pageFormat.height==C.previousFormat.height&&C.ignoreColor&&C.ignoreImage||e.model.execute(C)});I.className="geBtn gePrimaryBtn";
-n.appendChild(I);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(aa,U,P){if(P||x!=document.activeElement&&B!=document.activeElement){aa=!1;for(U=0;U<F.length;U++)P=F[U],R?"custom"==P.key&&(n.value=P.key,R=!1):null!=P.format&&("a4"==P.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==P.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==P.format.width&&
-f.height==P.format.height?(n.value=P.key,d.setAttribute("checked","checked"),d.defaultChecked=!0,d.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,aa=!0):f.width==P.format.height&&f.height==P.format.width&&(n.value=P.key,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,aa=k.checked=!0));aa?(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 D={},F=PageSetupDialog.getFormats(),I=0;I<F.length;I++){var C=F[I];D[C.key]=C;var N=document.createElement("option");N.setAttribute("value",
-C.key);mxUtils.write(N,C.title);n.appendChild(N)}var R=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var S=f,Q=function(aa,U){aa=D[n.value];null!=aa.format?(x.value=aa.format.width/100,B.value=aa.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");aa=parseFloat(x.value);if(isNaN(aa)||0>=aa)x.value=f.width/100;aa=parseFloat(B.value);if(isNaN(aa)||0>=aa)B.value=f.height/100;aa=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)),
-Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&k.checked&&(aa=new mxRectangle(0,0,aa.height,aa.width));U&&R||aa.width==S.width&&aa.height==S.height||(S=aa,null!=e&&e(S))};mxEvent.addListener(b,"click",function(aa){d.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(m,"click",function(aa){k.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(x,"blur",Q);mxEvent.addListener(x,"click",Q);mxEvent.addListener(B,"blur",Q);mxEvent.addListener(B,"click",Q);mxEvent.addListener(k,"change",
-Q);mxEvent.addListener(d,"change",Q);mxEvent.addListener(n,"change",function(aa){R="custom"==n.value;Q(aa,!0)});Q();return{set:function(aa){f=aa;g(null,null,!0)},get:function(){return S},widthInput:x,heightInput:B}};
+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 C=F;null!=C&&Graph.isPageLink(C.src)&&(C=a.createImageForPageLink(C.src,null));null!=C&&null!=C.src?(D.setAttribute("src",C.src),D.style.display=""):(D.removeAttribute("src"),D.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 h=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");h.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);h.appendChild(n);e.appendChild(h);h=document.createElement("tr");n=document.createElement("td");
+mxUtils.write(n,mxResources.get("background")+":");h.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(C){a.pickColor(r||"none",function(N){r=N;b()});mxEvent.consume(C)});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 C=parseInt(x.value);x.value=Math.max(1,isNaN(C)?d.getGridSize():C)});h.appendChild(n);e.appendChild(h);h=document.createElement("tr");
+n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");h.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 D=document.createElement("img");D.setAttribute("valign","middle");D.style.verticalAlign="middle";D.style.border="1px solid lightGray";D.style.borderRadius="4px";D.style.marginRight="14px";D.style.maxWidth="100px";D.style.cursor="pointer";D.style.height=
+"60px";D.style.padding="4px";var F=d.backgroundImage,H=function(C){a.showBackgroundImageDialog(function(N,Q){Q||(F=N,f())},F);mxEvent.consume(C)};mxEvent.addListener(B,"click",H);mxEvent.addListener(D,"click",H);f();n.appendChild(D);n.appendChild(B);h.appendChild(n);e.appendChild(h);h=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);H=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var C=parseInt(x.value);isNaN(C)||d.gridSize===C||d.setGridSize(C);C=new ChangePageSetup(a,r,F,u.get());C.ignoreColor=d.background==r;C.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=F?F.src:null);d.pageFormat.width==C.previousFormat.width&&d.pageFormat.height==C.previousFormat.height&&C.ignoreColor&&C.ignoreImage||d.model.execute(C)});H.className="geBtn gePrimaryBtn";
+n.appendChild(H);a.editor.cancelFirst||n.appendChild(B);h.appendChild(n);e.appendChild(h);g.appendChild(e);this.container=g};
+PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function g(ba,S,P){if(P||x!=document.activeElement&&B!=document.activeElement){ba=!1;for(S=0;S<F.length;S++)P=F[S],Q?"custom"==P.key&&(n.value=P.key,Q=!1):null!=P.format&&("a4"==P.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==P.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==P.format.width&&
+f.height==P.format.height?(n.value=P.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,ba=!0):f.width==P.format.height&&f.height==P.format.width&&(n.value=P.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,ba=h.checked=!0));ba?(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 h=document.createElement("input");h.setAttribute("name",b);h.setAttribute("type","radio");h.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);h.style.marginLeft="10px";h.style.marginRight="6px";u.appendChild(h);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 D={},F=PageSetupDialog.getFormats(),H=0;H<F.length;H++){var C=F[H];D[C.key]=C;var N=document.createElement("option");N.setAttribute("value",
+C.key);mxUtils.write(N,C.title);n.appendChild(N)}var Q=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var T=f,R=function(ba,S){ba=D[n.value];null!=ba.format?(x.value=ba.format.width/100,B.value=ba.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");ba=parseFloat(x.value);if(isNaN(ba)||0>=ba)x.value=f.width/100;ba=parseFloat(B.value);if(isNaN(ba)||0>=ba)B.value=f.height/100;ba=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)),
+Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&h.checked&&(ba=new mxRectangle(0,0,ba.height,ba.width));S&&Q||ba.width==T.width&&ba.height==T.height||(T=ba,null!=d&&d(T))};mxEvent.addListener(b,"click",function(ba){e.checked=!0;R(ba);mxEvent.consume(ba)});mxEvent.addListener(m,"click",function(ba){h.checked=!0;R(ba);mxEvent.consume(ba)});mxEvent.addListener(x,"blur",R);mxEvent.addListener(x,"click",R);mxEvent.addListener(B,"blur",R);mxEvent.addListener(B,"click",R);mxEvent.addListener(h,"change",
+R);mxEvent.addListener(e,"change",R);mxEvent.addListener(n,"change",function(ba){Q="custom"==n.value;R(ba,!0)});R();return{set:function(ba){f=ba;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,e,g,d,k,n,u,m,r,x,B){u=null!=u?u:!0;var D=document.createElement("table"),F=document.createElement("tbody");D.style.position="absolute";D.style.top="30px";D.style.left="20px";var I=document.createElement("tr");var C=document.createElement("td");C.style.textOverflow="ellipsis";C.style.textAlign="right";C.style.maxWidth=(B?B+15:100)+"px";C.style.fontSize="10pt";C.style.width=(B?B:84)+"px";mxUtils.write(C,(g||mxResources.get("filename"))+":");I.appendChild(C);var N=
-document.createElement("input");N.setAttribute("value",b||"");N.style.marginLeft="4px";N.style.width=null!=x?x+"px":"180px";var R=mxUtils.button(f,function(){if(null==d||d(N.value))u&&a.hideDialog(),e(N.value)});R.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 S=D.parentNode;if(null!=S){var Q=null;mxEvent.addListener(S,"dragleave",
-function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);aa.stopPropagation();aa.preventDefault()});mxEvent.addListener(S,"dragover",mxUtils.bind(this,function(aa){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=N,Q.style.backgroundColor="#ebf2f9");aa.stopPropagation();aa.preventDefault()}));mxEvent.addListener(S,"drop",mxUtils.bind(this,function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);0<=mxUtils.indexOf(aa.dataTransfer.types,"text/uri-list")&&(N.value=decodeURIComponent(aa.dataTransfer.getData("text/uri-list")),
-R.click());aa.stopPropagation();aa.preventDefault()}))}}};C=document.createElement("td");C.style.whiteSpace="nowrap";C.appendChild(N);I.appendChild(C);if(null!=g||null==k)F.appendChild(I),null!=r&&(C.appendChild(FilenameDialog.createTypeHint(a,N,r)),null!=a.editor.diagramFileTypes&&(I=document.createElement("tr"),C=document.createElement("td"),C.style.textOverflow="ellipsis",C.style.textAlign="right",C.style.maxWidth="100px",C.style.fontSize="10pt",C.style.width="84px",mxUtils.write(C,mxResources.get("type")+
-":"),I.appendChild(C),C=document.createElement("td"),C.style.whiteSpace="nowrap",I.appendChild(C),b=FilenameDialog.createFileTypes(a,N,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",C.appendChild(b),N.style.width=null!=x?x-40+"px":"190px",I.appendChild(C),F.appendChild(I)));null!=k&&(I=document.createElement("tr"),C=document.createElement("td"),C.colSpan=2,C.appendChild(k),I.appendChild(C),F.appendChild(I));I=document.createElement("tr");C=document.createElement("td");C.colSpan=
-2;C.style.paddingTop=null!=r?"12px":"20px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&C.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",C.appendChild(x));mxEvent.addListener(N,"keypress",function(S){13==S.keyCode&&R.click()});C.appendChild(R);a.editor.cancelFirst||C.appendChild(r);
-I.appendChild(C);F.appendChild(I);D.appendChild(F);this.container=D};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};
-var WrapperWindow=function(a,b,f,e,g,d,k){var n=a.createSidebarContainer();k(n);this.window=new mxWindow(b,n,f,e,g,d,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(u){null==u&&(u=window.event);return null!=u&&a.isSelectionAllowed(u)}))};
-(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()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var k=this.graph,n=null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background,u=null!=n&&this.gridColor!=n.toLowerCase()?this.gridColor:"#ffffff",m="none",r="";if(k.isGridEnabled()||k.gridVisible){r=10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(u))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",r=k.gridSize*this.scale*this.gridSteps):m="url("+this.gridImage+
-")";var x=u=0;null!=k.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),u=1+x.x,x=1+x.y);r=-Math.round(r-mxUtils.mod(this.translate.x*this.scale-u,r))+"px "+-Math.round(r-mxUtils.mod(this.translate.y*this.scale-x,r))+"px"}u=k.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=r,k.view.backgroundPageShape.node.style.backgroundImage=m,k.view.backgroundPageShape.node.style.backgroundColor=n,k.view.backgroundPageShape.node.style.borderColor=
-k.defaultPageBorderColor,k.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor="",Editor.isDarkMode()||"simple"!=Editor.currentTheme?k.container.style.backgroundColor="":k.container.style.backgroundColor=k.simpleBackgroundColor):(k.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundImage=m,null!=k.background&&k.background!=mxConstants.NONE||Editor.isDarkMode()||"simple"!=Editor.currentTheme?u.style.backgroundColor=
-n:(u.style.backgroundColor=k.simpleBackgroundColor,k.container.style.backgroundColor=""))};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,D=this.view.getBackgroundPageBounds();n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),I=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=k?Math.ceil(n/F.width)-1:0,N=D.x+n,
-R=D.y+u;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(S){if(null!=S){for(var Q=S==this.horizontalPageBreaks?I:C,aa=0;aa<=Q;aa++){var U=S==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x),Math.round(D.y+(aa+1)*F.height)),new mxPoint(Math.round(N),Math.round(D.y+(aa+1)*F.height))]:[new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(aa+1)*F.width),
-Math.round(R))];null!=S[aa]?(S[aa].points=U,S[aa].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(),S[aa]=U)}for(aa=Q;aa<S.length;aa++)S[aa].destroy();S.splice(Q,S.length-Q)}});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 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(D){mxEvent.consume(D)});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 O=g.apply(this,arguments),T=this.backgroundImage;if(null!=T&&null!=T.width&&null!=T.height){var J=this.view.translate,ba=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((J.x+T.x)*ba,(J.y+T.y)*ba,T.width*ba,T.height*ba))}return O};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(O,T){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(O){return!mxEvent.isPopupTrigger(O.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 strokeColor strokeWidth".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(O){try{e.getModel().isEdge(O)?m=!1:u=!1;var T=e.getCellStyle(O,!1),J=[],ba=[],ia;for(ia in T)J.push(T[ia]),ba.push(ia);e.getModel().isEdge(O)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",J,"cells",[O]));e.getModel().isEdge(O)?m=!0:u=!0}catch(na){this.handleError(na)}};
-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"],["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 D=function(O,T,J,ba,ia,na,W){ba=null!=ba?ba:e.currentVertexStyle;ia=null!=ia?ia:e.currentEdgeStyle;na=null!=na?na:!0;J=null!=J?J:e.getModel();if(W){W=[];for(var da=0;da<O.length;da++)W=W.concat(J.getDescendants(O[da]));O=W}J.beginUpdate();
-try{for(da=0;da<O.length;da++){var sa=O[da];if(T)var ta=["fontSize","fontFamily","fontColor"];else{var Ja=J.getStyle(sa),Ia=null!=Ja?Ja.split(";"):[];ta=d.slice();for(var ua=0;ua<Ia.length;ua++){var Ba=Ia[ua],qa=Ba.indexOf("=");if(0<=qa){var Ea=Ba.substring(0,qa),Ua=mxUtils.indexOf(ta,Ea);0<=Ua&&ta.splice(Ua,1);for(W=0;W<B.length;W++){var db=B[W];if(0<=mxUtils.indexOf(db,Ea))for(var Ta=0;Ta<db.length;Ta++){var ab=mxUtils.indexOf(ta,db[Ta]);0<=ab&&ta.splice(ab,1)}}}}}var Ya=J.isEdge(sa);W=Ya?ia:ba;
-var Va=J.getStyle(sa);for(ua=0;ua<ta.length;ua++){Ea=ta[ua];var Za=W[Ea];null!=Za&&"edgeStyle"!=Ea&&("shape"!=Ea||Ya)&&(!Ya||na||0>mxUtils.indexOf(n,Ea))&&(Va=mxUtils.setStyle(Va,Ea,Za))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));J.setStyle(sa,Va)}}finally{J.endUpdate()}return O};e.addListener("cellsInserted",function(O,T){D(T.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(O,T){D(T.getProperty("cells"),!0)});
-this.insertHandler=D;this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(O){null==O&&(O=window.event);return e.isEditing()||null!=O&&this.isSelectionAllowed(O)});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(O){if(null!=O){var T=mxEvent.getSource(O);if("A"==T.nodeName)for(;null!=T;){if("geHint"==T.className)return!0;T=T.parentNode}}return F(O)},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 I=e.graphHandler.start;e.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
-function(O){var T=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(O)-T.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(O)-T.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,N=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(O,T){return C||N.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(O){32!=O.which||e.isEditing()?
-mxEvent.isConsumed(O)||27!=O.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(O)!=e.container||mxEvent.consume(O))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(O){e.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var R=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(O){return R.apply(this,
-arguments)||C||mxEvent.isMouseEvent(O.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(O.getEvent()))&&(!mxEvent.isControlDown(O.getEvent())&&mxEvent.isRightMouseButton(O.getEvent())||mxEvent.isMiddleMouseButton(O.getEvent()))};var S=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(O){return S.apply(this,arguments)||13==O.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O)||mxClient.IS_SF&&mxEvent.isShiftDown(O))};var Q=e.isZoomWheelEvent;
-e.isZoomWheelEvent=function(){return C||Q.apply(this,arguments)};var aa=!1,U=null,P=null,X=null,ja=mxUtils.bind(this,function(){if(null!=this.toolbar&&aa!=e.cellEditor.isContentEditing()){for(var O=this.toolbar.container.firstChild,T=[];null!=O;){var J=O.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,O)&&(O.parentNode.removeChild(O),T.push(O));O=J}O=this.toolbar.fontMenu;J=this.toolbar.sizeMenu;if(null==X)this.toolbar.createTextToolbar();else{for(var ba=0;ba<X.length;ba++)this.toolbar.container.appendChild(X[ba]);
-this.toolbar.fontMenu=U;this.toolbar.sizeMenu=P}aa=e.cellEditor.isContentEditing();U=O;P=J;X=T}}),fa=this,ra=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){ra.apply(this,arguments);ja();if(e.cellEditor.isContentEditing()){var O=!1,T=function(){O||(O=!0,window.setTimeout(function(){var J=e.getSelectedEditingElement();null!=J&&(J=mxUtils.getCurrentStyle(J),null!=J&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(J.fontFamily)),fa.toolbar.setFontSize(parseInt(J.fontSize))));
-O=!1},0))};mxEvent.addListener(e.cellEditor.textarea,"input",T);mxEvent.addListener(e.cellEditor.textarea,"touchend",T);mxEvent.addListener(e.cellEditor.textarea,"mouseup",T);mxEvent.addListener(e.cellEditor.textarea,"keyup",T);T()}};var K=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(O,T){try{K.apply(this,arguments),ja()}catch(J){fa.handleError(J)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(O){}var V=
-e.fireMouseEvent;e.fireMouseEvent=function(O,T,J){O==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(O,T,J){this.menus.createPopupMenu(O,T,J)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(O){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT,
-function(O,T){var J=[T.getProperty("cell")];T.getProperty("terminalInserted")&&(J.push(T.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(e.view.getState(J[J.length-1]))},0));D(J)});this.addListener("styleChanged",mxUtils.bind(this,function(O,T){var J=T.getProperty("cells"),ba=O=!1;if(0<J.length)for(var ia=0;ia<J.length&&(O=e.getModel().isVertex(J[ia])||O,!(ba=e.getModel().isEdge(J[ia])||ba)||!O);ia++);else ba=O=!0;O=O&&!u;ba=ba&&!m;J=T.getProperty("keys");
-T=T.getProperty("values");for(ia=0;ia<J.length;ia++){var na=0<=mxUtils.indexOf(r,J[ia]);if("strokeColor"!=J[ia]||null!=T[ia]&&"none"!=T[ia])if(0<=mxUtils.indexOf(k,J[ia]))ba||0<=mxUtils.indexOf(x,J[ia])?null==T[ia]?delete e.currentEdgeStyle[J[ia]]:e.currentEdgeStyle[J[ia]]=T[ia]:O&&0<=mxUtils.indexOf(d,J[ia])&&(null==T[ia]?delete e.currentVertexStyle[J[ia]]:e.currentVertexStyle[J[ia]]=T[ia]);else if(0<=mxUtils.indexOf(d,J[ia])){if(O||na)null==T[ia]?delete e.currentVertexStyle[J[ia]]:e.currentVertexStyle[J[ia]]=
-T[ia];if(ba||na||0<=mxUtils.indexOf(x,J[ia]))null==T[ia]?delete e.currentEdgeStyle[J[ia]]:e.currentEdgeStyle[J[ia]]=T[ia]}}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 O=e.currentVertexStyle.fontFamily||"Helvetica",
-T=String(e.currentVertexStyle.fontSize||"12"),J=e.getView().getState(e.getSelectionCell());null!=J&&(O=J.style[mxConstants.STYLE_FONTFAMILY]||O,T=J.style[mxConstants.STYLE_FONTSIZE]||T,10<O.length&&(O=O.substring(0,8)+"..."));this.toolbar.setFontName(O);this.toolbar.setFontSize(T)}),e.getSelectionModel().addListener(mxEvent.CHANGE,a),e.getModel().addListener(mxEvent.CHANGE,a));e.addListener(mxEvent.CELLS_ADDED,function(O,T){O=T.getProperty("cells");T=T.getProperty("parent");null!=T&&e.getModel().isLayer(T)&&
-!e.isCellVisible(T)&&null!=O&&0<O.length&&e.getModel().setVisible(T,!0)});this.gestureHandler=mxUtils.bind(this,function(O){null!=this.currentMenu&&mxEvent.getSource(O)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
-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);
+var FilenameDialog=function(a,b,f,d,g,e,h,n,u,m,r,x,B){u=null!=u?u:!0;var D=document.createElement("table"),F=document.createElement("tbody");D.style.position="absolute";D.style.top="30px";D.style.left="20px";var H=document.createElement("tr");var C=document.createElement("td");C.style.textOverflow="ellipsis";C.style.textAlign="right";C.style.maxWidth=(B?B+15:100)+"px";C.style.fontSize="10pt";C.style.width=(B?B:84)+"px";mxUtils.write(C,(g||mxResources.get("filename"))+":");H.appendChild(C);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==h)if(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var T=D.parentNode;if(null!=T){var R=null;mxEvent.addListener(T,"dragleave",
+function(ba){null!=R&&(R.style.backgroundColor="",R=null);ba.stopPropagation();ba.preventDefault()});mxEvent.addListener(T,"dragover",mxUtils.bind(this,function(ba){null==R&&(!mxClient.IS_IE||10<document.documentMode)&&(R=N,R.style.backgroundColor="#ebf2f9");ba.stopPropagation();ba.preventDefault()}));mxEvent.addListener(T,"drop",mxUtils.bind(this,function(ba){null!=R&&(R.style.backgroundColor="",R=null);0<=mxUtils.indexOf(ba.dataTransfer.types,"text/uri-list")&&(N.value=decodeURIComponent(ba.dataTransfer.getData("text/uri-list")),
+Q.click());ba.stopPropagation();ba.preventDefault()}))}}};C=document.createElement("td");C.style.whiteSpace="nowrap";C.appendChild(N);H.appendChild(C);if(null!=g||null==h)F.appendChild(H),null!=r&&(C.appendChild(FilenameDialog.createTypeHint(a,N,r)),null!=a.editor.diagramFileTypes&&(H=document.createElement("tr"),C=document.createElement("td"),C.style.textOverflow="ellipsis",C.style.textAlign="right",C.style.maxWidth="100px",C.style.fontSize="10pt",C.style.width="84px",mxUtils.write(C,mxResources.get("type")+
+":"),H.appendChild(C),C=document.createElement("td"),C.style.whiteSpace="nowrap",H.appendChild(C),b=FilenameDialog.createFileTypes(a,N,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",C.appendChild(b),N.style.width=null!=x?x-40+"px":"190px",H.appendChild(C),F.appendChild(H)));null!=h&&(H=document.createElement("tr"),C=document.createElement("td"),C.colSpan=2,C.appendChild(h),H.appendChild(C),F.appendChild(H));H=document.createElement("tr");C=document.createElement("td");C.colSpan=
+2;C.style.paddingTop=null!=r?"12px":"20px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&C.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",C.appendChild(x));mxEvent.addListener(N,"keypress",function(T){13==T.keyCode&&Q.click()});C.appendChild(Q);a.editor.cancelFirst||C.appendChild(r);
+H.appendChild(C);F.appendChild(H);D.appendChild(F);this.container=D};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 h=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=h&&a.showError(null,h,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 h=b.value.lastIndexOf(".drawio.");h=0<h?h:b.value.lastIndexOf(".");"drawio"!=e&&(e="drawio."+e);b.value=0<h?b.value.substring(0,h+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 h=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){h=n;break}}d.value=h};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d};
+var WrapperWindow=function(a,b,f,d,g,e,h){var n=a.createSidebarContainer();h(n);this.window=new mxWindow(b,n,f,d,g,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(u){null==u&&(u=window.event);return null!=u&&a.isSelectionAllowed(u)}))};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var h=this.graph;if(null!=h.container&&!h.transparentBackground){if(h.pageVisible){var n=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var u=h.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(h.container),u.style.position="absolute",h.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){h.dblClick(m)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(m){h.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){null!=
+h.tooltipHandler&&h.tooltipHandler.isHideOnHover()&&h.tooltipHandler.hide();h.isMouseDown&&!mxEvent.isConsumed(m)&&h.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){h.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()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var h=this.graph,n=null==h.background||h.background==mxConstants.NONE?h.defaultPageBackgroundColor:h.background,u=null!=n&&this.gridColor!=n.toLowerCase()?this.gridColor:"#ffffff",m="none",r="";if(h.isGridEnabled()||h.gridVisible){r=10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(u))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",r=h.gridSize*this.scale*this.gridSteps):m="url("+this.gridImage+
+")";var x=u=0;null!=h.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),u=1+x.x,x=1+x.y);r=-Math.round(r-mxUtils.mod(this.translate.x*this.scale-u,r))+"px "+-Math.round(r-mxUtils.mod(this.translate.y*this.scale-x,r))+"px"}u=h.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);null!=h.view.backgroundPageShape?(h.view.backgroundPageShape.node.style.backgroundPosition=r,h.view.backgroundPageShape.node.style.backgroundImage=m,h.view.backgroundPageShape.node.style.backgroundColor=n,h.view.backgroundPageShape.node.style.borderColor=
+h.defaultPageBorderColor,h.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor="",Editor.isDarkMode()||"simple"!=Editor.currentTheme?h.container.style.backgroundColor="":h.container.style.backgroundColor=h.simpleBackgroundColor):(h.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundImage=m,null!=h.background&&h.background!=mxConstants.NONE||Editor.isDarkMode()||"simple"!=Editor.currentTheme?u.style.backgroundColor=
+n:(u.style.backgroundColor=h.simpleBackgroundColor,h.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(h){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="'+h+'" opacity="0.2" stroke-width="1"/><path d="M '+u+" 0 L 0 0 0 "+u+'" fill="none" stroke="'+h+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,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+h,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(h,n,u){var m=this.view.scale,r=this.view.translate,x=this.pageFormat,B=m*this.pageScale,D=this.view.getBackgroundPageBounds();n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),H=(h=h&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=h?Math.ceil(n/F.width)-1:0,N=D.x+n,
+Q=D.y+u;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(T){if(null!=T){for(var R=T==this.horizontalPageBreaks?H:C,ba=0;ba<=R;ba++){var S=T==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x),Math.round(D.y+(ba+1)*F.height)),new mxPoint(Math.round(N),Math.round(D.y+(ba+1)*F.height))]:[new mxPoint(Math.round(D.x+(ba+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(ba+1)*F.width),
+Math.round(Q))];null!=T[ba]?(T[ba].points=S,T[ba].redraw()):(S=new mxPolyline(S,this.pageBreakColor),S.dialect=this.dialect,S.isDashed=this.pageBreakDashed,S.pointerEvents=!1,S.init(this.view.backgroundPane),S.redraw(),T[ba]=S)}for(ba=R;ba<T.length;ba++)T[ba].destroy();T.splice(R,T.length-R)}});h(this.horizontalPageBreaks);h(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(h,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 h=f.apply(this,arguments);h.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(h,arguments)});return h};mxGraphView.prototype.createBackgroundPageShape=
+function(h){return new mxRectangleShape(h,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var h=this.getGraphBounds(),n=0<h.width?h.x/this.scale-this.translate.x:0,u=0<h.height?h.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+h.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+h.height/this.scale)/m)-B)*m)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,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=h+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;
+mxPopupMenu.prototype.addItem=function(h,n,u,m,r,x){var B=g.apply(this,arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(D){mxEvent.consume(D)});return B};var e=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(h,n,u){var m=this.graph.model.getParent(h);if(n){var r=this.graph.model.isEdge(h)?null:this.graph.getCellGeometry(h);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(h)&&(null!=r&&r.relative||!this.graph.isContainer(m)||
+this.graph.isPart(h))}else if(r=e.apply(this,arguments),this.graph.isTableCell(h)||this.graph.isTableRow(h))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(h)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(h)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(h){h=h.getCell();
+for(var n=this.graph.getModel(),u=n.getParent(h),m=this.graph.view.getState(u),r=this.graph.isCellSelected(h);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(h)||this.graph.isTableRow(h)))h=u;u=n.getParent(u)}return h}})();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 O=g.apply(this,arguments),U=this.backgroundImage;if(null!=U&&null!=U.width&&null!=U.height){var J=this.view.translate,aa=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((J.x+U.x)*aa,(J.y+U.y)*aa,U.width*aa,U.height*aa))}return O};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(O,U){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(O){return!mxEvent.isPopupTrigger(O.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 strokeColor strokeWidth".split(" "),h="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(O){try{d.getModel().isEdge(O)?m=!1:u=!1;var U=d.getCellStyle(O,!1),J=[],aa=[],ia;for(ia in U)J.push(U[ia]),aa.push(ia);d.getModel().isEdge(O)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",aa,"values",J,"cells",[O]));d.getModel().isEdge(O)?m=!0:u=!0}catch(na){this.handleError(na)}};
+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"],["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<h.length;b++)0>mxUtils.indexOf(e,h[b])&&e.push(h[b]);var D=function(O,U,J,aa,ia,na,W){aa=null!=aa?aa:d.currentVertexStyle;ia=null!=ia?ia:d.currentEdgeStyle;na=null!=na?na:!0;J=null!=J?J:d.getModel();if(W){W=[];for(var da=0;da<O.length;da++)W=W.concat(J.getDescendants(O[da]));O=W}J.beginUpdate();
+try{for(da=0;da<O.length;da++){var sa=O[da];if(U)var ta=["fontSize","fontFamily","fontColor"];else{var Ja=J.getStyle(sa),Ia=null!=Ja?Ja.split(";"):[];ta=e.slice();for(var ua=0;ua<Ia.length;ua++){var Ba=Ia[ua],qa=Ba.indexOf("=");if(0<=qa){var Ea=Ba.substring(0,qa),Ua=mxUtils.indexOf(ta,Ea);0<=Ua&&ta.splice(Ua,1);for(W=0;W<B.length;W++){var db=B[W];if(0<=mxUtils.indexOf(db,Ea))for(var Ta=0;Ta<db.length;Ta++){var ab=mxUtils.indexOf(ta,db[Ta]);0<=ab&&ta.splice(ab,1)}}}}}var Ya=J.isEdge(sa);W=Ya?ia:aa;
+var Va=J.getStyle(sa);for(ua=0;ua<ta.length;ua++){Ea=ta[ua];var Za=W[Ea];null!=Za&&"edgeStyle"!=Ea&&("shape"!=Ea||Ya)&&(!Ya||na||0>mxUtils.indexOf(n,Ea))&&(Va=mxUtils.setStyle(Va,Ea,Za))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));J.setStyle(sa,Va)}}finally{J.endUpdate()}return O};d.addListener("cellsInserted",function(O,U){D(U.getProperty("cells"),null,null,null,null,!0,!0)});d.addListener("textInserted",function(O,U){D(U.getProperty("cells"),!0)});
+this.insertHandler=D;this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(O){null==O&&(O=window.event);return d.isEditing()||null!=O&&this.isSelectionAllowed(O)});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(O){if(null!=O){var U=mxEvent.getSource(O);if("A"==U.nodeName)for(;null!=U;){if("geHint"==U.className)return!0;U=U.parentNode}}return F(O)},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 H=d.graphHandler.start;d.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();H.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
+function(O){var U=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(O)-U.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(O)-U.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,N=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(O,U){return C||N.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(O){32!=O.which||d.isEditing()?
+mxEvent.isConsumed(O)||27!=O.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(O)!=d.container||mxEvent.consume(O))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(O){d.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var Q=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(O){return Q.apply(this,
+arguments)||C||mxEvent.isMouseEvent(O.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(O.getEvent()))&&(!mxEvent.isControlDown(O.getEvent())&&mxEvent.isRightMouseButton(O.getEvent())||mxEvent.isMiddleMouseButton(O.getEvent()))};var T=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(O){return T.apply(this,arguments)||13==O.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O)||mxClient.IS_SF&&mxEvent.isShiftDown(O))};var R=d.isZoomWheelEvent;
+d.isZoomWheelEvent=function(){return C||R.apply(this,arguments)};var ba=!1,S=null,P=null,X=null,ja=mxUtils.bind(this,function(){if(null!=this.toolbar&&ba!=d.cellEditor.isContentEditing()){for(var O=this.toolbar.container.firstChild,U=[];null!=O;){var J=O.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,O)&&(O.parentNode.removeChild(O),U.push(O));O=J}O=this.toolbar.fontMenu;J=this.toolbar.sizeMenu;if(null==X)this.toolbar.createTextToolbar();else{for(var aa=0;aa<X.length;aa++)this.toolbar.container.appendChild(X[aa]);
+this.toolbar.fontMenu=S;this.toolbar.sizeMenu=P}ba=d.cellEditor.isContentEditing();S=O;P=J;X=U}}),fa=this,ra=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){ra.apply(this,arguments);ja();if(d.cellEditor.isContentEditing()){var O=!1,U=function(){O||(O=!0,window.setTimeout(function(){var J=d.getSelectedEditingElement();null!=J&&(J=mxUtils.getCurrentStyle(J),null!=J&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(J.fontFamily)),fa.toolbar.setFontSize(parseInt(J.fontSize))));
+O=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",U);mxEvent.addListener(d.cellEditor.textarea,"touchend",U);mxEvent.addListener(d.cellEditor.textarea,"mouseup",U);mxEvent.addListener(d.cellEditor.textarea,"keyup",U);U()}};var K=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(O,U){try{K.apply(this,arguments),ja()}catch(J){fa.handleError(J)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(O){}var V=
+d.fireMouseEvent;d.fireMouseEvent=function(O,U,J){O==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(O,U,J){this.menus.createPopupMenu(O,U,J)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(O){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};d.connectionHandler.addListener(mxEvent.CONNECT,
+function(O,U){var J=[U.getProperty("cell")];U.getProperty("terminalInserted")&&(J.push(U.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(d.view.getState(J[J.length-1]))},0));D(J)});this.addListener("styleChanged",mxUtils.bind(this,function(O,U){var J=U.getProperty("cells"),aa=O=!1;if(0<J.length)for(var ia=0;ia<J.length&&(O=d.getModel().isVertex(J[ia])||O,!(aa=d.getModel().isEdge(J[ia])||aa)||!O);ia++);else aa=O=!0;O=O&&!u;aa=aa&&!m;J=U.getProperty("keys");
+U=U.getProperty("values");for(ia=0;ia<J.length;ia++){var na=0<=mxUtils.indexOf(r,J[ia]);if("strokeColor"!=J[ia]||null!=U[ia]&&"none"!=U[ia])if(0<=mxUtils.indexOf(h,J[ia]))aa||0<=mxUtils.indexOf(x,J[ia])?null==U[ia]?delete d.currentEdgeStyle[J[ia]]:d.currentEdgeStyle[J[ia]]=U[ia]:O&&0<=mxUtils.indexOf(e,J[ia])&&(null==U[ia]?delete d.currentVertexStyle[J[ia]]:d.currentVertexStyle[J[ia]]=U[ia]);else if(0<=mxUtils.indexOf(e,J[ia])){if(O||na)null==U[ia]?delete d.currentVertexStyle[J[ia]]:d.currentVertexStyle[J[ia]]=
+U[ia];if(aa||na||0<=mxUtils.indexOf(x,J[ia]))null==U[ia]?delete d.currentEdgeStyle[J[ia]]:d.currentEdgeStyle[J[ia]]=U[ia]}}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 O=d.currentVertexStyle.fontFamily||"Helvetica",
+U=String(d.currentVertexStyle.fontSize||"12"),J=d.getView().getState(d.getSelectionCell());null!=J&&(O=J.style[mxConstants.STYLE_FONTFAMILY]||O,U=J.style[mxConstants.STYLE_FONTSIZE]||U,10<O.length&&(O=O.substring(0,8)+"..."));this.toolbar.setFontName(O);this.toolbar.setFontSize(U)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(O,U){O=U.getProperty("cells");U=U.getProperty("parent");null!=U&&d.getModel().isLayer(U)&&
+!d.isCellVisible(U)&&null!=O&&0<O.length&&d.getModel().setVisible(U,!0)});this.gestureHandler=mxUtils.bind(this,function(O){null!=this.currentMenu&&mxEvent.getSource(O)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
+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 h=d(a,4);if(null!=b&&b(e-8,h,f))break;value=d(a,f);d(a,4);if("IEND"==h)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 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,
+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,
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(),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.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.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,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 D=this.editor.graph.view.getState(B);
-if(B==f.getChildAt(e,d+u)&&null!=D&&1==mxUtils.getValue(D.style,"colspan",1)&&1==mxUtils.getValue(D.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,D,F){var I=a.getCompositeParent(u.cell);B=a.getCellGeometry(I);for(r.consume();null!=I&&a.model.isVertex(I)&&null!=B&&B.relative;)cell=
-I,I=a.model.getParent(cell),B=a.getCellGeometry(I);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),I,mxUtils.bind(this,function(C){F(C);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(C))}),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 D=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-D.x;D=a.container.scrollTop+r.y-D.y;var I=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),C=b.showShapePicker(F,D,I,mxUtils.bind(this,function(N){null!=N&&a.connectVertex(I,x,a.defaultEdgeLength,B,!0,!0,function(R,S,Q){Q(N);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(N))},
-function(R){a.selectCellsForConnectVertex(R)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(C,r,F,D,x);mxUtils.setOpacity(C,30);mxEvent.addListener(C,"mouseenter",function(){mxUtils.setOpacity(C,100)});mxEvent.addListener(C,"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: "+
+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]),h=g.getIndex(d),n=null,u=1,m=1,r=0,x=h<g.getChildCount()-1?f.getChildAt(f.getChildAt(g,h+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=h+m<g.getChildCount()?f.getChildAt(f.getChildAt(g,h+m),e):null);var D=this.editor.graph.view.getState(B);
+if(B==f.getChildAt(d,e+u)&&null!=D&&1==mxUtils.getValue(D.style,"colspan",1)&&1==mxUtils.getValue(D.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 h=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?h.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,D,F){var H=a.getCompositeParent(u.cell);B=a.getCellGeometry(H);for(r.consume();null!=H&&a.model.isVertex(H)&&null!=B&&B.relative;)cell=
+H,H=a.model.getParent(cell),B=a.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),H,mxUtils.bind(this,function(C){F(C);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(C))}),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 D=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-D.x;D=a.container.scrollTop+r.y-D.y;var H=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),C=b.showShapePicker(F,D,H,mxUtils.bind(this,function(N){null!=N&&a.connectVertex(H,x,a.defaultEdgeLength,B,!0,!0,function(Q,T,R){R(N);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(N))},
+function(Q){a.selectCellsForConnectVertex(Q)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(C,r,F,D,x);mxUtils.setOpacity(C,30);mxEvent.addListener(C,"mouseenter",function(){mxUtils.setOpacity(C,100)});mxEvent.addListener(C,"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,h,n){var u=null;if(null!=h&&0<h.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>h.length?35*h.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 D=document.createElement("a");D.className="geItem";D.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";u.appendChild(D);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,D,null,!0,!1,B.geometry.width,B.geometry.height);mxEvent.addListener(D,"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;"),
+this.sidebar.graph.pasteStyle(x,[B]):m.insertHandler([B],""!=B.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([B],25,25,D,null,!0,!1,B.geometry.width,B.geometry.height);mxEvent.addListener(D,"click",function(){var F=r.cloneCell(B);if(null!=d)d(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!=e&&e()})});for(g=0;g<(n?Math.min(h.length,4):h.length);g++)f(h[g]);h=u.offsetTop+u.clientHeight-(r.container.scrollTop+r.container.offsetHeight);0<h&&(u.style.top=Math.max(r.container.scrollTop+22,b-h)+"px");h=u.offsetLeft+u.clientWidth-(r.container.scrollLeft+r.container.offsetWidth);0<h&&(u.style.left=Math.max(r.container.scrollLeft+22,a-h)+"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;"),
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 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.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.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,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.className="geAdaptiveAsset",e.style.position="absolute",e.style.marginTop="0.5px",e.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(e.style,
-"transform","scaleX(-1)"),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.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.className="geAdaptiveAsset",d.style.position="absolute",d.style.marginTop="0.5px",d.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(d.style,
+"transform","scaleX(-1)"),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.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(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 D=d.view.getState(k[B]);if(null!=D){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=D.x/D.view.scale-D.view.translate.x,F.y=D.y/D.view.scale-D.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.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 h=null;if(e.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{h=h||e.getSelectionCells();h=e.getExportableCells(e.model.getTopmostCells(h));for(var n={},u=e.createCellLookup(h),m=e.cloneCells(h,null,n),r=new mxGraphModel,x=r.getChildAt(r.getRoot(),
+0),B=0;B<m.length;B++){r.add(x,m[B]);var D=e.view.getState(h[B]);if(null!=D){var F=e.getCellGeometry(m[B]);null!=F&&F.relative&&!r.isEdge(h[B])&&null==u[mxObjectIdentity.get(r.getParent(h[B]))]&&(F.offset=null,F.relative=!1,F.x=D.x/D.view.scale-D.view.translate.x,F.y=D.y/D.view.scale-D.view.translate.y)}}e.updateCustomLinks(e.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return h};var f=mxClipboard.paste;mxClipboard.paste=function(e){var h=
+null;e.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):h=f.apply(this,arguments);a.updatePasteActionStates();return h};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,h){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 J=this.graph.getPageLayout(),ba=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+J.x*ba.width),this.scale*(this.translate.y+J.y*ba.height),this.scale*J.width*ba.width,
-this.scale*J.height*ba.height)};a.getPreferredPageSize=function(J,ba,ia){J=this.getPageLayout();ba=this.getPageSize();return new mxRectangle(0,0,J.width*ba.width,J.height*ba.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(J,ba,ia,na){if(null!=a.container&&!a.isViewer()){ia=null!=ia?ia:0;na=null!=na?na:0;var W=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),da=mxUtils.hasScrollbars(a.container),sa=a.view.translate,ta=
-a.view.scale,Ja=mxRectangle.fromRectangle(W);Ja.x=Ja.x/ta-sa.x;Ja.y=Ja.y/ta-sa.y;Ja.width/=ta;Ja.height/=ta;sa=a.container.scrollTop;var Ia=a.container.scrollLeft,ua=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ua+=3;var Ba=a.container.offsetWidth-ua;ua=a.container.offsetHeight-ua;J=J?Math.max(.3,Math.min(ba||1,Ba/Ja.width)):ta;ba=(Ba-J*Ja.width)/2/J;var qa=0==this.lightboxVerticalDivider?0:(ua-J*Ja.height)/this.lightboxVerticalDivider/J;da&&(ba=Math.max(ba,
-0),qa=Math.max(qa,0));if(da||W.width<Ba||W.height<ua)a.view.scaleAndTranslate(J,Math.floor(ba-Ja.x),Math.floor(qa-Ja.y)),a.container.scrollTop=sa*J/ta,a.container.scrollLeft=Ia*J/ta;else if(0!=ia||0!=na)W=a.view.translate,a.view.setTranslate(Math.floor(W.x+ia/ta),Math.floor(W.y+na/ta))}});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(J){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(J){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 J=this.graph.getPageLayout(),aa=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+J.x*aa.width),this.scale*(this.translate.y+J.y*aa.height),this.scale*J.width*aa.width,
+this.scale*J.height*aa.height)};a.getPreferredPageSize=function(J,aa,ia){J=this.getPageLayout();aa=this.getPageSize();return new mxRectangle(0,0,J.width*aa.width,J.height*aa.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(J,aa,ia,na){if(null!=a.container&&!a.isViewer()){ia=null!=ia?ia:0;na=null!=na?na:0;var W=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),da=mxUtils.hasScrollbars(a.container),sa=a.view.translate,ta=
+a.view.scale,Ja=mxRectangle.fromRectangle(W);Ja.x=Ja.x/ta-sa.x;Ja.y=Ja.y/ta-sa.y;Ja.width/=ta;Ja.height/=ta;sa=a.container.scrollTop;var Ia=a.container.scrollLeft,ua=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ua+=3;var Ba=a.container.offsetWidth-ua;ua=a.container.offsetHeight-ua;J=J?Math.max(.3,Math.min(aa||1,Ba/Ja.width)):ta;aa=(Ba-J*Ja.width)/2/J;var qa=0==this.lightboxVerticalDivider?0:(ua-J*Ja.height)/this.lightboxVerticalDivider/J;da&&(aa=Math.max(aa,
+0),qa=Math.max(qa,0));if(da||W.width<Ba||W.height<ua)a.view.scaleAndTranslate(J,Math.floor(aa-Ja.x),Math.floor(qa-Ja.y)),a.container.scrollTop=sa*J/ta,a.container.scrollLeft=Ia*J/ta;else if(0!=ia||0!=na)W=a.view.translate,a.view.setTranslate(Math.floor(W.x+ia/ta),Math.floor(W.y+na/ta))}});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(J){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(J){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 d=mxUtils.bind(this,function(){var J=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=J?parseInt(J["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(J,ba,ia){k++;
-var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",J);null!=ia&&na.setAttribute("title",ia);J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("src",ba);J.style.width="36px";J.style.filter="invert(100%)";na.appendChild(J);this.chromelessToolbar.appendChild(na);return na});if(null!=g.backBtn){var n=Graph.sanitizeLink(g.backBtn.url);null!=n&&d(mxUtils.bind(this,function(J){window.location.href=
-n;mxEvent.consume(J)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var u=d(mxUtils.bind(this,function(J){this.actions.get("previousPage").funct();mxEvent.consume(J)}),Editor.previousImage,mxResources.get("previousPage")),m=document.createElement("div");m.style.fontFamily=Editor.defaultHtmlFont;m.style.display="inline-block";m.style.verticalAlign="top";m.style.fontWeight="bold";m.style.marginTop="8px";m.style.fontSize="14px";m.style.color=mxClient.IS_IE||mxClient.IS_IE11?
-"#000000":"#ffffff";this.chromelessToolbar.appendChild(m);var r=d(mxUtils.bind(this,function(J){this.actions.get("nextPage").funct();mxEvent.consume(J)}),Editor.nextImage,mxResources.get("nextPage")),x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(m.innerText="",mxUtils.write(m,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";r.style.paddingLeft="4px";r.style.paddingRight=
-"0px";var B=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(r.style.display="",u.style.display="",m.style.display="inline-block"):(r.style.display="none",u.style.display="none",m.style.display="none");x()});this.editor.addListener("resetGraphView",B);this.editor.addListener("pageSelected",x)}d(mxUtils.bind(this,function(J){this.actions.get("zoomOut").funct();mxEvent.consume(J)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,
-function(J){this.actions.get("zoomIn").funct();mxEvent.consume(J)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(J){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(J)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,F=null,I=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);D=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),J||200)}),C=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,J||30)});if("1"==urlParams.layers){this.layersDialog=null;var N=d(mxUtils.bind(this,function(J){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 ba=N.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=ba.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));ba=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=ba.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(J)}),Editor.layersImage,mxResources.get("layers")),R=a.getModel();R.addListener(mxEvent.CHANGE,function(){N.style.display=1<R.getChildCount(R.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(J){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(J)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(B=0;B<this.lightboxToolbarActions.length;B++){var S=this.lightboxToolbarActions[B];S.elem=d(S.fn,S.icon,S.tooltip)}if(null!=g.refreshBtn){var Q=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);
-d(mxUtils.bind(this,function(J){null!=Q?window.location.href=Q:window.location.reload();mxEvent.consume(J)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(J){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(J)}),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(J){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(J))}),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(J){mxEvent.isTouchEvent(J)||(mxEvent.isShiftDown(J)||C(30),I())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(J){mxEvent.consume(J)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(J){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(J)?I():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(J){mxEvent.isShiftDown(J)?I():C(100);
-mxEvent.consume(J)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(J){mxEvent.isTouchEvent(J)||C(30)}));var aa=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,ba){this.startX=ba.getGraphX();this.startY=ba.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(J,ba){},mouseUp:function(J,ba){mxEvent.isTouchEvent(ba.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<
-aa&&Math.abs(this.scrollTop-a.container.scrollTop)<aa&&Math.abs(this.startX-ba.getGraphX())<aa&&Math.abs(this.startY-ba.getGraphY())<aa&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?I():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var U=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var J=this.graph.getPagePadding(),ba=this.graph.getPageSize();this.translate.x=J.x-(this.x0||
-0)*ba.width;this.translate.y=J.y-(this.y0||0)*ba.height}U.apply(this,arguments)};if(!a.isViewer()){var P=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var J=this.getPageLayout(),ba=this.getPagePadding(),ia=this.getPageSize(),na=Math.ceil(2*ba.x+J.width*ia.width),W=Math.ceil(2*ba.y+J.height*ia.height),da=a.minimumGraphSize;if(null==da||da.width!=na||da.height!=W)a.minimumGraphSize=new mxRectangle(0,0,na,W);na=ba.x-J.x*ia.width;ba=ba.y-J.y*
-ia.height;this.autoTranslate||this.view.translate.x==na&&this.view.translate.y==ba?P.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=J.x,this.view.y0=J.y,J=a.view.translate.x,ia=a.view.translate.y,a.view.setTranslate(na,ba),a.container.scrollLeft+=Math.round((na-J)*a.view.scale),a.container.scrollTop+=Math.round((ba-ia)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var X=a.view.getBackgroundPane(),ja=a.view.getDrawPane();
-a.cumulativeZoomFactor=1;var fa=null,ra=null,K=null,V=null,O=null,T=function(J){null!=fa&&window.clearTimeout(fa);0<=J&&window.setTimeout(function(){if(!a.isMouseDown||V)fa=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)),ja.style.transformOrigin=
-"",X.style.transformOrigin="",mxClient.IS_SF?(ja.style.transform="scale(1)",X.style.transform="scale(1)",window.setTimeout(function(){ja.style.transform="";X.style.transform=""},0)):(ja.style.transform="",X.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var ba=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ia=mxUtils.getOffset(a.container),na=a.view.scale,W=0,da=0;null!=ra&&(W=a.container.offsetWidth/2-ra.x+ia.x,da=a.container.offsetHeight/
-2-ra.y+ia.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=na&&(null!=K&&(W+=ba.x-K.x,da+=ba.y-K.y),null!=b&&f.chromelessResize(!1,null,W*(a.cumulativeZoomFactor-1),da*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==W&&0==da||(a.container.scrollLeft-=W*(a.cumulativeZoomFactor-1),a.container.scrollTop-=da*(a.cumulativeZoomFactor-1)));null!=O&&ja.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=V=ra=K=fa=null}),null!=J?J:a.isFastZoomEnabled()?
-f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(J,ba,ia,na){na=null!=na?na:this.zoomFactor;(ba=ba||!a.scrollbars)&&(ra=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));J?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var e=mxUtils.bind(this,function(){var J=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=J?parseInt(J["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",e);e();var h=0;e=mxUtils.bind(this,function(J,aa,ia){h++;
+var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",J);null!=ia&&na.setAttribute("title",ia);J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("src",aa);J.style.width="36px";J.style.filter="invert(100%)";na.appendChild(J);this.chromelessToolbar.appendChild(na);return na});if(null!=g.backBtn){var n=Graph.sanitizeLink(g.backBtn.url);null!=n&&e(mxUtils.bind(this,function(J){window.location.href=
+n;mxEvent.consume(J)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var u=e(mxUtils.bind(this,function(J){this.actions.get("previousPage").funct();mxEvent.consume(J)}),Editor.previousImage,mxResources.get("previousPage")),m=document.createElement("div");m.style.fontFamily=Editor.defaultHtmlFont;m.style.display="inline-block";m.style.verticalAlign="top";m.style.fontWeight="bold";m.style.marginTop="8px";m.style.fontSize="14px";m.style.color=mxClient.IS_IE||mxClient.IS_IE11?
+"#000000":"#ffffff";this.chromelessToolbar.appendChild(m);var r=e(mxUtils.bind(this,function(J){this.actions.get("nextPage").funct();mxEvent.consume(J)}),Editor.nextImage,mxResources.get("nextPage")),x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(m.innerText="",mxUtils.write(m,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";r.style.paddingLeft="4px";r.style.paddingRight=
+"0px";var B=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(r.style.display="",u.style.display="",m.style.display="inline-block"):(r.style.display="none",u.style.display="none",m.style.display="none");x()});this.editor.addListener("resetGraphView",B);this.editor.addListener("pageSelected",x)}e(mxUtils.bind(this,function(J){this.actions.get("zoomOut").funct();mxEvent.consume(J)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");e(mxUtils.bind(this,
+function(J){this.actions.get("zoomIn").funct();mxEvent.consume(J)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(J){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(J)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,F=null,H=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);D=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),J||200)}),C=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,J||30)});if("1"==urlParams.layers){this.layersDialog=null;var N=e(mxUtils.bind(this,function(J){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 aa=N.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=aa.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));aa=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=aa.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(J)}),Editor.layersImage,mxResources.get("layers")),Q=a.getModel();Q.addListener(mxEvent.CHANGE,function(){N.style.display=1<Q.getChildCount(Q.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(e);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||e(mxUtils.bind(this,function(J){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(J)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(B=0;B<this.lightboxToolbarActions.length;B++){var T=this.lightboxToolbarActions[B];T.elem=e(T.fn,T.icon,T.tooltip)}if(null!=g.refreshBtn){var R=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);
+e(mxUtils.bind(this,function(J){null!=R?window.location.href=R:window.location.reload();mxEvent.consume(J)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&e(mxUtils.bind(this,function(J){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(J)}),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(J){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(J))}),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(J){mxEvent.isTouchEvent(J)||(mxEvent.isShiftDown(J)||C(30),H())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(J){mxEvent.consume(J)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(J){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(J)?H():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(J){mxEvent.isShiftDown(J)?H():C(100);
+mxEvent.consume(J)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(J){mxEvent.isTouchEvent(J)||C(30)}));var ba=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,aa){this.startX=aa.getGraphX();this.startY=aa.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(J,aa){},mouseUp:function(J,aa){mxEvent.isTouchEvent(aa.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<
+ba&&Math.abs(this.scrollTop-a.container.scrollTop)<ba&&Math.abs(this.startX-aa.getGraphX())<ba&&Math.abs(this.startY-aa.getGraphY())<ba&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?H():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var S=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var J=this.graph.getPagePadding(),aa=this.graph.getPageSize();this.translate.x=J.x-(this.x0||
+0)*aa.width;this.translate.y=J.y-(this.y0||0)*aa.height}S.apply(this,arguments)};if(!a.isViewer()){var P=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var J=this.getPageLayout(),aa=this.getPagePadding(),ia=this.getPageSize(),na=Math.ceil(2*aa.x+J.width*ia.width),W=Math.ceil(2*aa.y+J.height*ia.height),da=a.minimumGraphSize;if(null==da||da.width!=na||da.height!=W)a.minimumGraphSize=new mxRectangle(0,0,na,W);na=aa.x-J.x*ia.width;aa=aa.y-J.y*
+ia.height;this.autoTranslate||this.view.translate.x==na&&this.view.translate.y==aa?P.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=J.x,this.view.y0=J.y,J=a.view.translate.x,ia=a.view.translate.y,a.view.setTranslate(na,aa),a.container.scrollLeft+=Math.round((na-J)*a.view.scale),a.container.scrollTop+=Math.round((aa-ia)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var X=a.view.getBackgroundPane(),ja=a.view.getDrawPane();
+a.cumulativeZoomFactor=1;var fa=null,ra=null,K=null,V=null,O=null,U=function(J){null!=fa&&window.clearTimeout(fa);0<=J&&window.setTimeout(function(){if(!a.isMouseDown||V)fa=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)),ja.style.transformOrigin=
+"",X.style.transformOrigin="",mxClient.IS_SF?(ja.style.transform="scale(1)",X.style.transform="scale(1)",window.setTimeout(function(){ja.style.transform="";X.style.transform=""},0)):(ja.style.transform="",X.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var aa=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ia=mxUtils.getOffset(a.container),na=a.view.scale,W=0,da=0;null!=ra&&(W=a.container.offsetWidth/2-ra.x+ia.x,da=a.container.offsetHeight/
+2-ra.y+ia.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=na&&(null!=K&&(W+=aa.x-K.x,da+=aa.y-K.y),null!=b&&f.chromelessResize(!1,null,W*(a.cumulativeZoomFactor-1),da*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==W&&0==da||(a.container.scrollLeft-=W*(a.cumulativeZoomFactor-1),a.container.scrollTop-=da*(a.cumulativeZoomFactor-1)));null!=O&&ja.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=V=ra=K=fa=null}),null!=J?J:a.isFastZoomEnabled()?
+f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(J,aa,ia,na){na=null!=na?na:this.zoomFactor;(aa=aa||!a.scrollbars)&&(ra=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));J?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,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/=na,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&&""!=ja.getAttribute("filter")&&(O=ja.getAttribute("filter"),ja.removeAttribute("filter")),K=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
-J=ba||null==ra?a.container.scrollLeft+a.container.clientWidth/2:ra.x+a.container.scrollLeft-a.container.offsetLeft,na=ba||null==ra?a.container.scrollTop+a.container.clientHeight/2:ra.y+a.container.scrollTop-a.container.offsetTop,ja.style.transformOrigin=J+"px "+na+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",X.style.transformOrigin=J+"px "+na+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(J=
-a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(J.style,"transform-origin",(ba||null==ra?a.container.clientWidth/2+a.container.scrollLeft-J.offsetLeft+"px":ra.x+a.container.scrollLeft-J.offsetLeft-a.container.offsetLeft+"px")+" "+(ba||null==ra?a.container.clientHeight/2+a.container.scrollTop-J.offsetTop+"px":ra.y+a.container.scrollTop-J.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(J.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity=
-"0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&f.hoverIcons.reset());T(a.isFastZoomEnabled()?ia:0)};mxEvent.addGestureListeners(a.container,function(J){null!=fa&&window.clearTimeout(fa)},null,function(J){1!=a.cumulativeZoomFactor&&T(0)});mxEvent.addListener(a.container,"scroll",function(J){null==fa||a.isMouseDown||1==a.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(J,ba,ia,na,W){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||
-0==this.dialogs.length)if(!a.scrollbars&&!ia&&a.isScrollWheelEvent(J))ia=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(J)?a.view.setTranslate(ia.x+(ba?-na:na),ia.y):a.view.setTranslate(ia.x,ia.y+(ba?na:-na));else if(ia||a.isZoomWheelEvent(J))for(var da=mxEvent.getSource(J);null!=da;){if(da==a.container)return a.tooltipHandler.hideTooltip(),ra=null!=na&&null!=W?new mxPoint(na,W):new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),V=ia,ia=a.zoomFactor,na=null,J.ctrlKey&&null!=J.deltaY&&
-40>Math.abs(J.deltaY)&&Math.round(J.deltaY)!=J.deltaY?ia=1+Math.abs(J.deltaY)/20*(ia-1):null!=J.movementY&&"pointermove"==J.type&&(ia=1+Math.max(1,Math.abs(J.movementY))/20*(ia-1),na=-1),a.lazyZoom(ba,null,na,ia),mxEvent.consume(J),!1;da=da.parentNode}}),a.container);a.panningHandler.zoomGraph=function(J){a.cumulativeZoomFactor=J.scale;a.lazyZoom(0<J.scale,!0);mxEvent.consume(J)}};
+J=aa||null==ra?a.container.scrollLeft+a.container.clientWidth/2:ra.x+a.container.scrollLeft-a.container.offsetLeft,na=aa||null==ra?a.container.scrollTop+a.container.clientHeight/2:ra.y+a.container.scrollTop-a.container.offsetTop,ja.style.transformOrigin=J+"px "+na+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",X.style.transformOrigin=J+"px "+na+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(J=
+a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(J.style,"transform-origin",(aa||null==ra?a.container.clientWidth/2+a.container.scrollLeft-J.offsetLeft+"px":ra.x+a.container.scrollLeft-J.offsetLeft-a.container.offsetLeft+"px")+" "+(aa||null==ra?a.container.clientHeight/2+a.container.scrollTop-J.offsetTop+"px":ra.y+a.container.scrollTop-J.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(J.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity=
+"0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&f.hoverIcons.reset());U(a.isFastZoomEnabled()?ia:0)};mxEvent.addGestureListeners(a.container,function(J){null!=fa&&window.clearTimeout(fa)},null,function(J){1!=a.cumulativeZoomFactor&&U(0)});mxEvent.addListener(a.container,"scroll",function(J){null==fa||a.isMouseDown||1==a.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(J,aa,ia,na,W){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||
+0==this.dialogs.length)if(!a.scrollbars&&!ia&&a.isScrollWheelEvent(J))ia=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(J)?a.view.setTranslate(ia.x+(aa?-na:na),ia.y):a.view.setTranslate(ia.x,ia.y+(aa?na:-na));else if(ia||a.isZoomWheelEvent(J))for(var da=mxEvent.getSource(J);null!=da;){if(da==a.container)return a.tooltipHandler.hideTooltip(),ra=null!=na&&null!=W?new mxPoint(na,W):new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),V=ia,ia=a.zoomFactor,na=null,J.ctrlKey&&null!=J.deltaY&&
+40>Math.abs(J.deltaY)&&Math.round(J.deltaY)!=J.deltaY?ia=1+Math.abs(J.deltaY)/20*(ia-1):null!=J.movementY&&"pointermove"==J.type&&(ia=1+Math.max(1,Math.abs(J.movementY))/20*(ia-1),na=-1),a.lazyZoom(aa,null,na,ia),mxEvent.consume(J),!1;da=da.parentNode}}),a.container);a.panningHandler.zoomGraph=function(J){a.cumulativeZoomFactor=J.scale;a.lazyZoom(0<J.scale,!0);mxEvent.consume(J)}};
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.isFormatPanelVisible=function(){return 0<this.formatWidth};
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(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.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.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a;this.hideShapePicker()};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 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*
+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"))};
-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}
+EditorUi.prototype.installResizeHandler=function(a,b,f){b&&(a.window.setSize=function(g,e){if(!this.minimized){var h=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;g=Math.min(g,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());e=Math.min(e,h-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});a.window.setLocation=function(g,e){var h=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,h-u));e=Math.max(0,Math.min(e,n-m));this.getX()==g&&this.getY()==e||mxWindow.prototype.setLocation.apply(this,arguments);b&&!this.minimized&&this.setSize(u,m)};var d=mxUtils.bind(this,function(){var g=a.window.getX(),e=a.window.getY();a.window.setLocation(g,e)});mxEvent.addListener(window,"resize",d);a.destroy=function(){mxEvent.removeListener(window,
+"resize",d);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,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}
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,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)})();
+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)})();
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,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);
+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(h,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);
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(0<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);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&&
+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&&
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 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.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 h=this.footerHeight+d;e=Math.max(0,Math.min(f-b-h,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
+e+"px";this.sidebarFooterContainer.style.bottom=h+"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";h=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=f+"px",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+h.x+"px",this.diagramContainer.style.top=b+h.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.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()};
@@ -2260,22 +2260,26 @@ EditorUi.prototype.createSidebarContainer=function(){var a=document.createElemen
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var a=this.editor.chromeless?null:this.createFooter();null!=a&&(this.footerContainer.appendChild(a),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
-!0,0,mxUtils.bind(this,function(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))};
+!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";mxEvent.addListener(a,"click",mxUtils.bind(this,function(b){var f=mxEvent.getSource(b),d=f.getAttribute("data-action");if("statusFunction"==d&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=d)f=this.actions.get(d),null!=f&&f.funct();else{d=f.getAttribute("data-title");var g=f.getAttribute("data-message");null!=d&&null!=g?this.showError(d,g):(f=f.getAttribute("data-link"),
+null!=f&&this.editor.graph.openLink(f))}mxEvent.consume(b)}));return a};
+EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a;0==this.statusContainer.getElementsByTagName("div").length&&null!=a&&0<a.length&&(this.statusContainer.innerText="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a));a=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=a)for(var b=0;b<a.length;b++)(function(f){mxUtils.setOpacity(f,0);mxUtils.setPrefixedStyle(f.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(f.style,"transition","all 0.2s ease");
+window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,100);mxUtils.setPrefixedStyle(f.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","scaleX(0)");mxUtils.setOpacity(f,0);window.setTimeout(mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(a[b])};
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,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.addSplitHandler=function(a,b,f,d){function g(x){if(null!=h){var B=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));d(Math.max(0,n+(b?B.x-h.x:h.y-B.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function e(x){g(x);h=n=null}var h=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){h=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,h,n,u,m,r,x,B){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),d,g,e,h,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,h,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,h,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,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()};
+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(h){this.handleError(h)}};
+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()};
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 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)});
+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),h="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var n=h.lastIndexOf("%3E");
+0<=n&&n<h.length-3&&(h=h.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(h);this.isCompatibleString(m)&&(h=m)}catch(r){}}catch(r){}a(this.isCompatibleString(h)?h: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)});
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"),
@@ -2284,24 +2288,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),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;e.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&e.isEnabled()?(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.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;d.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&d.isEnabled()?(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 h=new Image;h.onload=function(){f(e,h.width,h.height)};h.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};h.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.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(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.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.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,D){if(!e.isSelectionEmpty()&&e.isEnabled()){B=null!=B?B:1;var F=e.getCompositeParents(e.getSelectionCells()),I=0<F.length?F[0]:null;if(null!=I)if(D){e.getModel().beginUpdate();try{for(I=0;I<F.length;I++)if(e.getModel().isVertex(F[I])&&e.isCellResizable(F[I])){var C=e.getCellGeometry(F[I]);null!=C&&(C=C.clone(),37==x?C.width=Math.max(0,C.width-B):38==x?C.height=Math.max(0,C.height-B):39==x?C.width+=B:40==x&&(C.height+=B),e.getModel().setGeometry(F[I],
-C))}}finally{e.getModel().endUpdate()}}else{C=e.model.getParent(I);var N=e.getView().scale;D=null;1==e.getSelectionCount()&&e.model.isVertex(I)&&null!=e.layoutManager&&!e.isCellLocked(I)&&(D=e.layoutManager.getLayout(C));if(null!=D&&D.constructor==mxStackLayout)B=C.getIndex(I),37==x||38==x?e.model.add(C,I,Math.max(0,B-1)):(39==x||40==x)&&e.model.add(C,I,Math.min(e.model.getChildCount(C),B+1));else{var R=e.graphHandler;null!=R&&(null==R.first&&R.start(I,0,0,F),null!=R.first&&(I=F=0,37==x?F=-B:38==
-x?I=-B:39==x?F=B:40==x&&(I=B),R.currentDx+=F*N,R.currentDy+=I*N,R.checkPreview(),R.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=R.first){var S=R.roundLength(R.currentDx/N),Q=R.roundLength(R.currentDy/N);R.moveCells(R.cells,S,Q);R.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 D=e.connectVertex(e.getSelectionCell(),n[x.keyCode],
-e.defaultEdgeLength,x,!0);null!=D&&0<D.length&&(1==D.length&&e.model.isEdge(D[0])?e.setSelectionCell(e.model.getTerminal(D[0],!1)):e.setSelectionCell(D[D.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,D,F){var I=this.actions.get(D);null!=I&&(D=function(){I.isEnabled()&&I.funct.apply(this,arguments)},B?F?g.bindControlShiftKey(x,D):g.bindControlKey(x,D):F?g.bindShiftKey(x,D):g.bindKey(x,D))});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",
+EditorUi.prototype.createKeyHandler=function(a){function b(x,B,D){if(!d.isSelectionEmpty()&&d.isEnabled()){B=null!=B?B:1;var F=d.getCompositeParents(d.getSelectionCells()),H=0<F.length?F[0]:null;if(null!=H)if(D){d.getModel().beginUpdate();try{for(H=0;H<F.length;H++)if(d.getModel().isVertex(F[H])&&d.isCellResizable(F[H])){var C=d.getCellGeometry(F[H]);null!=C&&(C=C.clone(),37==x?C.width=Math.max(0,C.width-B):38==x?C.height=Math.max(0,C.height-B):39==x?C.width+=B:40==x&&(C.height+=B),d.getModel().setGeometry(F[H],
+C))}}finally{d.getModel().endUpdate()}}else{C=d.model.getParent(H);var N=d.getView().scale;D=null;1==d.getSelectionCount()&&d.model.isVertex(H)&&null!=d.layoutManager&&!d.isCellLocked(H)&&(D=d.layoutManager.getLayout(C));if(null!=D&&D.constructor==mxStackLayout)B=C.getIndex(H),37==x||38==x?d.model.add(C,H,Math.max(0,B-1)):(39==x||40==x)&&d.model.add(C,H,Math.min(d.model.getChildCount(C),B+1));else{var Q=d.graphHandler;null!=Q&&(null==Q.first&&Q.start(H,0,0,F),null!=Q.first&&(H=F=0,37==x?F=-B:38==
+x?H=-B:39==x?F=B:40==x&&(H=B),Q.currentDx+=F*N,Q.currentDy+=H*N,Q.checkPreview(),Q.updatePreview()),null!=h&&window.clearTimeout(h),h=window.setTimeout(function(){if(null!=Q.first){var T=Q.roundLength(Q.currentDx/N),R=Q.roundLength(Q.currentDy/N);Q.moveCells(Q.cells,T,R);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 h=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 D=d.connectVertex(d.getSelectionCell(),n[x.keyCode],
+d.defaultEdgeLength,x,!0);null!=D&&0<D.length&&(1==D.length&&d.model.isEdge(D[0])?d.setSelectionCell(d.model.getTerminal(D[0],!1)):d.setSelectionCell(D[D.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,D,F){var H=this.actions.get(D);null!=H&&(D=function(){H.isEnabled()&&H.funct.apply(this,arguments)},B?F?g.bindControlShiftKey(x,D):g.bindControlKey(x,D):F?g.bindShiftKey(x,D):g.bindKey(x,D))});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,!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,"format",!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(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
+!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};
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),
@@ -2321,34 +2325,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,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()),
+Sidebar.prototype.createTooltip=function(a,b,f,d,g,e,h,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||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"),
+"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"),
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,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,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};
+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);h=null!=h?h:this.getTooltipOffset(a,r);a=h.x;h=h.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=h+"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 h=mxUtils.bind(this,function(){this.createTooltip(a,b,f,d,g,e)});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=window.setTimeout(h,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.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,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(){I()});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={},D=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var C=f.firstChild;null!=C;){var N=C.nextSibling;C!=e&&C!=k&&C.parentNode.removeChild(C);C=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 I=mxUtils.bind(this,
-function(){D=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 C={};this.currentSearch=C;this.searchEntries(u,D,x,mxUtils.bind(this,function(N,R,S,Q){if(this.currentSearch==C){N=null!=N?N:[];m=!1;x++;this.insertSearchHint(f,u,D,x,N,R,S,Q);
-0==N.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(R=0;R<N.length;R++)mxUtils.bind(this,function(aa){try{var U=aa();null==B[U.innerHTML]?(B[U.innerHTML]=null!=aa.parentLibraries?aa.parentLibraries.slice():[],f.appendChild(U)):null!=aa.parentLibraries&&(B[U.innerHTML]=B[U.innerHTML].concat(aa.parentLibraries));mxEvent.addGestureListeners(U,null,null,mxUtils.bind(this,function(P){var X=B[U.innerHTML];mxEvent.isPopupTrigger(P)&&this.showPopupMenuForEntry(U,X,P)}));mxEvent.disableContextMenu(U)}catch(P){}})(N[R]);
-S?(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(C){g.value=C;I()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(C){13==C.keyCode&&(I(),mxEvent.consume(C))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(C){""==
-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(C){C.stopPropagation&&C.stopPropagation();C.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(C){C.stopPropagation&&
+Sidebar.prototype.searchEntries=function(a,b,f,d,g){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");g=new mxDictionary;var h=(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==h)){d(a.slice(f*b,h),h,!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 h=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){H()});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";h.style.paddingTop="4px";h.style.paddingBottom=
+"4px";h.appendChild(n);f.appendChild(h);var u="",m=!1,r=!1,x=0,B={},D=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var C=f.firstChild;null!=C;){var N=C.nextSibling;C!=d&&C!=h&&C.parentNode.removeChild(C);C=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="",F());g.focus()});var H=mxUtils.bind(this,
+function(){D=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=h.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 C={};this.currentSearch=C;this.searchEntries(u,D,x,mxUtils.bind(this,function(N,Q,T,R){if(this.currentSearch==C){N=null!=N?N:[];m=!1;x++;this.insertSearchHint(f,u,D,x,N,Q,T,R);
+0==N.length&&1==x&&(u="");null!=h.parentNode&&h.parentNode.removeChild(h);for(Q=0;Q<N.length;Q++)mxUtils.bind(this,function(ba){try{var S=ba();null==B[S.innerHTML]?(B[S.innerHTML]=null!=ba.parentLibraries?ba.parentLibraries.slice():[],f.appendChild(S)):null!=ba.parentLibraries&&(B[S.innerHTML]=B[S.innerHTML].concat(ba.parentLibraries));mxEvent.addGestureListeners(S,null,null,mxUtils.bind(this,function(P){var X=B[S.innerHTML];mxEvent.isPopupTrigger(P)&&this.showPopupMenuForEntry(S,X,P)}));mxEvent.disableContextMenu(S)}catch(P){}})(N[Q]);
+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(h)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else F(),u=g.value="",B={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(C){g.value=C;H()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(C){13==C.keyCode&&(H(),mxEvent.consume(C))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(C){""==
+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(C){C.stopPropagation&&C.stopPropagation();C.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(C){C.stopPropagation&&
C.stopPropagation();C.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,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;",
+Sidebar.prototype.insertSearchHint=function(a,b,f,d,g,e,h,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;",
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;",
@@ -2357,16 +2361,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(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.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.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 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()};
+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()};
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="),
@@ -2376,10 +2380,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 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;",
+"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;",
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;",
@@ -2387,7 +2391,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 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,
+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,
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()};
@@ -2414,147 +2418,147 @@ 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 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;strokeColor=inherit;");
-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"),
+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;strokeColor=inherit;");
+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 h=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");h.vertex=!0;h.geometry.relative=!0;h.geometry.offset=new mxPoint(-27,7);e.insert(h);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 h=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");h.vertex=!0;h.geometry.relative=!0;h.geometry.offset=new mxPoint(-24,4);e.insert(h);
+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"),
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 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;",
+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;",
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 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;",
+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 h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+h.geometry.setTerminalPoint(new mxPoint(15,90),!1);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,!0);return b.createVertexTemplateFromCells([e,h],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 h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+h.geometry.setTerminalPoint(new mxPoint(60,100),!1);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,!0);return b.createVertexTemplateFromCells([e,h],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 h=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;");h.vertex=!0;e.insert(h);h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");h.geometry.setTerminalPoint(new mxPoint(80,120),!1);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,
+!0);return b.createVertexTemplateFromCells([e,h],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 h=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");h.geometry.setTerminalPoint(new mxPoint(180,20),!1);h.geometry.relative=
+!0;h.geometry.x=-1;h.edge=!0;e.insertEdge(h,!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,h,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 h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");h.geometry.setTerminalPoint(new mxPoint(100,80),!1);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,!0);return b.createVertexTemplateFromCells([e,h],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 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==",
+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 h=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");h.geometry.setTerminalPoint(new mxPoint(-60,0),!0);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,!1);return b.createVertexTemplateFromCells([e,h],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 h=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");h.geometry.setTerminalPoint(new mxPoint(-70,0),!0);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,!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,
+h,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 h=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;");h.geometry.setTerminalPoint(new mxPoint(0,0),!0);h.geometry.points=[new mxPoint(30,0)];h.geometry.relative=
+!0;h.edge=!0;e.insertEdge(h,!1);return b.createVertexTemplateFromCells([e,h],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 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,
+"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 h=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;e.insert(h);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 h=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;e.insert(h);h=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;e.insert(h);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 h=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;e.insert(h);h=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;e.insert(h);return b.createEdgeTemplateFromCells([e],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,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.createThumb=function(a,b,f,d,g,e,h){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!=h&&(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.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,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));
+Sidebar.prototype.createItem=function(a,b,f,d,g,e,h,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,h,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,h,r),this.createDragPreview(g,e),a,r),this.addClickHandler(u,d,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,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,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,D=(n+B.x)*x,F=(u+B.y)*x,I=g.cloneCells(a);g.splitEdge(k,I,null,n-e.width/2,u-e.height/2,D,F);r=I}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var C=g.layoutManager.getLayout(k);if(null!=C)for(x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,k=0;k<r.length;k++)C.moveCell(r[k],D,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.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),h="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],
+[u]));for(r=0;r<h.length;r++){var x=m[h[r]];null!=x&&f.setCellStyles(h[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,h,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==h||mxEvent.isAltDown(e)?!1:g.isValidDropTarget(h,a,e);var r=null;null==h||m||(h=null);if(!g.isCellLocked(h||
+g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(h,a,e)){var x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,H=g.cloneCells(a);g.splitEdge(h,H,null,n-d.width/2,u-d.height/2,D,F);r=H}else 0<a.length&&(r=g.importCells(a,n,u,h));if(null!=g.layoutManager){var C=g.layoutManager.getLayout(h);if(null!=C)for(x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,h=0;h<r.length;h++)C.moveCell(r[h],D,F)}!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.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,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 D=n.layoutManager.getLayout(x);null!=D&&D.constructor==mxStackLayout&&(B=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=D=0;if(null!=k){var I=k.origin;D=I.x;F=I.y;var C=d.getTerminalPoint(!1);null!=
-C&&(C.x+=I.x,C.y+=I.y)}var N=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),R=n.getCellAt((d.x+D+n.view.translate.x)*n.view.scale,(d.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(aa,U,P){return!n.isContainer(aa.cell)});if(null!=R&&R!=x)k=n.view.getState(R),null!=k&&(I=k.origin,x=R,N=!0,n.model.isEdge(a)||(d.x-=I.x-D,d.y-=I.y-F));else if(!B||n.isTableRow(a)||n.isTableCell(a))d.x+=D,d.y+=F;D=r.x;F=r.y;n.model.isEdge(b[e])&&(F=D=0);k=b=n.importCells(b,
-d.x-(N?D: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 S=n.getCellGeometry(b[e]);S.points=null;if(null!=S.getTerminalPoint(!1))S.setTerminalPoint(d.getTerminalPoint(!1),!1);else if(N&&n.model.isVertex(x)){var Q=n.view.getState(x);I=Q.cell!=n.view.currentRoot?Q.origin:new mxPoint(0,0);n.cellsMoved(b,I.x,I.y,null,null,!0)}}else r=n.getCellGeometry(b[e]),D=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,D,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(aa){this.editorUi.handleError(aa)}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.dropAndConnect=function(a,b,f,d,g){var e=this.getDropAndConnectGeometry(a,b[d],f,b),h=[];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 D=n.layoutManager.getLayout(x);null!=D&&D.constructor==mxStackLayout&&(B=!1)}h=n.model.isEdge(a)?null:n.view.getState(x);var F=D=0;if(null!=h){var H=h.origin;D=H.x;F=H.y;var C=e.getTerminalPoint(!1);null!=
+C&&(C.x+=H.x,C.y+=H.y)}var N=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),Q=n.getCellAt((e.x+D+n.view.translate.x)*n.view.scale,(e.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(ba,S,P){return!n.isContainer(ba.cell)});if(null!=Q&&Q!=x)h=n.view.getState(Q),null!=h&&(H=h.origin,x=Q,N=!0,n.model.isEdge(a)||(e.x-=H.x-D,e.y-=H.y-F));else if(!B||n.isTableRow(a)||n.isTableCell(a))e.x+=D,e.y+=F;D=r.x;F=r.y;n.model.isEdge(b[d])&&(F=D=0);h=b=n.importCells(b,
+e.x-(N?D:0),e.y-(N?F: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 T=n.getCellGeometry(b[d]);T.points=null;if(null!=T.getTerminalPoint(!1))T.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(N&&n.model.isVertex(x)){var R=n.view.getState(x);H=R.cell!=n.view.currentRoot?R.origin:new mxPoint(0,0);n.cellsMoved(b,H.x,H.y,null,null,!0)}}else r=n.getCellGeometry(b[d]),D=e.x-Math.round(r.x),F=
+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,D,F,null,null,!0),h=b.slice(),u=1==h.length?h[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(ba){this.editorUi.handleError(ba)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return h};
+Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,d){var g=this.editorUi.editor.graph,e=g.view,h=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))):(!h&&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.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,e,g){function d(da,sa){var ta=mxUtils.createImage(da.src);ta.style.width=da.width+"px";ta.style.height=da.height+"px";null!=sa&&ta.setAttribute("title",sa);mxUtils.setOpacity(ta,da==this.refreshTarget?30:20);ta.style.position="absolute";ta.style.cursor="crosshair";return ta}function k(da,sa,ta,Ja){null!=Ja.parentNode&&(mxUtils.contains(ta,da,sa)?(mxUtils.setOpacity(Ja,100),V=Ja):mxUtils.setOpacity(Ja,Ja==X?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 D=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(da,sa,ta,Ja,Ia){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&V==X){var ua=da.isCellSelected(R.cell)?da.getSelectionCells():[R.cell];ua=this.updateShapes(da.model.isEdge(R.cell)?e[0]:e[r],
-ua);da.setSelectionCells(ua)}else null!=e&&null!=V&&null!=C&&V!=X?(ua=da.model.isEdge(C.cell)||null==m?r:m,da.setSelectionCells(this.dropAndConnect(C.cell,e,K,ua,sa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(da.view.getState(da.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(da,sa){F.isActive()&&F.reset()});var I=F.mouseDown;F.mouseDown=function(da){mxEvent.isPopupTrigger(da)||mxEvent.isMultiTouchEvent(da)||u.isCellLocked(u.getDefaultParent())||
-(u.stopEditing(),I.apply(this,arguments))};var C=null,N=null,R=null,S=!1,Q=d(this.triangleUp,mxResources.get("connect")),aa=d(this.triangleRight,mxResources.get("connect")),U=d(this.triangleDown,mxResources.get("connect")),P=d(this.triangleLeft,mxResources.get("connect")),X=d(this.refreshTarget,mxResources.get("replace")),ja=null,fa=d(this.roundDrop),ra=d(this.roundDrop),K=mxConstants.DIRECTION_NORTH,V=null,O=F.createPreviewElement;F.createPreviewElement=function(da){var sa=O.apply(this,arguments);
-mxClient.IS_SVG&&(sa.style.pointerEvents="none");this.previewElementWidth=sa.style.width;this.previewElementHeight=sa.style.height;return sa};var T=F.dragEnter;F.dragEnter=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");T.apply(this,arguments)};var J=F.dragExit;F.dragExit=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");J.apply(this,arguments)};F.dragOver=function(da,sa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide();
-if(null!=this.previewElement){var ta=da.view;if(null!=R&&V==X)this.previewElement.style.display=da.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=C&&null!=V){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=da.model.isEdge(C.cell)||null==m?r:m,Ia=x.getDropAndConnectGeometry(C.cell,e[Ja],K,
-e),ua=da.model.isEdge(C.cell)?null:da.getCellGeometry(C.cell),Ba=da.getCellGeometry(e[Ja]),qa=da.model.getParent(C.cell),Ea=ta.translate.x*ta.scale,Ua=ta.translate.y*ta.scale;null!=ua&&!ua.relative&&da.model.isVertex(qa)&&qa!=ta.currentRoot&&(Ua=ta.getState(qa),Ea=Ua.x,Ua=Ua.y);ua=Ba.x;Ba=Ba.y;da.model.isEdge(e[Ja])&&(Ba=ua=0);this.previewElement.style.left=(Ia.x-ua)*ta.scale+Ea+"px";this.previewElement.style.top=(Ia.y-Ba)*ta.scale+Ua+"px";1==e.length&&(this.previewElement.style.width=Ia.width*ta.scale+
+Sidebar.prototype.createDragSource=function(a,b,f,d,g){function e(da,sa){var ta=mxUtils.createImage(da.src);ta.style.width=da.width+"px";ta.style.height=da.height+"px";null!=sa&&ta.setAttribute("title",sa);mxUtils.setOpacity(ta,da==this.refreshTarget?30:20);ta.style.position="absolute";ta.style.cursor="crosshair";return ta}function h(da,sa,ta,Ja){null!=Ja.parentNode&&(mxUtils.contains(ta,da,sa)?(mxUtils.setOpacity(Ja,100),V=Ja):mxUtils.setOpacity(Ja,Ja==X?30:20));return ta}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 D=this.isDropStyleEnabled(d,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(da,sa,ta,Ja,Ia){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=Q&&V==X){var ua=da.isCellSelected(Q.cell)?da.getSelectionCells():[Q.cell];ua=this.updateShapes(da.model.isEdge(Q.cell)?d[0]:d[r],
+ua);da.setSelectionCells(ua)}else null!=d&&null!=V&&null!=C&&V!=X?(ua=da.model.isEdge(C.cell)||null==m?r:m,da.setSelectionCells(this.dropAndConnect(C.cell,d,K,ua,sa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(da.view.getState(da.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(da,sa){F.isActive()&&F.reset()});var H=F.mouseDown;F.mouseDown=function(da){mxEvent.isPopupTrigger(da)||mxEvent.isMultiTouchEvent(da)||u.isCellLocked(u.getDefaultParent())||
+(u.stopEditing(),H.apply(this,arguments))};var C=null,N=null,Q=null,T=!1,R=e(this.triangleUp,mxResources.get("connect")),ba=e(this.triangleRight,mxResources.get("connect")),S=e(this.triangleDown,mxResources.get("connect")),P=e(this.triangleLeft,mxResources.get("connect")),X=e(this.refreshTarget,mxResources.get("replace")),ja=null,fa=e(this.roundDrop),ra=e(this.roundDrop),K=mxConstants.DIRECTION_NORTH,V=null,O=F.createPreviewElement;F.createPreviewElement=function(da){var sa=O.apply(this,arguments);
+mxClient.IS_SVG&&(sa.style.pointerEvents="none");this.previewElementWidth=sa.style.width;this.previewElementHeight=sa.style.height;return sa};var U=F.dragEnter;F.dragEnter=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");U.apply(this,arguments)};var J=F.dragExit;F.dragExit=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");J.apply(this,arguments)};F.dragOver=function(da,sa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide();
+if(null!=this.previewElement){var ta=da.view;if(null!=Q&&V==X)this.previewElement.style.display=da.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!=C&&null!=V){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=da.model.isEdge(C.cell)||null==m?r:m,Ia=x.getDropAndConnectGeometry(C.cell,d[Ja],K,
+d),ua=da.model.isEdge(C.cell)?null:da.getCellGeometry(C.cell),Ba=da.getCellGeometry(d[Ja]),qa=da.model.getParent(C.cell),Ea=ta.translate.x*ta.scale,Ua=ta.translate.y*ta.scale;null!=ua&&!ua.relative&&da.model.isVertex(qa)&&qa!=ta.currentRoot&&(Ua=ta.getState(qa),Ea=Ua.x,Ua=Ua.y);ua=Ba.x;Ba=Ba.y;da.model.isEdge(d[Ja])&&(Ba=ua=0);this.previewElement.style.left=(Ia.x-ua)*ta.scale+Ea+"px";this.previewElement.style.top=(Ia.y-Ba)*ta.scale+Ua+"px";1==d.length&&(this.previewElement.style.width=Ia.width*ta.scale+
"px",this.previewElement.style.height=Ia.height*ta.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&da.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(),ia=0,na=null,W=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(da,sa,ta,Ja){var Ia=mxEvent.isAltDown(Ja)||null==e?null:da.getCellAt(sa,ta,null,null,null,function(Ua,db,Ta){return da.isContainer(Ua.cell)});if(null!=Ia&&!this.graph.isCellConnectable(Ia)&&!this.graph.model.isEdge(Ia)){var ua=this.graph.getModel().getParent(Ia);this.graph.getModel().isVertex(ua)&&this.graph.isCellConnectable(ua)&&
-(Ia=ua)}da.isCellLocked(Ia)&&(Ia=null);var Ba=da.view.getState(Ia);ua=V=null;na!=Ba?(ba=(new Date).getTime(),ia=0,na=Ba,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Ba&&(this.updateThread=window.setTimeout(function(){null==V&&(na=Ba,F.getDropTarget(da,sa,ta,Ja))},this.dropTargetDelay+10))):ia=(new Date).getTime()-ba;if(D&&2500>ia&&null!=Ba&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(Ba.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ba.style,
-mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ba.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ba.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<ia||da.model.isEdge(Ba.cell))&&ia>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ba)&&(da.model.isVertex(Ba.cell)&&null!=r||da.model.isEdge(Ba.cell)&&da.model.isEdge(e[0]))){if(da.isCellEditable(Ba.cell)){R=
-Ba;var qa=da.model.isEdge(Ba.cell)?da.view.getPoint(Ba):new mxPoint(Ba.getCenterX(),Ba.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);X.style.left=Math.floor(qa.x)+"px";X.style.top=Math.floor(qa.y)+"px";null==ja&&(da.container.appendChild(X),ja=X.parentNode);k(sa,ta,qa,X)}}else null==R||!mxUtils.contains(R,sa,ta)||1500<ia&&!mxEvent.isShiftDown(Ja)?(R=null,null!=ja&&(X.parentNode.removeChild(X),ja=
-null)):null!=R&&null!=ja&&(qa=da.model.isEdge(R.cell)?da.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(sa,ta,qa,X));if(S&&null!=C&&!mxEvent.isAltDown(Ja)&&null==V){ua=mxRectangle.fromRectangle(C);if(da.model.isEdge(C.cell)){var Ea=C.absolutePoints;null!=fa.parentNode&&(qa=Ea[0],ua.add(k(sa,ta,new mxRectangle(qa.x-this.roundDrop.width/2,qa.y-this.roundDrop.height/
-2,this.roundDrop.width,this.roundDrop.height),fa)));null!=ra.parentNode&&(Ea=Ea[Ea.length-1],ua.add(k(sa,ta,new mxRectangle(Ea.x-this.roundDrop.width/2,Ea.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ra)))}else qa=mxRectangle.fromRectangle(C),null!=C.shape&&null!=C.shape.boundingBox&&(qa=mxRectangle.fromRectangle(C.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Ea=this.graph.selectionCellsHandler.getHandler(C.cell),null!=Ea&&(qa.x-=
-Ea.horizontalOffset/2,qa.y-=Ea.verticalOffset/2,qa.width+=Ea.horizontalOffset,qa.height+=Ea.verticalOffset,null!=Ea.rotationShape&&null!=Ea.rotationShape.node&&"hidden"!=Ea.rotationShape.node.style.visibility&&"none"!=Ea.rotationShape.node.style.display&&null!=Ea.rotationShape.boundingBox&&qa.add(Ea.rotationShape.boundingBox)),ua.add(k(sa,ta,new mxRectangle(C.getCenterX()-this.triangleUp.width/2,qa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Q)),ua.add(k(sa,ta,new mxRectangle(qa.x+
-qa.width,C.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),aa)),ua.add(k(sa,ta,new mxRectangle(C.getCenterX()-this.triangleDown.width/2,qa.y+qa.height,this.triangleDown.width,this.triangleDown.height),U)),ua.add(k(sa,ta,new mxRectangle(qa.x-this.triangleLeft.width,C.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),P));null!=ua&&ua.grow(10)}K=mxConstants.DIRECTION_NORTH;V==aa?K=mxConstants.DIRECTION_EAST:V==U||V==
-ra?K=mxConstants.DIRECTION_SOUTH:V==P&&(K=mxConstants.DIRECTION_WEST);null!=R&&V==X&&(Ba=R);qa=(null==r||da.isCellConnectable(e[r]))&&(da.model.isEdge(Ia)&&null!=r||da.model.isVertex(Ia)&&da.isCellConnectable(Ia));if(null!=C&&5E3<=ia||C!=Ba&&(null==ua||!mxUtils.contains(ua,sa,ta)||500<ia&&null==V&&qa))if(S=!1,C=5E3>ia&&ia>this.dropTargetDelay||da.model.isEdge(Ia)?Ba:null,null!=C&&qa){ua=[fa,ra,Q,aa,U,P];for(qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);da.model.isEdge(Ia)?
+this.previewElement.style.display="")}};var aa=(new Date).getTime(),ia=0,na=null,W=this.editorUi.editor.graph.getCellStyle(d[0]);F.getDropTarget=mxUtils.bind(this,function(da,sa,ta,Ja){var Ia=mxEvent.isAltDown(Ja)||null==d?null:da.getCellAt(sa,ta,null,null,null,function(Ua,db,Ta){return da.isContainer(Ua.cell)});if(null!=Ia&&!this.graph.isCellConnectable(Ia)&&!this.graph.model.isEdge(Ia)){var ua=this.graph.getModel().getParent(Ia);this.graph.getModel().isVertex(ua)&&this.graph.isCellConnectable(ua)&&
+(Ia=ua)}da.isCellLocked(Ia)&&(Ia=null);var Ba=da.view.getState(Ia);ua=V=null;na!=Ba?(aa=(new Date).getTime(),ia=0,na=Ba,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Ba&&(this.updateThread=window.setTimeout(function(){null==V&&(na=Ba,F.getDropTarget(da,sa,ta,Ja))},this.dropTargetDelay+10))):ia=(new Date).getTime()-aa;if(D&&2500>ia&&null!=Ba&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(Ba.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ba.style,
+mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ba.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ba.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<ia||da.model.isEdge(Ba.cell))&&ia>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ba)&&(da.model.isVertex(Ba.cell)&&null!=r||da.model.isEdge(Ba.cell)&&da.model.isEdge(d[0]))){if(da.isCellEditable(Ba.cell)){Q=
+Ba;var qa=da.model.isEdge(Ba.cell)?da.view.getPoint(Ba):new mxPoint(Ba.getCenterX(),Ba.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);X.style.left=Math.floor(qa.x)+"px";X.style.top=Math.floor(qa.y)+"px";null==ja&&(da.container.appendChild(X),ja=X.parentNode);h(sa,ta,qa,X)}}else null==Q||!mxUtils.contains(Q,sa,ta)||1500<ia&&!mxEvent.isShiftDown(Ja)?(Q=null,null!=ja&&(X.parentNode.removeChild(X),ja=
+null)):null!=Q&&null!=ja&&(qa=da.model.isEdge(Q.cell)?da.view.getPoint(Q):new mxPoint(Q.getCenterX(),Q.getCenterY()),qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(sa,ta,qa,X));if(T&&null!=C&&!mxEvent.isAltDown(Ja)&&null==V){ua=mxRectangle.fromRectangle(C);if(da.model.isEdge(C.cell)){var Ea=C.absolutePoints;null!=fa.parentNode&&(qa=Ea[0],ua.add(h(sa,ta,new mxRectangle(qa.x-this.roundDrop.width/2,qa.y-this.roundDrop.height/
+2,this.roundDrop.width,this.roundDrop.height),fa)));null!=ra.parentNode&&(Ea=Ea[Ea.length-1],ua.add(h(sa,ta,new mxRectangle(Ea.x-this.roundDrop.width/2,Ea.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ra)))}else qa=mxRectangle.fromRectangle(C),null!=C.shape&&null!=C.shape.boundingBox&&(qa=mxRectangle.fromRectangle(C.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Ea=this.graph.selectionCellsHandler.getHandler(C.cell),null!=Ea&&(qa.x-=
+Ea.horizontalOffset/2,qa.y-=Ea.verticalOffset/2,qa.width+=Ea.horizontalOffset,qa.height+=Ea.verticalOffset,null!=Ea.rotationShape&&null!=Ea.rotationShape.node&&"hidden"!=Ea.rotationShape.node.style.visibility&&"none"!=Ea.rotationShape.node.style.display&&null!=Ea.rotationShape.boundingBox&&qa.add(Ea.rotationShape.boundingBox)),ua.add(h(sa,ta,new mxRectangle(C.getCenterX()-this.triangleUp.width/2,qa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),R)),ua.add(h(sa,ta,new mxRectangle(qa.x+
+qa.width,C.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),ba)),ua.add(h(sa,ta,new mxRectangle(C.getCenterX()-this.triangleDown.width/2,qa.y+qa.height,this.triangleDown.width,this.triangleDown.height),S)),ua.add(h(sa,ta,new mxRectangle(qa.x-this.triangleLeft.width,C.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),P));null!=ua&&ua.grow(10)}K=mxConstants.DIRECTION_NORTH;V==ba?K=mxConstants.DIRECTION_EAST:V==S||V==
+ra?K=mxConstants.DIRECTION_SOUTH:V==P&&(K=mxConstants.DIRECTION_WEST);null!=Q&&V==X&&(Ba=Q);qa=(null==r||da.isCellConnectable(d[r]))&&(da.model.isEdge(Ia)&&null!=r||da.model.isVertex(Ia)&&da.isCellConnectable(Ia));if(null!=C&&5E3<=ia||C!=Ba&&(null==ua||!mxUtils.contains(ua,sa,ta)||500<ia&&null==V&&qa))if(T=!1,C=5E3>ia&&ia>this.dropTargetDelay||da.model.isEdge(Ia)?Ba:null,null!=C&&qa){ua=[fa,ra,R,ba,S,P];for(qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);da.model.isEdge(Ia)?
(Ea=Ba.absolutePoints,null!=Ea&&(qa=Ea[0],Ea=Ea[Ea.length-1],ua=da.tolerance,new mxRectangle(sa-ua,ta-ua,2*ua,2*ua),fa.style.left=Math.floor(qa.x-this.roundDrop.width/2)+"px",fa.style.top=Math.floor(qa.y-this.roundDrop.height/2)+"px",ra.style.left=Math.floor(Ea.x-this.roundDrop.width/2)+"px",ra.style.top=Math.floor(Ea.y-this.roundDrop.height/2)+"px",null==da.model.getTerminal(Ia,!0)&&da.container.appendChild(fa),null==da.model.getTerminal(Ia,!1)&&da.container.appendChild(ra))):(qa=mxRectangle.fromRectangle(Ba),
null!=Ba.shape&&null!=Ba.shape.boundingBox&&(qa=mxRectangle.fromRectangle(Ba.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Ea=this.graph.selectionCellsHandler.getHandler(Ba.cell),null!=Ea&&(qa.x-=Ea.horizontalOffset/2,qa.y-=Ea.verticalOffset/2,qa.width+=Ea.horizontalOffset,qa.height+=Ea.verticalOffset,null!=Ea.rotationShape&&null!=Ea.rotationShape.node&&"hidden"!=Ea.rotationShape.node.style.visibility&&"none"!=Ea.rotationShape.node.style.display&&null!=
-Ea.rotationShape.boundingBox&&qa.add(Ea.rotationShape.boundingBox)),Q.style.left=Math.floor(Ba.getCenterX()-this.triangleUp.width/2)+"px",Q.style.top=Math.floor(qa.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(qa.x+qa.width)+"px",aa.style.top=Math.floor(Ba.getCenterY()-this.triangleRight.height/2)+"px",U.style.left=Q.style.left,U.style.top=Math.floor(qa.y+qa.height)+"px",P.style.left=Math.floor(qa.x-this.triangleLeft.width)+"px",P.style.top=aa.style.top,"eastwest"!=Ba.style.portConstraint&&
-(da.container.appendChild(Q),da.container.appendChild(U)),da.container.appendChild(aa),da.container.appendChild(P));null!=Ba&&(N=da.selectionCellsHandler.getHandler(Ba.cell),null!=N&&null!=N.setHandlesVisible&&N.setHandlesVisible(!1));S=!0}else for(ua=[fa,ra,Q,aa,U,P],qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);S||null==N||N.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=R&&V==X?null:mxDragSource.prototype.getDropTarget.apply(this,
-arguments);ua=da.getModel();if(null!=Ia&&(null!=V||!da.isSplitTarget(Ia,e,Ja))){for(;null!=Ia&&!da.isValidDropTarget(Ia,e,Ja)&&ua.isVertex(ua.getParent(Ia));)Ia=ua.getParent(Ia);null!=Ia&&(da.view.currentRoot==Ia||!da.isValidRoot(Ia)&&0==da.getModel().getChildCount(Ia)||da.isCellLocked(Ia)||ua.isEdge(Ia)||!da.isValidDropTarget(Ia,e,Ja))&&(Ia=null)}da.isCellLocked(Ia)&&(Ia=null);return Ia});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var da=[fa,ra,X,Q,aa,U,P],sa=
-0;sa<da.length;sa++)null!=da[sa].parentNode&&da[sa].parentNode.removeChild(da[sa]);null!=C&&null!=N&&N.reset();V=ja=R=C=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()}))};
+Ea.rotationShape.boundingBox&&qa.add(Ea.rotationShape.boundingBox)),R.style.left=Math.floor(Ba.getCenterX()-this.triangleUp.width/2)+"px",R.style.top=Math.floor(qa.y-this.triangleUp.height)+"px",ba.style.left=Math.floor(qa.x+qa.width)+"px",ba.style.top=Math.floor(Ba.getCenterY()-this.triangleRight.height/2)+"px",S.style.left=R.style.left,S.style.top=Math.floor(qa.y+qa.height)+"px",P.style.left=Math.floor(qa.x-this.triangleLeft.width)+"px",P.style.top=ba.style.top,"eastwest"!=Ba.style.portConstraint&&
+(da.container.appendChild(R),da.container.appendChild(S)),da.container.appendChild(ba),da.container.appendChild(P));null!=Ba&&(N=da.selectionCellsHandler.getHandler(Ba.cell),null!=N&&null!=N.setHandlesVisible&&N.setHandlesVisible(!1));T=!0}else for(ua=[fa,ra,R,ba,S,P],qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);T||null==N||N.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=Q&&V==X?null:mxDragSource.prototype.getDropTarget.apply(this,
+arguments);ua=da.getModel();if(null!=Ia&&(null!=V||!da.isSplitTarget(Ia,d,Ja))){for(;null!=Ia&&!da.isValidDropTarget(Ia,d,Ja)&&ua.isVertex(ua.getParent(Ia));)Ia=ua.getParent(Ia);null!=Ia&&(da.view.currentRoot==Ia||!da.isValidRoot(Ia)&&0==da.getModel().getChildCount(Ia)||da.isCellLocked(Ia)||ua.isEdge(Ia)||!da.isValidDropTarget(Ia,d,Ja))&&(Ia=null)}da.isCellLocked(Ia)&&(Ia=null);return Ia});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var da=[fa,ra,X,R,ba,S,P],sa=
+0;sa<da.length;sa++)null!=da[sa].parentNode&&da[sa].parentNode.removeChild(da[sa]);null!=C&&null!=N&&N.reset();V=ja=Q=C=N=null};return F};
+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,h=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))>h||Math.abs(n.y-mxEvent.getClientY(m))>
+h)&&(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,h,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,h)}))};Sidebar.prototype.createVertexTemplate=function(a,b,f,d,g,e,h,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,h,n,u)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,b,f,d,g,e,h,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,h,n)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,f,d,g,e,h,n){return this.createItem(a,d,g,e,b,f,h,n)};
+Sidebar.prototype.createEdgeTemplateEntry=function(a,b,f,d,g,e,h,n,u){h=null!=h&&0<h.length?h:g.toLowerCase();return this.addEntry(h,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,h,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,h,n)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,f,d,g,e,h,n){return this.createItem(a,d,g,null!=n?n:!0,b,f,e,h)};
+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 h=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;f(b,a);mxClient.NO_FO=h},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,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,D,F,I){if(null==g||0>mxUtils.indexOf(g,B)){D=this.getTagsForStencil(x,B);var C=null!=n?n[B]:null;null!=C&&D.push(C);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+e,Math.round(F*k),Math.round(I*k),"",B.replace(/_/g," "),null,null,this.filterTags(D.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(D,F,I,C,N){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+D+F.toLowerCase()+e,Math.round(C*k),Math.round(N*k),"",F.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addImagePalette=function(a,b,f,d,g,e,h){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!=h?h[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,h,n,u,m){h=null!=h?h: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,D,F,H){if(null==g||0>mxUtils.indexOf(g,B)){D=this.getTagsForStencil(x,B);var C=null!=n?n[B]:null;null!=C&&D.push(C);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+d,Math.round(F*h),Math.round(H*h),"",B.replace(/_/g," "),null,null,this.filterTags(D.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(D,F,H,C,N){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+D+F.toLowerCase()+d,Math.round(C*h),Math.round(N*h),"",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 e=0;e<a.length;e++)f=f.replace(new RegExp("&"+a[e][0]+";","g"),"&#"+a[e][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 d=0;d<a.length;d++)f=f.replace(new RegExp("&"+a[d][0]+";","g"),"&#"+a[d][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(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";
+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,h;if("undefined"!==typeof e){if(!b(e))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(h=
+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 h?e(r,m):e.call(h,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,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(K){K=this.getCurrentCellStyle(K);
-return null!=K?"1"==K.html||"wrap"==K[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(K,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){K=V.getProperty("event");var O=K.getState();V=this.view.scale;if(!mxEvent.isAltDown(K.getEvent())&&null!=O)if(this.model.isEdge(O.cell))if(k=new mxPoint(K.getGraphX(),K.getGraphY()),r=this.isCellSelected(O.cell),u=O,n=K,null!=O.text&&null!=
-O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,K.getGraphX(),K.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var T=this.selectionCellsHandler.getHandler(O.cell);null!=T&&null!=T.bends&&0<T.bends.length&&(m=T.getHandleForEvent(K))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(K.getEvent())&&(T=this.selectionCellsHandler.getHandler(O.cell),null==T||null==T.getHandleForEvent(K))){var J=new mxRectangle(K.getGraphX()-1,K.getGraphY()-1),ba=mxEvent.isTouchEvent(K.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+2)/2;T=ba+2;J.grow(ba);if(this.isTableCell(O.cell)&&!this.isCellSelected(O.cell)&&!(mxUtils.contains(O,K.getGraphX()-T,K.getGraphY()-T)&&mxUtils.contains(O,K.getGraphX()-T,K.getGraphY()+T)&&mxUtils.contains(O,K.getGraphX()+T,K.getGraphY()+T)&&mxUtils.contains(O,K.getGraphX()+T,K.getGraphY()-T))){var ia=this.model.getParent(O.cell);T=this.model.getParent(ia);if(!this.isCellSelected(T)){ba*=V;var na=2*ba;if(this.model.getChildAt(T,0)!=ia&&mxUtils.intersects(J,
-new mxRectangle(O.x,O.y-ba,O.width,na))||this.model.getChildAt(ia,0)!=O.cell&&mxUtils.intersects(J,new mxRectangle(O.x-ba,O.y,na,O.height))||mxUtils.intersects(J,new mxRectangle(O.x,O.y+O.height-ba,O.width,na))||mxUtils.intersects(J,new mxRectangle(O.x+O.width-ba,O.y,na,O.height)))ia=this.selectionCellsHandler.isHandled(T),this.selectCellForEvent(T,K.getEvent()),T=this.selectionCellsHandler.getHandler(T),null!=T&&(ba=T.getHandleForEvent(K),null!=ba&&(T.start(K.getGraphX(),K.getGraphY(),ba),T.blockDelayedSelection=
-!ia,K.consume()))}}for(;!K.isConsumed()&&null!=O&&(this.isTableCell(O.cell)||this.isTableRow(O.cell)||this.isTable(O.cell));)this.isSwimlane(O.cell)&&(T=this.getActualStartSize(O.cell),(0<T.x||0<T.width)&&mxUtils.intersects(J,new mxRectangle(O.x+(T.x-T.width-1)*V+(0==T.x?O.width:0),O.y,1,O.height))||(0<T.y||0<T.height)&&mxUtils.intersects(J,new mxRectangle(O.x,O.y+(T.y-T.height-1)*V+(0==T.y?O.height:0),O.width,1)))&&(this.selectCellForEvent(O.cell,K.getEvent()),T=this.selectionCellsHandler.getHandler(O.cell),
-null!=T&&(ba=mxEvent.CUSTOM_HANDLE-T.customHandles.length+1,T.start(K.getGraphX(),K.getGraphY(),ba),K.consume())),O=this.view.getState(this.model.getParent(O.cell))}}}));this.addMouseListener({mouseDown:function(K,V){},mouseMove:mxUtils.bind(this,function(K,V){K=this.selectionCellsHandler.handlers.map;for(var O in K)if(null!=K[O].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var T=this.tolerance;if(null!=k&&null!=u&&null!=n){if(O=u,Math.abs(k.x-
-V.getGraphX())>T||Math.abs(k.y-V.getGraphY())>T){var J=this.selectionCellsHandler.getHandler(O.cell);null==J&&this.model.isEdge(O.cell)&&(J=this.createHandler(O));if(null!=J&&null!=J.bends&&0<J.bends.length){K=J.getHandleForEvent(n);var ba=this.view.getEdgeStyle(O);T=ba==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(K=m);if(T&&0!=K&&K!=J.bends.length-1&&K!=mxEvent.LABEL_HANDLE)!T||null==O.visibleSourceState&&null==O.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(K==
-mxEvent.LABEL_HANDLE||0==K||null!=O.visibleSourceState||K==J.bends.length-1||null!=O.visibleTargetState)T||K==mxEvent.LABEL_HANDLE||(T=O.absolutePoints,null!=T&&(null==ba&&null==K||ba==mxEdgeStyle.OrthConnector)&&(K=m,null==K&&(K=new mxRectangle(k.x,k.y),K.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(K,T[0].x,T[0].y)?K=0:mxUtils.contains(K,T[T.length-1].x,T[T.length-1].y)?K=J.bends.length-1:null!=ba&&(2==T.length||3==T.length&&(0==Math.round(T[0].x-T[1].x)&&0==Math.round(T[1].x-
-T[2].x)||0==Math.round(T[0].y-T[1].y)&&0==Math.round(T[1].y-T[2].y)))?K=2:(K=mxUtils.findNearestSegment(O,k.x,k.y),K=null==ba?mxEvent.VIRTUAL_HANDLE-K:K+1))),null==K&&(K=mxEvent.VIRTUAL_HANDLE)),J.start(V.getGraphX(),V.getGraphX(),K),V.consume(),this.graphHandler.reset()}null!=J&&(this.selectionCellsHandler.isHandlerActive(J)?this.isCellSelected(O.cell)||(this.selectionCellsHandler.handlers.put(O.cell,J),this.selectCellForEvent(O.cell,V.getEvent())):this.isCellSelected(O.cell)||J.destroy());r=!1;
-k=n=u=m=null}}else if(O=V.getState(),null!=O&&this.isCellEditable(O.cell)){J=null;if(this.model.isEdge(O.cell)){if(K=new mxRectangle(V.getGraphX(),V.getGraphY()),K.grow(mxEdgeHandler.prototype.handleImage.width/2),T=O.absolutePoints,null!=T)if(null!=O.text&&null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,V.getGraphX(),V.getGraphY()))J="move";else if(mxUtils.contains(K,T[0].x,T[0].y)||mxUtils.contains(K,T[T.length-1].x,T[T.length-1].y))J="pointer";else if(null!=O.visibleSourceState||
-null!=O.visibleTargetState)K=this.view.getEdgeStyle(O),J="crosshair",K!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(O)&&(V=mxUtils.findNearestSegment(O,V.getGraphX(),V.getGraphY()),V<T.length-1&&0<=V&&(J=0==Math.round(T[V].x-T[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){T=mxShape.prototype.svgStrokeTolerance/2;K=new mxRectangle(V.getGraphX(),V.getGraphY());K.grow(T);if(this.isTableCell(O.cell)&&(V=this.model.getParent(O.cell),T=this.model.getParent(V),!this.isCellSelected(T)))if(mxUtils.intersects(K,
-new mxRectangle(O.x,O.y-2,O.width,4))&&this.model.getChildAt(T,0)!=V||mxUtils.intersects(K,new mxRectangle(O.x,O.y+O.height-2,O.width,4)))J="row-resize";else if(mxUtils.intersects(K,new mxRectangle(O.x-2,O.y,4,O.height))&&this.model.getChildAt(V,0)!=O.cell||mxUtils.intersects(K,new mxRectangle(O.x+O.width-2,O.y,4,O.height)))J="col-resize";for(V=O;null==J&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(T=this.getActualStartSize(V.cell),
-ba=this.view.scale,(0<T.x||0<T.width)&&mxUtils.intersects(K,new mxRectangle(V.x+(T.x-T.width-1)*ba+(0==T.x?V.width*ba:0),V.y,1,V.height))?J="col-resize":(0<T.y||0<T.height)&&mxUtils.intersects(K,new mxRectangle(V.x,V.y+(T.y-T.height-1)*ba+(0==T.y?V.height:0),V.width,1))&&(J="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=J&&O.setCursor(J)}}}),mouseUp:mxUtils.bind(this,function(K,V){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(K){var V=
+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(K){K=this.getCurrentCellStyle(K);
+return null!=K?"1"==K.html||"wrap"==K[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var h=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){K=V.getProperty("event");var O=K.getState();V=this.view.scale;if(!mxEvent.isAltDown(K.getEvent())&&null!=O)if(this.model.isEdge(O.cell))if(h=new mxPoint(K.getGraphX(),K.getGraphY()),r=this.isCellSelected(O.cell),u=O,n=K,null!=O.text&&null!=
+O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,K.getGraphX(),K.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var U=this.selectionCellsHandler.getHandler(O.cell);null!=U&&null!=U.bends&&0<U.bends.length&&(m=U.getHandleForEvent(K))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(K.getEvent())&&(U=this.selectionCellsHandler.getHandler(O.cell),null==U||null==U.getHandleForEvent(K))){var J=new mxRectangle(K.getGraphX()-1,K.getGraphY()-1),aa=mxEvent.isTouchEvent(K.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+2)/2;U=aa+2;J.grow(aa);if(this.isTableCell(O.cell)&&!this.isCellSelected(O.cell)&&!(mxUtils.contains(O,K.getGraphX()-U,K.getGraphY()-U)&&mxUtils.contains(O,K.getGraphX()-U,K.getGraphY()+U)&&mxUtils.contains(O,K.getGraphX()+U,K.getGraphY()+U)&&mxUtils.contains(O,K.getGraphX()+U,K.getGraphY()-U))){var ia=this.model.getParent(O.cell);U=this.model.getParent(ia);if(!this.isCellSelected(U)){aa*=V;var na=2*aa;if(this.model.getChildAt(U,0)!=ia&&mxUtils.intersects(J,
+new mxRectangle(O.x,O.y-aa,O.width,na))||this.model.getChildAt(ia,0)!=O.cell&&mxUtils.intersects(J,new mxRectangle(O.x-aa,O.y,na,O.height))||mxUtils.intersects(J,new mxRectangle(O.x,O.y+O.height-aa,O.width,na))||mxUtils.intersects(J,new mxRectangle(O.x+O.width-aa,O.y,na,O.height)))ia=this.selectionCellsHandler.isHandled(U),this.selectCellForEvent(U,K.getEvent()),U=this.selectionCellsHandler.getHandler(U),null!=U&&(aa=U.getHandleForEvent(K),null!=aa&&(U.start(K.getGraphX(),K.getGraphY(),aa),U.blockDelayedSelection=
+!ia,K.consume()))}}for(;!K.isConsumed()&&null!=O&&(this.isTableCell(O.cell)||this.isTableRow(O.cell)||this.isTable(O.cell));)this.isSwimlane(O.cell)&&(U=this.getActualStartSize(O.cell),(0<U.x||0<U.width)&&mxUtils.intersects(J,new mxRectangle(O.x+(U.x-U.width-1)*V+(0==U.x?O.width:0),O.y,1,O.height))||(0<U.y||0<U.height)&&mxUtils.intersects(J,new mxRectangle(O.x,O.y+(U.y-U.height-1)*V+(0==U.y?O.height:0),O.width,1)))&&(this.selectCellForEvent(O.cell,K.getEvent()),U=this.selectionCellsHandler.getHandler(O.cell),
+null!=U&&(aa=mxEvent.CUSTOM_HANDLE-U.customHandles.length+1,U.start(K.getGraphX(),K.getGraphY(),aa),K.consume())),O=this.view.getState(this.model.getParent(O.cell))}}}));this.addMouseListener({mouseDown:function(K,V){},mouseMove:mxUtils.bind(this,function(K,V){K=this.selectionCellsHandler.handlers.map;for(var O in K)if(null!=K[O].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var U=this.tolerance;if(null!=h&&null!=u&&null!=n){if(O=u,Math.abs(h.x-
+V.getGraphX())>U||Math.abs(h.y-V.getGraphY())>U){var J=this.selectionCellsHandler.getHandler(O.cell);null==J&&this.model.isEdge(O.cell)&&(J=this.createHandler(O));if(null!=J&&null!=J.bends&&0<J.bends.length){K=J.getHandleForEvent(n);var aa=this.view.getEdgeStyle(O);U=aa==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(K=m);if(U&&0!=K&&K!=J.bends.length-1&&K!=mxEvent.LABEL_HANDLE)!U||null==O.visibleSourceState&&null==O.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(K==
+mxEvent.LABEL_HANDLE||0==K||null!=O.visibleSourceState||K==J.bends.length-1||null!=O.visibleTargetState)U||K==mxEvent.LABEL_HANDLE||(U=O.absolutePoints,null!=U&&(null==aa&&null==K||aa==mxEdgeStyle.OrthConnector)&&(K=m,null==K&&(K=new mxRectangle(h.x,h.y),K.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(K,U[0].x,U[0].y)?K=0:mxUtils.contains(K,U[U.length-1].x,U[U.length-1].y)?K=J.bends.length-1:null!=aa&&(2==U.length||3==U.length&&(0==Math.round(U[0].x-U[1].x)&&0==Math.round(U[1].x-
+U[2].x)||0==Math.round(U[0].y-U[1].y)&&0==Math.round(U[1].y-U[2].y)))?K=2:(K=mxUtils.findNearestSegment(O,h.x,h.y),K=null==aa?mxEvent.VIRTUAL_HANDLE-K:K+1))),null==K&&(K=mxEvent.VIRTUAL_HANDLE)),J.start(V.getGraphX(),V.getGraphX(),K),V.consume(),this.graphHandler.reset()}null!=J&&(this.selectionCellsHandler.isHandlerActive(J)?this.isCellSelected(O.cell)||(this.selectionCellsHandler.handlers.put(O.cell,J),this.selectCellForEvent(O.cell,V.getEvent())):this.isCellSelected(O.cell)||J.destroy());r=!1;
+h=n=u=m=null}}else if(O=V.getState(),null!=O&&this.isCellEditable(O.cell)){J=null;if(this.model.isEdge(O.cell)){if(K=new mxRectangle(V.getGraphX(),V.getGraphY()),K.grow(mxEdgeHandler.prototype.handleImage.width/2),U=O.absolutePoints,null!=U)if(null!=O.text&&null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,V.getGraphX(),V.getGraphY()))J="move";else if(mxUtils.contains(K,U[0].x,U[0].y)||mxUtils.contains(K,U[U.length-1].x,U[U.length-1].y))J="pointer";else if(null!=O.visibleSourceState||
+null!=O.visibleTargetState)K=this.view.getEdgeStyle(O),J="crosshair",K!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(O)&&(V=mxUtils.findNearestSegment(O,V.getGraphX(),V.getGraphY()),V<U.length-1&&0<=V&&(J=0==Math.round(U[V].x-U[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){U=mxShape.prototype.svgStrokeTolerance/2;K=new mxRectangle(V.getGraphX(),V.getGraphY());K.grow(U);if(this.isTableCell(O.cell)&&(V=this.model.getParent(O.cell),U=this.model.getParent(V),!this.isCellSelected(U)))if(mxUtils.intersects(K,
+new mxRectangle(O.x,O.y-2,O.width,4))&&this.model.getChildAt(U,0)!=V||mxUtils.intersects(K,new mxRectangle(O.x,O.y+O.height-2,O.width,4)))J="row-resize";else if(mxUtils.intersects(K,new mxRectangle(O.x-2,O.y,4,O.height))&&this.model.getChildAt(V,0)!=O.cell||mxUtils.intersects(K,new mxRectangle(O.x+O.width-2,O.y,4,O.height)))J="col-resize";for(V=O;null==J&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(U=this.getActualStartSize(V.cell),
+aa=this.view.scale,(0<U.x||0<U.width)&&mxUtils.intersects(K,new mxRectangle(V.x+(U.x-U.width-1)*aa+(0==U.x?V.width*aa:0),V.y,1,V.height))?J="col-resize":(0<U.y||0<U.height)&&mxUtils.intersects(K,new mxRectangle(V.x,V.y+(U.y-U.height-1)*aa+(0==U.y?V.height:0),V.width,1))&&(J="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=J&&O.setCursor(J)}}}),mouseUp:mxUtils.bind(this,function(K,V){m=h=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(K){var V=
mxCellRenderer.prototype.getLabelValue.apply(this,arguments);K.view.graph.isHtmlLabel(K.cell)&&(V=1!=K.style.html?mxUtils.htmlEntities(V,!1):K.view.graph.sanitizeHtml(V));return V};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(K,V){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var K=x.apply(this,arguments);if(this.graph.pageVisible){var V=[],O=this.graph.pageFormat,T=this.graph.pageScale,J=O.width*T;O=O.height*T;T=this.graph.view.translate;for(var ba=this.graph.view.scale,ia=
-this.graph.getPageLayout(),na=0;na<ia.width;na++)V.push(new mxRectangle(((ia.x+na)*J+T.x)*ba,(ia.y*O+T.y)*ba,J*ba,O*ba));for(na=1;na<ia.height;na++)V.push(new mxRectangle((ia.x*J+T.x)*ba,((ia.y+na)*O+T.y)*ba,J*ba,O*ba));K=V.concat(K)}return K};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(K,V){return null==K.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(K){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(K){for(var V=B.apply(this,arguments),O=new mxDictionary,T=[],J=0;J<V.length;J++){var ba=this.graph.isTableCell(K)&&this.graph.isTableCell(V[J])&&this.graph.isCellSelected(V[J])?this.graph.model.getParent(V[J]):this.graph.isTableRow(K)&&this.graph.isTableRow(V[J])&&this.graph.isCellSelected(V[J])?V[J]:this.graph.getCompositeParent(V[J]);
-null==ba||O.get(ba)||(O.put(ba,!0),T.push(ba))}return T};var D=this.graphHandler.start;this.graphHandler.start=function(K,V,O,T){var J=!1;this.graph.isTableCell(K)&&(this.graph.isCellSelected(K)?J=!0:K=this.graph.model.getParent(K));J||this.graph.isTableRow(K)&&this.graph.isCellSelected(K)||(K=this.graph.getCompositeParent(K));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(K,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
-arguments)};var F=new mxRubberband(this);this.getRubberband=function(){return F};var I=(new Date).getTime(),C=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var K=this.currentState;N.apply(this,arguments);K!=this.currentState?(I=(new Date).getTime(),C=0):C=(new Date).getTime()-I};var R=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(K){return mxEvent.isShiftDown(K.getEvent())&&mxEvent.isAltDown(K.getEvent())?!1:null!=
-this.currentState&&K.getState()==this.currentState&&2E3<C||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&R.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(K){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K)};var Q=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(K){return Q.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
-mxClient.IS_FF&&mxClient.IS_WIN&&null==K.getState()&&mxEvent.isTouchEvent(K.getEvent())};var aa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(aa=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=aa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(K){return mxEvent.isMouseEvent(K.getEvent())};
-var U=this.click;this.click=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);if(this.isEnabled()&&!V||K.isConsumed())return U.apply(this,arguments);var O=V?K.sourceState.cell:K.getCell();null!=O&&(O=this.getClickableLinkForCell(O),null!=O&&(this.isCustomLink(O)?this.customLinkClicked(O):this.openLink(O)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};var P=this.tooltipHandler.show;this.tooltipHandler.show=
+!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(K,V){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var K=x.apply(this,arguments);if(this.graph.pageVisible){var V=[],O=this.graph.pageFormat,U=this.graph.pageScale,J=O.width*U;O=O.height*U;U=this.graph.view.translate;for(var aa=this.graph.view.scale,ia=
+this.graph.getPageLayout(),na=0;na<ia.width;na++)V.push(new mxRectangle(((ia.x+na)*J+U.x)*aa,(ia.y*O+U.y)*aa,J*aa,O*aa));for(na=1;na<ia.height;na++)V.push(new mxRectangle((ia.x*J+U.x)*aa,((ia.y+na)*O+U.y)*aa,J*aa,O*aa));K=V.concat(K)}return K};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(K,V){return null==K.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(K){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(K){for(var V=B.apply(this,arguments),O=new mxDictionary,U=[],J=0;J<V.length;J++){var aa=this.graph.isTableCell(K)&&this.graph.isTableCell(V[J])&&this.graph.isCellSelected(V[J])?this.graph.model.getParent(V[J]):this.graph.isTableRow(K)&&this.graph.isTableRow(V[J])&&this.graph.isCellSelected(V[J])?V[J]:this.graph.getCompositeParent(V[J]);
+null==aa||O.get(aa)||(O.put(aa,!0),U.push(aa))}return U};var D=this.graphHandler.start;this.graphHandler.start=function(K,V,O,U){var J=!1;this.graph.isTableCell(K)&&(this.graph.isCellSelected(K)?J=!0:K=this.graph.model.getParent(K));J||this.graph.isTableRow(K)&&this.graph.isCellSelected(K)||(K=this.graph.getCompositeParent(K));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(K,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
+arguments)};var F=new mxRubberband(this);this.getRubberband=function(){return F};var H=(new Date).getTime(),C=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var K=this.currentState;N.apply(this,arguments);K!=this.currentState?(H=(new Date).getTime(),C=0):C=(new Date).getTime()-H};var Q=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(K){return mxEvent.isShiftDown(K.getEvent())&&mxEvent.isAltDown(K.getEvent())?!1:null!=
+this.currentState&&K.getState()==this.currentState&&2E3<C||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&Q.apply(this,arguments)};var T=this.isToggleEvent;this.isToggleEvent=function(K){return T.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K)};var R=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(K){return R.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
+mxClient.IS_FF&&mxClient.IS_WIN&&null==K.getState()&&mxEvent.isTouchEvent(K.getEvent())};var ba=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ba=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=ba)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(K){return mxEvent.isMouseEvent(K.getEvent())};
+var S=this.click;this.click=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);if(this.isEnabled()&&!V||K.isConsumed())return S.apply(this,arguments);var O=V?K.sourceState.cell:K.getCell();null!=O&&(O=this.getClickableLinkForCell(O),null!=O&&(this.isCustomLink(O)?this.customLinkClicked(O):this.openLink(O)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};var P=this.tooltipHandler.show;this.tooltipHandler.show=
function(){P.apply(this,arguments);if(null!=this.div)for(var K=this.div.getElementsByTagName("a"),V=0;V<K.length;V++)null!=K[V].getAttribute("href")&&null==K[V].getAttribute("target")&&K[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};this.getCursorForMouseEvent=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);return this.getCursorForCell(V?K.sourceState.cell:K.getCell())};var X=this.getCursorForCell;
-this.getCursorForCell=function(K){if(!this.isEnabled()||this.isCellLocked(K)){if(null!=this.getClickableLinkForCell(K))return"pointer";if(this.isCellLocked(K))return"default"}return X.apply(this,arguments)};this.selectRegion=function(K,V){var O=mxEvent.isAltDown(V)?K:null;K=this.getCells(K.x,K.y,K.width,K.height,null,null,O,function(T){return"1"==mxUtils.getValue(T.style,"locked","0")},!0);if(this.isToggleEvent(V))for(O=0;O<K.length;O++)this.selectCellForEvent(K[O],V);else this.selectCellsForEvent(K,
+this.getCursorForCell=function(K){if(!this.isEnabled()||this.isCellLocked(K)){if(null!=this.getClickableLinkForCell(K))return"pointer";if(this.isCellLocked(K))return"default"}return X.apply(this,arguments)};this.selectRegion=function(K,V){var O=mxEvent.isAltDown(V)?K:null;K=this.getCells(K.x,K.y,K.width,K.height,null,null,O,function(U){return"1"==mxUtils.getValue(U.style,"locked","0")},!0);if(this.isToggleEvent(V))for(O=0;O<K.length;O++)this.selectCellForEvent(K[O],V);else this.selectCellsForEvent(K,
V);return K};var ja=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(K,V,O){return this.graph.isCellSelected(K)?!1:ja.apply(this,arguments)};this.isCellLocked=function(K){for(;null!=K;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(K),"locked","0"))return!0;K=this.model.getParent(K)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){"mouseDown"==V.getProperty("eventName")&&(K=V.getProperty("event").getState(),
fa=null==K||this.isSelectionEmpty()||this.isCellSelected(K.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(K,V){if(!mxEvent.isMultiTouchEvent(V)){K=V.getProperty("event");var O=V.getProperty("cell");null==O?(K=mxUtils.convertPoint(this.container,mxEvent.getClientX(K),mxEvent.getClientY(K)),F.start(K.x,K.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(O)&&this.removeSelectionCell(O);fa=null;V.consume()}}));
this.connectionHandler.selectCells=function(K,V){this.graph.setSelectionCell(V||K)};this.connectionHandler.constraintHandler.isStateIgnored=function(K,V){var O=K.view.graph;return V&&(O.isCellSelected(K.cell)||O.isTableRow(K.cell)&&O.selectionCellsHandler.isHandled(O.model.getParent(K.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var K=this.connectionHandler.constraintHandler;null!=K.currentFocus&&K.isStateIgnored(K.currentFocus,!0)&&(K.currentFocus=null,K.constraints=
@@ -2563,114 +2567,114 @@ Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileL
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,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.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(),h=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"svg"):e.createElement("svg");null!=g&&(null!=h.style?h.style.backgroundColor=g:h.setAttribute("style","background-color:"+g));null==e.createElementNS?(h.setAttribute("xmlns",mxConstants.NS_SVG),h.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);h.setAttribute("version","1.1");
+h.setAttribute("width",f+"px");h.setAttribute("height",d+"px");h.setAttribute("viewBox",a+" "+b+" "+f+" "+d);e.appendChild(h);return h};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.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,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.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.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,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.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.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){if(null==a)return null;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&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(a,b){"svg"==a.nodeName&&"content"==b.attrName&&(b.forceKeepAttr=!0);return a});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 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.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 h=e[0].getAttribute("width"),n=e[0].getAttribute("height");h=null!=h&&"%"!=h.charAt(h.length-1)?parseFloat(h):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=e[0].getAttribute("viewBox");if(null!=u&&!isNaN(h)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/h,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.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.simpleBackgroundColor="#f0f0f0";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,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)||"mxgraph.arrows2.wedgeArrow"==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=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null);return"label"==k||"image"==k};Graph.prototype.isShadowState=function(k){return"image"!=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(k,n){k=null!=k?k:!0;n=null!=n?n:!0;var u=this.model;return u.filterDescendants(function(m){return k&&u.isVertex(m)||n&&u.isEdge(m)},u.getRoot())};Graph.prototype.getCommonStyle=
-function(k){for(var n={},u=0;u<k.length;u++){var m=this.view.getState(k[u]);this.mergeStyle(m.style,n,0==u)}return n};Graph.prototype.mergeStyle=function(k,n,u){if(null!=k){var m={},r;for(r in k){var x=k[r];null!=x&&(m[r]=!0,null==n[r]&&u?n[r]=x:n[r]!=x&&delete n[r])}for(r in n)m[r]||delete n[r]}};Graph.prototype.getStartEditingCell=function(k,n){n=this.getCellStyle(k);n=parseInt(mxUtils.getValue(n,mxConstants.STYLE_STARTSIZE,0));this.isTable(k)&&(!this.isSwimlane(k)||0==n)&&""==this.getLabel(k)&&
-0<this.model.getChildCount(k)&&(k=this.model.getChildAt(k,0),n=this.getCellStyle(k),n=parseInt(mxUtils.getValue(n,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 D=this.model.getChildAt(u,B),F=this.getScaledCellAt(k,n,D,m,r,x);if(null!=F)return F;if(this.isCellVisible(D)&&(r&&this.model.isEdge(D)||m&&this.model.isVertex(D))&&(F=this.view.getState(D),null!=F&&(null==x||!x(F,k,n))&&this.intersects(F,k,n)))return D}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 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 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){var e=b.getAttribute("href");e!=Graph.sanitizeLink(e)&&Graph.sanitizeNode(b);if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),a);mxEvent.consume(f)}};
-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.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,h=null,n=mxUtils.bind(this,function(r){e=!0;h=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){e=e&&null!=h&&Math.abs(h.x-mxEvent.getClientX(r))<g&&Math.abs(h.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()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(h){return!this.isSpecialColor(h.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(h.style,"lineShape",null)&&(this.model.isVertex(h.cell)||"arrow"==mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,
+null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(h){return!this.isSpecialColor(h.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(h){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],h)};Graph.prototype.isGlassState=function(h){h=mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null);return"label"==h||"rectangle"==h||
+"internalStorage"==h||"ext"==h||"umlLifeline"==h||"swimlane"==h||"process"==h};Graph.prototype.isRoundedState=function(h){return null!=h.shape?h.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(h){var n=mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,!1)&&("connector"==n||"filledEdge"==n)};Graph.prototype.isAutoSizeState=function(h){return"1"==
+mxUtils.getValue(h.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(h){h=mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null);return"label"==h||"image"==h};Graph.prototype.isShadowState=function(h){return"image"!=mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(h,n){h=null!=h?h:!0;n=null!=n?n:!0;var u=this.model;return u.filterDescendants(function(m){return h&&u.isVertex(m)||n&&u.isEdge(m)},u.getRoot())};Graph.prototype.getCommonStyle=
+function(h){for(var n={},u=0;u<h.length;u++){var m=this.view.getState(h[u]);this.mergeStyle(m.style,n,0==u)}return n};Graph.prototype.mergeStyle=function(h,n,u){if(null!=h){var m={},r;for(r in h){var x=h[r];null!=x&&(m[r]=!0,null==n[r]&&u?n[r]=x:n[r]!=x&&delete n[r])}for(r in n)m[r]||delete n[r]}};Graph.prototype.getStartEditingCell=function(h,n){n=this.getCellStyle(h);n=parseInt(mxUtils.getValue(n,mxConstants.STYLE_STARTSIZE,0));this.isTable(h)&&(!this.isSwimlane(h)||0==n)&&""==this.getLabel(h)&&
+0<this.model.getChildCount(h)&&(h=this.model.getChildAt(h,0),n=this.getCellStyle(h),n=parseInt(mxUtils.getValue(n,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(h)&&(!this.isSwimlane(h)||0==n)&&""==this.getLabel(h)&&0<this.model.getChildCount(h))for(n=0;n<this.model.getChildCount(h);n++){var u=this.model.getChildAt(h,n);if(this.isCellEditable(u)){h=u;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,n,u){u=null!=u?u:Graph.pasteStyles;
+Graph.removeKeys(h,function(m){return 0>mxUtils.indexOf(u,m)});this.updateCellStyles(h,n)};Graph.prototype.updateCellStyles=function(h,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 h){var x=h[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(h,n,u,m,r,x){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,n=n/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,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 D=this.model.getChildAt(u,B),F=this.getScaledCellAt(h,n,D,m,r,x);if(null!=F)return F;if(this.isCellVisible(D)&&(r&&this.model.isEdge(D)||m&&this.model.isVertex(D))&&(F=this.view.getState(D),null!=F&&(null==x||!x(F,h,n))&&this.intersects(F,h,n)))return D}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&
+!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(h){for(var n=this.getCellGeometry(h);null!=n&&n.relative;)h=this.getModel().getParent(h),n=this.getCellGeometry(h);return h};Graph.prototype.isPart=function(h){return"1"==mxUtils.getValue(this.getCurrentCellStyle(h),"part","0")||this.isTableCell(h)||this.isTableRow(h)};Graph.prototype.getCompositeParents=function(h){for(var n=
+new mxDictionary,u=[],m=0;m<h.length;m++){var r=this.getCompositeParent(h[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(h){for(;this.isPart(h);){var n=this.model.getParent(h);if(!this.model.isVertex(n))break;h=n}return h};Graph.prototype.filterSelectionCells=function(h){var n=this.getSelectionCells();if(null!=h){for(var u=[],m=0;m<n.length;m++)h(n[m])||
+u.push(n[m]);n=u}return n};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(h){if(this.useCssTransforms){var n=this.currentScale,u=this.currentTranslate;h=new mxRectangle((h.x+2*u.x)*n-u.x,(h.y+2*u.y)*n-u.y,h.width*n,h.height*n)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(h){h=this.strokeWidth;this.graph.useCssTransforms&&(h/=this.graph.currentScale);return h};mxGraphView.prototype.getGraphBounds=function(){var h=this.graphBounds;
+if(this.graph.useCssTransforms){var n=this.graph.currentTranslate,u=this.graph.currentScale;h=new mxRectangle((h.x+n.x)*u,(h.y+n.y)*u,h.width*u,h.height*u)}return h};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(h){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(h){h=f.apply(this,arguments);for(var n=[],u=0;u<h.length;u++)this.isTableRow(h[u])||this.isTableCell(h[u])||n.push(h[u]);return n};var d=
+mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(h){h=d.apply(this,arguments);for(var n=[],u=0;u<h.length;u++)this.isTable(h[u])||this.isTableRow(h[u])||this.isTableCell(h[u])||n.push(h[u]);return n};Graph.prototype.updateCssTransform=function(){var h=this.view.getDrawPane();if(null!=h)if(h=h.parentNode,this.useCssTransforms){var n=h.getAttribute("transform");h.setAttribute("transformOrigin","0 0");var u=Math.round(100*this.currentScale)/100;h.setAttribute("transform",
+"scale("+u+","+u+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");n!=h.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",h.getAttribute("transform"))}else h.removeAttribute("transformOrigin"),h.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var h=this.graph.useCssTransforms,n=this.scale,u=this.translate;
+h&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);h&&(this.scale=n,this.translate=u)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(h,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};Graph.prototype.labelLinkClicked=function(a,b,f){var d=b.getAttribute("href");d!=Graph.sanitizeLink(d)&&Graph.sanitizeNode(b);if(null!=d&&!this.isCustomLink(d)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(d)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(d),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.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(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!=
+"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(h,n){if(null!=a.shape){var u=[f[0]];n=h/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==h&&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(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.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,h=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(h,d);h()};
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),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.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.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 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,R){N=String(N);for(R=R||2;N.length<R;)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"](),D=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var I=f?0:a.getTimezoneOffset(),C={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:D,MM:k(D),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<I?"-":"+")+k(100*Math.floor(Math.abs(I)/60)+Math.abs(I)%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 C?C[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 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,h=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"](),D=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var H=f?0:a.getTimezoneOffset(),C={d:u,dd:h(u),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:r+1,mm:h(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:h(B%12||12),H:B,HH:h(B),M:D,MM:h(D),s:F,ss:h(F),l:h(n,3),L:h(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<H?"-":"+")+h(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%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 C?C[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 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.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(h){function n(){d.isVisible(h)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(h)||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(h)?"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(h,!d.isVisible(h));n();null!=a&&a(h)});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 h=null;if(match.index>g&&"%"==b.charAt(match.index-1))h=e.substring(1);else{var n=e.substring(1,e.length-1);if("id"==n)h=a.id;else if(0>n.indexOf("{"))for(var u=a;null==h&&null!=u;)null!=u.value&&"object"==typeof u.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(h=u.getAttribute(n+"_"+Graph.diagramLanguage)),
+null==h&&(h=u.hasAttribute(n)?null!=u.getAttribute(n)?u.getAttribute(n):"":null)),u=this.model.getParent(u);null==h&&(h=this.getGlobalVariable(n));null==h&&null!=f&&(h=f[n])}d.push(b.substring(g,match.index)+(null!=h?h: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.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 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 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,
+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 h=e.getIndex(b),n=g.getIndex(e);e=Math.max(d,n);b=Math.min(a,h);a=Math.max(a,h);h=[];for(d=Math.min(d,n);d<=e;d++){n=this.model.getChildAt(g,d);for(var u=b;u<=a;u++)h.push(this.model.getChildAt(n,u))}0<h.length&&(1<h.length||1<this.getSelectionCount()||
+!this.isCellSelected(h[0]))&&(this.setSelectionCells(h),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,
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,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 D=null,F=null;if(null!=d){d=d.reverse();for(var I=0;I<d.length;I++)if(!this.isCellLocked(d[I])&&!this.model.isEdge(d[I])&&d[I]!=a)if(!this.model.isAncestor(a,d[I])&&this.isContainer(d[I])&&(null==D||d[I]==this.model.getParent(a)))D=d[I];else if(null==F&&this.isCellConnectable(d[I])&&!this.model.isAncestor(d[I],a)&&!this.isSwimlane(d[I])){var C=this.view.getState(d[I]);null==x||null==C||mxUtils.intersects(x,C)||(F=d[I])}}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 R=[],S=F;F=D;g=mxUtils.bind(this,function(Q){if(null==k||null!=Q||null==F&&u){this.model.beginUpdate();try{if(null==S&&N){var aa=this.getAbsoluteParent(null!=Q?Q:a);aa=u?a:this.getCompositeParent(aa);S=null!=Q?Q:this.duplicateCells([aa],
-!1)[0];null!=Q&&this.addCells([S],this.model.getParent(a),null,null,null,!0);var U=this.getCellGeometry(S);null!=U&&(null!=Q&&"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!=D?(this.addCells([S],D,null,null,null,!0),F=null):N&&!u&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(e)&&
-mxEvent.isShiftDown(e)&&N||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,S,this.createCurrentEdgeStyle());if(null!=P&&this.connectionHandler.insertBeforeSource){var X=null;for(Q=a;null!=Q.parent&&null!=Q.geometry&&Q.geometry.relative&&Q.parent!=P.parent;)Q=this.model.getParent(Q);null!=Q&&null!=Q.parent&&Q.parent==P.parent&&(X=Q.parent.getIndex(Q),this.model.add(Q.parent,P,X))}null==F&&null!=S&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(X=a.parent.getIndex(a),this.model.add(a.parent,
-S,X));null!=P&&R.push(P);null==F&&null!=S&&R.push(S);null==S&&null!=P&&P.geometry.setTerminalPoint(r,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{this.model.endUpdate()}}if(null!=n)n(R);else return R});if(null==k||null!=S||!N||null==F&&u)return g(S);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=Graph.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)),
+Graph.prototype.connectVertex=function(a,b,f,d,g,e,h,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 D=null,F=null;if(null!=e){e=e.reverse();for(var H=0;H<e.length;H++)if(!this.isCellLocked(e[H])&&!this.model.isEdge(e[H])&&e[H]!=a)if(!this.model.isAncestor(a,e[H])&&this.isContainer(e[H])&&(null==D||e[H]==this.model.getParent(a)))D=e[H];else if(null==F&&this.isCellConnectable(e[H])&&!this.model.isAncestor(e[H],a)&&!this.isSwimlane(e[H])){var C=this.view.getState(e[H]);null==x||null==C||mxUtils.intersects(x,C)||(F=e[H])}}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=[],T=F;F=D;g=mxUtils.bind(this,function(R){if(null==h||null!=R||null==F&&u){this.model.beginUpdate();try{if(null==T&&N){var ba=this.getAbsoluteParent(null!=R?R:a);ba=u?a:this.getCompositeParent(ba);T=null!=R?R:this.duplicateCells([ba],
+!1)[0];null!=R&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var S=this.getCellGeometry(T);null!=S&&(null!=R&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=S.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=S.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-S.width/2:r.x+S.width/2),S.x=r.x-S.width/2,S.y=r.y-S.height/2);null!=D?(this.addCells([T],D,null,null,null,!0),F=null):N&&!u&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(d)&&
+mxEvent.isShiftDown(d)&&N||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());if(null!=P&&this.connectionHandler.insertBeforeSource){var X=null;for(R=a;null!=R.parent&&null!=R.geometry&&R.geometry.relative&&R.parent!=P.parent;)R=this.model.getParent(R);null!=R&&null!=R.parent&&R.parent==P.parent&&(X=R.parent.getIndex(R),this.model.add(R.parent,P,X))}null==F&&null!=T&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(X=a.parent.getIndex(a),this.model.add(a.parent,
+T,X));null!=P&&Q.push(P);null==F&&null!=T&&Q.push(T);null==T&&null!=P&&P.geometry.setTerminalPoint(r,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{this.model.endUpdate()}}if(null!=n)n(Q);else return Q});if(null==h||null!=T||!N||null==F&&u)return g(T);h(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=Graph.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)),
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,a);this.replaceDefaultColor(b,mxConstants.STYLE_FILLCOLOR,a,f);this.replaceDefaultColor(b,mxConstants.STYLE_GRADIENTCOLOR,f,a);this.replaceDefaultColor(b,mxConstants.STYLE_STROKECOLOR,f,a);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BORDER,f,a);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BACKGROUND,
-a,f);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BORDERCOLOR,f,a);this.replaceDefaultColor(b,mxConstants.STYLE_SWIMLANE_FILLCOLOR,a,f);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,a,f)}return b};Graph.prototype.replaceDefaultColor=function(a,b,f,e){null!=a&&"default"==a[b]&&null!=f&&(a[b]=this.getDefaultColor(a,b,f,e))};Graph.prototype.getDefaultColor=function(a,b,f,e){b="default"+b.charAt(0).toUpperCase()+b.substring(1);"invert"==a[b]&&(f=e);return f};
-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,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)};
+a,f);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BORDERCOLOR,f,a);this.replaceDefaultColor(b,mxConstants.STYLE_SWIMLANE_FILLCOLOR,a,f);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,a,f)}return b};Graph.prototype.replaceDefaultColor=function(a,b,f,d){null!=a&&"default"==a[b]&&null!=f&&(a[b]=this.getDefaultColor(a,b,f,d))};Graph.prototype.getDefaultColor=function(a,b,f,d){b="default"+b.charAt(0).toUpperCase()+b.substring(1);"invert"==a[b]&&(f=d);return 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 h=this.view.getState(f[e]),n=this.getCellGeometry(f[e]);if(null!=h&&null!=n){var u=Math.round(n.width-h.width/this.view.scale),m=Math.round(n.height-h.height/this.view.scale);if(0!=m||0!=u){var r=this.model.getParent(f[e]),x=this.layoutManager.getLayout(r);
+null==x?null!=g&&this.isMoveCellsEvent(g,h)&&this.moveSiblings(h,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]),h=this.getCellGeometry(g[b]);null!=e&&null!=h&&(h=h.clone(),h.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],h))}}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),h=this.view.getState(a);null!=h&&null!=e&&(e=e.clone(),b.horizontal?e.width+=f+Math.min(0,h.width/this.view.scale-e.width):e.height+=d+Math.min(0,h.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.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 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.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.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,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=Graph.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++)(Graph.translateDiagram&&
-"label"==a[g].nodeName||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;">'+
+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=Graph.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++)(Graph.translateDiagram&&
+"label"==a[g].nodeName||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,h){return e.name<h.name?-1:e.name>h.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.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;
@@ -2683,81 +2687,81 @@ 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,
-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)};
+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)};
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 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.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.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 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")),
+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),h=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"});h(b,this.arrowRight);h(d,this.arrowLeft);h(g,this.arrowUp);h(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!=this.graph.freehand&&this.graph.freehand.isDrawing()||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!=
+HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||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,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,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)};
+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 h=this.cloneCell(b),n=this.getCellGeometry(h);null!=n&&(n.x+=e*d,n.y+=e*g);a.insert(h)}return a};
+Graph.prototype.createTable=function(a,b,f,d,g,e,h,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!=h?h:"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),h=0;h<e.length;h++)null!=b[g][h]&&(e[h].value=b[g][h]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,f,d,g,e,h,n,u){f=null!=f?f:120;d=null!=d?d:120;h=null!=h?h:"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;h=this.createVertex(null,
+null,"",0,e,b*f+e,d,h);g.insert(this.createParent(h,this.createVertex(null,null,"",e,0,f,d,n),b,f,0));return 1<a?(h.geometry.y=d+e,this.createParent(g,this.createParent(h,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),h=this.model.getChildCells(d[g],!0),n=this.getCellStyle(d[g],!0),u=null,m=[],r=0;r<h.length;r++){var x=this.getCellGeometry(h[r]),B={cell:h[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(h[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,h.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,h,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<h-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)};
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 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 D=this.graph.getCellGeometry(r[r.length-1]);null!=D&&(D=D.clone(),D.height=u-B+D.height,k.setGeometry(r[r.length-1],D))}var F=d?null:this.getRowLayout(r[0],m),I=[],C=b.y;for(x=0;x<r.length;x++)D=this.graph.getCellGeometry(r[x]),null!=D&&(D=D.clone(),D.x=b.x,D.width=m,D.y=Math.round(C),C=g||e?C+D.height:C+D.height/B*u,D.height=Math.round(C)-D.y,k.setGeometry(r[x],D)),n=Math.max(n,this.layoutRow(r[x],F,D.height,m,I));e&&u<B&&(f=f.clone(),f.height=C+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 R=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo;N.actual.geo.width+=R.width}N.actual.col==N.col&&(R=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo,N.actual.geo.height+=R.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x],
-!1)}finally{k.endUpdate()}}};
+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),h=d.getChildCells(e,!0);if(!f){var n=mxUtils.indexOf(h,a);if(n<h.length-1){var u=h[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==h[h.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),h=d.getChildCells(g,!0);a=mxUtils.indexOf(h,a);var n=a==h.length-1;d.beginUpdate();try{for(var u=d.getChildCells(e,!0),m=0;m<u.length;m++){g=u[m];h=d.getChildCells(g,!0);var r=h[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<h.length-1&&(r=h[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 h=this.graph.getCellGeometry(f[e]);null!=h&&(d+=(null!=h.alternateBounds?h.alternateBounds.width:h.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 h=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=h,h+=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 h=this.graph.getModel(),n=0;h.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=h.getChildCells(a,!0),x=0;x<r.length;x++)h.setVisible(r[x],!0);var B=this.getSize(r,!1);if(0<u&&0<m&&0<
+r.length&&0<B){if(g){var D=this.graph.getCellGeometry(r[r.length-1]);null!=D&&(D=D.clone(),D.height=u-B+D.height,h.setGeometry(r[r.length-1],D))}var F=e?null:this.getRowLayout(r[0],m),H=[],C=b.y;for(x=0;x<r.length;x++)D=this.graph.getCellGeometry(r[x]),null!=D&&(D=D.clone(),D.x=b.x,D.width=m,D.y=Math.round(C),C=g||d?C+D.height:C+D.height/B*u,D.height=Math.round(C)-D.y,h.setGeometry(r[x],D)),n=Math.max(n,this.layoutRow(r[x],F,D.height,m,H));d&&u<B&&(f=f.clone(),f.height=C+b.height,h.setGeometry(a,
+f));e&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,h.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(N){h.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++)h.setVisible(r[x],
+!1)}finally{h.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 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=
+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,D=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var F=function(fa,ra,K){var V=new mxPoint(ra,K);V.type=fa;D.push(V);V=null!=r.routedPoints?r.routedPoints[D.length-1]:null;return null==V||V.type!=
-fa||V.x!=ra||V.y!=K},I=.5*this.scale;B=!1;D=[];for(var C=0;C<x.length-1;C++){for(var N=x[C+1],R=x[C],S=[],Q=x[C+2];C<x.length-2&&mxUtils.ptSegDistSq(R.x,R.y,Q.x,Q.y,N.x,N.y)<1*this.scale*this.scale;)N=Q,C++,Q=x[C+2];B=F(0,R.x,R.y)||B;for(var aa=0;aa<this.validEdges.length;aa++){var U=this.validEdges[aa],P=U.absolutePoints;if(null!=P&&mxUtils.intersects(r,U)&&"1"!=U.style.noJump)for(U=0;U<P.length-1;U++){var X=P[U+1],ja=P[U];for(Q=P[U+2];U<P.length-2&&mxUtils.ptSegDistSq(ja.x,ja.y,Q.x,Q.y,X.x,X.y)<
-1*this.scale*this.scale;)X=Q,U++,Q=P[U+2];Q=mxUtils.intersection(R.x,R.y,N.x,N.y,ja.x,ja.y,X.x,X.y);if(null!=Q&&(Math.abs(Q.x-R.x)>I||Math.abs(Q.y-R.y)>I)&&(Math.abs(Q.x-N.x)>I||Math.abs(Q.y-N.y)>I)&&(Math.abs(Q.x-ja.x)>I||Math.abs(Q.y-ja.y)>I)&&(Math.abs(Q.x-X.x)>I||Math.abs(Q.y-X.y)>I)){X=Q.x-R.x;ja=Q.y-R.y;Q={distSq:X*X+ja*ja,x:Q.x,y:Q.y};for(X=0;X<S.length;X++)if(S[X].distSq>Q.distSq){S.splice(X,0,Q);Q=null;break}null==Q||0!=S.length&&S[S.length-1].x===Q.x&&S[S.length-1].y===Q.y||S.push(Q)}}}for(U=
-0;U<S.length;U++)B=F(1,S[U].x,S[U].y)||B}Q=x[x.length-1];B=F(0,Q.x,Q.y)||B}r.routedPoints=D;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 D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,F=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,N=null,R=null,S=[],Q=null;r.begin();for(var aa=0;aa<this.state.routedPoints.length;aa++){var U=this.state.routedPoints[aa],P=new mxPoint(U.x/this.scale,U.y/this.scale);0==aa?P=x[0]:aa==this.state.routedPoints.length-1&&(P=x[x.length-1]);var X=!1;if(null!=N&&1==U.type){var ja=this.state.routedPoints[aa+1];U=ja.x/this.scale-P.x;ja=ja.y/this.scale-P.y;U=U*U+ja*ja;null==Q&&(Q=new mxPoint(P.x-
-N.x,P.y-N.y),R=Math.sqrt(Q.x*Q.x+Q.y*Q.y),0<R?(Q.x=Q.x*F/R,Q.y=Q.y*F/R):Q=null);U>F*F&&0<R&&(U=N.x-P.x,ja=N.y-P.y,U=U*U+ja*ja,U>F*F&&(X=new mxPoint(P.x-Q.x,P.y-Q.y),U=new mxPoint(P.x+Q.x,P.y+Q.y),S.push(X),this.addPoints(r,S,B,D,!1,null,C),S=0>Math.round(Q.x)||0==Math.round(Q.x)&&0>=Math.round(Q.y)?1:-1,C=!1,"sharp"==I?(r.lineTo(X.x-Q.y*S,X.y+Q.x*S),r.lineTo(U.x-Q.y*S,U.y+Q.x*S),r.lineTo(U.x,U.y)):"line"==I?(r.moveTo(X.x+Q.y*S,X.y-Q.x*S),r.lineTo(X.x-Q.y*S,X.y+Q.x*S),r.moveTo(U.x-Q.y*S,U.y+Q.x*S),
-r.lineTo(U.x+Q.y*S,U.y-Q.x*S),r.moveTo(U.x,U.y)):"arc"==I?(S*=1.3,r.curveTo(X.x-Q.y*S,X.y+Q.x*S,U.x-Q.y*S,U.y+Q.x*S,U.x,U.y)):(r.moveTo(U.x,U.y),C=!0),S=[U],X=!0))}else Q=null;X||(S.push(P),N=P)}this.addPoints(r,S,B,D,!1,null,C);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,D){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,D){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,D);var F=this.getNextPoint(r,B,D),I=this.graph.isOrthogonal(r),C=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),N=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=C){var R=Math.cos(-C),S=Math.sin(-C);F=mxUtils.getRotatedPoint(F,R,S,N)}R=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);R+=parseFloat(r.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==C&&I,R);0!=C&&(R=Math.cos(C),S=Math.sin(C),F=mxUtils.getRotatedPoint(F,R,S,N));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,D,F){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=r)for(var I=0;I<r.length;I++){var C=this.graph.getConnectionPoint(x,
-r[I]);if(null!=C){var N=(C.x-F.x)*(C.x-F.x)+(C.y-F.y)*(C.y-F.y);if(null==D||N<D)B=C,D=N}}null!=B&&(F=B)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var D=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(D=B.state.view.graph.replacePlaceholders(B.state.cell,D));return D};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(r){if(null!=r.style&&"undefined"!==typeof pako){var x=
+fa||V.x!=ra||V.y!=K},H=.5*this.scale;B=!1;D=[];for(var C=0;C<x.length-1;C++){for(var N=x[C+1],Q=x[C],T=[],R=x[C+2];C<x.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,R.x,R.y,N.x,N.y)<1*this.scale*this.scale;)N=R,C++,R=x[C+2];B=F(0,Q.x,Q.y)||B;for(var ba=0;ba<this.validEdges.length;ba++){var S=this.validEdges[ba],P=S.absolutePoints;if(null!=P&&mxUtils.intersects(r,S)&&"1"!=S.style.noJump)for(S=0;S<P.length-1;S++){var X=P[S+1],ja=P[S];for(R=P[S+2];S<P.length-2&&mxUtils.ptSegDistSq(ja.x,ja.y,R.x,R.y,X.x,X.y)<
+1*this.scale*this.scale;)X=R,S++,R=P[S+2];R=mxUtils.intersection(Q.x,Q.y,N.x,N.y,ja.x,ja.y,X.x,X.y);if(null!=R&&(Math.abs(R.x-Q.x)>H||Math.abs(R.y-Q.y)>H)&&(Math.abs(R.x-N.x)>H||Math.abs(R.y-N.y)>H)&&(Math.abs(R.x-ja.x)>H||Math.abs(R.y-ja.y)>H)&&(Math.abs(R.x-X.x)>H||Math.abs(R.y-X.y)>H)){X=R.x-Q.x;ja=R.y-Q.y;R={distSq:X*X+ja*ja,x:R.x,y:R.y};for(X=0;X<T.length;X++)if(T[X].distSq>R.distSq){T.splice(X,0,R);R=null;break}null==R||0!=T.length&&T[T.length-1].x===R.x&&T[T.length-1].y===R.y||T.push(R)}}}for(S=
+0;S<T.length;S++)B=F(1,T[S].x,T[S].y)||B}R=x[x.length-1];B=F(0,R.x,R.y)||B}r.routedPoints=D;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 D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,F=(parseInt(mxUtils.getValue(this.style,
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,N=null,Q=null,T=[],R=null;r.begin();for(var ba=0;ba<this.state.routedPoints.length;ba++){var S=this.state.routedPoints[ba],P=new mxPoint(S.x/this.scale,S.y/this.scale);0==ba?P=x[0]:ba==this.state.routedPoints.length-1&&(P=x[x.length-1]);var X=!1;if(null!=N&&1==S.type){var ja=this.state.routedPoints[ba+1];S=ja.x/this.scale-P.x;ja=ja.y/this.scale-P.y;S=S*S+ja*ja;null==R&&(R=new mxPoint(P.x-
+N.x,P.y-N.y),Q=Math.sqrt(R.x*R.x+R.y*R.y),0<Q?(R.x=R.x*F/Q,R.y=R.y*F/Q):R=null);S>F*F&&0<Q&&(S=N.x-P.x,ja=N.y-P.y,S=S*S+ja*ja,S>F*F&&(X=new mxPoint(P.x-R.x,P.y-R.y),S=new mxPoint(P.x+R.x,P.y+R.y),T.push(X),this.addPoints(r,T,B,D,!1,null,C),T=0>Math.round(R.x)||0==Math.round(R.x)&&0>=Math.round(R.y)?1:-1,C=!1,"sharp"==H?(r.lineTo(X.x-R.y*T,X.y+R.x*T),r.lineTo(S.x-R.y*T,S.y+R.x*T),r.lineTo(S.x,S.y)):"line"==H?(r.moveTo(X.x+R.y*T,X.y-R.x*T),r.lineTo(X.x-R.y*T,X.y+R.x*T),r.moveTo(S.x-R.y*T,S.y+R.x*T),
+r.lineTo(S.x+R.y*T,S.y-R.x*T),r.moveTo(S.x,S.y)):"arc"==H?(T*=1.3,r.curveTo(X.x-R.y*T,X.y+R.x*T,S.x-R.y*T,S.y+R.x*T,S.x,S.y)):(r.moveTo(S.x,S.y),C=!0),T=[S],X=!0))}else R=null;X||(T.push(P),N=P)}this.addPoints(r,T,B,D,!1,null,C);r.stroke()}};var h=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,D){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),x.getCenterY()):h.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(r,x,B,D){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,D);var F=this.getNextPoint(r,B,D),H=this.graph.isOrthogonal(r),C=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),N=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=C){var Q=Math.cos(-C),T=Math.sin(-C);F=mxUtils.getRotatedPoint(F,Q,T,N)}Q=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);Q+=parseFloat(r.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==C&&H,Q);0!=C&&(Q=Math.cos(C),T=Math.sin(C),F=mxUtils.getRotatedPoint(F,Q,T,N));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,D,F){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=r)for(var H=0;H<r.length;H++){var C=this.graph.getConnectionPoint(x,
+r[H]);if(null!=C){var N=(C.x-F.x)*(C.x-F.x)+(C.y-F.y)*(C.y-F.y);if(null==D||N<D)B=C,D=N}}null!=B&&(F=B)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var D=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(D=B.state.view.graph.replacePlaceholders(B.state.cell,D));return D};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),D=mxUtils.parseXml(Graph.decompress(B));return new mxShape(new mxStencil(D.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 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.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(h){null!=window.console&&console.log("error in getStencil:",a,f,b,g,h)}}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,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}}};
+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(h){null!=h&&null!=h.documentElement&&(mxStencilRegistry.packages[a]=h,e=!0,mxStencilRegistry.parseStencilSet(h.documentElement,b,e))}));return}g=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=g;e=!0}catch(h){null!=window.console&&console.log("error in loadStencilSet:",a,h)}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 h=d.getAttribute("w"),
+n=d.getAttribute("h");h=null==h?80:parseInt(h,10);n=null==n?80:parseInt(n,10);b(g,e,a,h,n)}}d=d.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 e=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return e.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 d=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return d.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 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(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];
+return t};mxConnectionHandler.prototype.updatePreview=function(t){};var h=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var t=h.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 G=this.model.getChildCount(E),
@@ -2846,7 +2850,7 @@ function(){if(!this.isEditing()){var ka=mxUtils.getScrollOrigin();this.popupMenu
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(G){A||window.getSelection().containsNode(G,!0)?(G.removeAttribute("align"),G.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 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 I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(t,z){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};
+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 H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(t,z){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};
mxCellEditor.prototype.escapeCancelsEditing=!1;var C=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(t,z){t=this.graph.getStartEditingCell(t,z);C.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(G,L){L.originalNode=G;G=G.firstChild;for(var Y=L.firstChild;null!=G&&null!=Y;)z(G,Y),G=G.nextSibling,Y=Y.nextSibling;return L}function A(G,L){if(null!=G)if(L.originalNode!=G)E(G);else for(G=
G.firstChild,L=L.firstChild;null!=G;){var Y=G.nextSibling;null==L?E(G):(A(G,L),L=L.nextSibling);G=Y}}function E(G){for(var L=G.firstChild;null!=L;){var Y=L.nextSibling;E(L);L=Y}1==G.nodeType&&("BR"===G.nodeName||null!=G.firstChild)||3==G.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(G)).length?(3==G.nodeType&&mxUtils.setTextContent(G,mxUtils.getTextContent(G).replace(/\n|\r/g,"")),1==G.nodeType&&(G.removeAttribute("style"),G.removeAttribute("class"),G.removeAttribute("width"),G.removeAttribute("cellpadding"),
@@ -2856,19 +2860,19 @@ ea=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTS
0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&Y.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&Y.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=Y.join(" ");this.textarea.style.fontWeight=G?"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 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!=ha&&(this.textarea.innerHTML=ha);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var R=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(t,
+"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 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=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="",R.apply(this,arguments)};mxCellEditorGetInitialValue=
+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"==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 S=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};
-var Q=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate();try{Q.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||
+"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 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 R=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate();try{R.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 aa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){aa.apply(this,arguments);var A=this.graph.getCellStyle(t);
-if(null==A.childLayout){var E=this.graph.model.getParent(t),G=null!=E?this.graph.getCellGeometry(E):null;if(null!=G&&(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 Y=this.graph.getActualStartSize(E);G=G.clone();A?G.height=z.height+Y.y+Y.height+2*L:G.width=z.width+Y.x+Y.width+2*L;this.graph.model.setGeometry(E,G)}}};var U=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
-mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ha){A.get(ha)||(A.put(ha,!0),G.push(ha))}for(var z=U.apply(this,arguments),A=new mxDictionary,E=this.graph.model,G=[],L=0;L<z.length;L++){var Y=z[L];this.graph.isTableCell(Y)?t(E.getParent(E.getParent(Y))):this.graph.isTableRow(Y)&&t(E.getParent(Y));t(Y)}return G};var P=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=P.apply(this,arguments);z.stroke=
+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 ba=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){ba.apply(this,arguments);var A=this.graph.getCellStyle(t);
+if(null==A.childLayout){var E=this.graph.model.getParent(t),G=null!=E?this.graph.getCellGeometry(E):null;if(null!=G&&(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 Y=this.graph.getActualStartSize(E);G=G.clone();A?G.height=z.height+Y.y+Y.height+2*L:G.width=z.width+Y.x+Y.width+2*L;this.graph.model.setGeometry(E,G)}}};var S=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
+mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ha){A.get(ha)||(A.put(ha,!0),G.push(ha))}for(var z=S.apply(this,arguments),A=new mxDictionary,E=this.graph.model,G=[],L=0;L<z.length;L++){var Y=z[L];this.graph.isTableCell(Y)?t(E.getParent(E.getParent(Y))):this.graph.isTableRow(Y)&&t(E.getParent(Y));t(Y)}return G};var P=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=P.apply(this,arguments);z.stroke=
"#C0C0C0";z.strokewidth=1;return z};var X=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(t){var z=X.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 ja=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ja.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 fa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ra=mxVertexHandler.prototype.isCustomHandleVisible;
@@ -2880,7 +2884,7 @@ ka=this.state.origin.y+E.view.translate.y;null==t&&(t=[]);var wa=E.view.getCellS
E.getCellAt(Na.getGraphX(),Na.getGraphY())||Y.cell;E.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ha.reset=function(){Oa=0};t.push(Ha)})(G);for(G=0;G<za.length;G++)mxUtils.bind(this,function(Ma){var Ha=E.view.getState(za[Ma]),Fa=E.getCellGeometry(za[Ma]),Ga=null!=Fa.alternateBounds?Fa.alternateBounds:Fa;null==Ha&&(Ha=new mxCellState(E.view,za[Ma],E.getCellStyle(za[Ma])),Ha.x=Y.x+Fa.x*L,Ha.y=Y.y+Fa.y*L,Ha.width=Ga.width*L,Ha.height=Ga.height*L,Ha.updateCachedBounds());Fa=Ma<za.length-1?za[Ma+1]:null;
Fa=null!=Fa?E.getCellGeometry(Fa):null;var Oa=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Da[Ma]?new V(Da[Ma],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Fa.isDashed=ha.isDashed;Fa.svgStrokeTolerance++;Ha=new mxHandle(Ha,"col-resize",null,Fa);Ha.tableHandle=!0;var Pa=0;Ha.shape.node.parentNode.insertBefore(Ha.shape.node,Ha.shape.node.parentNode.firstChild);Ha.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==
V)this.shape.line=z(Da[Ma],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=E.getActualStartSize(Y.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ga.width+Pa)*L;this.shape.bounds.y=Y.y+(Ma==za.length-1?0:Sa.y*L);this.shape.bounds.height=Y.height-(Ma==za.length-1?0:(Sa.height+Sa.y)*L)}this.shape.redraw()}};var Na=!1;Ha.setPosition=function(Sa,eb,bb){Pa=Math.max(Graph.minTableColumnWidth-Ga.width,eb.x-Sa.x-Ga.width);Na=mxEvent.isShiftDown(bb.getEvent());null==Oa||Na||(Pa=Math.min(Pa,
-Oa.width-Graph.minTableColumnWidth))};Ha.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())||Y.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ha.positionChanged=function(){};Ha.reset=function(){Pa=0};t.push(Ha)})(G)}}return null!=t?t.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){T.apply(this,arguments);if(null!=
+Oa.width-Graph.minTableColumnWidth))};Ha.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())||Y.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ha.positionChanged=function(){};Ha.reset=function(){Pa=0};t.push(Ha)})(G)}}return null!=t?t.reverse():null};var U=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){U.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(G){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(G)&&this.graph.isCellSelected(A.cell)||this.graph.selectCellForEvent(A.cell,
G);mxEvent.isPopupTrigger(G)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(G),mxEvent.getClientY(G),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(G),this.graph.isMouseDown=!0);mxEvent.consume(G)}),null,mxUtils.bind(this,function(G){mxEvent.isPopupTrigger(G)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(G),mxEvent.getClientY(G),A.cell,G),mxEvent.consume(G))}));this.moveHandles.push(E);this.graph.container.appendChild(E)}})(this.graph.view.getState(t.getChildAt(this.state.cell,
@@ -2888,7 +2892,7 @@ z)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){
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 G=this.customHandles[E].shape.bounds,L=G.getCenterX(),Y=G.getCenterY();if(Math.abs(this.state.x-L)<G.width/2||Math.abs(this.state.y-Y)<G.height/2||Math.abs(this.state.x+this.state.width-L)<G.width/2||Math.abs(this.state.y+this.state.height-Y)<G.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=J.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 ia=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
+mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var aa=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(t,z){aa.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 ia=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
function(t,z){ia.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,G=this.roundLength(z.x/E-A.x);A=this.roundLength(z.y/E-A.y);E=this.graph.view.unit;this.hint.innerHTML=b(G,E)+", "+b(A,E);this.hint.style.visibility="visible";if(this.isSource||
this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(G=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*G.x)+"%, "+Math.round(100*G.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(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"/>');
@@ -2953,185 +2957,189 @@ 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&&(f[0].className="geIcon geAdaptiveAsset",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.rounded=!1;Format.prototype.curved=!1;
-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",
+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",
this.update);a.addListener("darkModeChanged",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 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(D){D.preventDefault()}));var g=a.getSelectionState(),d=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(D,F,I,C){var N=mxUtils.bind(this,function(R){k!=D&&(d?this.labelIndex=I:b.isSelectionEmpty()?this.diagramIndex=I:this.currentIndex=I,null!=k&&(k.style.backgroundColor=
-Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=D,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(D,"click",N);mxEvent.addListener(D,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(C&&null==k||I==(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("format").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=
+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(D){D.preventDefault()}));var g=a.getSelectionState(),e=g.containsLabel,h=null,n=null,u=mxUtils.bind(this,function(D,F,H,C){var N=mxUtils.bind(this,function(Q){h!=D&&(e?this.labelIndex=H:b.isSelectionEmpty()?this.diagramIndex=H:this.currentIndex=H,null!=h&&(h.style.backgroundColor=
+Format.inactiveTabBackgroundColor,h.style.borderBottomWidth="1px"),h=D,h.style.backgroundColor="",h.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(D,"click",N);mxEvent.addListener(D,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Q){Q.preventDefault()}));(C&&null==h||H==(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("format").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=
"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,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(D){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 I=u.getSelectionState().cells;m.setCellStyles(b,F,I);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(I,function(N){N.style.fontSize=F+"px";N.removeAttribute("size")});for(var C=0;C<I.length;C++)0==m.model.getChildCount(I[C])&&m.autoSizeCell(I[C],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",I))}finally{m.getModel().endUpdate()}}a.value=
-F+d;mxEvent.consume(D)});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,d,g,e,h,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(D){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(d,isNaN(F)?f:F));if(m.cellEditor.isContentEditing()&&h)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),h(F),a.value=F+e,
+x=!1);else if(F!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var H=u.getSelectionState().cells;m.setCellStyles(b,F,H);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(H,function(N){N.style.fontSize=F+"px";N.removeAttribute("size")});for(var C=0;C<H.length;C++)0==m.model.getChildCount(H[C])&&m.autoSizeCell(H[C],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",H))}finally{m.getModel().endUpdate()}}a.value=
+F+e;mxEvent.consume(D)});h&&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(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 D=k?parseFloat(a.value):parseInt(a.value);isNaN(D)||(a.value=D-(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 D=k?parseFloat(a.value):parseInt(a.value);isNaN(D)||(a.value=D+(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(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 h=this.addAction(a,b[e]);null!=h&&(g++,0==mxUtils.mod(g,2)&&(d.style.marginRight="2px",d.style.width="104px",h.style.width="104px",f.parentNode.removeChild(f)),f=mxUtils.br(a),d=h)}return g};
+BaseFormatPanel.prototype.createStepper=function(a,b,f,d,g,e,h){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 D=h?parseFloat(a.value):parseInt(a.value);isNaN(D)||(a.value=D-(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 D=h?parseFloat(a.value):parseInt(a.value);isNaN(D)||(a.value=D+(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(D){}x=null;mxEvent.consume(B)}})}else mxEvent.addListener(u,"click",function(B){mxEvent.consume(B)});return u};
-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 D=null!=u?u:m.getSelectionState().cells;B=B?e:g;r.setCellStyles(b,B,D);null!=d&&d(D,B);m.fireEvent(new mxEventObject("styleChanged",
+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 h=document.createElement("input");h.setAttribute("type","checkbox");h.style.margin="1px 6px 0px 0px";h.style.verticalAlign="top";e.appendChild(h);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?(h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0):(h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1),m!=x&&(m=x,b()!=m&&f(m,B)),u=!1)};mxEvent.addListener(e,"click",function(x){if("disabled"!=h.getAttribute("disabled")){var B=mxEvent.getSource(x);if(B==e||B==n)h.checked=!h.checked;r(h.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,h,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!=h)h.funct();else{r.getModel().beginUpdate();try{var D=null!=u?u:m.getSelectionState().cells;B=B?d:g;r.setCellStyles(b,B,D);null!=e&&e(D,B);m.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[B],"cells",D))}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,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,D=null,F=function(C,N,R){if(!B){var S="null"==e?null:e;B=!0;C=/(^#?[a-zA-Z0-9]*$)/.test(C)?C:S;S=null!=C&&C!=mxConstants.NONE?C:S;var Q=document.createElement("div");Q.style.width="36px";Q.style.height="12px";Q.style.margin="3px";Q.style.border="1px solid black";Q.style.backgroundColor="default"==S?n:S;D.innerText="";D.appendChild(Q);null!=C&&C!=mxConstants.NONE&&1<C.length&&"string"===typeof C&&(S="#"==C.charAt(0)?C.substring(1).toUpperCase():C,S=ColorDialog.prototype.colorNames[S],D.setAttribute("title",
-null!=S?S+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=C&&C!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);D.style.display=m.checked||k?"":"none";null!=d&&d("null"==C?null:C);x=C;N||(R||k||b()!=x)&&f("null"==x?null:x,x);B=!1}},I=document.createElement("input");I.setAttribute("type","color");I.style.visibility="hidden";I.style.width="0px";I.style.height="0px";I.style.border=
-"none";u.appendChild(I);D=mxUtils.button("",mxUtils.bind(this,function(C){var N=x;"default"==N&&(N=n);!mxEvent.isShiftDown(C)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(N,function(R){F(R,null,!0)},n):(I.value=N,I.click(),mxEvent.addListener(I,"input",function(){F(I.value,null,!0)}));mxEvent.consume(C)}));D.style.position="absolute";D.style.marginTop="-3px";D.style.left="178px";D.style.height="22px";D.className="geColorBtn";D.style.display=m.checked||k?"":"none";u.appendChild(D);a=null!=
-x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];D.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(C){C=mxEvent.getSource(C);if(C==m||"INPUT"!=C.nodeName)C!=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,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.createColorOption=function(a,b,f,d,g,e,h,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";h||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(),
+B=!1,D=null,F=function(C,N,Q){if(!B){var T="null"==d?null:d;B=!0;C=/(^#?[a-zA-Z0-9]*$)/.test(C)?C:T;T=null!=C&&C!=mxConstants.NONE?C:T;var R=document.createElement("div");R.style.width="36px";R.style.height="12px";R.style.margin="3px";R.style.border="1px solid black";R.style.backgroundColor="default"==T?n:T;D.innerText="";D.appendChild(R);null!=C&&C!=mxConstants.NONE&&1<C.length&&"string"===typeof C&&(T="#"==C.charAt(0)?C.substring(1).toUpperCase():C,T=ColorDialog.prototype.colorNames[T],D.setAttribute("title",
+null!=T?T+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=C&&C!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);D.style.display=m.checked||h?"":"none";null!=e&&e("null"==C?null:C);x=C;N||(Q||h||b()!=x)&&f("null"==x?null:x,x);B=!1}},H=document.createElement("input");H.setAttribute("type","color");H.style.visibility="hidden";H.style.width="0px";H.style.height="0px";H.style.border=
+"none";u.appendChild(H);D=mxUtils.button("",mxUtils.bind(this,function(C){var N=x;"default"==N&&(N=n);!mxEvent.isShiftDown(C)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(N,function(Q){F(Q,null,!0)},n):(H.value=N,H.click(),mxEvent.addListener(H,"input",function(){F(H.value,null,!0)}));mxEvent.consume(C)}));D.style.position="absolute";D.style.marginTop="-3px";D.style.left="178px";D.style.height="22px";D.className="geColorBtn";D.style.display=m.checked||h?"":"none";u.appendChild(D);a=null!=
+x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];D.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(C){C=mxEvent.getSource(C);if(C==m||"INPUT"!=C.nodeName)C!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||d==mxConstants.NONE||(d=x),F(m.checked?d:mxConstants.NONE)});F(x,!0);null!=g&&(g.install(F),this.listeners.push(g));return u};
+BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,d,g,e){var h=this.editorUi,n=h.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(h.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=h.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);h.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(h.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,h,n,u){h=null!=h?h: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=h-2+"px";d.style.left=228-f+"px";a.appendChild(d);return b};
+BaseFormatPanel.prototype.addGenericInput=function(a,b,f,d,g,e){var h=this.editorUi.editor.graph,n=function(){e(u.value)},u=this.addUnitInput(a,b,f,d,n),m=mxUtils.bind(this,function(r,x,B){if(B||u!=document.activeElement)u.value=g()+b});mxEvent.addListener(u,"keydown",function(r){13==r.keyCode?(h.container.focus(),mxEvent.consume(r)):27==r.keyCode&&(m(null,null,!0),h.container.focus(),mxEvent.consume(r))});h.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){h.getModel().removeListener(m)}});
+m();mxEvent.addListener(u,"blur",n);mxEvent.addListener(u,"change",n);return u};
+BaseFormatPanel.prototype.createRelativeOption=function(a,b,f,d,g){f=null!=f?f:52;var e=this.editorUi,h=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=h.view.getState(e.getSelectionState().cells[0]);null!=B&&x!=mxUtils.getValue(B.style,b,100)&&(100==x&&(x=null),B=e.getSelectionState().cells,
+h.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?(h.container.focus(),mxEvent.consume(r)):
+27==r.keyCode&&(m(null,null,!0),h.container.focus(),mxEvent.consume(r))});h.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){h.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);return 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,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=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","spacingCheckbox");f.style.margin="1px 6px 6px 0px";f.style.verticalAlign="top";a.appendChild(f);var e=document.createElement("label");e.style.verticalAlign="top";e.setAttribute("for","spacingCheckbox");e.style.userSelect=
-"none";mxUtils.write(e,mxResources.get("spacing"));a.appendChild(e);mxUtils.br(a);e=mxUtils.button(mxResources.get("horizontal"),function(g){b.distributeCells(!0,null,f.checked)});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.distributeCells(!1,null,f.checked)});e.setAttribute("title",mxResources.get("vertical"));e.style.width="104px";a.appendChild(e);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};
+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 h=d.table||d.row||d.cell,n=f.isStack(e)||f.isStackChild(e),u=h;n&&(h="0"==(f.isStack(e)?d.style:f.getCellStyle(f.model.getParent(e))).horizontalStack,u=!h);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)]));h&&(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 h=null;null!=b.copiedValue&&
+0<d.cells.length&&(h=mxUtils.button(mxResources.get("pasteData"),function(n){b.actions.get("pasteData").funct(n)}),h.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),h.style.marginBottom="2px",h.style.width="210px",a.appendChild(h),g++,null!=e&&(e.style.width="104px",h.style.width="104px",h.style.marginBottom="2px",e.style.marginBottom="2px",e.style.marginRight="2px"));null==e&&null==h||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),h=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,h,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=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","spacingCheckbox");f.style.margin="1px 6px 6px 0px";f.style.verticalAlign="top";a.appendChild(f);var d=document.createElement("label");d.style.verticalAlign="top";d.setAttribute("for","spacingCheckbox");d.style.userSelect=
+"none";mxUtils.write(d,mxResources.get("spacing"));a.appendChild(d);mxUtils.br(a);d=mxUtils.button(mxResources.get("horizontal"),function(g){b.distributeCells(!0,null,f.checked)});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.distributeCells(!1,null,f.checked)});d.setAttribute("title",mxResources.get("vertical"));d.style.width="104px";a.appendChild(d);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,h=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(){h.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+"°"});h=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};
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,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(){D.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,R);this.addKeyHandler(m,R);var D=this.addGeometryHandler(u,function(U,P,X){if(e.isTableCell(X))return e.setTableColumnWidth(X,P-U.width,!0),!0;0<U.width&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(U.height=Math.round(U.height*P*100/U.width)/100),U.width=P)});var F=this.addGeometryHandler(m,function(U,
-P,X){e.isTableCell(X)&&(X=e.model.getParent(X));if(e.isTableRow(X))return e.setTableRowHeight(X,P-U.height),!0;0<U.height&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(U.width=Math.round(U.width*P*100/U.height)/100),U.height=P)});(d.resizable||d.row||d.cell)&&a.appendChild(k);var I=this.createPanel();I.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"));
-I.appendChild(n);var C=this.addUnitInput(I,this.getUnit(),87,52,function(){S.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),N=this.addUnitInput(I,this.getUnit(),16,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(I);this.addLabel(I,mxResources.get("left"),87);this.addLabel(I,mxResources.get("top"),16);var R=mxUtils.bind(this,function(U,P,X){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(X||document.activeElement!=u)u.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(X||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){I.style.display="";if(X||document.activeElement!=C)C.value=this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(X||document.activeElement!=N)N.value=this.inUnit(d.y)+
-(""==d.y?"":" "+this.getUnit())}else I.style.display="none"});this.addKeyHandler(C,R);this.addKeyHandler(N,R);g.addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){g.removeListener(R)}});R();var S=this.addGeometryHandler(C,function(U,P){P=b.fromUnit(P);U.relative?U.offset.x=P:U.x=P});var Q=this.addGeometryHandler(N,function(U,P){P=b.fromUnit(P);U.relative?U.offset.y=P:U.y=P});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))){var aa=e.getCellGeometry(d.vertices[0]);
-null!=aa&&aa.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(U){g.beginUpdate();try{aa=aa.clone(),aa.x=0,aa.y=0,aa.offset=new mxPoint,g.setGeometry(d.vertices[0],aa)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(I),mxUtils.br(I),I.appendChild(n))}a.appendChild(I)}};
-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(S){var Q=parseInt(k.value);Q=Math.min(999,
-Math.max(1,isNaN(Q)?1:Q));if(Q!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var aa=b.getSelectionState().cells;f.setCellStyles("width",Q,aa);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[Q],"cells",aa))}k.value=Q+" pt";mxEvent.consume(S)});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(){I.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){C.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)}),D=this.addUnitInput(x,"pt",16,52,function(){R.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(D,F);var F=mxUtils.bind(this,function(S,Q,aa){e=b.getSelectionState();
-S=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(g.style.display="",aa||document.activeElement!=k)aa=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=aa+" pt"}else g.style.display="none";1==e.cells.length&&f.model.isEdge(S)?(aa=f.model.getGeometry(S),null!=aa.sourcePoint&&null==f.model.getTerminal(S,!0)?(m.value=aa.sourcePoint.x,r.value=aa.sourcePoint.y):u.style.display="none",null!=aa.targetPoint&&null==f.model.getTerminal(S,
-!1)?(B.value=aa.targetPoint.x,D.value=aa.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var I=this.addEdgeGeometryHandler(m,function(S,Q){S.sourcePoint.x=Q});var C=this.addEdgeGeometryHandler(r,function(S,Q){S.sourcePoint.y=Q});var N=this.addEdgeGeometryHandler(B,function(S,Q){S.targetPoint.x=Q});var R=this.addEdgeGeometryHandler(D,function(S,Q){S.targetPoint.y=Q});f.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){f.getModel().removeListener(F)}});
+ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,d=f.editor.graph,g=d.getModel(),e=f.getSelectionState(),h=this.createPanel();h.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"));h.appendChild(n);var u=this.addUnitInput(h,this.getUnit(),87,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
+m=this.addUnitInput(h,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()});h.appendChild(r);e.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(h,mxResources.get("width"),87);this.addLabel(h,mxResources.get("height"),16);mxUtils.br(h);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":h.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(u,T);this.addKeyHandler(m,T);var D=this.addGeometryHandler(u,function(S,P,X){if(d.isTableCell(X))return d.setTableColumnWidth(X,P-S.width,!0),!0;0<S.width&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(S.height=Math.round(S.height*P*100/S.width)/100),S.width=P)});var F=this.addGeometryHandler(m,function(S,
+P,X){d.isTableCell(X)&&(X=d.model.getParent(X));if(d.isTableRow(X))return d.setTableRowHeight(X,P-S.height),!0;0<S.height&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(S.width=Math.round(S.width*P*100/S.height)/100),S.height=P)});(e.resizable||e.row||e.cell)&&a.appendChild(h);var H=this.createPanel();H.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"));
+H.appendChild(n);var C=this.addUnitInput(H,this.getUnit(),87,52,function(){R.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),N=this.addUnitInput(H,this.getUnit(),16,52,function(){ba.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(H);if(e.movable){if(0==e.edges.length&&1==e.vertices.length){var Q=d.getCellGeometry(e.vertices[0]);null!=Q&&Q.relative&&(mxUtils.br(H),n=document.createElement("div"),n.style.position="absolute",n.style.width="70px",
+n.style.marginTop="0px",mxUtils.write(n,mxResources.get("relative")),H.appendChild(n),this.addGenericInput(H,"%",87,52,function(){return Math.round(1E3*Q.x)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{Q=Q.clone(),Q.x=parseFloat(S)/100,g.setGeometry(e.vertices[0],Q)}finally{g.endUpdate()}}}),this.addGenericInput(H,"%",16,52,function(){return Math.round(1E3*Q.y)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{Q=Q.clone(),Q.y=parseFloat(S)/100,g.setGeometry(e.vertices[0],
+Q)}finally{g.endUpdate()}}}),mxUtils.br(H))}a.appendChild(H)}this.addLabel(H,mxResources.get("left"),87).style.marginTop="8px";this.addLabel(H,mxResources.get("top"),16).style.marginTop="8px";var T=mxUtils.bind(this,function(S,P,X){e=f.getSelectionState();if(e.containsLabel||e.vertices.length!=d.getSelectionCount()||null==e.width||null==e.height)h.style.display="none";else{h.style.display="";if(X||document.activeElement!=u)u.value=this.inUnit(e.width)+(""==e.width?"":" "+this.getUnit());if(X||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){H.style.display="";if(X||document.activeElement!=C)C.value=this.inUnit(e.x)+(""==e.x?"":" "+this.getUnit());if(X||document.activeElement!=N)N.value=this.inUnit(e.y)+(""==e.y?"":" "+this.getUnit())}else H.style.display="none"});this.addKeyHandler(C,T);this.addKeyHandler(N,T);g.addListener(mxEvent.CHANGE,T);this.listeners.push({destroy:function(){g.removeListener(T)}});
+T();var R=this.addGeometryHandler(C,function(S,P){P=b.fromUnit(P);S.relative?S.offset.x=P:S.x=P});var ba=this.addGeometryHandler(N,function(S,P){P=b.fromUnit(P);S.relative?S.offset.y=P:S.y=P});e.movable&&(0==e.edges.length&&1==e.vertices.length&&g.isEdge(g.getParent(e.vertices[0]))&&(Q=d.getCellGeometry(e.vertices[0]),null!=Q&&Q.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(S){g.beginUpdate();try{Q=Q.clone(),Q.x=0,Q.y=0,Q.offset=new mxPoint,g.setGeometry(e.vertices[0],
+Q)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="134px",n.style.left="89px",n.style.position="absolute",mxUtils.br(H),mxUtils.br(H),H.appendChild(n))),a.appendChild(H))};
+ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=e+" "+h.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+" "+h.getUnit()}}mxEvent.consume(n)}var d=this.editorUi,g=d.editor.graph,e=null,h=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(h){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(h)}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 h=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(h,F);var n=mxUtils.bind(this,function(T){var R=parseInt(h.value);R=Math.min(999,
+Math.max(1,isNaN(R)?1:R));if(R!=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var ba=b.getSelectionState().cells;f.setCellStyles("width",R,ba);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[R],"cells",ba))}h.value=R+" pt";mxEvent.consume(T)});mxEvent.addListener(h,"blur",n);mxEvent.addListener(h,"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(){H.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){C.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";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)}),D=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,F);this.addKeyHandler(D,F);var F=mxUtils.bind(this,function(T,R,ba){d=b.getSelectionState();
+T=d.cells[0];if("link"==d.style.shape||"flexArrow"==d.style.shape){if(g.style.display="",ba||document.activeElement!=h)ba=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),h.value=ba+" pt"}else g.style.display="none";1==d.cells.length&&f.model.isEdge(T)?(ba=f.model.getGeometry(T),null!=ba.sourcePoint&&null==f.model.getTerminal(T,!0)?(m.value=ba.sourcePoint.x,r.value=ba.sourcePoint.y):u.style.display="none",null!=ba.targetPoint&&null==f.model.getTerminal(T,
+!1)?(B.value=ba.targetPoint.x,D.value=ba.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var H=this.addEdgeGeometryHandler(m,function(T,R){T.sourcePoint.x=R});var C=this.addEdgeGeometryHandler(r,function(T,R){T.sourcePoint.y=R});var N=this.addEdgeGeometryHandler(B,function(T,R){T.targetPoint.x=R});var Q=this.addEdgeGeometryHandler(D,function(T,R){T.targetPoint.y=R});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(ca,t){ca.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(ca){return function(){return ca()}},D=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,ca);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(ca){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);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),I=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
-ca);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([D,F,I]);if(e.cellEditor.isContentEditing()){var C=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([C]);C.firstChild.style.background=
+TextFormatPanel.prototype.addFont=function(a){function b(ca,t){ca.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 h=e.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",h,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(h)}a.appendChild(e);
+h=this.createPanel();h.style.marginTop="8px";h.style.borderTop="1px solid #c0c0c0";h.style.paddingTop="6px";h.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(ca){return function(){return ca()}},D=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,ca);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"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);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),H=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
+ca);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([D,F,H]);if(d.cellEditor.isContentEditing()){var C=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([C]);C.firstChild.style.background=
"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
-C.firstChild.style.backgroundPosition="2px 2px";C.firstChild.style.backgroundSize="18px 18px";this.styleButtons([C])}var N=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),R=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),S=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,R,S]);a.appendChild(x);var Q,aa,U,P,X;if(e.cellEditor.isContentEditing()){N.style.display="none";R.style.display="none";S.style.display="none";r.style.display="none";var ja=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ja.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ja.style.marginRight=
-"9px";ja.style.opacity=1;this.styleButtons([ja,Q=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),aa=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);Q.style.marginLeft="10px";B=x.cloneNode(!1);B.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
+C.firstChild.style.backgroundPosition="2px 2px";C.firstChild.style.backgroundSize="18px 18px";this.styleButtons([C])}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),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,Q,T]);a.appendChild(x);var R,ba,S,P,X;if(d.cellEditor.isContentEditing()){N.style.display="none";Q.style.display="none";T.style.display="none";r.style.display="none";var ja=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ja.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ja.style.marginRight=
+"9px";ja.style.opacity=1;this.styleButtons([ja,R=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),ba=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);R.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(){e.cellEditor.toggleViewMode()},B)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(B)}else m[2].style.marginRight="12px",I.style.marginRight="12px";x=d.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom=
+!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",H.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 fa=document.createElement("select");fa.style.position="absolute";fa.style.left="126px";fa.style.width="98px";fa.style.border="1px solid rgb(160, 160, 160)";fa.style.borderRadius="4px";fa.style.marginTop="-2px";C="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var ra={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<C.length;B++){var K=document.createElement("option");K.setAttribute("value",C[B]);mxUtils.write(K,mxResources.get(C[B]));fa.appendChild(K)}x.appendChild(fa);C=d.cloneNode(!1);C.style.marginLeft="0px";C.style.paddingTop=
-"4px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("writingDirection"));var V=document.createElement("select");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.left="126px";V.style.width="98px";V.style.borderRadius="4px";V.style.marginTop="-2px";K=["automatic","leftToRight","rightToLeft"];var O={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<K.length;B++){var T=
-document.createElement("option");T.setAttribute("value",K[B]);mxUtils.write(T,mxResources.get(K[B]));V.appendChild(T)}C.appendChild(V);e.isEditing()||(a.appendChild(x),mxEvent.addListener(fa,"change",function(ca){e.getModel().beginUpdate();try{var t=ra[fa.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(ca)}),a.appendChild(C),mxEvent.addListener(V,"change",function(ca){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,O[V.value],g.cells);mxEvent.consume(ca)}));var J=document.createElement("input");J.style.position="absolute";J.style.border="1px solid rgb(160, 160, 160)";J.style.textAlign="right";J.style.marginTop="4px";J.style.left="161px";J.style.width="53px";J.style.borderRadius="4px";J.style.height="23px";J.style.boxSizing="border-box";
-n.appendChild(J);var ba=null;x=this.installInputHandler(J,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(G,L){null!=e.cellEditor.textarea&&G!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(G)&&(L||z.containsNode(G,!0))&&("FONT"==G.nodeName?(G.removeAttribute("size"),G.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(G).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(G.parentNode).fontSize!=
-ca+"px"?G.style.fontSize=ca+"px":G.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"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])}J.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(G,L){for(;null!=L;){if(L===G)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=ca,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(){J.value=ba+" pt";ba=null},0);break}},!0);x=this.createStepper(J,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=J.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var ia=null,na=e.shapeBackgroundColor,W=null,da=e.shapeForegroundColor,sa=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
-function(){return na},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},e.shapeBackgroundColor,{install:function(ca){ia=ca},destroy:function(){ia=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){e.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
-null})},e.shapeBackgroundColor);sa.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 da},function(ca){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,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells));ca=e.cellEditor.textarea.getElementsByTagName("font");for(A=0;A<ca.length;A++)if(A>=z.length||ca[A]!=z[A].node||ca[A]==z[A].node&&ca[A].getAttribute("color")!=z[A].color){z=ca[A].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
-null!=z.firstChild){ca[A].parentNode.insertBefore(z,ca[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;ca[A].appendChild(t);t=E}z.appendChild(ca[A])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:e.shapeForegroundColor,{install:function(ca){W=ca},destroy:function(){W=null}},
-null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){sa.style.display=ca==mxConstants.NONE?"none":"";ta.style.display=sa.style.display},function(ca){ca==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,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(sa);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(ca){var t=e.view.getState(ca);return null==t||e.isAutoSizeState(t)||e.getModel().isEdge(ca)||!e.isTableRow(ca)&&!e.isTableCell(ca)&&!e.isCellResizable(ca)}));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"));
+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<C.length;B++){var K=document.createElement("option");K.setAttribute("value",C[B]);mxUtils.write(K,mxResources.get(C[B]));fa.appendChild(K)}x.appendChild(fa);C=e.cloneNode(!1);C.style.marginLeft="0px";C.style.paddingTop=
+"4px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("writingDirection"));var V=document.createElement("select");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.left="126px";V.style.width="98px";V.style.borderRadius="4px";V.style.marginTop="-2px";K=["automatic","leftToRight","rightToLeft"];var O={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<K.length;B++){var U=
+document.createElement("option");U.setAttribute("value",K[B]);mxUtils.write(U,mxResources.get(K[B]));V.appendChild(U)}C.appendChild(V);d.isEditing()||(a.appendChild(x),mxEvent.addListener(fa,"change",function(ca){d.getModel().beginUpdate();try{var t=ra[fa.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(ca)}),a.appendChild(C),mxEvent.addListener(V,"change",function(ca){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,O[V.value],g.cells);mxEvent.consume(ca)}));var J=document.createElement("input");J.style.position="absolute";J.style.border="1px solid rgb(160, 160, 160)";J.style.textAlign="right";J.style.marginTop="4px";J.style.left="161px";J.style.width="53px";J.style.borderRadius="4px";J.style.height="23px";J.style.boxSizing="border-box";
+n.appendChild(J);var aa=null;x=this.installInputHandler(J,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(G,L){null!=d.cellEditor.textarea&&G!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(G)&&(L||z.containsNode(G,!0))&&("FONT"==G.nodeName?(G.removeAttribute("size"),G.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(G).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(G.parentNode).fontSize!=
+ca+"px"?G.style.fontSize=ca+"px":G.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"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])}J.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(G,L){for(;null!=L;){if(L===G)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(d.cellEditor.textarea,E))for(aa=ca,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=aa+"px";window.setTimeout(function(){J.value=aa+" pt";aa=null},0);break}},!0);x=this.createStepper(J,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=J.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var ia=null,na=d.shapeBackgroundColor,W=null,da=d.shapeForegroundColor,sa=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
+function(){return na},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},d.shapeBackgroundColor,{install:function(ca){ia=ca},destroy:function(){ia=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){d.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
+null})},d.shapeBackgroundColor);sa.style.fontWeight="bold";var ta=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);ta.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 da},function(ca){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,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells));ca=d.cellEditor.textarea.getElementsByTagName("font");for(A=0;A<ca.length;A++)if(A>=z.length||ca[A]!=z[A].node||ca[A]==z[A].node&&ca[A].getAttribute("color")!=z[A].color){z=ca[A].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
+null!=z.firstChild){ca[A].parentNode.insertBefore(z,ca[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;ca[A].appendChild(t);t=E}z.appendChild(ca[A])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor,{install:function(ca){W=ca},destroy:function(){W=null}},
+null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){sa.style.display=ca==mxConstants.NONE?"none":"";ta.style.display=sa.style.display},function(ca){ca==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,g.cells);d.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},d.shapeForegroundColor);
+n.style.fontWeight="bold";h.appendChild(n);h.appendChild(sa);d.cellEditor.isContentEditing()||h.appendChild(ta);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";n=d.filterSelectionCells(mxUtils.bind(this,function(ca){var t=d.view.getState(ca);return null==t||d.isAutoSizeState(t)||d.getModel().isEdge(ca)||!d.isTableRow(ca)&&!d.isTableCell(ca)&&!d.isCellResizable(ca)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap",
+"null",null,null,!0,n);x.style.fontWeight="bold";0<n.length&&h.appendChild(x);n=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,f.actions.get("formattedText"));n.style.fontWeight="bold";h.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 Ja=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Ia=this.addUnitInput(n,"pt",16,52,function(){ab.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(){kb.apply(this,arguments)}),Ba=this.addUnitInput(n,"pt",87,52,function(){Za.apply(this,arguments)}),qa=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 Ea=null,Ua=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Ea&&(e.cellEditor.restoreSelection(Ea),Ea=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);ca.value=t+" %"},function(ca){Ua=ca;mxEvent.addListener(ca,"mousedown",function(){document.activeElement==e.cellEditor.textarea&&
-(Ea=e.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Ea=e.cellEditor.saveSelection())});ca.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(ca){this.editorUi.menus.addInsertTableItem(ca,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!=P?P.cellIndex:0)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=U&&e.insertColumn(U,null!=P?P.cellIndex+1:-1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=U&&null!=P&&e.deleteColumn(U,P.cellIndex)}catch(ca){this.editorUi.handleError(ca)}}),
-n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=U&&null!=X&&e.insertRow(U,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=U&&null!=X&&e.insertRow(U,X.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
-mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=U&&null!=X&&e.deleteRow(U,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),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(ca){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,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?U:P;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(ca){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,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,
-function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?U:P;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 ca=U.getAttribute("cellPadding")||0;ca=new FilenameDialog(f,ca,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(ca.container,300,80,!0,!0);ca.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(ca){mxEvent.addListener(m[ca],"click",function(){b(m[ca],""==m[ca].style.backgroundImage)})})(B);var Ta=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(m[1],(ca&mxConstants.FONT_ITALIC)==
+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 Ea=null,Ua=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Ea&&(d.cellEditor.restoreSelection(Ea),Ea=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);ca.value=t+" %"},function(ca){Ua=ca;mxEvent.addListener(ca,"mousedown",function(){document.activeElement==d.cellEditor.textarea&&
+(Ea=d.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(Ea=d.cellEditor.saveSelection())});ca.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],h,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,
+"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(ca){this.editorUi.menus.addInsertTableItem(ca,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(h);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!=S&&d.insertColumn(S,null!=P?P.cellIndex:0)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=S&&d.insertColumn(S,null!=P?P.cellIndex+1:-1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=S&&null!=P&&d.deleteColumn(S,P.cellIndex)}catch(ca){this.editorUi.handleError(ca)}}),
+n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&d.insertRow(S,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&d.insertRow(S,X.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
+mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&d.deleteRow(S,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(n);e=e.cloneNode(!1);e.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,
+function(ca){if(null!=S){var t=S.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?S:P;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(ca){if(null!=S){var t=S.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,
+function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?S:P;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!=S){var ca=S.getAttribute("cellPadding")||0;ca=new FilenameDialog(f,ca,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?S.setAttribute("cellPadding",t):S.removeAttribute("cellPadding")}),mxResources.get("spacing"));
+f.showDialog(ca.container,300,80,!0,!0);ca.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=S&&S.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=S&&S.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=S&&S.setAttribute("align","right")},e)];this.styleButtons(x);x[2].style.marginRight="10px";h.appendChild(e);
+a.appendChild(h);var db=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);for(B=0;3>B;B++)(function(ca){mxEvent.addListener(m[ca],"click",function(){b(m[ca],""==m[ca].style.backgroundImage)})})(B);var Ta=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(m[1],(ca&mxConstants.FONT_ITALIC)==
mxConstants.FONT_ITALIC);b(m[2],(ca&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!=J)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),J.value=isNaN(ca)?"":ca+" pt";ca=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-b(D,ca==mxConstants.ALIGN_LEFT);b(F,ca==mxConstants.ALIGN_CENTER);b(I,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(N,ca==mxConstants.ALIGN_TOP);b(R,ca==mxConstants.ALIGN_MIDDLE);b(S,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);fa.value=ca==mxConstants.ALIGN_LEFT&&
+b(D,ca==mxConstants.ALIGN_LEFT);b(F,ca==mxConstants.ALIGN_CENTER);b(H,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(N,ca==mxConstants.ALIGN_TOP);b(Q,ca==mxConstants.ALIGN_MIDDLE);b(T,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);fa.value=ca==mxConstants.ALIGN_LEFT&&
t==mxConstants.ALIGN_TOP?"topLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_TOP?"top":ca==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_TOP?"topRight":ca==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_BOTTOM?"bottomLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_BOTTOM?"bottom":ca==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_BOTTOM?"bottomRight":ca==mxConstants.ALIGN_LEFT?"left":ca==mxConstants.ALIGN_RIGHT?"right":"center";ca=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,
mxConstants.DEFAULT_TEXT_DIRECTION);ca==mxConstants.TEXT_DIRECTION_RTL?V.value="rightToLeft":ca==mxConstants.TEXT_DIRECTION_LTR?V.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(V.value="automatic");if(z||document.activeElement!=Ia)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ia.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ja)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ja.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=
qa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),qa.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ba)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ba.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ua)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ua.value=isNaN(ca)?"":ca+" pt"});var ab=this.installInputHandler(Ia,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ja,
-mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(qa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Za=this.installInputHandler(Ba,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var kb=this.installInputHandler(ua,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(J,Ta);this.addKeyHandler(Ia,Ta);this.addKeyHandler(Ja,Ta);this.addKeyHandler(qa,Ta);this.addKeyHandler(Ba,Ta);this.addKeyHandler(ua,Ta);e.getModel().addListener(mxEvent.CHANGE,Ta);
-this.listeners.push({destroy:function(){e.getModel().removeListener(Ta)}});Ta();if(e.cellEditor.isContentEditing()){var cb=!1;d=function(){cb||(cb=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(za,Da){if(null!=za&&null!=Da){if(za==Da)return!0;if(za.length>Da.length+1)return za.substring(za.length-Da.length-1,za.length)=="-"+Da}return!1},z=function(za){if(null!=e.getParentByName(ca,za,e.cellEditor.textarea))return!0;for(var Da=ca;null!=Da&&1==Da.childNodes.length;)if(Da=
+mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(qa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Za=this.installInputHandler(Ba,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var kb=this.installInputHandler(ua,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(J,Ta);this.addKeyHandler(Ia,Ta);this.addKeyHandler(Ja,Ta);this.addKeyHandler(qa,Ta);this.addKeyHandler(Ba,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 cb=!1;e=function(){cb||(cb=!0,window.setTimeout(function(){var ca=d.getSelectedEditingElement();if(null!=ca){var t=function(za,Da){if(null!=za&&null!=Da){if(za==Da)return!0;if(za.length>Da.length+1)return za.substring(za.length-Da.length-1,za.length)=="-"+Da}return!1},z=function(za){if(null!=d.getParentByName(ca,za,d.cellEditor.textarea))return!0;for(var Da=ca;null!=Da&&1==Da.childNodes.length;)if(Da=
Da.childNodes[0],Da.nodeName==za)return!0;return!1},A=function(za){za=null!=za?za.fontSize:null;return null!=za&&"px"==za.substring(za.length-2)?parseFloat(za):mxConstants.DEFAULT_FONTSIZE},E=function(za,Da,La){return null!=La.style&&null!=Da?(Da=Da.lineHeight,null!=La.style.lineHeight&&"%"==La.style.lineHeight.substring(La.style.lineHeight.length-1)?parseInt(La.style.lineHeight)/100:"px"==Da.substring(Da.length-2)?parseFloat(Da)/za:parseInt(Da)):""},G=mxUtils.getCurrentStyle(ca),L=A(G),Y=E(L,G,ca),
-ha=ca.getElementsByTagName("*");if(0<ha.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var ea=window.getSelection(),ka=0;ka<ha.length;ka++)if(ea.containsNode(ha[ka],!0)){temp=mxUtils.getCurrentStyle(ha[ka]);L=Math.max(A(temp),L);var wa=E(L,temp,ha[ka]);if(wa!=Y||isNaN(wa))Y=""}null!=G&&(b(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==G.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(aa,z("SUP")),b(Q,z("SUB")),e.cellEditor.isTableSelected()?(b(ja,
-t(G.textAlign,"justify")),b(D,t(G.textAlign,"left")),b(F,t(G.textAlign,"center")),b(I,t(G.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(b(ja,t(G.textAlign,"justify")),b(D,!1),b(F,!1),b(I,!1)):(b(ja,!1),b(D,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(I,z==mxConstants.ALIGN_RIGHT))),U=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),X=null==U?null:e.getParentByName(ca,"TR",U),P=null==
-U?null:e.getParentByNames(ca,["TD","TH"],U),db.style.display=null!=U?"":"none",document.activeElement!=J&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&null!=ba?(ca.removeAttribute("size"),ca.style.fontSize=ba+" pt",ba=null):J.value=isNaN(L)?"":L+" pt",wa=parseFloat(Y),isNaN(wa)?Ua.value="100 %":Ua.value=Math.round(100*wa)+" %"),null!=W&&(da="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(da,!0)),null!=ia&&(na="rgba(0, 0, 0, 0)"==G.backgroundColor||
-"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ia(na,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}cb=!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";
+ha=ca.getElementsByTagName("*");if(0<ha.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var ea=window.getSelection(),ka=0;ka<ha.length;ka++)if(ea.containsNode(ha[ka],!0)){temp=mxUtils.getCurrentStyle(ha[ka]);L=Math.max(A(temp),L);var wa=E(L,temp,ha[ka]);if(wa!=Y||isNaN(wa))Y=""}null!=G&&(b(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==G.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(ba,z("SUP")),b(R,z("SUB")),d.cellEditor.isTableSelected()?(b(ja,
+t(G.textAlign,"justify")),b(D,t(G.textAlign,"left")),b(F,t(G.textAlign,"center")),b(H,t(G.textAlign,"right"))):(z=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(b(ja,t(G.textAlign,"justify")),b(D,!1),b(F,!1),b(H,!1)):(b(ja,!1),b(D,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(H,z==mxConstants.ALIGN_RIGHT))),S=d.getParentByName(ca,"TABLE",d.cellEditor.textarea),X=null==S?null:d.getParentByName(ca,"TR",S),P=null==
+S?null:d.getParentByNames(ca,["TD","TH"],S),db.style.display=null!=S?"":"none",document.activeElement!=J&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&null!=aa?(ca.removeAttribute("size"),ca.style.fontSize=aa+" pt",aa=null):J.value=isNaN(L)?"":L+" pt",wa=parseFloat(Y),isNaN(wa)?Ua.value="100 %":Ua.value=Math.round(100*wa)+" %"),null!=W&&(da="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(da,!0)),null!=ia&&(na="rgba(0, 0, 0, 0)"==G.backgroundColor||
+"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ia(na,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}cb=!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";
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 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 D=B;return(D=D.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===D.length?"#"+("0"+parseInt(D[1],10).toString(16)).slice(-2)+("0"+parseInt(D[2],10).toString(16)).slice(-2)+("0"+parseInt(D[3],
-10).toString(16)).slice(-2):""},mxUtils.bind(this,function(D){g[d].style[r]=D;D="";for(var F=0;F<g.length;F++)D+=g[F].cssText+" ";e.textContent=D;D=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(D):Base64.encode(D,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(D){},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 d=new RegExp(f),g=b.style.image.substring(b.style.image.indexOf(",")+1),e=window.atob?atob(g):Base64.decode(g,!0),h=mxUtils.parseXml(e);if(null!=h){var n=h.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],h,n[b],u,f,d)}}}}catch(m){}return a};
+StyleFormatPanel.prototype.addSvgRule=function(a,b,f,d,g,e,h){var n=this.editorUi,u=n.editor.graph;h.test(b.selectorText)&&(h=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 D=B;return(D=D.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===D.length?"#"+("0"+parseInt(D[1],10).toString(16)).slice(-2)+("0"+parseInt(D[2],10).toString(16)).slice(-2)+("0"+parseInt(D[3],
+10).toString(16)).slice(-2):""},mxUtils.bind(this,function(D){g[e].style[r]=D;D="";for(var F=0;F<g.length;F++)D+=g[F].cssText+" ";d.textContent=D;D=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(D):Base64.encode(D,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(D){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),h(b,"fill",mxResources.get("fill")),h(b,"stroke",mxResources.get("line")),h(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(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){function b(){k.innerHTML="";D=1;for(var I=0;I<Editor.fillStyles.length;I++){var C=document.createElement("option");C.setAttribute("value",Editor.fillStyles[I].val);mxUtils.write(C,Editor.fillStyles[I].dispName);k.appendChild(C)}}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var d=document.createElement("select");d.style.position="absolute";d.style.left="104px";d.style.width="70px";d.style.height=
-"22px";d.style.padding="0px";d.style.marginTop="-3px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.boxSizing="border-box";var k=d.cloneNode(!1);mxEvent.addListener(d,"click",function(I){mxEvent.consume(I)});mxEvent.addListener(k,"click",function(I){mxEvent.consume(I)});var n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(I){d.style.display=null==I||I==mxConstants.NONE?"none":""},function(I){e.updateCellStyles({gradientColor:I},
-e.getSelectionCells())},e.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,e.shapeForegroundColor,e.shapeBackgroundColor)),u="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,m=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(I){e.setCellStyles(u,I,g.cells)}),e.getDefaultColor(g.style,u,e.shapeBackgroundColor,e.shapeForegroundColor));m.style.fontWeight="bold";var r=mxUtils.getValue(g.style,u,null);n.style.display=
-null!=r&&r!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var x=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(r=0;r<x.length;r++){var B=document.createElement("option");B.setAttribute("value",x[r]);mxUtils.write(B,mxResources.get(x[r]));d.appendChild(B)}n.appendChild(d);var D;b();m.appendChild(k);var F=mxUtils.bind(this,function(){g=f.getSelectionState();var I=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,
-mxConstants.DIRECTION_SOUTH),C=mxUtils.getValue(g.style,"fillStyle","auto");""==I&&(I=mxConstants.DIRECTION_SOUTH);d.value=I;a.style.display=g.fill?"":"none";I=mxUtils.getValue(g.style,u,null);if(g.fill&&null!=I&&I!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=D){k.innerHTML="";D=2;for(I=0;I<Editor.roughFillStyles.length;I++){var N=document.createElement("option");N.setAttribute("value",Editor.roughFillStyles[I].val);mxUtils.write(N,Editor.roughFillStyles[I].dispName);
-k.appendChild(N)}k.value="auto"}}else 1!=D&&b();k.value=C;k.value||(C="auto",k.value=C);k.style.display="1"==g.style.sketch||"none"==d.style.display?"":"none";n.style.display=g.containsImage||"1"==g.style.sketch&&"solid"!=C&&"auto"!=C?"none":""}else k.style.display="none",n.style.display="none"});e.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){e.getModel().removeListener(F)}});F();mxEvent.addListener(d,"change",function(I){e.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,
-d.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",g.cells));mxEvent.consume(I)});mxEvent.addListener(k,"change",function(I){e.setCellStyles("fillStyle",k.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[k.value],"cells",g.cells));mxEvent.consume(I)});a.appendChild(m);a.appendChild(n);m=this.getCustomColors();for(r=0;r<m.length;r++)a.appendChild(this.createCellColorOption(m[r].title,
+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){function b(){h.innerHTML="";D=1;for(var H=0;H<Editor.fillStyles.length;H++){var C=document.createElement("option");C.setAttribute("value",Editor.fillStyles[H].val);mxUtils.write(C,Editor.fillStyles[H].dispName);h.appendChild(C)}}var f=this.editorUi,d=f.editor.graph,g=f.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var e=document.createElement("select");e.style.position="absolute";e.style.left="104px";e.style.width="70px";e.style.height=
+"22px";e.style.padding="0px";e.style.marginTop="-3px";e.style.borderRadius="4px";e.style.border="1px solid rgb(160, 160, 160)";e.style.boxSizing="border-box";var h=e.cloneNode(!1);mxEvent.addListener(e,"click",function(H){mxEvent.consume(H)});mxEvent.addListener(h,"click",function(H){mxEvent.consume(H)});var n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(H){e.style.display=null==H||H==mxConstants.NONE?"none":""},function(H){d.updateCellStyles({gradientColor:H},
+d.getSelectionCells())},d.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,d.shapeForegroundColor,d.shapeBackgroundColor)),u="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,m=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(H){d.setCellStyles(u,H,g.cells)}),d.getDefaultColor(g.style,u,d.shapeBackgroundColor,d.shapeForegroundColor));m.style.fontWeight="bold";var r=mxUtils.getValue(g.style,u,null);n.style.display=
+null!=r&&r!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var x=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(r=0;r<x.length;r++){var B=document.createElement("option");B.setAttribute("value",x[r]);mxUtils.write(B,mxResources.get(x[r]));e.appendChild(B)}n.appendChild(e);var D;b();m.appendChild(h);var F=mxUtils.bind(this,function(){g=f.getSelectionState();var H=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,
+mxConstants.DIRECTION_SOUTH),C=mxUtils.getValue(g.style,"fillStyle","auto");""==H&&(H=mxConstants.DIRECTION_SOUTH);e.value=H;a.style.display=g.fill?"":"none";H=mxUtils.getValue(g.style,u,null);if(g.fill&&null!=H&&H!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=D){h.innerHTML="";D=2;for(H=0;H<Editor.roughFillStyles.length;H++){var N=document.createElement("option");N.setAttribute("value",Editor.roughFillStyles[H].val);mxUtils.write(N,Editor.roughFillStyles[H].dispName);
+h.appendChild(N)}h.value="auto"}}else 1!=D&&b();h.value=C;h.value||(C="auto",h.value=C);h.style.display="1"==g.style.sketch||"none"==e.style.display?"":"none";n.style.display=g.containsImage||"1"==g.style.sketch&&"solid"!=C&&"auto"!=C?"none":""}else h.style.display="none",n.style.display="none"});d.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){d.getModel().removeListener(F)}});F();mxEvent.addListener(e,"change",function(H){d.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,
+e.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[e.value],"cells",g.cells));mxEvent.consume(H)});mxEvent.addListener(h,"change",function(H){d.setCellStyles("fillStyle",h.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(H)});a.appendChild(m);a.appendChild(n);m=this.getCustomColors();for(r=0;r<m.length;r++)a.appendChild(this.createCellColorOption(m[r].title,
m[r].key,m[r].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 da=parseFloat(C.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));C.value=da+" pt";mxEvent.consume(W)}function f(W){var da=parseFloat(N.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style,
-mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));N.value=da+" pt";mxEvent.consume(W)}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");
+StyleFormatPanel.prototype.addStroke=function(a){function b(W){var da=parseFloat(C.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",e.cells)));C.value=da+" pt";mxEvent.consume(W)}function f(W){var da=parseFloat(N.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(e.style,
+mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",e.cells)));N.value=da+" 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 h=document.createElement("div");h.style.fontWeight="bold";e.stroke||(h.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 da=
-[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],sa=["0",null];"rounded"==n.value?sa=["1",null]:"curved"==n.value&&(sa=[null,"1"]);for(var ta=0;ta<da.length;ta++)g.setCellStyles(da[ta],sa[ta],d.cells);e.fireEvent(new mxEventObject("styleChanged","keys",da,"values",sa,"cells",d.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(W)});mxEvent.addListener(n,"click",function(W){mxEvent.consume(W)});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(W){g.setCellStyles(x,W,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 D=
+[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],sa=["0",null];"rounded"==n.value?sa=["1",null]:"curved"==n.value&&(sa=[null,"1"]);for(var ta=0;ta<da.length;ta++)g.setCellStyles(da[ta],sa[ta],e.cells);d.fireEvent(new mxEventObject("styleChanged","keys",da,"values",sa,"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);h.appendChild(u);var B=h.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 D=
mxUtils.bind(this,function(W,da,sa,ta,Ja){W=this.editorUi.menus.styleChange(W,"",ta,Ja,"geIcon",null);ta=document.createElement("div");ta.style.width=da+"px";ta.style.height="1px";ta.style.borderBottom="1px "+sa+" "+this.defaultStrokeColor;ta.style.paddingTop="6px";W.firstChild.firstChild.style.padding="0px 4px 0px 4px";W.firstChild.firstChild.style.width=da+"px";W.firstChild.firstChild.appendChild(ta);return W});m=this.editorUi.toolbar.addMenuFunctionInContainer(B,"geSprite-orthogonal",mxResources.get("pattern"),
!1,mxUtils.bind(this,function(W){D(W,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(W,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=B.cloneNode(!1),I=this.editorUi.toolbar.addMenuFunctionInContainer(F,"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,
+["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=B.cloneNode(!1),H=this.editorUi.toolbar.addMenuFunctionInContainer(F,"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(F,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(W){D(W,33,"solid",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(W,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+
" (2)");D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=B.cloneNode(!1);var C=document.createElement("input");C.style.position="absolute";C.style.textAlign="right";C.style.marginTop="2px";C.style.width="52px";C.style.height="21px";C.style.left="146px";C.style.border="1px solid rgb(160, 160, 160)";C.style.borderRadius="4px";C.style.boxSizing="border-box";C.setAttribute("title",mxResources.get("linewidth"));
-B.appendChild(C);var N=C.cloneNode(!0);F.appendChild(N);var R=this.createStepper(C,b,1,9);R.style.display=C.style.display;R.style.marginTop="2px";R.style.left="198px";B.appendChild(R);R=this.createStepper(N,f,1,9);R.style.display=N.style.display;R.style.marginTop="2px";N.style.position="absolute";R.style.left="198px";F.appendChild(R);mxEvent.addListener(C,"blur",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(N,"blur",f);mxEvent.addListener(N,"change",f);var S=this.editorUi.toolbar.addMenuFunctionInContainer(u,
-"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(W){"arrow"!=d.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",
+B.appendChild(C);var N=C.cloneNode(!0);F.appendChild(N);var Q=this.createStepper(C,b,1,9);Q.style.display=C.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";F.appendChild(Q);mxEvent.addListener(C,"blur",b);mxEvent.addListener(C,"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(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"==d.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")))})),Q=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"connector"==d.style.shape||"filledEdge"==d.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_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")))})),R=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 da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"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"],
@@ -3143,8 +3151,8 @@ null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.edit
"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)}})),aa=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1,
-mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
+"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)}})),ba=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 da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"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,
@@ -3157,300 +3165,300 @@ mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.styl
"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)}}));R=this.addArrow(I,8);R.nextSibling.style.position="relative";R.nextSibling.style.top="-2px";R=this.addArrow(S,
-10);R.nextSibling.style.position="relative";R.nextSibling.style.top="-3px";S.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(Q,null,!0);this.addArrow(aa,null,!0);R=this.addArrow(m,9);R.className="geIcon";R.style.width="auto";var U=this.addArrow(r,9);U.className="geIcon";U.style.width="22px";var P=document.createElement("div");P.style.width="84px";P.style.height="1px";P.style.borderBottom="1px solid "+this.defaultStrokeColor;P.style.marginBottom="7px";R.appendChild(P);var X=document.createElement("div");
-X.style.width="23px";X.style.height="1px";X.style.borderBottom="1px solid "+this.defaultStrokeColor;X.style.marginBottom="7px";U.appendChild(X);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";I.style.marginLeft="10px";I.style.height="15px";S.style.marginLeft="10px";S.style.height="17px";Q.style.marginLeft="3px";Q.style.height="17px";aa.style.marginLeft="3px";aa.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 ja=this.addUnitInput(m,"pt",98,52,function(){ia.apply(this,arguments)}),fa=this.addUnitInput(m,"pt",30,52,function(){ba.apply(this,arguments)});mxUtils.br(m);R=document.createElement("div");R.style.height=
-"8px";m.appendChild(R);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var ra=this.addUnitInput(m,"pt",98,52,function(){J.apply(this,arguments)}),K=this.addUnitInput(m,"pt",30,52,function(){T.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 V=this.addUnitInput(k,"pt",30,52,function(){na.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 O=mxUtils.bind(this,function(W,da,sa){function ta(Ja,Ia,ua,Ba){ua=ua.getElementsByTagName("div")[0];null!=ua&&e.updateCssForMarker(ua,Ba,d.style.shape,Ja,Ia);return ua}d=e.getSelectionState();if(sa||document.activeElement!=C)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),C.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=N)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(W)?"":W+" 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)?P.style.borderBottom="1px dashed "+this.defaultStrokeColor:P.style.borderBottom="1px dotted "+this.defaultStrokeColor:P.style.borderBottom="1px solid "+this.defaultStrokeColor;
-X.style.borderBottom=P.style.borderBottom;W=S.getElementsByTagName("div")[0];null!=W&&(da=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(d.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(da=null),"orthogonalEdgeStyle"==da&&"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?W.className="geSprite geSprite-curved":W.className="straight"==da||"none"==da||null==da?"geSprite geSprite-straight":"entityRelationEdgeStyle"==da?"geSprite geSprite-entity":"elbowEdgeStyle"==
-da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=I.getElementsByTagName("div")[0];null!=W&&(W.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");W=ta(mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(d.style,"startFill","1"),Q,"start");da=ta(mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(d.style,
-"endFill","1"),aa,"end");null!=W&&null!=da&&("arrow"==d.style.shape?(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-endblocktrans"):"link"==d.style.shape&&(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(S,"arrow"==d.style.shape?30:100);"connector"!=d.style.shape&&"flexArrow"!=d.style.shape&&"filledEdge"!=d.style.shape?(mxUtils.setOpacity(Q,30),mxUtils.setOpacity(aa,30)):(mxUtils.setOpacity(Q,100),mxUtils.setOpacity(aa,
-100));if(sa||document.activeElement!=K)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),K.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ra.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=fa)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),fa.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W=
-parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ja.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=V)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_PERIMETER_SPACING,0)),V.value=isNaN(W)?"":W+" pt"});var T=this.installInputHandler(K,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var J=this.installInputHandler(ra,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ba=this.installInputHandler(fa,mxConstants.STYLE_ENDSIZE,
+"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(H,8);Q.nextSibling.style.position="relative";Q.nextSibling.style.top="-2px";Q=this.addArrow(T,
+10);Q.nextSibling.style.position="relative";Q.nextSibling.style.top="-3px";T.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(R,null,!0);this.addArrow(ba,null,!0);Q=this.addArrow(m,9);Q.className="geIcon";Q.style.width="auto";var S=this.addArrow(r,9);S.className="geIcon";S.style.width="22px";var P=document.createElement("div");P.style.width="84px";P.style.height="1px";P.style.borderBottom="1px solid "+this.defaultStrokeColor;P.style.marginBottom="7px";Q.appendChild(P);var X=document.createElement("div");
+X.style.width="23px";X.style.height="1px";X.style.borderBottom="1px solid "+this.defaultStrokeColor;X.style.marginBottom="7px";S.appendChild(X);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";H.style.marginLeft="10px";H.style.height="15px";T.style.marginLeft="10px";T.style.height="17px";R.style.marginLeft="3px";R.style.height="17px";ba.style.marginLeft="3px";ba.style.height="17px";a.appendChild(h);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 ja=this.addUnitInput(m,"pt",98,52,function(){ia.apply(this,arguments)}),fa=this.addUnitInput(m,"pt",30,52,function(){aa.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 ra=this.addUnitInput(m,"pt",98,52,function(){J.apply(this,arguments)}),K=this.addUnitInput(m,"pt",30,52,function(){U.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);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";
+h.style.marginTop="6px";h.style.borderWidth="0px";h.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"));h.appendChild(r);var V=this.addUnitInput(h,"pt",30,52,function(){na.apply(this,arguments)});e.edges.length==e.cells.length?(a.appendChild(u),a.appendChild(m)):e.vertices.length==e.cells.length&&
+a.appendChild(h);var O=mxUtils.bind(this,function(W,da,sa){function ta(Ja,Ia,ua,Ba){ua=ua.getElementsByTagName("div")[0];null!=ua&&d.updateCssForMarker(ua,Ba,e.style.shape,Ja,Ia);return ua}e=d.getSelectionState();if(sa||document.activeElement!=C)W=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),C.value=isNaN(W)?"":W+" pt";if(sa||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)?P.style.borderBottom="1px dashed "+this.defaultStrokeColor:P.style.borderBottom="1px dotted "+this.defaultStrokeColor:P.style.borderBottom="1px solid "+this.defaultStrokeColor;
+X.style.borderBottom=P.style.borderBottom;W=T.getElementsByTagName("div")[0];null!=W&&(da=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(da=null),"orthogonalEdgeStyle"==da&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?W.className="geSprite geSprite-curved":W.className="straight"==da||"none"==da||null==da?"geSprite geSprite-straight":"entityRelationEdgeStyle"==da?"geSprite geSprite-entity":"elbowEdgeStyle"==
+da?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==da?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=H.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?(F.style.display="",B.style.display="none"):(F.style.display="none",B.style.display="");Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps&&(a.style.borderBottomStyle="none");W=ta(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),R,"start");da=ta(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
+"endFill","1"),ba,"end");null!=W&&null!=da&&("arrow"==e.style.shape?(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(T,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(R,30),mxUtils.setOpacity(ba,30)):(mxUtils.setOpacity(R,100),mxUtils.setOpacity(ba,
+100));if(sa||document.activeElement!=K)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),K.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ra.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=fa)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),fa.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W=
+parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ja.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=V)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),V.value=isNaN(W)?"":W+" pt"});var U=this.installInputHandler(K,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var J=this.installInputHandler(ra,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var aa=this.installInputHandler(fa,mxConstants.STYLE_ENDSIZE,
mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var ia=this.installInputHandler(ja,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var na=this.installInputHandler(V,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(C,O);this.addKeyHandler(K,O);this.addKeyHandler(ra,O);this.addKeyHandler(fa,O);this.addKeyHandler(ja,O);this.addKeyHandler(V,O);g.getModel().addListener(mxEvent.CHANGE,O);this.listeners.push({destroy:function(){g.getModel().removeListener(O)}});O();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,D){e=b.getSelectionState();d.value=mxUtils.getValue(e.style,
-"jumpStyle","none");if(D||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(D,F,I){D=this.createCellOption(D,F,I);D.style.width="100%";m.appendChild(D);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(D,F,I){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()};
+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 h=0;h<g.length;h++){var n=document.createElement("option");n.setAttribute("value",g[h]);mxUtils.write(n,mxResources.get(g[h]));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,D){d=b.getSelectionState();e.value=mxUtils.getValue(d.style,
+"jumpStyle","none");if(D||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"),h=document.createElement("tr");h.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";h.appendChild(n);h.appendChild(u);e.appendChild(h);g.appendChild(e);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(D,F,H){D=this.createCellOption(D,F,H);D.style.width="100%";m.appendChild(D);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(D,F,H){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()};
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,e=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var d=document.createElement("div");d.style.marginRight="16px";a.style.paddingTop="8px";var k=document.createElement("table");k.style.width="210px";k.style.fontWeight="bold";var n=document.createElement("tbody"),u=document.createElement("tr");u.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.setAttribute("valign",
-"middle");var r=m.cloneNode(!0);r.style.paddingLeft="8px";d.style.paddingBottom="12px";u.appendChild(m);m.appendChild(this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(P){f.updateCellStyles({sketch:P?"1":null},f.getVerticesAndEdges());b.setSketchMode(!Editor.sketchMode)},null,function(P){P.style.width="auto"}));u.appendChild(r);n.appendChild(u);k.appendChild(n);r.appendChild(this.createOption(mxResources.get("rounded"),mxUtils.bind(this,function(){return this.format.rounded}),
+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=document.createElement("div");e.style.marginRight="16px";a.style.paddingTop="8px";var h=document.createElement("table");h.style.width="210px";h.style.fontWeight="bold";var n=document.createElement("tbody"),u=document.createElement("tr");u.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.setAttribute("valign",
+"middle");var r=m.cloneNode(!0);r.style.paddingLeft="8px";e.style.paddingBottom="12px";u.appendChild(m);m.appendChild(this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(P){f.updateCellStyles({sketch:P?"1":null},f.getVerticesAndEdges());b.setSketchMode(!Editor.sketchMode)},null,function(P){P.style.width="auto"}));u.appendChild(r);n.appendChild(u);h.appendChild(n);r.appendChild(this.createOption(mxResources.get("rounded"),mxUtils.bind(this,function(){return this.format.rounded}),
mxUtils.bind(this,function(P){this.format.rounded=P;f.updateCellStyles({rounded:P?"1":"0"},f.getVerticesAndEdges());P?(f.currentEdgeStyle.rounded="1",f.currentVertexStyle.rounded="1"):(delete f.currentEdgeStyle.rounded,delete f.currentVertexStyle.rounded)}),null,function(P){P.style.width="auto"}));m=m.cloneNode(!1);r=r.cloneNode(!1);u=u.cloneNode(!1);u.appendChild(m);u.appendChild(r);n.appendChild(u);m.appendChild(this.createOption(mxResources.get("curved"),mxUtils.bind(this,function(){return this.format.curved}),
-mxUtils.bind(this,function(P){this.format.curved=P;f.updateCellStyles({curved:P?"1":null},f.getVerticesAndEdges(!1,!0));P?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved}),null,function(P){P.style.width="auto"}));d.appendChild(k);a.appendChild(d);var x=["fillColor","strokeColor","fontColor","gradientColor"],B=mxUtils.bind(this,function(P,X){var ja=f.getVerticesAndEdges();e.beginUpdate();try{for(var fa=0;fa<ja.length;fa++){var ra=f.getCellStyle(ja[fa]);null!=ra.labelBackgroundColor&&
-f.updateCellStyles({labelBackgroundColor:null!=X?X.background:null},[ja[fa]]);for(var K=e.isEdge(ja[fa]),V=e.getStyle(ja[fa]),O=K?f.currentEdgeStyle:f.currentVertexStyle,T=0;T<P.length;T++)if(null!=ra[P[T]]&&ra[P[T]]!=mxConstants.NONE||P[T]!=mxConstants.STYLE_FILLCOLOR&&P[T]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,P[T],O[P[T]]);e.setStyle(ja[fa],V)}}finally{e.endUpdate()}}),D=mxUtils.bind(this,function(P,X,ja){if(null!=P)for(var fa=0;fa<X.length;fa++)if(null!=P[X[fa]]&&P[X[fa]]!=mxConstants.NONE||
+mxUtils.bind(this,function(P){this.format.curved=P;f.updateCellStyles({curved:P?"1":null},f.getVerticesAndEdges(!1,!0));P?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved}),null,function(P){P.style.width="auto"}));e.appendChild(h);a.appendChild(e);var x=["fillColor","strokeColor","fontColor","gradientColor"],B=mxUtils.bind(this,function(P,X){var ja=f.getVerticesAndEdges();d.beginUpdate();try{for(var fa=0;fa<ja.length;fa++){var ra=f.getCellStyle(ja[fa]);null!=ra.labelBackgroundColor&&
+f.updateCellStyles({labelBackgroundColor:null!=X?X.background:null},[ja[fa]]);for(var K=d.isEdge(ja[fa]),V=d.getStyle(ja[fa]),O=K?f.currentEdgeStyle:f.currentVertexStyle,U=0;U<P.length;U++)if(null!=ra[P[U]]&&ra[P[U]]!=mxConstants.NONE||P[U]!=mxConstants.STYLE_FILLCOLOR&&P[U]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,P[U],O[P[U]]);d.setStyle(ja[fa],V)}}finally{d.endUpdate()}}),D=mxUtils.bind(this,function(P,X,ja){if(null!=P)for(var fa=0;fa<X.length;fa++)if(null!=P[X[fa]]&&P[X[fa]]!=mxConstants.NONE||
X[fa]!=mxConstants.STYLE_FILLCOLOR&&X[fa]!=mxConstants.STYLE_STROKECOLOR)P[X[fa]]=ja[X[fa]]}),F=mxUtils.bind(this,function(P,X,ja,fa,ra){if(null!=P){null!=ja&&null!=X.labelBackgroundColor&&(fa=null!=fa?fa.background:null,ra=null!=ra?ra:f,null==fa&&(fa=ra.background),null==fa&&(fa=ra.defaultPageBackgroundColor),X.labelBackgroundColor=fa);for(var K in P)if(null==ja||null!=X[K]&&X[K]!=mxConstants.NONE||K!=mxConstants.STYLE_FILLCOLOR&&K!=mxConstants.STYLE_STROKECOLOR)X[K]=P[K]}});m=mxUtils.button(mxResources.get("reset"),
-mxUtils.bind(this,function(P){P=f.getVerticesAndEdges(!0,!0);this.format.rounded=!1;this.format.curved=!1;if(0<P.length){e.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},P),f.updateCellStyles({curved:null,rounded:"0"},f.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.clearDefaultStyle();b.setSketchMode(!1)}));m.setAttribute("title",mxResources.get("reset"));m.style.textOverflow="ellipsis";m.style.maxWidth="90px";r.appendChild(m);var I=mxUtils.bind(this,function(P,X,ja,fa,ra){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%";ra.appendChild(K);var V=new Graph(K,null,null,f.getStylesheet());V.resetViewOnRootChange=!1;V.foldingEnabled=!1;V.gridEnabled=!1;V.autoScroll=!1;V.setTooltips(!1);V.setConnectable(!1);V.setPanning(!1);V.setEnabled(!1);V.getCellStyle=function(J,ba){ba=null!=ba?ba:!0;var ia=mxUtils.clone(f.getCellStyle.apply(this,arguments)),
-na=f.stylesheet.getDefaultVertexStyle(),W=X;e.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ia,x,na);F(P,ia,J,fa,V);F(W,ia,J,fa,V);ba&&(ia=f.postProcessCellStyle(J,ia));return ia};V.model.beginUpdate();try{var O=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),T=V.insertEdge(V.getDefaultParent(),null,"Connector",O,O,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");T.geometry.points=[new mxPoint(32,70)];T.geometry.offset=
+mxUtils.bind(this,function(P){P=f.getVerticesAndEdges(!0,!0);this.format.rounded=!1;this.format.curved=!1;if(0<P.length){d.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},P),f.updateCellStyles({curved:null,rounded:"0"},f.getVerticesAndEdges(!1,!0))}finally{d.endUpdate()}}b.clearDefaultStyle();b.setSketchMode(!1)}));m.setAttribute("title",mxResources.get("reset"));m.style.textOverflow="ellipsis";m.style.maxWidth="90px";r.appendChild(m);var H=mxUtils.bind(this,function(P,X,ja,fa,ra){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%";ra.appendChild(K);var V=new Graph(K,null,null,f.getStylesheet());V.resetViewOnRootChange=!1;V.foldingEnabled=!1;V.gridEnabled=!1;V.autoScroll=!1;V.setTooltips(!1);V.setConnectable(!1);V.setPanning(!1);V.setEnabled(!1);V.getCellStyle=function(J,aa){aa=null!=aa?aa:!0;var ia=mxUtils.clone(f.getCellStyle.apply(this,arguments)),
+na=f.stylesheet.getDefaultVertexStyle(),W=X;d.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ia,x,na);F(P,ia,J,fa,V);F(W,ia,J,fa,V);aa&&(ia=f.postProcessCellStyle(J,ia));return ia};V.model.beginUpdate();try{var O=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),U=V.insertEdge(V.getDefaultParent(),null,"Connector",O,O,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");U.geometry.points=[new mxPoint(32,70)];U.geometry.offset=
new mxPoint(0,8)}finally{V.model.endUpdate()}}),C=document.createElement("div");C.style.position="relative";a.appendChild(C);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var N=mxUtils.bind(this,function(P,X,ja,fa,ra){var K=this.format.cachedStyleEntries[ra];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!=fa&&null!=fa.background&&(K.style.backgroundColor=fa.background),I(P,X,ja,fa,K),mxEvent.addGestureListeners(K,mxUtils.bind(this,function(V){K.style.opacity=.5}),null,mxUtils.bind(this,function(V){K.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);F(P,f.currentVertexStyle);F(P,f.currentEdgeStyle);F(X,f.currentVertexStyle);F(ja,f.currentEdgeStyle);e.beginUpdate();try{var O=
-x.slice(),T;for(T in P)O.push(T);B(O,fa);var J=new ChangePageSetup(b,null!=fa?fa.background:null);J.ignoreImage=!0;e.execute(J);e.execute(new ChangeGridColor(b,null!=fa&&null!=fa.gridColor?fa.gridColor:g))}finally{e.endUpdate()}})),mxEvent.addListener(K,"mouseenter",mxUtils.bind(this,function(V){var O=f.getCellStyle;V=f.background;var T=f.view.gridColor;f.background=null!=fa?fa.background:null;f.view.gridColor=null!=fa&&null!=fa.gridColor?fa.gridColor:g;f.getCellStyle=function(J,ba){ba=null!=ba?ba:
-!0;var ia=mxUtils.clone(O.apply(this,arguments)),na=f.stylesheet.getDefaultVertexStyle(),W=X;e.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ia,x,na);F(P,ia,J,fa);F(W,ia,J,fa);ba&&(ia=this.postProcessCellStyle(J,ia));return ia};f.refresh();f.getCellStyle=O;f.background=V;f.view.gridColor=T})),mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[ra]=K));C.appendChild(K)}),R=Math.ceil(Editor.styles.length/
-10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var S=[],Q=mxUtils.bind(this,function(){0<S.length&&(S[this.format.currentStylePage].style.background="#84d7ff");for(var P=10*this.format.currentStylePage;P<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);P++){var X=Editor.styles[P];N(X.commonStyle,X.vertexStyle,X.edgeStyle,X.graph,P)}}),aa=mxUtils.bind(this,function(P){0<=P&&P<R&&(S[this.format.currentStylePage].style.background=
-"transparent",C.innerText="",this.format.currentStylePage=P,Q())});if(1<R){d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.position="relative";d.style.textAlign="center";d.style.paddingTop="4px";d.style.width="210px";a.style.paddingBottom="8px";for(r=0;r<R;r++){var U=document.createElement("div");U.style.display="inline-block";U.style.width="6px";U.style.height="6px";U.style.marginLeft="4px";U.style.marginRight="3px";U.style.borderRadius="3px";U.style.cursor="pointer";U.style.background=
-"transparent";U.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(P,X){mxEvent.addListener(U,"click",mxUtils.bind(this,function(){aa(P)}))})(r,U);d.appendChild(U);S.push(U)}a.appendChild(d);Q();15>R&&(k=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},m=document.createElement("div"),m.style.className="geAdaptiveAsset",m.style.position="absolute",m.style.left="0px",m.style.top="0px",m.style.bottom=
-"0px",m.style.width="24px",m.style.height="24px",m.style.margin="0px",m.style.cursor="pointer",m.style.opacity="0.5",m.style.backgroundRepeat="no-repeat",m.style.backgroundPosition="center center",m.style.backgroundSize="24px 24px",m.style.backgroundImage="url("+Editor.previousImage+")",r=m.cloneNode(!1),r.style.backgroundImage="url("+Editor.nextImage+")",r.style.left="",r.style.right="2px",d.appendChild(m),d.appendChild(r),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage-
-1,R))})),mxEvent.addListener(r,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage+1,R))})),k(m),k(r))}else Q();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);
+"8px",K.style.margin="2px",K.style.overflow="hidden",null!=fa&&null!=fa.background&&(K.style.backgroundColor=fa.background),H(P,X,ja,fa,K),mxEvent.addGestureListeners(K,mxUtils.bind(this,function(V){K.style.opacity=.5}),null,mxUtils.bind(this,function(V){K.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);F(P,f.currentVertexStyle);F(P,f.currentEdgeStyle);F(X,f.currentVertexStyle);F(ja,f.currentEdgeStyle);d.beginUpdate();try{var O=
+x.slice(),U;for(U in P)O.push(U);B(O,fa);var J=new ChangePageSetup(b,null!=fa?fa.background:null);J.ignoreImage=!0;d.execute(J);d.execute(new ChangeGridColor(b,null!=fa&&null!=fa.gridColor?fa.gridColor:g))}finally{d.endUpdate()}})),mxEvent.addListener(K,"mouseenter",mxUtils.bind(this,function(V){var O=f.getCellStyle;V=f.background;var U=f.view.gridColor;f.background=null!=fa?fa.background:null;f.view.gridColor=null!=fa&&null!=fa.gridColor?fa.gridColor:g;f.getCellStyle=function(J,aa){aa=null!=aa?aa:
+!0;var ia=mxUtils.clone(O.apply(this,arguments)),na=f.stylesheet.getDefaultVertexStyle(),W=X;d.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ia,x,na);F(P,ia,J,fa);F(W,ia,J,fa);aa&&(ia=this.postProcessCellStyle(J,ia));return ia};f.refresh();f.getCellStyle=O;f.background=V;f.view.gridColor=U})),mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[ra]=K));C.appendChild(K)}),Q=Math.ceil(Editor.styles.length/
+10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var T=[],R=mxUtils.bind(this,function(){0<T.length&&(T[this.format.currentStylePage].style.background="#84d7ff");for(var P=10*this.format.currentStylePage;P<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);P++){var X=Editor.styles[P];N(X.commonStyle,X.vertexStyle,X.edgeStyle,X.graph,P)}}),ba=mxUtils.bind(this,function(P){0<=P&&P<Q&&(T[this.format.currentStylePage].style.background=
+"transparent",C.innerText="",this.format.currentStylePage=P,R())});if(1<Q){e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.position="relative";e.style.textAlign="center";e.style.paddingTop="4px";e.style.width="210px";a.style.paddingBottom="8px";for(r=0;r<Q;r++){var S=document.createElement("div");S.style.display="inline-block";S.style.width="6px";S.style.height="6px";S.style.marginLeft="4px";S.style.marginRight="3px";S.style.borderRadius="3px";S.style.cursor="pointer";S.style.background=
+"transparent";S.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(P,X){mxEvent.addListener(S,"click",mxUtils.bind(this,function(){ba(P)}))})(r,S);e.appendChild(S);T.push(S)}a.appendChild(e);R();15>Q&&(h=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},m=document.createElement("div"),m.style.className="geAdaptiveAsset",m.style.position="absolute",m.style.left="0px",m.style.top="0px",m.style.bottom=
+"0px",m.style.width="24px",m.style.height="24px",m.style.margin="0px",m.style.cursor="pointer",m.style.opacity="0.5",m.style.backgroundRepeat="no-repeat",m.style.backgroundPosition="center center",m.style.backgroundSize="24px 24px",m.style.backgroundImage="url("+Editor.previousImage+")",r=m.cloneNode(!1),r.style.backgroundImage="url("+Editor.nextImage+")",r.style.left="",r.style.right="2px",e.appendChild(m),e.appendChild(r),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentStylePage-
+1,Q))})),mxEvent.addListener(r,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentStylePage+1,Q))})),h(m),h(r))}else R();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(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.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 h=new ChangePageSetup(b,e);h.ignoreImage=null!=e&&e!=mxConstants.NONE;f.model.execute(h)},"#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 h=this.createStepper(e,b,this.getUnitStep(),null,null,null,this.isFloatUnit());e.style.display=g.isGridEnabled()?"":"none";h.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";h.style.marginTop="-17px";h.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";h.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(h);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 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 D(){mxActor.call(this)}function F(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function C(){mxActor.call(this)}function N(){mxActor.call(this)}function R(){mxActor.call(this)}function S(){mxActor.call(this)}function Q(){mxActor.call(this)}function aa(){mxActor.call(this)}function U(){mxActor.call(this)}function P(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,P.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,P.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,P.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,P.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,P.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,P.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function ja(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ra(){mxActor.call(this)}function K(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function T(){mxCylinder.call(this)}function J(){mxShape.call(this)}function ba(){mxShape.call(this)}function ia(){mxEllipse.call(this)}function na(){mxShape.call(this)}
+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,k,q){mxShape.call(this);this.line=c;this.stroke=k;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 h(){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,k,q,l){mxShape.call(this);this.bounds=c;this.fill=k;this.stroke=q;this.strokewidth=null!=l?l:1}function D(){mxActor.call(this)}function F(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function C(){mxActor.call(this)}function N(){mxActor.call(this)}function Q(){mxActor.call(this)}function T(){mxActor.call(this)}function R(){mxActor.call(this)}function ba(){mxActor.call(this)}function S(){mxActor.call(this)}function P(c,k){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.defaultVariation=k;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,P.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,P.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,P.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,P.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,P.prototype.curveTo);
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,P.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function ja(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ra(){mxActor.call(this)}function K(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function U(){mxCylinder.call(this)}function J(){mxShape.call(this)}function aa(){mxShape.call(this)}function ia(){mxEllipse.call(this)}function na(){mxShape.call(this)}
function W(){mxShape.call(this)}function da(){mxRectangleShape.call(this)}function sa(){mxShape.call(this)}function ta(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Ia(){mxShape.call(this)}function ua(){mxShape.call(this)}function Ba(){mxCylinder.call(this)}function qa(){mxCylinder.call(this)}function Ea(){mxRectangleShape.call(this)}function Ua(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ta(){mxArrowConnector.call(this);this.spacing=0}function ab(){mxArrowConnector.call(this);
this.spacing=0}function Ya(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Za(){mxActor.call(this)}function kb(){mxActor.call(this)}function cb(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function G(){mxActor.call(this)}function L(){mxActor.call(this)}function Y(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}
-function ka(){mxRhombus.call(this)}function wa(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Ma(){mxActor.call(this)}function Ha(){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,H,y,Z){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);Z?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(),H=this.getTitleSize();0==H||this.outline?Da.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-h,-q));v||this.outline||!(w&&H<p||!w&&H<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 H=v;v=w;w=H}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(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)))),H=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!=H&&(c.setFillAlpha(Math.abs(H)),c.setFillColor(0>H?"#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())};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),
-c.end(),c.stroke())};mxCellRenderer.registerShape("note",u);mxUtils.extend(m,u);mxCellRenderer.registerShape("note2",m);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,0)}return null};mxUtils.extend(r,mxShape);r.prototype.isoAngle=15;r.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
-"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(D,mxActor);D.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",D);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),H=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));H||(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",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(I,mxCylinder);I.prototype.arcSize=.1;I.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())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(C,mxActor);C.prototype.size=30;C.prototype.isRoundable=function(){return!0};C.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",C);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(R,mxActor);R.prototype.size=.3;R.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};R.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",R);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};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};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(S,mxActor);S.prototype.size=.2;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};S.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",S);mxUtils.extend(Q,mxActor);Q.prototype.size=.2;Q.prototype.fixedSize=20;Q.prototype.isRoundable=function(){return!0};Q.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",Q);mxUtils.extend(aa,mxActor);aa.prototype.size=.5;aa.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",aa);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);P.prototype.moveTo=function(c,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;this.firstX=c;this.firstY=h};P.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)};
-P.prototype.quadTo=function(c,h,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};P.prototype.curveTo=function(c,h,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};P.prototype.arcTo=function(c,h,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};P.prototype.lineTo=function(c,h){if(null!=this.lastX&&null!=this.lastY){var q=function(M){return"number"===typeof M?M?0>M?-1:1:M===M?0:NaN:NaN},l=Math.abs(c-
-this.lastX),p=Math.abs(h-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;return}var w=Math.round(v/10),H=this.defaultVariation;5>w&&(w=5,H/=3);var y=q(c-this.lastX)*l/w;q=q(h-this.lastY)*p/w;l/=v;p/=v;for(v=0;v<w;v++){var Z=(Math.random()-.5)*H;this.originalLineTo.call(this.canvas,y*v+this.lastX-Z*p,q*v+this.lastY-Z*l)}this.originalLineTo.call(this.canvas,c,h)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=
-h};P.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var bb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){bb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
+function ka(){mxRhombus.call(this)}function wa(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Ma(){mxActor.call(this)}function Ha(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ga(c,k,q,l){mxShape.call(this);this.bounds=c;this.fill=k;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,k,q,l,p,v,w,I,y,Z){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);Z?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var k=0;k<this.line.length;k++){var q=this.line[k];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,
+k,q,l,p){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,k,q,l){if(null!=k){var p=null;c.begin();for(var v=0;v<k.length;v++){var w=k[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 k=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var q=null,l=0;l<this.line.length&&!k;l++){var p=this.line[l];null!=p&&null!=q&&(k=mxUtils.rectangleIntersectsSegment(c,
+q,p));q=p}return k};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,k,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?Da.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-k,-q));v||this.outline||!(w&&I<p||!w&&I<l)||this.paintForeground(c,k,q,l,p)};b.prototype.paintForeground=function(c,k,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,k+l/2,q+p/2);s=this.scale;k=this.bounds.x/s;q=this.bounds.y/s;l=this.bounds.width/s;p=this.bounds.height/
+s;this.paintTableForeground(c,k,q,l,p)}};b.prototype.paintTableForeground=function(c,k,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],k,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,k,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(k,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,k,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(k+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(k,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(c,k,q,l,p){k=Math.min(l,p/Na);c.translate((l-k)/2,(p-k)/2+k/4);c.moveTo(0,
+.25*k);c.lineTo(.5*k,k*Sa);c.lineTo(k,.25*k);c.lineTo(.5*k,(.5-Sa)*k);c.lineTo(0,.25*k);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(h,mxCylinder);h.prototype.size=20;h.prototype.redrawPath=function(c,k,q,l,p,v){k=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*k),c.lineTo(.5*k,(.5-Sa)*k),c.lineTo(k,.25*k),c.moveTo(.5*k,(.5-Sa)*k),c.lineTo(.5*k,(1-Sa)*k)):(c.translate((l-k)/2,(p-k)/2),c.moveTo(0,.25*k),c.lineTo(.5*k,k*Sa),c.lineTo(k,.25*k),c.lineTo(k,.75*k),c.lineTo(.5*
+k,(1-Sa)*k),c.lineTo(0,.75*k),c.close());c.end()};mxCellRenderer.registerShape("isoCube",h);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(c,k,q,l,p,v){k=Math.min(p/2,Math.round(p/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)c.moveTo(0,k),c.curveTo(0,2*k,l,2*k,l,k),v||(c.stroke(),c.begin()),c.translate(0,k/2),c.moveTo(0,k),c.curveTo(0,2*k,l,2*k,l,k),v||(c.stroke(),c.begin()),c.translate(0,k/2),c.moveTo(0,k),c.curveTo(0,2*k,l,2*k,l,k),v||(c.stroke(),c.begin()),c.translate(0,
+-k);v||(c.moveTo(0,k),c.curveTo(0,-k/3,l,-k/3,l,k),c.lineTo(l,p-k),c.curveTo(l,p+k/3,0,p+k/3,0,p-k),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,k,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(k,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),
+c.end(),c.stroke())};mxCellRenderer.registerShape("note",u);mxUtils.extend(m,u);mxCellRenderer.registerShape("note2",m);m.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,k*this.scale),0,0)}return null};mxUtils.extend(r,mxShape);r.prototype.isoAngle=15;r.prototype.paintVertexShape=function(c,k,q,l,p){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
+"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(l*Math.tan(v),.5*p);c.translate(k,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,k,q,l,p){var v=Math.max(0,Math.min(.5*
+p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(k,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,k,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(k,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(D,mxActor);D.prototype.redrawPath=function(c,k,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",D);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,k,q,l,p){c.translate(k,q);k=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));k=Math.max(k,y);k=Math.min(l-y,k);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),q),c.lineTo(Math.max(y,0),0),c.lineTo(k,0),c.lineTo(k,q)):(c.moveTo(l-k,q),c.lineTo(l-k,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",F);F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=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;k=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-k));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-k)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-
+k))}return new mxRectangle(0,Math.min(c.height,k),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,k,q,l,p){c.translate(k,q);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q=mxUtils.getValue(this.style,"umlStateConnection",null);w||(k*=Math.min(l,p));k=Math.min(k,.5*l,.5*p);v||(k=0);v=0;null!=q&&(v=10);c.begin();c.moveTo(v,
+k);c.arcTo(k,k,0,0,1,v+k,0);c.lineTo(l-k,0);c.arcTo(k,k,0,0,1,l,k);c.lineTo(l,p-k);c.arcTo(k,k,0,0,1,l-k,p);c.lineTo(v+k,p);c.arcTo(k,k,0,0,1,v,p-k);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())};H.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",H);mxUtils.extend(C,mxActor);C.prototype.size=30;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=
+function(c,k,q,l,p){k=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(k,0),new mxPoint(l,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,k)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("card",C);mxUtils.extend(N,mxActor);N.prototype.size=.4;N.prototype.redrawPath=function(c,k,q,l,p){k=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,k/2);c.quadTo(l/4,1.4*k,l/2,k/2);c.quadTo(3*l/4,k*(1-1.4),l,k/2);c.lineTo(l,p-k/2);c.quadTo(3*l/4,p-1.4*k,l/2,p-k/2);c.quadTo(l/4,p-k*(1-1.4),0,p-k/2);c.lineTo(0,k/2);c.close();c.end()};N.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=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 k*=
+l,new mxRectangle(c.x,c.y+k,q,l-2*k);k*=q;return new mxRectangle(c.x+k,c.y,q-2*k,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,k,q,l,p){k=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-k/2);c.quadTo(3*l/4,p-1.4*k,l/2,p-k/2);c.quadTo(l/4,p-k*(1-1.4),0,p-k/2);c.lineTo(0,k/2);c.close();c.end()};mxCellRenderer.registerShape("document",Q);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,k,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 k=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*k),0,0)}return null};B.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(k/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*k*this.scale),0,Math.max(0,.3*k*this.scale))}return null};F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=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;k=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-k));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-k)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-k))}return new mxRectangle(0,Math.min(c.height,k),0,0)}return null};H.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 k=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,k*this.scale),0,Math.max(0,k*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,k,q,l,p){k="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(k,0),new mxPoint(l,0),new mxPoint(l-k,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("parallelogram",T);mxUtils.extend(R,mxActor);R.prototype.size=.2;R.prototype.fixedSize=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(c,k,q,l,p){k="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(k,0),new mxPoint(l-k,0),new mxPoint(l,p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("trapezoid",R);mxUtils.extend(ba,mxActor);ba.prototype.size=.5;ba.prototype.redrawPath=function(c,k,q,l,p){c.setFillColor(null);
+k=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(k,0),new mxPoint(k,p/2),new mxPoint(0,p/2),new mxPoint(k,p/2),new mxPoint(k,p),new mxPoint(l,p)],this.isRounded,q,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",ba);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(c,k,q,l,p){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+k=l/5;c.rect(0,0,k,p);c.fillAndStroke();c.rect(2*k,0,k,p);c.fillAndStroke();c.rect(4*k,0,k,p);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",S);P.prototype.moveTo=function(c,k){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;this.firstX=c;this.firstY=k};P.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)};
+P.prototype.quadTo=function(c,k,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};P.prototype.curveTo=function(c,k,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};P.prototype.arcTo=function(c,k,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};P.prototype.lineTo=function(c,k){if(null!=this.lastX&&null!=this.lastY){var q=function(M){return"number"===typeof M?M?0>M?-1:1:M===M?0:NaN:NaN},l=Math.abs(c-
+this.lastX),p=Math.abs(k-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;return}var w=Math.round(v/10),I=this.defaultVariation;5>w&&(w=5,I/=3);var y=q(c-this.lastX)*l/w;q=q(k-this.lastY)*p/w;l/=v;p/=v;for(v=0;v<w;v++){var Z=(Math.random()-.5)*I;this.originalLineTo.call(this.canvas,y*v+this.lastX-Z*p,q*v+this.lastY-Z*l)}this.originalLineTo.call(this.canvas,c,k)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=
+k};P.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var bb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){bb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
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 P(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 vb=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"))&&vb.apply(this,arguments)};var wb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,h,q,l,p){if(null==c.handJiggle||c.handJiggle.constructor!=P)wb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+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"))&&vb.apply(this,arguments)};var wb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,k,q,l,p){if(null==c.handJiggle||c.handJiggle.constructor!=P)wb.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(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.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};
-X.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",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(ja,mxRectangleShape);ja.prototype.paintBackground=function(c,h,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};ja.prototype.paintForeground=function(c,h,q,l,p){};mxCellRenderer.registerShape("transparent",ja);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};fa.prototype.isRoundable=function(){return!0};fa.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)))),H=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+H),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",fa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.fixedSize=20;ra.prototype.isRoundable=function(){return!0};ra.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",
-ra);mxUtils.extend(K,mxHexagon);K.prototype.size=.25;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.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",K);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.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",
-V);var $a=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){$a.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),$a.apply(this,[c,h,q,l,p]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.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};O.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 H=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Z=this.style["symbol"+v+"Width"],M=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ca,
-Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Qa+=Ka);Ka=h;var la=q;Ka=H==mxConstants.ALIGN_CENTER?Ka+(l-Z)/2:H==mxConstants.ALIGN_RIGHT?Ka+(l-Z-Ca):Ka+Ca;la=y==mxConstants.ALIGN_MIDDLE?la+(p-M)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-M-Qa):la+Qa;c.save();H=new w;H.style=this.style;w.prototype.paintVertexShape.call(H,c,Ka,la,Z,M);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
-O);mxUtils.extend(T,mxCylinder);T.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",T);mxUtils.extend(J,mxShape);J.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",J);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(ia,mxEllipse);ia.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",ia);mxUtils.extend(na,mxShape);na.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",na);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(da,mxRectangleShape);da.prototype.size=
-40;da.prototype.isHtmlAllowed=function(){return!1};da.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)};da.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!=da&&(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())};da.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",da);mxUtils.extend(sa,mxShape);sa.prototype.width=60;sa.prototype.height=30;sa.prototype.corner=10;sa.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))};sa.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)))),H=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,H-1.5*v));c.lineTo(h+Math.max(0,w-v),q+H);c.lineTo(h,q+H);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+H);c.stroke()};mxCellRenderer.registerShape("umlFrame",sa);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=da.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",fa.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?S.prototype.fixedSize:S.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=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(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+p),new mxPoint(w+
-y,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H)]):(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y,H),new mxPoint(w+y-p,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,H)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(H,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?Q.prototype.fixedSize:Q.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=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)),H=[new mxPoint(w+p,H),new mxPoint(w+y-p,H),new mxPoint(w+y,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,H)]):h==mxConstants.DIRECTION_WEST?
-(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H),new mxPoint(w+y-p,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,H)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+p),new mxPoint(w+y,H),new mxPoint(w+y,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z-p),new mxPoint(w,H+Z),new mxPoint(w,
-H)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(H,c,q)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?ra.prototype.fixedSize:ra.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=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_EAST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y-p,H),new mxPoint(w+y,c),new mxPoint(w+y-p,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,c),new mxPoint(w,H)]):h==mxConstants.DIRECTION_WEST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y,H),new mxPoint(w+y-p,c),new mxPoint(w+
-y,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,c),new mxPoint(w+p,H)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+p),new mxPoint(M,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z),new mxPoint(M,H+Z-p),new mxPoint(w,H+Z),new mxPoint(w,H+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(M,H+p),new mxPoint(w+y,H),new mxPoint(w+y,H+Z-p),new mxPoint(M,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H)]);M=new mxPoint(M,
-c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(H,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?K.prototype.fixedSize:K.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=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(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(M,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z-p),new mxPoint(M,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H+p),new mxPoint(M,H)]):(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y-p,H),new mxPoint(w+y,c),new mxPoint(w+y-p,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,c),new mxPoint(w+p,H)]);M=new mxPoint(M,
-c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(H,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(Ja,
-mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.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",Ja);mxUtils.extend(Ia,
-mxShape);Ia.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",Ia);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(Ba,mxCylinder);Ba.prototype.jettyWidth=20;Ba.prototype.jettyHeight=10;Ba.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 H=Math.min(h,p-h),y=Math.min(H+2*h,p-h);v?(c.moveTo(q,H),c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(q,H+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,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(q,H),c.close());c.end()};mxCellRenderer.registerShape("module",Ba);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=32;qa.prototype.jettyHeight=12;qa.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 H=.3*p-h/2,y=.7*p-h/2;v?(c.moveTo(q,H),c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(q,H+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,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(q,H),c.close());c.end()};mxCellRenderer.registerShape("component",qa);mxUtils.extend(Ea,mxRectangleShape);Ea.prototype.paintForeground=
-function(c,h,q,l,p){var v=l/2,w=p/2,H=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,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ea);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,
+v,p*v)),c.moveTo(k+v,q),c.lineTo(k+l-v,q),c.quadTo(k+l,q,k+l,q+v),c.lineTo(k+l,q+p-v),c.quadTo(k+l,q+p,k+l-v,q+p),c.lineTo(k+v,q+p),c.quadTo(k,q+p,k,q+p-v),c.lineTo(k,q+v),c.quadTo(k,q,k+v,q)):(c.moveTo(k,q),c.lineTo(k+l,q),c.lineTo(k+l,q+p),c.lineTo(k,q+p),c.lineTo(k,q)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.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 k=c.width,q=c.height;c=new mxRectangle(c.x,c.y,k,q);var l=k*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(k*p,q*p))}c.x+=Math.round(l);c.width-=Math.round(2*l);return c}return c};
+X.prototype.paintForeground=function(c,k,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(k+w,q);c.lineTo(k+w,q+p);c.moveTo(k+l-w,q);c.lineTo(k+l-w,q+p);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(ja,mxRectangleShape);ja.prototype.paintBackground=function(c,k,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(k,q,l,p);c.fill()};ja.prototype.paintForeground=function(c,k,q,l,p){};mxCellRenderer.registerShape("transparent",ja);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,k,q,l,p){k=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,k,!0,[4])};mxCellRenderer.registerShape("callout",fa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.fixedSize=20;ra.prototype.isRoundable=function(){return!0};ra.prototype.redrawPath=function(c,k,
+q,l,p){k="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-k,0),new mxPoint(l,p/2),new mxPoint(l-k,p),new mxPoint(0,p),new mxPoint(k,p/2)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("step",
+ra);mxUtils.extend(K,mxHexagon);K.prototype.size=.25;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,k,q,l,p){k="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(k,
+0),new mxPoint(l-k,0),new mxPoint(l,.5*p),new mxPoint(l-k,p),new mxPoint(k,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",K);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,k,q,l,p){var v=Math.min(l/5,p/5)+1;c.begin();c.moveTo(k+l/2,q+v);c.lineTo(k+l/2,q+p-v);c.moveTo(k+v,q+p/2);c.lineTo(k+l-v,q+p/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+V);var $a=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var k=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+k,c.y+k,c.width-2*k,c.height-2*k)}return c};mxRhombus.prototype.paintVertexShape=function(c,k,q,l,p){$a.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);k+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(c.setShadow(!1),$a.apply(this,[c,k,q,l,p]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var k=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+k,c.y+k,c.width-2*k,c.height-2*k)}return c};O.prototype.paintForeground=function(c,k,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);k+=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"],Z=this.style["symbol"+v+"Width"],M=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ca,
+Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Qa+=Ka);Ka=k;var la=q;Ka=I==mxConstants.ALIGN_CENTER?Ka+(l-Z)/2:I==mxConstants.ALIGN_RIGHT?Ka+(l-Z-Ca):Ka+Ca;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,Ka,la,Z,M);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
+O);mxUtils.extend(U,mxCylinder);U.prototype.redrawPath=function(c,k,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",U);mxUtils.extend(J,mxShape);J.prototype.paintBackground=function(c,k,q,l,p){c.translate(k,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",J);mxUtils.extend(aa,mxShape);aa.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};aa.prototype.paintBackground=function(c,k,q,l,p){c.translate(k,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",
+aa);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,k,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(k+l/8,q+p);c.lineTo(k+7*l/8,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ia);mxUtils.extend(na,mxShape);na.prototype.paintVertexShape=function(c,k,q,l,p){c.translate(k,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",na);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,k,q,l,p){c.translate(k,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,k,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(da,mxRectangleShape);da.prototype.size=
+40;da.prototype.isHtmlAllowed=function(){return!1};da.prototype.getLabelBounds=function(c){var k=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,k)};da.prototype.paintBackground=function(c,k,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,k,q,l,v):(w=this.state.view.graph.cellRenderer.getShape(w),null!=w&&w!=da&&(w=new w,w.apply(this.state),c.save(),w.paintVertexShape(c,k,q,l,v),c.restore()));v<p&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(k+l/2,q+v),c.lineTo(k+l/2,q+p),c.end(),c.stroke())};da.prototype.paintForeground=function(c,k,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,k,q,l,
+Math.min(p,v))};mxCellRenderer.registerShape("umlLifeline",da);mxUtils.extend(sa,mxShape);sa.prototype.width=60;sa.prototype.height=30;sa.prototype.corner=10;sa.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))};sa.prototype.paintBackground=function(c,k,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(k,q,l,p),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,k,q,l,p),c.setGradient(this.fill,this.gradient,k,q,l,p,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(k,q);c.lineTo(k+w,q);c.lineTo(k+w,q+Math.max(0,I-1.5*v));c.lineTo(k+Math.max(0,w-v),q+I);c.lineTo(k,q+I);c.close();c.fillAndStroke();c.begin();c.moveTo(k+w,q);c.lineTo(k+l,q);c.lineTo(k+l,q+p);c.lineTo(k,q+p);c.lineTo(k,q+I);c.stroke()};mxCellRenderer.registerShape("umlFrame",sa);mxPerimeter.CenterPerimeter=function(c,k,q,l){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,k,
+q,l){l=da.prototype.size;null!=k&&(l=mxUtils.getValue(k.style,"size",l)*k.view.scale);k=parseFloat(k.style[mxConstants.STYLE_STROKEWIDTH]||1)*k.view.scale/2-1;q.x<c.getCenterX()&&(k=-1*(k+1));return new mxPoint(c.getCenterX()+k,Math.min(c.y+c.height,Math.max(c.y+l,q.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,k,q,l){l=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,k,q,l){l=parseFloat(k.style[mxConstants.STYLE_STROKEWIDTH]||1)*k.view.scale/2-1;null!=k.style.backboneSize&&(l+=parseFloat(k.style.backboneSize)*k.view.scale/2-1);if("south"==k.style[mxConstants.STYLE_DIRECTION]||"north"==k.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,k,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(k.style,"size",fa.prototype.size))*k.view.scale))),k.style),k,q,l)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+k,q,l){var p="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=p?T.prototype.fixedSize:T.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));p&&(v*=k.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height;k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+
+y,I+Z),new mxPoint(w,I+Z-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+Z),new mxPoint(w,I+Z),new mxPoint(w+p,I)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,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,k,q,l){var p="0"!=mxUtils.getValue(k.style,
+"fixedSize","0"),v=p?R.prototype.fixedSize:R.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));p&&(v*=k.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height;k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==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+Z),new mxPoint(w,I+Z),new mxPoint(w+p,I)]):k==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+Z),new mxPoint(w+p,I+Z),new mxPoint(w,I)]):k==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I+p),new mxPoint(w+y,I),new mxPoint(w+y,I+Z),new mxPoint(w,I+Z-p),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Z-p),new mxPoint(w,I+Z),new mxPoint(w,
+I)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,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("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,k,q,l){var p="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=p?ra.prototype.fixedSize:ra.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));p&&(v*=k.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height,M=c.getCenterX();c=c.getCenterY();k=null!=
+k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_EAST?(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-p,I),new mxPoint(w+y,c),new mxPoint(w+y-p,I+Z),new mxPoint(w,I+Z),new mxPoint(w+p,c),new mxPoint(w,I)]):k==mxConstants.DIRECTION_WEST?(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,I),new mxPoint(w+y-p,c),new mxPoint(w+
+y,I+Z),new mxPoint(w+p,I+Z),new mxPoint(w,c),new mxPoint(w+p,I)]):k==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*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+Z),new mxPoint(M,I+Z-p),new mxPoint(w,I+Z),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*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+Z-p),new mxPoint(M,I+Z),new mxPoint(w,I+Z-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,k,q,l){var p="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=p?K.prototype.fixedSize:K.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));p&&(v*=k.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height,M=c.getCenterX();c=c.getCenterY();k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):
+mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(M,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Z-p),new mxPoint(M,I+Z),new mxPoint(w,I+Z-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+Z),new mxPoint(w+p,I+Z),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(ta,mxShape);ta.prototype.size=10;ta.prototype.paintBackground=function(c,k,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(k,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(Ja,
+mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(c,k,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(k,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",Ja);mxUtils.extend(Ia,
+mxShape);Ia.prototype.paintBackground=function(c,k,q,l,p){c.translate(k,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",Ia);mxUtils.extend(ua,mxShape);ua.prototype.inset=2;ua.prototype.paintBackground=function(c,k,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(k,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(Ba,mxCylinder);Ba.prototype.jettyWidth=20;Ba.prototype.jettyHeight=10;Ba.prototype.redrawPath=function(c,k,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=Math.min(k,p-k),y=Math.min(I+2*k,p-k);v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+k),c.lineTo(q,I+k),c.moveTo(q,
+y),c.lineTo(w,y),c.lineTo(w,y+k),c.lineTo(q,y+k)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+k),c.lineTo(0,y+k),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+k),c.lineTo(0,I+k),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ba);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=32;qa.prototype.jettyHeight=12;qa.prototype.redrawPath=function(c,k,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,
+"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=.3*p-k/2,y=.7*p-k/2;v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+k),c.lineTo(q,I+k),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+k),c.lineTo(q,y+k)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+k),c.lineTo(0,y+k),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+k),c.lineTo(0,I+k),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("component",qa);mxUtils.extend(Ea,mxRectangleShape);Ea.prototype.paintForeground=
+function(c,k,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(k+v,q),new mxPoint(k+l,q+w),new mxPoint(k+v,q+p),new mxPoint(k,q+w)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ea);mxUtils.extend(Ua,mxDoubleEllipse);Ua.prototype.outerStroke=!0;Ua.prototype.paintVertexShape=function(c,k,q,l,p){var v=Math.min(4,
+Math.min(l/5,p/5));0<l&&0<p&&(c.ellipse(k+v,q+v,l-2*v,p-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(k,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(ab,mxArrowConnector);ab.prototype.defaultWidth=10;ab.prototype.defaultArrowWidth=20;ab.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ab.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ab.prototype.getEdgeWidth=
-function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ab);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(c,h,q,l,p){h=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(0,p),new mxPoint(0,h),new mxPoint(l,
-0),new mxPoint(l,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ya);mxUtils.extend(Va,mxRectangleShape);Va.prototype.dx=20;Va.prototype.dy=20;Va.prototype.isHtmlAllowed=function(){return!1};Va.prototype.paintForeground=function(c,h,q,l,p){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;v=Math.max(v,Math.min(l*w,p*w))}w=
-Math.max(v,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(h,q+v);c.lineTo(h+l,q+v);c.end();c.stroke();c.begin();c.moveTo(h+w,q);c.lineTo(h+w,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Va);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=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,q),new mxPoint(h,q),new mxPoint(h,p),new mxPoint(0,p)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("corner",Za);mxUtils.extend(kb,mxActor);kb.prototype.redrawPath=function(c,h,q,
-l,p){c.moveTo(0,0);c.lineTo(0,p);c.end();c.moveTo(l,0);c.lineTo(l,p);c.end();c.moveTo(0,p/2);c.lineTo(l,p/2);c.end()};mxCellRenderer.registerShape("crossbar",kb);mxUtils.extend(cb,mxActor);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.redrawPath=function(c,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=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,q),new mxPoint((l+h)/2,q),new mxPoint((l+h)/2,p),new mxPoint((l-h)/2,p),new mxPoint((l-h)/2,q),new mxPoint(0,q)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("tee",cb);mxUtils.extend(ca,mxActor);ca.prototype.arrowWidth=.3;ca.prototype.arrowSize=.2;ca.prototype.redrawPath=function(c,h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
-this.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.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,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(0,v)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ca);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(c,
-h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.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(G,mxActor);G.prototype.size=20;
-G.prototype.isRoundable=function(){return!0};G.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",G);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(Y,mxEllipse);Y.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",Y);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(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(wa,mxEllipse);wa.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",wa);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=
-function(c,h,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,H=q+p-w/2;c.begin();c.moveTo(h,q);c.lineTo(h,q+p);c.moveTo(h+v,H);c.lineTo(h+v+w,H-w/2);c.moveTo(h+v,H);c.lineTo(h+v+w,H+w/2);c.moveTo(h+v,H);c.lineTo(h+l-v,H);c.moveTo(h+l,q);c.lineTo(h+l,q+p);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H-w/2);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",za);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.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 H="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Z="1"==mxUtils.getValue(this.style,"right","1"),M="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||H||Z||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||H?c.lineTo(h+l,q):c.moveTo(h+l,q),this.outline||Z?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",Da);mxUtils.extend(La,mxEllipse);La.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(h+l/2,q),c.lineTo(h+l/2,q+p)):(c.moveTo(h,q+p/2),c.lineTo(h+l,q+p/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",La);mxUtils.extend(Ma,mxActor);Ma.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/2);c.moveTo(0,0);c.lineTo(l-h,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-h,p);c.lineTo(0,p);c.close();c.end()};mxCellRenderer.registerShape("delay",Ma);mxUtils.extend(Ha,mxActor);Ha.prototype.size=
-.2;Ha.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(p,l);var v=Math.max(0,Math.min(h,h*parseFloat(mxUtils.getValue(this.style,"size",this.size))));h=(p-v)/2;q=h+v;var w=(l-v)/2;v=w+v;c.moveTo(0,h);c.lineTo(w,h);c.lineTo(w,0);c.lineTo(v,0);c.lineTo(v,h);c.lineTo(l,h);c.lineTo(l,q);c.lineTo(v,q);c.lineTo(v,p);c.lineTo(w,p);c.lineTo(w,q);c.lineTo(0,q);c.close();c.end()};mxCellRenderer.registerShape("cross",Ha);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(c,
-h,q,l,p){h=Math.min(l,p/2);q=Math.min(l-h,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.moveTo(0,p/2);c.lineTo(q,0);c.lineTo(l-h,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-h,p);c.lineTo(q,p);c.close();c.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(Ga,mxActor);Ga.prototype.cst={RECT2:"mxgraph.basic.rect"};Ga.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
+function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ab);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(c,k,q,l,p){k=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(0,p),new mxPoint(0,k),new mxPoint(l,
+0),new mxPoint(l,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ya);mxUtils.extend(Va,mxRectangleShape);Va.prototype.dx=20;Va.prototype.dy=20;Va.prototype.isHtmlAllowed=function(){return!1};Va.prototype.paintForeground=function(c,k,q,l,p){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;v=Math.max(v,Math.min(l*w,p*w))}w=
+Math.max(v,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(k,q+v);c.lineTo(k+l,q+v);c.end();c.stroke();c.begin();c.moveTo(k+w,q);c.lineTo(k+w,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Va);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,k,q,l,p){k=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=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,q),new mxPoint(k,q),new mxPoint(k,p),new mxPoint(0,p)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("corner",Za);mxUtils.extend(kb,mxActor);kb.prototype.redrawPath=function(c,k,q,
+l,p){c.moveTo(0,0);c.lineTo(0,p);c.end();c.moveTo(l,0);c.lineTo(l,p);c.end();c.moveTo(0,p/2);c.lineTo(l,p/2);c.end()};mxCellRenderer.registerShape("crossbar",kb);mxUtils.extend(cb,mxActor);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.redrawPath=function(c,k,q,l,p){k=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=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,q),new mxPoint((l+k)/2,q),new mxPoint((l+k)/2,p),new mxPoint((l-k)/2,p),new mxPoint((l-k)/2,q),new mxPoint(0,q)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("tee",cb);mxUtils.extend(ca,mxActor);ca.prototype.arrowWidth=.3;ca.prototype.arrowSize=.2;ca.prototype.redrawPath=function(c,k,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
+this.arrowWidth))));k=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.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,q),new mxPoint(l-k,q),new mxPoint(l-k,0),new mxPoint(l,p/2),new mxPoint(l-k,p),new mxPoint(l-k,v),new mxPoint(0,v)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ca);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(c,
+k,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth))));k=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.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(k,0),new mxPoint(k,q),new mxPoint(l-k,q),new mxPoint(l-k,0),new mxPoint(l,p/2),new mxPoint(l-k,p),new mxPoint(l-k,v),new mxPoint(k,
+v),new mxPoint(k,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,k,q,l,p){k="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(k,0);c.lineTo(l,0);c.quadTo(l-2*k,p/2,l,p);c.lineTo(k,p);c.quadTo(k-
+2*k,p/2,k,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",z);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,k,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,k,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(G,mxActor);G.prototype.size=20;
+G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(c,k,q,l,p){k=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(k,0),new mxPoint(l-k,0),new mxPoint(l,.8*k),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*k)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("loopLimit",G);mxUtils.extend(L,mxActor);L.prototype.size=
+.375;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,k,q,l,p){k=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-k),new mxPoint(l/2,p),new mxPoint(0,p-k)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",L);mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=
+function(c,k,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(k+l/2,q+p);c.lineTo(k+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",Y);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(c,k,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(k,q+p/2);c.lineTo(k+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(k+l/2,q);c.lineTo(k+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",
+ha);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,k,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(k+.145*l,q+.145*p);c.lineTo(k+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(k+.855*l,q+.145*p);c.lineTo(k+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ea);mxUtils.extend(ka,mxRhombus);ka.prototype.paintVertexShape=function(c,k,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(k,q+p/2);c.lineTo(k+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ka);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(c,k,q,l,p){c.begin();c.moveTo(k,q);c.lineTo(k+l,q);c.lineTo(k+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(k,q+p);c.lineTo(k+l,q+p);c.lineTo(k+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",wa);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=
+function(c,k,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,I=q+p-w/2;c.begin();c.moveTo(k,q);c.lineTo(k,q+p);c.moveTo(k+v,I);c.lineTo(k+v+w,I-w/2);c.moveTo(k+v,I);c.lineTo(k+v+w,I+w/2);c.moveTo(k+v,I);c.lineTo(k+l-v,I);c.moveTo(k+l,q);c.lineTo(k+l,q+p);c.moveTo(k+l-v,I);c.lineTo(k+l-w-v,I-w/2);c.moveTo(k+l-v,I);c.lineTo(k+l-w-v,I+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",za);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(c,k,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"),Z="1"==mxUtils.getValue(this.style,"right","1"),M="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||I||Z||M||y?(c.rect(k,q,l,p),c.fill(),c.pointerEvents=
+v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(k,q),this.outline||I?c.lineTo(k+l,q):c.moveTo(k+l,q),this.outline||Z?c.lineTo(k+l,q+p):c.moveTo(k+l,q+p),this.outline||M?c.lineTo(k,q+p):c.moveTo(k,q+p),(this.outline||y)&&c.lineTo(k,q),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(La,mxEllipse);La.prototype.paintVertexShape=function(c,k,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(k+l/2,q),c.lineTo(k+l/2,q+p)):(c.moveTo(k,q+p/2),c.lineTo(k+l,q+p/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",La);mxUtils.extend(Ma,mxActor);Ma.prototype.redrawPath=function(c,k,q,l,p){k=Math.min(l,p/2);c.moveTo(0,0);c.lineTo(l-k,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-k,p);c.lineTo(0,p);c.close();c.end()};mxCellRenderer.registerShape("delay",Ma);mxUtils.extend(Ha,mxActor);Ha.prototype.size=
+.2;Ha.prototype.redrawPath=function(c,k,q,l,p){k=Math.min(p,l);var v=Math.max(0,Math.min(k,k*parseFloat(mxUtils.getValue(this.style,"size",this.size))));k=(p-v)/2;q=k+v;var w=(l-v)/2;v=w+v;c.moveTo(0,k);c.lineTo(w,k);c.lineTo(w,0);c.lineTo(v,0);c.lineTo(v,k);c.lineTo(l,k);c.lineTo(l,q);c.lineTo(v,q);c.lineTo(v,p);c.lineTo(w,p);c.lineTo(w,q);c.lineTo(0,q);c.close();c.end()};mxCellRenderer.registerShape("cross",Ha);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(c,
+k,q,l,p){k=Math.min(l,p/2);q=Math.min(l-k,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.moveTo(0,p/2);c.lineTo(q,0);c.lineTo(l-k,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-k,p);c.lineTo(q,p);c.close();c.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(Ga,mxActor);Ga.prototype.cst={RECT2:"mxgraph.basic.rect"};Ga.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",
dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",
type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},
{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",
-enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];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),H=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,
+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,k,q,l,p){c.translate(k,q);this.strictDrawShape(c,0,0,l,p)};Ga.prototype.strictDrawShape=function(c,k,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)))),Z=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)))),Ca=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Qa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ka=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),oa=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.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Aa=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Ab=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Bb=v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),xb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),zb=v&&v.gradientColor2?
-v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Cb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Db=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Eb=Math.max(0,Math.min(50,y));v=Ga.prototype;c.setDashed(Ca);Qa&&""!=Qa&&c.setDashPattern(Qa);c.setStrokeWidth(Bb);y=Math.min(.5*p,.5*l,y);H||(y=Eb*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));H||(M=Math.min(Ka*Math.min(l,p)/100));M=Math.min(M,.5*Math.min(l,
-p)-y);(la||pa||oa||ma)&&"frame"!=Z&&(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,oa),oa&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),ma&&v.paintSW(c,h,q,l,p,w,Aa,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(xb),Ca=H=Db,"none"==xb&&(H=0),"none"==zb&&(Ca=0),c.setGradient(xb,zb,0,0,l,p,Cb,H,Ca),
-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,Aa,y,M,oa,ma),ma&&oa&&v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),oa&&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"==Ab&&(c.begin(),v.paintFolds(c,h,q,l,p,w,va,xa,ya,Aa,y,la,pa,oa,ma),c.stroke()));
-la||pa||oa||!ma?la||pa||!oa||ma?!la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),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,Aa,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la||!pa||oa||ma?!la&&pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,M,oa,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,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),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,oa),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,Aa,y,M,oa,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,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&oa&&
-!ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,
-h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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&&oa&&ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,M,oa,ma),
-v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),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,Aa,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),
-v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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||oa||ma?la&&!pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,oa),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"==Z&&(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,Aa,y,M,oa,
-ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,oa),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,Aa,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&!pa&&oa&&!ma?"frame"!=Z?(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"==Z&&(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,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),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,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,
-Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),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"==Z&&(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,Aa,y,M,oa,ma),v.paintSWInner(c,
-h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),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,Aa,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,
-l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&pa&&!oa&&!ma?"frame"!=Z?(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,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),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,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),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&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,oa),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,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),
-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,Aa,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,oa),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,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),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,Aa,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&pa&&oa&&!ma?"frame"!=Z?(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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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&&oa&&ma&&("frame"!=Z?(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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,Aa,
-y,M,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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,Aa,y,M,oa,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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),v.moveSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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,Aa,y,M,
-oa,ma),c.close(),c.fillAndStroke())):"frame"!=Z?(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"==Z&&(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"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),"double"==
-Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),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,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,
-h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,oa),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,Aa,y,M,oa,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,va,xa,ya,Aa,y,la,pa,oa,ma);c.stroke()};Ga.prototype.moveNW=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,H)};Ga.prototype.moveNE=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-H,0)};Ga.prototype.moveSE=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-H)};Ga.prototype.moveSW=
-function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,p):c.moveTo(H,p)};Ga.prototype.paintNW=function(c,h,q,l,p,v,w,H,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(H,H,0,0,h,H,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(H,0);else c.lineTo(0,0)};Ga.prototype.paintTop=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==
-w&&"square"==v||!y?c.lineTo(l,0):c.lineTo(l-H,0)};Ga.prototype.paintNE=function(c,h,q,l,p,v,w,H,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(H,H,0,0,h,l,H)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l,H);else c.lineTo(l,0)};Ga.prototype.paintRight=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(l,p):c.lineTo(l,p-
-H)};Ga.prototype.paintLeft=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,H)};Ga.prototype.paintSE=function(c,h,q,l,p,v,w,H,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(H,H,0,0,h,l-H,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-H,p);else c.lineTo(l,p)};Ga.prototype.paintBottom=function(c,h,q,
-l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,p):c.lineTo(H,p)};Ga.prototype.paintSW=function(c,h,q,l,p,v,w,H,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(H,H,0,0,h,0,p-H)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(0,p-H);else c.lineTo(0,p)};Ga.prototype.paintNWInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"==
-w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,y,.5*y+H);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,y,y+H);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(y,.5*y+H);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+H,y+H),c.lineTo(y,y+H)};Ga.prototype.paintTopInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(0,y):Z&&!M?c.lineTo(y,0):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==
-v?c.lineTo(H+.5*y,y):c.lineTo(H+y,y):c.lineTo(0,y):c.lineTo(0,0)};Ga.prototype.paintNEInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,l-H-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,l-H-y,y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-H-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-H-y,H+y),c.lineTo(l-H-y,y)};Ga.prototype.paintRightInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&
-M?c.lineTo(l-y,0):Z&&!M?c.lineTo(l,y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,H+.5*y):c.lineTo(l-y,H+y):c.lineTo(l-y,0):c.lineTo(l,0)};Ga.prototype.paintLeftInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(y,p):Z&&!M?c.lineTo(0,p-y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-H-.5*
-y):c.lineTo(y,p-H-y):c.lineTo(y,p):c.lineTo(0,p)};Ga.prototype.paintSEInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,l-y,p-H-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,l-y,p-H-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-y,p-H-.5*y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-H-y,p-H-y),c.lineTo(l-y,p-H-y)};Ga.prototype.paintBottomInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(l,
-p-y):Z&&!M?c.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Z?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-H-.5*y,p-y):c.lineTo(l-H-y,p-y):c.lineTo(l,p)};Ga.prototype.paintSWInner=function(c,h,q,l,p,v,w,H,y,Z){if(!Z)c.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)c.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,H+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+
-y,H+y,0,0,1,H+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(H+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+H,p-H-y),c.lineTo(y+H,p-y)};Ga.prototype.moveSWInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,p-H-y):c.moveTo(0,p-y)};Ga.prototype.lineSWInner=
-function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,p-H-y):c.lineTo(0,p-y)};Ga.prototype.moveSEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-
-y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,p-H-y):c.moveTo(l-y,p)};Ga.prototype.lineSEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"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-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,p-H-y):c.lineTo(l-y,p)};Ga.prototype.moveNEInner=function(c,h,
-q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-y,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,H+y):c.moveTo(l,y)};Ga.prototype.lineNEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,H+.5*y):
-("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,H+y):c.lineTo(l,y)};Ga.prototype.moveNWInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.moveTo(y,0):Z&&!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,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,H+y):c.moveTo(0,0)};Ga.prototype.lineNWInner=
-function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(y,0):Z&&!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,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,H+y):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,h,q,l,p,v,w,H,y,Z,M,Ca,Qa,Ka,la){if("fold"==v||"fold"==w||"fold"==H||"fold"==y||"fold"==Z)("fold"==w||"default"==w&&"fold"==v)&&
-Ca&&la&&(c.moveTo(0,M),c.lineTo(M,M),c.lineTo(M,0)),("fold"==H||"default"==H&&"fold"==v)&&Ca&&Qa&&(c.moveTo(l-M,0),c.lineTo(l-M,M),c.lineTo(l,M)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Qa&&(c.moveTo(l-M,p),c.lineTo(l-M,p-M),c.lineTo(l,p-M)),("fold"==Z||"default"==Z&&"fold"==v)&&Ka&&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;
-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,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2);c.stroke()}});mxMarker.addMarker("box",
-function(c,h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.x+M/2,Ka=l.y+Ca/2;l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa-M/2-Ca/2,Ka-Ca/2+M/2);c.lineTo(Qa-M/2+Ca/2,Ka-Ca/2-M/2);c.lineTo(Qa+Ca/2-3*M/2,Ka-3*Ca/2-M/2);c.lineTo(Qa-Ca/2-3*M/2,Ka-3*Ca/2+M/2);c.close();Z?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2);
-c.moveTo(l.x-M/2+Ca/2,l.y-Ca/2-M/2);c.lineTo(l.x-Ca/2-3*M/2,l.y-3*Ca/2+M/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,h,q,l,p,v,w,H,y,Z){var M=l.clone(),Ca=Pa.apply(this,arguments),Qa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);c.begin();c.moveTo(M.x-p*y,M.y-v*y);c.lineTo(M.x-2*Qa+p*y,M.y-2*Ka+v*y);c.moveTo(M.x-Qa-Ka+v*y,M.y-Ka+Qa-p*y);c.lineTo(M.x+Ka-Qa-v*y,M.y-Ka-Qa+p*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,
-h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.clone();l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa.x-Ca,Qa.y+M);c.quadTo(l.x-Ca,l.y+M,l.x,l.y);c.quadTo(l.x+Ca,l.y-M,Qa.x+Ca,Qa.y-M);c.stroke()}});mxMarker.addMarker("async",function(c,h,q,l,p,v,w,H,y,Z){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var M=l.clone();M.x-=h;M.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){c.begin();c.moveTo(M.x,M.y);H?c.lineTo(M.x-p-v/2,M.y-v+p/2):c.lineTo(M.x+v/2-p,M.y-v-p/2);c.lineTo(M.x-p,M.y-v);c.close();Z?c.fillAndStroke():
-c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(h,q,l,p,v,w,H,y,Z,M){v*=H+Z;w*=H+Z;var Ca=p.clone();return function(){h.begin();h.moveTo(Ca.x,Ca.y);y?h.lineTo(Ca.x-v-w/c,Ca.y-w+v/c):h.lineTo(Ca.x+w/c-v,Ca.y-w-v/c);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var lb=function(c,h,q){return Wa(c,["width"],h,function(l,p,v,w,H){H=c.shape.getEdgeWidth()*c.view.scale+q;return new mxPoint(w.x+p*l/4+v*H/2,w.y+v*l/4-p*H/2)},function(l,p,v,w,H,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,
-w.y,H.x,H.y,y.x,y.y));c.style.width=Math.round(2*l)/c.view.scale-q})},Wa=function(c,h,q,l,p){return Ra(c,h,function(v){var w=c.absolutePoints,H=w.length-1;v=c.view.translate;var y=c.view.scale,Z=q?w[0]:w[H];w=q?w[1]:w[H-1];H=w.x-Z.x;var M=w.y-Z.y,Ca=Math.sqrt(H*H+M*M);Z=l.call(this,Ca,H/Ca,M/Ca,Z,w);return new mxPoint(Z.x/y-v.x,Z.y/y-v.y)},function(v,w,H){var y=c.absolutePoints,Z=y.length-1;v=c.view.translate;var M=c.view.scale,Ca=q?y[0]:y[Z];y=q?y[1]:y[Z-1];Z=y.x-Ca.x;var Qa=y.y-Ca.y,Ka=Math.sqrt(Z*
-Z+Qa*Qa);w.x=(w.x+v.x)*M;w.y=(w.y+v.y)*M;p.call(this,Ka,Z/Ka,Qa/Ka,Ca,y,w,H)})},gb=function(c,h){return function(q){return[Wa(q,["startWidth"],!0,function(l,p,v,w,H){H=mxUtils.getNumber(q.style,"startWidth",c)*q.view.scale+h;return new mxPoint(w.x+p*l/4+v*H/2,w.y+v*l/4-p*H/2)},function(l,p,v,w,H,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));q.style.startWidth=Math.round(2*l)/q.view.scale-h})]}},hb=function(c){return function(h){return[Ra(h,["arrowWidth","arrowSize"],function(q){var l=
-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(q.x+q.width-l.x)/q.width))})]}},Xa=function(c){return function(h){return[Ra(h,["size"],function(q){var l=
-Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},sb=function(c,h,q){return function(l){var p=[Ra(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",h)))))*c;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,
-w.y-v.y)))/c)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},qb=function(c,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Ra(v,["size"],function(H){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Z=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:c));return new mxPoint(H.x+Math.max(0,Math.min(.5*H.width,Z*(y?1:H.width))),H.getCenterY())},function(H,y,Z){H=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
-y.x-H.x:Math.max(0,Math.min(q,(y.x-H.x)/H.width));this.state.style.size=H},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(fb(v));return w}},ub=function(c,h,q){c=null!=c?c:.5;return function(l){var p=[Ra(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,H=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*c,H*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=
-null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(c,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},nb=function(){return function(c){var h=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h}},fb=function(c,h){return Ra(c,[mxConstants.STYLE_ARCSIZE],function(q){var l=null!=h?h:q.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
+v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Cb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Db=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Eb=Math.max(0,Math.min(50,y));v=Ga.prototype;c.setDashed(Ca);Qa&&""!=Qa&&c.setDashPattern(Qa);c.setStrokeWidth(Bb);y=Math.min(.5*p,.5*l,y);I||(y=Eb*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));I||(M=Math.min(Ka*Math.min(l,p)/100));M=Math.min(M,.5*Math.min(l,
+p)-y);(la||pa||oa||ma)&&"frame"!=Z&&(c.begin(),la?v.moveNW(c,k,q,l,p,w,va,y,ma):c.moveTo(0,0),la&&v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),oa&&v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),ma&&v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(xb),Ca=I=Db,"none"==xb&&(I=0),"none"==zb&&(Ca=0),c.setGradient(xb,zb,0,0,l,p,Cb,I,Ca),
+c.begin(),la?v.moveNWInner(c,k,q,l,p,w,va,y,M,la,ma):c.moveTo(M,0),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),ma&&oa&&v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),oa&&pa&&v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),pa&&la&&v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),la&&ma&&v.paintNWInner(c,k,q,l,p,w,va,y,M),c.fill(),"none"==Ab&&(c.begin(),v.paintFolds(c,k,q,l,p,w,va,xa,ya,Aa,y,la,pa,oa,ma),c.stroke()));
+la||pa||oa||!ma?la||pa||!oa||ma?!la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,
+k,q,l,p,w,va,y,la),v.lineNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la||!pa||oa||ma?!la&&pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,k,q,l,p,w,va,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma)),c.stroke(),c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,
+p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveSW(c,k,q,l,p,w,va,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.lineNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.lineSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&oa&&
+!ma?"frame"!=Z?(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.lineSWInner(c,
+k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),
+v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.lineNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),
+v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la||pa||oa||ma?la&&!pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,
+ma)),c.stroke()):(c.begin(),v.moveSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.lineNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&!pa&&oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,
+k,q,l,p,w,va,y,M,ma,la)),c.stroke(),c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.lineNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.lineSWInner(c,k,q,l,p,w,
+Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,
+k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.lineNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,
+l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&pa&&!oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),
+v.paintRight(c,k,q,l,p,w,ya,y,oa),v.lineSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,k,q,l,p,w,ya,y,M,oa),
+v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.lineSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,
+k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&pa&&oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,
+k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.lineSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,
+w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&oa&&ma&&("frame"!=Z?(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),c.close(),"double"==Z&&(v.moveSWInner(c,k,q,l,p,w,Aa,
+y,M,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,
+l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),c.close(),v.moveSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,
+oa,ma),c.close(),c.fillAndStroke())):"frame"!=Z?(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.lineNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),"double"==
+Z&&(v.moveSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.lineSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,
+k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.lineSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSW(c,k,q,l,p,w,va,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,k,q,l,p,w,va,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.lineNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,
+w,Aa,y,M,oa,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,k,q,l,p,w,va,xa,ya,Aa,y,la,pa,oa,ma);c.stroke()};Ga.prototype.moveNW=function(c,k,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,k,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,k,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,k,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,k,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){k=0;if("rounded"==w||"default"==w&&"rounded"==v)k=1;c.arcTo(I,I,0,0,k,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,k,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,k,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){k=0;if("rounded"==w||"default"==w&&"rounded"==v)k=1;c.arcTo(I,I,0,0,k,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,k,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,k,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,k,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){k=0;if("rounded"==w||"default"==w&&"rounded"==v)k=1;c.arcTo(I,I,0,0,k,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,k,q,
+l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,p):c.lineTo(I,p)};Ga.prototype.paintSW=function(c,k,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){k=0;if("rounded"==w||"default"==w&&"rounded"==v)k=1;c.arcTo(I,I,0,0,k,0,p-I)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(0,p-I);else c.lineTo(0,p)};Ga.prototype.paintNWInner=function(c,k,q,l,p,v,w,I,y){if("rounded"==w||"default"==
+w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,y,.5*y+I);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,y,y+I);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(y,.5*y+I);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+I,y+I),c.lineTo(y,y+I)};Ga.prototype.paintTopInner=function(c,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&M?c.lineTo(0,y):Z&&!M?c.lineTo(y,0):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==
+v?c.lineTo(I+.5*y,y):c.lineTo(I+y,y):c.lineTo(0,y):c.lineTo(0,0)};Ga.prototype.paintNEInner=function(c,k,q,l,p,v,w,I,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,l-I-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,l-I-y,y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-I-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-I-y,I+y),c.lineTo(l-I-y,y)};Ga.prototype.paintRightInner=function(c,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&
+M?c.lineTo(l-y,0):Z&&!M?c.lineTo(l,y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,I+.5*y):c.lineTo(l-y,I+y):c.lineTo(l-y,0):c.lineTo(l,0)};Ga.prototype.paintLeftInner=function(c,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&M?c.lineTo(y,p):Z&&!M?c.lineTo(0,p-y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-I-.5*
+y):c.lineTo(y,p-I-y):c.lineTo(y,p):c.lineTo(0,p)};Ga.prototype.paintSEInner=function(c,k,q,l,p,v,w,I,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,l-y,p-I-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,l-y,p-I-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-y,p-I-.5*y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-I-y,p-I-y),c.lineTo(l-y,p-I-y)};Ga.prototype.paintBottomInner=function(c,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&M?c.lineTo(l,
+p-y):Z&&!M?c.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Z?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-I-.5*y,p-y):c.lineTo(l-I-y,p-y):c.lineTo(l,p)};Ga.prototype.paintSWInner=function(c,k,q,l,p,v,w,I,y,Z){if(!Z)c.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)c.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,I+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+
+y,I+y,0,0,1,I+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(I+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+I,p-I-y),c.lineTo(y+I,p-y)};Ga.prototype.moveSWInner=function(c,k,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,p-I-y):c.moveTo(0,p-y)};Ga.prototype.lineSWInner=
+function(c,k,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,p-I-y):c.lineTo(0,p-y)};Ga.prototype.moveSEInner=function(c,k,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-
+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,k,q,l,p,v,w,I,y,Z){Z?"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,k,
+q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?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,k,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?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,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&M?c.moveTo(y,0):Z&&!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,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&M?c.lineTo(y,0):Z&&!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,k,q,l,p,v,w,I,y,Z,M,Ca,Qa,Ka,la){if("fold"==v||"fold"==w||"fold"==I||"fold"==y||"fold"==Z)("fold"==w||"default"==w&&"fold"==v)&&
+Ca&&la&&(c.moveTo(0,M),c.lineTo(M,M),c.lineTo(M,0)),("fold"==I||"default"==I&&"fold"==v)&&Ca&&Qa&&(c.moveTo(l-M,0),c.lineTo(l-M,M),c.lineTo(l,M)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Qa&&(c.moveTo(l-M,p),c.lineTo(l-M,p-M),c.lineTo(l,p-M)),("fold"==Z||"default"==Z&&"fold"==v)&&Ka&&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;
+Oa.prototype.paintEdgeShape=function(c,k,q){for(var l=[],p=0;p<k.length;p++)l.push(mxUtils.clone(k[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,k,q])))};mxCellRenderer.registerShape("filledEdge",Oa);"undefined"!==typeof StyleFormatPanel&&function(){var c=
+StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var k=this.editorUi.getSelectionState(),q=c.apply(this,arguments);"umlFrame"==k.style.shape&&q.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return q}}();mxMarker.addMarker("dash",function(c,k,q,l,p,v,w,I,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2);c.stroke()}});mxMarker.addMarker("box",
+function(c,k,q,l,p,v,w,I,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.x+M/2,Ka=l.y+Ca/2;l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa-M/2-Ca/2,Ka-Ca/2+M/2);c.lineTo(Qa-M/2+Ca/2,Ka-Ca/2-M/2);c.lineTo(Qa+Ca/2-3*M/2,Ka-3*Ca/2-M/2);c.lineTo(Qa-Ca/2-3*M/2,Ka-3*Ca/2+M/2);c.close();Z?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,k,q,l,p,v,w,I,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2);
+c.moveTo(l.x-M/2+Ca/2,l.y-Ca/2-M/2);c.lineTo(l.x-Ca/2-3*M/2,l.y-3*Ca/2+M/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,k,q,l,p,v,w,I,y,Z){var M=l.clone(),Ca=Pa.apply(this,arguments),Qa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);c.begin();c.moveTo(M.x-p*y,M.y-v*y);c.lineTo(M.x-2*Qa+p*y,M.y-2*Ka+v*y);c.moveTo(M.x-Qa-Ka+v*y,M.y-Ka+Qa-p*y);c.lineTo(M.x+Ka-Qa-v*y,M.y-Ka-Qa+p*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,
+k,q,l,p,v,w,I,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.clone();l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa.x-Ca,Qa.y+M);c.quadTo(l.x-Ca,l.y+M,l.x,l.y);c.quadTo(l.x+Ca,l.y-M,Qa.x+Ca,Qa.y-M);c.stroke()}});mxMarker.addMarker("async",function(c,k,q,l,p,v,w,I,y,Z){k=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var M=l.clone();M.x-=k;M.y-=q;l.x+=-p-k;l.y+=-v-q;return function(){c.begin();c.moveTo(M.x,M.y);I?c.lineTo(M.x-p-v/2,M.y-v+p/2):c.lineTo(M.x+v/2-p,M.y-v-p/2);c.lineTo(M.x-p,M.y-v);c.close();Z?c.fillAndStroke():
+c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(k,q,l,p,v,w,I,y,Z,M){v*=I+Z;w*=I+Z;var Ca=p.clone();return function(){k.begin();k.moveTo(Ca.x,Ca.y);y?k.lineTo(Ca.x-v-w/c,Ca.y-w+v/c):k.lineTo(Ca.x+w/c-v,Ca.y-w-v/c);k.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var lb=function(c,k,q){return Wa(c,["width"],k,function(l,p,v,w,I){I=c.shape.getEdgeWidth()*c.view.scale+q;return new mxPoint(w.x+p*l/4+v*I/2,w.y+v*l/4-p*I/2)},function(l,p,v,w,I,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,
+w.y,I.x,I.y,y.x,y.y));c.style.width=Math.round(2*l)/c.view.scale-q})},Wa=function(c,k,q,l,p){return Ra(c,k,function(v){var w=c.absolutePoints,I=w.length-1;v=c.view.translate;var y=c.view.scale,Z=q?w[0]:w[I];w=q?w[1]:w[I-1];I=w.x-Z.x;var M=w.y-Z.y,Ca=Math.sqrt(I*I+M*M);Z=l.call(this,Ca,I/Ca,M/Ca,Z,w);return new mxPoint(Z.x/y-v.x,Z.y/y-v.y)},function(v,w,I){var y=c.absolutePoints,Z=y.length-1;v=c.view.translate;var M=c.view.scale,Ca=q?y[0]:y[Z];y=q?y[1]:y[Z-1];Z=y.x-Ca.x;var Qa=y.y-Ca.y,Ka=Math.sqrt(Z*
+Z+Qa*Qa);w.x=(w.x+v.x)*M;w.y=(w.y+v.y)*M;p.call(this,Ka,Z/Ka,Qa/Ka,Ca,y,w,I)})},gb=function(c,k){return function(q){return[Wa(q,["startWidth"],!0,function(l,p,v,w,I){I=mxUtils.getNumber(q.style,"startWidth",c)*q.view.scale+k;return new mxPoint(w.x+p*l/4+v*I/2,w.y+v*l/4-p*I/2)},function(l,p,v,w,I,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));q.style.startWidth=Math.round(2*l)/q.view.scale-k})]}},hb=function(c){return function(k){return[Ra(k,["arrowWidth","arrowSize"],function(q){var l=
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(q.x+q.width-l.x)/q.width))})]}},Xa=function(c){return function(k){return[Ra(k,["size"],function(q){var l=
+Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},sb=function(c,k,q){return function(l){var p=[Ra(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",k)))))*c;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,
+w.y-v.y)))/c)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},qb=function(c,k,q,l,p){q=null!=q?q:.5;return function(v){var w=[Ra(v,["size"],function(I){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Z=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:c));return new mxPoint(I.x+Math.max(0,Math.min(.5*I.width,Z*(y?1:I.width))),I.getCenterY())},function(I,y,Z){I=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
+y.x-I.x:Math.max(0,Math.min(q,(y.x-I.x)/I.width));this.state.style.size=I},!1,l)];k&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(fb(v));return w}},ub=function(c,k,q){c=null!=c?c:.5;return function(l){var p=[Ra(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,I=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",w?q:k)));return new mxPoint(v.x+Math.min(.75*v.width*c,I*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=
+null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(c,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},nb=function(){return function(c){var k=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&k.push(fb(c));return k}},fb=function(c,k){return Ra(c,[mxConstants.STYLE_ARCSIZE],function(q){var l=null!=k?k:q.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
0)){var p=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(q.x+q.width-Math.min(q.width/2,p),q.y+l)}p=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(q.x+q.width-Math.min(Math.max(q.width/2,q.height/2),Math.min(q.width,q.height)*p),q.y+l)},function(q,l,p){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Ra=function(c,h,q,l,p,v,w){var H=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);H.execute=function(Z){for(var M=0;M<h.length;M++)this.copyStyle(h[M]);w&&w(Z)};H.getPosition=q;H.setPosition=l;H.ignoreGrid=null!=p?p:!0;if(v){var y=H.positionChanged;H.positionChanged=function(){y.apply(this,
-arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return H},rb={link:function(c){return[lb(c,!0,10),lb(c,!1,10)]},flexArrow:function(c){var h=c.view.graph.gridSize/c.view.scale,q=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,H){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,
-mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),q.push(Wa(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,H){l=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(Z.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<h&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,H){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=
-Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(Z.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])})),q.push(Wa(c,["startWidth","endWidth",
-mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,H){l=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=
-Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(Z.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));
+Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Ra=function(c,k,q,l,p,v,w){var I=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);I.execute=function(Z){for(var M=0;M<k.length;M++)this.copyStyle(k[M]);w&&w(Z)};I.getPosition=q;I.setPosition=l;I.ignoreGrid=null!=p?p:!0;if(v){var y=I.positionChanged;I.positionChanged=function(){y.apply(this,
+arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return I},rb={link:function(c){return[lb(c,!0,10),lb(c,!1,10)]},flexArrow:function(c){var k=c.view.graph.gridSize/c.view.scale,q=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,I){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,
+mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<k/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),q.push(Wa(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,I){l=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(Z.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<k/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<k&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,I){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=
+Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<k/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),q.push(Wa(c,["startWidth","endWidth",
+mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,I){l=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=
+Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(Z.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<k/6&&(c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<k&&(c.style.endWidth=c.style.startWidth))})));return q},swimlane:function(c){var k=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var q=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));k.push(fb(c,q/2))}k.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=[],H=0;H<v.length;H++)v[H]!=c.cell&&p.isSwimlane(v[H])&&p.getSwimlaneDirection(p.getCurrentCellStyle(v[H]))==l&&w.push(v[H]);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",da.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(sa.prototype.corner,Math.min(h.width,mxUtils.getValue(this.state.style,"width",sa.prototype.width))),l=Math.max(1.5*sa.prototype.corner,Math.min(h.height,mxUtils.getValue(this.state.style,
-"height",sa.prototype.height)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.width=Math.round(Math.max(sa.prototype.corner,Math.min(h.width,q.x-h.x)));this.state.style.height=Math.round(Math.max(1.5*sa.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",X.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",Ha.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",Ya.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",fa.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));mxUtils.getValue(this.state.style,
+(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 k},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[Ra(c,["size"],function(k){var q=
+Math.max(0,Math.min(k.height,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(k.getCenterX(),k.y+q)},function(k,q){this.state.style.size=Math.round(Math.max(0,Math.min(k.height,q.y-k.y)))},!1)]},umlFrame:function(c){return[Ra(c,["width","height"],function(k){var q=Math.max(sa.prototype.corner,Math.min(k.width,mxUtils.getValue(this.state.style,"width",sa.prototype.width))),l=Math.max(1.5*sa.prototype.corner,Math.min(k.height,mxUtils.getValue(this.state.style,
+"height",sa.prototype.height)));return new mxPoint(k.x+q,k.y+l)},function(k,q){this.state.style.width=Math.round(Math.max(sa.prototype.corner,Math.min(k.width,q.x-k.x)));this.state.style.height=Math.round(Math.max(1.5*sa.prototype.corner,Math.min(k.height,q.y-k.y)))},!1)]},process:function(c){var k=[Ra(c,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",X.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)&&k.push(fb(c));return k},cross:function(c){return[Ra(c,["size"],function(k){var q=Math.min(k.width,k.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ha.prototype.size)))*q/2;return new mxPoint(k.getCenterX()-
+q,k.getCenterY()-q)},function(k,q){var l=Math.min(k.width,k.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,k.getCenterY()-q.y)/l*2,Math.max(0,k.getCenterX()-q.x)/l*2)))})]},note:function(c){return[Ra(c,["size"],function(k){var q=Math.max(0,Math.min(k.width,Math.min(k.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(k.x+k.width-q,k.y+q)},function(k,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(k.width,k.x+
+k.width-q.x),Math.min(k.height,q.y-k.y))))})]},note2:function(c){return[Ra(c,["size"],function(k){var q=Math.max(0,Math.min(k.width,Math.min(k.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(k.x+k.width-q,k.y+q)},function(k,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(k.width,k.x+k.width-q.x),Math.min(k.height,q.y-k.y))))})]},manualInput:function(c){var k=[Ra(c,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,
+"size",Ya.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)&&k.push(fb(c));return k},dataStorage:function(c){return[Ra(c,["size"],function(k){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(k.x+k.width-l*
+(q?1:k.width),k.getCenterY())},function(k,q){k="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(k.width,k.x+k.width-q.x)):Math.max(0,Math.min(1,(k.x+k.width-q.x)/k.width));this.state.style.size=k},!1)]},callout:function(c){var k=[Ra(c,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));mxUtils.getValue(this.state.style,
"base",fa.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",fa.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",fa.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",fa.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",fa.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",fa.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",Ba.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,
-"jettyHeight",Ba.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",Za.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Za.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",cb.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",cb.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:hb(1),doubleArrow:hb(.5),"mxgraph.arrows2.wedgeArrow":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":gb(20,20),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",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",R.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:Xa(x.prototype.size),cylinder3:Xa(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(ra.prototype.size,!0,null,!0,ra.prototype.fixedSize),hexagon:qb(K.prototype.size,!0,.5,!0,K.prototype.fixedSize),
-curlyBracket:qb(aa.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:sb(1,e.prototype.size,!1),card:sb(.5,C.prototype.size,!0),loopLimit:sb(.5,G.prototype.size,!0),trapezoid:ub(.5,Q.prototype.size,Q.prototype.fixedSize),parallelogram:ub(1,S.prototype.size,S.prototype.fixedSize)};Graph.createHandle=Ra;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var 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 ib=new mxPoint(1,0),jb=new mxPoint(1,0),mb=mxUtils.toRadians(-30);ib=mxUtils.getRotatedPoint(ib,Math.cos(mb),Math.sin(mb));var ob=mxUtils.toRadians(-150);jb=mxUtils.getRotatedPoint(jb,Math.cos(ob),Math.sin(ob));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,
-H=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(c,l));null==H&&null!=h&&(H=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=ib.x,Z=ib.y,M=jb.x,Ca=jb.y,Qa="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=w&&null!=H){c=function(la,pa,oa){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-M*ma)/(y*Ca-Z*M);la=(Z*la-y*ma)/(Z*M-y*Ca);Qa?(oa&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca*
-la)):(oa&&(Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa));p.push(Ka)};var Ka=H;null==l&&(l=new mxPoint(H.x+(w.x-H.x)/2,H.y+(w.y-H.y)/2));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var yb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return yb.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};fa.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,
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.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)&&k.push(fb(c));return k},internalStorage:function(c){var k=[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)&&k.push(fb(c));return k},module:function(c){return[Ra(c,["jettyWidth","jettyHeight"],function(k){var q=Math.max(0,Math.min(k.width,mxUtils.getValue(this.state.style,"jettyWidth",Ba.prototype.jettyWidth))),l=Math.max(0,Math.min(k.height,mxUtils.getValue(this.state.style,
+"jettyHeight",Ba.prototype.jettyHeight)));return new mxPoint(k.x+q/2,k.y+2*l)},function(k,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(k.width,q.x-k.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(k.height,q.y-k.y))/2)})]},corner:function(c){return[Ra(c,["dx","dy"],function(k){var q=Math.max(0,Math.min(k.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),l=Math.max(0,Math.min(k.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(k.x+
+q,k.y+l)},function(k,q){this.state.style.dx=Math.round(Math.max(0,Math.min(k.width,q.x-k.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(k.height,q.y-k.y)))},!1)]},tee:function(c){return[Ra(c,["dx","dy"],function(k){var q=Math.max(0,Math.min(k.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),l=Math.max(0,Math.min(k.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(k.x+(k.width+q)/2,k.y+l)},function(k,q){this.state.style.dx=Math.round(Math.max(0,
+2*Math.min(k.width/2,q.x-k.x-k.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(k.height,q.y-k.y)))},!1)]},singleArrow:hb(1),doubleArrow:hb(.5),"mxgraph.arrows2.wedgeArrow":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":gb(20,20),folder:function(c){return[Ra(c,["tabWidth","tabHeight"],function(k){var q=Math.max(0,Math.min(k.width,mxUtils.getValue(this.state.style,"tabWidth",F.prototype.tabWidth))),l=Math.max(0,Math.min(k.height,mxUtils.getValue(this.state.style,
+"tabHeight",F.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=k.width-q);return new mxPoint(k.x+q,k.y+l)},function(k,q){var l=Math.max(0,Math.min(k.width,q.x-k.x));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(l=k.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(k.height,q.y-k.y)))},!1)]},document:function(c){return[Ra(c,
+["size"],function(k){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));return new mxPoint(k.x+3*k.width/4,k.y+(1-q)*k.height)},function(k,q){this.state.style.size=Math.max(0,Math.min(1,(k.y+k.height-q.y)/k.height))},!1)]},tape:function(c){return[Ra(c,["size"],function(k){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(k.getCenterX(),k.y+q*k.height/2)},function(k,q){this.state.style.size=
+Math.max(0,Math.min(1,(q.y-k.y)/k.height*2))},!1)]},isoCube2:function(c){return[Ra(c,["isoAngle"],function(k){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(k.x,k.y+Math.min(k.width*Math.tan(q),.5*k.height))},function(k,q){this.state.style.isoAngle=Math.max(0,50*(q.y-k.y)/k.height)},!0)]},cylinder2:Xa(x.prototype.size),cylinder3:Xa(B.prototype.size),offPageConnector:function(c){return[Ra(c,["size"],function(k){var q=
+Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(k.getCenterX(),k.y+(1-q)*k.height)},function(k,q){this.state.style.size=Math.max(0,Math.min(1,(k.y+k.height-q.y)/k.height))},!1)]},"mxgraph.basic.rect":function(c){var k=[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});k.push(c);return k},step:qb(ra.prototype.size,!0,null,!0,ra.prototype.fixedSize),hexagon:qb(K.prototype.size,!0,.5,!0,K.prototype.fixedSize),
+curlyBracket:qb(ba.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:sb(1,d.prototype.size,!1),card:sb(.5,C.prototype.size,!0),loopLimit:sb(.5,G.prototype.size,!0),trapezoid:ub(.5,R.prototype.size,R.prototype.fixedSize),parallelogram:ub(1,T.prototype.size,T.prototype.fixedSize)};Graph.createHandle=Ra;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var k=
+this.state.style.shape;null==mxCellRenderer.defaultShapes[k]&&null==mxStencilRegistry.getStencil(k)?k=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(k=mxConstants.SHAPE_SWIMLANE);k=rb[k];null==k&&null!=this.state.shape&&this.state.shape.isRoundable()&&(k=rb[mxConstants.SHAPE_RECTANGLE]);null!=k&&(k=k(this.state),null!=k&&(c=null==c?k:c.concat(k)))}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 ib=new mxPoint(1,0),jb=new mxPoint(1,0),mb=mxUtils.toRadians(-30);ib=mxUtils.getRotatedPoint(ib,Math.cos(mb),Math.sin(mb));var ob=mxUtils.toRadians(-150);jb=mxUtils.getRotatedPoint(jb,Math.cos(ob),Math.sin(ob));mxEdgeStyle.IsometricConnector=function(c,k,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!=k&&(I=new mxPoint(k.getCenterX(),k.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=ib.x,Z=ib.y,M=jb.x,Ca=jb.y,Qa="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=w&&null!=I){c=function(la,pa,oa){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-M*ma)/(y*Ca-Z*M);la=(Z*la-y*ma)/(Z*M-y*Ca);Qa?(oa&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca*
+la)):(oa&&(Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa));p.push(Ka)};var Ka=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 yb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,k){if(k==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return yb.apply(this,arguments)};
+e.prototype.constraints=[];h.prototype.getConstraints=function(c,k,q){c=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(k,q/(.5+l));k=(k-l)/2;q=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k+.5*l,q+l*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k+l,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k+l,q+.75*l));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,k+.5*l,q+(1-p)*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,q+.75*l));return c};r.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;l=Math.min(k*Math.tan(l),.5*q);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,k,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};fa.prototype.getConstraints=function(c,k,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=k*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,k,.5*(q-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,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)));k>=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))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.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};C.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};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};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,
+.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,Math.min(k,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*(k-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,.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));k>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};C.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,Math.min(k,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*(k+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));k>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));return c};d.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,Math.min(k,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*(k-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,l));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,k,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+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,k,q){c=[];k=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,k));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,k));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-k));c.push(new mxConnectionConstraint(new mxPoint(0,
+1),!1,null,0,-k));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,k+.5*(.5*q-k)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,k+.5*(.5*q-k)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,q-k-.5*(.5*q-k)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-k-.5*(.5*q-k)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*k));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*k));c.push(new mxConnectionConstraint(new mxPoint(.855,
+1),!1,null,0,.29*-k));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-k));return c};F.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,Math.min(k,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*(k+l),p))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(k-l),p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,.25*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,.5*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,.75*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,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;Y.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;La.prototype.constraints=mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.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};Ba.prototype.getConstraints=function(c,h,q){h=parseFloat(mxUtils.getValue(c,"jettyWidth",Ba.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Ba.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};G.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),
+mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;La.prototype.constraints=mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(c,k,q){c=[];var l=Math.min(k,q/2),p=Math.min(k-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))*k);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+k-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+k-l),q));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p,q));return c};Ba.prototype.getConstraints=function(c,k,q){k=parseFloat(mxUtils.getValue(c,"jettyWidth",Ba.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Ba.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,k),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,k),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,k));q>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,k));q>15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,k));return l};G.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)];J.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)];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(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,
@@ -3461,285 +3469,285 @@ new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(n
.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)];S.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;R.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;cb.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,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*p));return c};Za.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,.5*(h+l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,
+.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)];T.prototype.constraints=mxRectangleShape.prototype.constraints;R.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,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;cb.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,
+Math.min(k,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,k,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,.75*k+.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+l),q));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-l),q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),
+!1,null,.5*(k-l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*k-.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*p));return c};Za.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,Math.min(k,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,k,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(q+p)));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));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return c};kb.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ca.prototype.getConstraints=function(c,h,q){c=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));l=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,l));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-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-p),q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));return c};t.prototype.getConstraints=function(c,h,q){c=[];var l=q*Math.max(0,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));l=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),
-!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return c};Ha.prototype.getConstraints=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,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ca.prototype.getConstraints=function(c,k,q){c=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),p=k*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));l=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-p),l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-p),q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));return c};t.prototype.getConstraints=function(c,k,q){c=[];var l=q*Math.max(0,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth)))),p=k*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));l=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),
+!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return c};Ha.prototype.getConstraints=function(c,k,q){c=[];var l=Math.min(q,k),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=(k-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,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*(k+p),l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+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};da.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)];Ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ua.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){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,D){D.getModel().beginUpdate();try{var F=D.getCellGeometry(m);null!=F&&x&&B&&(x/=B,F=F.clone(),1<x?F.height=F.width/x:F.width=F.height*x,D.getModel().setGeometry(m,
-F));D.setCellStyles(mxConstants.STYLE_CLIP_PATH,r,[m]);D.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[m])}finally{D.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 D=!0,F=0;F<
-B.length&&D;F++)D=D&&d.model.isEdge(B[F]);var I=d.view.translate;F=d.view.scale;var C=I.x,N=I.y;I=null;if(1==B.length&&D){var R=d.getCellGeometry(B[0]);null!=R&&(I=R.getTerminalPoint(!0))}I=null!=I?I:d.getBoundingBoxFromGeometry(B,D);null!=I&&(D=Math.round(d.snap(d.popupMenuHandler.triggerX/F-C)),F=Math.round(d.snap(d.popupMenuHandler.triggerY/F-N)),d.cellsMoved(B,D-I.x,F-I.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,I){var C=B.getValue(F);I=F.cloneValue(I);I.removeAttribute("placeholders");null==C||isNaN(C.nodeType)||I.setAttribute("placeholders",C.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||I.setAttribute("label",d.convertValueToString(F));B.setValue(F,I)}m=null!=r?r:m;var B=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedValue){B.beginUpdate();
-try{var D=d.getEditableCells(d.getSelectionCells());if(0==D.length)x(B.getRoot(),e.copiedValue);else for(r=0;r<D.length;r++)x(D[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,D){x=mxUtils.trim(x);d.setLinkForCell(m,0<x.length?x:null);d.setAttributeForCell(m,"linkTarget",D)},!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,D=d.getLinkTitle(m);null!=r&&0<r.length&&(B=r[0].iconUrl,
-D=r[0].name||r[0].type,D=D.charAt(0).toUpperCase()+D.substring(1),30<D.length&&(D=D.substring(0,30)+"..."));r=new mxCell(D,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"),
-D=0;D<B.length&&null==r;D++)B[D].textContent==m.textContent&&(r=B[D]);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(I){d.cellEditor.restoreSelection(F);null!=I&&d.insertLink(I)}))}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];d.getModel().isVertex(x)&&(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 D=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(D);D=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,D);d.setCellStyles("html",m,[r[x]])}else"0"==
-B&&"1"==m&&(D=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(D)),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 D=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,D);(r&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?d.updateLabelElements(D,function(I){I.style.fontWeight=null;"B"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(D,function(I){I.style.fontStyle=null;"I"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(D,function(I){I.style.textDecoration=null;"U"==I.nodeName&&d.replaceElement(I)});for(var F=0;F<D.length;F++)0==d.model.getChildCount(D[F])&&d.autoSizeCell(D[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,D=x.x;x=x.y;m=d.getModel().getParent(m);for(var F=d.getCellGeometry(m);d.getModel().isVertex(m)&&null!=F;)D+=F.x,x+=F.y,m=
-d.getModel().getParent(m),F=d.getCellGeometry(m);D=Math.round(d.snap(d.popupMenuHandler.triggerX/B-D));B=Math.round(d.snap(d.popupMenuHandler.triggerY/B-x));r.addPointAt(r.state,D,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 D=x[B];if(d.getModel().isEdge(D)){var F=d.getCellGeometry(D);null!=r&&mxEvent.isShiftDown(m)?(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[D]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[D]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[D]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[D])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,d.getModel().setGeometry(D,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 D=d.cellEditor.saveSelection();e.showImageDialog(m,x,function(F,I,C,N,R,S){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(D),d.insertImage(F,I,C);else{var Q=d.getSelectionCells();if(null!=F&&(0<F.length||0<Q.length)){var aa=null;d.getModel().beginUpdate();try{if(0==Q.length){Q=[d.insertVertex(d.getDefaultParent(),null,"",0,0,I,C,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var U=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(Q,!0));Q[0].geometry.x=U.x;Q[0].geometry.y=U.y;null!=N&&f(Q[0],N,R,S,d);aa=Q;d.fireEvent(new mxEventObject("cellsInserted","cells",aa))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,Q);var P=d.getCurrentCellStyle(Q[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",Q):0==F.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,Q);null==N&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,Q);if(null!=I&&null!=C)for(F=0;F<Q.length;F++){var X=Q[F];if("0"!=d.getCurrentCellStyle(X).expand){var ja=d.getModel().getGeometry(X);null!=ja&&(ja=ja.clone(),ja.width=I,ja.height=C,d.getModel().setGeometry(X,ja))}null!=N&&f(X,N,R,S,d)}}finally{d.getModel().endUpdate()}null!=aa&&(d.setSelectionCells(aa),d.scrollCellToVisible(aa[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(D,F,I){f(m,D,F,I,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("format",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return e.isFormatPanelVisible()}));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};
+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,D){D.getModel().beginUpdate();try{var F=D.getCellGeometry(m);null!=F&&x&&B&&(x/=B,F=F.clone(),1<x?F.height=F.width/x:F.width=F.height*x,D.getModel().setGeometry(m,
+F));D.setCellStyles(mxConstants.STYLE_CLIP_PATH,r,[m]);D.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[m])}finally{D.getModel().endUpdate()}}var d=this.editorUi,g=d.editor,e=g.graph,h=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=h;this.addAction("save",function(){d.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){d.saveFile(!0)},null,
+null,Editor.ctrlKey+"+Shift+S").isEnabled=h;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=h;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 D=!0,F=0;F<
+B.length&&D;F++)D=D&&e.model.isEdge(B[F]);var H=e.view.translate;F=e.view.scale;var C=H.x,N=H.y;H=null;if(1==B.length&&D){var Q=e.getCellGeometry(B[0]);null!=Q&&(H=Q.getTerminalPoint(!0))}H=null!=H?H:e.getBoundingBoxFromGeometry(B,D);null!=H&&(D=Math.round(e.snap(e.popupMenuHandler.triggerX/F-C)),F=Math.round(e.snap(e.popupMenuHandler.triggerY/F-N)),e.cellsMoved(B,D-H.x,F-H.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(F,H){var C=B.getValue(F);H=F.cloneValue(H);H.removeAttribute("placeholders");null==C||isNaN(C.nodeType)||H.setAttribute("placeholders",C.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||H.setAttribute("label",e.convertValueToString(F));B.setValue(F,H)}m=null!=r?r:m;var B=e.getModel();if(e.isEnabled()&&!e.isSelectionEmpty()&&null!=d.copiedValue){B.beginUpdate();
+try{var D=e.getEditableCells(e.getSelectionCells());if(0==D.length)x(B.getRoot(),d.copiedValue);else for(r=0;r<D.length;r++)x(D[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,D){x=mxUtils.trim(x);e.setLinkForCell(m,0<x.length?x:null);e.setAttributeForCell(m,"linkTarget",D)},!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=h;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,D=e.getLinkTitle(m);null!=r&&0<r.length&&(B=r[0].iconUrl,
+D=r[0].name||r[0].type,D=D.charAt(0).toUpperCase()+D.substring(1),30<D.length&&(D=D.substring(0,30)+"..."));r=new mxCell(D,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=h;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"),
+D=0;D<B.length&&null==r;D++)B[D].textContent==m.textContent&&(r=B[D]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",e.selectNode(r));var F=e.cellEditor.saveSelection();d.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(H){e.cellEditor.restoreSelection(F);null!=H&&e.insertLink(H)}))}else e.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;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];e.getModel().isVertex(x)&&(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 D=e.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=e.sanitizeHtml(D);D=mxUtils.extractTextWithWhitespace(F.childNodes);e.cellLabelChanged(state.cell,D);e.setCellStyles("html",m,[r[x]])}else"0"==
+B&&"1"==m&&(D=mxUtils.htmlEntities(e.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"<br/>")),e.cellLabelChanged(state.cell,e.sanitizeHtml(D)),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=h;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=h;n=this.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.editor.autosave});n.isEnabled=h;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 D=e.getEditableCells(e.getSelectionCells());e.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,D);(r&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?e.updateLabelElements(D,function(H){H.style.fontWeight=null;"B"==H.nodeName&&e.replaceElement(H)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?e.updateLabelElements(D,function(H){H.style.fontStyle=null;"I"==H.nodeName&&e.replaceElement(H)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&e.updateLabelElements(D,function(H){H.style.textDecoration=null;"U"==H.nodeName&&e.replaceElement(H)});for(var F=0;F<D.length;F++)0==e.model.getChildCount(D[F])&&e.autoSizeCell(D[F],
+!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,D=x.x;x=x.y;m=e.getModel().getParent(m);for(var F=e.getCellGeometry(m);e.getModel().isVertex(m)&&null!=F;)D+=F.x,x+=F.y,m=
+e.getModel().getParent(m),F=e.getCellGeometry(m);D=Math.round(e.snap(e.popupMenuHandler.triggerX/B-D));B=Math.round(e.snap(e.popupMenuHandler.triggerY/B-x));r.addPointAt(r.state,D,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 D=x[B];if(e.getModel().isEdge(D)){var F=e.getCellGeometry(D);null!=r&&mxEvent.isShiftDown(m)?(e.setCellStyles(mxConstants.STYLE_EXIT_X,null,[D]),e.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[D]),e.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[D]),e.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[D])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,e.getModel().setGeometry(D,F))}}}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 D=e.cellEditor.saveSelection();d.showImageDialog(m,x,function(F,H,C,N,Q,T){if(e.cellEditor.isContentEditing())e.cellEditor.restoreSelection(D),e.insertImage(F,H,C);else{var R=e.getSelectionCells();if(null!=F&&(0<F.length||0<R.length)){var ba=null;e.getModel().beginUpdate();try{if(0==R.length){R=[e.insertVertex(e.getDefaultParent(),null,"",0,0,H,C,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var S=e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(R,!0));R[0].geometry.x=S.x;R[0].geometry.y=S.y;null!=N&&f(R[0],N,Q,T,e);ba=R;e.fireEvent(new mxEventObject("cellsInserted","cells",ba))}e.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,R);var P=e.getCurrentCellStyle(R[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?e.setCellStyles(mxConstants.STYLE_SHAPE,"image",R):0==F.length&&e.setCellStyles(mxConstants.STYLE_SHAPE,null,R);null==N&&e.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,R);if(null!=H&&null!=C)for(F=0;F<R.length;F++){var X=R[F];if("0"!=e.getCurrentCellStyle(X).expand){var ja=e.getModel().getGeometry(X);null!=ja&&(ja=ja.clone(),ja.width=H,ja.height=C,e.getModel().setGeometry(X,ja))}null!=N&&f(X,N,Q,T,e)}}finally{e.getModel().endUpdate()}null!=ba&&(e.setSelectionCells(ba),e.scrollCellToVisible(ba[0]))}}},e.cellEditor.isContentEditing(),!e.cellEditor.isContentEditing(),!0,B)}}).isEnabled=h;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(D,F,H){f(m,D,F,H,e)}),d.showDialog(r.container,300,390,!0,!0))}}).isEnabled=h;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("format",mxUtils.bind(this,function(){d.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return d.isFormatPanelVisible()}));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=h};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};
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.autoPopup=!0;
-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"),D=0;D<B.length;D++)if("3"==B[D].getAttribute("size")){B[D].removeAttribute("size");B[D].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("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);e.addSeparator(g);this.addSubmenu("distributeSpacing",e,g,mxResources.get("spacing"))})));this.put("distributeSpacing",new Menu(mxUtils.bind(this,function(e,
-g){e.addItem(mxResources.get("horizontal"),null,function(){b.distributeCells(!0,null,!0)},g);e.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1,null,!0)},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?["format"]:[]).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,["format"],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){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&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,
+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}),h=0;h<this.defaultFonts.length;h++)e(this.defaultFonts[h]);d.addSeparator(g);if(0<this.customFonts.length){for(h=0;h<this.customFonts.length;h++)e(this.customFonts[h]);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(h,n){return d.addItem(h,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 h=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var B=b.cellEditor.textarea.getElementsByTagName("font"),D=0;D<B.length;D++)if("3"==B[D].getAttribute("size")){B[D].removeAttribute("size");B[D].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(){h(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),h(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("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);d.addSeparator(g);this.addSubmenu("distributeSpacing",d,g,mxResources.get("spacing"))})));this.put("distributeSpacing",new Menu(mxUtils.bind(this,function(d,
+g){d.addItem(mxResources.get("horizontal"),null,function(){b.distributeCells(!0,null,!0)},g);d.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1,null,!0)},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)}),h=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,h(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,h(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,h(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?["format"]:[]).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,["format"],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],h=0;h<e.length;h++)(function(n){d.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(e[h]);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){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&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),h=f.isStack(d)||f.isStackChild(d),n=e,u=e;h&&(g=f.isStack(d)?g:f.getCellStyle(f.model.getParent(d)),u="0"==g.horizontalStack,n=!u);null!=b||!e&&!h?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
r,x,B,D){r=D||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(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(D){n=d.getParentByName(mxEvent.getSource(D),"TD");var F=!1;if(null!=n){k=d.getParentByName(n,"TR");var I=mxEvent.isMouseEvent(D)?2:4,C=x,N=Math.min(20,k.sectionRowIndex+I);I=Math.min(20,n.cellIndex+I);for(var R=C.rows.length;R<N;R++)for(var S=C.insertRow(R),Q=0;Q<C.rows[0].cells.length;Q++)S.insertCell(-1);for(R=0;R<C.rows.length;R++)for(S=C.rows[R],Q=S.cells.length;Q<I;Q++)S.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+
-1);for(C=0;C<x.rows.length;C++)for(N=x.rows[C],I=0;I<N.cells.length;I++)R=N.cells[I],C==k.sectionRowIndex&&I==n.cellIndex&&(F="blue"==R.style.backgroundColor),R.style.backgroundColor=C<=k.sectionRowIndex&&I<=n.cellIndex?"blue":"transparent"}mxEvent.consume(D);return F}e=null!=e?e:!0;b=null!=b?b:mxUtils.bind(this,function(D,F,I){var C=this.editorUi.editor.graph;if(null!=C.getParentByName(mxEvent.getSource(D),"TD")&&null!=C.cellEditor.textarea){var N=C.cellEditor.textarea.getElementsByTagName("table");
-D=[];for(var R=0;R<N.length;R++)D.push(N[R]);C.container.focus();R=C.pasteHtmlAtCaret;N=["<table>"];for(var S=0;S<F;S++){N.push("<tr>");for(var Q=0;Q<I;Q++)N.push("<td><br></td>");N.push("</tr>")}N.push("</table>");F=N.join("");R.call(C,F);F=C.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(R=F.length-1;0<=R;R--)if(0==R||F[R]!=D[R-1]){C.selectNode(F[R].rows[0].cells[0]);break}}});var d=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{h?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{h?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{h?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{h?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{h?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{h?
+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(D){n=e.getParentByName(mxEvent.getSource(D),"TD");var F=!1;if(null!=n){h=e.getParentByName(n,"TR");var H=mxEvent.isMouseEvent(D)?2:4,C=x,N=Math.min(20,h.sectionRowIndex+H);H=Math.min(20,n.cellIndex+H);for(var Q=C.rows.length;Q<N;Q++)for(var T=C.insertRow(Q),R=0;R<C.rows[0].cells.length;R++)T.insertCell(-1);for(Q=0;Q<C.rows.length;Q++)for(T=C.rows[Q],R=T.cells.length;R<H;R++)T.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(h.sectionRowIndex+
+1);for(C=0;C<x.rows.length;C++)for(N=x.rows[C],H=0;H<N.cells.length;H++)Q=N.cells[H],C==h.sectionRowIndex&&H==n.cellIndex&&(F="blue"==Q.style.backgroundColor),Q.style.backgroundColor=C<=h.sectionRowIndex&&H<=n.cellIndex?"blue":"transparent"}mxEvent.consume(D);return F}d=null!=d?d:!0;b=null!=b?b:mxUtils.bind(this,function(D,F,H){var C=this.editorUi.editor.graph;if(null!=C.getParentByName(mxEvent.getSource(D),"TD")&&null!=C.cellEditor.textarea){var N=C.cellEditor.textarea.getElementsByTagName("table");
+D=[];for(var Q=0;Q<N.length;Q++)D.push(N[Q]);C.container.focus();Q=C.pasteHtmlAtCaret;N=["<table>"];for(var T=0;T<F;T++){N.push("<tr>");for(var R=0;R<H;R++)N.push("<td><br></td>");N.push("</tr>")}N.push("</table>");F=N.join("");Q.call(C,F);F=C.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(Q=F.length-1;0<=Q;Q--)if(0==Q||F[Q]!=D[Q-1]){C.selectNode(F[Q].rows[0].cells[0]);break}}});var e=this.editorUi.editor.graph,h=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";f=a.getElementsByTagName("td");1<f.length&&(f[1].style.display="none",f[2].style.display="none");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(D){mxEvent.consume(D)}));mxEvent.addGestureListeners(u,null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));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(D){mxEvent.consume(D)}));mxEvent.addGestureListeners(m,
-null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));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(D,F){var I=document.createElement("table");I.setAttribute("border","1");I.style.borderCollapse="collapse";I.style.borderStyle="solid";I.setAttribute("cellPadding","8");for(var C=0;C<D;C++)for(var N=I.insertRow(C),R=0;R<F;R++)N.insertCell(-1);
-return I}(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(D){var F=g(D);null!=n&&null!=k&&F&&(b(D,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 D=u.getCellGeometry(B);null!=D&&(D=D.clone(),D.points=null,u.getModel().setGeometry(B,D))}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 D=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(D){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)};
+null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));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(D,F){var H=document.createElement("table");H.setAttribute("border","1");H.style.borderCollapse="collapse";H.style.borderStyle="solid";H.setAttribute("cellPadding","8");for(var C=0;C<D;C++)for(var N=H.insertRow(C),Q=0;Q<F;Q++)N.insertCell(-1);
+return H}(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(D){var F=g(D);null!=n&&null!=h&&F&&(b(D,h.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,h,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(h){var D=u.getCellGeometry(B);null!=D&&(D=D.clone(),D.points=null,u.getModel().setGeometry(B,D))}for(var F=0;F<f.length;F++)u.setCellStyles(f[F],d[F],[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,h,n,u){var m=this.createStyleChangeFunction(f,d);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=h&&r.cellEditor.isContentEditing()?h():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,h=0;h<a.length;h++)if(d.setCellStyles(a[h],b[h],g),a[h]==mxConstants.STYLE_ALIGN&&d.updateLabelElements(g,function(n){n.removeAttribute("align");n.style.textAlign=null}),a[h]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[h])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,h,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 D=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(D){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()}),e,u,h)};
+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 h=g.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,f||g.shapeForegroundColor,mxUtils.bind(this,function(u){g.cellEditor.restoreSelection(h);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(h)});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 h=this.editorUi.actions.get(b);return null!=h&&(a.showDisabled||h.isEnabled())&&h.visible?(b=a.addItem(e||h.label,null,function(n){h.funct(d,n)},f,g,h.isEnabled()),h.toggleAction&&h.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,h),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)};
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 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"],
+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"],
null,f)};
-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.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 h=!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)&&(h=this.editorUi.actions.get("removeWaypoint"),h.handler=g,h.index=e,h=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[h?"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.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 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){this.editorUi.menus.autoPopup&&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){this.editorUi.menusautoPopup||null==this.editorUi.currentMenu||this.editorUi.currentMenuElt==a||this.editorUi.hideCurrentMenu();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)}
+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 h=mxUtils.getOffset(a);e.popup(h.x,h.y+a.offsetHeight,null,
+g);this.editorUi.setCurrentMenu(e,a)}mxEvent.consume(g)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(g){this.editorUi.menus.autoPopup&&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){!this.editorUi.menus.autoPopup&&null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&mxEvent.isMouseEvent(g)&&this.editorUi.hideCurrentMenu();
+f=null==this.editorUi.currentMenu;g.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){d(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(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();
+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();
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,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=
+Toolbar.prototype.addDropDownArrow=function(a,b,f,d,g,e,h,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=d-(null!=h?h: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=
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 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,D,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+("0"+Number(D).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,D,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+
-("0"+Number(D).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)};
+" ("+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(h){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,h);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(h){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,h);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(h){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,h);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 h=b.getSelectedElement(),n=b.getParentByNames(h,["TD","TH"],b.cellEditor.text2),u=b.getParentByName(h,"TR",b.cellEditor.text2);if(null==u)this.editorUi.menus.addInsertTableItem(e);else{var m=b.getParentByName(u,"TABLE",b.cellEditor.text2);h=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");h.setAttribute("title",mxResources.get("insertColumnBefore"));
+h=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");h.setAttribute("title",mxResources.get("insertColumnAfter"));h=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");h.setAttribute("title",mxResources.get("deleteColumn"));
+h=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");h.setAttribute("title",mxResources.get("insertRowBefore"));h=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");h.setAttribute("title",mxResources.get("insertRowAfter"));h=e.addItem("",
+null,mxUtils.bind(this,function(){try{b.deleteRow(m,u.sectionRowIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deleterow");h.setAttribute("title",mxResources.get("deleteRow"));h=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,D,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+("0"+Number(D).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");h.setAttribute("title",mxResources.get("borderColor"));h=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,D,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+
+("0"+Number(D).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");h.setAttribute("title",mxResources.get("backgroundColor"));h=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");h.setAttribute("title",mxResources.get("spacing"));h=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");h.setAttribute("title",mxResources.get("left"));h=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");
+h.setAttribute("title",mxResources.get("center"));h=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");h.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,h){var n=this.editorUi.menus.get(d),u=this.addMenuFunction(a,b,f,function(){n.funct.apply(n,arguments)},g,e);h||"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)};
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,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.style.maxWidth="100%";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 I=k.value;/(^#?[a-zA-Z0-9]*$)/.test(I)?
-("none"!=I&&"#"!=I.charAt(0)&&(I="#"+I),ColorDialog.addRecentColor("none"!=I?I.substring(1):I,12),n(I),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var I=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);I.style.marginBottom="8px";return I}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(I,C,N,R){C=null!=C?C:12;var S=document.createElement("table");S.style.borderCollapse=
-"collapse";S.setAttribute("cellspacing","0");S.style.marginBottom="20px";S.style.cellSpacing="0px";S.style.marginLeft="1px";var Q=document.createElement("tbody");S.appendChild(Q);for(var aa=I.length/C,U=0;U<aa;U++){for(var P=document.createElement("tr"),X=0;X<C;X++)mxUtils.bind(this,function(ja){var fa=document.createElement("td");fa.style.border="0px solid black";fa.style.padding="0px";fa.style.width="16px";fa.style.height="16px";null==ja&&(ja=N);if(null!=ja){fa.style.borderWidth="1px";"none"==ja?
-fa.style.background="url('"+Dialog.prototype.noColorImage+"')":fa.style.backgroundColor="#"+ja;var ra=this.colorNames[ja.toUpperCase()];null!=ra&&fa.setAttribute("title",ra)}P.appendChild(fa);null!=ja&&(fa.style.cursor="pointer",mxEvent.addListener(fa,"click",function(){"none"==ja?(u.fromString("ffffff"),k.value="none"):u.fromString(ja)}),mxEvent.addListener(fa,"dblclick",g))})(I[U*C+X]);Q.appendChild(P)}R&&(I=document.createElement("td"),I.setAttribute("title",mxResources.get("reset")),I.style.border=
-"1px solid black",I.style.padding="0px",I.style.width="16px",I.style.height="16px",I.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",I.style.backgroundPosition="center center",I.style.backgroundRepeat="no-repeat",I.style.cursor="pointer",P.appendChild(I),mxEvent.addListener(I,"click",function(){ColorDialog.resetRecentColors();S.parentNode.replaceChild(d(),S)}));m.appendChild(S);return S});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 D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});D.className="geBtn";a.editor.cancelFirst&&B.appendChild(D);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";B.appendChild(F);a.editor.cancelFirst||B.appendChild(D);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(I){27==I.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(I))});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,d){if(null!=f){var g=this.editorUi.editor.graph,e=null,h=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(h&&(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)}h=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){h=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.style.maxWidth="100%";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 H=h.value;/(^#?[a-zA-Z0-9]*$)/.test(H)?
+("none"!=H&&"#"!=H.charAt(0)&&(H="#"+H),ColorDialog.addRecentColor("none"!=H?H.substring(1):H,12),n(H),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function e(){var H=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);H.style.marginBottom="8px";return H}this.editorUi=a;var h=document.createElement("input");h.style.marginBottom="10px";mxClient.IS_IE&&(h.style.marginTop="10px",document.body.appendChild(h));var n=null!=f?f:this.createApplyFunction();
+this.init=function(){mxClient.IS_TOUCH||h.focus()};var u=new mxJSColor.color(h);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(H,C,N,Q){C=null!=C?C: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 R=document.createElement("tbody");T.appendChild(R);for(var ba=H.length/C,S=0;S<ba;S++){for(var P=document.createElement("tr"),X=0;X<C;X++)mxUtils.bind(this,function(ja){var fa=document.createElement("td");fa.style.border="0px solid black";fa.style.padding="0px";fa.style.width="16px";fa.style.height="16px";null==ja&&(ja=N);if(null!=ja){fa.style.borderWidth="1px";"none"==ja?
+fa.style.background="url('"+Dialog.prototype.noColorImage+"')":fa.style.backgroundColor="#"+ja;var ra=this.colorNames[ja.toUpperCase()];null!=ra&&fa.setAttribute("title",ra)}P.appendChild(fa);null!=ja&&(fa.style.cursor="pointer",mxEvent.addListener(fa,"click",function(){"none"==ja?(u.fromString("ffffff"),h.value="none"):u.fromString(ja)}),mxEvent.addListener(fa,"dblclick",g))})(H[S*C+X]);R.appendChild(P)}Q&&(H=document.createElement("td"),H.setAttribute("title",mxResources.get("reset")),H.style.border=
+"1px solid black",H.style.padding="0px",H.style.width="16px",H.style.height="16px",H.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.style.cursor="pointer",P.appendChild(H),mxEvent.addListener(H,"click",function(){ColorDialog.resetRecentColors();T.parentNode.replaceChild(e(),T)}));m.appendChild(T);return T});f.appendChild(h);if(mxClient.IS_IE||mxClient.IS_IE11)h.style.width="216px";else{h.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?h.focus():(x.value="#"+h.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 D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});D.className="geBtn";a.editor.cancelFirst&&B.appendChild(D);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";B.appendChild(F);a.editor.cancelFirst||B.appendChild(D);null!=b&&("none"==b?(u.fromString("ffffff"),h.value="none"):u.fromString(b));
+f.appendChild(B);this.picker=u;this.colorInput=h;mxEvent.addListener(f,"keydown",function(H){27==H.keyCode&&(a.hideDialog(),null!=d&&d(),mxEvent.consume(H))});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,e,g,d,k,n,u,m,r,x,B,D,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 I=n.cloneNode(!1),C=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";I.style.top="20px";I.style.bottom="64px";C.style.bottom="0px";C.style.height="60px";C.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(I);k.appendChild(C);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};I.appendChild(N);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",C.appendChild(b));if(null!=D)for(b=0;b<D.length;b++)(function(S,
-Q,aa){S=mxUtils.button(S,function(U){Q(U,N)});null!=aa&&S.setAttribute("title",aa);S.className="geBtn";C.appendChild(S)})(D[b][0],D[b][1],D[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&&C.appendChild(d);null!=u&&u(C,N);if(null!=e){var R=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();e(N.value)});R.setAttribute("title","Ctrl+Enter");R.className="geBtn gePrimaryBtn";
-C.appendChild(R);mxEvent.addListener(N,"keypress",function(S){13==S.keyCode&&mxEvent.isControlDown(S)&&R.click()})}a.editor.cancelFirst||C.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 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)});
-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 P=r.value,X=P.lastIndexOf(".");r.value=0<X?P.substring(0,X+1)+x.value:P+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),D.setAttribute("disabled","true"),F.setAttribute("disabled","true"),Q.setAttribute("disabled","true")):(B.removeAttribute("disabled"),D.removeAttribute("disabled"),F.removeAttribute("disabled"),Q.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?R.removeAttribute("disabled"):R.setAttribute("disabled",
-"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled");"png"===x.value?(I.removeAttribute("disabled"),C.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"))}function f(){D.style.backgroundColor=D.value*F.value>MAX_AREA||0>=D.value?"red":"";F.style.backgroundColor=D.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);
+"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,h,n,u,m,r,x,B,D,F){m=null!=m?m:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";n=document.createElement("div");
+n.style.position="absolute";n.style.left="0px";n.style.right="0px";var H=n.cloneNode(!1),C=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";H.style.top="20px";H.style.bottom="64px";C.style.bottom="0px";C.style.height="60px";C.style.textAlign="center";mxUtils.write(n,b);h.appendChild(n);h.appendChild(H);h.appendChild(C);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};H.appendChild(N);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",C.appendChild(b));if(null!=D)for(b=0;b<D.length;b++)(function(T,
+R,ba){T=mxUtils.button(T,function(S){R(S,N)});null!=ba&&T.setAttribute("title",ba);T.className="geBtn";C.appendChild(T)})(D[b][0],D[b][1],D[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&&C.appendChild(e);null!=u&&u(C,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";
+C.appendChild(Q);mxEvent.addListener(N,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&Q.click()})}a.editor.cancelFirst||C.appendChild(e);this.container=h},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(h){h.stopPropagation();h.preventDefault()},!1),f.addEventListener("drop",function(h){h.stopPropagation();h.preventDefault();if(0<h.dataTransfer.files.length){h=h.dataTransfer.files[0];var n=new FileReader;n.onload=function(u){f.value=u.target.result};
+n.readAsText(h)}else f.value=a.extractGraphModelFromEvent(h)},!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 h=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(h);else if("replace"==g.value){a.editor.graph.model.beginUpdate();
+try{a.editor.setGraphXml(mxUtils.parseXml(h).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(h),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 P=r.value,X=P.lastIndexOf(".");r.value=0<X?P.substring(0,X+1)+x.value:P+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),D.setAttribute("disabled","true"),F.setAttribute("disabled","true"),R.setAttribute("disabled","true")):(B.removeAttribute("disabled"),D.removeAttribute("disabled"),F.removeAttribute("disabled"),R.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?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled");"png"===x.value?(H.removeAttribute("disabled"),C.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"))}function f(){D.style.backgroundColor=D.value*F.value>MAX_AREA||0>=D.value?"red":"";F.style.backgroundColor=D.value*F.value>MAX_AREA||0>=F.value?"red":""}var d=a.editor.graph,g=d.getGraphBounds(),e=d.view.scale,h=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);
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);a.printPdfExport||(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 D=document.createElement("input");D.setAttribute("value",k);D.style.width="180px";m=document.createElement("td");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("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 I=document.createElement("select");I.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");I.appendChild(m);
-m=document.createElement("option");m.setAttribute("value","300");mxUtils.write(m,"300dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));I.appendChild(m);var C=document.createElement("input");C.style.width="180px";C.style.display="none";C.setAttribute("value","100");C.setAttribute("type","number");C.setAttribute("min",
-"50");C.setAttribute("step","50");var N=!1;mxEvent.addListener(I,"change",function(){"custom"==this.value?(this.style.display="none",C.style.display="",C.focus()):(C.value=this.value,N||(B.value=this.value))});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value);isNaN(P)||0>=P?C.style.backgroundColor="red":(C.style.backgroundColor="",N||(B.value=P))});m=document.createElement("td");m.appendChild(I);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("background")+":");g.appendChild(m);var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=null==e.background||e.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(R);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 S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=!1;m=document.createElement("td");m.appendChild(S);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 Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("value",ExportDialog.lastBorderValue);Q.style.width="180px";m=document.createElement("td");m.appendChild(Q);
-g.appendChild(m);u.appendChild(g);d.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){N=!0;var P=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*P).toFixed(2));0<k?(D.value=Math.floor(k*P),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(D,"change",function(){var P=parseInt(D.value)/k;0<P?(B.value=parseFloat((100*P).toFixed(2)),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(F,
-"change",function(){var P=parseInt(F.value)/n;0<P?(B.value=parseFloat((100*P).toFixed(2)),D.value=Math.floor(k*P)):(B.value="100",D.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 aa=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=r.value,X=x.value,ja=Math.max(0,parseFloat(B.value)||
-100)/100,fa=Math.max(0,parseInt(Q.value)),ra=e.background,K=Math.max(1,parseInt(C.value));if(("svg"==X||"png"==X||"pdf"==X)&&R.checked)ra=null;else if(null==ra||ra==mxConstants.NONE)ra="#ffffff";ExportDialog.lastBorderValue=fa;ExportDialog.exportFile(a,P,X,ra,ja,fa,K,S.checked)}}));aa.className="geBtn gePrimaryBtn";var U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});U.className="geBtn";a.editor.cancelFirst?(m.appendChild(U),m.appendChild(aa)):(m.appendChild(aa),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<S.value.length?Q.removeAttribute("disabled"):Q.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=[],D=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,I=function(U,P){var X=document.createElement("div");X.style.position="relative";X.style.paddingRight="20px";X.style.boxSizing="border-box";X.style.width="100%";var ja=document.createElement("a"),fa=mxUtils.createImage(Dialog.prototype.closeImage);fa.style.height="9px";fa.style.fontSize="9px";fa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ja.className="geButton";ja.setAttribute("title",
-mxResources.get("delete"));ja.style.position="absolute";ja.style.top="4px";ja.style.right="0px";ja.style.margin="0px";ja.style.width="9px";ja.style.height="9px";ja.style.cursor="pointer";ja.appendChild(fa);P=function(ra){return function(){for(var K=0,V=0;V<x.length;V++){if(x[V]==ra){B[V]=null;m.table.deleteRow(K+(null!=F?1:0));break}null!=B[V]&&K++}}}(P);mxEvent.addListener(ja,"click",P);P=U.parentNode;X.appendChild(U);X.appendChild(ja);P.appendChild(X)};k=function(U,P,X){x[U]=P;B[U]=m.addTextarea(x[D]+
-":",X,2);B[U].style.width="100%";0<X.indexOf("\n")&&B[U].setAttribute("rows","2");I(B[U],P);null!=n[P]&&0==n[P].editable&&B[U].setAttribute("disabled","disabled")};u=[];for(var C=g.getModel().getParent(b)==g.getModel().getRoot(),N=0;N<r.length;N++)("label"!=r[N].nodeName||Graph.translateDiagram||C)&&"placeholders"!=r[N].nodeName&&u.push({name:r[N].nodeName,value:r[N].nodeValue});u.sort(function(U,P){return U.name<P.name?-1:U.name>P.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 R=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(P){null!=P&&0<P.length&&P!=F&&(null==g.getModel().getCell(P)?(g.getModel().cellRemoved(b),b.setId(P),F=P,R.innerHTML=mxUtils.htmlEntities(P),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[P])}))}),
-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(D,u[N].name,u[N].value),D++;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 S=document.createElement("input");S.setAttribute("placeholder",mxResources.get("enterPropertyName"));S.setAttribute("type","text");S.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");S.style.boxSizing="border-box";S.style.marginLeft="2px";S.style.width="100%";k.appendChild(S);u.appendChild(k);e.appendChild(u);var Q=mxUtils.button(mxResources.get("addProperty"),function(){var U=S.value;if(0<U.length&&"label"!=U&&"placeholders"!=U&&0>U.indexOf(":"))try{var P=
-mxUtils.indexOf(x,U);if(0<=P&&null!=B[P])B[P].focus();else{d.cloneNode(!1).setAttribute(U,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(U);var X=m.addTextarea(U+":","",2);X.style.width="100%";B.push(X);I(X,U);X.focus()}Q.setAttribute("disabled","disabled");S.value=""}catch(ja){mxUtils.alert(ja)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(S,"keypress",function(U){13==U.keyCode&&Q.click()});this.init=function(){0<B.length?B[0].focus():S.focus()};Q.setAttribute("title",
-mxResources.get("addProperty"));Q.setAttribute("disabled","disabled");Q.style.textOverflow="ellipsis";Q.style.position="absolute";Q.style.overflow="hidden";Q.style.width="144px";Q.style.right="0px";Q.className="geBtn";k.appendChild(Q);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var aa=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var U=!1,
-P=0;P<x.length;P++)null==B[P]?d.removeAttribute(x[P]):(d.setAttribute(x[P],B[P].value),U=U||"placeholder"==x[P]&&"1"==d.getAttribute("placeholders"));U&&d.removeAttribute("label");g.getModel().setValue(b,d)}catch(X){mxUtils.alert(X)}});aa.setAttribute("title","Ctrl+Enter");aa.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(U){13==U.keyCode&&mxEvent.isControlDown(U)&&aa.click()});mxEvent.addListener(S,"keyup",f);mxEvent.addListener(S,"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",C=document.createElement("input"),C.setAttribute("type","checkbox"),C.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(C.setAttribute("checked","checked"),C.defaultChecked=!0),mxEvent.addListener(C,"click",function(){"1"==d.getAttribute("placeholders")?
-d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),r.appendChild(C),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(C=document.createElement("a"),C.setAttribute("href",EditDataDialog.placeholderHelpLink),C.setAttribute("title",mxResources.get("help")),C.setAttribute("target","_blank"),C.style.marginLeft="8px",C.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),C.appendChild(N),r.appendChild(C)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(aa)):(k.appendChild(aa),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()});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=
+m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendChild(m);var D=document.createElement("input");D.setAttribute("value",h);D.style.width="180px";m=document.createElement("td");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("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 H=document.createElement("select");H.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");H.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");H.appendChild(m);
+m=document.createElement("option");m.setAttribute("value","300");mxUtils.write(m,"300dpi");H.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");H.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));H.appendChild(m);var C=document.createElement("input");C.style.width="180px";C.style.display="none";C.setAttribute("value","100");C.setAttribute("type","number");C.setAttribute("min",
+"50");C.setAttribute("step","50");var N=!1;mxEvent.addListener(H,"change",function(){"custom"==this.value?(this.style.display="none",C.style.display="",C.focus()):(C.value=this.value,N||(B.value=this.value))});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value);isNaN(P)||0>=P?C.style.backgroundColor="red":(C.style.backgroundColor="",N||(B.value=P))});m=document.createElement("td");m.appendChild(H);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("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 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 R=document.createElement("input");R.setAttribute("type","number");R.setAttribute("value",ExportDialog.lastBorderValue);R.style.width="180px";m=document.createElement("td");m.appendChild(R);
+g.appendChild(m);u.appendChild(g);e.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){N=!0;var P=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*P).toFixed(2));0<h?(D.value=Math.floor(h*P),F.value=Math.floor(n*P)):(B.value="100",D.value=h,F.value=n);f()});mxEvent.addListener(D,"change",function(){var P=parseInt(D.value)/h;0<P?(B.value=parseFloat((100*P).toFixed(2)),F.value=Math.floor(n*P)):(B.value="100",D.value=h,F.value=n);f()});mxEvent.addListener(F,
+"change",function(){var P=parseInt(F.value)/n;0<P?(B.value=parseFloat((100*P).toFixed(2)),D.value=Math.floor(h*P)):(B.value="100",D.value=h,F.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var ba=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=r.value,X=x.value,ja=Math.max(0,parseFloat(B.value)||
+100)/100,fa=Math.max(0,parseInt(R.value)),ra=d.background,K=Math.max(1,parseInt(C.value));if(("svg"==X||"png"==X||"pdf"==X)&&Q.checked)ra=null;else if(null==ra||ra==mxConstants.NONE)ra="#ffffff";ExportDialog.lastBorderValue=fa;ExportDialog.exportFile(a,P,X,ra,ja,fa,K,T.checked)}}));ba.className="geBtn gePrimaryBtn";var S=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});S.className="geBtn";a.editor.cancelFirst?(m.appendChild(S),m.appendChild(ba)):(m.appendChild(ba),m.appendChild(S));
+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,h,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="+h)).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<T.value.length?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled")}var d=document.createElement("div"),g=a.editor.graph,e=g.getModel().getValue(b);if(!mxUtils.isNode(e)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",e||"");e=h}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(S){}var m=new mxForm("properties");m.table.style.width=
+"100%";var r=e.attributes,x=[],B=[],D=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,H=function(S,P){var X=document.createElement("div");X.style.position="relative";X.style.paddingRight="20px";X.style.boxSizing="border-box";X.style.width="100%";var ja=document.createElement("a"),fa=mxUtils.createImage(Dialog.prototype.closeImage);fa.style.height="9px";fa.style.fontSize="9px";fa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ja.className="geButton";ja.setAttribute("title",
+mxResources.get("delete"));ja.style.position="absolute";ja.style.top="4px";ja.style.right="0px";ja.style.margin="0px";ja.style.width="9px";ja.style.height="9px";ja.style.cursor="pointer";ja.appendChild(fa);P=function(ra){return function(){for(var K=0,V=0;V<x.length;V++){if(x[V]==ra){B[V]=null;m.table.deleteRow(K+(null!=F?1:0));break}null!=B[V]&&K++}}}(P);mxEvent.addListener(ja,"click",P);P=S.parentNode;X.appendChild(S);X.appendChild(ja);P.appendChild(X)};h=function(S,P,X){x[S]=P;B[S]=m.addTextarea(x[D]+
+":",X,2);B[S].style.width="100%";0<X.indexOf("\n")&&B[S].setAttribute("rows","2");H(B[S],P);null!=n[P]&&0==n[P].editable&&B[S].setAttribute("disabled","disabled")};u=[];for(var C=g.getModel().getParent(b)==g.getModel().getRoot(),N=0;N<r.length;N++)("label"!=r[N].nodeName||Graph.translateDiagram||C)&&"placeholders"!=r[N].nodeName&&u.push({name:r[N].nodeName,value:r[N].nodeValue});u.sort(function(S,P){return S.name<P.name?-1:S.name>P.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 Q=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(S){mxEvent.isShiftDown(S)&&(S=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(P){null!=P&&0<P.length&&P!=F&&(null==g.getModel().getCell(P)?(g.getModel().cellRemoved(b),b.setId(P),F=P,Q.innerHTML=mxUtils.htmlEntities(P),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[P])}))}),
+mxResources.get("id")),a.showDialog(S.container,300,80,!0,!0),S.init())});r.setAttribute("title","Shift+Double Click to Edit ID")}for(N=0;N<u.length;N++)h(D,u[N].name,u[N].value),D++;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);h=document.createElement("div");h.style.boxSizing="border-box";h.style.paddingRight="160px";h.style.whiteSpace="nowrap";h.style.marginTop=
+"6px";h.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%";h.appendChild(T);u.appendChild(h);d.appendChild(u);var R=mxUtils.button(mxResources.get("addProperty"),function(){var S=T.value;if(0<S.length&&"label"!=S&&"placeholders"!=S&&0>S.indexOf(":"))try{var P=
+mxUtils.indexOf(x,S);if(0<=P&&null!=B[P])B[P].focus();else{e.cloneNode(!1).setAttribute(S,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(S);var X=m.addTextarea(S+":","",2);X.style.width="100%";B.push(X);H(X,S);X.focus()}R.setAttribute("disabled","disabled");T.value=""}catch(ja){mxUtils.alert(ja)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(T,"keypress",function(S){13==S.keyCode&&R.click()});this.init=function(){0<B.length?B[0].focus():T.focus()};R.setAttribute("title",
+mxResources.get("addProperty"));R.setAttribute("disabled","disabled");R.style.textOverflow="ellipsis";R.style.position="absolute";R.style.overflow="hidden";R.style.width="144px";R.style.right="0px";R.className="geBtn";h.appendChild(R);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var ba=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var S=!1,
+P=0;P<x.length;P++)null==B[P]?e.removeAttribute(x[P]):(e.setAttribute(x[P],B[P].value),S=S||"placeholder"==x[P]&&"1"==e.getAttribute("placeholders"));S&&e.removeAttribute("label");g.getModel().setValue(b,e)}catch(X){mxUtils.alert(X)}});ba.setAttribute("title","Ctrl+Enter");ba.className="geBtn gePrimaryBtn";mxEvent.addListener(d,"keypress",function(S){13==S.keyCode&&mxEvent.isControlDown(S)&&ba.click()});mxEvent.addListener(T,"keyup",f);mxEvent.addListener(T,"change",f);h=document.createElement("div");
+h.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",C=document.createElement("input"),C.setAttribute("type","checkbox"),C.style.marginRight="6px","1"==e.getAttribute("placeholders")&&(C.setAttribute("checked","checked"),C.defaultChecked=!0),mxEvent.addListener(C,"click",function(){"1"==e.getAttribute("placeholders")?
+e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")}),r.appendChild(C),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(C=document.createElement("a"),C.setAttribute("href",EditDataDialog.placeholderHelpLink),C.setAttribute("title",mxResources.get("help")),C.setAttribute("target","_blank"),C.style.marginLeft="8px",C.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),C.appendChild(N),r.appendChild(C)),h.appendChild(r);a.editor.cancelFirst?(h.appendChild(u),h.appendChild(ba)):(h.appendChild(ba),h.appendChild(u));d.appendChild(h);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 h=document.createElement("input");h.setAttribute("value",b);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type","text");
+h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.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(){h.value="";h.focus()});e.appendChild(h);e.appendChild(b);g.appendChild(e);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?h.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(h,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),d(h.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(h.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,h=document.createElement("div");h.style.position="absolute";h.style.width="100%";h.style.height="100%";h.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),h,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);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(X){if(u.isEnabled()&&null!=X){var ja=u.convertValueToString(X);
-ja=new FilenameDialog(a,ja||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(fa){null!=fa&&u.cellLabelChanged(X,fa)}),mxResources.get("enterName"));a.showDialog(ja.container,300,100,!0,!0);ja.init()}}function k(){var X=U.get(u.getLayerForCells(u.getSelectionCells()));null!=X?X.appendChild(P):null!=P.parentNode&&P.parentNode.removeChild(P)}function n(){function X(ra,K,V,O){var T=document.createElement("div");T.className="geToolbarContainer";U.put(V,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",K);var J=document.createElement("div");J.style.display="inline-block";J.style.width="100%";J.style.textOverflow="ellipsis";J.style.overflow="hidden";mxEvent.addListener(T,
-"dragover",function(na){na.dataTransfer.dropEffect="move";D=ra;na.stopPropagation();na.preventDefault()});mxEvent.addListener(T,"dragstart",function(na){B=T;mxClient.IS_FF&&na.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(T,"dragend",function(na){null!=B&&null!=D&&u.addCell(V,u.model.root,D);D=B=null;na.stopPropagation();na.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(V)?"hide":"show"));u.model.isVisible(V)?(ba.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(T,75)):(ba.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(T,25));Editor.isDarkMode()&&(ba.style.filter="invert(100%)");J.appendChild(ba);mxEvent.addListener(ba,"click",function(na){u.model.setVisible(V,!u.model.isVisible(V));mxEvent.consume(na)});
-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 ia=u.getCurrentCellStyle(V);"1"==mxUtils.getValue(ia,"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(na){if(u.isEnabled()){var W=null;u.getModel().beginUpdate();try{W="1"==mxUtils.getValue(ia,"locked","0")?null:"1",u.setCellStyles("locked",W,[V])}finally{u.getModel().endUpdate()}"1"==W&&u.removeSelectionCells(u.getModel().getDescendants(V));mxEvent.consume(na)}});J.appendChild(ba);ba=document.createElement("span");mxUtils.write(ba,K);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";J.appendChild(ba);T.appendChild(J);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)K=document.createElement("div"),K.style.display="block",K.style.textAlign="right",K.style.whiteSpace="nowrap",K.style.position="absolute",K.style.right="16px",K.style.top="6px",0<ra&&(J=document.createElement("a"),J.setAttribute("title",
+function(){n.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){n.setSuspended(!0)}));n.init(h);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=e.zoomFactor,null!=u.deltaY&&Math.round(u.deltaY)!=u.deltaY&&(r=1+Math.abs(u.deltaY)/20*(r-1)),e.lazyZoom(m,null,null,r),mxEvent.consume(u))})},LayersWindow=function(a,b,f,d,g){function e(X){if(u.isEnabled()&&null!=X){var ja=u.convertValueToString(X);
+ja=new FilenameDialog(a,ja||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(fa){null!=fa&&u.cellLabelChanged(X,fa)}),mxResources.get("enterName"));a.showDialog(ja.container,300,100,!0,!0);ja.init()}}function h(){var X=S.get(u.getLayerForCells(u.getSelectionCells()));null!=X?X.appendChild(P):null!=P.parentNode&&P.parentNode.removeChild(P)}function n(){function X(ra,K,V,O){var U=document.createElement("div");U.className="geToolbarContainer";S.put(V,U);U.style.overflow=
+"hidden";U.style.position="relative";U.style.padding="4px";U.style.height="22px";U.style.display="block";U.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";U.style.borderWidth="0px 0px 1px 0px";U.style.borderColor="#c3c3c3";U.style.borderStyle="solid";U.style.whiteSpace="nowrap";U.setAttribute("title",K);var J=document.createElement("div");J.style.display="inline-block";J.style.width="100%";J.style.textOverflow="ellipsis";J.style.overflow="hidden";mxEvent.addListener(U,
+"dragover",function(na){na.dataTransfer.dropEffect="move";D=ra;na.stopPropagation();na.preventDefault()});mxEvent.addListener(U,"dragstart",function(na){B=U;mxClient.IS_FF&&na.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(U,"dragend",function(na){null!=B&&null!=D&&u.addCell(V,u.model.root,D);D=B=null;na.stopPropagation();na.preventDefault()});var aa=document.createElement("img");aa.setAttribute("draggable","false");aa.setAttribute("align","top");aa.setAttribute("border","0");aa.style.width=
+"16px";aa.style.padding="0px 6px 0 4px";aa.style.marginTop="2px";aa.style.cursor="pointer";aa.setAttribute("title",mxResources.get(u.model.isVisible(V)?"hide":"show"));u.model.isVisible(V)?(aa.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(U,75)):(aa.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(U,25));Editor.isDarkMode()&&(aa.style.filter="invert(100%)");J.appendChild(aa);mxEvent.addListener(aa,"click",function(na){u.model.setVisible(V,!u.model.isVisible(V));mxEvent.consume(na)});
+aa=document.createElement("img");aa.setAttribute("draggable","false");aa.setAttribute("align","top");aa.setAttribute("border","0");aa.style.width="16px";aa.style.padding="0px 6px 0 0";aa.style.marginTop="2px";aa.setAttribute("title",mxResources.get("lockUnlock"));var ia=u.getCurrentCellStyle(V);"1"==mxUtils.getValue(ia,"locked","0")?(aa.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(aa,75)):(aa.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(aa,25));Editor.isDarkMode()&&(aa.style.filter=
+"invert(100%)");u.isEnabled()&&(aa.style.cursor="pointer");mxEvent.addListener(aa,"click",function(na){if(u.isEnabled()){var W=null;u.getModel().beginUpdate();try{W="1"==mxUtils.getValue(ia,"locked","0")?null:"1",u.setCellStyles("locked",W,[V])}finally{u.getModel().endUpdate()}"1"==W&&u.removeSelectionCells(u.getModel().getDescendants(V));mxEvent.consume(na)}});J.appendChild(aa);aa=document.createElement("span");mxUtils.write(aa,K);aa.style.display="block";aa.style.whiteSpace="nowrap";aa.style.overflow=
+"hidden";aa.style.textOverflow="ellipsis";aa.style.position="absolute";aa.style.left="52px";aa.style.right="8px";aa.style.top="8px";J.appendChild(aa);U.appendChild(J);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)K=document.createElement("div"),K.style.display="block",K.style.textAlign="right",K.style.whiteSpace="nowrap",K.style.position="absolute",K.style.right="16px",K.style.top="6px",0<ra&&(J=document.createElement("a"),J.setAttribute("title",
mxResources.get("toBack")),J.className="geButton",J.style.cssFloat="none",J.innerHTML="&#9660;",J.style.width="14px",J.style.height="14px",J.style.fontSize="14px",J.style.margin="0px",J.style.marginTop="-1px",K.appendChild(J),mxEvent.addListener(J,"click",function(na){u.isEnabled()&&u.addCell(V,u.model.root,ra-1);mxEvent.consume(na)})),0<=ra&&ra<F-1&&(J=document.createElement("a"),J.setAttribute("title",mxResources.get("toFront")),J.className="geButton",J.style.cssFloat="none",J.innerHTML="&#9650;",
-J.style.width="14px",J.style.height="14px",J.style.fontSize="14px",J.style.margin="0px",J.style.marginTop="-1px",K.appendChild(J),mxEvent.addListener(J,"click",function(na){u.isEnabled()&&u.addCell(V,u.model.root,ra+1);mxEvent.consume(na)})),T.appendChild(K);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(T.setAttribute("draggable","true"),T.style.cursor="move")}mxEvent.addListener(T,"dblclick",function(na){var W=mxEvent.getSource(na).nodeName;"INPUT"!=W&&"IMG"!=W&&(d(V),mxEvent.consume(na))});
-u.getDefaultParent()==V&&(T.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",T.style.fontWeight=u.isEnabled()?"bold":"",I=V);mxEvent.addListener(T,"click",function(na){u.isEnabled()&&(u.setDefaultParent(O),u.view.setCurrentRoot(null),mxEvent.isShiftDown(na)&&u.setSelectionCells(V.children),mxEvent.consume(na))});x.appendChild(T)}F=u.model.getChildCount(u.model.root);x.innerText="";U.clear();for(var ja=F-1;0<=ja;ja--)mxUtils.bind(this,function(ra){X(ja,u.convertValueToString(ra)||mxResources.get("background"),
-ra,ra)})(u.model.getChildAt(u.model.root,ja));var fa=u.convertValueToString(I)||mxResources.get("background");R.setAttribute("title",mxResources.get("removeIt",[fa]));aa.setAttribute("title",mxResources.get("duplicateIt",[fa]));u.isSelectionEmpty()&&(S.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=
+J.style.width="14px",J.style.height="14px",J.style.fontSize="14px",J.style.margin="0px",J.style.marginTop="-1px",K.appendChild(J),mxEvent.addListener(J,"click",function(na){u.isEnabled()&&u.addCell(V,u.model.root,ra+1);mxEvent.consume(na)})),U.appendChild(K);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(na){var W=mxEvent.getSource(na).nodeName;"INPUT"!=W&&"IMG"!=W&&(e(V),mxEvent.consume(na))});
+u.getDefaultParent()==V&&(U.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",U.style.fontWeight=u.isEnabled()?"bold":"",H=V);mxEvent.addListener(U,"click",function(na){u.isEnabled()&&(u.setDefaultParent(O),u.view.setCurrentRoot(null),mxEvent.isShiftDown(na)&&u.setSelectionCells(V.children),mxEvent.consume(na))});x.appendChild(U)}F=u.model.getChildCount(u.model.root);x.innerText="";S.clear();for(var ja=F-1;0<=ja;ja--)mxUtils.bind(this,function(ra){X(ja,u.convertValueToString(ra)||mxResources.get("background"),
+ra,ra)})(u.model.getChildAt(u.model.root,ja));var fa=u.convertValueToString(H)||mxResources.get("background");Q.setAttribute("title",mxResources.get("removeIt",[fa]));ba.setAttribute("title",mxResources.get("duplicateIt",[fa]));u.isSelectionEmpty()&&(T.className="geButton mxDisabled");h()}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,D=null;mxEvent.addListener(m,"dragover",function(X){X.dataTransfer.dropEffect="move";D=0;X.stopPropagation();X.preventDefault()});mxEvent.addListener(m,"drop",
-function(X){X.stopPropagation();X.preventDefault()});var F=null,I=null,C=document.createElement("div");C.className="geToolbarContainer";C.style.position="absolute";C.style.bottom="0px";C.style.left="0px";C.style.right="0px";C.style.height=r;C.style.overflow="hidden";C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.borderWidth="1px 0px 0px 0px";C.style.borderColor="#c3c3c3";C.style.borderStyle="solid";C.style.display=
-"block";C.style.whiteSpace="nowrap";var N=document.createElement("a");N.className="geButton";var R=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%)");R.appendChild(r);mxEvent.addListener(R,"click",function(X){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.model.root.getIndex(I);u.removeCells([I],!1);0==u.model.getChildCount(u.model.root)?
-(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ja&&ja<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ja-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(R.className="geButton mxDisabled");C.appendChild(R);var S=N.cloneNode();S.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));r=r.cloneNode(!1);r.setAttribute("src",Editor.verticalDotsImage);S.appendChild(r);mxEvent.addListener(S,
-"click",function(X){if(u.isEnabled()&&!u.isSelectionEmpty()){var ja=mxUtils.getOffset(S);a.showPopupMenu(mxUtils.bind(this,function(fa,ra){for(var K=F-1;0<=K;K--)mxUtils.bind(this,function(V){var O=fa.addItem(u.convertValueToString(V)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),0,0,!1,V)}),ra);1==u.getSelectionCount()&&u.model.isAncestor(V,u.getSelectionCell())&&fa.addCheckmark(O,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,K))}),
-ja.x,ja.y+S.offsetHeight,X)}});C.appendChild(S);var Q=N.cloneNode(!1);Q.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);Q.appendChild(r);mxEvent.addListener(Q,"click",function(X){u.isEnabled()&&a.showDataDialog(I);mxEvent.consume(X)});u.isEnabled()||(Q.className="geButton mxDisabled");C.appendChild(Q);var aa=N.cloneNode(!1);aa.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage);
-aa.appendChild(r);mxEvent.addListener(aa,"click",function(X){if(u.isEnabled()){X=null;u.model.beginUpdate();try{X=u.cloneCell(I),u.cellLabelChanged(X,mxResources.get("untitledLayer")),X.setVisible(!0),X=u.addCell(X,u.model.root),u.setDefaultParent(X)}finally{u.model.endUpdate()}null==X||u.isCellLocked(X)||u.selectAll(X)}});u.isEnabled()||(aa.className="geButton mxDisabled");C.appendChild(aa);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(X){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ja)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(N.className="geButton mxDisabled");C.appendChild(N);m.appendChild(C);var U=new mxDictionary,P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="&#8226;";P.style.position=
-"absolute";P.style.fontWeight="bold";P.style.fontSize="16pt";P.style.right="2px";P.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?S.className="geButton mxDisabled":S.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);
+function(X){X.stopPropagation();X.preventDefault()});var F=null,H=null,C=document.createElement("div");C.className="geToolbarContainer";C.style.position="absolute";C.style.bottom="0px";C.style.left="0px";C.style.right="0px";C.style.height=r;C.style.overflow="hidden";C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.borderWidth="1px 0px 0px 0px";C.style.borderColor="#c3c3c3";C.style.borderStyle="solid";C.style.display=
+"block";C.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(X){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.model.root.getIndex(H);u.removeCells([H],!1);0==u.model.getChildCount(u.model.root)?
+(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ja&&ja<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ja-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(Q.className="geButton mxDisabled");C.appendChild(Q);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(X){if(u.isEnabled()&&!u.isSelectionEmpty()){var ja=mxUtils.getOffset(T);a.showPopupMenu(mxUtils.bind(this,function(fa,ra){for(var K=F-1;0<=K;K--)mxUtils.bind(this,function(V){var O=fa.addItem(u.convertValueToString(V)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),0,0,!1,V)}),ra);1==u.getSelectionCount()&&u.model.isAncestor(V,u.getSelectionCell())&&fa.addCheckmark(O,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,K))}),
+ja.x,ja.y+T.offsetHeight,X)}});C.appendChild(T);var R=N.cloneNode(!1);R.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);R.appendChild(r);mxEvent.addListener(R,"click",function(X){u.isEnabled()&&a.showDataDialog(H);mxEvent.consume(X)});u.isEnabled()||(R.className="geButton mxDisabled");C.appendChild(R);var ba=N.cloneNode(!1);ba.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage);
+ba.appendChild(r);mxEvent.addListener(ba,"click",function(X){if(u.isEnabled()){X=null;u.model.beginUpdate();try{X=u.cloneCell(H),u.cellLabelChanged(X,mxResources.get("untitledLayer")),X.setVisible(!0),X=u.addCell(X,u.model.root),u.setDefaultParent(X)}finally{u.model.endUpdate()}null==X||u.isCellLocked(X)||u.selectAll(X)}});u.isEnabled()||(ba.className="geButton mxDisabled");C.appendChild(ba);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(X){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ja)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(N.className="geButton mxDisabled");C.appendChild(N);m.appendChild(C);var S=new mxDictionary,P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="&#8226;";P.style.position=
+"absolute";P.style.fontWeight="bold";P.style.fontSize="16pt";P.style.right="2px";P.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";h()});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;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";
@@ -5986,9 +5994,9 @@ null,null,"bpmn business process model notation gateway parallel multiple interr
this.createVertexTemplateEntry("points=[[0.25,0.25,0],[0.5,0,0],[0.75,0.25,0],[1,0.5,0],[0.75,0.75,0],[0.5,1,0],[0.25,0.75,0],[0,0.5,0]];shape=mxgraph.bpmn.gateway2;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;align=center;perimeter=rhombusPerimeter;outlineConnect=0;outline=catching;symbol=parallelMultiple;",50,50,"","Parallel Multiple (Catching)",null,null,"bpmn business process model notation gateway parallel multiple catching"),this.createVertexTemplateEntry("points=[[0.25,0.25,0],[0.5,0,0],[0.75,0.25,0],[1,0.5,0],[0.75,0.75,0],[0.5,1,0],[0.25,0.75,0],[0,0.5,0]];shape=mxgraph.bpmn.gateway2;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;align=center;perimeter=rhombusPerimeter;outlineConnect=0;outline=boundInt;symbol=parallelMultiple;",
50,50,"","Parallel Multiple Boundary (Interrupting)",null,null,"bpmn business process model notation gateway parallel multiple boundary interrupting"),this.createVertexTemplateEntry("points=[[0.25,0.25,0],[0.5,0,0],[0.75,0.25,0],[1,0.5,0],[0.75,0.75,0],[0.5,1,0],[0.25,0.75,0],[0,0.5,0]];shape=mxgraph.bpmn.gateway2;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;align=center;perimeter=rhombusPerimeter;outlineConnect=0;outline=boundNonint;symbol=parallelMultiple;",
50,50,"","Parallel Multiple Boundary (Non-Interrupting)",null,null,"bpmn business process model notation gateway parallel multiple boundary non interrupting noninterrupting"),this.createVertexTemplateEntry("points=[[0.25,0.25,0],[0.5,0,0],[0.75,0.25,0],[1,0.5,0],[0.75,0.75,0],[0.5,1,0],[0.25,0.75,0],[0,0.5,0]];shape=mxgraph.bpmn.gateway2;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;align=center;perimeter=rhombusPerimeter;outlineConnect=0;outline=end;symbol=terminate;",
-50,50,"","Terminate",null,null,"bpmn business process model notation gateway terminate")];this.addPalette("bpmn2Gateways","BPMN 2.0 Gateways",!1,mxUtils.bind(this,function(e){for(var f=0;f<b.length;f++)e.appendChild(b[f](e))}))}})();(function(){Sidebar.prototype.addC4Palette=function(){this.setCurrentSearchEntryLibrary("c4");this.addPaletteFunctions("c4","C4",!1,[this.addEntry("c4 person",function(){var a=new mxCell("",new mxGeometry(0,0,200,180),"html=1;fontSize=11;dashed=0;whitespace=wrap;fillColor=#083F75;strokeColor=#06315C;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));
+50,50,"","Terminate",null,null,"bpmn business process model notation gateway terminate")];this.addPalette("bpmn2Gateways","BPMN 2.0 Gateways",!1,mxUtils.bind(this,function(e){for(var f=0;f<b.length;f++)e.appendChild(b[f](e))}))}})();(function(){Sidebar.prototype.addC4Palette=function(){this.setCurrentSearchEntryLibrary("c4");this.addPaletteFunctions("c4","C4",!1,[this.addEntry("c4 person",function(){var a=new mxCell("",new mxGeometry(0,0,200,180),"html=1;fontSize=11;dashed=0;whiteSpace=wrap;fillColor=#083F75;strokeColor=#06315C;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));
a.setAttribute("placeholders","1");a.setAttribute("c4Name","Person name");a.setAttribute("c4Type","Person");a.setAttribute("c4Description","Description of person.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%]</div><br><div><font style="font-size: 11px"><font color="#cccccc">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Person")}),this.addEntry("c4 external person",function(){var a=new mxCell("",
-new mxGeometry(0,0,200,180),"html=1;fontSize=11;dashed=0;whitespace=wrap;fillColor=#6C6477;strokeColor=#4D4D4D;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","External person name");a.setAttribute("c4Type","Person");a.setAttribute("c4Description",
+new mxGeometry(0,0,200,180),"html=1;fontSize=11;dashed=0;whiteSpace=wrap;fillColor=#6C6477;strokeColor=#4D4D4D;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","External person name");a.setAttribute("c4Type","Person");a.setAttribute("c4Description",
"Description of external person.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%]</div><br><div><font style="font-size: 11px"><font color="#cccccc">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"External Person")}),this.addEntry("c4 software system",function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#1061B0;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#0D5091;metaEdit=1;resizable=0;points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];");
a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","System name");a.setAttribute("c4Type","Software System");a.setAttribute("c4Description","Description of software system.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%]</div><br><div><font style="font-size: 11px"><font color="#cccccc">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,
a.geometry.height,"Software System")}),this.addEntry("c4 external software system",function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#8C8496;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#736782;metaEdit=1;resizable=0;points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));
@@ -5996,13 +6004,13 @@ a.setAttribute("placeholders","1");a.setAttribute("c4Name","External system name
function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"rounded=1;whiteSpace=wrap;html=1;fontSize=11;labelBackgroundColor=none;fillColor=#23A2D9;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#0E7DAD;metaEdit=1;resizable=0;points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name",
"Container name");a.setAttribute("c4Type","Container");a.setAttribute("c4Technology","e.g. SpringBoot, ElasticSearch, etc.");a.setAttribute("c4Description","Description of container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%: %c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Container")}),
this.addEntry("c4 data container",function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"shape=cylinder3;size=15;whiteSpace=wrap;html=1;boundedLbl=1;rounded=0;labelBackgroundColor=none;fillColor=#23A2D9;fontSize=12;fontColor=#ffffff;align=center;strokeColor=#0E7DAD;metaEdit=1;points=[[0.5,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.5,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");
-a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container ");a.setAttribute("c4Technology","e.g. Oracle Database 12");a.setAttribute("c4Description","Description of storage type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,
+a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container");a.setAttribute("c4Technology","e.g. Oracle Database 12");a.setAttribute("c4Description","Description of storage type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,
a.geometry.height,"Data Container")}),this.addEntry("c4 microservice container",function(){var a=new mxCell("",new mxGeometry(0,0,200,170),"shape=hexagon;size=50;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;rounded=1;labelBackgroundColor=none;fillColor=#23A2D9;fontSize=12;fontColor=#ffffff;align=center;strokeColor=#0E7DAD;metaEdit=1;points=[[0.5,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.5,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));
-a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container ");a.setAttribute("c4Technology","e.g. Micronaut, etc.");a.setAttribute("c4Description","Description of microservice type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],
+a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container");a.setAttribute("c4Technology","e.g. Micronaut, etc.");a.setAttribute("c4Description","Description of microservice type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,"Microservice Container")}),this.addEntry("c4 message bus container",function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"shape=cylinder3;size=15;direction=south;whiteSpace=wrap;html=1;boundedLbl=1;rounded=0;labelBackgroundColor=none;fillColor=#23A2D9;fontSize=12;fontColor=#ffffff;align=center;strokeColor=#0E7DAD;metaEdit=1;points=[[0.5,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.5,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));
-a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container ");a.setAttribute("c4Technology","e.g. Apache Kafka, etc.");a.setAttribute("c4Description","Description of message bus type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],
+a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container");a.setAttribute("c4Technology","e.g. Apache Kafka, etc.");a.setAttribute("c4Description","Description of message bus type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,"Message Bus Container")}),this.addEntry("c4 web browser container",function(){var a=new mxCell("",new mxGeometry(0,0,240,160),"shape=mxgraph.c4.webBrowserContainer2;whiteSpace=wrap;html=1;boundedLbl=1;rounded=0;labelBackgroundColor=none;strokeColor=#118ACD;fillColor=#23A2D9;strokeColor=#118ACD;strokeColor2=#0E7DAD;fontSize=12;fontColor=#ffffff;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.5,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];resizable=0;");
-a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container ");a.setAttribute("c4Technology","e.g. JavaScript, Angular etc.");a.setAttribute("c4Description","Description of web browser container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
+a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container");a.setAttribute("c4Technology","e.g. JavaScript, Angular etc.");a.setAttribute("c4Description","Description of web browser container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Web Browser Container")}),this.addEntry("c4 component",function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#63BEF2;fontColor=#ffffff;align=center;arcSize=6;strokeColor=#2086C9;metaEdit=1;resizable=0;points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];");a.vertex=
!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","Component name");a.setAttribute("c4Type","Component");a.setAttribute("c4Technology","e.g. Spring Service");a.setAttribute("c4Description","Description of component role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%: %c4Technology%]</div><br><div><font style="font-size: 11px">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,"Component")}),this.addEntry("c4 relationship description technology",function(){var a=new mxCell("",new mxGeometry(0,0,240,0),"endArrow=blockThin;html=1;fontSize=10;fontColor=#404040;strokeWidth=1;endFill=1;strokeColor=#828282;elbow=vertical;metaEdit=1;endSize=14;startSize=14;jumpStyle=arc;jumpSize=16;rounded=0;edgeStyle=orthogonalEdgeStyle;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(240,0),!1);a.geometry.relative=
@@ -9496,10 +9504,9 @@ this.getTagsForStencil("mxgraph.pid.misc","screening_device,_sieve,_strainer_(co
null,null,this.getTagsForStencil("mxgraph.pid.misc","stack,_chimney","process instrumentation ").join(" ")),this.createVertexTemplateEntry(c+"steam_trap2;",53,53,"","Steam Trap",null,null,this.getTagsForStencil("mxgraph.pid.misc","steam_trap","process instrumentation ").join(" ")),this.createVertexTemplateEntry(c+"tank_car,_tank_wagon;",127,80,"","Tank Car, Tank Wagon",null,null,this.getTagsForStencil("mxgraph.pid.misc","tank_car,_tank_wagon","process instrumentation ").join(" ")),this.createVertexTemplateEntry(c+
"viewing_glass;",80,50,"","Viewing Glass",null,null,this.getTagsForStencil("mxgraph.pid.misc","viewing_glass","process instrumentation ").join(" "))])}})();(function(){Sidebar.prototype.addRackPalette=function(a,c){for(var d=0;d<a.length;d++)"general"===a[d].toLowerCase()?(this.setCurrentSearchEntryLibrary("rack","rackGeneral"),this.addRackGeneralPalette()):"f5"===a[d].toLowerCase()?(this.setCurrentSearchEntryLibrary("rack","rackF5"),this.addRackF5Palette()):"dell"===a[d].toLowerCase()?(this.setCurrentSearchEntryLibrary("rack","rackDell"),this.addRackDellPalette()):"hpe aruba gateways controllers"===a[d].toLowerCase()?this.addRackHPEArubaGatewaysControllersPalette():
"hpe aruba security"===a[d].toLowerCase()?this.addRackHPEArubaSecurityPalette():"hpe aruba switches"===a[d].toLowerCase()?this.addRackHPEArubaSwitchesPalette():(this.setCurrentSearchEntryLibrary("rack","rack"+a[d]),this.addStencilPalette("rack"+a[d],"Rack / "+a[d],c+"/rack/"+a[d].toLowerCase()+".xml",";html=1;labelPosition=right;align=left;spacingLeft=15;dashed=0;shadow=0;fillColor=#ffffff;",null,null,null,null,null,"rack"));this.setCurrentSearchEntryLibrary()};Sidebar.prototype.addRackGeneralPalette=
-function(){this.addPaletteFunctions("rackGeneral","Rack / General",!1,[this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.container;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=9;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=off;",180,228.6,"","Rack Cabinet",null,null,"rack equipment general cabinet"),
-this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.container;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=33;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=ascend;",210,228.6,"","Numbered Rack Cabinet",null,null,"rack equipment general cabinet numbered"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.container;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=9;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=off;",
-180,228.6,"","Rack Cabinet",null,null,"rack equipment general cabinet"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.container;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=33;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=ascend;",210,228.6,"","Numbered Rack Cabinet",null,null,"rack equipment general cabinet numbered"),
-this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;text;",160,15,"","Spacing",null,null,"rack equipment general spacing"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.plate;fillColor=#e8e8e8;",160,15,"","Cover Plate",null,null,"rack equipment general cover plate"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rack.general.1u_rack_server;",
+function(){this.addPaletteFunctions("rackGeneral","Rack / General",!1,[this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.rackCabinet2;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=9;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=off;",180,219,"","Rack Cabinet",null,null,"rack equipment general cabinet"),
+this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.rackCabinet2;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=33;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=ascend;",204,219,"","Numbered Rack Cabinet",null,null,"rack equipment general cabinet numbered"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;text;",
+160,15,"","Spacing",null,null,"rack equipment general spacing"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.plate;fillColor=#e8e8e8;",160,15,"","Cover Plate",null,null,"rack equipment general cover plate"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rack.general.1u_rack_server;",
160,15,"","Server",null,null,"rack equipment general server"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.horCableDuct;",160,15,"","Horizontal Cable Duct",null,null,"rack equipment general horizontal cable duct"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.horRoutingBank;",
160,20,"","Horizontal Routing Bank",null,null,"rack equipment general horizontal routing bank"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.neatPatch;",160,30,"","Neat-Patch",null,null,"rack equipment general neat patch"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.shelf;container=1;collapsible=0",
160,15,"","Shelf",null,null,"rack equipment general shelf"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.channelBase;",200,30,"","Channel Base",null,null,"rack equipment general channel base"),this.createVertexTemplateEntry("shape=mxgraph.rackGeneral.cabinetLeg;html=1;shadow=0;dashed=0;fillColor=#444444;strokeColor=#444444;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;",
@@ -9716,10 +9723,11 @@ null,null,this.getTagsForStencil("","","sysml model element package name").join(
this.createEdgeTemplateEntry("edgeStyle=none;html=1;endArrow=open;endSize=12;dashed=1;verticalAlign=bottom;",160,0,"&lt;&lt;conform&gt;&gt;","Conform",null,this.getTagsForStencil("","","sysml model element conform").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;endArrow=open;endSize=12;dashed=1;verticalAlign=bottom;",160,0,"&lt;&lt;stereotype1&gt;&gt;\ndependency1","Dependency",null,this.getTagsForStencil("","","sysml model element dependency").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;endArrow=open;endSize=12;dashed=1;verticalAlign=bottom;",
160,0,"&lt;&lt;import&gt;&gt;","Public Package Import",null,this.getTagsForStencil("","","sysml model element public package import").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;endArrow=open;endSize=12;dashed=1;verticalAlign=bottom;",160,0,"&lt;&lt;access&gt;&gt;","Private Package Import",null,this.getTagsForStencil("","","sysml model element private package import").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;"+mxConstants.STYLE_STARTARROW+"=sysMLPackCont;startSize=12;"+
mxConstants.STYLE_ENDARROW+"=none;",160,0,"","Package Containment",null,this.getTagsForStencil("","","sysml model element package containment").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;endSize=12;endArrow=block;endFill=0;dashed=1;",160,0,"","Realization",null,this.getTagsForStencil("","","sysml model element realization").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;endArrow=open;endSize=12;dashed=1;verticalAlign=bottom;",160,0,"&lt;&lt;refine&gt;&gt;","Refine",
-null,this.getTagsForStencil("","","sysml model element refine").join(" "))];this.addPalette("sysmlModel Elements","SysML / Model Elements",a||!1,mxUtils.bind(this,function(b){for(var e=0;e<d.length;e++)b.appendChild(d[e](b))}))};Sidebar.prototype.addSysMLBlocksPalette=function(a){var c=this,d=[this.addEntry("sysml block block definition diagram",function(){var b=new mxCell('<p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;"><b>bdd</b> Namespace1</p>',new mxGeometry(0,0,300,100),
-"html=1;shape=mxgraph.sysml.package;labelX=120;align=left;spacingLeft=10;overflow=fill;recursiveResize=0;");b.vertex=!0;var e=new mxCell("Block1",new mxGeometry(15,30,100,50),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;fontStyle=1;html=1;whiteSpace=wrap;align=center;");e.vertex=!0;b.insert(e);var f=new mxCell("Block2",new mxGeometry(190,30,100,50),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;fontStyle=1;html=1;whiteSpace=wrap;align=center;");
-f.vertex=!0;b.insert(f);var g=new mxCell("part1",new mxGeometry(0,0,0,0),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;align=right;html=1;verticalAlign=bottom;endArrow=none;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=none;endFill=0;labelBackgroundColor=none;");g.geometry.relative=!0;g.geometry.x=1;g.edge=!0;b.insert(g);var h=new mxCell("1",new mxGeometry(-1,0,0,0),"resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=none;fontSize=10");h.geometry.relative=
-!0;h.setConnectable(!1);h.vertex=!0;g.insert(h);h=new mxCell("0..*",new mxGeometry(1,0,0,0),"resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=none;fontSize=10");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;g.insert(h);e.insertEdge(g,!0);f.insertEdge(g,!1);return c.createVertexTemplateFromCells([b],300,100,"Block Definition Diagram")}),this.addDataEntry("sysml block relation",160,0,"Relation","zVRNb8IwDP01vUwaCi3aHcrgNGkS+wOhMW20NEapYYVfP9MmLVVh2qYddqjkPNvPHy9NlKRlvXZyX7ygAhMlz1GSOkRqrbJOwZgoFlpFyTKKY8FfFK/ueKeNV+ylA0vfSYjbhKM0B2gRziVPU9HJeFQanVs2nc4LJl4UVHKvyymbR3CkM2nmPmSLRFiyA6yaO4cfjFm0TLSoiMkDprQs0aq3Qtvg2ujzpd50FoCVNqEMqBw2viFP13Z5cdydvoH86GvAEsidOKQeJDgwkvRxyCKr9ph3WR3RK2rm70MqPLgMPHq97BAYyj2JITePmAONEtm46raHGu1u65iMdBxr6KDSZ7ltjmKoYZDXwI5uSEq4Z9TILZiFzN5zhwerUjToejF2aDv9/JgZWgsZ+ZLdXRQXeqjvahZ/qdnjT0UbbPWLFc5GKxSTycNvthh+kv+8xj/aIh/7x6q9t9dv2Sc="),
+null,this.getTagsForStencil("","","sysml model element refine").join(" ")),this.createVertexTemplateEntry("shape=triangle;fillColor=strokeColor;",10,10,"","Flow Direction",null,null,this.getTagsForStencil("","","sysml model element flow direction").join(" ")),this.createVertexTemplateEntry("shape=triangle;fillColor=strokeColor;direction=south;",10,10,"","Flow Direction",null,null,this.getTagsForStencil("","","sysml model element flow direction").join(" "))];this.addPalette("sysmlModel Elements","SysML / Model Elements",
+a||!1,mxUtils.bind(this,function(b){for(var e=0;e<d.length;e++)b.appendChild(d[e](b))}))};Sidebar.prototype.addSysMLBlocksPalette=function(a){var c=this,d=[this.addEntry("sysml block block definition diagram",function(){var b=new mxCell('<p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;"><b>bdd</b> Namespace1</p>',new mxGeometry(0,0,300,100),"html=1;shape=mxgraph.sysml.package;labelX=120;align=left;spacingLeft=10;overflow=fill;recursiveResize=0;");b.vertex=!0;var e=new mxCell("Block1",
+new mxGeometry(15,30,100,50),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;fontStyle=1;html=1;whiteSpace=wrap;align=center;");e.vertex=!0;b.insert(e);var f=new mxCell("Block2",new mxGeometry(190,30,100,50),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;fontStyle=1;html=1;whiteSpace=wrap;align=center;");f.vertex=!0;b.insert(f);var g=new mxCell("part1",new mxGeometry(0,0,0,0),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;align=right;html=1;verticalAlign=bottom;endArrow=none;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=none;endFill=0;labelBackgroundColor=none;");
+g.geometry.relative=!0;g.geometry.x=1;g.edge=!0;b.insert(g);var h=new mxCell("1",new mxGeometry(-1,0,0,0),"resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=none;fontSize=10");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;g.insert(h);h=new mxCell("0..*",new mxGeometry(1,0,0,0),"resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=none;fontSize=10");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;g.insert(h);e.insertEdge(g,!0);f.insertEdge(g,!1);
+return c.createVertexTemplateFromCells([b],300,100,"Block Definition Diagram")}),this.addDataEntry("sysml block relation",160,0,"Relation","zVRNb8IwDP01vUwaCi3aHcrgNGkS+wOhMW20NEapYYVfP9MmLVVh2qYddqjkPNvPHy9NlKRlvXZyX7ygAhMlz1GSOkRqrbJOwZgoFlpFyTKKY8FfFK/ueKeNV+ylA0vfSYjbhKM0B2gRziVPU9HJeFQanVs2nc4LJl4UVHKvyymbR3CkM2nmPmSLRFiyA6yaO4cfjFm0TLSoiMkDprQs0aq3Qtvg2ujzpd50FoCVNqEMqBw2viFP13Z5cdydvoH86GvAEsidOKQeJDgwkvRxyCKr9ph3WR3RK2rm70MqPLgMPHq97BAYyj2JITePmAONEtm46raHGu1u65iMdBxr6KDSZ7ltjmKoYZDXwI5uSEq4Z9TILZiFzN5zhwerUjToejF2aDv9/JgZWgsZ+ZLdXRQXeqjvahZ/qdnjT0UbbPWLFc5GKxSTycNvthh+kv+8xj/aIh/7x6q9t9dv2Sc="),
this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;verticalAlign=top;align=left;whiteSpace=wrap;",220,340,'<p style="margin:0px;margin-top:4px;text-align:center;">&lt;&lt;block&gt;&gt;<br/>{encapsulated}<br/><b>Block1</b></p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>constraints</i></p><p style="margin:0px;margin-left:8px;text-align:left;">{x &gt; y}</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>operations</i></p><p style="margin:0px;margin-left:8px;text-align:left;">operation1 (p1 : Type1) : Type2</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>parts</i></p><p style="margin:0px;margin-left:8px;text-align:left;">property1 : Block2</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>references</i></p><p style="margin:0px;margin-left:8px;text-align:left;">property2 : Block3 [0..*] {ordered}</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>values</i></p><p style="margin:0px;margin-left:8px;text-align:left;">property3 : Integer = 99 {readOnly}<br/>property4 : Real = 10.0</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>properties</i></p><p style="margin:0px;margin-left:8px;text-align:left;">property5 : Type1</p>',
"Block",null,null,this.getTagsForStencil("","","sysml block block").join(" ")),this.createVertexTemplateEntry("shape=umlActor;html=1;verticalLabelPosition=bottom;verticalAlign=top;align=center;",30,60,"ActorName","Actor",null,null,this.getTagsForStencil("","","sysml block actor").join(" ")),this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;whiteSpace=wrap;align=center;",160,80,"<p>&lt;&lt;actor&gt;&gt;<br/><b>ActorName</b></p>","Actor",null,null,this.getTagsForStencil("","","sysml block actor").join(" ")),
this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;whiteSpace=wrap;",200,180,'<p style="margin:0px;margin-top:4px;text-align:center;">&lt;&lt;valueType&gt;&gt;<br/><b>ValueType1</b></p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>operations</i></p><p style="margin:0px;margin-left:8px;text-align:left;">operation1 (p1 : Type1) : Type2</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>properties</i></p><p style="margin:0px;margin-left:8px;text-align:left;">property1 : Type3</p><hr/><p style="margin:0px;margin-left:8px;text-align:center;">&lt;&lt;valueType&gt;&gt;</p><p style="margin:0px;margin-left:8px;text-align:left;">unit = UnitName</p>',
@@ -9812,8 +9820,13 @@ this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;whiteSpace=wrap;
0,160,60),"html=1;shape=mxgraph.sysml.port4;fontStyle=1;whiteSpace=wrap;align=center;");b.vertex=!0;var e=new mxCell("p1",new mxGeometry(0,20,20,20),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;resizable=0;align=left;verticalAlign=bottom;labelPosition=right;verticalLabelPosition=top;labelBackgroundColor=none;fontSize=10;");e.geometry.relative=!1;e.setConnectable(!1);e.vertex=!0;b.insert(e);e=new mxCell("ITransCmd",new mxGeometry(0,0,0,0),"edgeStyle=none;html=1;align=left;verticalAlign=bottom;endArrow=sysMLReqInt;endSize=8;exitX=0;exitY=0.5;");
e.geometry.setTerminalPoint(new mxPoint(0,0),!1);e.geometry.relative=!0;e.geometry.x=1;e.edge=!0;b.insertEdge(e,!0);var f=new mxCell("ITransData",new mxGeometry(0,0,0,0),"edgeStyle=none;html=1;align=left;verticalAlign=top;endArrow=sysMLProvInt;endSize=12;exitX=0;exitY=0.5;");f.geometry.setTerminalPoint(new mxPoint(0,60),!1);f.geometry.relative=!0;f.geometry.x=1;f.edge=!0;b.insertEdge(f,!0);return c.createVertexTemplateFromCells([b,e,f],250,60,"Required Interface")}),this.addEntry("sysml port flow provided interface",
function(){var b=new mxCell("Transmission",new mxGeometry(90,0,160,60),"html=1;shape=mxgraph.sysml.port4;fontStyle=1;whiteSpace=wrap;align=center;");b.vertex=!0;var e=new mxCell("p1",new mxGeometry(0,20,20,20),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;resizable=0;labelBackgroundColor=none;fontSize=10;");e.geometry.relative=!1;e.setConnectable(!1);e.vertex=!0;b.insert(e);e=new mxCell("ITransCmd",new mxGeometry(0,0,0,0),"edgeStyle=none;html=1;align=left;verticalAlign=bottom;endArrow=sysMLReqInt;endSize=8;exitX=0;exitY=0.5;");
-e.geometry.setTerminalPoint(new mxPoint(0,0),!1);e.geometry.relative=!0;e.geometry.x=1;e.edge=!0;b.insertEdge(e,!0);var f=new mxCell("ITransData",new mxGeometry(0,0,0,0),"edgeStyle=none;html=1;align=left;verticalAlign=top;endArrow=sysMLProvInt;endSize=12;exitX=0;exitY=0.5;");f.geometry.setTerminalPoint(new mxPoint(0,60),!1);f.geometry.relative=!0;f.geometry.x=1;f.edge=!0;b.insertEdge(f,!0);return c.createVertexTemplateFromCells([b,e,f],250,60,"Provided Interface")})];this.addPalette("sysmlPorts and Flows",
-"SysML / Ports and Flows",a||!1,mxUtils.bind(this,function(b){for(var e=0;e<d.length;e++)b.appendChild(d[e](b))}))};Sidebar.prototype.addSysMLConstraintBlocksPalette=function(a){var c=this,d=[this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;whiteSpace=wrap;",200,180,'<p style="margin:0px;margin-top:4px;text-align:center;">&lt;&lt;constraint&gt;&gt;<br/><b>ConstraintBlock1</b></p><hr/><p style="font-size:10px;margin:0px;margin-top:4px;text-align:center;"><i>constraints</i></p><p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;">{{L1} x > y }<br/>nested: ConstraintBlock2</p><hr/><p style="font-size:10px;margin:0px;margin-top:4px;text-align:center;"><i>parameters</i></p><p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;">x: Real<br/>y: Real</p>',
+e.geometry.setTerminalPoint(new mxPoint(0,0),!1);e.geometry.relative=!0;e.geometry.x=1;e.edge=!0;b.insertEdge(e,!0);var f=new mxCell("ITransData",new mxGeometry(0,0,0,0),"edgeStyle=none;html=1;align=left;verticalAlign=top;endArrow=sysMLProvInt;endSize=12;exitX=0;exitY=0.5;");f.geometry.setTerminalPoint(new mxPoint(0,60),!1);f.geometry.relative=!0;f.geometry.x=1;f.edge=!0;b.insertEdge(f,!0);return c.createVertexTemplateFromCells([b,e,f],250,60,"Provided Interface")}),this.createVertexTemplateEntry("html=1;shape=mxgraph.sysml.port;sysMLPortType=flowN;",
+20,20,"","Port, Flow North",null,null,this.getTagsForStencil("","","sysml port flow item flow north").join(" ")),this.createVertexTemplateEntry("html=1;shape=mxgraph.sysml.port;sysMLPortType=doubleH;",20,20,"","Port, Double Flow, Horizontal",null,null,this.getTagsForStencil("","","sysml port flow item double flow horizontal").join(" ")),this.addEntry("sysml port flow ports",function(){var b=new mxCell("",new mxGeometry(0,0,200,140),"whiteSpace=wrap;align=center;");b.vertex=!0;var e=new mxCell("port1",
+new mxGeometry(0,0,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=flowS;labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(50,-10);b.insert(e);e=new mxCell("port2",new mxGeometry(1,0,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=empty;labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;");e.geometry.relative=!0;e.vertex=
+!0;e.geometry.offset=new mxPoint(-70,-10);b.insert(e);e=new mxCell("port3",new mxGeometry(0,0,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=flowE;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,30);b.insert(e);e=new mxCell("port4",new mxGeometry(0,1,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=doubleH;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;");
+e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,-50);b.insert(e);e=new mxCell("port5",new mxGeometry(1,0,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=flowE;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,30);b.insert(e);e=new mxCell("port6",new mxGeometry(1,1,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=doubleH;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;");
+e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,-50);b.insert(e);e=new mxCell("port7",new mxGeometry(0,1,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=flowN;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(50,-10);b.insert(e);e=new mxCell("port8",new mxGeometry(1,1,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=doubleV;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;");
+e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-70,-10);b.insert(e);return c.createVertexTemplateFromCells([b],220,160,"Ports")})];this.addPalette("sysmlPorts and Flows","SysML / Ports and Flows",a||!1,mxUtils.bind(this,function(b){for(var e=0;e<d.length;e++)b.appendChild(d[e](b))}))};Sidebar.prototype.addSysMLConstraintBlocksPalette=function(a){var c=this,d=[this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;whiteSpace=wrap;",200,180,'<p style="margin:0px;margin-top:4px;text-align:center;">&lt;&lt;constraint&gt;&gt;<br/><b>ConstraintBlock1</b></p><hr/><p style="font-size:10px;margin:0px;margin-top:4px;text-align:center;"><i>constraints</i></p><p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;">{{L1} x > y }<br/>nested: ConstraintBlock2</p><hr/><p style="font-size:10px;margin:0px;margin-top:4px;text-align:center;"><i>parameters</i></p><p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;">x: Real<br/>y: Real</p>',
"Constraint Block",null,null,this.getTagsForStencil("","","sysml constraint block ").join(" ")),this.addEntry("sysml constraint block parametric diagram",function(){var b=new mxCell('<p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;"><b>par</b> Block1</p>',new mxGeometry(0,0,300,170),"html=1;shape=mxgraph.sysml.package;labelX=120;align=left;spacingLeft=10;overflow=fill;whiteSpace=wrap;recursiveResize=0;");b.vertex=!0;var e=new mxCell("C1: Constraint",new mxGeometry(130,50,150,
100),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;html=1;shape=mxgraph.sysml.paramDgm;fontStyle=1;whiteSpace=wrap;align=center;");e.vertex=!0;b.insert(e);var f=new mxCell("x:",new mxGeometry(0,25,0,0),"html=1;resizable=0;align=left;verticalAlign=middle;labelPosition=left;verticalLabelPosition=middle;labelBackgroundColor=none;fontSize=10;spacingLeft=22;fontStyle=1;");f.geometry.relative=!1;f.setConnectable(!1);f.vertex=!0;e.insert(f);f=new mxCell("y:",new mxGeometry(0,75,0,0),"html=1;resizable=0;align=left;verticalAlign=middle;labelPosition=left;verticalLabelPosition=middle;labelBackgroundColor=none;fontSize=10;spacingLeft=22;fontStyle=1;");
f.geometry.relative=!1;f.setConnectable(!1);f.vertex=!0;e.insert(f);var g=new mxCell("length: Real",new mxGeometry(30,65,20,20),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;fontSize=10;verticalLabelPosition=top;verticalAlign=bottom;");g.vertex=!0;b.insert(g);f=new mxCell("width: Real",new mxGeometry(30,115,20,20),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;fontSize=10;verticalLabelPosition=top;verticalAlign=bottom;");f.vertex=!0;
@@ -10703,39 +10716,39 @@ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=funct
DrawioFile=function(b,d){mxEventSource.call(this);this.ui=b;this.setData(d||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
-DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(e){this.sync.cleanup(b,d,e)}),d):this.updateFile(b,d)};
-DrawioFile.prototype.updateFile=function(b,d,e,c){null!=e&&e()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(l){try{null!=e&&e()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[l]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=l?this.mergeFile(l,b,d,c):this.reloadFile(b,
+DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(f){this.sync.cleanup(b,d,f)}),d):this.updateFile(b,d)};
+DrawioFile.prototype.updateFile=function(b,d,f,c){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(l){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[l]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=l?this.mergeFile(l,b,d,c):this.reloadFile(b,
d))}catch(m){null!=d&&d(m)}}),d))};
-DrawioFile.prototype.mergeFile=function(b,d,e,c){var l=!0;try{this.stats.fileMerged++;var m=this.getShadowPages(),t=b.getShadowPages();if(null!=t&&0<t.length){var y=[this.ui.diffPages(null!=c?c:m,t)],C=this.ignorePatches(y);this.setShadowPages(t);if(C)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",C);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;c={};C={};var A=this.ui.patchPages(m,y[0]),B=this.ui.getHashValueForPages(A,
-c),J=this.ui.getHashValueForPages(t,C);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",m,"pages",this.ui.pages,"patches",y,"backup",this.backupPatch,"checksum",B,"current",J,"valid",B==J,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=B&&B!=J){var f=this.compressReportData(this.getAnonymizedXmlForPages(t)),g=this.compressReportData(this.getAnonymizedXmlForPages(A)),k=this.ui.hashValue(b.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(e,y,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+B+"\nCurrent: "+J+"\nCurrent Details: "+JSON.stringify(C)+"\nFrom: "+k+"\nTo: "+n+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile",B,J,b.getCurrentRevisionId());return}if(null!=this.sync){var v=this.sync.patchRealtime(y,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==v||mxUtils.isEmptyObject(v)||y.push(v)}this.patch(y,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=e&&e(z);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var x=this.getCurrentUser(),E=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),E,z)}}catch(G){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var d=new mxCodec(mxUtils.createXmlDocument()),e=d.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var l=d.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,l,!0);e.appendChild(l)}return mxUtils.getPrettyXml(e)};
-DrawioFile.prototype.compressReportData=function(b,d,e){d=null!=d?d:1E4;null!=e&&null!=b&&b.length>e?b=b.substring(0,e)+"[...]":null!=b&&b.length>d&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,d,e,c,l,m,t,y){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!=d)for(var C=0;C<d.length;C++)this.ui.anonymizePatch(d[C]);var A=mxUtils.bind(this,function(n){var v=this.compressReportData(JSON.stringify(d,null,2));n=null==n?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(n.data)),
-25E3);this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+v+(null!=n?"\n\nRemote:\n"+n:""),null,7E4)});null==c?A(null):this.getLatestVersion(mxUtils.bind(this,function(n){null!=n&&n.getCurrentEtag()==c?A(n):A(null)}),function(){})}else{var B=this.getCurrentUser(),J=null!=B?B.id:"unknown",f=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",g=JSON.stringify(d).length,k=null;if(null!=d&&this.constructor==DriveFile&&400>g){for(C=0;C<d.length;C++)this.ui.anonymizePatch(d[C]);
-k=JSON.stringify(d);k=null!=k&&250>k.length?Graph.compress(k):null}this.getLatestVersion(mxUtils.bind(this,function(n){try{var v=null!=k?"Report":"Error",x=this.ui.getHashValueForPages(n.getShadowPages());EditorUi.logError("Checksum "+v+" in "+l+" "+f,null,this.getMode()+"."+this.getId(),"user_"+J+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+g+"-patches_"+d.length+(null!=k?"-json_"+k:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=t?"-current_"+t:"")+(null!=y?
-"-rev_"+this.ui.hashValue(y):"")+(null!=x?"-latest_"+x:"")+(null!=n?"-latestRev_"+this.ui.hashValue(n.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+f,action:l,label:"user_"+J+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+g+"-patches_"+d.length+"-size_"+this.getSize()})}catch(E){}}),b)}}catch(n){}};
-DrawioFile.prototype.sendErrorReport=function(b,d,e,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),y=null!=t?this.ui.hashValue(t.id):"unknown",C=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),B=A.lastIndexOf(".");t="xml";0<B&&(t=A.substring(B));var J=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+DrawioFile.prototype.mergeFile=function(b,d,f,c){var l=!0;try{this.stats.fileMerged++;var m=this.getShadowPages(),t=b.getShadowPages();if(null!=t&&0<t.length){var y=[this.ui.diffPages(null!=c?c:m,t)],C=this.ignorePatches(y);this.setShadowPages(t);if(C)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",C);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;c={};C={};var A=this.ui.patchPages(m,y[0]),B=this.ui.getHashValueForPages(A,
+c),J=this.ui.getHashValueForPages(t,C);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",m,"pages",this.ui.pages,"patches",y,"backup",this.backupPatch,"checksum",B,"current",J,"valid",B==J,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=B&&B!=J){var e=this.compressReportData(this.getAnonymizedXmlForPages(t)),g=this.compressReportData(this.getAnonymizedXmlForPages(A)),k=this.ui.hashValue(b.getCurrentEtag()),q=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(f,y,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+B+"\nCurrent: "+J+"\nCurrent Details: "+JSON.stringify(C)+"\nFrom: "+k+"\nTo: "+q+"\n\nFile Data:\n"+e+"\nPatched Shadow:\n"+g,null,"mergeFile",B,J,b.getCurrentRevisionId());return}if(null!=this.sync){var u=this.sync.patchRealtime(y,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==u||mxUtils.isEmptyObject(u)||y.push(u)}this.patch(y,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw l=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(z);try{if(l)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var x=this.getCurrentUser(),E=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),E,z)}}catch(G){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var d=new mxCodec(mxUtils.createXmlDocument()),f=d.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var l=d.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)};
+DrawioFile.prototype.compressReportData=function(b,d,f){d=null!=d?d:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>d&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,d,f,c,l,m,t,y){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!=d)for(var C=0;C<d.length;C++)this.ui.anonymizePatch(d[C]);var A=mxUtils.bind(this,function(q){var u=this.compressReportData(JSON.stringify(d,null,2));q=null==q?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(q.data)),
+25E3);this.sendErrorReport("Checksum Error in "+l+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+u+(null!=q?"\n\nRemote:\n"+q:""),null,7E4)});null==c?A(null):this.getLatestVersion(mxUtils.bind(this,function(q){null!=q&&q.getCurrentEtag()==c?A(q):A(null)}),function(){})}else{var B=this.getCurrentUser(),J=null!=B?B.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",g=JSON.stringify(d).length,k=null;if(null!=d&&this.constructor==DriveFile&&400>g){for(C=0;C<d.length;C++)this.ui.anonymizePatch(d[C]);
+k=JSON.stringify(d);k=null!=k&&250>k.length?Graph.compress(k):null}this.getLatestVersion(mxUtils.bind(this,function(q){try{var u=null!=k?"Report":"Error",x=this.ui.getHashValueForPages(q.getShadowPages());EditorUi.logError("Checksum "+u+" in "+l+" "+e,null,this.getMode()+"."+this.getId(),"user_"+J+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+g+"-patches_"+d.length+(null!=k?"-json_"+k:"")+"-size_"+this.getSize()+(null!=m?"-expected_"+m:"")+(null!=t?"-current_"+t:"")+(null!=y?
+"-rev_"+this.ui.hashValue(y):"")+(null!=x?"-latest_"+x:"")+(null!=q?"-latestRev_"+this.ui.hashValue(q.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+e,action:l,label:"user_"+J+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+g+"-patches_"+d.length+"-size_"+this.getSize()})}catch(E){}}),b)}}catch(q){}};
+DrawioFile.prototype.sendErrorReport=function(b,d,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),y=null!=t?this.ui.hashValue(t.id):"unknown",C=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),B=A.lastIndexOf(".");t="xml";0<B&&(t=A.substring(B));var J=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+t+")\nUser="+y+C+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=d?"\n\n"+d:
-"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+J+"\n\nShadow:\n"+l+"\n\nData:\n"+m,c)}catch(f){}};
-DrawioFile.prototype.reloadFile=function(b,d){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),d);else{var c=this.ui.editor.graph,l=c.getSelectionCells(),m=c.getViewState(),t=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(t,m,l);null!=this.backupPatch&&this.patch([this.backupPatch]);var y=this.ui.getCurrentFile();null!=y&&(y.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):
-e()}catch(c){null!=d&&d(c)}};DrawioFile.prototype.mergeLatestVersion=function(b,d,e){this.getLatestVersion(mxUtils.bind(this,function(c){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(c.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(c.getDescriptor());this.descriptorChanged();null!=d&&d()}),e)};
-DrawioFile.prototype.copyFile=function(b,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var d=!0;if(null!=b)for(var e=0;e<b.length&&d;e++)d=d&&mxUtils.isEmptyObject(b[e]);return d};
-DrawioFile.prototype.patch=function(b,d,e){if(null!=b){var c=this.ui.editor.undoManager,l=c.history.slice(),m=c.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var y=this.changeListenerEnabled;this.changeListenerEnabled=e;var C=t.foldingEnabled,A=t.mathEnabled,B=t.cellRenderer.redraw;t.cellRenderer.redraw=function(J){J.view.graph.isEditing(J.cell)&&(J.view.graph.scrollCellToVisible(J.cell),J.view.graph.cellEditor.resize());B.apply(this,arguments)};t.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,d,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=B;this.changeListenerEnabled=y;e||(c.history=l,c.indexOfNextAdd=m,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)A!=t.mathEnabled?
-(this.ui.editor.updateGraphComponents(),t.refresh()):(C!=t.foldingEnabled?t.view.revalidate():t.view.validate(),t.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",d,"undoable",e)}return b};
-DrawioFile.prototype.save=function(b,d,e,c,l,m){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",l,"manual",m,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!l&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=e)e({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var d=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=d&&(d.viewState=this.ui.editor.graph.getViewState(),d.needsUpdate=!0)}d=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return d};
-DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,d,e){};
-DrawioFile.prototype.saveFile=function(b,d,e,c){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
-DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,d,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,d,e){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
+"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+J+"\n\nShadow:\n"+l+"\n\nData:\n"+m,c)}catch(e){}};
+DrawioFile.prototype.reloadFile=function(b,d){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),d);else{var c=this.ui.editor.graph,l=c.getSelectionCells(),m=c.getViewState(),t=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(t,m,l);null!=this.backupPatch&&this.patch([this.backupPatch]);var y=this.ui.getCurrentFile();null!=y&&(y.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):
+f()}catch(c){null!=d&&d(c)}};DrawioFile.prototype.mergeLatestVersion=function(b,d,f){this.getLatestVersion(mxUtils.bind(this,function(c){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(c.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(c.getDescriptor());this.descriptorChanged();null!=d&&d()}),f)};
+DrawioFile.prototype.copyFile=function(b,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var d=!0;if(null!=b)for(var f=0;f<b.length&&d;f++)d=d&&mxUtils.isEmptyObject(b[f]);return d};
+DrawioFile.prototype.patch=function(b,d,f){if(null!=b){var c=this.ui.editor.undoManager,l=c.history.slice(),m=c.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var y=this.changeListenerEnabled;this.changeListenerEnabled=f;var C=t.foldingEnabled,A=t.mathEnabled,B=t.cellRenderer.redraw;t.cellRenderer.redraw=function(J){J.view.graph.isEditing(J.cell)&&(J.view.graph.scrollCellToVisible(J.cell),J.view.graph.cellEditor.resize());B.apply(this,arguments)};t.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,d,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=B;this.changeListenerEnabled=y;f||(c.history=l,c.indexOfNextAdd=m,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)A!=t.mathEnabled?
+(this.ui.editor.updateGraphComponents(),t.refresh()):(C!=t.foldingEnabled?t.view.revalidate():t.view.validate(),t.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",d,"undoable",f)}return b};
+DrawioFile.prototype.save=function(b,d,f,c,l,m){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",l,"manual",m,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!l&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=f)f({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=f)f(t);else throw t;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var d=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=d&&(d.viewState=this.ui.editor.graph.getViewState(),d.needsUpdate=!0)}d=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return d};
+DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,d,f){};
+DrawioFile.prototype.saveFile=function(b,d,f,c){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
+DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,d,f){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,d,f){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var d=function(e){for(var c=0;null!=e&&c<e.length;c++){var l=e[c];null!=l.id&&0==l.id.indexOf("extFont_")&&l.parentNode.removeChild(l)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var d=function(f){for(var c=0;null!=f&&c<f.length;c++){var l=f[c];null!=l.id&&0==l.id.indexOf("extFont_")&&l.parentNode.removeChild(l)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,d){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,d){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,d){this.loadDescriptor(mxUtils.bind(this,function(e){b(e)}),d)};DrawioFile.prototype.patchDescriptor=function(b,d){this.setDescriptorEtag(b,this.getDescriptorEtag(d));this.descriptorChanged()};
+DrawioFile.prototype.loadDescriptor=function(b,d){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,d){this.loadDescriptor(mxUtils.bind(this,function(f){b(f)}),d)};DrawioFile.prototype.patchDescriptor=function(b,d){this.setDescriptorEtag(b,this.getDescriptorEtag(d));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,d){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,d){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.getPullingInterval=function(){return 1E4};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};
@@ -10743,148 +10756,146 @@ DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.
DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,d){b=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
-DrawioFile.prototype.addAllSavedStatus=function(b){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+b+'">'+b+"</div>"),b=this.ui.statusContainer.getElementsByTagName("div"),0<b.length&&this.isRevisionHistorySupported()&&(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
+DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var d=this.isRevisionHistorySupported()?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+d+'title="'+b+'">'+b+"</div>")}};
DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(d){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
-DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var d=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>");d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length&&(d[0].style.cursor="pointer",mxEvent.addListener(d[0],
-"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{d=this.getErrorMessage(b);if(null==d&&null!=this.lastSaved){var e=this.ui.timeSince(new Date(this.lastSaved));null!=e&&(d=mxResources.get("lastSaved",[e]))}null!=d&&60<d.length&&(d=d.substring(0,60)+"...");d=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":"");this.ui.editor.setStatus('<div title="'+
-d+'" class="geStatusAlertOrange">'+d+' <img src="'+Editor.saveImage+'"/></div>');d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(d=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
-EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
-0))}};
-DrawioFile.prototype.addConflictStatus=function(b,d){this.invalidChecksum&&null==d&&(d=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":""));this.ui.spinner.stop();this.clearAutosave();d=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(e){"IMG"!=mxEvent.getSource(e).nodeName&&
-b()}))):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),b)};DrawioFile.prototype.setConflictStatus=function(b){this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert">'+b+' <a href="https://www.diagrams.net/doc/faq/synchronize" title="'+mxResources.get("help")+'" target="_blank"><img src="'+Editor.helpImage+'"/></a></div>')};
-DrawioFile.prototype.showRefreshDialog=function(b,d,e){null==e&&(e=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,d)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,d)}),e),this.ui.showError(mxResources.get("warning")+" ("+e+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
+DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var d=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+d+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>")}else d=
+this.getErrorMessage(b),null==d&&null!=this.lastSaved&&(b=this.ui.timeSince(new Date(this.lastSaved)),null!=b&&(d=mxResources.get("lastSaved",[b]))),null!=d&&60<d.length&&(d=d.substring(0,60)+"..."),d=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":""),b='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"',this.ui.editor.setStatus("<div "+b+' title="'+d+'" class="geStatusAlertOrange">'+d+' <img src="'+Editor.saveImage+
+'"/></div>'),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
+0))};DrawioFile.prototype.addConflictStatus=function(b,d){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),d);this.ui.spinner.stop();this.clearAutosave()};
+DrawioFile.prototype.setConflictStatus=function(b,d){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=d?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.diagrams.net/doc/faq/synchronize" src="'+Editor.helpImage+'" style="cursor:help;"/></div>',d)};
+DrawioFile.prototype.showRefreshDialog=function(b,d,f){null==f&&(f=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,d)})):(this.addConflictStatus(f,mxUtils.bind(this,function(){this.showRefreshDialog(b,d)})),this.ui.showError(mxResources.get("warning")+" ("+f+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
d)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,d)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,d,e){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,d)}),null,mxResources.get("overwrite"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showCopyDialog=function(b,d,f){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,d)}),null,mxResources.get("overwrite"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
DrawioFile.prototype.showConflictDialog=function(b,d){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var e=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=d&&(c+=" ("+d+")");d=mxUtils.bind(this,function(){var l=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==e?window.location.reload():window.location.href=
-e});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+DrawioFile.prototype.redirectToNewApp=function(b,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var f=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=d&&(c+=" ("+d+")");d=mxUtils.bind(this,function(){var l=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==f?window.location.reload():window.location.href=
+f});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
d)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(b,d){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,d):(this.isModified()&&this.addUnsavedStatus(b),d?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,d){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(t){this.handleFileError(t,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,e,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,c,l):this.invalidChecksum?this.showRefreshDialog(e,c,this.getErrorMessage(b)):d?this.showConflictDialog(l,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(e,c)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var d=null!=b?null!=b.error?b.error.message:b.message:null;null==d&&null!=b&&b.code==App.ERROR_TIMEOUT&&(d=mxResources.get("timeout"));return d};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.handleConflictError=function(b,d){var f=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(t){this.handleFileError(t,!0)}),l=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,f,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,f,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(f,c,l):this.invalidChecksum?this.showRefreshDialog(f,c,this.getErrorMessage(b)):d?this.showConflictDialog(l,m):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(f,c)}))};DrawioFile.prototype.getErrorMessage=function(b){var d=null!=b?null!=b.error?b.error.message:b.message:null;null==d&&null!=b&&b.code==App.ERROR_TIMEOUT&&(d=mxResources.get("timeout"));return d};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(d){this.ui.stopSanityCheck();
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(d){this.handleFileError(d)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var d=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(d):this.sync.createToken(d,mxUtils.bind(this,function(e){b(d,e)}),mxUtils.bind(this,function(){b(d)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,d,e,c,l){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var m=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(m),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=e&&e()):this.sync.fileSaved(m,d,e,c,l)}catch(C){this.invalidChecksum=this.inConflictState=
+DrawioFile.prototype.createSecret=function(b){var d=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(d):this.sync.createToken(d,mxUtils.bind(this,function(f){b(d,f)}),mxUtils.bind(this,function(){b(d)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,d,f,c,l){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var m=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(m),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(m,d,f,c,l)}catch(C){this.invalidChecksum=this.inConflictState=
!0;this.descriptorChanged();null!=c&&c(C);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,C);else{var t=this.getCurrentUser(),y=null!=t?t.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),y,C)}}catch(A){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,d,e,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<d?b:0;this.clearAutosave();var l=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==l&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",l,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var m=this.isAutosaveRevision();
-m&&(this.lastAutosaveRevision=(new Date).getTime());this.save(m,mxUtils.bind(this,function(t){this.autosaveCompleted();null!=e&&e(t)}),mxUtils.bind(this,function(t){null!=c&&c(t)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",l,"delay",b,"saving",this.savingFile);this.autosaveThread=l};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+DrawioFile.prototype.autosave=function(b,d,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<d?b:0;this.clearAutosave();var l=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==l&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",l,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var m=this.isAutosaveRevision();
+m&&(this.lastAutosaveRevision=(new Date).getTime());this.save(m,mxUtils.bind(this,function(t){this.autosaveCompleted();null!=f&&f(t)}),mxUtils.bind(this,function(t){null!=c&&c(t)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}catch(t){null!=c&&c(t)}}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",l,"delay",b,"saving",this.savingFile);this.autosaveThread=l};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
-DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,d){if(null!=b&&null!=d){var e=b.lastIndexOf(".");b=0<e?b.substring(e):"";e=d.lastIndexOf(".");return b===(0<e?d.substring(e):"")}return b==d};
+DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,d){if(null!=b&&null!=d){var f=b.lastIndexOf(".");b=0<f?b.substring(f):"";f=d.lastIndexOf(".");return b===(0<f?d.substring(f):"")}return b==d};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,d){b([])};DrawioFile.prototype.addComment=function(b,d,e){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,d){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,d)};LocalFile=function(b,d,e,c,l,m){DrawioFile.call(this,b,d);this.title=e;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=l;this.desc=m};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
-LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,d,e){this.saveAs(this.title,d,e)};LocalFile.prototype.saveAs=function(b,d,e){this.saveFile(b,!1,d,e)};LocalFile.prototype.saveAs=function(b,d,e){this.saveFile(b,!1,d,e)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,d){b([])};DrawioFile.prototype.addComment=function(b,d,f){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,d){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,d)};LocalFile=function(b,d,f,c,l,m){DrawioFile.call(this,b,d);this.title=f;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=l;this.desc=m};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,d,f){this.saveAs(this.title,d,f)};LocalFile.prototype.saveAs=function(b,d,f){this.saveFile(b,!1,d,f)};LocalFile.prototype.saveAs=function(b,d,f){this.saveFile(b,!1,d,f)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,d){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,d)};
-LocalFile.prototype.saveFile=function(b,d,e,c,l){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var t=this.getData(),y=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),C=mxUtils.bind(this,function(A){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var B=mxUtils.bind(this,
-function(f){this.savingFile=!1;null!=c&&c({error:f})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(f){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[g],"conflict",this.desc.lastModified!=g.lastModified);this.desc.lastModified==g.lastModified?f.write(m?this.ui.base64ToBlob(A,"image/png"):A).then(mxUtils.bind(this,function(){f.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(k){try{var n=this.desc;this.savingFile=!1;this.desc=k;this.fileSaved(t,n,y,B);this.removeDraft()}catch(v){B(v)}}),B)}),B)}),B):(this.inConflictState=!0,B())}),mxUtils.bind(this,function(g){this.invalidFileHandle=!0;B(g)}))}),B)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(A,b,m?"image/png":"text/xml",m);else if(A.length<MAX_REQUEST_SIZE){var J=b.lastIndexOf(".");J=0<J?b.substring(J+1):"xml";
+LocalFile.prototype.saveFile=function(b,d,f,c,l){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var m=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var t=this.getData(),y=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),C=mxUtils.bind(this,function(A){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var B=mxUtils.bind(this,
+function(e){this.savingFile=!1;null!=c&&c({error:e})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(e){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[g],"conflict",this.desc.lastModified!=g.lastModified);this.desc.lastModified==g.lastModified?e.write(m?this.ui.base64ToBlob(A,"image/png"):A).then(mxUtils.bind(this,function(){e.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(k){try{var q=this.desc;this.savingFile=!1;this.desc=k;this.fileSaved(t,q,y,B);this.removeDraft()}catch(u){B(u)}}),B)}),B)}),B):(this.inConflictState=!0,B())}),mxUtils.bind(this,function(g){this.invalidFileHandle=!0;B(g)}))}),B)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(A,b,m?"image/png":"text/xml",m);else if(A.length<MAX_REQUEST_SIZE){var J=b.lastIndexOf(".");J=0<J?b.substring(J+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+J+"&xml="+encodeURIComponent(A)+"&filename="+encodeURIComponent(b)+(m?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(A)}));y()}});m?(d=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(A){C(A)}),c,this.ui.getCurrentFile()!=this?t:null,d.scale,d.border)):C(t)};
-LocalFile.prototype.rename=function(b,d,e){this.title=b;this.descriptorChanged();null!=d&&d()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,d,e){LocalFile.call(this,b,d,e)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,d,e){this.saveFile(b,!1,d,e)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,d,e){DrawioFile.call(this,b,d);this.title=e};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
-StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,d,e){this.saveAs(this.getTitle(),d,e)};StorageFile.prototype.saveAs=function(b,d,e){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,d,e)};
-StorageFile.insertFile=function(b,d,e,c,l){var m=mxUtils.bind(this,function(t){var y=function(){var C=new StorageFile(b,e,d);C.saveFile(d,!1,function(){c(C)},l)};t?b.confirm(mxResources.get("replaceIt",[d]),y,l):y()});StorageFile.getFileContent(b,d,function(t){m(null!=t)},function(){m(!1)})};StorageFile.getFileContent=function(b,d,e,c){b.getDatabaseItem(d,function(l){e(null!=l?l.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(d,e):null!=c&&c()}),"files")};
-StorageFile.getFileInfo=function(b,d,e,c){b.getDatabaseItem(d,function(l){e(l)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(d,function(l){e(null!=l?{title:d}:null)}):null!=c&&c()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,d,e,c){if(this.isEditable()){var l=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var m=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()});this.setShadowModified(!1);var t=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:t.length,lastModified:Date.now(),type:this.type},{title:this.title,data:t}],m,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
-t,m):null!=c&&c()}),["filesInfo","files"])}catch(y){null!=c&&c(y)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(m){this.isRenamable()&&this.getTitle()!=b&&null!=m?this.ui.confirm(mxResources.get("replaceIt",[b]),l,c):l()}),c)}else null!=e&&e()};
-StorageFile.prototype.rename=function(b,d,e){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,d)}),e)});null!=l?this.ui.confirm(mxResources.get("replaceIt",[b]),m,e):m()}),e):d()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
-StorageFile.prototype.getLatestVersion=function(b,d){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(e){b(new StorageFile(this.ui,e,this.title))}),d)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var d=[],e=0;e<localStorage.length;e++){var c=localStorage.key(e),l=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<l.length){var m=(null==b||"F"==b)&&("<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12)),t=(null==b||"L"==b)&&"<mxlibrary>"===l.substring(0,11);(m||t)&&d.push({title:c,type:m?"F":"L",size:l.length,lastModified:Date.now()})}}return d};
-StorageFile.migrate=function(b){var d=StorageFile.listLocalStorageFiles();d.push({title:".scratchpad",type:"L"});var e=b.transaction(["files","filesInfo"],"readwrite");b=e.objectStore("files");e=e.objectStore("filesInfo");for(var c=0;c<d.length;c++){var l=d[c],m=localStorage.getItem(l.title);b.add({title:l.title,data:m});e.add(l)}};
-StorageFile.listFiles=function(b,d,e,c){b.getDatabaseItems(function(l){var m=[];if(null!=l)for(var t=0;t<l.length;t++)"."==l[t].title.charAt(0)||null!=d&&l[t].type!=d||m.push(l[t]);e(m)},function(){null==b.database?e(StorageFile.listLocalStorageFiles(d)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,d,e,c){b.removeDatabaseItem([d,d],e,function(){null==b.database?(localStorage.removeItem(d),e()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,d,e){StorageFile.call(this,b,d,e)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,d,e){this.saveFile(b,!1,d,e)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(b,d,e){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,d,e){DrawioFile.call(this,b,d);this.title=e;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,d,e){RemoteFile.call(this,b,d,e.title);this.libObj=e};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,d,e){};
-RemoteLibrary.prototype.saveAs=function(b,d,e){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,d,e){StorageFile.call(this,b,d,e);b=e;d=b.lastIndexOf("/");0<=d&&(b=b.substring(d+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,d,e){return!1};UrlLibrary.prototype.saveAs=function(b,d,e){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,d,e){DrawioFile.call(this,b,d);this.desc=e||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
+LocalFile.prototype.rename=function(b,d,f){this.title=b;this.descriptorChanged();null!=d&&d()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,d,f){LocalFile.call(this,b,d,f)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,d,f){this.saveFile(b,!1,d,f)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,d,f){DrawioFile.call(this,b,d);this.title=f};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
+StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,d,f){this.saveAs(this.getTitle(),d,f)};StorageFile.prototype.saveAs=function(b,d,f){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,d,f)};
+StorageFile.insertFile=function(b,d,f,c,l){var m=mxUtils.bind(this,function(t){var y=function(){var C=new StorageFile(b,f,d);C.saveFile(d,!1,function(){c(C)},l)};t?b.confirm(mxResources.get("replaceIt",[d]),y,l):y()});StorageFile.getFileContent(b,d,function(t){m(null!=t)},function(){m(!1)})};StorageFile.getFileContent=function(b,d,f,c){b.getDatabaseItem(d,function(l){f(null!=l?l.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(d,f):null!=c&&c()}),"files")};
+StorageFile.getFileInfo=function(b,d,f,c){b.getDatabaseItem(d,function(l){f(l)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(d,function(l){f(null!=l?{title:d}:null)}):null!=c&&c()}),"filesInfo")};
+StorageFile.prototype.saveFile=function(b,d,f,c){if(this.isEditable()){var l=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var m=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()});this.setShadowModified(!1);var t=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:t.length,lastModified:Date.now(),type:this.type},{title:this.title,data:t}],m,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
+t,m):null!=c&&c()}),["filesInfo","files"])}catch(y){null!=c&&c(y)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(m){this.isRenamable()&&this.getTitle()!=b&&null!=m?this.ui.confirm(mxResources.get("replaceIt",[b]),l,c):l()}),c)}else null!=f&&f()};
+StorageFile.prototype.rename=function(b,d,f){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,d)}),f)});null!=l?this.ui.confirm(mxResources.get("replaceIt",[b]),m,f):m()}),f):d()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
+StorageFile.prototype.getLatestVersion=function(b,d){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(f){b(new StorageFile(this.ui,f,this.title))}),d)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
+StorageFile.listLocalStorageFiles=function(b){for(var d=[],f=0;f<localStorage.length;f++){var c=localStorage.key(f),l=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<l.length){var m=(null==b||"F"==b)&&("<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12)),t=(null==b||"L"==b)&&"<mxlibrary>"===l.substring(0,11);(m||t)&&d.push({title:c,type:m?"F":"L",size:l.length,lastModified:Date.now()})}}return d};
+StorageFile.migrate=function(b){var d=StorageFile.listLocalStorageFiles();d.push({title:".scratchpad",type:"L"});var f=b.transaction(["files","filesInfo"],"readwrite");b=f.objectStore("files");f=f.objectStore("filesInfo");for(var c=0;c<d.length;c++){var l=d[c],m=localStorage.getItem(l.title);b.add({title:l.title,data:m});f.add(l)}};
+StorageFile.listFiles=function(b,d,f,c){b.getDatabaseItems(function(l){var m=[];if(null!=l)for(var t=0;t<l.length;t++)"."==l[t].title.charAt(0)||null!=d&&l[t].type!=d||m.push(l[t]);f(m)},function(){null==b.database?f(StorageFile.listLocalStorageFiles(d)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,d,f,c){b.removeDatabaseItem([d,d],f,function(){null==b.database?(localStorage.removeItem(d),f()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,d,f){StorageFile.call(this,b,d,f)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,d,f){this.saveFile(b,!1,d,f)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageLibrary.prototype.isRenamable=function(b,d,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,d,f){DrawioFile.call(this,b,d);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,d,f){RemoteFile.call(this,b,d,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,d,f){};
+RemoteLibrary.prototype.saveAs=function(b,d,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,d,f){StorageFile.call(this,b,d,f);b=f;d=b.lastIndexOf("/");0<=d&&(b=b.substring(d+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,d,f){return!1};UrlLibrary.prototype.saveAs=function(b,d,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,d,f){DrawioFile.call(this,b,d);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,d,e){function c(J,f,g,k,n,v){function x(){mxEvent.addListener(E,"click",null!=v?v:function(){g!=App.MODE_GOOGLE||b.isDriveDomain()?g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);d()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);d()}),
-function(p){b.spinner.stop();b.handleError(p)}):(b.setMode(g,!0),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}y++;++t>e&&(mxUtils.br(C),t=1);var E=document.createElement("a");E.style.overflow="hidden";E.style.display="inline-block";E.className="geBaseButton";E.style.boxSizing="border-box";E.style.fontSize="11px";E.style.position="relative";E.style.margin="4px";E.style.marginTop="8px";E.style.marginBottom="0px";E.style.padding="8px 10px 8px 10px";E.style.width="88px";E.style.height=
-"100px";E.style.whiteSpace="nowrap";E.setAttribute("title",f);var z=document.createElement("div");z.style.textOverflow="ellipsis";z.style.overflow="hidden";z.style.position="absolute";z.style.bottom="8px";z.style.left="0px";z.style.right="0px";mxUtils.write(z,f);E.appendChild(z);if(null!=J){var G=document.createElement("img");G.setAttribute("src",J);G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.width="60px";G.style.height="60px";G.style.paddingBottom="6px";E.appendChild(G)}else z.style.paddingTop=
-"5px",z.style.whiteSpace="normal",mxClient.IS_IOS?(E.style.padding="0px 10px 20px 10px",E.style.top="6px"):mxClient.IS_FF&&(z.style.paddingTop="0px",z.style.marginTop="-2px");if(null!=n)for(J=0;J<n.length;J++)mxUtils.br(z),mxUtils.write(z,n[J]);if(null!=k&&null==b[k]){G.style.visibility="hidden";mxUtils.setOpacity(z,10);var F=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});F.spin(E);
-var U=window.setTimeout(function(){null==b[k]&&(F.stop(),E.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(p,u){null!=b[k]&&u.getProperty("client")==b[k]&&(window.clearTimeout(U),mxUtils.setOpacity(z,100),G.style.visibility="",F.stop(),x(),"drive"==k&&null!=A.parentNode&&A.parentNode.removeChild(A))}))}else x();C.appendChild(E)}e=null!=e?e:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom=
+var StorageDialog=function(b,d,f){function c(J,e,g,k,q,u){function x(){mxEvent.addListener(E,"click",null!=u?u:function(){g!=App.MODE_GOOGLE||b.isDriveDomain()?g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);d()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);d()}),
+function(p){b.spinner.stop();b.handleError(p)}):(b.setMode(g,!0),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}y++;++t>f&&(mxUtils.br(C),t=1);var E=document.createElement("a");E.style.overflow="hidden";E.style.display="inline-block";E.className="geBaseButton";E.style.boxSizing="border-box";E.style.fontSize="11px";E.style.position="relative";E.style.margin="4px";E.style.marginTop="8px";E.style.marginBottom="0px";E.style.padding="8px 10px 8px 10px";E.style.width="88px";E.style.height=
+"100px";E.style.whiteSpace="nowrap";E.setAttribute("title",e);var z=document.createElement("div");z.style.textOverflow="ellipsis";z.style.overflow="hidden";z.style.position="absolute";z.style.bottom="8px";z.style.left="0px";z.style.right="0px";mxUtils.write(z,e);E.appendChild(z);if(null!=J){var G=document.createElement("img");G.setAttribute("src",J);G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.width="60px";G.style.height="60px";G.style.paddingBottom="6px";E.appendChild(G)}else z.style.paddingTop=
+"5px",z.style.whiteSpace="normal",mxClient.IS_IOS?(E.style.padding="0px 10px 20px 10px",E.style.top="6px"):mxClient.IS_FF&&(z.style.paddingTop="0px",z.style.marginTop="-2px");if(null!=q)for(J=0;J<q.length;J++)mxUtils.br(z),mxUtils.write(z,q[J]);if(null!=k&&null==b[k]){G.style.visibility="hidden";mxUtils.setOpacity(z,10);var F=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});F.spin(E);
+var U=window.setTimeout(function(){null==b[k]&&(F.stop(),E.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(p,v){null!=b[k]&&v.getProperty("client")==b[k]&&(window.clearTimeout(U),mxUtils.setOpacity(z,100),G.style.visibility="",F.stop(),x(),"drive"==k&&null!=A.parentNode&&A.parentNode.removeChild(A))}))}else x();C.appendChild(E)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom=
"20px";var m=document.createElement("div");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="10px 0px 20px 0px";var t=0,y=0,C=document.createElement("div");C.style.paddingTop="2px";m.appendChild(C);var A=document.createElement("p"),B=document.createElement("p");B.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(B,mxResources.get("saveDiagramsTo")+":");l.appendChild(B);l.appendChild(m);t=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");m=document.createElement("span");m.style.position="absolute";m.style.cursor="pointer";m.style.bottom="27px";m.style.color="gray";m.style.userSelect="none";m.style.textAlign="center";m.style.left="50%";mxUtils.setPrefixedStyle(m.style,
"transform","translate(-50%,0)");mxUtils.write(m,mxResources.get("decideLater"));l.appendChild(m);mxEvent.addListener(m,"click",function(){b.hideDialog();var J=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=J});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(A.style.padding="7px",A.style.fontSize="9pt",A.style.marginTop="-14px",
-A.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",l.appendChild(A))},5E3);this.container=l},SplashDialog=function(b){var d=document.createElement("div");d.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var e=
-b.addLanguageMenu(d,!1,"28px");null!=e&&(e.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var l=document.createElement("div");l.style.margin="8px 0px 0px 0px";l.style.padding="18px 0px 24px 0px";e="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",e=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=
-IMAGE_PATH+"/dropbox-logo.svg",e=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",e=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",e=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",e=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",e=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",e=mxResources.get("trello")):
-(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",l.style.paddingBottom="10px",l.style.paddingTop="30px",e=mxResources.get("device"));var m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="8px";m.style.fontSize="18px";m.style.padding="10px";m.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",m.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var t=document.createElement("table"),
-y=document.createElement("tbody"),C=document.createElement("tr"),A=document.createElement("td"),B=document.createElement("td");t.setAttribute("align","center");A.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,e);B.style.textAlign="left";B.appendChild(c);C.appendChild(A);C.appendChild(B);y.appendChild(C);t.appendChild(y);d.appendChild(t);e=document.createElement("span");e.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
-mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0)");mxUtils.write(e,mxResources.get("changeStorage"));mxEvent.addListener(e,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});d.appendChild(e)}mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){b.hideDialog();b.actions.get("new").funct()});l.appendChild(m);mxUtils.br(l);m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="22px";m.style.fontSize=
+A.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",l.appendChild(A))},5E3);this.container=l},SplashDialog=function(b){var d=document.createElement("div");d.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var f=
+b.addLanguageMenu(d,!1,"28px");null!=f&&(f.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var l=document.createElement("div");l.style.margin="8px 0px 0px 0px";l.style.padding="18px 0px 24px 0px";f="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=
+IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",f=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")):
+(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",l.style.paddingBottom="10px",l.style.paddingTop="30px",f=mxResources.get("device"));var m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="8px";m.style.fontSize="18px";m.style.padding="10px";m.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",m.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var t=document.createElement("table"),
+y=document.createElement("tbody"),C=document.createElement("tr"),A=document.createElement("td"),B=document.createElement("td");t.setAttribute("align","center");A.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);B.style.textAlign="left";B.appendChild(c);C.appendChild(A);C.appendChild(B);y.appendChild(C);t.appendChild(y);d.appendChild(t);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
+mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,mxResources.get("changeStorage"));mxEvent.addListener(f,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});d.appendChild(f)}mxUtils.write(m,mxResources.get("createNewDiagram"));mxEvent.addListener(m,"click",function(){b.hideDialog();b.actions.get("new").funct()});l.appendChild(m);mxUtils.br(l);m=document.createElement("button");m.className="geBigButton";m.style.marginBottom="22px";m.style.fontSize=
"18px";m.style.padding="10px";m.style.width="340px";mxUtils.write(m,mxResources.get("openExistingDiagram"));mxEvent.addListener(m,"click",function(){b.actions.get("open").funct()});l.appendChild(m);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
-b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(e=function(g){m.style.marginBottom="24px";var k=document.createElement("a");k.style.display="inline-block";k.style.color="gray";k.style.cursor="pointer";k.style.marginTop="6px";mxUtils.write(k,mxResources.get("signOut"));m.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(k,"click",function(){b.confirm(mxResources.get("areYouSure"),
-function(){g()})});l.appendChild(k)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var J=b.drive.getUsersList();if(0<J.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");m.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var f=document.createElement("select");f.style.marginLeft="4px";f.style.width="140px";for(e=0;e<J.length;e++)t=document.createElement("option"),mxUtils.write(t,J[e].displayName),t.value=e,f.appendChild(t),
-t=document.createElement("option"),t.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(t,"<"+J[e].email+">"),t.setAttribute("disabled","disabled"),f.appendChild(t);t=document.createElement("option");mxUtils.write(t,mxResources.get("addAccount"));t.value=J.length;f.appendChild(t);mxEvent.addListener(f,"change",function(){var g=f.value,k=J.length!=g;k&&b.drive.setUser(J[g]);b.drive.authorize(k,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(n){b.handleError(n,null,function(){b.hideDialog();
-b.showSplash()})},!0)});l.appendChild(f)}else e(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?e(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?e(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&e(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
-null!=b.dropbox&&e(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):e(function(){b.oneDrive.logout()});d.appendChild(l);this.container=d},EmbedDialog=function(b,d,e,c,l,m,t,y,C){t=null!=t?t:"Check out the diagram I made using @drawio";c=document.createElement("div");var A=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);null!=m?mxUtils.write(c,m):mxUtils.write(c,mxResources.get(5E5>d.length?A?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);m=document.createElement("div");
+b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(g){m.style.marginBottom="24px";var k=document.createElement("a");k.style.display="inline-block";k.style.color="gray";k.style.cursor="pointer";k.style.marginTop="6px";mxUtils.write(k,mxResources.get("signOut"));m.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(k,"click",function(){b.confirm(mxResources.get("areYouSure"),
+function(){g()})});l.appendChild(k)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var J=b.drive.getUsersList();if(0<J.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");m.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var e=document.createElement("select");e.style.marginLeft="4px";e.style.width="140px";for(f=0;f<J.length;f++)t=document.createElement("option"),mxUtils.write(t,J[f].displayName),t.value=f,e.appendChild(t),
+t=document.createElement("option"),t.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(t,"<"+J[f].email+">"),t.setAttribute("disabled","disabled"),e.appendChild(t);t=document.createElement("option");mxUtils.write(t,mxResources.get("addAccount"));t.value=J.length;e.appendChild(t);mxEvent.addListener(e,"change",function(){var g=e.value,k=J.length!=g;k&&b.drive.setUser(J[g]);b.drive.authorize(k,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(q){b.handleError(q,null,function(){b.hideDialog();
+b.showSplash()})},!0)});l.appendChild(e)}else f(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
+null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});d.appendChild(l);this.container=d},EmbedDialog=function(b,d,f,c,l,m,t,y,C){t=null!=t?t:"Check out the diagram I made using @drawio";c=document.createElement("div");var A=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);null!=m?mxUtils.write(c,m):mxUtils.write(c,mxResources.get(5E5>d.length?A?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);m=document.createElement("div");
m.style.position="absolute";m.style.top="30px";m.style.right="30px";m.style.color="gray";mxUtils.write(m,b.formatFileSize(d.length));c.appendChild(m);var B=document.createElement("textarea");B.setAttribute("autocomplete","off");B.setAttribute("autocorrect","off");B.setAttribute("autocapitalize","off");B.setAttribute("spellcheck","false");B.style.fontFamily="monospace";B.style.wordBreak="break-all";B.style.marginTop="10px";B.style.resize="none";B.style.height="150px";B.style.width="440px";B.style.border=
"1px solid gray";B.value=mxResources.get("updatingDocument");c.appendChild(B);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>d.length?(B.value=d,B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)):(B.setAttribute("readonly","true"),B.value=mxResources.get("tooLargeUseDownload"))},0)};m=document.createElement("div");m.style.position="absolute";m.style.bottom="36px";m.style.right="32px";var J=null;!EmbedDialog.showPreviewOption||
-mxClient.IS_CHROMEAPP&&!A||navigator.standalone||!(A||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(J=mxUtils.button(null!=y?y:mxResources.get(5E5>d.length?"preview":"openInNewWindow"),function(){var g=5E5>d.length?B.value:d;if(null!=l)l(g);else if(A)try{var k=b.openLink(g);null!=k&&(null==e||0<e)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=k&&null!=k.location.href&&k.location.href.substring(0,8)!=g.substring(0,8)&&(k.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(v){}}),
-e||500)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var n=window.open();n=null!=n?n.document:null;null!=n?(n.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>"),n.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),J.className="geBtn",m.appendChild(J));if(!A||7500<d.length)y=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
-b.saveData(null!=C?C:"embed.txt","txt",d,"text/plain")}),y.className="geBtn",m.appendChild(y);if(A&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var f=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(B.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}});y=document.createElement("img");y.setAttribute("src",Editor.facebookImage);y.setAttribute("width","18");y.setAttribute("height",
-"18");y.setAttribute("border","0");f.appendChild(y);f.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";m.appendChild(f)}7168>d.length&&(f=mxUtils.button("",function(){try{var g="https://twitter.com/intent/tweet?text="+encodeURIComponent(t)+"&url="+encodeURIComponent(B.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),
-y=document.createElement("img"),y.setAttribute("src",Editor.tweetImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",f.appendChild(y),f.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",m.appendChild(f))}!b.isOffline()&&5E5>d.length&&(f=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(C||
-b.defaultFilename)+"&body="+encodeURIComponent(B.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),y=document.createElement("img"),y.className="geAdaptiveAsset",y.setAttribute("src",Editor.mailImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",f.appendChild(y),f.style.verticalAlign="bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",m.appendChild(f));
-y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(y);f=mxUtils.button(mxResources.get("copy"),function(){B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?y.className="geBtn gePrimaryBtn":(m.appendChild(f),f.className="geBtn gePrimaryBtn",y.className="geBtn"):(m.appendChild(J),
+mxClient.IS_CHROMEAPP&&!A||navigator.standalone||!(A||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(J=mxUtils.button(null!=y?y:mxResources.get(5E5>d.length?"preview":"openInNewWindow"),function(){var g=5E5>d.length?B.value:d;if(null!=l)l(g);else if(A)try{var k=b.openLink(g);null!=k&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=k&&null!=k.location.href&&k.location.href.substring(0,8)!=g.substring(0,8)&&(k.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(u){}}),
+f||500)}catch(u){b.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var q=window.open();q=null!=q?q.document:null;null!=q?(q.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>"),q.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),J.className="geBtn",m.appendChild(J));if(!A||7500<d.length)y=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
+b.saveData(null!=C?C:"embed.txt","txt",d,"text/plain")}),y.className="geBtn",m.appendChild(y);if(A&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var e=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(B.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}});y=document.createElement("img");y.setAttribute("src",Editor.facebookImage);y.setAttribute("width","18");y.setAttribute("height",
+"18");y.setAttribute("border","0");e.appendChild(y);e.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");e.style.verticalAlign="bottom";e.style.paddingTop="4px";e.style.minWidth="46px";e.className="geBtn";m.appendChild(e)}7168>d.length&&(e=mxUtils.button("",function(){try{var g="https://twitter.com/intent/tweet?text="+encodeURIComponent(t)+"&url="+encodeURIComponent(B.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),
+y=document.createElement("img"),y.setAttribute("src",Editor.tweetImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",e.appendChild(y),e.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),e.style.verticalAlign="bottom",e.style.paddingTop="4px",e.style.minWidth="46px",e.className="geBtn",m.appendChild(e))}!b.isOffline()&&5E5>d.length&&(e=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(C||
+b.defaultFilename)+"&body="+encodeURIComponent(B.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),y=document.createElement("img"),y.className="geAdaptiveAsset",y.setAttribute("src",Editor.mailImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",e.appendChild(y),e.style.verticalAlign="bottom",e.style.paddingTop="4px",e.style.minWidth="46px",e.className="geBtn",m.appendChild(e));
+y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.appendChild(y);e=mxUtils.button(mxResources.get("copy"),function(){B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?y.className="geBtn gePrimaryBtn":(m.appendChild(e),e.className="geBtn gePrimaryBtn",y.className="geBtn"):(m.appendChild(J),
y.className="geBtn",J.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,d){function e(){var p=null!=U&&null!=U.getTitle()?U.getTitle():this.defaultFilename;if(G.checked&&""!=f.value){var u="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(f.value));null!=p&&(u+="&title="+encodeURIComponent(p));0<F.length&&(u+="&s="+F);""!=g.value&&"0"!=g.value&&(u+="&border="+g.value);""!=J.value&&(u+="&height="+J.value);u+="&pan="+(k.checked?"1":"0");u+="&zoom="+(n.checked?"1":"0");u+="&fit="+(z.checked?"1":"0");
-u+="&resize="+(E.checked?"1":"0");u+="&x0="+Number(B.value);u+="&y0="+C;l.mathEnabled&&(u+="&math=1");x.checked?u+="&edit=_blank":v.checked&&(u+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));A.value=u}else U.constructor==DriveFile||U.constructor==DropboxFile?(u="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=f.value?u+=encodeURIComponent(mxUtils.htmlEntities(f.value))+"&type=3":(u+=U.getHash().substring(1),u=U.constructor==DropboxFile?u+"&type=2":u+"&type=1"),null!=
-p&&(u+="&title="+encodeURIComponent(p)),""!=J.value&&(p=parseInt(J.value)+parseInt(B.value),u+="&height="+p),A.value=u):A.value=""}var c=document.createElement("div"),l=b.editor.graph,m=l.getGraphBounds(),t=l.view.scale,y=Math.floor(m.x/t-l.view.translate.x),C=Math.floor(m.y/t-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var A=document.createElement("input");A.setAttribute("type","text");A.style.marginBottom="8px";A.style.marginTop="2px";A.style.width="410px";
+var GoogleSitesDialog=function(b,d){function f(){var p=null!=U&&null!=U.getTitle()?U.getTitle():this.defaultFilename;if(G.checked&&""!=e.value){var v="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(e.value));null!=p&&(v+="&title="+encodeURIComponent(p));0<F.length&&(v+="&s="+F);""!=g.value&&"0"!=g.value&&(v+="&border="+g.value);""!=J.value&&(v+="&height="+J.value);v+="&pan="+(k.checked?"1":"0");v+="&zoom="+(q.checked?"1":"0");v+="&fit="+(z.checked?"1":"0");
+v+="&resize="+(E.checked?"1":"0");v+="&x0="+Number(B.value);v+="&y0="+C;l.mathEnabled&&(v+="&math=1");x.checked?v+="&edit=_blank":u.checked&&(v+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));A.value=v}else U.constructor==DriveFile||U.constructor==DropboxFile?(v="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=e.value?v+=encodeURIComponent(mxUtils.htmlEntities(e.value))+"&type=3":(v+=U.getHash().substring(1),v=U.constructor==DropboxFile?v+"&type=2":v+"&type=1"),null!=
+p&&(v+="&title="+encodeURIComponent(p)),""!=J.value&&(p=parseInt(J.value)+parseInt(B.value),v+="&height="+p),A.value=v):A.value=""}var c=document.createElement("div"),l=b.editor.graph,m=l.getGraphBounds(),t=l.view.scale,y=Math.floor(m.x/t-l.view.translate.x),C=Math.floor(m.y/t-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var A=document.createElement("input");A.setAttribute("type","text");A.style.marginBottom="8px";A.style.marginTop="2px";A.style.width="410px";
c.appendChild(A);mxUtils.br(c);this.init=function(){A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","4");B.style.marginRight="16px";B.style.marginLeft="4px";B.value=y;c.appendChild(B);mxUtils.write(c,mxResources.get("height")+":");var J=document.createElement("input");J.setAttribute("type","text");
-J.setAttribute("size","4");J.style.marginLeft="4px";J.value=Math.ceil(m.height/t);c.appendChild(J);mxUtils.br(c);m=document.createElement("hr");m.setAttribute("size","1");m.style.marginBottom="16px";m.style.marginTop="16px";c.appendChild(m);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","28");f.style.marginBottom="8px";f.style.marginTop="2px";f.style.width="410px";f.value=d||"";c.appendChild(f);
-mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","3");g.style.marginBottom="8px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;k.style.marginLeft="16px";c.appendChild(k);mxUtils.write(c,mxResources.get("pan")+" ");var n=document.createElement("input");
-n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;n.style.marginLeft="8px";c.appendChild(n);mxUtils.write(c,mxResources.get("zoom")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";v.setAttribute("title",window.location.href);c.appendChild(v);mxUtils.write(c,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,
+J.setAttribute("size","4");J.style.marginLeft="4px";J.value=Math.ceil(m.height/t);c.appendChild(J);mxUtils.br(c);m=document.createElement("hr");m.setAttribute("size","1");m.style.marginBottom="16px";m.style.marginTop="16px";c.appendChild(m);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","28");e.style.marginBottom="8px";e.style.marginTop="2px";e.style.width="410px";e.value=d||"";c.appendChild(e);
+mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","3");g.style.marginBottom="8px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;k.style.marginLeft="16px";c.appendChild(k);mxUtils.write(c,mxResources.get("pan")+" ");var q=document.createElement("input");
+q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";c.appendChild(q);mxUtils.write(c,mxResources.get("zoom")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="8px";u.setAttribute("title",window.location.href);c.appendChild(u);mxUtils.write(c,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,
mxResources.get("asNew")+" ");mxUtils.br(c);var E=document.createElement("input");E.setAttribute("type","checkbox");E.setAttribute("checked","checked");E.defaultChecked=!0;E.style.marginLeft="16px";c.appendChild(E);mxUtils.write(c,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,mxResources.get("fit")+" ");var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginLeft=
-"8px";c.appendChild(G);mxUtils.write(c,mxResources.get("embed")+" ");var F=b.getBasenames().join(";"),U=b.getCurrentFile();mxEvent.addListener(k,"change",e);mxEvent.addListener(n,"change",e);mxEvent.addListener(E,"change",e);mxEvent.addListener(z,"change",e);mxEvent.addListener(v,"change",e);mxEvent.addListener(x,"change",e);mxEvent.addListener(G,"change",e);mxEvent.addListener(J,"change",e);mxEvent.addListener(B,"change",e);mxEvent.addListener(g,"change",e);mxEvent.addListener(f,"change",e);e();
-mxEvent.addListener(A,"click",function(){A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)});d=document.createElement("div");d.style.paddingTop="12px";d.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn gePrimaryBtn";d.appendChild(m);c.appendChild(d);this.container=c},CreateGraphDialog=function(b,d,e){var c=document.createElement("div");c.style.textAlign="right";this.init=
+"8px";c.appendChild(G);mxUtils.write(c,mxResources.get("embed")+" ");var F=b.getBasenames().join(";"),U=b.getCurrentFile();mxEvent.addListener(k,"change",f);mxEvent.addListener(q,"change",f);mxEvent.addListener(E,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(u,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(G,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(e,"change",f);f();
+mxEvent.addListener(A,"click",function(){A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)});d=document.createElement("div");d.style.paddingTop="12px";d.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn gePrimaryBtn";d.appendChild(m);c.appendChild(d);this.container=c},CreateGraphDialog=function(b,d,f){var c=document.createElement("div");c.style.textAlign="right";this.init=
function(){var l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.width="100%";l.style.height="360px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);c.appendChild(l);var m=new Graph(l);m.setCellsCloneable(!0);m.setPanning(!0);m.setAllowDanglingEdges(!1);m.connectionHandler.select=!1;m.view.setTranslate(20,20);m.border=20;m.panningHandler.useLeftButtonForPanning=!0;var t="curved=1;";m.cellRenderer.installCellOverlayListeners=
-function(n,v,x){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(x.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(E){v.fireEvent(new mxEventObject("pointerdown","event",E,"state",n))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(x.node,"touchstart",function(E){v.fireEvent(new mxEventObject("pointerdown","event",E,"state",n))})};m.getAllConnectionConstraints=function(){return null};m.connectionHandler.marker.highlight.keepOnTop=
-!1;m.connectionHandler.createEdgeState=function(n){n=m.createEdge(null,null,null,null,null,t);return new mxCellState(this.graph.view,n,this.graph.getCellStyle(n))};var y=m.getDefaultParent(),C=mxUtils.bind(this,function(n){var v=new mxCellOverlay(this.connectImage,"Add outgoing");v.cursor="hand";v.addListener(mxEvent.CLICK,function(x,E){m.connectionHandler.reset();m.clearSelection();var z=m.getCellGeometry(n),G;J(function(){G=m.insertVertex(y,null,"Entry",z.x,z.y,80,30,"rounded=1;");C(G);m.view.refresh(G);
-m.insertEdge(y,null,"",n,G,t)},function(){m.scrollCellToVisible(G)})});v.addListener("pointerdown",function(x,E){x=E.getProperty("event");E=E.getProperty("state");m.popupMenuHandler.hideMenu();m.stopEditing(!1);var z=mxUtils.convertPoint(m.container,mxEvent.getClientX(x),mxEvent.getClientY(x));m.connectionHandler.start(E,z.x,z.y);m.isMouseDown=!0;m.isMouseTrigger=mxEvent.isMouseEvent(x);mxEvent.consume(x)});m.addCellOverlay(n,v)});m.getModel().beginUpdate();try{var A=m.insertVertex(y,null,"Start",
-0,0,80,30,"ellipse");C(A)}finally{m.getModel().endUpdate()}if("horizontalTree"==e){var B=new mxCompactTreeLayout(m);B.edgeRouting=!1;B.levelDistance=30;t="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==e?(B=new mxCompactTreeLayout(m,!1),B.edgeRouting=!1,B.levelDistance=30,t="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==e?(B=new mxRadialTreeLayout(m,!1),B.edgeRouting=!1,B.levelDistance=80):"verticalFlow"==e?B=new mxHierarchicalLayout(m,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-e?B=new mxHierarchicalLayout(m,mxConstants.DIRECTION_WEST):"circle"==e?B=new mxCircleLayout(m):(B=new mxFastOrganicLayout(m,!1),B.forceConstant=80);if(null!=B){var J=function(n,v){m.getModel().beginUpdate();try{null!=n&&n(),B.execute(m.getDefaultParent(),A)}catch(x){throw x;}finally{n=new mxMorphing(m),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=v&&v()})),n.startAnimation()}},f=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,v,
-x,E,z){f.apply(this,arguments);J()};m.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);J()};m.connectionHandler.addListener(mxEvent.CONNECT,function(){J()})}var g=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()})});g.className="geBtn";b.editor.cancelFirst&&c.appendChild(g);var k=mxUtils.button(mxResources.get("insert"),function(n){m.clearCellOverlays();
-var v=m.getModel().getChildren(m.getDefaultParent());n=mxEvent.isAltDown(n)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(v,!0));v=b.editor.graph.importCells(v,n.x,n.y);n=b.editor.graph.view;var x=n.getBounds(v);x.x-=n.translate.x;x.y-=n.translate.y;b.editor.graph.scrollRectToVisible(x);b.editor.graph.setSelectionCells(v);null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()});c.appendChild(k);k.className="geBtn gePrimaryBtn";
+function(q,u,x){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(x.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(E){u.fireEvent(new mxEventObject("pointerdown","event",E,"state",q))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(x.node,"touchstart",function(E){u.fireEvent(new mxEventObject("pointerdown","event",E,"state",q))})};m.getAllConnectionConstraints=function(){return null};m.connectionHandler.marker.highlight.keepOnTop=
+!1;m.connectionHandler.createEdgeState=function(q){q=m.createEdge(null,null,null,null,null,t);return new mxCellState(this.graph.view,q,this.graph.getCellStyle(q))};var y=m.getDefaultParent(),C=mxUtils.bind(this,function(q){var u=new mxCellOverlay(this.connectImage,"Add outgoing");u.cursor="hand";u.addListener(mxEvent.CLICK,function(x,E){m.connectionHandler.reset();m.clearSelection();var z=m.getCellGeometry(q),G;J(function(){G=m.insertVertex(y,null,"Entry",z.x,z.y,80,30,"rounded=1;");C(G);m.view.refresh(G);
+m.insertEdge(y,null,"",q,G,t)},function(){m.scrollCellToVisible(G)})});u.addListener("pointerdown",function(x,E){x=E.getProperty("event");E=E.getProperty("state");m.popupMenuHandler.hideMenu();m.stopEditing(!1);var z=mxUtils.convertPoint(m.container,mxEvent.getClientX(x),mxEvent.getClientY(x));m.connectionHandler.start(E,z.x,z.y);m.isMouseDown=!0;m.isMouseTrigger=mxEvent.isMouseEvent(x);mxEvent.consume(x)});m.addCellOverlay(q,u)});m.getModel().beginUpdate();try{var A=m.insertVertex(y,null,"Start",
+0,0,80,30,"ellipse");C(A)}finally{m.getModel().endUpdate()}if("horizontalTree"==f){var B=new mxCompactTreeLayout(m);B.edgeRouting=!1;B.levelDistance=30;t="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(B=new mxCompactTreeLayout(m,!1),B.edgeRouting=!1,B.levelDistance=30,t="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(B=new mxRadialTreeLayout(m,!1),B.edgeRouting=!1,B.levelDistance=80):"verticalFlow"==f?B=new mxHierarchicalLayout(m,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+f?B=new mxHierarchicalLayout(m,mxConstants.DIRECTION_WEST):"circle"==f?B=new mxCircleLayout(m):(B=new mxFastOrganicLayout(m,!1),B.forceConstant=80);if(null!=B){var J=function(q,u){m.getModel().beginUpdate();try{null!=q&&q(),B.execute(m.getDefaultParent(),A)}catch(x){throw x;}finally{q=new mxMorphing(m),q.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=u&&u()})),q.startAnimation()}},e=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(q,u,
+x,E,z){e.apply(this,arguments);J()};m.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);J()};m.connectionHandler.addListener(mxEvent.CONNECT,function(){J()})}var g=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()})});g.className="geBtn";b.editor.cancelFirst&&c.appendChild(g);var k=mxUtils.button(mxResources.get("insert"),function(q){m.clearCellOverlays();
+var u=m.getModel().getChildren(m.getDefaultParent());q=mxEvent.isAltDown(q)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(u,!0));u=b.editor.graph.importCells(u,q.x,q.y);q=b.editor.graph.view;var x=q.getBounds(u);x.x-=q.translate.x;x.y-=q.translate.y;b.editor.graph.scrollRectToVisible(x);b.editor.graph.setSelectionCells(u);null!=l.parentNode&&(m.destroy(),l.parentNode.removeChild(l));b.hideDialog()});c.appendChild(k);k.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||c.appendChild(g)};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,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var l=document.createElement("h2");mxUtils.write(l,mxResources.get("backgroundImage"));l.style.marginTop="0px";c.appendChild(l);var m=null!=e&&null!=e.originalSrc;l=!1;var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","url");t.setAttribute("type","radio");t.setAttribute("name","geBackgroundImageDialogOption");var y=document.createElement("input");
-y.style.cssText="margin-right:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","geBackgroundImageDialogOption");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginBottom="8px";C.style.width="360px";C.value=m||null==e?"":e.src;var A=document.createElement("select");A.style.width="360px";if(null!=b.pages)for(var B=0;B<b.pages.length;B++){var J=document.createElement("option");mxUtils.write(J,b.pages[B].getName()||
-mxResources.get("pageWithNumber",[B+1]));J.setAttribute("value","data:page/id,"+b.pages[B].getId());b.pages[B]==b.currentPage&&J.setAttribute("disabled","disabled");null!=e&&e.originalSrc==J.getAttribute("value")&&(J.setAttribute("selected","selected"),l=!0);A.appendChild(J)}m||null!=b.pages&&1!=b.pages.length||(t.style.display="none",y.style.display="none",A.style.display="none");var f=document.createElement("option"),g=!1,k=!1,n=function(G,F){g||null!=G&&k||(y.checked?null!=F&&F(f.selected?null:
-A.value):""==C.value||b.isOffline()?(x.value="",E.value="",null!=F&&F("")):(C.value=mxUtils.trim(C.value),b.loadImage(C.value,function(U){x.value=U.width;E.value=U.height;null!=F&&F(C.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));x.value="";E.value="";null!=F&&F(null)})))},v=mxUtils.bind(this,function(G){b.importFiles(G,0,0,b.maxBackgroundSize,function(F,U,p,u,H,K){C.value=F;n();C.focus()},function(){},function(F){return"image/"==F.type.substring(0,
+var BackgroundImageDialog=function(b,d,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var l=document.createElement("h2");mxUtils.write(l,mxResources.get("backgroundImage"));l.style.marginTop="0px";c.appendChild(l);var m=null!=f&&null!=f.originalSrc;l=!1;var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","url");t.setAttribute("type","radio");t.setAttribute("name","geBackgroundImageDialogOption");var y=document.createElement("input");
+y.style.cssText="margin-right:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","geBackgroundImageDialogOption");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginBottom="8px";C.style.width="360px";C.value=m||null==f?"":f.src;var A=document.createElement("select");A.style.width="360px";if(null!=b.pages)for(var B=0;B<b.pages.length;B++){var J=document.createElement("option");mxUtils.write(J,b.pages[B].getName()||
+mxResources.get("pageWithNumber",[B+1]));J.setAttribute("value","data:page/id,"+b.pages[B].getId());b.pages[B]==b.currentPage&&J.setAttribute("disabled","disabled");null!=f&&f.originalSrc==J.getAttribute("value")&&(J.setAttribute("selected","selected"),l=!0);A.appendChild(J)}m||null!=b.pages&&1!=b.pages.length||(t.style.display="none",y.style.display="none",A.style.display="none");var e=document.createElement("option"),g=!1,k=!1,q=function(G,F){g||null!=G&&k||(y.checked?null!=F&&F(e.selected?null:
+A.value):""==C.value||b.isOffline()?(x.value="",E.value="",null!=F&&F("")):(C.value=mxUtils.trim(C.value),b.loadImage(C.value,function(U){x.value=U.width;E.value=U.height;null!=F&&F(C.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));x.value="";E.value="";null!=F&&F(null)})))},u=mxUtils.bind(this,function(G){b.importFiles(G,0,0,b.maxBackgroundSize,function(F,U,p,v,H,K){C.value=F;q();C.focus()},function(){},function(F){return"image/"==F.type.substring(0,
6)},function(F){for(var U=0;U<F.length;U++)F[U]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){m?A.focus():C.focus();mxEvent.addListener(A,"focus",function(){t.removeAttribute("checked");y.setAttribute("checked","checked");y.checked=!0});mxEvent.addListener(C,"focus",function(){y.removeAttribute("checked");t.setAttribute("checked","checked");t.checked=!0});if(Graph.fileSupport){C.setAttribute("placeholder",mxResources.get("dragImagesHere"));var G=c.parentNode,F=null;mxEvent.addListener(G,
-"dragleave",function(U){null!=F&&(F.parentNode.removeChild(F),F=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(U){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=b.highlightElement(G));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(G,"drop",mxUtils.bind(this,function(U){null!=F&&(F.parentNode.removeChild(F),F=null);if(0<U.dataTransfer.files.length)v(U.dataTransfer.files);else if(0<=mxUtils.indexOf(U.dataTransfer.types,
-"text/uri-list")){var p=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(p)&&(C.value=decodeURIComponent(p),n())}U.stopPropagation();U.preventDefault()}),!1)}};c.appendChild(t);c.appendChild(C);mxUtils.br(c);B=document.createElement("span");B.style.marginLeft="30px";mxUtils.write(B,mxResources.get("width")+":");c.appendChild(B);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";
-x.value=null==e||m?"":e.width;c.appendChild(x);mxUtils.write(c,mxResources.get("height")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.width="60px";E.style.marginLeft="8px";E.style.marginRight="16px";E.value=null==e||m?"":e.height;c.appendChild(E);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(C,"change",n);ImageDialog.filePicked=function(G){G.action==google.picker.Action.PICKED&&null!=G.docs[0].thumbnails&&(G=G.docs[0].thumbnails[G.docs[0].thumbnails.length-1],
-null!=G&&(C.value=G.url,n()));C.focus()};c.appendChild(y);c.appendChild(A);mxUtils.br(c);m?(y.setAttribute("checked","checked"),y.checked=!0):(t.setAttribute("checked","checked"),t.checked=!0);!l&&y.checked&&(mxUtils.write(f,mxResources.get("pageNotFound")),f.setAttribute("disabled","disabled"),f.setAttribute("selected","selected"),f.setAttribute("value","pageNotFound"),A.appendChild(f),mxEvent.addListener(A,"change",function(){null==f.parentNode||f.selected||f.parentNode.removeChild(f)}));e=document.createElement("div");
-e.style.marginTop="30px";e.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){g=!0;b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&e.appendChild(l);B=mxUtils.button(mxResources.get("reset"),function(){C.value="";x.value="";E.value="";t.checked=!0;g=!1});mxEvent.addGestureListeners(B,function(){g=!0});B.className="geBtn";B.width="100";e.appendChild(B);if(Graph.fileSupport){var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type",
-"file");mxEvent.addListener(z,"change",function(G){null!=z.files&&(v(z.files),z.type="",z.type="file",z.value="")});z.style.display="none";c.appendChild(z);B=mxUtils.button(mxResources.get("open"),function(){z.click()});B.className="geBtn";e.appendChild(B)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();n(null,function(G){d(""!=G&&null!=G?new mxImage(G,x.value,E.value):null,null==G)})});mxEvent.addGestureListeners(applyBtn,function(){k=!0});applyBtn.className="geBtn gePrimaryBtn";
-e.appendChild(applyBtn);b.editor.cancelFirst||e.appendChild(l);c.appendChild(e);this.container=c},ParseDialog=function(b,d,e){function c(g,k,n){var v=g.split("\n");if("plantUmlPng"==k||"plantUmlSvg"==k||"plantUmlTxt"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(Q,P,V,W,q){m=mxEvent.isAltDown(n)?m:E.getCenterInsertPoint(new mxRectangle(0,0,W,q));var D=null;E.getModel().beginUpdate();try{D="txt"==P?b.insertAsPreText(V,m.x,m.y):E.insertVertex(null,null,null,m.x,m.y,
-W,q,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),E.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:Q,format:P},null,2))}finally{E.getModel().endUpdate()}null!=D&&(E.setSelectionCell(D),E.scrollCellToVisible(D))},E=b.editor.graph,z="plantUmlTxt"==k?"txt":"plantUmlPng"==k?"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"==
+"dragleave",function(U){null!=F&&(F.parentNode.removeChild(F),F=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(U){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=b.highlightElement(G));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(G,"drop",mxUtils.bind(this,function(U){null!=F&&(F.parentNode.removeChild(F),F=null);if(0<U.dataTransfer.files.length)u(U.dataTransfer.files);else if(0<=mxUtils.indexOf(U.dataTransfer.types,
+"text/uri-list")){var p=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(p)&&(C.value=decodeURIComponent(p),q())}U.stopPropagation();U.preventDefault()}),!1)}};c.appendChild(t);c.appendChild(C);mxUtils.br(c);B=document.createElement("span");B.style.marginLeft="30px";mxUtils.write(B,mxResources.get("width")+":");c.appendChild(B);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";
+x.value=null==f||m?"":f.width;c.appendChild(x);mxUtils.write(c,mxResources.get("height")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.width="60px";E.style.marginLeft="8px";E.style.marginRight="16px";E.value=null==f||m?"":f.height;c.appendChild(E);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(C,"change",q);ImageDialog.filePicked=function(G){G.action==google.picker.Action.PICKED&&null!=G.docs[0].thumbnails&&(G=G.docs[0].thumbnails[G.docs[0].thumbnails.length-1],
+null!=G&&(C.value=G.url,q()));C.focus()};c.appendChild(y);c.appendChild(A);mxUtils.br(c);m?(y.setAttribute("checked","checked"),y.checked=!0):(t.setAttribute("checked","checked"),t.checked=!0);!l&&y.checked&&(mxUtils.write(e,mxResources.get("pageNotFound")),e.setAttribute("disabled","disabled"),e.setAttribute("selected","selected"),e.setAttribute("value","pageNotFound"),A.appendChild(e),mxEvent.addListener(A,"change",function(){null==e.parentNode||e.selected||e.parentNode.removeChild(e)}));f=document.createElement("div");
+f.style.marginTop="30px";f.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){g=!0;b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&f.appendChild(l);B=mxUtils.button(mxResources.get("reset"),function(){C.value="";x.value="";E.value="";t.checked=!0;g=!1});mxEvent.addGestureListeners(B,function(){g=!0});B.className="geBtn";B.width="100";f.appendChild(B);if(Graph.fileSupport){var z=document.createElement("input");z.setAttribute("multiple","multiple");z.setAttribute("type",
+"file");mxEvent.addListener(z,"change",function(G){null!=z.files&&(u(z.files),z.type="",z.type="file",z.value="")});z.style.display="none";c.appendChild(z);B=mxUtils.button(mxResources.get("open"),function(){z.click()});B.className="geBtn";f.appendChild(B)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();q(null,function(G){d(""!=G&&null!=G?new mxImage(G,x.value,E.value):null,null==G)})});mxEvent.addGestureListeners(applyBtn,function(){k=!0});applyBtn.className="geBtn gePrimaryBtn";
+f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(l);c.appendChild(f);this.container=c},ParseDialog=function(b,d,f){function c(g,k,q){var u=g.split("\n");if("plantUmlPng"==k||"plantUmlSvg"==k||"plantUmlTxt"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(Q,P,V,W,n){m=mxEvent.isAltDown(q)?m:E.getCenterInsertPoint(new mxRectangle(0,0,W,n));var D=null;E.getModel().beginUpdate();try{D="txt"==P?b.insertAsPreText(V,m.x,m.y):E.insertVertex(null,null,null,m.x,m.y,
+W,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),E.setAttributeForCell(D,"plantUmlData",JSON.stringify({data:Q,format:P},null,2))}finally{E.getModel().endUpdate()}null!=D&&(E.setSelectionCell(D),E.scrollCellToVisible(D))},E=b.editor.graph,z="plantUmlTxt"==k?"txt":"plantUmlPng"==k?"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"==
g&&"svg"==z?window.setTimeout(function(){b.spinner.stop();x(g,z,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(g,z,function(Q,P,V){b.spinner.stop();x(g,z,Q,P,V)},function(Q){b.handleError(Q)})}}else if("mermaid"==k)b.spinner.spin(document.body,mxResources.get("inserting"))&&(E=b.editor.graph,b.generateMermaidImage(g,z,function(Q,P,V){m=mxEvent.isAltDown(n)?m:E.getCenterInsertPoint(new mxRectangle(0,0,P,V));b.spinner.stop();var W=null;E.getModel().beginUpdate();try{W=E.insertVertex(null,null,null,m.x,m.y,P,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-Q+";"),E.setAttributeForCell(W,"mermaidData",JSON.stringify({data:g,config:EditorUi.defaultMermaidConfig},null,2))}finally{E.getModel().endUpdate()}null!=W&&(E.setSelectionCell(W),E.scrollCellToVisible(W))},function(Q){b.handleError(Q)}));else if("table"==k){k=null;for(var G=[],F=0,U={},p=0;p<v.length;p++){var u=mxUtils.trim(v[p]);if("primary key"==u.substring(0,11).toLowerCase()){var H=u.match(/\((.+)\)/);H&&H[1]&&(U[H[1]]=!0);v.splice(p,1)}else 0<u.toLowerCase().indexOf("primary key")&&(U[u.split(" ")[0]]=
-!0,v[p]=mxUtils.trim(u.replace(/primary key/i,"")))}for(p=0;p<v.length;p++)if(u=mxUtils.trim(v[p]),"create table"==u.substring(0,12).toLowerCase())u=mxUtils.trim(u.substring(12)),"("==u.charAt(u.length-1)&&(u=mxUtils.trim(u.substring(0,u.length-1))),k=new mxCell(u,new mxGeometry(F,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),k.vertex=!0,G.push(k),u=b.editor.graph.getPreferredSizeForCell(K),null!=
-u&&(k.geometry.width=u.width+10);else if(null!=k&&")"==u.charAt(0))F+=k.geometry.width+40,k=null;else if("("!=u&&null!=k){u=u.substring(0,","==u.charAt(u.length-1)?u.length-1:u.length);H=U[u.split(" ")[0]];var K=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")+";");K.vertex=!0;var N=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;":""));N.vertex=!0;K.insert(N);u=new mxCell(u,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;":""));u.vertex=!0;K.insert(u);u=b.editor.graph.getPreferredSizeForCell(u);null!=u&&k.geometry.width<u.width+30&&(k.geometry.width=Math.min(320,
-Math.max(k.geometry.width,u.width+30)));k.insert(K,H?0:null);k.geometry.height+=30}0<G.length&&(E=b.editor.graph,m=mxEvent.isAltDown(n)?m:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(G,!0)),E.setSelectionCells(E.importCells(G,m.x,m.y)),E.scrollCellToVisible(E.getSelectionCell()))}else if("list"==k){if(0<v.length){E=b.editor.graph;K=null;G=[];for(p=k=0;p<v.length;p++)";"!=v[p].charAt(0)&&(0==v[p].length?K=null:null==K?(K=new mxCell(v[p],new mxGeometry(k,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
-K.vertex=!0,G.push(K),u=E.getPreferredSizeForCell(K),null!=u&&K.geometry.width<u.width+10&&(K.geometry.width=u.width+10),k+=K.geometry.width+40):"--"==v[p]?(u=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),u.vertex=!0,K.geometry.height+=u.geometry.height,K.insert(u)):0<v[p].length&&(F=new mxCell(v[p],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;"),
-F.vertex=!0,u=E.getPreferredSizeForCell(F),null!=u&&F.geometry.width<u.width&&(F.geometry.width=u.width),K.geometry.width=Math.max(K.geometry.width,F.geometry.width),K.geometry.height+=F.geometry.height,K.insert(F)));if(0<G.length){m=mxEvent.isAltDown(n)?m:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(G,!0));E.getModel().beginUpdate();try{G=E.importCells(G,m.x,m.y);u=[];for(p=0;p<G.length;p++)u.push(G[p]),u=u.concat(G[p].children);E.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{E.getModel().endUpdate()}E.setSelectionCells(G);
-E.scrollCellToVisible(E.getSelectionCell())}}}else{K=function(Q){var P=I[Q];null==P&&(P=new mxCell(Q,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),P.vertex=!0,I[Q]=P,G.push(P));return P};var I={};G=[];for(p=0;p<v.length;p++)if(";"!=v[p].charAt(0)){var L=v[p].split("->");2<=L.length&&(H=K(L[0]),N=K(L[L.length-1]),L=new mxCell(2<L.length?L[1]:"",new mxGeometry),L.edge=!0,H.insertEdge(L,!0),N.insertEdge(L,!1),G.push(L))}if(0<G.length){v=document.createElement("div");v.style.visibility="hidden";
-document.body.appendChild(v);E=new Graph(v);E.getModel().beginUpdate();try{G=E.importCells(G);for(p=0;p<G.length;p++)E.getModel().isVertex(G[p])&&(u=E.getPreferredSizeForCell(G[p]),G[p].geometry.width=Math.max(G[p].geometry.width,u.width),G[p].geometry.height=Math.max(G[p].geometry.height,u.height));p=!0;"horizontalFlow"==k||"verticalFlow"==k?((new mxHierarchicalLayout(E,"horizontalFlow"==k?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(E.getDefaultParent(),G),p=!1):"circle"==k?
-(new mxCircleLayout(E)).execute(E.getDefaultParent()):(F=new mxFastOrganicLayout(E),F.disableEdgeStyle=!1,F.forceConstant=180,F.execute(E.getDefaultParent()));p&&(U=new mxParallelEdgeLayout(E),U.spacing=30,U.execute(E.getDefaultParent()))}finally{E.getModel().endUpdate()}E.clearCellOverlays();u=[];b.editor.graph.getModel().beginUpdate();try{G=E.getModel().getChildren(E.getDefaultParent()),m=mxEvent.isAltDown(n)?m:b.editor.graph.getCenterInsertPoint(E.getBoundingBoxFromGeometry(G,!0)),u=b.editor.graph.importCells(G,
-m.x,m.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(u);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());E.destroy();v.parentNode.removeChild(v)}}}function l(){return"list"==y.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"==y.value?
+295,212)},200):b.generatePlantUmlImage(g,z,function(Q,P,V){b.spinner.stop();x(g,z,Q,P,V)},function(Q){b.handleError(Q)})}}else if("mermaid"==k)b.spinner.spin(document.body,mxResources.get("inserting"))&&(E=b.editor.graph,b.generateMermaidImage(g,z,function(Q,P,V){m=mxEvent.isAltDown(q)?m:E.getCenterInsertPoint(new mxRectangle(0,0,P,V));b.spinner.stop();var W=null;E.getModel().beginUpdate();try{W=E.insertVertex(null,null,null,m.x,m.y,P,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+Q+";"),E.setAttributeForCell(W,"mermaidData",JSON.stringify({data:g,config:EditorUi.defaultMermaidConfig},null,2))}finally{E.getModel().endUpdate()}null!=W&&(E.setSelectionCell(W),E.scrollCellToVisible(W))},function(Q){b.handleError(Q)}));else if("table"==k){k=null;for(var G=[],F=0,U={},p=0;p<u.length;p++){var v=mxUtils.trim(u[p]);if("primary key"==v.substring(0,11).toLowerCase()){var H=v.match(/\((.+)\)/);H&&H[1]&&(U[H[1]]=!0);u.splice(p,1)}else 0<v.toLowerCase().indexOf("primary key")&&(U[v.split(" ")[0]]=
+!0,u[p]=mxUtils.trim(v.replace(/primary key/i,"")))}for(p=0;p<u.length;p++)if(v=mxUtils.trim(u[p]),"create table"==v.substring(0,12).toLowerCase())v=mxUtils.trim(v.substring(12)),"("==v.charAt(v.length-1)&&(v=mxUtils.trim(v.substring(0,v.length-1))),k=new mxCell(v,new mxGeometry(F,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),k.vertex=!0,G.push(k),v=b.editor.graph.getPreferredSizeForCell(K),null!=
+v&&(k.geometry.width=v.width+10);else if(null!=k&&")"==v.charAt(0))F+=k.geometry.width+40,k=null;else if("("!=v&&null!=k){v=v.substring(0,","==v.charAt(v.length-1)?v.length-1:v.length);H=U[v.split(" ")[0]];var K=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")+";");K.vertex=!0;var N=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;":""));N.vertex=!0;K.insert(N);v=new mxCell(v,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;":""));v.vertex=!0;K.insert(v);v=b.editor.graph.getPreferredSizeForCell(v);null!=v&&k.geometry.width<v.width+30&&(k.geometry.width=Math.min(320,
+Math.max(k.geometry.width,v.width+30)));k.insert(K,H?0:null);k.geometry.height+=30}0<G.length&&(E=b.editor.graph,m=mxEvent.isAltDown(q)?m:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(G,!0)),E.setSelectionCells(E.importCells(G,m.x,m.y)),E.scrollCellToVisible(E.getSelectionCell()))}else if("list"==k){if(0<u.length){E=b.editor.graph;K=null;G=[];for(p=k=0;p<u.length;p++)";"!=u[p].charAt(0)&&(0==u[p].length?K=null:null==K?(K=new mxCell(u[p],new mxGeometry(k,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+K.vertex=!0,G.push(K),v=E.getPreferredSizeForCell(K),null!=v&&K.geometry.width<v.width+10&&(K.geometry.width=v.width+10),k+=K.geometry.width+40):"--"==u[p]?(v=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;"),v.vertex=!0,K.geometry.height+=v.geometry.height,K.insert(v)):0<u[p].length&&(F=new mxCell(u[p],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;"),
+F.vertex=!0,v=E.getPreferredSizeForCell(F),null!=v&&F.geometry.width<v.width&&(F.geometry.width=v.width),K.geometry.width=Math.max(K.geometry.width,F.geometry.width),K.geometry.height+=F.geometry.height,K.insert(F)));if(0<G.length){m=mxEvent.isAltDown(q)?m:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(G,!0));E.getModel().beginUpdate();try{G=E.importCells(G,m.x,m.y);v=[];for(p=0;p<G.length;p++)v.push(G[p]),v=v.concat(G[p].children);E.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{E.getModel().endUpdate()}E.setSelectionCells(G);
+E.scrollCellToVisible(E.getSelectionCell())}}}else{K=function(Q){var P=I[Q];null==P&&(P=new mxCell(Q,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),P.vertex=!0,I[Q]=P,G.push(P));return P};var I={};G=[];for(p=0;p<u.length;p++)if(";"!=u[p].charAt(0)){var L=u[p].split("->");2<=L.length&&(H=K(L[0]),N=K(L[L.length-1]),L=new mxCell(2<L.length?L[1]:"",new mxGeometry),L.edge=!0,H.insertEdge(L,!0),N.insertEdge(L,!1),G.push(L))}if(0<G.length){u=document.createElement("div");u.style.visibility="hidden";
+document.body.appendChild(u);E=new Graph(u);E.getModel().beginUpdate();try{G=E.importCells(G);for(p=0;p<G.length;p++)E.getModel().isVertex(G[p])&&(v=E.getPreferredSizeForCell(G[p]),G[p].geometry.width=Math.max(G[p].geometry.width,v.width),G[p].geometry.height=Math.max(G[p].geometry.height,v.height));p=!0;"horizontalFlow"==k||"verticalFlow"==k?((new mxHierarchicalLayout(E,"horizontalFlow"==k?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(E.getDefaultParent(),G),p=!1):"circle"==k?
+(new mxCircleLayout(E)).execute(E.getDefaultParent()):(F=new mxFastOrganicLayout(E),F.disableEdgeStyle=!1,F.forceConstant=180,F.execute(E.getDefaultParent()));p&&(U=new mxParallelEdgeLayout(E),U.spacing=30,U.execute(E.getDefaultParent()))}finally{E.getModel().endUpdate()}E.clearCellOverlays();v=[];b.editor.graph.getModel().beginUpdate();try{G=E.getModel().getChildren(E.getDefaultParent()),m=mxEvent.isAltDown(q)?m:b.editor.graph.getCenterInsertPoint(E.getBoundingBoxFromGeometry(G,!0)),v=b.editor.graph.importCells(G,
+m.x,m.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(v);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());E.destroy();u.parentNode.removeChild(u)}}}function l(){return"list"==y.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"==y.value?
"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==y.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==y.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
"plantUmlSvg"==y.value||"plantUmlTxt"==y.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var m=b.editor.graph.getFreeInsertPoint();d=document.createElement("div");d.style.textAlign="right";var t=document.createElement("textarea");t.style.boxSizing="border-box";t.style.resize=
-"none";t.style.width="100%";t.style.height="354px";t.style.marginBottom="16px";var y=document.createElement("select");if("formatSql"==e||"mermaid"==e)y.style.display="none";var C=document.createElement("option");C.setAttribute("value","list");mxUtils.write(C,mxResources.get("list"));"plantUml"!=e&&y.appendChild(C);null!=e&&"fromText"!=e||C.setAttribute("selected","selected");C=document.createElement("option");C.setAttribute("value","table");mxUtils.write(C,mxResources.get("formatSql"));"formatSql"==
-e&&(y.appendChild(C),C.setAttribute("selected","selected"));C=document.createElement("option");C.setAttribute("value","mermaid");mxUtils.write(C,mxResources.get("formatSql"));"mermaid"==e&&(y.appendChild(C),C.setAttribute("selected","selected"));C=document.createElement("option");C.setAttribute("value","diagram");mxUtils.write(C,mxResources.get("diagram"));var A=document.createElement("option");A.setAttribute("value","circle");mxUtils.write(A,mxResources.get("circle"));var B=document.createElement("option");
-B.setAttribute("value","horizontalFlow");mxUtils.write(B,mxResources.get("horizontalFlow"));var J=document.createElement("option");J.setAttribute("value","verticalFlow");mxUtils.write(J,mxResources.get("verticalFlow"));"plantUml"!=e&&(y.appendChild(C),y.appendChild(A),y.appendChild(B),y.appendChild(J));C=document.createElement("option");C.setAttribute("value","plantUmlSvg");mxUtils.write(C,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==e&&C.setAttribute("selected",
-"selected");A=document.createElement("option");A.setAttribute("value","plantUmlPng");mxUtils.write(A,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");B=document.createElement("option");B.setAttribute("value","plantUmlTxt");mxUtils.write(B,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==e&&(y.appendChild(C),y.appendChild(A),y.appendChild(B));var f=l();t.value=f;d.appendChild(t);this.init=function(){t.focus()};
-Graph.fileSupport&&(t.addEventListener("dragover",function(g){g.stopPropagation();g.preventDefault()},!1),t.addEventListener("drop",function(g){g.stopPropagation();g.preventDefault();if(0<g.dataTransfer.files.length){g=g.dataTransfer.files[0];var k=new FileReader;k.onload=function(n){t.value=n.target.result};k.readAsText(g)}},!1));d.appendChild(y);mxEvent.addListener(y,"change",function(){var g=l();if(0==t.value.length||t.value==f)f=g,t.value=f});b.isOffline()||"mermaid"!=e&&"plantUml"!=e||(C=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("mermaid"==e?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),C.className="geBtn",d.appendChild(C));C=mxUtils.button(mxResources.get("close"),function(){t.value==f?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});C.className="geBtn";b.editor.cancelFirst&&d.appendChild(C);A=mxUtils.button(mxResources.get("insert"),function(g){b.hideDialog();c(t.value,y.value,g)});d.appendChild(A);A.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-d.appendChild(C);this.container=d},NewDialog=function(b,d,e,c,l,m,t,y,C,A,B,J,f,g,k,n,v,x){function E(ja){null!=ja&&(ya=ua=ja?135:140);ja=!0;if(null!=ra)for(;I<ra.length&&(ja||0!=mxUtils.mod(I,30));){var ma=ra[I++];ma=F(ma.url,ma.libs,ma.title,ma.tooltip?ma.tooltip:ma.title,ma.select,ma.imgUrl,ma.info,ma.onClick,ma.preview,ma.noImg,ma.clibs);ja&&ma.click();ja=!1}}function z(){if(Y&&null!=g)e||b.hideDialog(),g(Y,ba,N.value);else if(c)e||b.hideDialog(),c(S,N.value,aa,O);else{var ja=N.value;null!=ja&&
+"none";t.style.width="100%";t.style.height="354px";t.style.marginBottom="16px";var y=document.createElement("select");if("formatSql"==f||"mermaid"==f)y.style.display="none";var C=document.createElement("option");C.setAttribute("value","list");mxUtils.write(C,mxResources.get("list"));"plantUml"!=f&&y.appendChild(C);null!=f&&"fromText"!=f||C.setAttribute("selected","selected");C=document.createElement("option");C.setAttribute("value","table");mxUtils.write(C,mxResources.get("formatSql"));"formatSql"==
+f&&(y.appendChild(C),C.setAttribute("selected","selected"));C=document.createElement("option");C.setAttribute("value","mermaid");mxUtils.write(C,mxResources.get("formatSql"));"mermaid"==f&&(y.appendChild(C),C.setAttribute("selected","selected"));C=document.createElement("option");C.setAttribute("value","diagram");mxUtils.write(C,mxResources.get("diagram"));var A=document.createElement("option");A.setAttribute("value","circle");mxUtils.write(A,mxResources.get("circle"));var B=document.createElement("option");
+B.setAttribute("value","horizontalFlow");mxUtils.write(B,mxResources.get("horizontalFlow"));var J=document.createElement("option");J.setAttribute("value","verticalFlow");mxUtils.write(J,mxResources.get("verticalFlow"));"plantUml"!=f&&(y.appendChild(C),y.appendChild(A),y.appendChild(B),y.appendChild(J));C=document.createElement("option");C.setAttribute("value","plantUmlSvg");mxUtils.write(C,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&C.setAttribute("selected",
+"selected");A=document.createElement("option");A.setAttribute("value","plantUmlPng");mxUtils.write(A,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");B=document.createElement("option");B.setAttribute("value","plantUmlTxt");mxUtils.write(B,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(y.appendChild(C),y.appendChild(A),y.appendChild(B));var e=l();t.value=e;d.appendChild(t);this.init=function(){t.focus()};
+Graph.fileSupport&&(t.addEventListener("dragover",function(g){g.stopPropagation();g.preventDefault()},!1),t.addEventListener("drop",function(g){g.stopPropagation();g.preventDefault();if(0<g.dataTransfer.files.length){g=g.dataTransfer.files[0];var k=new FileReader;k.onload=function(q){t.value=q.target.result};k.readAsText(g)}},!1));d.appendChild(y);mxEvent.addListener(y,"change",function(){var g=l();if(0==t.value.length||t.value==e)e=g,t.value=e});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(C=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),C.className="geBtn",d.appendChild(C));C=mxUtils.button(mxResources.get("close"),function(){t.value==e?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});C.className="geBtn";b.editor.cancelFirst&&d.appendChild(C);A=mxUtils.button(mxResources.get("insert"),function(g){b.hideDialog();c(t.value,y.value,g)});d.appendChild(A);A.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+d.appendChild(C);this.container=d},NewDialog=function(b,d,f,c,l,m,t,y,C,A,B,J,e,g,k,q,u,x){function E(ja){null!=ja&&(ya=ua=ja?135:140);ja=!0;if(null!=ra)for(;I<ra.length&&(ja||0!=mxUtils.mod(I,30));){var ma=ra[I++];ma=F(ma.url,ma.libs,ma.title,ma.tooltip?ma.tooltip:ma.title,ma.select,ma.imgUrl,ma.info,ma.onClick,ma.preview,ma.noImg,ma.clibs);ja&&ma.click();ja=!1}}function z(){if(Y&&null!=g)f||b.hideDialog(),g(Y,ba,N.value);else if(c)f||b.hideDialog(),c(S,N.value,aa,O);else{var ja=N.value;null!=ja&&
0<ja.length&&b.pickFolder(b.mode,function(ma){b.createFile(ja,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,ma,null,null!=R&&0<R.length?R:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function G(ja,ma,sa,oa,pa,Ea,ka){null!=X&&(X.style.backgroundColor="transparent",X.style.border="1px solid transparent");Q.removeAttribute("disabled");S=ma;O=sa;R=Ea;X=ja;Y=oa;aa=ka;ba=pa;X.style.backgroundColor=y;X.style.border=C}function F(ja,ma,sa,oa,pa,Ea,ka,la,
qa,Aa,Ca){function Ga(Ia,Ta){null==Oa?(Qa=Ia,Qa=/^https?:\/\//.test(Qa)&&!b.editor.isCorsEnabledForUrl(Qa)?PROXY_URL+"?url="+encodeURIComponent(Qa):TEMPLATE_PATH+"/"+Qa,mxUtils.get(Qa,mxUtils.bind(this,function(Sa){200<=Sa.getStatus()&&299>=Sa.getStatus()&&(Oa=Sa.getText());Ta(Oa,Qa)}))):Ta(Oa,Qa)}function Da(Ia,Ta,Sa){if(null!=Ia&&mxUtils.isAncestorNode(document.body,ta)){Ia=mxUtils.parseXml(Ia);Ia=Editor.parseDiagramNode(Ia.documentElement);var Wa=new mxCodec(Ia.ownerDocument),$a=new mxGraphModel;
Wa.decode(Ia,$a);Ia=$a.root.getChildAt(0).children;b.sidebar.createTooltip(ta,Ia,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!=sa?mxResources.get(sa,null,sa):null,!0,new mxPoint(Ta,Sa),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;G(ta,null,null,ja,ka,Ca)},!0,!1)}}function xa(Ia,Ta){null==ja||Va||
@@ -10902,299 +10913,296 @@ if(0<Ba){var sa=document.createElement("div");sa.style.cssText="font-weight: bol
Ea+" ("+sa.length+")");mxUtils.write(pa,pa.getAttribute("title"));null!=A&&(pa.style.padding=A);za.appendChild(pa);(function(xa,ta){mxEvent.addListener(pa,"click",function(){na!=ta&&(na.style.backgroundColor="",na=ta,na.style.backgroundColor=t,da.scrollTop=0,da.innerText="",I=0,ra=Ka[xa],V=null,E(!1))})})(oa,pa)}sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,"draw.io");za.appendChild(sa)}for(oa in ca){Ea=
Na[oa];var ka=pa=document.createElement(Ea?"ul":"div");sa=ca[oa];var la=ja(oa,sa);if(null!=Ea){var qa=document.createElement("li"),Aa=document.createElement("div");Aa.className="geTempTreeCaret";Aa.setAttribute("title",la);mxUtils.write(Aa,la);ka=Aa;qa.appendChild(Aa);la=document.createElement("ul");la.className="geTempTreeNested";la.style.visibility="hidden";for(var Ca in Ea){var Ga=document.createElement("li"),Da=ja(Ca,Ea[Ca]);Ga.setAttribute("title",Da);mxUtils.write(Ga,Da);ma(oa,Ga,Ca);la.appendChild(Ga)}qa.appendChild(la);
pa.className="geTempTree";pa.appendChild(qa);(function(xa,ta){mxEvent.addListener(ta,"click",function(){xa.style.visibility="visible";xa.classList.toggle("geTempTreeActive");xa.classList.toggle("geTempTreeNested")&&setTimeout(function(){xa.style.visibility="hidden"},550);ta.classList.toggle("geTempTreeCaret-down")})})(la,Aa)}else pa.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;",
-pa.setAttribute("title",la),mxUtils.write(pa,la);null!=A&&(pa.style.padding=A);za.appendChild(pa);null==na&&0<sa.length&&(na=pa,na.style.backgroundColor=t,ra=sa);ma(oa,ka)}E(!1)}var p=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);e=null!=e?e:!0;l=null!=l?l:!1;t=null!=t?t:"#ebf2f9";y=null!=y?y:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";C=null!=C?C:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";B=null!=B?B:EditorUi.templateFile;var u=document.createElement("div");
-u.style.userSelect="none";u.style.height="100%";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.height="46px";e&&u.appendChild(H);var K=document.createElement("img");K.setAttribute("border","0");K.setAttribute("align","absmiddle");K.style.width="40px";K.style.height="40px";K.style.marginRight="10px";K.style.paddingBottom="4px";K.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";d||p||!e||H.appendChild(K);e&&mxUtils.write(H,(p?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");K=".drawio";
+pa.setAttribute("title",la),mxUtils.write(pa,la);null!=A&&(pa.style.padding=A);za.appendChild(pa);null==na&&0<sa.length&&(na=pa,na.style.backgroundColor=t,ra=sa);ma(oa,ka)}E(!1)}var p=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;t=null!=t?t:"#ebf2f9";y=null!=y?y:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";C=null!=C?C:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";B=null!=B?B:EditorUi.templateFile;var v=document.createElement("div");
+v.style.userSelect="none";v.style.height="100%";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.height="46px";f&&v.appendChild(H);var K=document.createElement("img");K.setAttribute("border","0");K.setAttribute("align","absmiddle");K.style.width="40px";K.style.height="40px";K.style.marginRight="10px";K.style.paddingBottom="4px";K.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";d||p||!f||H.appendChild(K);f&&mxUtils.write(H,(p?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");K=".drawio";
b.mode==App.MODE_GOOGLE&&null!=b.drive?K=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?K=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?K=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?K=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?K=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(K=b.trello.extension);var N=document.createElement("input");N.setAttribute("value",b.defaultFilename+K);N.style.marginLeft="10px";N.style.width=d||
-p?"144px":"244px";this.init=function(){e&&(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null));null!=da.parentNode&&null!=da.parentNode.parentNode&&mxEvent.addGestureListeners(da.parentNode.parentNode,mxUtils.bind(this,function(ja){b.sidebar.hideTooltip()}),null,null)};e&&(H.appendChild(N),x?N.style.width=d||p?"350px":"450px":(null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,N,b.editor.diagramFileTypes),x.style.marginLeft=
-"6px",x.style.width=d||p?"80px":"180px",H.appendChild(x)),null!=b.editor.fileExtensions&&(p=FilenameDialog.createTypeHint(b,N,b.editor.fileExtensions),p.style.marginTop="12px",H.appendChild(p))));H=!1;var I=0,L=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}),Q=mxUtils.button(n||mxResources.get("create"),function(){Q.setAttribute("disabled","disabled");z();Q.removeAttribute("disabled")});Q.className="geBtn gePrimaryBtn";
-if(J||f){var P=[],V=null,W=null,q=null,D=function(ja){Q.setAttribute("disabled","disabled");for(var ma=0;ma<P.length;ma++)P[ma].className=ma==ja?"geBtn gePrimaryBtn":"geBtn"};H=!0;n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="30px";u.appendChild(n);p=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){za.style.display="";Z.style.display="";da.style.left="160px";D(0);da.scrollTop=0;da.innerText="";I=0;V!=ra&&(ra=V,ca=W,Ba=q,za.innerText="",U(),V=null)});
-P.push(p);n.appendChild(p);var M=function(ja){za.style.display="none";Z.style.display="none";da.style.left="30px";D(ja?-1:1);null==V&&(V=ra);da.scrollTop=0;da.innerText="";L.spin(da);var ma=function(sa,oa,pa){I=0;L.stop();ra=sa;pa=pa||{};var Ea=0,ka;for(ka in pa)Ea+=pa[ka].length;if(oa)da.innerText=oa;else if(0==sa.length&&0==Ea)da.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(da.innerText="",0<Ea){za.style.display="";da.style.left="160px";za.innerText="";Ba=0;ca={"draw.io":sa};
-for(ka in pa)ca[ka]=pa[ka];U()}else E(!0)};ja?f(T.value,ma):J(ma)};J&&(p=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),n.appendChild(p),P.push(p));if(f){p=document.createElement("span");p.style.marginLeft="10px";p.innerText=mxResources.get("search")+":";n.appendChild(p);var T=document.createElement("input");T.style.marginRight="10px";T.style.marginLeft="10px";T.style.width="220px";mxEvent.addListener(T,"keypress",function(ja){13==ja.keyCode&&M(!0)});n.appendChild(T);p=mxUtils.button(mxResources.get("search"),
-function(){M(!0)});p.className="geBtn";n.appendChild(p)}D(0)}var O=null,R=null,S=null,X=null,Y=null,aa=null,ba=null,da=document.createElement("div");da.style.border="1px solid #d3d3d3";da.style.position="absolute";da.style.left="160px";da.style.right="34px";n=(e?72:40)+(H?30:0);da.style.top=n+"px";da.style.bottom="68px";da.style.margin="6px 0 0 -1px";da.style.padding="6px";da.style.overflow="auto";var Z=document.createElement("div");Z.style.cssText="position:absolute;left:30px;width:128px;top:"+n+
+p?"144px":"244px";this.init=function(){f&&(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null));null!=da.parentNode&&null!=da.parentNode.parentNode&&mxEvent.addGestureListeners(da.parentNode.parentNode,mxUtils.bind(this,function(ja){b.sidebar.hideTooltip()}),null,null)};f&&(H.appendChild(N),x?N.style.width=d||p?"350px":"450px":(null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,N,b.editor.diagramFileTypes),x.style.marginLeft=
+"6px",x.style.width=d||p?"80px":"180px",H.appendChild(x)),null!=b.editor.fileExtensions&&(p=FilenameDialog.createTypeHint(b,N,b.editor.fileExtensions),p.style.marginTop="12px",H.appendChild(p))));H=!1;var I=0,L=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}),Q=mxUtils.button(q||mxResources.get("create"),function(){Q.setAttribute("disabled","disabled");z();Q.removeAttribute("disabled")});Q.className="geBtn gePrimaryBtn";
+if(J||e){var P=[],V=null,W=null,n=null,D=function(ja){Q.setAttribute("disabled","disabled");for(var ma=0;ma<P.length;ma++)P[ma].className=ma==ja?"geBtn gePrimaryBtn":"geBtn"};H=!0;q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="30px";v.appendChild(q);p=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){za.style.display="";Z.style.display="";da.style.left="160px";D(0);da.scrollTop=0;da.innerText="";I=0;V!=ra&&(ra=V,ca=W,Ba=n,za.innerText="",U(),V=null)});
+P.push(p);q.appendChild(p);var M=function(ja){za.style.display="none";Z.style.display="none";da.style.left="30px";D(ja?-1:1);null==V&&(V=ra);da.scrollTop=0;da.innerText="";L.spin(da);var ma=function(sa,oa,pa){I=0;L.stop();ra=sa;pa=pa||{};var Ea=0,ka;for(ka in pa)Ea+=pa[ka].length;if(oa)da.innerText=oa;else if(0==sa.length&&0==Ea)da.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(da.innerText="",0<Ea){za.style.display="";da.style.left="160px";za.innerText="";Ba=0;ca={"draw.io":sa};
+for(ka in pa)ca[ka]=pa[ka];U()}else E(!0)};ja?e(T.value,ma):J(ma)};J&&(p=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),q.appendChild(p),P.push(p));if(e){p=document.createElement("span");p.style.marginLeft="10px";p.innerText=mxResources.get("search")+":";q.appendChild(p);var T=document.createElement("input");T.style.marginRight="10px";T.style.marginLeft="10px";T.style.width="220px";mxEvent.addListener(T,"keypress",function(ja){13==ja.keyCode&&M(!0)});q.appendChild(T);p=mxUtils.button(mxResources.get("search"),
+function(){M(!0)});p.className="geBtn";q.appendChild(p)}D(0)}var O=null,R=null,S=null,X=null,Y=null,aa=null,ba=null,da=document.createElement("div");da.style.border="1px solid #d3d3d3";da.style.position="absolute";da.style.left="160px";da.style.right="34px";q=(f?72:40)+(H?30:0);da.style.top=q+"px";da.style.bottom="68px";da.style.margin="6px 0 0 -1px";da.style.padding="6px";da.style.overflow="auto";var Z=document.createElement("div");Z.style.cssText="position:absolute;left:30px;width:128px;top:"+q+
"px;height:22px;margin-top: 6px;white-space: nowrap";var ia=document.createElement("input");ia.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ia.setAttribute("placeholder",mxResources.get("search"));ia.setAttribute("type","text");Z.appendChild(ia);var ea=document.createElement("img"),va="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ea.setAttribute("src",va);ea.setAttribute("title",mxResources.get("search"));
ea.style.position="relative";ea.style.left="-18px";ea.style.top="1px";ea.style.background="url('"+b.editor.transparentImage+"')";Z.appendChild(ea);mxEvent.addListener(ea,"click",function(){ea.getAttribute("src")==Dialog.prototype.closeImage&&(ea.setAttribute("src",va),ea.setAttribute("title",mxResources.get("search")),ia.value="",null!=Ja&&(Ja.click(),Ja=null));ia.focus()});mxEvent.addListener(ia,"keydown",mxUtils.bind(this,function(ja){if(13==ja.keyCode){var ma=ia.value;if(""==ma)null!=Ja&&(Ja.click(),
Ja=null);else{if(null==NewDialog.tagsList[B]){var sa={};for(Ca in ca)for(var oa=ca[Ca],pa=0;pa<oa.length;pa++){var Ea=oa[pa];if(null!=Ea.tags)for(var ka=Ea.tags.toLowerCase().split(";"),la=0;la<ka.length;la++)null==sa[ka[la]]&&(sa[ka[la]]=[]),sa[ka[la]].push(Ea)}NewDialog.tagsList[B]=sa}var qa=ma.toLowerCase().split(" ");sa=NewDialog.tagsList[B];if(0<Ba&&null==sa.__tagsList__){for(Ca in Ka)for(oa=Ka[Ca],pa=0;pa<oa.length;pa++)for(Ea=oa[pa],ka=Ea.title.split(" "),ka.push(Ca),la=0;la<ka.length;la++){var Aa=
ka[la].toLowerCase();null==sa[Aa]&&(sa[Aa]=[]);sa[Aa].push(Ea)}sa.__tagsList__=!0}var Ca=[];oa={};for(pa=ka=0;pa<qa.length;pa++)if(0<qa[pa].length){Aa=sa[qa[pa]];var Ga={};Ca=[];if(null!=Aa)for(la=0;la<Aa.length;la++)Ea=Aa[la],0==ka==(null==oa[Ea.url])&&(Ga[Ea.url]=!0,Ca.push(Ea));oa=Ga;ka++}da.scrollTop=0;da.innerText="";I=0;sa=document.createElement("div");sa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(sa,mxResources.get(0==Ca.length?"noResultsFor":
-"resultsFor",[ma]));da.appendChild(sa);null!=na&&null==Ja&&(na.style.backgroundColor="",Ja=na,na=sa);ra=Ca;V=null;E(!1)}mxEvent.consume(ja)}}));mxEvent.addListener(ia,"keyup",mxUtils.bind(this,function(ja){""==ia.value?(ea.setAttribute("src",va),ea.setAttribute("title",mxResources.get("search"))):(ea.setAttribute("src",Dialog.prototype.closeImage),ea.setAttribute("title",mxResources.get("reset")))}));n+=23;var za=document.createElement("div");za.style.cssText="position:absolute;left:30px;width:128px;top:"+
-n+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(da,"scroll",function(){b.sidebar.hideTooltip()});var ya=140,ua=140,ca={},Na={},Ka={},Ba=0,Fa=!0,na=null,Ja=null;ca.basic=[{title:"blankDiagram",select:!0}];var ra=ca.basic;if(!d){var ha=function(){mxUtils.get(wa,function(ja){if(!fa){fa=!0;ja=ja.getXml().documentElement.firstChild;for(var ma={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("clibs"==ja.nodeName){for(var sa=ja.getAttribute("name"),oa=
+"resultsFor",[ma]));da.appendChild(sa);null!=na&&null==Ja&&(na.style.backgroundColor="",Ja=na,na=sa);ra=Ca;V=null;E(!1)}mxEvent.consume(ja)}}));mxEvent.addListener(ia,"keyup",mxUtils.bind(this,function(ja){""==ia.value?(ea.setAttribute("src",va),ea.setAttribute("title",mxResources.get("search"))):(ea.setAttribute("src",Dialog.prototype.closeImage),ea.setAttribute("title",mxResources.get("reset")))}));q+=23;var za=document.createElement("div");za.style.cssText="position:absolute;left:30px;width:128px;top:"+
+q+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(da,"scroll",function(){b.sidebar.hideTooltip()});var ya=140,ua=140,ca={},Na={},Ka={},Ba=0,Fa=!0,na=null,Ja=null;ca.basic=[{title:"blankDiagram",select:!0}];var ra=ca.basic;if(!d){var ha=function(){mxUtils.get(wa,function(ja){if(!fa){fa=!0;ja=ja.getXml().documentElement.firstChild;for(var ma={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("clibs"==ja.nodeName){for(var sa=ja.getAttribute("name"),oa=
ja.getElementsByTagName("add"),pa=[],Ea=0;Ea<oa.length;Ea++)pa.push(encodeURIComponent(mxUtils.getTextContent(oa[Ea])));null!=sa&&0<pa.length&&(ma[sa]=pa.join(";"))}else if(pa=ja.getAttribute("url"),null!=pa){oa=ja.getAttribute("section");sa=ja.getAttribute("subsection");if(null==oa&&(Ea=pa.indexOf("/"),oa=pa.substring(0,Ea),null==sa)){var ka=pa.indexOf("/",Ea+1);-1<ka&&(sa=pa.substring(Ea+1,ka))}Ea=ca[oa];null==Ea&&(Ea=[],ca[oa]=Ea);pa=ja.getAttribute("clibs");null!=ma[pa]&&(pa=ma[pa]);pa={url:ja.getAttribute("url"),
-libs:ja.getAttribute("libs"),title:ja.getAttribute("title"),tooltip:ja.getAttribute("name")||ja.getAttribute("url"),preview:ja.getAttribute("preview"),clibs:pa,tags:ja.getAttribute("tags")};Ea.push(pa);null!=sa&&(Ea=Na[oa],null==Ea&&(Ea={},Na[oa]=Ea),oa=Ea[sa],null==oa&&(oa=[],Ea[sa]=oa),oa.push(pa))}ja=ja.nextSibling}L.stop();U()}})};u.appendChild(Z);u.appendChild(za);u.appendChild(da);var fa=!1,wa=B;/^https?:\/\//.test(wa)&&!b.editor.isCorsEnabledForUrl(wa)&&(wa=PROXY_URL+"?url="+encodeURIComponent(wa));
-L.spin(da);null!=v?v(function(ja,ma){Ka=ja;q=Ba=ma;ha()},ha):ha();W=ca}mxEvent.addListener(N,"keypress",function(ja){b.dialog.container.firstChild==u&&13==ja.keyCode&&z()});v=document.createElement("div");v.style.marginTop=d?"4px":"16px";v.style.textAlign="right";v.style.position="absolute";v.style.left="40px";v.style.bottom="24px";v.style.right="40px";d||b.isOffline()||!e||null!=c||l||(n=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-n.className="geBtn",v.appendChild(n));n=mxUtils.button(mxResources.get("cancel"),function(){null!=m&&m();b.hideDialog(!0)});n.className="geBtn";!b.editor.cancelFirst||l&&null==m||v.appendChild(n);d||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ja=new FilenameDialog(b,"",mxResources.get("create"),function(ma){null!=ma&&0<ma.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ma),function(sa){S=
-sa;O=null;templateRealURl=ma;b.hideDialog();z()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ja.container,300,80,!0,!0);ja.init()}),d.className="geBtn",v.appendChild(d));Graph.fileSupport&&k&&(k=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ja=document.createElement("input");ja.setAttribute("multiple","multiple");ja.setAttribute("type","file");mxEvent.addListener(ja,"change",function(ma){b.openFiles(ja.files,!0);
-ja.value=""});ja.style.display="none";document.body.appendChild(ja);b.newDlgFileInputElt=ja}b.newDlgFileInputElt.click()}),k.className="geBtn",v.appendChild(k));v.appendChild(Q);b.editor.cancelFirst||null!=c||l&&null==m||v.appendChild(n);u.appendChild(v);this.container=u};NewDialog.tagsList={};
-var CreateDialog=function(b,d,e,c,l,m,t,y,C,A,B,J,f,g,k,n,v){function x(H,K,N,I){function L(){mxEvent.addListener(Q,"click",function(){var D=N;if(t){var M=G.value,T=M.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>T){D=null!=D?D:u.value;var O="";D==App.MODE_GOOGLE?O=b.drive.extension:D==App.MODE_GITHUB?O=b.gitHub.extension:D==App.MODE_GITLAB?O=b.gitLab.extension:D==App.MODE_TRELLO?O=b.trello.extension:D==App.MODE_DROPBOX?O=b.dropbox.extension:D==App.MODE_ONEDRIVE?O=b.oneDrive.extension:D==App.MODE_DEVICE&&
+libs:ja.getAttribute("libs"),title:ja.getAttribute("title"),tooltip:ja.getAttribute("name")||ja.getAttribute("url"),preview:ja.getAttribute("preview"),clibs:pa,tags:ja.getAttribute("tags")};Ea.push(pa);null!=sa&&(Ea=Na[oa],null==Ea&&(Ea={},Na[oa]=Ea),oa=Ea[sa],null==oa&&(oa=[],Ea[sa]=oa),oa.push(pa))}ja=ja.nextSibling}L.stop();U()}})};v.appendChild(Z);v.appendChild(za);v.appendChild(da);var fa=!1,wa=B;/^https?:\/\//.test(wa)&&!b.editor.isCorsEnabledForUrl(wa)&&(wa=PROXY_URL+"?url="+encodeURIComponent(wa));
+L.spin(da);null!=u?u(function(ja,ma){Ka=ja;n=Ba=ma;ha()},ha):ha();W=ca}mxEvent.addListener(N,"keypress",function(ja){b.dialog.container.firstChild==v&&13==ja.keyCode&&z()});u=document.createElement("div");u.style.marginTop=d?"4px":"16px";u.style.textAlign="right";u.style.position="absolute";u.style.left="40px";u.style.bottom="24px";u.style.right="40px";d||b.isOffline()||!f||null!=c||l||(q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+q.className="geBtn",u.appendChild(q));q=mxUtils.button(mxResources.get("cancel"),function(){null!=m&&m();b.hideDialog(!0)});q.className="geBtn";!b.editor.cancelFirst||l&&null==m||u.appendChild(q);d||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ja=new FilenameDialog(b,"",mxResources.get("create"),function(ma){null!=ma&&0<ma.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ma),function(sa){S=
+sa;O=null;templateRealURl=ma;b.hideDialog();z()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ja.container,300,80,!0,!0);ja.init()}),d.className="geBtn",u.appendChild(d));Graph.fileSupport&&k&&(k=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ja=document.createElement("input");ja.setAttribute("multiple","multiple");ja.setAttribute("type","file");mxEvent.addListener(ja,"change",function(ma){b.openFiles(ja.files,!0);
+ja.value=""});ja.style.display="none";document.body.appendChild(ja);b.newDlgFileInputElt=ja}b.newDlgFileInputElt.click()}),k.className="geBtn",u.appendChild(k));u.appendChild(Q);b.editor.cancelFirst||null!=c||l&&null==m||u.appendChild(q);v.appendChild(u);this.container=v};NewDialog.tagsList={};
+var CreateDialog=function(b,d,f,c,l,m,t,y,C,A,B,J,e,g,k,q,u){function x(H,K,N,I){function L(){mxEvent.addListener(Q,"click",function(){var D=N;if(t){var M=G.value,T=M.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>T){D=null!=D?D:v.value;var O="";D==App.MODE_GOOGLE?O=b.drive.extension:D==App.MODE_GITHUB?O=b.gitHub.extension:D==App.MODE_GITLAB?O=b.gitLab.extension:D==App.MODE_TRELLO?O=b.trello.extension:D==App.MODE_DROPBOX?O=b.dropbox.extension:D==App.MODE_ONEDRIVE?O=b.oneDrive.extension:D==App.MODE_DEVICE&&
(O=".drawio");0<=T&&(M=M.substring(0,T));G.value=M+O}}E(N)})}var Q=document.createElement("a");Q.style.overflow="hidden";var P=document.createElement("img");P.src=H;P.setAttribute("border","0");P.setAttribute("align","absmiddle");P.style.width="60px";P.style.height="60px";P.style.paddingBottom="6px";Q.style.display="inline-block";Q.className="geBaseButton";Q.style.position="relative";Q.style.margin="4px";Q.style.padding="8px 8px 10px 8px";Q.style.whiteSpace="nowrap";Q.appendChild(P);Q.style.color=
-"gray";Q.style.fontSize="11px";var V=document.createElement("div");Q.appendChild(V);mxUtils.write(V,K);if(null!=I&&null==b[I]){P.style.visibility="hidden";mxUtils.setOpacity(V,10);var W=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});W.spin(Q);var q=window.setTimeout(function(){null==b[I]&&(W.stop(),Q.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[I]&&(window.clearTimeout(q),
-mxUtils.setOpacity(V,100),P.style.visibility="",W.stop(),L())}))}else L();U.appendChild(Q);++p==J&&(mxUtils.br(U),p=0)}function E(H){var K=G.value;if(null==H||null!=K&&0<K.length)v&&b.hideDialog(),e(K,H,G)}B="1"==urlParams.noDevice?!1:B;t=null!=t?t:!0;y=null!=y?y:!0;J=null!=J?J:4;v=null!=v?v:!0;m=document.createElement("div");m.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(m);var z=document.createElement("h2");mxUtils.write(z,l||mxResources.get("create"));z.style.marginTop="0px";z.style.marginBottom=
-"24px";m.appendChild(z);mxUtils.write(m,mxResources.get("filename")+":");var G=document.createElement("input");G.setAttribute("value",d);G.style.width="200px";G.style.marginLeft="10px";G.style.marginBottom="20px";G.style.maxWidth="70%";this.init=function(){G.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null)};m.appendChild(G);null!=n&&(null!=b.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),
-l.style.marginLeft="6px",l.style.width="90px",m.appendChild(l)),m.appendChild(FilenameDialog.createTypeHint(b,G,n)));n=null;if("1"!=urlParams.noDevice&&null!=f&&null!=g&&"image/"==g.substring(0,6)&&("image/svg"!=g.substring(0,9)||mxClient.IS_SVG)){G.style.width="160px";l=document.createElement("img");var F=k?f:btoa(unescape(encodeURIComponent(f)));l.setAttribute("src","data:"+g+";base64,"+F);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");m.appendChild(l);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=g||(n=mxUtils.button(mxResources.get("copy"),function(H){H=b.base64ToBlob(F,"image/png");H=new ClipboardItem({"image/png":H,"text/html":new Blob(['<img src="data:'+g+";base64,"+F+'">'],{type:"text/html"})});navigator.clipboard.write([H]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(K){b.handleError(K)}))}),
-n.style.marginTop="6px",n.className="geBtn");C&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(H){mxEvent.isPopupTrigger(H)||E("_blank")}))}mxUtils.br(m);var U=document.createElement("div");U.style.textAlign="center";var p=0;U.style.marginTop="6px";m.appendChild(U);var u=document.createElement("select");u.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(f=document.createElement("option"),f.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(f,mxResources.get("googleDrive")),u.appendChild(f),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(f,mxResources.get("oneDrive")),u.appendChild(f),b.mode==App.MODE_ONEDRIVE&&f.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
-"oneDrive")),"function"===typeof window.DropboxClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(f,mxResources.get("dropbox")),u.appendChild(f),b.mode==App.MODE_DROPBOX&&f.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITHUB),mxUtils.write(f,mxResources.get("github")),u.appendChild(f),x(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITLAB),mxUtils.write(f,mxResources.get("gitlab")),u.appendChild(f),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_TRELLO),mxUtils.write(f,mxResources.get("trello")),u.appendChild(f),x(IMAGE_PATH+"/trello-logo.svg",
-mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)f=document.createElement("option"),f.setAttribute("value",App.MODE_DEVICE),mxUtils.write(f,mxResources.get("device")),u.appendChild(f),b.mode!=App.MODE_DEVICE&&y||f.setAttribute("selected","selected"),B&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);y&&isLocalStorage&&"0"!=urlParams.browser&&(y=document.createElement("option"),
-y.setAttribute("value",App.MODE_BROWSER),mxUtils.write(y,mxResources.get("browser")),u.appendChild(y),b.mode==App.MODE_BROWSER&&y.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));y=document.createElement("div");y.style.marginTop="26px";y.style.textAlign="center";null!=A&&(B=mxUtils.button(mxResources.get("help"),function(){b.openLink(A)}),B.className="geBtn",y.appendChild(B));B=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
-function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});B.className="geBtn";b.editor.cancelFirst&&null==c&&y.appendChild(B);null==c&&(f=mxUtils.button(mxResources.get("decideLater"),function(){E(null)}),f.className="geBtn",y.appendChild(f));C&&Editor.popupsAllowed&&(C=mxUtils.button(mxResources.get("openInNewWindow"),function(){E("_blank")}),C.className="geBtn",y.appendChild(C));CreateDialog.showDownloadButton&&(C=mxUtils.button(mxResources.get("download"),
-function(){E("download")}),C.className="geBtn",y.appendChild(C),null!=n&&(C.style.marginTop="6px",y.style.marginTop="6px"));null!=n&&(mxUtils.br(y),y.appendChild(n));b.editor.cancelFirst&&null==c||y.appendChild(B);mxEvent.addListener(G,"keypress",function(H){13==H.keyCode?E(App.MODE_DEVICE):27==H.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});m.appendChild(y);this.container=m};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,d,e,c,l){l=null!=l?l:!0;var m=document.createElement("div");m.style.textAlign="left";m.style.height="100%";mxUtils.write(m,mxResources.get("fileOpenLocation"));mxUtils.br(m);mxUtils.br(m);var t=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});t.className="geBtn";t.style.marginBottom="8px";t.style.width="280px";m.appendChild(t);mxUtils.br(m);var y=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog();
-null!=e&&e();b.openLink(d,null,!0)});y.className="geBtn gePrimaryBtn";y.style.width=t.style.width;m.appendChild(y);mxUtils.br(m);mxUtils.br(m);mxUtils.write(m,mxResources.get("allowPopups"));this.container=m},ImageDialog=function(b,d,e,c,l,m,t,y){function C(){0<J.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}m=null!=m?m:!0;var A=b.editor.graph,B=document.createElement("div");mxUtils.write(B,d);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 J=document.createElement("input");J.setAttribute("value",e);J.setAttribute("type","text");J.setAttribute("spellcheck","false");J.setAttribute("autocorrect","off");J.setAttribute("autocomplete","off");J.setAttribute("autocapitalize","off");J.style.marginTop="6px";J.style.width=(Graph.fileSupport?460:340)-20+"px";J.style.backgroundImage="url('"+
-Dialog.prototype.clearImage+"')";J.style.backgroundRepeat="no-repeat";J.style.backgroundPosition="100% 50%";J.style.paddingRight="14px";e=document.createElement("div");e.setAttribute("title",mxResources.get("reset"));e.style.position="relative";e.style.left="-16px";e.style.width="12px";e.style.height="14px";e.style.cursor="pointer";e.style.display="inline-block";e.style.top="3px";e.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(e,"click",function(){J.value="";J.focus()});
-d.appendChild(J);d.appendChild(e);B.appendChild(d);var f=y,g,k,n=function(z,G,F,U){var p="data:"==z.substring(0,5);!b.isOffline()||p&&"undefined"===typeof chrome?0<z.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(z,function(u){b.spinner.stop();b.hideDialog();var H=!1===U?1:null!=G&&null!=F?Math.max(G/u.width,F/u.height):Math.min(1,Math.min(520/u.width,520/u.height));m&&(z=b.convertDataUri(z));c(z,Math.round(Number(u.width)*H),Math.round(Number(u.height)*H),f,g,k)},
-function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(z,null,null,f,g,k)):(z=b.convertDataUri(z),G=null==G?120:G,F=null==F?100:F,b.hideDialog(),c(z,G,F,f,g,k))},v=function(z,G){if(null!=z){var F=l?null:A.getModel().getGeometry(A.getSelectionCell());null!=F?n(z,F.width,F.height,G):n(z,null,null,G)}else b.hideDialog(),c(null)};this.init=function(){J.focus();if(Graph.fileSupport){J.setAttribute("placeholder",
+"gray";Q.style.fontSize="11px";var V=document.createElement("div");Q.appendChild(V);mxUtils.write(V,K);if(null!=I&&null==b[I]){P.style.visibility="hidden";mxUtils.setOpacity(V,10);var W=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});W.spin(Q);var n=window.setTimeout(function(){null==b[I]&&(W.stop(),Q.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[I]&&(window.clearTimeout(n),
+mxUtils.setOpacity(V,100),P.style.visibility="",W.stop(),L())}))}else L();U.appendChild(Q);++p==J&&(mxUtils.br(U),p=0)}function E(H){var K=G.value;if(null==H||null!=K&&0<K.length)u&&b.hideDialog(),f(K,H,G)}B="1"==urlParams.noDevice?!1:B;t=null!=t?t:!0;y=null!=y?y:!0;J=null!=J?J:4;u=null!=u?u:!0;m=document.createElement("div");m.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(m);var z=document.createElement("h2");mxUtils.write(z,l||mxResources.get("create"));z.style.marginTop="0px";z.style.marginBottom=
+"24px";m.appendChild(z);mxUtils.write(m,mxResources.get("filename")+":");var G=document.createElement("input");G.setAttribute("value",d);G.style.width="200px";G.style.marginLeft="10px";G.style.marginBottom="20px";G.style.maxWidth="70%";this.init=function(){G.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null)};m.appendChild(G);null!=q&&(null!=b.editor.diagramFileTypes&&(l=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),
+l.style.marginLeft="6px",l.style.width="90px",m.appendChild(l)),m.appendChild(FilenameDialog.createTypeHint(b,G,q)));q=null;if("1"!=urlParams.noDevice&&null!=e&&null!=g&&"image/"==g.substring(0,6)&&("image/svg"!=g.substring(0,9)||mxClient.IS_SVG)){G.style.width="160px";l=document.createElement("img");var F=k?e:btoa(unescape(encodeURIComponent(e)));l.setAttribute("src","data:"+g+";base64,"+F);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");m.appendChild(l);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=g||(q=mxUtils.button(mxResources.get("copy"),function(H){H=b.base64ToBlob(F,"image/png");H=new ClipboardItem({"image/png":H,"text/html":new Blob(['<img src="data:'+g+";base64,"+F+'">'],{type:"text/html"})});navigator.clipboard.write([H]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(K){b.handleError(K)}))}),
+q.style.marginTop="6px",q.className="geBtn");C&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(H){mxEvent.isPopupTrigger(H)||E("_blank")}))}mxUtils.br(m);var U=document.createElement("div");U.style.textAlign="center";var p=0;U.style.marginTop="6px";m.appendChild(U);var v=document.createElement("select");v.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),e.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(e,mxResources.get("googleDrive")),v.appendChild(e),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(e,mxResources.get("oneDrive")),v.appendChild(e),b.mode==App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
+"oneDrive")),"function"===typeof window.DropboxClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(e,mxResources.get("dropbox")),v.appendChild(e),b.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),v.appendChild(e),x(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITLAB),mxUtils.write(e,mxResources.get("gitlab")),v.appendChild(e),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),v.appendChild(e),x(IMAGE_PATH+"/trello-logo.svg",
+mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),v.appendChild(e),b.mode!=App.MODE_DEVICE&&y||e.setAttribute("selected","selected"),B&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);y&&isLocalStorage&&"0"!=urlParams.browser&&(y=document.createElement("option"),
+y.setAttribute("value",App.MODE_BROWSER),mxUtils.write(y,mxResources.get("browser")),v.appendChild(y),b.mode==App.MODE_BROWSER&&y.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));y=document.createElement("div");y.style.marginTop="26px";y.style.textAlign="center";null!=A&&(B=mxUtils.button(mxResources.get("help"),function(){b.openLink(A)}),B.className="geBtn",y.appendChild(B));B=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
+function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});B.className="geBtn";b.editor.cancelFirst&&null==c&&y.appendChild(B);null==c&&(e=mxUtils.button(mxResources.get("decideLater"),function(){E(null)}),e.className="geBtn",y.appendChild(e));C&&Editor.popupsAllowed&&(C=mxUtils.button(mxResources.get("openInNewWindow"),function(){E("_blank")}),C.className="geBtn",y.appendChild(C));CreateDialog.showDownloadButton&&(C=mxUtils.button(mxResources.get("download"),
+function(){E("download")}),C.className="geBtn",y.appendChild(C),null!=q&&(C.style.marginTop="6px",y.style.marginTop="6px"));null!=q&&(mxUtils.br(y),y.appendChild(q));b.editor.cancelFirst&&null==c||y.appendChild(B);mxEvent.addListener(G,"keypress",function(H){13==H.keyCode?E(App.MODE_DEVICE):27==H.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});m.appendChild(y);this.container=m};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,d,f,c,l){l=null!=l?l:!0;var m=document.createElement("div");m.style.textAlign="left";m.style.height="100%";mxUtils.write(m,mxResources.get("fileOpenLocation"));mxUtils.br(m);mxUtils.br(m);var t=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});t.className="geBtn";t.style.marginBottom="8px";t.style.width="280px";m.appendChild(t);mxUtils.br(m);var y=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog();
+null!=f&&f();b.openLink(d,null,!0)});y.className="geBtn gePrimaryBtn";y.style.width=t.style.width;m.appendChild(y);mxUtils.br(m);mxUtils.br(m);mxUtils.write(m,mxResources.get("allowPopups"));this.container=m},ImageDialog=function(b,d,f,c,l,m,t,y){function C(){0<J.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}m=null!=m?m:!0;var A=b.editor.graph,B=document.createElement("div");mxUtils.write(B,d);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 J=document.createElement("input");J.setAttribute("value",f);J.setAttribute("type","text");J.setAttribute("spellcheck","false");J.setAttribute("autocorrect","off");J.setAttribute("autocomplete","off");J.setAttribute("autocapitalize","off");J.style.marginTop="6px";J.style.width=(Graph.fileSupport?460:340)-20+"px";J.style.backgroundImage="url('"+
+Dialog.prototype.clearImage+"')";J.style.backgroundRepeat="no-repeat";J.style.backgroundPosition="100% 50%";J.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(){J.value="";J.focus()});
+d.appendChild(J);d.appendChild(f);B.appendChild(d);var e=y,g,k,q=function(z,G,F,U){var p="data:"==z.substring(0,5);!b.isOffline()||p&&"undefined"===typeof chrome?0<z.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(z,function(v){b.spinner.stop();b.hideDialog();var H=!1===U?1:null!=G&&null!=F?Math.max(G/v.width,F/v.height):Math.min(1,Math.min(520/v.width,520/v.height));m&&(z=b.convertDataUri(z));c(z,Math.round(Number(v.width)*H),Math.round(Number(v.height)*H),e,g,k)},
+function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(z,null,null,e,g,k)):(z=b.convertDataUri(z),G=null==G?120:G,F=null==F?100:F,b.hideDialog(),c(z,G,F,e,g,k))},u=function(z,G){if(null!=z){var F=l?null:A.getModel().getGeometry(A.getSelectionCell());null!=F?q(z,F.width,F.height,G):q(z,null,null,G)}else b.hideDialog(),c(null)};this.init=function(){J.focus();if(Graph.fileSupport){J.setAttribute("placeholder",
mxResources.get("dragImagesHere"));var z=B.parentNode,G=null;mxEvent.addListener(z,"dragleave",function(F){null!=G&&(G.parentNode.removeChild(G),G=null);F.stopPropagation();F.preventDefault()});mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(F){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(z));F.stopPropagation();F.preventDefault()}));mxEvent.addListener(z,"drop",mxUtils.bind(this,function(F){null!=G&&(G.parentNode.removeChild(G),G=null);if(0<F.dataTransfer.files.length)b.importFiles(F.dataTransfer.files,
-0,0,b.maxImageSize,function(p,u,H,K,N,I,L,Q){v(p,Q)},function(){},function(p){return"image/"==p.type.substring(0,6)},function(p){for(var u=0;u<p.length;u++)p[u]()},!mxEvent.isControlDown(F),null,null,!0);else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var U=F.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&v(decodeURIComponent(U))}F.stopPropagation();F.preventDefault()}),!1)}};y=document.createElement("div");y.style.marginTop="14px";y.style.textAlign=
-"center";e=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});e.className="geBtn";b.editor.cancelFirst&&y.appendChild(e);ImageDialog.filePicked=function(z){z.action==google.picker.Action.PICKED&&null!=z.docs[0].thumbnails&&(z=z.docs[0].thumbnails[z.docs[0].thumbnails.length-1],null!=z&&(J.value=z.url));J.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type",
-"file");mxEvent.addListener(x,"change",function(z){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(G,F,U,p,u,H){v(G)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var F=0;F<G.length;F++)G[F]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}d=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});d.className="geBtn";y.appendChild(d)}mxEvent.addListener(J,
-"keypress",function(z){13==z.keyCode&&v(J.value)});var E=mxUtils.button(mxResources.get("crop"),function(){var z=new CropImageDialog(b,J.value,f,function(G,F,U){f=G;g=F;k=U});b.showDialog(z.container,300,390,!0,!0)});t&&(E.className="geBtn",y.appendChild(E));mxEvent.addListener(J,"change",function(z){f=null;C()});C();t=mxUtils.button(mxResources.get("apply"),function(){v(J.value)});t.className="geBtn gePrimaryBtn";y.appendChild(t);b.editor.cancelFirst||y.appendChild(e);Graph.fileSupport&&(y.style.marginTop=
-"120px",B.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",B.style.backgroundPosition="center 65%",B.style.backgroundRepeat="no-repeat",t=document.createElement("div"),t.style.position="absolute",t.style.width="420px",t.style.top="58%",t.style.textAlign="center",t.style.fontSize="18px",t.style.color="#a0c3ff",mxUtils.write(t,mxResources.get("dragImagesHere")),B.appendChild(t));B.appendChild(y);this.container=B},LinkDialog=function(b,d,e,c,l,m,t){function y(z,G,F){F=mxUtils.button("",F);
+0,0,b.maxImageSize,function(p,v,H,K,N,I,L,Q){u(p,Q)},function(){},function(p){return"image/"==p.type.substring(0,6)},function(p){for(var v=0;v<p.length;v++)p[v]()},!mxEvent.isControlDown(F),null,null,!0);else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var U=F.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&u(decodeURIComponent(U))}F.stopPropagation();F.preventDefault()}),!1)}};y=document.createElement("div");y.style.marginTop="14px";y.style.textAlign=
+"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&y.appendChild(f);ImageDialog.filePicked=function(z){z.action==google.picker.Action.PICKED&&null!=z.docs[0].thumbnails&&(z=z.docs[0].thumbnails[z.docs[0].thumbnails.length-1],null!=z&&(J.value=z.url));J.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type",
+"file");mxEvent.addListener(x,"change",function(z){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(G,F,U,p,v,H){u(G)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var F=0;F<G.length;F++)G[F]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}d=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});d.className="geBtn";y.appendChild(d)}mxEvent.addListener(J,
+"keypress",function(z){13==z.keyCode&&u(J.value)});var E=mxUtils.button(mxResources.get("crop"),function(){var z=new CropImageDialog(b,J.value,e,function(G,F,U){e=G;g=F;k=U});b.showDialog(z.container,300,390,!0,!0)});t&&(E.className="geBtn",y.appendChild(E));mxEvent.addListener(J,"change",function(z){e=null;C()});C();t=mxUtils.button(mxResources.get("apply"),function(){u(J.value)});t.className="geBtn gePrimaryBtn";y.appendChild(t);b.editor.cancelFirst||y.appendChild(f);Graph.fileSupport&&(y.style.marginTop=
+"120px",B.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",B.style.backgroundPosition="center 65%",B.style.backgroundRepeat="no-repeat",t=document.createElement("div"),t.style.position="absolute",t.style.width="420px",t.style.top="58%",t.style.textAlign="center",t.style.fontSize="18px",t.style.color="#a0c3ff",mxUtils.write(t,mxResources.get("dragImagesHere")),B.appendChild(t));B.appendChild(y);this.container=B},LinkDialog=function(b,d,f,c,l,m,t){function y(z,G,F){F=mxUtils.button("",F);
F.className="geBtn";F.setAttribute("title",G);G=document.createElement("img");G.style.height="26px";G.style.width="26px";G.setAttribute("src",z);F.style.minWidth="42px";F.style.verticalAlign="middle";F.appendChild(G);E.appendChild(F)}var C=document.createElement("div");C.style.height="100%";mxUtils.write(C,mxResources.get("editLink")+":");var A=document.createElement("div");A.className="geTitle";A.style.backgroundColor="transparent";A.style.borderColor="transparent";A.style.whiteSpace="nowrap";A.style.textOverflow=
"clip";A.style.cursor="default";A.style.paddingRight="20px";var B=document.createElement("input");B.setAttribute("placeholder",mxResources.get("dragUrlsHere"));B.setAttribute("type","text");B.style.marginTop="6px";B.style.width="97%";B.style.boxSizing="border-box";B.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";B.style.backgroundRepeat="no-repeat";B.style.backgroundPosition="100% 50%";B.style.paddingRight="14px";B.style.marginBottom="4px";var J=document.createElement("div");J.setAttribute("title",
-mxResources.get("reset"));J.style.position="relative";J.style.left="-16px";J.style.width="12px";J.style.height="14px";J.style.cursor="pointer";J.style.display="inline-block";J.style.top="3px";J.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(J,"click",function(){B.value="";B.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","geLinkDialogOption");
-var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var k=document.createElement("select");k.style.width="520px";var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.margin="0 6p 0 6px";null!=t&&(n.setAttribute("checked","checked"),n.defaultChecked=!0);t=null!=t?t:"_blank";n.setAttribute("title",t);m&&(B.style.width="340px");if(l&&
-null!=b.pages){null!=d&&Graph.isPageLink(d)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(B.setAttribute("value",d),f.setAttribute("checked","checked"),f.defaultChecked=!0);A.appendChild(f);A.appendChild(B);A.appendChild(J);m&&(A.appendChild(n),mxUtils.write(A,mxResources.get("openInNewWindow")));mxUtils.br(A);A.appendChild(g);l=!1;for(m=0;m<b.pages.length;m++)J=document.createElement("option"),mxUtils.write(J,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1])),J.setAttribute("value",
-"data:page/id,"+b.pages[m].getId()),d==J.getAttribute("value")&&(J.setAttribute("selected","selected"),l=!0),k.appendChild(J);if(!l&&g.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");k.appendChild(v);mxEvent.addListener(k,"change",function(){null==v.parentNode||v.selected||v.parentNode.removeChild(v)})}A.appendChild(k)}else B.setAttribute("value",
-d),A.appendChild(B),A.appendChild(J);C.appendChild(A);var x=mxUtils.button(e,function(){b.hideDialog();c(g.checked?"pageNotFound"!==k.value?k.value:d:B.value,LinkDialog.selectedDocs,n.checked?t:null)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){g.checked?k.focus():(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(k,"focus",function(){f.removeAttribute("checked");g.setAttribute("checked",
-"checked");g.checked=!0});mxEvent.addListener(B,"focus",function(){g.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var z=C.parentNode,G=null;mxEvent.addListener(z,"dragleave",function(F){null!=G&&(G.parentNode.removeChild(G),G=null);F.stopPropagation();F.preventDefault()});mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(F){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(z));F.stopPropagation();F.preventDefault()}));
-mxEvent.addListener(z,"drop",mxUtils.bind(this,function(F){null!=G&&(G.parentNode.removeChild(G),G=null);0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")&&(B.value=decodeURIComponent(F.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,x.click());F.stopPropagation();F.preventDefault()}),!1)}};var E=document.createElement("div");E.style.marginTop="18px";E.style.textAlign="center";e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
-e.style.verticalAlign="middle";e.className="geBtn";E.appendChild(e);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(e.style.display="none");e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.style.verticalAlign="middle";e.className="geBtn";b.editor.cancelFirst&&E.appendChild(e);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(z){if(z.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=z.docs;var G=z.docs[0].url;"application/mxe"==z.docs[0].mimeType||null!=z.docs[0].mimeType&&
+mxResources.get("reset"));J.style.position="relative";J.style.left="-16px";J.style.width="12px";J.style.height="14px";J.style.cursor="pointer";J.style.display="inline-block";J.style.top="3px";J.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(J,"click",function(){B.value="";B.focus()});var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","geLinkDialogOption");
+var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var k=document.createElement("select");k.style.width="520px";var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.margin="0 6p 0 6px";null!=t&&(q.setAttribute("checked","checked"),q.defaultChecked=!0);t=null!=t?t:"_blank";q.setAttribute("title",t);m&&(B.style.width="340px");if(l&&
+null!=b.pages){null!=d&&Graph.isPageLink(d)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(B.setAttribute("value",d),e.setAttribute("checked","checked"),e.defaultChecked=!0);A.appendChild(e);A.appendChild(B);A.appendChild(J);m&&(A.appendChild(q),mxUtils.write(A,mxResources.get("openInNewWindow")));mxUtils.br(A);A.appendChild(g);l=!1;for(m=0;m<b.pages.length;m++)J=document.createElement("option"),mxUtils.write(J,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1])),J.setAttribute("value",
+"data:page/id,"+b.pages[m].getId()),d==J.getAttribute("value")&&(J.setAttribute("selected","selected"),l=!0),k.appendChild(J);if(!l&&g.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");k.appendChild(u);mxEvent.addListener(k,"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}A.appendChild(k)}else B.setAttribute("value",
+d),A.appendChild(B),A.appendChild(J);C.appendChild(A);var x=mxUtils.button(f,function(){b.hideDialog();c(g.checked?"pageNotFound"!==k.value?k.value:d:B.value,LinkDialog.selectedDocs,q.checked?t:null)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){g.checked?k.focus():(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(k,"focus",function(){e.removeAttribute("checked");g.setAttribute("checked",
+"checked");g.checked=!0});mxEvent.addListener(B,"focus",function(){g.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});if(Graph.fileSupport){var z=C.parentNode,G=null;mxEvent.addListener(z,"dragleave",function(F){null!=G&&(G.parentNode.removeChild(G),G=null);F.stopPropagation();F.preventDefault()});mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(F){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(z));F.stopPropagation();F.preventDefault()}));
+mxEvent.addListener(z,"drop",mxUtils.bind(this,function(F){null!=G&&(G.parentNode.removeChild(G),G=null);0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")&&(B.value=decodeURIComponent(F.dataTransfer.getData("text/uri-list")),e.setAttribute("checked","checked"),e.checked=!0,x.click());F.stopPropagation();F.preventDefault()}),!1)}};var E=document.createElement("div");E.style.marginTop="18px";E.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";E.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&&E.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(z){if(z.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=z.docs;var G=z.docs[0].url;"application/mxe"==z.docs[0].mimeType||null!=z.docs[0].mimeType&&
"application/vnd.jgraph."==z.docs[0].mimeType.substring(0,23)?G="https://www.draw.io/#G"+z.docs[0].id:"application/vnd.google-apps.folder"==z.docs[0].mimeType&&(G="https://drive.google.com/#folders/"+z.docs[0].id);B.value=G;B.focus()}else LinkDialog.selectedDocs=null;B.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&y(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 z=b.drive.createLinkPicker();b.linkPicker=z.setCallback(function(G){LinkDialog.filePicked(G)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(z){B.value=z[0].link;B.focus()}})});null!=b.oneDrive&&y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
function(){b.oneDrive.pickFile(function(z,G){B.value=G.value[0].webUrl;B.focus()},!0)});null!=b.gitHub&&y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(z){if(null!=z){z=z.split("/");var G=z[0],F=z[1],U=z[2];z=z.slice(3,z.length).join("/");B.value="https://github.com/"+G+"/"+F+"/blob/"+U+"/"+z;B.focus()}})});null!=b.gitLab&&y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(z){if(null!=z){z=z.split("/");var G=
-z[0],F=z[1],U=z[2];z=z.slice(3,z.length).join("/");B.value=DRAWIO_GITLAB_URL+"/"+G+"/"+F+"/blob/"+U+"/"+z;B.focus()}})});mxEvent.addListener(B,"keypress",function(z){13==z.keyCode&&(b.hideDialog(),c(g.checked?k.value:B.value,LinkDialog.selectedDocs))});E.appendChild(x);b.editor.cancelFirst||E.appendChild(e);C.appendChild(E);this.container=C},FeedbackDialog=function(b,d,e,c){var l=document.createElement("div"),m=document.createElement("div");mxUtils.write(m,mxResources.get("sendYourFeedback"));m.style.fontSize=
-"18px";m.style.marginBottom="18px";l.appendChild(m);m=document.createElement("div");mxUtils.write(m,mxResources.get("yourEmailAddress")+(e?"":" ("+mxResources.get("required")+")"));l.appendChild(m);var t=document.createElement("input");t.setAttribute("type","text");t.style.marginTop="6px";t.style.width="600px";var y=mxUtils.button(mxResources.get("sendMessage"),function(){var J=B.value+(A.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
+z[0],F=z[1],U=z[2];z=z.slice(3,z.length).join("/");B.value=DRAWIO_GITLAB_URL+"/"+G+"/"+F+"/blob/"+U+"/"+z;B.focus()}})});mxEvent.addListener(B,"keypress",function(z){13==z.keyCode&&(b.hideDialog(),c(g.checked?k.value:B.value,LinkDialog.selectedDocs))});E.appendChild(x);b.editor.cancelFirst||E.appendChild(f);C.appendChild(E);this.container=C},FeedbackDialog=function(b,d,f,c){var l=document.createElement("div"),m=document.createElement("div");mxUtils.write(m,mxResources.get("sendYourFeedback"));m.style.fontSize=
+"18px";m.style.marginBottom="18px";l.appendChild(m);m=document.createElement("div");mxUtils.write(m,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(m);var t=document.createElement("input");t.setAttribute("type","text");t.style.marginTop="6px";t.style.width="600px";var y=mxUtils.button(mxResources.get("sendMessage"),function(){var J=B.value+(A.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;J.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(t.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=d?d:"Feedback")+
-":\n"+J),function(f){b.spinner.stop();200<=f.getStatus()&&299>=f.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});y.className="geBtn gePrimaryBtn";if(!e){y.setAttribute("disabled","disabled");var C=/^(([^<>()[\]\\.,;:\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(t,
-"change",function(){0<t.value.length&&0<C.test(t.value)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")});mxEvent.addListener(t,"keyup",function(){0<t.value.length&&C.test(t.value)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")})}l.appendChild(t);this.init=function(){t.focus()};var A=document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;e=document.createElement("p");e.style.marginTop="14px";
-e.appendChild(A);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));e.appendChild(m);mxEvent.addListener(m,"click",function(J){A.checked=!A.checked;mxEvent.consume(J)});l.appendChild(e);m=document.createElement("div");mxUtils.write(m,mxResources.get("feedback"));l.appendChild(m);var B=document.createElement("textarea");B.style.resize="none";B.style.width="600px";B.style.height="140px";B.style.marginTop="6px";B.setAttribute("placeholder",mxResources.get("comments"));
-l.appendChild(B);e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";b.editor.cancelFirst?(e.appendChild(m),e.appendChild(y)):(e.appendChild(y),e.appendChild(m));l.appendChild(e);this.container=l};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(b,d,e){var c=document.createElement("div"),l=document.createElement("h3");l.style.marginTop="0px";mxUtils.write(l,mxResources.get("revisionHistory"));c.appendChild(l);l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.width="170px";l.style.height="378px";c.appendChild(l);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="199px";m.style.width="470px";m.style.height="376px";
+":\n"+J),function(e){b.spinner.stop();200<=e.getStatus()&&299>=e.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});y.className="geBtn gePrimaryBtn";if(!f){y.setAttribute("disabled","disabled");var C=/^(([^<>()[\]\\.,;:\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(t,
+"change",function(){0<t.value.length&&0<C.test(t.value)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")});mxEvent.addListener(t,"keyup",function(){0<t.value.length&&C.test(t.value)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")})}l.appendChild(t);this.init=function(){t.focus()};var A=document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px";
+f.appendChild(A);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(m);mxEvent.addListener(m,"click",function(J){A.checked=!A.checked;mxEvent.consume(J)});l.appendChild(f);m=document.createElement("div");mxUtils.write(m,mxResources.get("feedback"));l.appendChild(m);var B=document.createElement("textarea");B.style.resize="none";B.style.width="600px";B.style.height="140px";B.style.marginTop="6px";B.setAttribute("placeholder",mxResources.get("comments"));
+l.appendChild(B);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";b.editor.cancelFirst?(f.appendChild(m),f.appendChild(y)):(f.appendChild(y),f.appendChild(m));l.appendChild(f);this.container=l};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(b,d,f){var c=document.createElement("div"),l=document.createElement("h3");l.style.marginTop="0px";mxUtils.write(l,mxResources.get("revisionHistory"));c.appendChild(l);l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.width="170px";l.style.height="378px";c.appendChild(l);var m=document.createElement("div");m.style.position="absolute";m.style.border="1px solid lightGray";m.style.left="200px";m.style.width="470px";m.style.height="376px";
m.style.overflow="hidden";var t=document.createElement("div");t.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";m.appendChild(t);mxEvent.disableContextMenu(m);c.appendChild(m);var y=new Graph(m);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var C=0,A=null,B=0,J=y.getGlobalVariable;
-y.getGlobalVariable=function(X){return"page"==X&&null!=A&&null!=A[B]?A[B].getAttribute("name"):"pagenumber"==X?B+1:"pagecount"==X?null!=A?A.length:1:J.apply(this,arguments)};y.getLinkForCell=function(){return null};Editor.MathJaxRender&&y.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(y.container)}));var f={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%"},g=new Spinner(f),k=b.getCurrentFile(),n=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),v={};for(f=0;f<n.length;f++)v[n[f].getAttribute("id")]=n[f];var x=null,E=null,z=null,G=null,F=mxUtils.button("",function(){null!=z&&y.zoomIn()});F.className="geSprite geSprite-zoomin";F.setAttribute("title",mxResources.get("zoomIn"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");
-mxUtils.setOpacity(F,20);var U=mxUtils.button("",function(){null!=z&&y.zoomOut()});U.className="geSprite geSprite-zoomout";U.setAttribute("title",mxResources.get("zoomOut"));U.style.outline="none";U.style.border="none";U.style.margin="2px";U.setAttribute("disabled","disabled");mxUtils.setOpacity(U,20);var p=mxUtils.button("",function(){null!=z&&(y.maxFitScale=8,y.fit(8),y.center())});p.className="geSprite geSprite-fit";p.setAttribute("title",mxResources.get("fit"));p.style.outline="none";p.style.border=
-"none";p.style.margin="2px";p.setAttribute("disabled","disabled");mxUtils.setOpacity(p,20);var u=mxUtils.button("",function(){null!=z&&(y.zoomActual(),y.center())});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin="2px";u.setAttribute("disabled","disabled");mxUtils.setOpacity(u,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 K=m.cloneNode(!1);K.style.pointerEvent="none";m.parentNode.appendChild(K);var N=new Graph(K);N.setTooltips(!1);N.setEnabled(!1);N.setPanning(!0);N.panningHandler.ignoreCell=!0;N.panningHandler.useLeftButtonForPanning=!0;N.minFitScale=null;N.maxFitScale=null;N.centerZoom=!0;mxEvent.addGestureListeners(H,function(X){X=v[A[C].getAttribute("id")];mxUtils.setOpacity(H,20);t.innerText="";null==X?mxUtils.write(t,
-mxResources.get("pageNotFound")):(I.style.display="none",m.style.display="none",K.style.display="",K.style.backgroundColor=m.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,N.getModel()),N.view.scaleAndTranslate(y.view.scale,y.view.translate.x,y.view.translate.y))},null,function(){mxUtils.setOpacity(H,60);t.innerText="";"none"==m.style.display&&(I.style.display="",m.style.display="",K.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 L=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var X=mxUtils.getXml(z.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,Y,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+X)).simulate(document,"_blank"))}});L.className="geBtn";L.setAttribute("disabled","disabled");var Q=mxUtils.button(mxResources.get("restore"),function(X){null!=z&&null!=G&&(mxEvent.isShiftDown(X)?null!=z&&(X=b.getPagesForNode(z.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){k.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(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=e?e(G):b.spinner.spin(document.body,mxResources.get("restoring"))&&k.save(!0,function(Y){b.spinner.stop();b.replaceFileData(G);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
-Q.className="geBtn";Q.setAttribute("disabled","disabled");Q.setAttribute("title","Shift+Click for Diff");var P=document.createElement("select");P.setAttribute("disabled","disabled");P.style.maxWidth="80px";P.style.position="relative";P.style.top="-2px";P.style.verticalAlign="bottom";P.style.marginRight="6px";P.style.display="none";var V=null;mxEvent.addListener(P,"change",function(X){null!=V&&(V(X),mxEvent.consume(X))});var W=mxUtils.button(mxResources.get("edit"),function(){null!=z&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=e&&(W.style.display="none");var q=mxUtils.button(mxResources.get("show"),function(){null!=E&&b.openLink(E.getUrl(P.selectedIndex))});q.className="geBtn gePrimaryBtn";q.setAttribute("disabled","disabled");null!=e&&(q.style.display="none",Q.className="geBtn gePrimaryBtn");n=document.createElement("div");
-n.style.position="absolute";n.style.top="482px";n.style.width="640px";n.style.textAlign="right";var D=document.createElement("div");D.className="geToolbarContainer";D.style.backgroundColor="transparent";D.style.padding="2px";D.style.border="none";D.style.left="199px";D.style.top="442px";var M=null;if(null!=d&&0<d.length){m.style.cursor="move";var T=document.createElement("table");T.style.border="1px solid lightGray";T.style.borderCollapse="collapse";T.style.borderSpacing="0px";T.style.width="100%";
-var O=document.createElement("tbody"),R=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(C=mxUtils.indexOf(b.pages,b.currentPage));for(f=d.length-1;0<=f;f--){var S=function(X){var Y=new Date(X.modifiedDate),aa=null;if(0<=Y.getTime()){var ba=function(Z){g.stop();t.innerText="";var ia=mxUtils.parseXml(Z),ea=b.editor.extractGraphModel(ia.documentElement,!0);if(null!=ea){var va=function(ya){null!=ya&&(ya=za(Editor.parseDiagramNode(ya)));return ya},za=function(ya){var ua=ya.getAttribute("background");
-if(null==ua||""==ua||ua==mxConstants.NONE)ua=y.defaultPageBackgroundColor;m.style.backgroundColor=ua;(new mxCodec(ya.ownerDocument)).decode(ya,y.getModel());y.maxFitScale=1;y.fit(8);y.center();return ya};P.style.display="none";P.innerText="";z=ia;G=Z;A=parseSelectFunction=null;B=0;if("mxfile"==ea.nodeName){ia=ea.getElementsByTagName("diagram");A=[];for(Z=0;Z<ia.length;Z++)A.push(ia[Z]);B=Math.min(C,A.length-1);0<A.length&&va(A[B]);if(1<A.length)for(P.removeAttribute("disabled"),P.style.display="",
-Z=0;Z<A.length;Z++)ia=document.createElement("option"),mxUtils.write(ia,A[Z].getAttribute("name")||mxResources.get("pageWithNumber",[Z+1])),ia.setAttribute("value",Z),Z==B&&ia.setAttribute("selected","selected"),P.appendChild(ia);V=function(){try{var ya=parseInt(P.value);B=C=ya;va(A[ya])}catch(ua){P.value=C,b.handleError(ua)}}}else za(ea);Z=X.lastModifyingUserName;null!=Z&&20<Z.length&&(Z=Z.substring(0,20)+"...");I.innerText="";mxUtils.write(I,(null!=Z?Z+" ":"")+Y.toLocaleDateString()+" "+Y.toLocaleTimeString());
-I.setAttribute("title",aa.getAttribute("title"));F.removeAttribute("disabled");U.removeAttribute("disabled");p.removeAttribute("disabled");u.removeAttribute("disabled");H.removeAttribute("disabled");null!=k&&k.isRestricted()||(b.editor.graph.isEnabled()&&Q.removeAttribute("disabled"),L.removeAttribute("disabled"),q.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(F,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(p,60);mxUtils.setOpacity(u,60);mxUtils.setOpacity(H,60)}else P.style.display=
-"none",P.innerText="",I.innerText="",mxUtils.write(I,mxResources.get("errorLoadingFile")),mxUtils.write(t,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";X==d[d.length-1]?mxUtils.write(da,mxResources.get("current")):Y.toDateString()===R?mxUtils.write(da,Y.toLocaleTimeString()):mxUtils.write(da,Y.toLocaleDateString()+
-" "+Y.toLocaleTimeString());aa.appendChild(da);aa.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(Z){E!=X&&(g.stop(),null!=x&&(x.style.backgroundColor=""),E=X,x=aa,x.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",G=z=null,I.removeAttribute("title"),I.innerText=mxResources.get("loading")+"...",
-m.style.backgroundColor=y.defaultPageBackgroundColor,t.innerText="",y.getModel().clear(),Q.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),mxUtils.setOpacity(F,20),mxUtils.setOpacity(U,
-20),mxUtils.setOpacity(p,20),mxUtils.setOpacity(u,20),mxUtils.setOpacity(H,20),g.spin(m),X.getXml(function(ia){if(E==X)try{ba(ia)}catch(ea){I.innerText=mxResources.get("error")+": "+ea.message}},function(ia){g.stop();P.style.display="none";P.innerText="";I.innerText="";mxUtils.write(I,mxResources.get("errorLoadingFile"));mxUtils.write(t,mxResources.get("errorLoadingFile"))}),mxEvent.consume(Z))});mxEvent.addListener(aa,"dblclick",function(Z){q.click();window.getSelection?window.getSelection().removeAllRanges():
-document.selection&&document.selection.empty();mxEvent.consume(Z)},!1);O.appendChild(aa)}return aa}(d[f]);null!=S&&f==d.length-1&&(M=S)}T.appendChild(O);l.appendChild(T)}else null==k||null==b.drive&&k.constructor==window.DriveFile||null==b.dropbox&&k.constructor==window.DropboxFile?(m.style.display="none",D.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(m.style.display="none",D.style.display="none",mxUtils.write(l,mxResources.get("noRevisions")));this.init=function(){null!=
-M&&M.click()};l=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});l.className="geBtn";D.appendChild(P);D.appendChild(F);D.appendChild(U);D.appendChild(u);D.appendChild(p);D.appendChild(H);b.editor.cancelFirst?(n.appendChild(l),n.appendChild(L),n.appendChild(W),n.appendChild(Q),n.appendChild(q)):(n.appendChild(L),n.appendChild(W),n.appendChild(Q),n.appendChild(q),n.appendChild(l));c.appendChild(n);c.appendChild(D);c.appendChild(I);this.container=c},DraftDialog=function(b,d,e,c,l,
-m,t,y,C){var A=document.createElement("div"),B=document.createElement("div");B.style.marginTop="0px";B.style.whiteSpace="nowrap";B.style.overflow="auto";B.style.lineHeight="normal";mxUtils.write(B,d);A.appendChild(B);var J=document.createElement("select"),f=mxUtils.bind(this,function(){E=mxUtils.parseXml(C[J.value].data);z=b.editor.extractGraphModel(E.documentElement,!0);G=0;this.init()});if(null!=C){J.style.marginLeft="4px";for(d=0;d<C.length;d++){var g=document.createElement("option");g.setAttribute("value",
-d);var k=new Date(C[d].created),n=new Date(C[d].modified);mxUtils.write(g,k.toLocaleDateString()+" "+k.toLocaleTimeString()+" - "+(k.toDateString(),n.toDateString(),n.toLocaleDateString())+" "+n.toLocaleTimeString());J.appendChild(g)}B.appendChild(J);mxEvent.addListener(J,"change",f)}null==e&&(e=C[0].data);var v=document.createElement("div");v.style.position="absolute";v.style.border="1px solid lightGray";v.style.marginTop="10px";v.style.left="40px";v.style.right="40px";v.style.top="46px";v.style.bottom=
-"74px";v.style.overflow="hidden";mxEvent.disableContextMenu(v);A.appendChild(v);var x=new Graph(v);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var E=mxUtils.parseXml(e),z=b.editor.extractGraphModel(E.documentElement,!0),G=0,F=null,U=x.getGlobalVariable;x.getGlobalVariable=function(u){return"page"==u&&null!=F&&null!=F[G]?F[G].getAttribute("name"):"pagenumber"==u?G+1:"pagecount"==u?
-null!=F?F.length:1:U.apply(this,arguments)};x.getLinkForCell=function(){return null};e=mxUtils.button("",function(){x.zoomIn()});e.className="geSprite geSprite-zoomin";e.setAttribute("title",mxResources.get("zoomIn"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);B=mxUtils.button("",function(){x.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.outline="none";B.style.border="none";B.style.margin=
-"2px";mxUtils.setOpacity(B,60);d=mxUtils.button("",function(){x.maxFitScale=8;x.fit(8);x.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);g=mxUtils.button("",function(){x.zoomActual();x.center()});g.className="geSprite geSprite-actualsize";g.setAttribute("title",mxResources.get("actualSize"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,
-60);t=mxUtils.button(t||mxResources.get("discard"),function(){l.apply(this,[J.value,mxUtils.bind(this,function(){null!=J.parentNode&&(J.options[J.selectedIndex].parentNode.removeChild(J.options[J.selectedIndex]),0<J.options.length?(J.value=J.options[0].value,f()):b.hideDialog(!0))})])});t.className="geBtn";var p=document.createElement("select");p.style.maxWidth="80px";p.style.position="relative";p.style.top="-2px";p.style.verticalAlign="bottom";p.style.marginRight="6px";p.style.display="none";m=mxUtils.button(m||
-mxResources.get("edit"),function(){c.apply(this,[J.value])});m.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.right="40px";k.style.textAlign="right";n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function u(I){if(null!=I){var L=I.getAttribute("background");if(null==
-L||""==L||L==mxConstants.NONE)L=Editor.isDarkMode()?"transparent":"#ffffff";v.style.backgroundColor=L;(new mxCodec(I.ownerDocument)).decode(I,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return I}function H(I){null!=I&&(I=u(Editor.parseDiagramNode(I)));return I}mxEvent.addListener(p,"change",function(I){G=parseInt(p.value);H(F[G]);mxEvent.consume(I)});if("mxfile"==z.nodeName){var K=z.getElementsByTagName("diagram");F=[];for(var N=0;N<K.length;N++)F.push(K[N]);0<F.length&&H(F[G]);p.innerText=
-"";if(1<F.length)for(p.style.display="",N=0;N<F.length;N++)K=document.createElement("option"),mxUtils.write(K,F[N].getAttribute("name")||mxResources.get("pageWithNumber",[N+1])),K.setAttribute("value",N),N==G&&K.setAttribute("selected","selected"),p.appendChild(K);else p.style.display="none"}else u(z)};n.appendChild(p);n.appendChild(e);n.appendChild(B);n.appendChild(g);n.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.className="geBtn";y=null!=y?mxUtils.button(mxResources.get("ignore"),
-y):null;null!=y&&(y.className="geBtn");b.editor.cancelFirst?(k.appendChild(e),null!=y&&k.appendChild(y),k.appendChild(t),k.appendChild(m)):(k.appendChild(m),k.appendChild(t),null!=y&&k.appendChild(y),k.appendChild(e));A.appendChild(k);A.appendChild(n);this.container=A},FindWindow=function(b,d,e,c,l,m){function t(V,W,q,D){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 T=mxUtils.trim(W[M].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
-" ")).toLowerCase();if(null==V&&(D&&0<=T.indexOf(q)||!D&&T.substring(0,q.length)===q)||null!=V&&V.test(T))return!0}}return!1}function y(){g&&F.value?(L.removeAttribute("disabled"),Q.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));F.value&&G.value?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}function C(V,W,q){N.innerText="";var D=B.model.getDescendants(B.model.getRoot()),M=G.value.toLowerCase(),T=U.checked?new RegExp(M):
-null,O=null;n=null;J!=M&&(J=M,f=null,k=!1);var R=null==f;if(0<M.length){if(k){k=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}V=(S+1)%b.pages.length;f=null;do k=!1,D=b.pages[V],B=b.createTemporaryGraph(B.getStylesheet()),b.updatePageRoot(D),B.model.setRoot(D.root),V=(V+1)%b.pages.length;while(!C(!0,W,q)&&V!=S);f&&(f=null,q?b.editor.graph.model.execute(new SelectPage(b,D)):b.selectPage(D));k=!1;B=b.editor.graph;return C(!0,W,q)}for(X=0;X<D.length;X++){S=B.view.getState(D[X]);
-W&&null!=T&&(R=R||S==f);if(null!=S&&null!=S.cell.value&&(R||null==O)&&(B.model.isVertex(S.cell)||B.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(u.innerHTML=B.sanitizeHtml(B.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([u])):label=B.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Y=0;W&&m&&null!=T&&S==f&&(label=label.substr(v),Y=v);var aa=""==F.value,ba=aa;if(null==T&&(ba&&0<=label.indexOf(M)||!ba&&label.substring(0,M.length)===
-M||aa&&t(T,S.cell,M,ba))||null!=T&&(T.test(label)||aa&&t(T,S.cell,M,ba)))if(m&&(null!=T?(aa=label.match(T),null!=aa&&0<aa.length&&(n=aa[0].toLowerCase(),v=Y+aa.index+n.length)):(n=M,v=n.length)),R){O=S;break}else null==O&&(O=S)}R=R||S==f}}if(null!=O){if(X==D.length&&p.checked)return f=null,k=!0,C(!0,W,q);f=O;B.scrollCellToVisible(f.cell);B.isEnabled()&&!B.isCellLocked(f.cell)?q||B.getSelectionCell()==f.cell&&1==B.getSelectionCount()||B.setSelectionCell(f.cell):B.highlightCell(f.cell)}else{if(!V&&
-p.checked)return k=!0,C(!0,W,q);B.isEnabled()&&!q&&B.clearSelection()}g=null!=O;m&&!V&&y();return 0==M.length||null!=O}var A=b.actions.get("findReplace"),B=b.editor.graph,J=null,f=null,g=!1,k=!1,n=null,v=0,x=1,E=document.createElement("div");E.style.userSelect="none";E.style.overflow="hidden";E.style.padding="10px";E.style.height="100%";var z=m?"260px":"200px",G=document.createElement("input");G.setAttribute("placeholder",mxResources.get("find"));G.setAttribute("type","text");G.style.marginTop="4px";
-G.style.marginBottom="6px";G.style.width=z;G.style.fontSize="12px";G.style.borderRadius="4px";G.style.padding="6px";E.appendChild(G);mxUtils.br(E);if(m){var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("replaceWith"));F.setAttribute("type","text");F.style.marginTop="4px";F.style.marginBottom="6px";F.style.width=z;F.style.fontSize="12px";F.style.borderRadius="4px";F.style.padding="6px";E.appendChild(F);mxUtils.br(E);mxEvent.addListener(F,"input",y)}var U=document.createElement("input");
-U.setAttribute("id","geFindWinRegExChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";E.appendChild(U);z=document.createElement("label");z.setAttribute("for","geFindWinRegExChck");E.appendChild(z);mxUtils.write(z,mxResources.get("regularExpression"));E.appendChild(z);z=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");z.style.position="relative";z.style.marginLeft="6px";z.style.top="-1px";E.appendChild(z);mxUtils.br(E);var p=document.createElement("input");p.setAttribute("id",
-"geFindWinAllPagesChck");p.setAttribute("type","checkbox");p.style.marginRight="4px";E.appendChild(p);z=document.createElement("label");z.setAttribute("for","geFindWinAllPagesChck");E.appendChild(z);mxUtils.write(z,mxResources.get("allPages"));E.appendChild(z);var u=document.createElement("div");mxUtils.br(E);z=document.createElement("div");z.style.left="0px";z.style.right="0px";z.style.marginTop="6px";z.style.padding="0 6px 0 6px";z.style.textAlign="center";E.appendChild(z);var H=mxUtils.button(mxResources.get("reset"),
-function(){N.innerText="";G.value="";G.style.backgroundColor="";m&&(F.value="",y());J=f=null;k=!1;G.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";m||z.appendChild(H);var K=mxUtils.button(mxResources.get("find"),function(){try{G.style.backgroundColor=C()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});
-K.setAttribute("title",mxResources.get("find")+" (Enter)");K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";z.appendChild(K);var N=document.createElement("div");N.style.marginTop="10px";if(m){var I=function(V,W,q,D,M){if(null==M||"1"!=M.html)return D=V.toLowerCase().indexOf(W,D),0>D?V:V.substr(0,D)+q+V.substr(D+W.length);var T=V;W=mxUtils.htmlEntities(W);M=[];var O=
--1;for(V=V.replace(/<br>/ig,"\n");-1<(O=V.indexOf("<",O+1));)M.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");D=V.toLowerCase().indexOf(W,D);if(0>D)return T;T=D+W.length;q=mxUtils.htmlEntities(q);V=V.substr(0,D)+q+V.substr(T);for(var R=0,S=0;S<M.length;S++){if(M[S]-R<D)V=V.substr(0,M[S])+O[S]+V.substr(M[S]);else{var X=M[S]-R<T?D+R:M[S]+(q.length-W.length);V=V.substr(0,X)+O[S]+V.substr(X)}R+=O[S].length}return V.replace(/\n/g,"<br>")},L=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=
-n&&null!=f&&F.value){var V=f.cell,W=B.getLabel(V);B.isCellEditable(V)&&B.model.setValue(V,I(W,n,F.value,v-n.length,B.getCurrentCellStyle(V)));G.style.backgroundColor=C(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(q){b.handleError(q)}});L.setAttribute("title",mxResources.get("replFind"));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");z.appendChild(L);mxUtils.br(z);var Q=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=n&&null!=f&&F.value){var V=f.cell,W=B.getLabel(V);B.model.setValue(V,I(W,n,F.value,v-n.length,B.getCurrentCellStyle(V)));L.setAttribute("disabled","disabled");Q.setAttribute("disabled","disabled")}}catch(q){b.handleError(q)}});Q.setAttribute("title",mxResources.get("replace"));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");z.appendChild(Q);var P=mxUtils.button(mxResources.get("replaceAll"),function(){N.innerText="";if(F.value){J=null;var V=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;B.getModel().beginUpdate();try{for(var q=0,D={};C(!1,!0,!0)&&100>q;){var M=f.cell,T=B.getLabel(M),O=D[M.id];if(O&&O.replAllMrk==x&&O.replAllPos>=v)break;D[M.id]={replAllMrk:x,replAllPos:v};B.isCellEditable(M)&&
-(B.model.setValue(M,I(T,n,F.value,v-n.length,B.getCurrentCellStyle(M))),q++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(N,mxResources.get("matchesRepl",[q]))}catch(R){b.handleError(R)}finally{B.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}x++}});P.setAttribute("title",mxResources.get("replaceAll"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow=
-"ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");z.appendChild(P);mxUtils.br(z);z.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";z.appendChild(H);mxUtils.br(z);z.appendChild(N)}else H.style.width=
-"90px",K.style.width="90px";mxEvent.addListener(G,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)A.funct();else if(J!=G.value.toLowerCase()||13==V.keyCode)try{G.style.backgroundColor=C()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){G.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(E,"keydown",function(V){70==V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(A.funct(),mxEvent.consume(V))});
-this.window=new mxWindow(mxResources.get("find")+(m?"/"+mxResources.get("replace"):""),E,d,e,c,l,!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()?(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?p.removeAttribute("disabled"):
-(p.checked=!1,p.setAttribute("disabled","disabled"))):B.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,d,e,c,l,m){var t=b.editor.graph,y=document.createElement("div");y.style.textAlign="center";y.style.userSelect="none";y.style.overflow="hidden";y.style.height="100%";if(m){var C=document.createElement("input");C.setAttribute("id","geFreehandBrush");C.setAttribute("type","checkbox");C.checked=t.freehand.isPerfectFreehandMode();C.style.margin="10px 5px 0px 10px";C.style.float=
-"left";y.appendChild(C);var A=document.createElement("label");A.setAttribute("for","geFreehandBrush");A.style.float="left";A.style.marginTop="10px";y.appendChild(A);mxUtils.write(A,mxResources.get("brush"));y.appendChild(A);mxUtils.br(y);var B=document.createElement("input");B.setAttribute("type","range");B.setAttribute("min","2");B.setAttribute("max","30");B.setAttribute("value",t.freehand.getBrushSize());B.style.width="90%";B.style.visibility="hidden";y.appendChild(B);mxUtils.br(y);A=function(){t.freehand.setPerfectFreehandMode(C.checked);
-B.style.visibility=C.checked?"visible":"hidden"};mxEvent.addListener(C,"change",A);A();mxEvent.addListener(B,"change",function(){t.freehand.setBrushSize(parseInt(this.value))})}var J=mxUtils.button(mxResources.get("startDrawing"),function(){t.freehand.isDrawing()?t.freehand.stopDrawing():t.freehand.startDrawing()});J.setAttribute("title",mxResources.get("startDrawing"));J.style.marginTop=m?"5px":"10px";J.style.width="90%";J.style.boxSizing="border-box";J.style.overflow="hidden";J.style.textOverflow=
-"ellipsis";J.style.textAlign="center";J.className="geBtn gePrimaryBtn";y.appendChild(J);this.window=new mxWindow(mxResources.get("freehand"),y,d,e,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);t.addListener("freehandStateChanged",mxUtils.bind(this,function(){J.innerText="";mxUtils.write(J,mxResources.get(t.freehand.isDrawing()?"stopDrawing":"startDrawing"));var f=document.createElement("span");f.style.opacity="0.7";
-f.style["float"]="right";mxUtils.write(f,"X");J.appendChild(f);J.setAttribute("title",mxResources.get(t.freehand.isDrawing()?"stopDrawing":"startDrawing"));J.className="geBtn"+(t.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){t.freehand.isDrawing()&&t.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,d,e,c,l){var m=b.editor.graph,
-t=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(C,A){if(m.isEnabled()){var B=new FilenameDialog(b,"",mxResources.get("add"),function(J){b.hideDialog();if(null!=J&&0<J.length){J=J.split(" ");for(var f=[],g=0;g<J.length;g++){var k=mxUtils.trim(J[g]);""!=k&&0>mxUtils.indexOf(C,k)&&f.push(k)}0<f.length&&(m.isSelectionEmpty()?A(C.concat(f)):m.addTagsForCells(m.getSelectionCells(),f))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+
-")");b.showDialog(B.container,300,80,!0,!0);B.init()}}),y=t.div;this.window=new mxWindow(mxResources.get("tags"),y,d,e,c,l,!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(){t.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,d,e,c){var l=document.createElement("div");l.style.textAlign=
-"center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("authorizationRequired"));var t="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";d==b.drive?(t=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==b.dropbox?(t=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
-d==b.oneDrive?(t=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==b.gitHub?(t=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):d==b.gitLab?(t=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg",y.style.width="32px"):d==b.trello&&(t=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[t]));var C=document.createElement("input");C.setAttribute("type",
-"checkbox");t=mxUtils.button(mxResources.get("authorize"),function(){c(C.checked)});t.insertBefore(y,t.firstChild);t.style.marginTop="6px";t.className="geBigButton";t.style.fontSize="18px";t.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(t);e&&(e=document.createElement("p"),e.style.marginTop="20px",e.appendChild(C),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberMe")),e.appendChild(m),l.appendChild(e),C.checked=!0,C.defaultChecked=!0,mxEvent.addListener(m,
-"click",function(A){C.checked=!C.checked;mxEvent.consume(A)}));this.container=l},MoreShapesDialog=function(b,d,e){e=null!=e?e:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var m=0;m<b.sidebar.customEntries.length;m++){for(var t=b.sidebar.customEntries[m],y={title:b.getResource(t.title),entries:[]},C=0;C<t.entries.length;C++){var A=t.entries[C];y.entries.push({id:A.id,title:b.getResource(A.title),desc:b.getResource(A.desc),image:A.preview})}l.push(y)}for(m=
-0;m<e.length;m++)if(null==b.sidebar.enabledLibraries)l.push(e[m]);else{y={title:e[m].title,entries:[]};for(C=0;C<e[m].entries.length;C++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,e[m].entries[C].id)&&y.entries.push(e[m].entries[C]);0<y.entries.length&&l.push(y)}e=l;if(d){m=mxUtils.bind(this,function(U){for(var p=0;p<U.length;p++)(function(u){var H=k.cloneNode(!1);H.style.fontWeight="bold";H.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";H.style.padding="6px 0px 6px 20px";mxUtils.write(H,
-u.title);B.appendChild(H);for(var K=0;K<u.entries.length;K++)(function(N){var I=k.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",N.title+" ("+N.id+")");var L=document.createElement("input");L.setAttribute("type","checkbox");L.checked=b.sidebar.isEntryVisible(N.id);L.defaultChecked=L.checked;I.appendChild(L);mxUtils.write(I," "+N.title);B.appendChild(I);var Q=function(P){if(null==
-P||"INPUT"!=mxEvent.getSource(P).nodeName){J.style.textAlign="center";J.style.padding="0px";J.style.color="";J.innerText="";if(null!=N.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,N.desc);J.appendChild(V)}null!=N.imageCallback?N.imageCallback(J):null!=N.image?J.innerHTML+='<img border="0" src="'+N.image+'"/>':null==N.desc&&(J.style.padding="20px",J.style.color=
-"rgb(179, 179, 179)",mxUtils.write(J,mxResources.get("noPreview")));null!=f&&(f.style.backgroundColor="");f=I;f.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=P&&mxEvent.consume(P)}};mxEvent.addListener(I,"click",Q);mxEvent.addListener(I,"dblclick",function(P){L.checked=!L.checked;mxEvent.consume(P)});g.push(function(){return L.checked?N.id:null});0==p&&0==K&&Q()})(u.entries[K])})(U[p])});C=document.createElement("div");C.className="geDialogTitle";mxUtils.write(C,mxResources.get("shapes"));
-C.style.position="absolute";C.style.top="0px";C.style.left="0px";C.style.lineHeight="40px";C.style.height="40px";C.style.right="0px";var B=document.createElement("div"),J=document.createElement("div");B.style.position="absolute";B.style.top="40px";B.style.left="0px";B.style.width="202px";B.style.bottom="60px";B.style.overflow="auto";J.style.position="absolute";J.style.left="202px";J.style.right="0px";J.style.top="40px";J.style.bottom="60px";J.style.overflow="auto";J.style.borderLeft="1px solid rgb(211, 211, 211)";
-J.style.textAlign="center";var f=null,g=[],k=document.createElement("div");k.style.position="relative";k.style.left="0px";k.style.right="0px";m(e);c.style.padding="30px";c.appendChild(C);c.appendChild(B);c.appendChild(J);e=document.createElement("div");e.className="geDialogFooter";e.style.position="absolute";e.style.paddingRight="16px";e.style.color="gray";e.style.left="0px";e.style.right="0px";e.style.bottom="0px";e.style.height="60px";e.style.lineHeight="52px";var n=document.createElement("input");
-n.setAttribute("type","checkbox");n.style.position="relative";n.style.top="1px";n.checked=b.sidebar.sidebarTitles;n.defaultChecked=n.checked;e.appendChild(n);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("labels"));m.style.paddingRight="20px";e.appendChild(m);mxEvent.addListener(m,"click",function(U){n.checked=!n.checked;mxEvent.consume(U)});var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"),
-m.style.paddingRight="20px",m.appendChild(v),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),v.style.position="relative",v.style.top="1px",v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(m,"click",function(U){mxEvent.getSource(U)!=v&&(v.checked=!v.checked,mxEvent.consume(U))}),e.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var U=[],p=0;p<g.length;p++){var u=
-g[p].apply(this,arguments);null!=u&&U.push(u)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(p=mxUtils.indexOf(U,".scratchpad"),null!=b.scratchpad!=(0<=p&&0<U.splice(p,1).length)&&b.toggleScratchpad(),p=mxUtils.indexOf(U,"search"),mxSettings.settings.search=0<=p&&0<U.splice(p,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),v.checked&&mxSettings.save());b.sidebar.showEntries(U.join(";"),v.checked,!0);b.setSidebarTitles(n.checked,v.checked)});C.className="geBtn gePrimaryBtn"}else{var x=
-document.createElement("table");m=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";C=document.createElement("tr");x.style.width="100%";d=document.createElement("td");l=document.createElement("td");t=document.createElement("td");var E=mxUtils.bind(this,function(U,p,u){var H=document.createElement("input");H.type="checkbox";x.appendChild(H);H.checked=b.sidebar.isEntryVisible(u);var K=document.createElement("span");mxUtils.write(K,p);p=document.createElement("div");p.style.display=
-"block";p.appendChild(H);p.appendChild(K);mxEvent.addListener(K,"click",function(N){H.checked=!H.checked;mxEvent.consume(N)});U.appendChild(p);return function(){return H.checked?u:null}});C.appendChild(d);C.appendChild(l);C.appendChild(t);m.appendChild(C);x.appendChild(m);g=[];var z=0;for(m=0;m<e.length;m++)for(C=0;C<e[m].entries.length;C++)z++;var G=[d,l,t],F=0;for(m=0;m<e.length;m++)(function(U){for(var p=0;p<U.entries.length;p++){var u=U.entries[p];g.push(E(G[Math.floor(F/(z/3))],u.title,u.id));
-F++}})(e[m]);c.appendChild(x);e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked=!0,e.appendChild(v),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),e.appendChild(m),mxEvent.addListener(m,"click",function(U){v.checked=!v.checked;mxEvent.consume(U)}));c.appendChild(e);m=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){for(var U=["search"],p=0;p<g.length;p++){var u=g[p].apply(this,arguments);null!=u&&U.push(u)}b.sidebar.showEntries(0<U.length?U.join(";"):"",v.checked);b.hideDialog()});C.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.marginTop="26px";e.style.textAlign="right"}b.editor.cancelFirst?(e.appendChild(m),e.appendChild(C)):(e.appendChild(C),e.appendChild(m));c.appendChild(e);this.container=
-c},PluginsDialog=function(b,d,e,c){function l(){C=!0;if(0==y.length)t.innerText=mxResources.get("noPlugins");else{t.innerText="";for(var k=0;k<y.length;k++){var n=document.createElement("span");n.style.whiteSpace="nowrap";var v=document.createElement("span");v.className="geSprite geSprite-delete";v.style.position="relative";v.style.cursor="pointer";v.style.top="5px";v.style.marginRight="4px";v.style.display="inline-block";n.appendChild(v);mxUtils.write(n,y[k]);t.appendChild(n);mxUtils.br(t);mxEvent.addListener(v,
-"click",function(x){return function(){b.confirm(mxResources.get("delete")+' "'+y[x]+'"?',function(){null!=e&&e(y[x]);y.splice(x,1);l()})}}(k))}}}var m=document.createElement("div"),t=document.createElement("div");t.style.height="180px";t.style.overflow="auto";var y=mxSettings.getPlugins().slice(),C=!1;m.appendChild(t);l();C=!1;var A=mxUtils.button(mxResources.get("add"),null!=d?function(){d(function(k){k&&0>mxUtils.indexOf(y,k)&&y.push(k);l()})}:function(){var k=document.createElement("div"),n=document.createElement("span");
-n.style.marginTop="6px";mxUtils.write(n,mxResources.get("builtinPlugins")+": ");k.appendChild(n);var v=document.createElement("select");v.style.width="150px";for(n=0;n<App.publicPlugin.length;n++){var x=document.createElement("option");mxUtils.write(x,App.publicPlugin[n]);x.value=App.publicPlugin[n];v.appendChild(x)}k.appendChild(v);mxUtils.br(k);mxUtils.br(k);n=mxUtils.button(mxResources.get("custom")+"...",function(){var E=new FilenameDialog(b,"",mxResources.get("add"),function(z){b.hideDialog();
-if(null!=z&&0<z.length){z=z.split(";");for(var G=0;G<z.length;G++){var F=z[G],U=App.pluginRegistry[F];null!=U&&(F=U);0<F.length&&0>mxUtils.indexOf(y,F)&&y.push(F)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(E.container,300,80,!0,!0);E.init()});n.className="geBtn";k=new CustomDialog(b,k,mxUtils.bind(this,function(){var E=App.pluginRegistry[v.value];0>mxUtils.indexOf(y,E)&&(y.push(E),l())}),null,null,null,n);b.showDialog(k.container,360,100,!0,!0)});A.className=
-"geBtn";var B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});B.className="geBtn";var J=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){C?(mxSettings.setPlugins(y),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});J.className="geBtn gePrimaryBtn";var f=document.createElement("div");f.style.marginTop="14px";f.style.textAlign="right";var g=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});
-g.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(g.style.display="none");f.appendChild(g);b.editor.cancelFirst?(c||f.appendChild(B),f.appendChild(A),f.appendChild(J)):(f.appendChild(A),f.appendChild(J),c||f.appendChild(B));m.appendChild(f);this.container=m},CropImageDialog=function(b,d,e,c){function l(){var U=v.checked,p=x.checked,u=g.geometry,H=C.width,K=C.height,N=(300-H)/2,I=(300-K)/2;u.x<N?(u.width-=N-u.x,u.x=N):u.x+u.width>N+H&&(u.width=N+H-u.x,u.x=Math.min(u.x,N+H));u.y<I?(u.height-=
-I-u.y,u.y=I):u.y+u.height>I+K&&(u.height=I+K-u.y,u.y=Math.min(u.y,I+K));var L=(u.x-N)/H*100;H=100-(u.x+u.width-N)/H*100;N=(u.y-I)/K*100;u=100-(u.y+u.height-I)/K*100;return"inset("+mxUtils.format(N)+"% "+mxUtils.format(H)+"% "+mxUtils.format(u)+"% "+mxUtils.format(L)+"%"+(U?" round "+f+"%":p?" round 50%":"")+")"}function m(U){null!=B&&(!0!==U&&(B.model.setGeometry(g,J.clone()),f=5,z.value=f),B.model.setStyle(g,k+l()),B.selectAll(),E.style.visibility=v.checked?"visible":"hidden")}var t=document.createElement("div"),
-y=document.createElement("div");y.style.height="300px";y.style.width="300px";y.style.display="inline-flex";y.style.justifyContent="center";y.style.alignItems="center";y.style.position="absolute";var C=document.createElement("img");C.onload=function(){function U(){B.model.setStyle(g,k+l())}B=new Graph(A);B.autoExtend=!1;B.autoScroll=!1;B.setGridEnabled(!1);B.setEnabled(!0);B.setPanning(!1);B.setConnectable(!1);B.getRubberband().setEnabled(!1);B.graphHandler.allowLivePreview=!1;var p=B.createVertexHandler;
-B.createVertexHandler=function(){var T=p.apply(this,arguments);T.livePreview=!1;return T};if(null!=e)try{if("inset"==e.substring(0,5)){var u=g.geometry,H=C.width,K=C.height,N=(300-H)/2,I=(300-K)/2,L=e.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),Q=parseFloat(L[0]),P=parseFloat(L[1]),V=parseFloat(L[2]),W=parseFloat(L[3]);isFinite(Q)&&isFinite(P)&&isFinite(V)&&isFinite(W)?(u.x=W/100*H+N,u.y=Q/100*K+I,u.width=(100-P)/100*H+N-u.x,u.height=(100-V)/100*K+I-u.y,"round"==L[4]?"50%"==L[5]?x.setAttribute("checked",
-"checked"):(f=parseInt(L[5]),z.value=f,v.setAttribute("checked","checked"),E.style.visibility="visible"):n.setAttribute("checked","checked")):e=null}else e=null}catch(T){}g.style=k+(e?e:l());g.vertex=!0;B.addCell(g,null,null,null,null);B.selectAll();B.addListener(mxEvent.CELLS_MOVED,U);B.addListener(mxEvent.CELLS_RESIZED,U);var q=B.graphHandler.mouseUp,D=B.graphHandler.mouseDown;B.graphHandler.mouseUp=function(){q.apply(this,arguments);A.style.backgroundColor="#fff9"};B.graphHandler.mouseDown=function(){D.apply(this,
-arguments);A.style.backgroundColor=""};B.dblClick=function(){};var M=B.getSelectionModel().changeSelection;B.getSelectionModel().changeSelection=function(){M.call(this,[g],[g])}};C.onerror=function(){C.onload=null;C.src=Editor.errorImage};C.setAttribute("src",d);C.style.maxWidth="300px";C.style.maxHeight="300px";y.appendChild(C);t.appendChild(y);var A=document.createElement("div");A.style.width="300px";A.style.height="300px";A.style.overflow="hidden";A.style.backgroundColor="#fff9";t.appendChild(A);
-var B=null,J=new mxGeometry(100,100,100,100),f=5,g=new mxCell("",J.clone(),""),k="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+d.replace(";base64","")+";clipPath=",n=document.createElement("input");n.setAttribute("type","radio");n.setAttribute("id","croppingRect");n.setAttribute("name","croppingShape");n.setAttribute("checked","checked");n.style.margin="5px";t.appendChild(n);d=document.createElement("label");d.setAttribute("for","croppingRect");mxUtils.write(d,mxResources.get("rectangle"));
-t.appendChild(d);var v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingRounded");v.setAttribute("name","croppingShape");v.style.margin="5px";t.appendChild(v);d=document.createElement("label");d.setAttribute("for","croppingRounded");mxUtils.write(d,mxResources.get("rounded"));t.appendChild(d);var x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingEllipse");x.setAttribute("name","croppingShape");x.style.margin="5px";
-t.appendChild(x);d=document.createElement("label");d.setAttribute("for","croppingEllipse");mxUtils.write(d,mxResources.get("ellipse"));t.appendChild(d);mxEvent.addListener(n,"change",m);mxEvent.addListener(v,"change",m);mxEvent.addListener(x,"change",m);var E=document.createElement("div");E.style.textAlign="center";E.style.visibility="hidden";var z=document.createElement("input");z.setAttribute("type","range");z.setAttribute("min","1");z.setAttribute("max","49");z.setAttribute("value",f);z.setAttribute("title",
-mxResources.get("arcSize"));E.appendChild(z);t.appendChild(E);mxEvent.addListener(z,"change",function(){f=this.value;m(!0)});d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){c(l(),g.geometry.width,g.geometry.height);b.hideDialog()});y.className="geBtn gePrimaryBtn";var G=mxUtils.button(mxResources.get("reset"),function(){c(null,C.width,C.height);b.hideDialog()});G.className="geBtn";var F=document.createElement("div");
-F.style.marginTop="10px";F.style.textAlign="right";b.editor.cancelFirst?(F.appendChild(d),F.appendChild(G),F.appendChild(y)):(F.appendChild(G),F.appendChild(y),F.appendChild(d));t.appendChild(F);this.container=t},EditGeometryDialog=function(b,d){var e=b.editor.graph,c=1==d.length?e.getCellGeometry(d[0]):null,l=document.createElement("div"),m=document.createElement("table"),t=document.createElement("tbody"),y=document.createElement("tr"),C=document.createElement("td"),A=document.createElement("td");
-m.style.paddingLeft="6px";mxUtils.write(C,mxResources.get("relative")+":");var B=document.createElement("input");B.setAttribute("type","checkbox");null!=c&&c.relative&&(B.setAttribute("checked","checked"),B.defaultChecked=!0);this.init=function(){B.focus()};A.appendChild(B);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("left")+":");var J=document.createElement("input");
-J.setAttribute("type","text");J.style.width="100px";J.value=null!=c?c.x:"";A.appendChild(J);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=c?c.y:"";A.appendChild(f);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");
-A=document.createElement("td");mxUtils.write(C,mxResources.get("dx")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c&&null!=c.offset?c.offset.x:"";A.appendChild(g);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("dy")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";
-k.value=null!=c&&null!=c.offset?c.offset.y:"";A.appendChild(k);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("width")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.width:"";A.appendChild(n);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");A=
-document.createElement("td");mxUtils.write(C,mxResources.get("height")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=c?c.height:"";A.appendChild(v);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("rotation")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=
-1==d.length?mxUtils.getValue(e.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";A.appendChild(x);y.appendChild(C);y.appendChild(A);t.appendChild(y);m.appendChild(t);l.appendChild(m);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var E=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();e.getModel().beginUpdate();try{for(var z=0;z<d.length;z++){var G=e.getCellGeometry(d[z]);null!=G&&(G=G.clone(),e.isCellMovable(d[z])&&(G.relative=B.checked,
-0<mxUtils.trim(J.value).length&&(G.x=Number(J.value)),0<mxUtils.trim(f.value).length&&(G.y=Number(f.value)),0<mxUtils.trim(g.value).length&&(null==G.offset&&(G.offset=new mxPoint),G.offset.x=Number(g.value)),0<mxUtils.trim(k.value).length&&(null==G.offset&&(G.offset=new mxPoint),G.offset.y=Number(k.value))),e.isCellResizable(d[z])&&(0<mxUtils.trim(n.value).length&&(G.width=Number(n.value)),0<mxUtils.trim(v.value).length&&(G.height=Number(v.value))),e.getModel().setGeometry(d[z],G));0<mxUtils.trim(x.value).length&&
-e.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[d[z]])}}finally{e.getModel().endUpdate()}});E.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(z){13==z.keyCode&&E.click()});m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";b.editor.cancelFirst?(m.appendChild(c),m.appendChild(E)):(m.appendChild(E),m.appendChild(c));l.appendChild(m);this.container=l},LibraryDialog=function(b,d,e,c,l,m){function t(p){for(p=document.elementFromPoint(p.clientX,
-p.clientY);null!=p&&p.parentNode!=g;)p=p.parentNode;var u=null;if(null!=p){var H=g.firstChild;for(u=0;null!=H&&H!=p;)H=H.nextSibling,u++}return u}function y(p,u,H,K,N,I,L,Q,P){try{if(b.spinner.stop(),null==u||"image/"==u.substring(0,6))if(null==p&&null!=L||null==n[p]){var V=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0==
-X.title.length?"#d0d0d0":""};g.style.backgroundImage="";k.style.display="none";var W=N,q=I;if(N>b.maxImageSize||I>b.maxImageSize){var D=Math.min(1,Math.min(b.maxImageSize/Math.max(1,N)),b.maxImageSize/Math.max(1,I));N*=D;I*=D}W>q?(q=Math.round(100*q/W),W=100):(W=Math.round(100*W/q),q=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!=p){var T=document.createElement("img");T.setAttribute("src",z.convert(p));T.style.width=W+"px";T.style.height=q+"px";T.style.margin="10px";T.style.paddingBottom=Math.floor((100-q)/2)+"px";T.style.paddingLeft=Math.floor((100-W)/2)+"px";M.appendChild(T)}else if(null!=L){var O=b.stringToCells(Graph.decompress(L.xml));0<O.length&&(b.sidebar.createThumb(O,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,Z,ia){mxEvent.addListener(R,"click",function(ea){n[Z]=null;for(var va=0;va<B.length;va++)if(null!=B[va].data&&B[va].data==Z||null!=B[va].xml&&
-null!=ia&&B[va].xml==ia.xml){B.splice(va,1);break}M.parentNode.removeChild(da);0==B.length&&(g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.display="");mxEvent.consume(ea)});mxEvent.addListener(R,"dblclick",function(ea){mxEvent.consume(ea)})})(M,p,L);M.appendChild(R);M.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=
-Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=p?(X={data:p,w:N,h:I,title:P},null!=Q&&(X.aspect=Q),n[p]=T,B.push(X)):null!=L&&(L.aspect="fixed",B.push(L),X=L);mxEvent.addListener(S,"keydown",function(da){13==da.keyCode&&null!=E&&(E(),E=null,mxEvent.consume(da))});V();M.appendChild(S);mxEvent.addListener(S,"mousedown",function(da){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(da)});O=function(da){if(mxClient.IS_IOS||
-mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var Z=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ia){null!=ia&&(X.title=ia,V())},mxResources.get("enterValue"));b.showDialog(Z.container,300,80,!0,!0);Z.init();mxEvent.consume(da)}else if("true"!=S.getAttribute("contentEditable")){null!=E&&(E(),E=null);if(null==X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);E=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;V()};mxEvent.consume(da)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(M,"dblclick",O);g.appendChild(M);mxEvent.addListener(M,"dragstart",function(da){null==p&&null!=L&&(R.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=L.xml&&da.dataTransfer.setData("Text",
-L.xml);v=t(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="";S.style.visibility=""},0)});mxEvent.addListener(M,"dragend",function(da){"hidden"==R.style.visibility&&(R.style.visibility="",S.style.visibility="");v=null;mxUtils.setOpacity(M,100);mxUtils.setPrefixedStyle(M.style,"transform",null)})}else G||(G=!0,b.handleError({message:mxResources.get("fileExists")}));else{N=
-!1;try{if(W=mxUtils.parseXml(p),"mxlibrary"==W.documentElement.nodeName){q=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=q&&0<q.length)for(var Y=0;Y<q.length;Y++)null!=q[Y].xml?y(null,null,0,0,0,0,q[Y]):y(q[Y].data,null,0,0,q[Y].w,q[Y].h,null,"fixed",q[Y].title);N=!0}else if("mxfile"==W.documentElement.nodeName){var aa=W.documentElement.getElementsByTagName("diagram");for(Y=0;Y<aa.length;Y++){q=mxUtils.getTextContent(aa[Y]);O=b.stringToCells(Graph.decompress(q));var ba=b.editor.graph.getBoundingBoxFromGeometry(O);
-y(null,null,0,0,0,0,{xml:q,w:ba.width,h:ba.height})}N=!0}}catch(da){}N||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function C(p){p.dataTransfer.dropEffect=null!=v?"move":"copy";p.stopPropagation();p.preventDefault()}function A(p){p.stopPropagation();p.preventDefault();G=!1;x=t(p);if(null!=v)null!=x&&x<g.children.length?(B.splice(x>v?x-1:x,0,B.splice(v,1)[0]),g.insertBefore(g.children[v],g.children[x])):(B.push(B.splice(v,1)[0]),g.appendChild(g.children[v]));
-else if(0<p.dataTransfer.files.length)b.importFiles(p.dataTransfer.files,0,0,b.maxImageSize,F(p));else if(0<=mxUtils.indexOf(p.dataTransfer.types,"text/uri-list")){var u=decodeURIComponent(p.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(u)||/(\.png)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.svg)($|\?)/i.test(u))&&b.loadImage(u,function(H){y(u,null,0,0,H.width,H.height);g.scrollTop=g.scrollHeight})}p.stopPropagation();p.preventDefault()}var B=[];e=document.createElement("div");
-e.style.height="100%";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.height="40px";e.appendChild(J);mxUtils.write(J,mxResources.get("filename")+":");null==d&&(d=b.defaultLibraryName+".xml");var f=document.createElement("input");f.setAttribute("value",d);f.style.marginRight="20px";f.style.marginLeft="10px";f.style.width="500px";null==l||l.isRenamable()||f.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())f.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?f.select():document.execCommand("selectAll",!1,null)};J.appendChild(f);var g=document.createElement("div");g.style.borderWidth="1px 0px 1px 0px";g.style.borderColor="#d3d3d3";g.style.borderStyle="solid";g.style.marginTop="6px";g.style.overflow="auto";g.style.height="340px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";0==B.length&&Graph.fileSupport&&(g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var k=document.createElement("div");
-k.style.position="absolute";k.style.width="640px";k.style.top="260px";k.style.textAlign="center";k.style.fontSize="22px";k.style.color="#a0c3ff";mxUtils.write(k,mxResources.get("dragImagesHere"));e.appendChild(k);var n={},v=null,x=null,E=null;d=function(p){"true"!=mxEvent.getSource(p).getAttribute("contentEditable")&&null!=E&&(E(),E=null,mxEvent.consume(p))};mxEvent.addListener(g,"mousedown",d);mxEvent.addListener(g,"pointerdown",d);mxEvent.addListener(g,"touchstart",d);var z=new mxUrlConverter,G=
-!1;if(null!=c)for(d=0;d<c.length;d++)J=c[d],y(J.data,null,0,0,J.w,J.h,J,J.aspect,J.title);mxEvent.addListener(g,"dragleave",function(p){k.style.cursor="";for(var u=mxEvent.getSource(p);null!=u;){if(u==g||u==k){p.stopPropagation();p.preventDefault();break}u=u.parentNode}});var F=function(p){return function(u,H,K,N,I,L,Q,P,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(W){y(W,H,K,N,I,L,Q,"fixed",mxEvent.isAltDown(p)?
-null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(u,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(y(W.responseText,H,K,N,I,L,Q,"fixed",mxEvent.isAltDown(p)?null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(y(u,H,K,N,I,L,Q,"fixed",mxEvent.isAltDown(p)?null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight)}};mxEvent.addListener(g,"dragover",C);mxEvent.addListener(g,"drop",A);mxEvent.addListener(k,"dragover",C);mxEvent.addListener(k,"drop",A);e.appendChild(g);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&
-c.appendChild(d);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(J=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&l.getPublicUrl(function(p){b.spinner.stop();if(null!=p){var u=b.getSearch("create title mode url drive splash state clibs ui".split(" "));u+=(0==u.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(p);p=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
-"/"+u,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(p.container,450,240,!0);p.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),J.className="geBtn",c.appendChild(J));J=mxUtils.button(mxResources.get("export"),
-function(){var p=b.createLibraryDataFromImages(B),u=f.value;/(\.xml)$/i.test(u)||(u+=".xml");b.isLocalFileSave()?b.saveLocalFile(p,u,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(u)+"&format=xml&xml="+encodeURIComponent(p))).simulate(document,"_blank")});J.setAttribute("id","btnDownload");J.className="geBtn";c.appendChild(J);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");
-U.setAttribute("type","file");mxEvent.addListener(U,"change",function(p){G=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(u,H,K,N,I,L,Q,P,V){null!=U.files&&(F(p)(u,H,K,N,I,L,Q,P,V),U.type="",U.type="file",U.value="")});g.scrollTop=g.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}J=mxUtils.button(mxResources.get("import"),function(){null!=E&&(E(),E=null);b.libDlgFileInputElt.click()});J.setAttribute("id","btnAddImage");J.className="geBtn";c.appendChild(J)}J=
-mxUtils.button(mxResources.get("addImages"),function(){null!=E&&(E(),E=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(p,u,H){G=!1;if(null!=p){if("data:image/"==p.substring(0,11)){var K=p.indexOf(",");0<K&&(p=p.substring(0,K)+";base64,"+p.substring(K+1))}y(p,null,0,0,u,H);g.scrollTop=g.scrollHeight}})});J.setAttribute("id","btnAddImageUrl");J.className="geBtn";c.appendChild(J);this.saveBtnClickHandler=function(p,u,H,K){b.saveLibrary(p,u,H,K)};J=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=E&&(E(),E=null);this.saveBtnClickHandler(f.value,B,l,m)}));J.setAttribute("id","btnSave");J.className="geBtn gePrimaryBtn";c.appendChild(J);b.editor.cancelFirst||c.appendChild(d);e.appendChild(c);this.container=e},EditShapeDialog=function(b,d,e,c,l){c=null!=c?c:300;l=null!=l?l:120;var m=document.createElement("table"),t=document.createElement("tbody");m.style.cellPadding="4px";var y=document.createElement("tr");var C=document.createElement("td");C.setAttribute("colspan",
-"2");C.style.fontSize="10pt";mxUtils.write(C,e);y.appendChild(C);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");var A=document.createElement("textarea");A.style.outline="none";A.style.resize="none";A.style.width=c-200+"px";A.style.height=l+"px";this.textarea=A;this.init=function(){A.focus();A.scrollTop=0};C.appendChild(A);y.appendChild(C);C=document.createElement("td");e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.top=
-"6px";e.style.width="200px";e.style.height=l+4+"px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);C.appendChild(e);var B=new Graph(e);B.setEnabled(!1);var J=b.editor.graph.cloneCell(d);B.addCells([J]);e=B.view.getState(J);var f="";null!=e.shape&&null!=e.shape.stencil&&(f=mxUtils.getPrettyXml(e.shape.stencil.desc));mxUtils.write(A,f||"");e=B.getGraphBounds();l=Math.min(160/e.width,(l-40)/e.height);B.view.scaleAndTranslate(l,20/l-e.x,20/l-e.y);y.appendChild(C);
-t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");C.setAttribute("colspan","2");C.style.paddingTop="2px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),l.className="geBtn",C.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&C.appendChild(l);
-var g=function(k,n,v){var x=A.value,E=mxUtils.parseXml(x);x=mxUtils.getPrettyXml(E.documentElement);E=E.documentElement.getElementsByTagName("parsererror");if(null!=E&&0<E.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(v&&b.hideDialog(),E=!k.model.contains(n),!v||E||x!=f){x=Graph.compress(x);k.getModel().beginUpdate();try{if(E){var z=b.editor.graph.getFreeInsertPoint();n.geometry.x=z.x;n.geometry.y=z.y;k.addCell(n)}k.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+x+")",[n])}catch(G){throw G;}finally{k.getModel().endUpdate()}E&&(k.setSelectionCell(n),k.scrollCellToVisible(n))}};e=mxUtils.button(mxResources.get("preview"),function(){g(B,J,!1)});e.className="geBtn";C.appendChild(e);e=mxUtils.button(mxResources.get("apply"),function(){g(b.editor.graph,d,!0)});e.className="geBtn gePrimaryBtn";C.appendChild(e);b.editor.cancelFirst||C.appendChild(l);y.appendChild(C);t.appendChild(y);m.appendChild(t);this.container=m},CustomDialog=function(b,d,e,c,l,m,
-t,y,C,A,B){var J=document.createElement("div");J.appendChild(d);var f=document.createElement("div");f.style.marginTop="30px";f.style.textAlign="center";null!=t&&f.appendChild(t);b.isOffline()||null==m||(d=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),d.className="geBtn",f.appendChild(d));C=mxUtils.button(C||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});C.className="geBtn";y&&(C.style.display="none");b.editor.cancelFirst&&f.appendChild(C);l=mxUtils.button(l||
-mxResources.get("ok"),mxUtils.bind(this,function(){A||b.hideDialog(null,null,this.container);if(null!=e){var g=e();if("string"===typeof g){b.showError(mxResources.get("error"),g);return}}A&&b.hideDialog(null,null,this.container)}));f.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||f.appendChild(C);if(null!=B)for(y=0;y<B.length;y++)(function(g,k,n){g=mxUtils.button(g,function(v){k(v)});null!=n&&g.setAttribute("title",n);g.className="geBtn";f.appendChild(g)})(B[y][0],B[y][1],B[y][2]);
-J.appendChild(f);this.cancelBtn=C;this.okButton=l;this.container=J},TemplatesDialog=function(b,d,e,c,l,m,t,y,C,A,B,J,f,g,k){function n(ka){Fa.innerText=ka;Fa.style.display="block";setTimeout(function(){Fa.style.display="none"},4E3)}function v(){null!=q&&(q.style.fontWeight="normal",q.style.textDecoration="none",D=q,q=null)}function x(ka,la,qa,Aa,Ca,Ga,Da){if(-1<ka.className.indexOf("geTempDlgRadioBtnActive"))return!1;ka.className+=" geTempDlgRadioBtnActive";P.querySelector(".geTempDlgRadioBtn[data-id="+
-Aa+"]").className="geTempDlgRadioBtn "+(Da?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");P.querySelector("."+la).src="/images/"+qa+"-sel.svg";P.querySelector("."+Ca).src="/images/"+Ga+".svg";return!0}function E(ka,la,qa,Aa){function Ca(ta,Oa){null==Da?(ta=/^https?:\/\//.test(ta)&&!b.editor.isCorsEnabledForUrl(ta)?PROXY_URL+"?url="+encodeURIComponent(ta):TEMPLATE_PATH+"/"+ta,mxUtils.get(ta,mxUtils.bind(this,function(Qa){200<=Qa.getStatus()&&299>=Qa.getStatus()&&(Da=Qa.getText());Oa(Da)}))):Oa(Da)}
-function Ga(ta,Oa,Qa){if(null!=ta&&mxUtils.isAncestorNode(document.body,la)&&(ta=mxUtils.parseXml(ta),ta=Editor.extractGraphModel(ta.documentElement,!0),null!=ta)){"mxfile"==ta.nodeName&&(ta=Editor.parseDiagramNode(ta.getElementsByTagName("diagram")[0]));var Va=new mxCodec(ta.ownerDocument),Ha=new mxGraphModel;Va.decode(ta,Ha);ta=Ha.root.getChildAt(0).children||[];b.sidebar.createTooltip(la,ta,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!=ka.title?mxResources.get(ka.title,null,ka.title):null,!0,new mxPoint(Oa,Qa),!0,null,!0);var La=document.createElement("div");La.className="geTempDlgDialogMask";P.appendChild(La);var Ma=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){La&&(P.removeChild(La),La=null,Ma.apply(this,arguments),b.sidebar.hideTooltip=Ma)};mxEvent.addListener(La,"click",function(){b.sidebar.hideTooltip()})}}var Da=null;if(Ja||b.sidebar.currentElt==
-la)b.sidebar.hideTooltip();else{var xa=function(ta){Ja&&b.sidebar.currentElt==la&&Ga(ta,mxEvent.getClientX(Aa),mxEvent.getClientY(Aa));Ja=!1;qa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=la;Ja=!0;qa.src="/images/aui-wait.gif";ka.isExt?C(ka,xa,function(){n(mxResources.get("cantLoadPrev"));Ja=!1;qa.src="/images/icon-search.svg"}):Ca(ka.url,xa)}}function z(ka,la,qa){if(null!=M){for(var Aa=M.className.split(" "),Ca=0;Ca<Aa.length;Ca++)if(-1<Aa[Ca].indexOf("Active")){Aa.splice(Ca,
-1);break}M.className=Aa.join(" ")}null!=ka?(M=ka,M.className+=" "+la,T=qa,Na.className="geTempDlgCreateBtn"):(T=M=null,Na.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function G(ka,la){if(null!=T){var qa=function(xa){Da.isExternal?C(Da,function(ta){Aa(ta,xa)},Ca):Da.url?mxUtils.get(TEMPLATE_PATH+"/"+Da.url,mxUtils.bind(this,function(ta){200<=ta.getStatus()&&299>=ta.getStatus()?Aa(ta.getText(),xa):Ca()})):Aa(b.emptyDiagramXml,xa)},Aa=function(xa,ta){k||b.hideDialog(!0);d(xa,ta,Da,la)},Ca=function(){n(mxResources.get("cannotLoad"));
-Ga()},Ga=function(){T=Da;Na.className="geTempDlgCreateBtn";la&&(Ka.className="geTempDlgOpenBtn")},Da=T;T=null;"boolean"!==typeof la&&(la=Da.isExternal&&J);1==ka?A(Da.url,Da):la?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",qa()):(Na.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ka=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ka=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),qa,ka,function(xa){var ta=null!=xa&&0<xa.length;return ta&&k?(qa(xa),!1):ta},null,null,null,Ga,g?null:[]),b.showDialog(ka.container,350,80,!0,!0),ka.init())}}function F(ka){Na.innerText=mxResources.get(da||ka?"create":"copy");ka=ka?"none":"";J&&(Ka.style.display=ka);for(var la=P.querySelectorAll(".geTempDlgLinkToDiagram"),qa=0;qa<la.length;qa++)la[qa].style.display=ka}function U(ka,la,qa,Aa,Ca){Ca||(ia.innerText="",z(),X=ka,Y=Aa);var Ga=null;if(qa){Ga=document.createElement("table");
-Ga.className="geTempDlgDiagramsListGrid";var Da=document.createElement("tr"),xa=document.createElement("th");xa.style.width="50%";xa.innerText=mxResources.get("diagram");Da.appendChild(xa);xa=document.createElement("th");xa.style.width="25%";xa.innerText=mxResources.get("changedBy");Da.appendChild(xa);xa=document.createElement("th");xa.style.width="25%";xa.innerText=mxResources.get("lastModifiedOn");Da.appendChild(xa);Ga.appendChild(Da);ia.appendChild(Ga)}for(Da=0;Da<ka.length;Da++){ka[Da].isExternal=
-!la;var ta=ka[Da].url,Oa=(xa=mxUtils.htmlEntities(la?mxResources.get(ka[Da].title,null,ka[Da].title):ka[Da].title))||ka[Da].url,Qa=ka[Da].imgUrl,Va=ka[Da].changedBy||"",Ha="";ka[Da].lastModifiedOn&&(Ha=b.timeSince(new Date(ka[Da].lastModifiedOn)),null==Ha&&(Ha=mxResources.get("lessThanAMinute")),Ha=mxResources.get("timeAgo",[Ha],"{1} ago"));Qa||(Qa=TEMPLATE_PATH+"/"+ta.substring(0,ta.length-4)+".png");ta=qa?50:15;null!=xa&&xa.length>ta&&(xa=xa.substring(0,ta)+"&hellip;");if(qa){var La=document.createElement("tr");
-Qa=document.createElement("td");var Ma=document.createElement("img");Ma.src="/images/icon-search.svg";Ma.className="geTempDlgDiagramListPreviewBtn";Ma.setAttribute("title",mxResources.get("preview"));Ca||Qa.appendChild(Ma);Oa=document.createElement("span");Oa.className="geTempDlgDiagramTitle";Oa.innerHTML=xa;Qa.appendChild(Oa);La.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Va;La.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Ha;La.appendChild(Qa);Ga.appendChild(La);
-null==M&&(F(la),z(La,"geTempDlgDiagramsListGridActive",ka[Da]));(function(Ia,Ta,Sa){mxEvent.addListener(La,"click",function(){M!=Ta&&(F(la),z(Ta,"geTempDlgDiagramsListGridActive",Ia))});mxEvent.addListener(La,"dblclick",G);mxEvent.addListener(Ma,"click",function(Wa){E(Ia,Ta,Sa,Wa)})})(ka[Da],La,Ma)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",Oa);null==M&&(F(la),z(Pa,"geTempDlgDiagramTileActive",ka[Da]));Va=document.createElement("div");Va.className=
-"geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ia,Ta,Sa){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ia.style.display=""};Ra.onerror=function(){this.src!=Sa?this.src=Sa:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,Va,Qa?Qa.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Ra.src=Qa;Va.appendChild(Ra);Pa.appendChild(Va);Va=document.createElement("div");
-Va.className="geTempDlgDiagramTileLbl";Va.innerHTML=null!=xa?xa:"";Pa.appendChild(Va);Ma=document.createElement("img");Ma.src="/images/icon-search.svg";Ma.className="geTempDlgDiagramPreviewBtn";Ma.setAttribute("title",mxResources.get("preview"));Ca||Pa.appendChild(Ma);(function(Ia,Ta,Sa){mxEvent.addListener(Pa,"click",function(){M!=Ta&&(F(la),z(Ta,"geTempDlgDiagramTileActive",Ia))});mxEvent.addListener(Pa,"dblclick",G);mxEvent.addListener(Ma,"click",function(Wa){E(Ia,Ta,Sa,Wa)})})(ka[Da],Pa,Ma);ia.appendChild(Pa)}}for(var Ua in Aa)ka=
-Aa[Ua],0<ka.length&&(Ca=document.createElement("div"),Ca.className="geTempDlgImportCat",Ca.innerText=mxResources.get(Ua,null,Ua),ia.appendChild(Ca),U(ka,la,qa,null,!0))}function p(ka,la){ca.innerText="";z();var qa=Math.floor(ca.offsetWidth/150)-1;la=!la&&ka.length>qa?qa:ka.length;for(var Aa=0;Aa<la;Aa++){var Ca=ka[Aa];Ca.isCategory=!0;var Ga=document.createElement("div"),Da=mxResources.get(Ca.title);null==Da&&(Da=Ca.title.substring(0,1).toUpperCase()+Ca.title.substring(1));Ga.className="geTempDlgNewDiagramCatItem";
-Ga.setAttribute("title",Da);Da=mxUtils.htmlEntities(Da);15<Da.length&&(Da=Da.substring(0,15)+"&hellip;");null==M&&(F(!0),z(Ga,"geTempDlgNewDiagramCatItemActive",Ca));var xa=document.createElement("div");xa.className="geTempDlgNewDiagramCatItemImg";var ta=document.createElement("img");ta.src=NEW_DIAGRAM_CATS_PATH+"/"+Ca.img;xa.appendChild(ta);Ga.appendChild(xa);xa=document.createElement("div");xa.className="geTempDlgNewDiagramCatItemLbl";xa.innerHTML=Da;Ga.appendChild(xa);ca.appendChild(Ga);(function(Oa,
-Qa){mxEvent.addListener(Ga,"click",function(){M!=Qa&&(F(!0),z(Qa,"geTempDlgNewDiagramCatItemActive",Oa))});mxEvent.addListener(Ga,"dblclick",G)})(Ca,Ga)}Ga=document.createElement("div");Ga.className="geTempDlgNewDiagramCatItem";Da=mxResources.get("showAllTemps");Ga.setAttribute("title",Da);xa=document.createElement("div");xa.className="geTempDlgNewDiagramCatItemImg";xa.innerText="...";xa.style.fontSize="32px";Ga.appendChild(xa);xa=document.createElement("div");xa.className="geTempDlgNewDiagramCatItemLbl";
-xa.innerText=Da;Ga.appendChild(xa);ca.appendChild(Ga);mxEvent.addListener(Ga,"click",function(){function Oa(){var Va=Qa.querySelector(".geTemplateDrawioCatLink");null!=Va?Va.click():setTimeout(Oa,200)}da=!0;var Qa=P.querySelector(".geTemplatesList");Qa.style.display="block";za.style.width="";Ba.style.display="";Ba.value="";aa=null;Oa()});Z.style.display=ka.length<=qa?"none":""}function u(ka,la,qa){function Aa(Ra,Ua){var Ia=mxResources.get(Ra);null==Ia&&(Ia=Ra.substring(0,1).toUpperCase()+Ra.substring(1));
-Ra=Ia+" ("+Ua.length+")";var Ta=Ia=mxUtils.htmlEntities(Ia);15<Ia.length&&(Ia=Ia.substring(0,15)+"&hellip;");return{lbl:Ia+" ("+Ua.length+")",fullLbl:Ra,lblOnly:Ta}}function Ca(Ra,Ua,Ia,Ta,Sa){mxEvent.addListener(Ia,"click",function(){q!=Ia&&(null!=q?(q.style.fontWeight="normal",q.style.textDecoration="none"):(ua.style.display="none",ya.style.minHeight="100%"),q=Ia,q.style.fontWeight="bold",q.style.textDecoration="underline",za.scrollTop=0,V&&(W=!0),ea.innerHTML=Ua,va.style.display="none",U(Sa?la[Ra]:
-Ta?wa[Ra][Ta]:ka[Ra],Sa?!1:!0))})}var Ga=P.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"));Ga.appendChild(qa);for(var Da in la){qa=document.createElement("div");var xa=la[Da];xa=Aa(Da,xa);qa.className="geTemplateCatLink";qa.setAttribute("title",xa.fullLbl);qa.innerHTML=xa.lbl;Ga.appendChild(qa);Ca(Da,xa.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");Ga.appendChild(qa)}for(Da in ka){var ta=wa[Da],Oa=qa=document.createElement(ta?"ul":"div");xa=ka[Da];xa=Aa(Da,xa);if(null!=ta){var Qa=document.createElement("li"),Va=document.createElement("div");Va.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Va.style.padding="0";Va.setAttribute("title",xa.fullLbl);
-Va.innerHTML=xa.lbl;Oa=Va;Qa.appendChild(Va);var Ha=document.createElement("ul");Ha.className="geTempTreeNested";Ha.style.visibility="hidden";for(var La in ta){var Ma=document.createElement("li"),Pa=Aa(La,ta[La]);Ma.setAttribute("title",Pa.fullLbl);Ma.innerHTML=Pa.lbl;Ma.className="geTemplateCatLink";Ma.style.padding="0";Ma.style.margin="0";Ca(Da,Pa.lblOnly,Ma,La);Ha.appendChild(Ma)}Qa.appendChild(Ha);qa.className="geTempTree";qa.appendChild(Qa);(function(Ra,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ia=
-Ra.querySelectorAll("li"),Ta=0;Ta<Ia.length;Ta++)Ia[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Sa=0;Sa<Ia.length;Sa++)Ia[Sa].style.margin="0";Ra.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ha,Va)}else qa.className="geTemplateCatLink geTemplateDrawioCatLink",qa.setAttribute("title",xa.fullLbl),qa.innerHTML=xa.lbl;Ga.appendChild(qa);Ca(Da,xa.lblOnly,
-Oa)}}function H(){mxUtils.get(c,function(ka){if(!ra){ra=!0;ka=ka.getXml().documentElement.firstChild;for(var la={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("clibs"==ka.nodeName){for(var qa=ka.getAttribute("name"),Aa=ka.getElementsByTagName("add"),Ca=[],Ga=0;Ga<Aa.length;Ga++)Ca.push(encodeURIComponent(mxUtils.getTextContent(Aa[Ga])));null!=qa&&0<Ca.length&&(la[qa]=Ca.join(";"))}else if(Ca=ka.getAttribute("url"),null!=Ca){Aa=ka.getAttribute("section");qa=ka.getAttribute("subsection");
-if(null==Aa&&(Ga=Ca.indexOf("/"),Aa=Ca.substring(0,Ga),null==qa)){var Da=Ca.indexOf("/",Ga+1);-1<Da&&(qa=Ca.substring(Ga+1,Da))}Ga=fa[Aa];null==Ga&&(sa++,Ga=[],fa[Aa]=Ga);Ca=ka.getAttribute("clibs");null!=la[Ca]&&(Ca=la[Ca]);Ca={url:ka.getAttribute("url"),libs:ka.getAttribute("libs"),title:ka.getAttribute("title")||ka.getAttribute("name"),preview:ka.getAttribute("preview"),clibs:Ca,tags:ka.getAttribute("tags")};Ga.push(Ca);null!=qa&&(Ga=wa[Aa],null==Ga&&(Ga={},wa[Aa]=Ga),Aa=Ga[qa],null==Aa&&(Aa=[],
-Ga[qa]=Aa),Aa.push(Ca))}ka=ka.nextSibling}u(fa,ja,oa)}})}function K(ka){t&&(za.scrollTop=0,ia.innerText="",na.spin(ia),W=!1,V=!0,ea.innerText=mxResources.get("recentDiag"),aa=null,t(pa,function(){n(mxResources.get("cannotLoad"));pa([])},ka?null:m))}function N(ka){if(""==ka)null!=D&&(D.click(),D=null);else{if(null==TemplatesDialog.tagsList[c]){var la={};for(Oa in fa)for(var qa=fa[Oa],Aa=0;Aa<qa.length;Aa++){var Ca=qa[Aa];if(null!=Ca.tags)for(var Ga=Ca.tags.toLowerCase().split(";"),Da=0;Da<Ga.length;Da++)null==
-la[Ga[Da]]&&(la[Ga[Da]]=[]),la[Ga[Da]].push(Ca)}TemplatesDialog.tagsList[c]=la}var xa=ka.toLowerCase().split(" ");la=TemplatesDialog.tagsList[c];if(0<oa&&null==la.__tagsList__){for(Oa in ja)for(qa=ja[Oa],Aa=0;Aa<qa.length;Aa++)for(Ca=qa[Aa],Ga=Ca.title.split(" "),Ga.push(Oa),Da=0;Da<Ga.length;Da++){var ta=Ga[Da].toLowerCase();null==la[ta]&&(la[ta]=[]);la[ta].push(Ca)}la.__tagsList__=!0}var Oa=[];qa={};for(Aa=Ga=0;Aa<xa.length;Aa++)if(0<xa[Aa].length){ta=la[xa[Aa]];var Qa={};Oa=[];if(null!=ta)for(Da=
-0;Da<ta.length;Da++)Ca=ta[Da],0==Ga==(null==qa[Ca.url])&&(Qa[Ca.url]=!0,Oa.push(Ca));qa=Qa;Ga++}0==Oa.length?ea.innerText=mxResources.get("noResultsFor",[ka]):U(Oa,!0)}}function I(ka){if(aa!=ka||R!=ba)v(),za.scrollTop=0,ia.innerText="",ea.innerText=mxResources.get("searchResults")+' "'+ka+'"',Ea=null,da?N(ka):y&&(ka?(na.spin(ia),W=!1,V=!0,y(ka,pa,function(){n(mxResources.get("searchFailed"));pa([])},R?null:m)):K(R)),aa=ka,ba=R}function L(ka){null!=Ea&&clearTimeout(Ea);13==ka.keyCode?I(Ba.value):Ea=
-setTimeout(function(){I(Ba.value)},1E3)}var Q='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(y?"":'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>'+
+y.getGlobalVariable=function(X){return"page"==X&&null!=A&&null!=A[B]?A[B].getAttribute("name"):"pagenumber"==X?B+1:"pagecount"==X?null!=A?A.length:1:J.apply(this,arguments)};y.getLinkForCell=function(){return null};Editor.MathJaxRender&&y.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(y.container)}));var e={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%"},g=new Spinner(e),k=b.getCurrentFile(),q=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),u={};for(e=0;e<q.length;e++)u[q[e].getAttribute("id")]=q[e];var x=null,E=null,z=null,G=null,F=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=z&&y.zoomIn()},20);F.setAttribute("disabled","disabled");var U=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=z&&
+y.zoomOut()},20);U.setAttribute("disabled","disabled");var p=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=z&&(1==y.view.scale?(y.maxFitScale=8,y.fit(8)):y.zoomActual(),y.center())},20);p.setAttribute("disabled","disabled");var v=b.createToolbarButton(Editor.compareImage,mxResources.get("zoomOut"),null,20);v.setAttribute("disabled","disabled");var H=m.cloneNode(!1);H.style.pointerEvent="none";m.parentNode.appendChild(H);var K=new Graph(H);K.setTooltips(!1);K.setEnabled(!1);
+K.setPanning(!0);K.panningHandler.ignoreCell=!0;K.panningHandler.useLeftButtonForPanning=!0;K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;var N=document.createElement("div");N.style.position="absolute";N.style.textAlign="left";N.style.color="gray";N.style.marginTop="8px";N.style.backgroundColor="transparent";N.style.top="440px";N.style.left="32px";N.style.maxWidth="380px";N.style.cursor="default";var I=null;mxEvent.addGestureListeners(v,function(X){X=u[A[C].getAttribute("id")];mxUtils.setOpacity(v,
+20);t.innerText="";null==X?mxUtils.write(t,mxResources.get("pageNotFound")):(I=N.innerHTML,N.innerHTML=mxResources.get("current"),m.style.display="none",H.style.display="",H.style.backgroundColor=m.style.backgroundColor,X=Editor.parseDiagramNode(X),(new mxCodec(X.ownerDocument)).decode(X,K.getModel()),K.view.scaleAndTranslate(y.view.scale,y.view.translate.x,y.view.translate.y))},null,function(){mxUtils.setOpacity(v,60);t.innerText="";"none"==m.style.display&&(m.style.display="",N.innerHTML=I,H.style.display=
+"none")});var L=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var X=mxUtils.getXml(z.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(X,Y,"text/xml"):(X="undefined"===typeof pako?"&xml="+encodeURIComponent(X):"&data="+encodeURIComponent(Graph.compress(X)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+X)).simulate(document,"_blank"))}});L.className="geBtn";L.setAttribute("disabled","disabled");var Q=mxUtils.button(mxResources.get("restore"),
+function(X){null!=z&&null!=G&&(mxEvent.isShiftDown(X)?null!=z&&(X=b.getPagesForNode(z.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(X,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){k.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(X.container,620,460,!0,!0),X.init()):b.confirm(mxResources.get("areYouSure"),
+function(){null!=f?f(G):b.spinner.spin(document.body,mxResources.get("restoring"))&&k.save(!0,function(Y){b.spinner.stop();b.replaceFileData(G);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});Q.className="geBtn";Q.setAttribute("disabled","disabled");Q.setAttribute("title","Shift+Click for Diff");var P=document.createElement("select");P.setAttribute("disabled","disabled");P.style.userSelect="none";P.style.maxWidth=
+"100px";P.style.position="relative";P.style.top="-2px";P.style.verticalAlign="bottom";P.style.marginLeft="10px";P.style.display="none";var V=null;mxEvent.addListener(P,"change",function(X){null!=V&&(V(X),mxEvent.consume(X))});var W=mxUtils.button(mxResources.get("edit"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");
+null!=f&&(W.style.display="none");var n=mxUtils.button(mxResources.get("show"),function(){null!=E&&b.openLink(E.getUrl(P.selectedIndex))});n.className="geBtn gePrimaryBtn";n.setAttribute("disabled","disabled");null!=f&&(n.style.display="none",Q.className="geBtn gePrimaryBtn");q=document.createElement("div");q.style.position="absolute";q.style.top="482px";q.style.right="28px";q.style.left="32px";q.style.textAlign="right";var D=document.createElement("div");D.className="geToolbarContainer";D.style.backgroundColor=
+"transparent";D.style.padding="2px";D.style.border="none";D.style.top="442px";D.style.right="28px";var M=null;if(null!=d&&0<d.length){m.style.cursor="move";var T=document.createElement("table");T.style.border="1px solid lightGray";T.style.borderCollapse="collapse";T.style.borderSpacing="0px";T.style.width="100%";var O=document.createElement("tbody"),R=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(C=mxUtils.indexOf(b.pages,b.currentPage));for(e=d.length-1;0<=e;e--){var S=function(X){var Y=
+new Date(X.modifiedDate),aa=null;if(0<=Y.getTime()){var ba=function(Z){g.stop();t.innerText="";var ia=mxUtils.parseXml(Z),ea=b.editor.extractGraphModel(ia.documentElement,!0);if(null!=ea){var va=function(ya){null!=ya&&(ya=za(Editor.parseDiagramNode(ya)));return ya},za=function(ya){var ua=ya.getAttribute("background");if(null==ua||""==ua||ua==mxConstants.NONE)ua=y.defaultPageBackgroundColor;m.style.backgroundColor=ua;(new mxCodec(ya.ownerDocument)).decode(ya,y.getModel());y.maxFitScale=1;y.fit(8);
+y.center();return ya};P.style.display="none";P.innerText="";z=ia;G=Z;A=parseSelectFunction=null;B=0;if("mxfile"==ea.nodeName){ia=ea.getElementsByTagName("diagram");A=[];for(Z=0;Z<ia.length;Z++)A.push(ia[Z]);B=Math.min(C,A.length-1);0<A.length&&va(A[B]);if(1<A.length)for(P.removeAttribute("disabled"),P.style.display="",Z=0;Z<A.length;Z++)ia=document.createElement("option"),mxUtils.write(ia,A[Z].getAttribute("name")||mxResources.get("pageWithNumber",[Z+1])),ia.setAttribute("value",Z),Z==B&&ia.setAttribute("selected",
+"selected"),P.appendChild(ia);V=function(){try{var ya=parseInt(P.value);B=C=ya;va(A[ya])}catch(ua){P.value=C,b.handleError(ua)}}}else za(ea);Z=X.lastModifyingUserName;null!=Z&&20<Z.length&&(Z=Z.substring(0,20)+"...");N.innerText="";mxUtils.write(N,(null!=Z?Z+" ":"")+Y.toLocaleDateString()+" "+Y.toLocaleTimeString());N.setAttribute("title",aa.getAttribute("title"));F.removeAttribute("disabled");U.removeAttribute("disabled");p.removeAttribute("disabled");v.removeAttribute("disabled");null!=k&&k.isRestricted()||
+(b.editor.graph.isEnabled()&&Q.removeAttribute("disabled"),L.removeAttribute("disabled"),n.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(F,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(p,60);mxUtils.setOpacity(v,60)}else P.style.display="none",P.innerText="",N.innerText="",t.innerText="",mxUtils.write(N,mxResources.get("errorLoadingFile")),mxUtils.write(t,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";X==d[d.length-1]?mxUtils.write(da,mxResources.get("current")):Y.toDateString()===R?mxUtils.write(da,Y.toLocaleTimeString()):mxUtils.write(da,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());aa.appendChild(da);aa.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?
+" "+X.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(Z){E!=X&&(g.stop(),null!=x&&(x.style.backgroundColor=""),E=X,x=aa,x.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",G=z=null,N.removeAttribute("title"),N.innerText=mxResources.get("loading")+"...",m.style.backgroundColor=y.defaultPageBackgroundColor,t.innerText="",y.getModel().clear(),Q.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),U.setAttribute("disabled",
+"disabled"),p.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),mxUtils.setOpacity(F,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(p,20),mxUtils.setOpacity(v,20),g.spin(m),X.getXml(function(ia){if(E==X)try{ba(ia)}catch(ea){N.innerText=mxResources.get("error")+": "+ea.message}},function(ia){g.stop();P.style.display="none";P.innerText="";N.innerText="";mxUtils.write(N,
+mxResources.get("errorLoadingFile"));mxUtils.write(t,mxResources.get("errorLoadingFile"))}),mxEvent.consume(Z))});mxEvent.addListener(aa,"dblclick",function(Z){n.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(Z)},!1);O.appendChild(aa)}return aa}(d[e]);null!=S&&e==d.length-1&&(M=S)}T.appendChild(O);l.appendChild(T)}else null==k||null==b.drive&&k.constructor==window.DriveFile||null==b.dropbox&&k.constructor==window.DropboxFile?
+(m.style.display="none",D.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(m.style.display="none",D.style.display="none",mxUtils.write(l,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};l=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});l.className="geBtn";D.appendChild(v);D.appendChild(U);D.appendChild(p);D.appendChild(F);D.appendChild(P);b.editor.cancelFirst?(q.appendChild(l),q.appendChild(L),q.appendChild(W),q.appendChild(Q),q.appendChild(n)):
+(q.appendChild(L),q.appendChild(W),q.appendChild(Q),q.appendChild(n),q.appendChild(l));c.appendChild(q);c.appendChild(D);c.appendChild(N);this.container=c},DraftDialog=function(b,d,f,c,l,m,t,y,C){var A=document.createElement("div"),B=document.createElement("div");B.style.marginTop="0px";B.style.whiteSpace="nowrap";B.style.overflow="auto";B.style.lineHeight="normal";mxUtils.write(B,d);A.appendChild(B);var J=document.createElement("select"),e=mxUtils.bind(this,function(){E=mxUtils.parseXml(C[J.value].data);
+z=b.editor.extractGraphModel(E.documentElement,!0);G=0;this.init()});if(null!=C){J.style.marginLeft="4px";for(d=0;d<C.length;d++){var g=document.createElement("option");g.setAttribute("value",d);var k=new Date(C[d].created),q=new Date(C[d].modified);mxUtils.write(g,k.toLocaleDateString()+" "+k.toLocaleTimeString()+" - "+(k.toDateString(),q.toDateString(),q.toLocaleDateString())+" "+q.toLocaleTimeString());J.appendChild(g)}B.appendChild(J);mxEvent.addListener(J,"change",e)}null==f&&(f=C[0].data);var u=
+document.createElement("div");u.style.position="absolute";u.style.border="1px solid lightGray";u.style.marginTop="10px";u.style.left="40px";u.style.right="40px";u.style.top="46px";u.style.bottom="74px";u.style.overflow="hidden";mxEvent.disableContextMenu(u);A.appendChild(u);var x=new Graph(u);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var E=mxUtils.parseXml(f),z=b.editor.extractGraphModel(E.documentElement,
+!0),G=0,F=null,U=x.getGlobalVariable;x.getGlobalVariable=function(v){return"page"==v&&null!=F&&null!=F[G]?F[G].getAttribute("name"):"pagenumber"==v?G+1:"pagecount"==v?null!=F?F.length:1:U.apply(this,arguments)};x.getLinkForCell=function(){return null};f=mxUtils.button("",function(){x.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);B=mxUtils.button("",function(){x.zoomOut()});
+B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.outline="none";B.style.border="none";B.style.margin="2px";mxUtils.setOpacity(B,60);d=mxUtils.button("",function(){x.maxFitScale=8;x.fit(8);x.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);g=mxUtils.button("",function(){x.zoomActual();x.center()});g.className="geSprite geSprite-actualsize";
+g.setAttribute("title",mxResources.get("actualSize"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);t=mxUtils.button(t||mxResources.get("discard"),function(){l.apply(this,[J.value,mxUtils.bind(this,function(){null!=J.parentNode&&(J.options[J.selectedIndex].parentNode.removeChild(J.options[J.selectedIndex]),0<J.options.length?(J.value=J.options[0].value,e()):b.hideDialog(!0))})])});t.className="geBtn";var p=document.createElement("select");p.style.maxWidth=
+"80px";p.style.position="relative";p.style.top="-2px";p.style.verticalAlign="bottom";p.style.marginRight="6px";p.style.display="none";m=mxUtils.button(m||mxResources.get("edit"),function(){c.apply(this,[J.value])});m.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.right="40px";k.style.textAlign="right";q=document.createElement("div");q.className="geToolbarContainer";q.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function v(I){if(null!=I){var L=I.getAttribute("background");if(null==L||""==L||L==mxConstants.NONE)L=Editor.isDarkMode()?"transparent":"#ffffff";u.style.backgroundColor=L;(new mxCodec(I.ownerDocument)).decode(I,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return I}function H(I){null!=I&&(I=v(Editor.parseDiagramNode(I)));return I}mxEvent.addListener(p,"change",function(I){G=parseInt(p.value);H(F[G]);mxEvent.consume(I)});if("mxfile"==z.nodeName){var K=z.getElementsByTagName("diagram");
+F=[];for(var N=0;N<K.length;N++)F.push(K[N]);0<F.length&&H(F[G]);p.innerText="";if(1<F.length)for(p.style.display="",N=0;N<F.length;N++)K=document.createElement("option"),mxUtils.write(K,F[N].getAttribute("name")||mxResources.get("pageWithNumber",[N+1])),K.setAttribute("value",N),N==G&&K.setAttribute("selected","selected"),p.appendChild(K);else p.style.display="none"}else v(z)};q.appendChild(p);q.appendChild(f);q.appendChild(B);q.appendChild(g);q.appendChild(d);f=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});f.className="geBtn";y=null!=y?mxUtils.button(mxResources.get("ignore"),y):null;null!=y&&(y.className="geBtn");b.editor.cancelFirst?(k.appendChild(f),null!=y&&k.appendChild(y),k.appendChild(t),k.appendChild(m)):(k.appendChild(m),k.appendChild(t),null!=y&&k.appendChild(y),k.appendChild(f));A.appendChild(k);A.appendChild(q);this.container=A},FindWindow=function(b,d,f,c,l,m){function t(V,W,n,D){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 T=mxUtils.trim(W[M].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(D&&0<=T.indexOf(n)||!D&&T.substring(0,n.length)===n)||null!=V&&V.test(T))return!0}}return!1}function y(){g&&F.value?(L.removeAttribute("disabled"),Q.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));F.value&&G.value?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}function C(V,
+W,n){N.innerText="";var D=B.model.getDescendants(B.model.getRoot()),M=G.value.toLowerCase(),T=U.checked?new RegExp(M):null,O=null;q=null;J!=M&&(J=M,e=null,k=!1);var R=null==e;if(0<M.length){if(k){k=!1;for(var S,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){S=X;break}V=(S+1)%b.pages.length;e=null;do k=!1,D=b.pages[V],B=b.createTemporaryGraph(B.getStylesheet()),b.updatePageRoot(D),B.model.setRoot(D.root),V=(V+1)%b.pages.length;while(!C(!0,W,n)&&V!=S);e&&(e=null,n?b.editor.graph.model.execute(new SelectPage(b,
+D)):b.selectPage(D));k=!1;B=b.editor.graph;return C(!0,W,n)}for(X=0;X<D.length;X++){S=B.view.getState(D[X]);W&&null!=T&&(R=R||S==e);if(null!=S&&null!=S.cell.value&&(R||null==O)&&(B.model.isVertex(S.cell)||B.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(v.innerHTML=B.sanitizeHtml(B.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([v])):label=B.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Y=0;W&&m&&null!=T&&S==e&&(label=label.substr(u),
+Y=u);var aa=""==F.value,ba=aa;if(null==T&&(ba&&0<=label.indexOf(M)||!ba&&label.substring(0,M.length)===M||aa&&t(T,S.cell,M,ba))||null!=T&&(T.test(label)||aa&&t(T,S.cell,M,ba)))if(m&&(null!=T?(aa=label.match(T),null!=aa&&0<aa.length&&(q=aa[0].toLowerCase(),u=Y+aa.index+q.length)):(q=M,u=q.length)),R){O=S;break}else null==O&&(O=S)}R=R||S==e}}if(null!=O){if(X==D.length&&p.checked)return e=null,k=!0,C(!0,W,n);e=O;B.scrollCellToVisible(e.cell);B.isEnabled()&&!B.isCellLocked(e.cell)?n||B.getSelectionCell()==
+e.cell&&1==B.getSelectionCount()||B.setSelectionCell(e.cell):B.highlightCell(e.cell)}else{if(!V&&p.checked)return k=!0,C(!0,W,n);B.isEnabled()&&!n&&B.clearSelection()}g=null!=O;m&&!V&&y();return 0==M.length||null!=O}var A=b.actions.get("findReplace"),B=b.editor.graph,J=null,e=null,g=!1,k=!1,q=null,u=0,x=1,E=document.createElement("div");E.style.userSelect="none";E.style.overflow="hidden";E.style.padding="10px";E.style.height="100%";var z=m?"260px":"200px",G=document.createElement("input");G.setAttribute("placeholder",
+mxResources.get("find"));G.setAttribute("type","text");G.style.marginTop="4px";G.style.marginBottom="6px";G.style.width=z;G.style.fontSize="12px";G.style.borderRadius="4px";G.style.padding="6px";E.appendChild(G);mxUtils.br(E);if(m){var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("replaceWith"));F.setAttribute("type","text");F.style.marginTop="4px";F.style.marginBottom="6px";F.style.width=z;F.style.fontSize="12px";F.style.borderRadius="4px";F.style.padding="6px";
+E.appendChild(F);mxUtils.br(E);mxEvent.addListener(F,"input",y)}var U=document.createElement("input");U.setAttribute("id","geFindWinRegExChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";E.appendChild(U);z=document.createElement("label");z.setAttribute("for","geFindWinRegExChck");E.appendChild(z);mxUtils.write(z,mxResources.get("regularExpression"));E.appendChild(z);z=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");z.style.position="relative";z.style.marginLeft=
+"6px";z.style.top="-1px";E.appendChild(z);mxUtils.br(E);var p=document.createElement("input");p.setAttribute("id","geFindWinAllPagesChck");p.setAttribute("type","checkbox");p.style.marginRight="4px";E.appendChild(p);z=document.createElement("label");z.setAttribute("for","geFindWinAllPagesChck");E.appendChild(z);mxUtils.write(z,mxResources.get("allPages"));E.appendChild(z);var v=document.createElement("div");mxUtils.br(E);z=document.createElement("div");z.style.left="0px";z.style.right="0px";z.style.marginTop=
+"6px";z.style.padding="0 6px 0 6px";z.style.textAlign="center";E.appendChild(z);var H=mxUtils.button(mxResources.get("reset"),function(){N.innerText="";G.value="";G.style.backgroundColor="";m&&(F.value="",y());J=e=null;k=!1;G.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";m||z.appendChild(H);var K=mxUtils.button(mxResources.get("find"),
+function(){try{G.style.backgroundColor=C()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});K.setAttribute("title",mxResources.get("find")+" (Enter)");K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";z.appendChild(K);var N=document.createElement("div");N.style.marginTop="10px";if(m){var I=function(V,W,n,D,M){if(null==M||"1"!=M.html)return D=V.toLowerCase().indexOf(W,
+D),0>D?V:V.substr(0,D)+n+V.substr(D+W.length);var T=V;W=mxUtils.htmlEntities(W);M=[];var O=-1;for(V=V.replace(/<br>/ig,"\n");-1<(O=V.indexOf("<",O+1));)M.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");D=V.toLowerCase().indexOf(W,D);if(0>D)return T;T=D+W.length;n=mxUtils.htmlEntities(n);V=V.substr(0,D)+n+V.substr(T);for(var R=0,S=0;S<M.length;S++){if(M[S]-R<D)V=V.substr(0,M[S])+O[S]+V.substr(M[S]);else{var X=M[S]-R<T?D+R:M[S]+(n.length-W.length);V=V.substr(0,X)+O[S]+V.substr(X)}R+=O[S].length}return V.replace(/\n/g,
+"<br>")},L=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=q&&null!=e&&F.value){var V=e.cell,W=B.getLabel(V);B.isCellEditable(V)&&B.model.setValue(V,I(W,q,F.value,u-q.length,B.getCurrentCellStyle(V)));G.style.backgroundColor=C(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(n){b.handleError(n)}});L.setAttribute("title",mxResources.get("replFind"));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");z.appendChild(L);mxUtils.br(z);var Q=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=q&&null!=e&&F.value){var V=e.cell,W=B.getLabel(V);B.model.setValue(V,I(W,q,F.value,u-q.length,B.getCurrentCellStyle(V)));L.setAttribute("disabled","disabled");Q.setAttribute("disabled","disabled")}}catch(n){b.handleError(n)}});Q.setAttribute("title",mxResources.get("replace"));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");z.appendChild(Q);var P=mxUtils.button(mxResources.get("replaceAll"),function(){N.innerText="";if(F.value){J=null;var V=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;B.getModel().beginUpdate();try{for(var n=0,D={};C(!1,!0,!0)&&100>n;){var M=e.cell,T=B.getLabel(M),O=D[M.id];if(O&&O.replAllMrk==
+x&&O.replAllPos>=u)break;D[M.id]={replAllMrk:x,replAllPos:u};B.isCellEditable(M)&&(B.model.setValue(M,I(T,q,F.value,u-q.length,B.getCurrentCellStyle(M))),n++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(N,mxResources.get("matchesRepl",[n]))}catch(R){b.handleError(R)}finally{B.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}x++}});P.setAttribute("title",mxResources.get("replaceAll"));P.style.float="none";P.style.width="120px";
+P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");z.appendChild(P);mxUtils.br(z);z.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";z.appendChild(H);mxUtils.br(z);z.appendChild(N)}else H.style.width="90px",K.style.width="90px";mxEvent.addListener(G,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)A.funct();else if(J!=G.value.toLowerCase()||13==V.keyCode)try{G.style.backgroundColor=C()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){G.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(E,"keydown",function(V){70==
+V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(A.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(m?"/"+mxResources.get("replace"):""),E,d,f,c,l,!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()?(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():
+document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?p.removeAttribute("disabled"):(p.checked=!1,p.setAttribute("disabled","disabled"))):B.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,d,f,c,l,m){var t=b.editor.graph,y=document.createElement("div");y.style.textAlign="center";y.style.userSelect="none";y.style.overflow="hidden";y.style.height="100%";if(m){var C=document.createElement("input");C.setAttribute("id","geFreehandBrush");C.setAttribute("type",
+"checkbox");C.checked=t.freehand.isPerfectFreehandMode();C.style.margin="10px 5px 0px 10px";C.style.float="left";y.appendChild(C);var A=document.createElement("label");A.setAttribute("for","geFreehandBrush");A.style.float="left";A.style.marginTop="10px";y.appendChild(A);mxUtils.write(A,mxResources.get("brush"));y.appendChild(A);mxUtils.br(y);var B=document.createElement("input");B.setAttribute("type","range");B.setAttribute("min","2");B.setAttribute("max","30");B.setAttribute("value",t.freehand.getBrushSize());
+B.style.width="90%";B.style.visibility="hidden";y.appendChild(B);mxUtils.br(y);A=function(){t.freehand.setPerfectFreehandMode(C.checked);B.style.visibility=C.checked?"visible":"hidden"};mxEvent.addListener(C,"change",A);A();mxEvent.addListener(B,"change",function(){t.freehand.setBrushSize(parseInt(this.value))})}var J=mxUtils.button(mxResources.get("startDrawing"),function(){t.freehand.isDrawing()?t.freehand.stopDrawing():t.freehand.startDrawing()});J.setAttribute("title",mxResources.get("startDrawing"));
+J.style.marginTop=m?"5px":"10px";J.style.width="90%";J.style.boxSizing="border-box";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.style.textAlign="center";J.className="geBtn gePrimaryBtn";y.appendChild(J);this.window=new mxWindow(mxResources.get("freehand"),y,d,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);t.addListener("freehandStateChanged",mxUtils.bind(this,function(){J.innerText="";mxUtils.write(J,
+mxResources.get(t.freehand.isDrawing()?"stopDrawing":"startDrawing"));var e=document.createElement("span");e.style.opacity="0.7";e.style["float"]="right";mxUtils.write(e,"X");J.appendChild(e);J.setAttribute("title",mxResources.get(t.freehand.isDrawing()?"stopDrawing":"startDrawing"));J.className="geBtn"+(t.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){t.freehand.isDrawing()&&
+t.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,d,f,c,l){var m=b.editor.graph,t=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(C,A){if(m.isEnabled()){var B=new FilenameDialog(b,"",mxResources.get("add"),function(J){b.hideDialog();if(null!=J&&0<J.length){J=J.split(" ");for(var e=[],g=0;g<J.length;g++){var k=mxUtils.trim(J[g]);""!=k&&0>mxUtils.indexOf(C,k)&&e.push(k)}0<e.length&&(m.isSelectionEmpty()?A(C.concat(e)):
+m.addTagsForCells(m.getSelectionCells(),e))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(B.container,300,80,!0,!0);B.init()}}),y=t.div;this.window=new mxWindow(mxResources.get("tags"),y,d,f,c,l,!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(){t.refresh();this.window.fit()}));b.installResizeHandler(this,
+!0)},AuthDialog=function(b,d,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("authorizationRequired"));var t="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";d==b.drive?(t=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):
+d==b.dropbox?(t=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==b.oneDrive?(t=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==b.gitHub?(t=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):d==b.gitLab?(t=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg",y.style.width="32px"):d==b.trello&&(t=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",
+[t]));var C=document.createElement("input");C.setAttribute("type","checkbox");t=mxUtils.button(mxResources.get("authorize"),function(){c(C.checked)});t.insertBefore(y,t.firstChild);t.style.marginTop="6px";t.className="geBigButton";t.style.fontSize="18px";t.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(t);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(C),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberMe")),f.appendChild(m),
+l.appendChild(f),C.checked=!0,C.defaultChecked=!0,mxEvent.addListener(m,"click",function(A){C.checked=!C.checked;mxEvent.consume(A)}));this.container=l},MoreShapesDialog=function(b,d,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var m=0;m<b.sidebar.customEntries.length;m++){for(var t=b.sidebar.customEntries[m],y={title:b.getResource(t.title),entries:[]},C=0;C<t.entries.length;C++){var A=t.entries[C];y.entries.push({id:A.id,title:b.getResource(A.title),
+desc:b.getResource(A.desc),image:A.preview})}l.push(y)}for(m=0;m<f.length;m++)if(null==b.sidebar.enabledLibraries)l.push(f[m]);else{y={title:f[m].title,entries:[]};for(C=0;C<f[m].entries.length;C++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,f[m].entries[C].id)&&y.entries.push(f[m].entries[C]);0<y.entries.length&&l.push(y)}f=l;if(d){m=mxUtils.bind(this,function(U){for(var p=0;p<U.length;p++)(function(v){var H=k.cloneNode(!1);H.style.fontWeight="bold";H.style.backgroundColor=Editor.isDarkMode()?
+"#505759":"#e5e5e5";H.style.padding="6px 0px 6px 20px";mxUtils.write(H,v.title);B.appendChild(H);for(var K=0;K<v.entries.length;K++)(function(N){var I=k.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",N.title+" ("+N.id+")");var L=document.createElement("input");L.setAttribute("type","checkbox");L.checked=b.sidebar.isEntryVisible(N.id);L.defaultChecked=L.checked;I.appendChild(L);
+mxUtils.write(I," "+N.title);B.appendChild(I);var Q=function(P){if(null==P||"INPUT"!=mxEvent.getSource(P).nodeName){J.style.textAlign="center";J.style.padding="0px";J.style.color="";J.innerText="";if(null!=N.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,N.desc);J.appendChild(V)}null!=N.imageCallback?N.imageCallback(J):null!=N.image?J.innerHTML+='<img border="0" style="max-width:100%;" src="'+
+N.image+'"/>':null==N.desc&&(J.style.padding="20px",J.style.color="rgb(179, 179, 179)",mxUtils.write(J,mxResources.get("noPreview")));null!=e&&(e.style.backgroundColor="");e=I;e.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=P&&mxEvent.consume(P)}};mxEvent.addListener(I,"click",Q);mxEvent.addListener(I,"dblclick",function(P){L.checked=!L.checked;mxEvent.consume(P)});g.push(function(){return L.checked?N.id:null});0==p&&0==K&&Q()})(v.entries[K])})(U[p])});C=document.createElement("div");
+C.className="geDialogTitle";mxUtils.write(C,mxResources.get("shapes"));C.style.position="absolute";C.style.top="0px";C.style.left="0px";C.style.lineHeight="40px";C.style.height="40px";C.style.right="0px";var B=document.createElement("div"),J=document.createElement("div");B.style.position="absolute";B.style.top="40px";B.style.left="0px";B.style.width="202px";B.style.bottom="60px";B.style.overflow="auto";J.style.position="absolute";J.style.left="202px";J.style.right="0px";J.style.top="40px";J.style.bottom=
+"60px";J.style.overflow="auto";J.style.borderLeft="1px solid rgb(211, 211, 211)";J.style.textAlign="center";var e=null,g=[],k=document.createElement("div");k.style.position="relative";k.style.left="0px";k.style.right="0px";m(f);c.style.padding="30px";c.appendChild(C);c.appendChild(B);c.appendChild(J);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 q=document.createElement("input");q.setAttribute("type","checkbox");q.style.position="relative";q.style.top="1px";q.checked=b.sidebar.sidebarTitles;q.defaultChecked=q.checked;f.appendChild(q);m=document.createElement("span");mxUtils.write(m," "+mxResources.get("labels"));m.style.paddingRight="20px";f.appendChild(m);mxEvent.addListener(m,"click",function(U){q.checked=!q.checked;mxEvent.consume(U)});var u=document.createElement("input");u.setAttribute("type","checkbox");
+if(isLocalStorage||mxClient.IS_CHROMEAPP)m=document.createElement("span"),m.style.paddingRight="20px",m.appendChild(u),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),u.style.position="relative",u.style.top="1px",u.checked=!0,u.defaultChecked=!0,mxEvent.addListener(m,"click",function(U){mxEvent.getSource(U)!=u&&(u.checked=!u.checked,mxEvent.consume(U))}),f.appendChild(m);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),
+function(){b.hideDialog();for(var U=[],p=0;p<g.length;p++){var v=g[p].apply(this,arguments);null!=v&&U.push(v)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(p=mxUtils.indexOf(U,".scratchpad"),null!=b.scratchpad!=(0<=p&&0<U.splice(p,1).length)&&b.toggleScratchpad(),p=mxUtils.indexOf(U,"search"),mxSettings.settings.search=0<=p&&0<U.splice(p,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),u.checked&&mxSettings.save());b.sidebar.showEntries(U.join(";"),u.checked,!0);b.setSidebarTitles(q.checked,
+u.checked)});C.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table");m=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";C=document.createElement("tr");x.style.width="100%";d=document.createElement("td");l=document.createElement("td");t=document.createElement("td");var E=mxUtils.bind(this,function(U,p,v){var H=document.createElement("input");H.type="checkbox";x.appendChild(H);H.checked=b.sidebar.isEntryVisible(v);var K=document.createElement("span");
+mxUtils.write(K,p);p=document.createElement("div");p.style.display="block";p.appendChild(H);p.appendChild(K);mxEvent.addListener(K,"click",function(N){H.checked=!H.checked;mxEvent.consume(N)});U.appendChild(p);return function(){return H.checked?v:null}});C.appendChild(d);C.appendChild(l);C.appendChild(t);m.appendChild(C);x.appendChild(m);g=[];var z=0;for(m=0;m<f.length;m++)for(C=0;C<f[m].entries.length;C++)z++;var G=[d,l,t],F=0;for(m=0;m<f.length;m++)(function(U){for(var p=0;p<U.entries.length;p++){var v=
+U.entries[p];g.push(E(G[Math.floor(F/(z/3))],v.title,v.id));F++}})(f[m]);c.appendChild(x);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";u=document.createElement("input");isLocalStorage&&(u.setAttribute("type","checkbox"),u.checked=!0,u.defaultChecked=!0,f.appendChild(u),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),f.appendChild(m),mxEvent.addListener(m,"click",function(U){u.checked=!u.checked;mxEvent.consume(U)}));
+c.appendChild(f);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";C=mxUtils.button(mxResources.get("apply"),function(){for(var U=["search"],p=0;p<g.length;p++){var v=g[p].apply(this,arguments);null!=v&&U.push(v)}b.sidebar.showEntries(0<U.length?U.join(";"):"",u.checked);b.hideDialog()});C.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(m),f.appendChild(C)):
+(f.appendChild(C),f.appendChild(m));c.appendChild(f);this.container=c},PluginsDialog=function(b,d,f,c){function l(){C=!0;if(0==y.length)t.innerText=mxResources.get("noPlugins");else{t.innerText="";for(var k=0;k<y.length;k++){var q=document.createElement("span");q.style.whiteSpace="nowrap";var u=document.createElement("span");u.className="geSprite geSprite-delete";u.style.position="relative";u.style.cursor="pointer";u.style.top="5px";u.style.marginRight="4px";u.style.display="inline-block";q.appendChild(u);
+mxUtils.write(q,y[k]);t.appendChild(q);mxUtils.br(t);mxEvent.addListener(u,"click",function(x){return function(){b.confirm(mxResources.get("delete")+' "'+y[x]+'"?',function(){null!=f&&f(y[x]);y.splice(x,1);l()})}}(k))}}}var m=document.createElement("div"),t=document.createElement("div");t.style.height="180px";t.style.overflow="auto";var y=mxSettings.getPlugins().slice(),C=!1;m.appendChild(t);l();C=!1;var A=mxUtils.button(mxResources.get("add"),null!=d?function(){d(function(k){k&&0>mxUtils.indexOf(y,
+k)&&y.push(k);l()})}:function(){var k=document.createElement("div"),q=document.createElement("span");q.style.marginTop="6px";mxUtils.write(q,mxResources.get("builtinPlugins")+": ");k.appendChild(q);var u=document.createElement("select");u.style.width="150px";for(q=0;q<App.publicPlugin.length;q++){var x=document.createElement("option");mxUtils.write(x,App.publicPlugin[q]);x.value=App.publicPlugin[q];u.appendChild(x)}k.appendChild(u);mxUtils.br(k);mxUtils.br(k);q=mxUtils.button(mxResources.get("custom")+
+"...",function(){var E=new FilenameDialog(b,"",mxResources.get("add"),function(z){b.hideDialog();if(null!=z&&0<z.length){z=z.split(";");for(var G=0;G<z.length;G++){var F=z[G],U=App.pluginRegistry[F];null!=U&&(F=U);0<F.length&&0>mxUtils.indexOf(y,F)&&y.push(F)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(E.container,300,80,!0,!0);E.init()});q.className="geBtn";k=new CustomDialog(b,k,mxUtils.bind(this,function(){var E=App.pluginRegistry[u.value];0>mxUtils.indexOf(y,
+E)&&(y.push(E),l())}),null,null,null,q);b.showDialog(k.container,360,100,!0,!0)});A.className="geBtn";var B=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});B.className="geBtn";var J=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){C?(mxSettings.setPlugins(y),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});J.className="geBtn gePrimaryBtn";var e=document.createElement("div");e.style.marginTop="14px";
+e.style.textAlign="right";var g=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});g.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(g.style.display="none");e.appendChild(g);b.editor.cancelFirst?(c||e.appendChild(B),e.appendChild(A),e.appendChild(J)):(e.appendChild(A),e.appendChild(J),c||e.appendChild(B));m.appendChild(e);this.container=m},CropImageDialog=function(b,d,f,c){function l(){var U=u.checked,p=x.checked,v=g.geometry,H=C.width,
+K=C.height,N=(300-H)/2,I=(300-K)/2;v.x<N?(v.width-=N-v.x,v.x=N):v.x+v.width>N+H&&(v.width=N+H-v.x,v.x=Math.min(v.x,N+H));v.y<I?(v.height-=I-v.y,v.y=I):v.y+v.height>I+K&&(v.height=I+K-v.y,v.y=Math.min(v.y,I+K));var L=(v.x-N)/H*100;H=100-(v.x+v.width-N)/H*100;N=(v.y-I)/K*100;v=100-(v.y+v.height-I)/K*100;return"inset("+mxUtils.format(N)+"% "+mxUtils.format(H)+"% "+mxUtils.format(v)+"% "+mxUtils.format(L)+"%"+(U?" round "+e+"%":p?" round 50%":"")+")"}function m(U){null!=B&&(!0!==U&&(B.model.setGeometry(g,
+J.clone()),e=5,z.value=e),B.model.setStyle(g,k+l()),B.selectAll(),E.style.visibility=u.checked?"visible":"hidden")}var t=document.createElement("div"),y=document.createElement("div");y.style.height="300px";y.style.width="300px";y.style.display="inline-flex";y.style.justifyContent="center";y.style.alignItems="center";y.style.position="absolute";var C=document.createElement("img");C.onload=function(){function U(){B.model.setStyle(g,k+l())}B=new Graph(A);B.autoExtend=!1;B.autoScroll=!1;B.setGridEnabled(!1);
+B.setEnabled(!0);B.setPanning(!1);B.setConnectable(!1);B.getRubberband().setEnabled(!1);B.graphHandler.allowLivePreview=!1;var p=B.createVertexHandler;B.createVertexHandler=function(){var T=p.apply(this,arguments);T.livePreview=!1;return T};if(null!=f)try{if("inset"==f.substring(0,5)){var v=g.geometry,H=C.width,K=C.height,N=(300-H)/2,I=(300-K)/2,L=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),Q=parseFloat(L[0]),P=parseFloat(L[1]),V=parseFloat(L[2]),W=parseFloat(L[3]);isFinite(Q)&&isFinite(P)&&isFinite(V)&&
+isFinite(W)?(v.x=W/100*H+N,v.y=Q/100*K+I,v.width=(100-P)/100*H+N-v.x,v.height=(100-V)/100*K+I-v.y,"round"==L[4]?"50%"==L[5]?x.setAttribute("checked","checked"):(e=parseInt(L[5]),z.value=e,u.setAttribute("checked","checked"),E.style.visibility="visible"):q.setAttribute("checked","checked")):f=null}else f=null}catch(T){}g.style=k+(f?f:l());g.vertex=!0;B.addCell(g,null,null,null,null);B.selectAll();B.addListener(mxEvent.CELLS_MOVED,U);B.addListener(mxEvent.CELLS_RESIZED,U);var n=B.graphHandler.mouseUp,
+D=B.graphHandler.mouseDown;B.graphHandler.mouseUp=function(){n.apply(this,arguments);A.style.backgroundColor="#fff9"};B.graphHandler.mouseDown=function(){D.apply(this,arguments);A.style.backgroundColor=""};B.dblClick=function(){};var M=B.getSelectionModel().changeSelection;B.getSelectionModel().changeSelection=function(){M.call(this,[g],[g])}};C.onerror=function(){C.onload=null;C.src=Editor.errorImage};C.setAttribute("src",d);C.style.maxWidth="300px";C.style.maxHeight="300px";y.appendChild(C);t.appendChild(y);
+var A=document.createElement("div");A.style.width="300px";A.style.height="300px";A.style.overflow="hidden";A.style.backgroundColor="#fff9";t.appendChild(A);var B=null,J=new mxGeometry(100,100,100,100),e=5,g=new mxCell("",J.clone(),""),k="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+d.replace(";base64","")+";clipPath=",q=document.createElement("input");q.setAttribute("type","radio");q.setAttribute("id","croppingRect");q.setAttribute("name","croppingShape");q.setAttribute("checked",
+"checked");q.style.margin="5px";t.appendChild(q);d=document.createElement("label");d.setAttribute("for","croppingRect");mxUtils.write(d,mxResources.get("rectangle"));t.appendChild(d);var u=document.createElement("input");u.setAttribute("type","radio");u.setAttribute("id","croppingRounded");u.setAttribute("name","croppingShape");u.style.margin="5px";t.appendChild(u);d=document.createElement("label");d.setAttribute("for","croppingRounded");mxUtils.write(d,mxResources.get("rounded"));t.appendChild(d);
+var x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingEllipse");x.setAttribute("name","croppingShape");x.style.margin="5px";t.appendChild(x);d=document.createElement("label");d.setAttribute("for","croppingEllipse");mxUtils.write(d,mxResources.get("ellipse"));t.appendChild(d);mxEvent.addListener(q,"change",m);mxEvent.addListener(u,"change",m);mxEvent.addListener(x,"change",m);var E=document.createElement("div");E.style.textAlign="center";E.style.visibility=
+"hidden";var z=document.createElement("input");z.setAttribute("type","range");z.setAttribute("min","1");z.setAttribute("max","49");z.setAttribute("value",e);z.setAttribute("title",mxResources.get("arcSize"));E.appendChild(z);t.appendChild(E);mxEvent.addListener(z,"change",function(){e=this.value;m(!0)});d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){c(l(),g.geometry.width,g.geometry.height);b.hideDialog()});
+y.className="geBtn gePrimaryBtn";var G=mxUtils.button(mxResources.get("reset"),function(){c(null,C.width,C.height);b.hideDialog()});G.className="geBtn";var F=document.createElement("div");F.style.marginTop="10px";F.style.textAlign="right";b.editor.cancelFirst?(F.appendChild(d),F.appendChild(G),F.appendChild(y)):(F.appendChild(G),F.appendChild(y),F.appendChild(d));t.appendChild(F);this.container=t},EditGeometryDialog=function(b,d){var f=b.editor.graph,c=1==d.length?f.getCellGeometry(d[0]):null,l=document.createElement("div"),
+m=document.createElement("table"),t=document.createElement("tbody"),y=document.createElement("tr"),C=document.createElement("td"),A=document.createElement("td");m.style.paddingLeft="6px";mxUtils.write(C,mxResources.get("relative")+":");var B=document.createElement("input");B.setAttribute("type","checkbox");null!=c&&c.relative&&(B.setAttribute("checked","checked"),B.defaultChecked=!0);this.init=function(){B.focus()};A.appendChild(B);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");
+C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("left")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.width="100px";J.value=null!=c?c.x:"";A.appendChild(J);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("top")+":");var e=document.createElement("input");e.setAttribute("type","text");e.style.width=
+"100px";e.value=null!=c?c.y:"";A.appendChild(e);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("dx")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c&&null!=c.offset?c.offset.x:"";A.appendChild(g);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");
+A=document.createElement("td");mxUtils.write(C,mxResources.get("dy")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c&&null!=c.offset?c.offset.y:"";A.appendChild(k);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";
+q.value=null!=c?c.width:"";A.appendChild(q);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");mxUtils.write(C,mxResources.get("height")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.height:"";A.appendChild(u);y.appendChild(C);y.appendChild(A);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");A=document.createElement("td");
+mxUtils.write(C,mxResources.get("rotation")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=1==d.length?mxUtils.getValue(f.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";A.appendChild(x);y.appendChild(C);y.appendChild(A);t.appendChild(y);m.appendChild(t);l.appendChild(m);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var E=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();
+try{for(var z=0;z<d.length;z++){var G=f.getCellGeometry(d[z]);null!=G&&(G=G.clone(),f.isCellMovable(d[z])&&(G.relative=B.checked,0<mxUtils.trim(J.value).length&&(G.x=Number(J.value)),0<mxUtils.trim(e.value).length&&(G.y=Number(e.value)),0<mxUtils.trim(g.value).length&&(null==G.offset&&(G.offset=new mxPoint),G.offset.x=Number(g.value)),0<mxUtils.trim(k.value).length&&(null==G.offset&&(G.offset=new mxPoint),G.offset.y=Number(k.value))),f.isCellResizable(d[z])&&(0<mxUtils.trim(q.value).length&&(G.width=
+Number(q.value)),0<mxUtils.trim(u.value).length&&(G.height=Number(u.value))),f.getModel().setGeometry(d[z],G));0<mxUtils.trim(x.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[d[z]])}}finally{f.getModel().endUpdate()}});E.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(z){13==z.keyCode&&E.click()});m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";b.editor.cancelFirst?(m.appendChild(c),m.appendChild(E)):(m.appendChild(E),
+m.appendChild(c));l.appendChild(m);this.container=l},LibraryDialog=function(b,d,f,c,l,m){function t(p){for(p=document.elementFromPoint(p.clientX,p.clientY);null!=p&&p.parentNode!=g;)p=p.parentNode;var v=null;if(null!=p){var H=g.firstChild;for(v=0;null!=H&&H!=p;)H=H.nextSibling,v++}return v}function y(p,v,H,K,N,I,L,Q,P){try{if(b.spinner.stop(),null==v||"image/"==v.substring(0,6))if(null==p&&null!=L||null==q[p]){var V=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow=
+"ellipsis";mxUtils.write(S,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));S.style.color=null==X.title||0==X.title.length?"#d0d0d0":""};g.style.backgroundImage="";k.style.display="none";var W=N,n=I;if(N>b.maxImageSize||I>b.maxImageSize){var D=Math.min(1,Math.min(b.maxImageSize/Math.max(1,N)),b.maxImageSize/Math.max(1,I));N*=D;I*=D}W>n?(n=Math.round(100*n/W),W=100):(W=Math.round(100*W/n),n=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!=p){var T=document.createElement("img");T.setAttribute("src",z.convert(p));T.style.width=W+"px";T.style.height=n+"px";T.style.margin="10px";T.style.paddingBottom=Math.floor((100-n)/2)+"px";T.style.paddingLeft=Math.floor((100-W)/2)+"px";M.appendChild(T)}else if(null!=L){var O=b.stringToCells(Graph.decompress(L.xml));0<O.length&&
+(b.sidebar.createThumb(O,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,Z,ia){mxEvent.addListener(R,"click",function(ea){q[Z]=null;for(var va=0;va<B.length;va++)if(null!=B[va].data&&B[va].data==Z||null!=B[va].xml&&null!=ia&&B[va].xml==ia.xml){B.splice(va,1);break}M.parentNode.removeChild(da);0==B.length&&(g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.display="");mxEvent.consume(ea)});mxEvent.addListener(R,"dblclick",function(ea){mxEvent.consume(ea)})})(M,p,L);M.appendChild(R);M.style.marginBottom="30px";var S=document.createElement("div");
+S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var X=null;null!=p?(X={data:p,w:N,h:I,title:P},null!=Q&&(X.aspect=Q),q[p]=T,B.push(X)):null!=L&&(L.aspect="fixed",B.push(L),X=L);mxEvent.addListener(S,"keydown",function(da){13==da.keyCode&&null!=E&&(E(),E=null,mxEvent.consume(da))});V();M.appendChild(S);
+mxEvent.addListener(S,"mousedown",function(da){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(da)});O=function(da){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var Z=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ia){null!=ia&&(X.title=ia,V())},mxResources.get("enterValue"));b.showDialog(Z.container,300,80,!0,!0);Z.init();mxEvent.consume(da)}else if("true"!=S.getAttribute("contentEditable")){null!=E&&(E(),E=null);if(null==
+X.title||0==X.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);E=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";X.title=S.innerHTML;V()};mxEvent.consume(da)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(M,"dblclick",O);g.appendChild(M);mxEvent.addListener(M,
+"dragstart",function(da){null==p&&null!=L&&(R.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=L.xml&&da.dataTransfer.setData("Text",L.xml);u=t(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="";S.style.visibility=""},0)});mxEvent.addListener(M,"dragend",function(da){"hidden"==R.style.visibility&&(R.style.visibility="",S.style.visibility="");
+u=null;mxUtils.setOpacity(M,100);mxUtils.setPrefixedStyle(M.style,"transform",null)})}else G||(G=!0,b.handleError({message:mxResources.get("fileExists")}));else{N=!1;try{if(W=mxUtils.parseXml(p),"mxlibrary"==W.documentElement.nodeName){n=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=n&&0<n.length)for(var Y=0;Y<n.length;Y++)null!=n[Y].xml?y(null,null,0,0,0,0,n[Y]):y(n[Y].data,null,0,0,n[Y].w,n[Y].h,null,"fixed",n[Y].title);N=!0}else if("mxfile"==W.documentElement.nodeName){var aa=
+W.documentElement.getElementsByTagName("diagram");for(Y=0;Y<aa.length;Y++){n=mxUtils.getTextContent(aa[Y]);O=b.stringToCells(Graph.decompress(n));var ba=b.editor.graph.getBoundingBoxFromGeometry(O);y(null,null,0,0,0,0,{xml:n,w:ba.width,h:ba.height})}N=!0}}catch(da){}N||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function C(p){p.dataTransfer.dropEffect=null!=u?"move":"copy";p.stopPropagation();p.preventDefault()}function A(p){p.stopPropagation();
+p.preventDefault();G=!1;x=t(p);if(null!=u)null!=x&&x<g.children.length?(B.splice(x>u?x-1:x,0,B.splice(u,1)[0]),g.insertBefore(g.children[u],g.children[x])):(B.push(B.splice(u,1)[0]),g.appendChild(g.children[u]));else if(0<p.dataTransfer.files.length)b.importFiles(p.dataTransfer.files,0,0,b.maxImageSize,F(p));else if(0<=mxUtils.indexOf(p.dataTransfer.types,"text/uri-list")){var v=decodeURIComponent(p.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(v)||/(\.png)($|\?)/i.test(v)||/(\.gif)($|\?)/i.test(v)||
+/(\.svg)($|\?)/i.test(v))&&b.loadImage(v,function(H){y(v,null,0,0,H.width,H.height);g.scrollTop=g.scrollHeight})}p.stopPropagation();p.preventDefault()}var B=[];f=document.createElement("div");f.style.height="100%";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.height="40px";f.appendChild(J);mxUtils.write(J,mxResources.get("filename")+":");null==d&&(d=b.defaultLibraryName+".xml");var e=document.createElement("input");e.setAttribute("value",d);e.style.marginRight="20px";e.style.marginLeft=
+"10px";e.style.width="500px";null==l||l.isRenamable()||e.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)};J.appendChild(e);var g=document.createElement("div");g.style.borderWidth="1px 0px 1px 0px";g.style.borderColor="#d3d3d3";g.style.borderStyle="solid";g.style.marginTop="6px";g.style.overflow="auto";g.style.height="340px";g.style.backgroundPosition=
+"center center";g.style.backgroundRepeat="no-repeat";0==B.length&&Graph.fileSupport&&(g.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var k=document.createElement("div");k.style.position="absolute";k.style.width="640px";k.style.top="260px";k.style.textAlign="center";k.style.fontSize="22px";k.style.color="#a0c3ff";mxUtils.write(k,mxResources.get("dragImagesHere"));f.appendChild(k);var q={},u=null,x=null,E=null;d=function(p){"true"!=mxEvent.getSource(p).getAttribute("contentEditable")&&
+null!=E&&(E(),E=null,mxEvent.consume(p))};mxEvent.addListener(g,"mousedown",d);mxEvent.addListener(g,"pointerdown",d);mxEvent.addListener(g,"touchstart",d);var z=new mxUrlConverter,G=!1;if(null!=c)for(d=0;d<c.length;d++)J=c[d],y(J.data,null,0,0,J.w,J.h,J,J.aspect,J.title);mxEvent.addListener(g,"dragleave",function(p){k.style.cursor="";for(var v=mxEvent.getSource(p);null!=v;){if(v==g||v==k){p.stopPropagation();p.preventDefault();break}v=v.parentNode}});var F=function(p){return function(v,H,K,N,I,L,
+Q,P,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(W){y(W,H,K,N,I,L,Q,"fixed",mxEvent.isAltDown(p)?null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(v,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(y(W.responseText,H,K,N,I,L,Q,"fixed",mxEvent.isAltDown(p)?
+null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(y(v,H,K,N,I,L,Q,"fixed",mxEvent.isAltDown(p)?null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),g.scrollTop=g.scrollHeight)}};mxEvent.addListener(g,"dragover",C);mxEvent.addListener(g,"drop",A);mxEvent.addListener(k,"dragover",C);mxEvent.addListener(k,"drop",A);f.appendChild(g);c=document.createElement("div");c.style.textAlign=
+"right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&c.appendChild(d);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(J=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&l.getPublicUrl(function(p){b.spinner.stop();if(null!=p){var v=b.getSearch("create title mode url drive splash state clibs ui".split(" "));
+v+=(0==v.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(p);p=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+v,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(p.container,450,240,!0);p.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):
+b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),J.className="geBtn",c.appendChild(J));J=mxUtils.button(mxResources.get("export"),function(){var p=b.createLibraryDataFromImages(B),v=e.value;/(\.xml)$/i.test(v)||(v+=".xml");b.isLocalFileSave()?b.saveLocalFile(p,v,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(v)+"&format=xml&xml="+encodeURIComponent(p))).simulate(document,"_blank")});J.setAttribute("id","btnDownload");J.className="geBtn";
+c.appendChild(J);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,"change",function(p){G=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(v,H,K,N,I,L,Q,P,V){null!=U.files&&(F(p)(v,H,K,N,I,L,Q,P,V),U.type="",U.type="file",U.value="")});g.scrollTop=g.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}J=mxUtils.button(mxResources.get("import"),
+function(){null!=E&&(E(),E=null);b.libDlgFileInputElt.click()});J.setAttribute("id","btnAddImage");J.className="geBtn";c.appendChild(J)}J=mxUtils.button(mxResources.get("addImages"),function(){null!=E&&(E(),E=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(p,v,H){G=!1;if(null!=p){if("data:image/"==p.substring(0,11)){var K=p.indexOf(",");0<K&&(p=p.substring(0,K)+";base64,"+p.substring(K+1))}y(p,null,0,0,v,H);g.scrollTop=g.scrollHeight}})});J.setAttribute("id","btnAddImageUrl");J.className=
+"geBtn";c.appendChild(J);this.saveBtnClickHandler=function(p,v,H,K){b.saveLibrary(p,v,H,K)};J=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=E&&(E(),E=null);this.saveBtnClickHandler(e.value,B,l,m)}));J.setAttribute("id","btnSave");J.className="geBtn gePrimaryBtn";c.appendChild(J);b.editor.cancelFirst||c.appendChild(d);f.appendChild(c);this.container=f},EditShapeDialog=function(b,d,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var m=document.createElement("table"),t=document.createElement("tbody");
+m.style.cellPadding="4px";var y=document.createElement("tr");var C=document.createElement("td");C.setAttribute("colspan","2");C.style.fontSize="10pt";mxUtils.write(C,f);y.appendChild(C);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");var A=document.createElement("textarea");A.style.outline="none";A.style.resize="none";A.style.width=c-200+"px";A.style.height=l+"px";this.textarea=A;this.init=function(){A.focus();A.scrollTop=0};C.appendChild(A);y.appendChild(C);C=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=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);C.appendChild(f);var B=new Graph(f);B.setEnabled(!1);var J=b.editor.graph.cloneCell(d);B.addCells([J]);f=B.view.getState(J);var e="";null!=f.shape&&null!=f.shape.stencil&&(e=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(A,e||"");f=B.getGraphBounds();
+l=Math.min(160/f.width,(l-40)/f.height);B.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);y.appendChild(C);t.appendChild(y);y=document.createElement("tr");C=document.createElement("td");C.setAttribute("colspan","2");C.style.paddingTop="2px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),l.className="geBtn",C.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&C.appendChild(l);var g=function(k,q,u){var x=A.value,E=mxUtils.parseXml(x);x=mxUtils.getPrettyXml(E.documentElement);E=E.documentElement.getElementsByTagName("parsererror");if(null!=E&&0<E.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(u&&b.hideDialog(),E=!k.model.contains(q),!u||E||x!=e){x=Graph.compress(x);k.getModel().beginUpdate();try{if(E){var z=b.editor.graph.getFreeInsertPoint();
+q.geometry.x=z.x;q.geometry.y=z.y;k.addCell(q)}k.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+x+")",[q])}catch(G){throw G;}finally{k.getModel().endUpdate()}E&&(k.setSelectionCell(q),k.scrollCellToVisible(q))}};f=mxUtils.button(mxResources.get("preview"),function(){g(B,J,!1)});f.className="geBtn";C.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){g(b.editor.graph,d,!0)});f.className="geBtn gePrimaryBtn";C.appendChild(f);b.editor.cancelFirst||C.appendChild(l);y.appendChild(C);
+t.appendChild(y);m.appendChild(t);this.container=m},CustomDialog=function(b,d,f,c,l,m,t,y,C,A,B){var J=document.createElement("div");J.appendChild(d);var e=document.createElement("div");e.style.marginTop="30px";e.style.textAlign="center";null!=t&&e.appendChild(t);b.isOffline()||null==m||(d=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),d.className="geBtn",e.appendChild(d));C=mxUtils.button(C||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});C.className="geBtn";
+y&&(C.style.display="none");b.editor.cancelFirst&&e.appendChild(C);l=mxUtils.button(l||mxResources.get("ok"),mxUtils.bind(this,function(){A||b.hideDialog(null,null,this.container);if(null!=f){var g=f();if("string"===typeof g){b.showError(mxResources.get("error"),g);return}}A&&b.hideDialog(null,null,this.container)}));e.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(C);if(null!=B)for(y=0;y<B.length;y++)(function(g,k,q){g=mxUtils.button(g,function(u){k(u)});null!=
+q&&g.setAttribute("title",q);g.className="geBtn";e.appendChild(g)})(B[y][0],B[y][1],B[y][2]);J.appendChild(e);this.cancelBtn=C;this.okButton=l;this.container=J},TemplatesDialog=function(b,d,f,c,l,m,t,y,C,A,B,J,e,g,k){function q(ka){Fa.innerText=ka;Fa.style.display="block";setTimeout(function(){Fa.style.display="none"},4E3)}function u(){null!=n&&(n.style.fontWeight="normal",n.style.textDecoration="none",D=n,n=null)}function x(ka,la,qa,Aa,Ca,Ga,Da){if(-1<ka.className.indexOf("geTempDlgRadioBtnActive"))return!1;
+ka.className+=" geTempDlgRadioBtnActive";P.querySelector(".geTempDlgRadioBtn[data-id="+Aa+"]").className="geTempDlgRadioBtn "+(Da?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");P.querySelector("."+la).src="/images/"+qa+"-sel.svg";P.querySelector("."+Ca).src="/images/"+Ga+".svg";return!0}function E(ka,la,qa,Aa){function Ca(ta,Oa){null==Da?(ta=/^https?:\/\//.test(ta)&&!b.editor.isCorsEnabledForUrl(ta)?PROXY_URL+"?url="+encodeURIComponent(ta):TEMPLATE_PATH+"/"+ta,mxUtils.get(ta,mxUtils.bind(this,
+function(Qa){200<=Qa.getStatus()&&299>=Qa.getStatus()&&(Da=Qa.getText());Oa(Da)}))):Oa(Da)}function Ga(ta,Oa,Qa){if(null!=ta&&mxUtils.isAncestorNode(document.body,la)&&(ta=mxUtils.parseXml(ta),ta=Editor.extractGraphModel(ta.documentElement,!0),null!=ta)){"mxfile"==ta.nodeName&&(ta=Editor.parseDiagramNode(ta.getElementsByTagName("diagram")[0]));var Va=new mxCodec(ta.ownerDocument),Ha=new mxGraphModel;Va.decode(ta,Ha);ta=Ha.root.getChildAt(0).children||[];b.sidebar.createTooltip(la,ta,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!=ka.title?mxResources.get(ka.title,null,ka.title):null,!0,new mxPoint(Oa,Qa),!0,null,!0);var La=document.createElement("div");La.className="geTempDlgDialogMask";P.appendChild(La);var Ma=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){La&&(P.removeChild(La),La=null,Ma.apply(this,arguments),b.sidebar.hideTooltip=
+Ma)};mxEvent.addListener(La,"click",function(){b.sidebar.hideTooltip()})}}var Da=null;if(Ja||b.sidebar.currentElt==la)b.sidebar.hideTooltip();else{var xa=function(ta){Ja&&b.sidebar.currentElt==la&&Ga(ta,mxEvent.getClientX(Aa),mxEvent.getClientY(Aa));Ja=!1;qa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=la;Ja=!0;qa.src="/images/aui-wait.gif";ka.isExt?C(ka,xa,function(){q(mxResources.get("cantLoadPrev"));Ja=!1;qa.src="/images/icon-search.svg"}):Ca(ka.url,xa)}}function z(ka,
+la,qa){if(null!=M){for(var Aa=M.className.split(" "),Ca=0;Ca<Aa.length;Ca++)if(-1<Aa[Ca].indexOf("Active")){Aa.splice(Ca,1);break}M.className=Aa.join(" ")}null!=ka?(M=ka,M.className+=" "+la,T=qa,Na.className="geTempDlgCreateBtn"):(T=M=null,Na.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function G(ka,la){if(null!=T){var qa=function(xa){Da.isExternal?C(Da,function(ta){Aa(ta,xa)},Ca):Da.url?mxUtils.get(TEMPLATE_PATH+"/"+Da.url,mxUtils.bind(this,function(ta){200<=ta.getStatus()&&299>=ta.getStatus()?
+Aa(ta.getText(),xa):Ca()})):Aa(b.emptyDiagramXml,xa)},Aa=function(xa,ta){k||b.hideDialog(!0);d(xa,ta,Da,la)},Ca=function(){q(mxResources.get("cannotLoad"));Ga()},Ga=function(){T=Da;Na.className="geTempDlgCreateBtn";la&&(Ka.className="geTempDlgOpenBtn")},Da=T;T=null;"boolean"!==typeof la&&(la=Da.isExternal&&J);1==ka?A(Da.url,Da):la?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",qa()):(Na.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ka=null==b.mode||b.mode==
+App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ka=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),qa,ka,function(xa){var ta=null!=xa&&0<xa.length;return ta&&k?(qa(xa),!1):ta},null,null,null,Ga,g?null:[]),b.showDialog(ka.container,350,80,!0,!0),ka.init())}}function F(ka){Na.innerText=mxResources.get(da||ka?"create":"copy");ka=ka?"none":"";J&&(Ka.style.display=ka);for(var la=P.querySelectorAll(".geTempDlgLinkToDiagram"),qa=
+0;qa<la.length;qa++)la[qa].style.display=ka}function U(ka,la,qa,Aa,Ca){Ca||(ia.innerText="",z(),X=ka,Y=Aa);var Ga=null;if(qa){Ga=document.createElement("table");Ga.className="geTempDlgDiagramsListGrid";var Da=document.createElement("tr"),xa=document.createElement("th");xa.style.width="50%";xa.innerText=mxResources.get("diagram");Da.appendChild(xa);xa=document.createElement("th");xa.style.width="25%";xa.innerText=mxResources.get("changedBy");Da.appendChild(xa);xa=document.createElement("th");xa.style.width=
+"25%";xa.innerText=mxResources.get("lastModifiedOn");Da.appendChild(xa);Ga.appendChild(Da);ia.appendChild(Ga)}for(Da=0;Da<ka.length;Da++){ka[Da].isExternal=!la;var ta=ka[Da].url,Oa=(xa=mxUtils.htmlEntities(la?mxResources.get(ka[Da].title,null,ka[Da].title):ka[Da].title))||ka[Da].url,Qa=ka[Da].imgUrl,Va=ka[Da].changedBy||"",Ha="";ka[Da].lastModifiedOn&&(Ha=b.timeSince(new Date(ka[Da].lastModifiedOn)),null==Ha&&(Ha=mxResources.get("lessThanAMinute")),Ha=mxResources.get("timeAgo",[Ha],"{1} ago"));Qa||
+(Qa=TEMPLATE_PATH+"/"+ta.substring(0,ta.length-4)+".png");ta=qa?50:15;null!=xa&&xa.length>ta&&(xa=xa.substring(0,ta)+"&hellip;");if(qa){var La=document.createElement("tr");Qa=document.createElement("td");var Ma=document.createElement("img");Ma.src="/images/icon-search.svg";Ma.className="geTempDlgDiagramListPreviewBtn";Ma.setAttribute("title",mxResources.get("preview"));Ca||Qa.appendChild(Ma);Oa=document.createElement("span");Oa.className="geTempDlgDiagramTitle";Oa.innerHTML=xa;Qa.appendChild(Oa);
+La.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Va;La.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Ha;La.appendChild(Qa);Ga.appendChild(La);null==M&&(F(la),z(La,"geTempDlgDiagramsListGridActive",ka[Da]));(function(Ia,Ta,Sa){mxEvent.addListener(La,"click",function(){M!=Ta&&(F(la),z(Ta,"geTempDlgDiagramsListGridActive",Ia))});mxEvent.addListener(La,"dblclick",G);mxEvent.addListener(Ma,"click",function(Wa){E(Ia,Ta,Sa,Wa)})})(ka[Da],La,Ma)}else{var Pa=document.createElement("div");
+Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",Oa);null==M&&(F(la),z(Pa,"geTempDlgDiagramTileActive",ka[Da]));Va=document.createElement("div");Va.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ia,Ta,Sa){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ia.style.display=""};Ra.onerror=function(){this.src!=Sa?this.src=Sa:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,
+Va,Qa?Qa.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Ra.src=Qa;Va.appendChild(Ra);Pa.appendChild(Va);Va=document.createElement("div");Va.className="geTempDlgDiagramTileLbl";Va.innerHTML=null!=xa?xa:"";Pa.appendChild(Va);Ma=document.createElement("img");Ma.src="/images/icon-search.svg";Ma.className="geTempDlgDiagramPreviewBtn";Ma.setAttribute("title",mxResources.get("preview"));Ca||Pa.appendChild(Ma);(function(Ia,Ta,Sa){mxEvent.addListener(Pa,"click",function(){M!=Ta&&(F(la),
+z(Ta,"geTempDlgDiagramTileActive",Ia))});mxEvent.addListener(Pa,"dblclick",G);mxEvent.addListener(Ma,"click",function(Wa){E(Ia,Ta,Sa,Wa)})})(ka[Da],Pa,Ma);ia.appendChild(Pa)}}for(var Ua in Aa)ka=Aa[Ua],0<ka.length&&(Ca=document.createElement("div"),Ca.className="geTempDlgImportCat",Ca.innerText=mxResources.get(Ua,null,Ua),ia.appendChild(Ca),U(ka,la,qa,null,!0))}function p(ka,la){ca.innerText="";z();var qa=Math.floor(ca.offsetWidth/150)-1;la=!la&&ka.length>qa?qa:ka.length;for(var Aa=0;Aa<la;Aa++){var Ca=
+ka[Aa];Ca.isCategory=!0;var Ga=document.createElement("div"),Da=mxResources.get(Ca.title);null==Da&&(Da=Ca.title.substring(0,1).toUpperCase()+Ca.title.substring(1));Ga.className="geTempDlgNewDiagramCatItem";Ga.setAttribute("title",Da);Da=mxUtils.htmlEntities(Da);15<Da.length&&(Da=Da.substring(0,15)+"&hellip;");null==M&&(F(!0),z(Ga,"geTempDlgNewDiagramCatItemActive",Ca));var xa=document.createElement("div");xa.className="geTempDlgNewDiagramCatItemImg";var ta=document.createElement("img");ta.src=NEW_DIAGRAM_CATS_PATH+
+"/"+Ca.img;xa.appendChild(ta);Ga.appendChild(xa);xa=document.createElement("div");xa.className="geTempDlgNewDiagramCatItemLbl";xa.innerHTML=Da;Ga.appendChild(xa);ca.appendChild(Ga);(function(Oa,Qa){mxEvent.addListener(Ga,"click",function(){M!=Qa&&(F(!0),z(Qa,"geTempDlgNewDiagramCatItemActive",Oa))});mxEvent.addListener(Ga,"dblclick",G)})(Ca,Ga)}Ga=document.createElement("div");Ga.className="geTempDlgNewDiagramCatItem";Da=mxResources.get("showAllTemps");Ga.setAttribute("title",Da);xa=document.createElement("div");
+xa.className="geTempDlgNewDiagramCatItemImg";xa.innerText="...";xa.style.fontSize="32px";Ga.appendChild(xa);xa=document.createElement("div");xa.className="geTempDlgNewDiagramCatItemLbl";xa.innerText=Da;Ga.appendChild(xa);ca.appendChild(Ga);mxEvent.addListener(Ga,"click",function(){function Oa(){var Va=Qa.querySelector(".geTemplateDrawioCatLink");null!=Va?Va.click():setTimeout(Oa,200)}da=!0;var Qa=P.querySelector(".geTemplatesList");Qa.style.display="block";za.style.width="";Ba.style.display="";Ba.value=
+"";aa=null;Oa()});Z.style.display=ka.length<=qa?"none":""}function v(ka,la,qa){function Aa(Ra,Ua){var Ia=mxResources.get(Ra);null==Ia&&(Ia=Ra.substring(0,1).toUpperCase()+Ra.substring(1));Ra=Ia+" ("+Ua.length+")";var Ta=Ia=mxUtils.htmlEntities(Ia);15<Ia.length&&(Ia=Ia.substring(0,15)+"&hellip;");return{lbl:Ia+" ("+Ua.length+")",fullLbl:Ra,lblOnly:Ta}}function Ca(Ra,Ua,Ia,Ta,Sa){mxEvent.addListener(Ia,"click",function(){n!=Ia&&(null!=n?(n.style.fontWeight="normal",n.style.textDecoration="none"):(ua.style.display=
+"none",ya.style.minHeight="100%"),n=Ia,n.style.fontWeight="bold",n.style.textDecoration="underline",za.scrollTop=0,V&&(W=!0),ea.innerHTML=Ua,va.style.display="none",U(Sa?la[Ra]:Ta?wa[Ra][Ta]:ka[Ra],Sa?!1:!0))})}var Ga=P.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"));Ga.appendChild(qa);for(var Da in la){qa=document.createElement("div");
+var xa=la[Da];xa=Aa(Da,xa);qa.className="geTemplateCatLink";qa.setAttribute("title",xa.fullLbl);qa.innerHTML=xa.lbl;Ga.appendChild(qa);Ca(Da,xa.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");Ga.appendChild(qa)}for(Da in ka){var ta=wa[Da],Oa=qa=document.createElement(ta?"ul":"div");xa=ka[Da];xa=Aa(Da,xa);if(null!=ta){var Qa=document.createElement("li"),
+Va=document.createElement("div");Va.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Va.style.padding="0";Va.setAttribute("title",xa.fullLbl);Va.innerHTML=xa.lbl;Oa=Va;Qa.appendChild(Va);var Ha=document.createElement("ul");Ha.className="geTempTreeNested";Ha.style.visibility="hidden";for(var La in ta){var Ma=document.createElement("li"),Pa=Aa(La,ta[La]);Ma.setAttribute("title",Pa.fullLbl);Ma.innerHTML=Pa.lbl;Ma.className="geTemplateCatLink";Ma.style.padding="0";Ma.style.margin=
+"0";Ca(Da,Pa.lblOnly,Ma,La);Ha.appendChild(Ma)}Qa.appendChild(Ha);qa.className="geTempTree";qa.appendChild(Qa);(function(Ra,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ia=Ra.querySelectorAll("li"),Ta=0;Ta<Ia.length;Ta++)Ia[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Sa=0;Sa<Ia.length;Sa++)Ia[Sa].style.margin="0";Ra.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ha,
+Va)}else qa.className="geTemplateCatLink geTemplateDrawioCatLink",qa.setAttribute("title",xa.fullLbl),qa.innerHTML=xa.lbl;Ga.appendChild(qa);Ca(Da,xa.lblOnly,Oa)}}function H(){mxUtils.get(c,function(ka){if(!ra){ra=!0;ka=ka.getXml().documentElement.firstChild;for(var la={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("clibs"==ka.nodeName){for(var qa=ka.getAttribute("name"),Aa=ka.getElementsByTagName("add"),Ca=[],Ga=0;Ga<Aa.length;Ga++)Ca.push(encodeURIComponent(mxUtils.getTextContent(Aa[Ga])));
+null!=qa&&0<Ca.length&&(la[qa]=Ca.join(";"))}else if(Ca=ka.getAttribute("url"),null!=Ca){Aa=ka.getAttribute("section");qa=ka.getAttribute("subsection");if(null==Aa&&(Ga=Ca.indexOf("/"),Aa=Ca.substring(0,Ga),null==qa)){var Da=Ca.indexOf("/",Ga+1);-1<Da&&(qa=Ca.substring(Ga+1,Da))}Ga=fa[Aa];null==Ga&&(sa++,Ga=[],fa[Aa]=Ga);Ca=ka.getAttribute("clibs");null!=la[Ca]&&(Ca=la[Ca]);Ca={url:ka.getAttribute("url"),libs:ka.getAttribute("libs"),title:ka.getAttribute("title")||ka.getAttribute("name"),preview:ka.getAttribute("preview"),
+clibs:Ca,tags:ka.getAttribute("tags")};Ga.push(Ca);null!=qa&&(Ga=wa[Aa],null==Ga&&(Ga={},wa[Aa]=Ga),Aa=Ga[qa],null==Aa&&(Aa=[],Ga[qa]=Aa),Aa.push(Ca))}ka=ka.nextSibling}v(fa,ja,oa)}})}function K(ka){t&&(za.scrollTop=0,ia.innerText="",na.spin(ia),W=!1,V=!0,ea.innerText=mxResources.get("recentDiag"),aa=null,t(pa,function(){q(mxResources.get("cannotLoad"));pa([])},ka?null:m))}function N(ka){if(""==ka)null!=D&&(D.click(),D=null);else{if(null==TemplatesDialog.tagsList[c]){var la={};for(Oa in fa)for(var qa=
+fa[Oa],Aa=0;Aa<qa.length;Aa++){var Ca=qa[Aa];if(null!=Ca.tags)for(var Ga=Ca.tags.toLowerCase().split(";"),Da=0;Da<Ga.length;Da++)null==la[Ga[Da]]&&(la[Ga[Da]]=[]),la[Ga[Da]].push(Ca)}TemplatesDialog.tagsList[c]=la}var xa=ka.toLowerCase().split(" ");la=TemplatesDialog.tagsList[c];if(0<oa&&null==la.__tagsList__){for(Oa in ja)for(qa=ja[Oa],Aa=0;Aa<qa.length;Aa++)for(Ca=qa[Aa],Ga=Ca.title.split(" "),Ga.push(Oa),Da=0;Da<Ga.length;Da++){var ta=Ga[Da].toLowerCase();null==la[ta]&&(la[ta]=[]);la[ta].push(Ca)}la.__tagsList__=
+!0}var Oa=[];qa={};for(Aa=Ga=0;Aa<xa.length;Aa++)if(0<xa[Aa].length){ta=la[xa[Aa]];var Qa={};Oa=[];if(null!=ta)for(Da=0;Da<ta.length;Da++)Ca=ta[Da],0==Ga==(null==qa[Ca.url])&&(Qa[Ca.url]=!0,Oa.push(Ca));qa=Qa;Ga++}0==Oa.length?ea.innerText=mxResources.get("noResultsFor",[ka]):U(Oa,!0)}}function I(ka){if(aa!=ka||R!=ba)u(),za.scrollTop=0,ia.innerText="",ea.innerText=mxResources.get("searchResults")+' "'+ka+'"',Ea=null,da?N(ka):y&&(ka?(na.spin(ia),W=!1,V=!0,y(ka,pa,function(){q(mxResources.get("searchFailed"));
+pa([])},R?null:m)):K(R)),aa=ka,ba=R}function L(ka){null!=Ea&&clearTimeout(Ea);13==ka.keyCode?I(Ba.value):Ea=setTimeout(function(){I(Ba.value)},1E3)}var Q='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(y?"":'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>'+
-(f?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(J?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",P=document.createElement("div");P.innerHTML=Q;P.className=
-"geTemplateDlg";this.container=P;c=null!=c?c:TEMPLATE_PATH+"/index.xml";l=null!=l?l:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,W=!1,q=null,D=null,M=null,T=null,O=!1,R=!0,S=!1,X=[],Y=null,aa,ba,da=!1,Z=P.querySelector(".geTempDlgShowAllBtn"),ia=P.querySelector(".geTempDlgDiagramsTiles"),ea=P.querySelector(".geTempDlgDiagramsListTitle"),va=P.querySelector(".geTempDlgDiagramsListBtns"),za=P.querySelector(".geTempDlgContent"),ya=P.querySelector(".geTempDlgDiagramsList"),ua=P.querySelector(".geTempDlgNewDiagramCat"),
-ca=P.querySelector(".geTempDlgNewDiagramCatList"),Na=P.querySelector(".geTempDlgCreateBtn"),Ka=P.querySelector(".geTempDlgOpenBtn"),Ba=P.querySelector(".geTempDlgSearchBox"),Fa=P.querySelector(".geTempDlgErrMsg"),na=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(P.querySelector(".geTempDlgBack"),"click",function(){v();da=!1;P.querySelector(".geTemplatesList").style.display="none";za.style.width=
+(e?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(J?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",P=document.createElement("div");P.innerHTML=Q;P.className=
+"geTemplateDlg";this.container=P;c=null!=c?c:TEMPLATE_PATH+"/index.xml";l=null!=l?l:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,W=!1,n=null,D=null,M=null,T=null,O=!1,R=!0,S=!1,X=[],Y=null,aa,ba,da=!1,Z=P.querySelector(".geTempDlgShowAllBtn"),ia=P.querySelector(".geTempDlgDiagramsTiles"),ea=P.querySelector(".geTempDlgDiagramsListTitle"),va=P.querySelector(".geTempDlgDiagramsListBtns"),za=P.querySelector(".geTempDlgContent"),ya=P.querySelector(".geTempDlgDiagramsList"),ua=P.querySelector(".geTempDlgNewDiagramCat"),
+ca=P.querySelector(".geTempDlgNewDiagramCatList"),Na=P.querySelector(".geTempDlgCreateBtn"),Ka=P.querySelector(".geTempDlgOpenBtn"),Ba=P.querySelector(".geTempDlgSearchBox"),Fa=P.querySelector(".geTempDlgErrMsg"),na=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(P.querySelector(".geTempDlgBack"),"click",function(){u();da=!1;P.querySelector(".geTemplatesList").style.display="none";za.style.width=
"100%";ua.style.display="";ya.style.minHeight="calc(100% - 280px)";Ba.style.display=y?"":"none";Ba.value="";aa=null;K(R)});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){x(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(R=!0,null==aa?K(R):I(aa))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){x(this,"geTempDlgMyDiagramsBtnImg",
"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(R=!1,null==aa?K(R):I(aa))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){x(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,U(X,!1,S,Y))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){x(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,U(X,!1,S,Y))});
var Ja=!1;mxEvent.addListener(Z,"click",function(){O?(ua.style.height="280px",ca.style.height="190px",Z.innerText=mxResources.get("showMore"),p(ma)):(ua.style.height="440px",ca.style.height="355px",Z.innerText=mxResources.get("showLess"),p(ma,!0));O=!O});var ra=!1,ha=!1,fa={},wa={},ja={},ma=[],sa=1,oa=0;null!=B?B(function(ka,la){ja=ka;oa=la;H()},H):H();mxUtils.get(l,function(ka){if(!ha){ha=!0;for(ka=ka.getXml().documentElement.firstChild;null!=ka;)"undefined"!==typeof ka.getAttribute&&null!=ka.getAttribute("title")&&
ma.push({img:ka.getAttribute("img"),libs:ka.getAttribute("libs"),clibs:ka.getAttribute("clibs"),title:ka.getAttribute("title")}),ka=ka.nextSibling;p(ma)}});var pa=function(ka,la,qa){va.style.display="";na.stop();V=!1;if(W)W=!1;else if(la)ia.innerText=la;else{qa=qa||{};la=0;for(var Aa in qa)la+=qa[Aa].length;0==ka.length&&0==la?ia.innerText=mxResources.get("noDiagrams"):U(ka,!1,S,0==la?null:qa)}};K(R);var Ea=null;mxEvent.addListener(Ba,"keyup",L);mxEvent.addListener(Ba,"search",L);mxEvent.addListener(Ba,
-"input",L);mxEvent.addListener(Na,"click",function(ka){G(!1,!1)});J&&mxEvent.addListener(Ka,"click",function(ka){G(!1,!0)});f&&mxEvent.addListener(P.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ka){G(!0)});mxEvent.addListener(P.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=e&&e();k||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
-var BtnDialog=function(b,d,e,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("done"));var t="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";d==b.drive?(t=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==b.dropbox?
+"input",L);mxEvent.addListener(Na,"click",function(ka){G(!1,!1)});J&&mxEvent.addListener(Ka,"click",function(ka){G(!1,!0)});e&&mxEvent.addListener(P.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ka){G(!0)});mxEvent.addListener(P.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();k||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+var BtnDialog=function(b,d,f,c){var l=document.createElement("div");l.style.textAlign="center";var m=document.createElement("p");m.style.fontSize="16pt";m.style.padding="0px";m.style.margin="0px";m.style.color="gray";mxUtils.write(m,mxResources.get("done"));var t="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";d==b.drive?(t=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==b.dropbox?
(t=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==b.oneDrive?(t=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==b.gitHub?(t=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):d==b.gitLab?(t=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg"):d==b.trello&&(t=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[t],"You are now authorized in {1}"));
-e=mxUtils.button(e,c);e.insertBefore(y,e.firstChild);e.style.marginTop="6px";e.className="geBigButton";e.style.fontSize="18px";e.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(e);this.container=l},FontDialog=function(b,d,e,c,l){function m(z){this.style.border="";13==z.keyCode&&E.click()}var t=document.createElement("table"),y=document.createElement("tbody");t.style.marginTop="8px";var C=document.createElement("tr");var A=document.createElement("td");A.colSpan=2;A.style.whiteSpace=
+f=mxUtils.button(f,c);f.insertBefore(y,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(m);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,d,f,c,l){function m(z){this.style.border="";13==z.keyCode&&E.click()}var t=document.createElement("table"),y=document.createElement("tbody");t.style.marginTop="8px";var C=document.createElement("tr");var A=document.createElement("td");A.colSpan=2;A.style.whiteSpace=
"nowrap";A.style.fontSize="10pt";A.style.fontWeight="bold";var B=document.createElement("input");B.style.cssText="margin-right:8px;margin-bottom:8px;";B.setAttribute("value","sysfonts");B.setAttribute("type","radio");B.setAttribute("name","current-fontdialog");B.setAttribute("id","fontdialog-sysfonts");A.appendChild(B);var J=document.createElement("label");J.setAttribute("for","fontdialog-sysfonts");mxUtils.write(J,mxResources.get("sysFonts",null,"System Fonts"));A.appendChild(J);C.appendChild(A);
-y.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.width="120px";A.style.paddingLeft="15px";mxUtils.write(A,mxResources.get("fontname",null,"Font Name")+":");C.appendChild(A);var f=document.createElement("input");"s"==c&&f.setAttribute("value",d);f.style.marginLeft="4px";f.style.width="250px";f.className="dlg_fontName_s";A=document.createElement("td");A.appendChild(f);C.appendChild(A);y.appendChild(C);C=document.createElement("tr");
+y.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.width="120px";A.style.paddingLeft="15px";mxUtils.write(A,mxResources.get("fontname",null,"Font Name")+":");C.appendChild(A);var e=document.createElement("input");"s"==c&&e.setAttribute("value",d);e.style.marginLeft="4px";e.style.width="250px";e.className="dlg_fontName_s";A=document.createElement("td");A.appendChild(e);C.appendChild(A);y.appendChild(C);C=document.createElement("tr");
A=document.createElement("td");A.colSpan=2;A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","googlefonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-googlefonts");A.appendChild(g);J=document.createElement("label");J.setAttribute("for","fontdialog-googlefonts");mxUtils.write(J,mxResources.get("googleFonts",
null,"Google Fonts"));A.appendChild(J);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(J=b.menus.createHelpLink("https://fonts.google.com/"),J.getElementsByTagName("img")[0].setAttribute("valign","middle"),A.appendChild(J));C.appendChild(A);y.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.width="120px";A.style.paddingLeft="15px";mxUtils.write(A,mxResources.get("fontname",null,"Font Name")+":");
-C.appendChild(A);var k=document.createElement("input");"g"==c&&k.setAttribute("value",d);k.style.marginLeft="4px";k.style.width="250px";k.className="dlg_fontName_g";A=document.createElement("td");A.appendChild(k);C.appendChild(A);y.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.colSpan=2;A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.fontWeight="bold";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value",
-"webfonts");n.setAttribute("type","radio");n.setAttribute("name","current-fontdialog");n.setAttribute("id","fontdialog-webfonts");A.appendChild(n);J=document.createElement("label");J.setAttribute("for","fontdialog-webfonts");mxUtils.write(J,mxResources.get("webfonts",null,"Web Fonts"));A.appendChild(J);C.appendChild(A);Editor.enableWebFonts&&y.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.width="120px";A.style.paddingLeft=
-"15px";mxUtils.write(A,mxResources.get("fontname",null,"Font Name")+":");C.appendChild(A);var v=document.createElement("input");"w"==c&&(Editor.enableWebFonts?v.setAttribute("value",d):f.setAttribute("value",d));v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_w";A=document.createElement("td");A.appendChild(v);C.appendChild(A);Editor.enableWebFonts&&y.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.style.whiteSpace="nowrap";A.style.fontSize="10pt";
-A.style.width="120px";A.style.paddingLeft="15px";mxUtils.write(A,mxResources.get("fontUrl",null,"Font URL")+":");C.appendChild(A);var x=document.createElement("input");x.setAttribute("value",e||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";A=document.createElement("td");A.appendChild(x);C.appendChild(A);Editor.enableWebFonts&&y.appendChild(C);this.init=function(){var z=f;"g"==c?z=k:"w"==c&&Editor.enableWebFonts&&(z=v);z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+C.appendChild(A);var k=document.createElement("input");"g"==c&&k.setAttribute("value",d);k.style.marginLeft="4px";k.style.width="250px";k.className="dlg_fontName_g";A=document.createElement("td");A.appendChild(k);C.appendChild(A);y.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.colSpan=2;A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value",
+"webfonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-webfonts");A.appendChild(q);J=document.createElement("label");J.setAttribute("for","fontdialog-webfonts");mxUtils.write(J,mxResources.get("webfonts",null,"Web Fonts"));A.appendChild(J);C.appendChild(A);Editor.enableWebFonts&&y.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.style.whiteSpace="nowrap";A.style.fontSize="10pt";A.style.width="120px";A.style.paddingLeft=
+"15px";mxUtils.write(A,mxResources.get("fontname",null,"Font Name")+":");C.appendChild(A);var u=document.createElement("input");"w"==c&&(Editor.enableWebFonts?u.setAttribute("value",d):e.setAttribute("value",d));u.style.marginLeft="4px";u.style.width="250px";u.className="dlg_fontName_w";A=document.createElement("td");A.appendChild(u);C.appendChild(A);Editor.enableWebFonts&&y.appendChild(C);C=document.createElement("tr");A=document.createElement("td");A.style.whiteSpace="nowrap";A.style.fontSize="10pt";
+A.style.width="120px";A.style.paddingLeft="15px";mxUtils.write(A,mxResources.get("fontUrl",null,"Font URL")+":");C.appendChild(A);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";A=document.createElement("td");A.appendChild(x);C.appendChild(A);Editor.enableWebFonts&&y.appendChild(C);this.init=function(){var z=e;"g"==c?z=k:"w"==c&&Editor.enableWebFonts&&(z=u);z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
z.select():document.execCommand("selectAll",!1,null)};C=document.createElement("tr");A=document.createElement("td");A.colSpan=2;A.style.paddingTop="20px";A.style.whiteSpace="nowrap";A.setAttribute("align","right");b.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),d.className="geBtn",A.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});d.className="geBtn";b.editor.cancelFirst&&A.appendChild(d);
-var E=mxUtils.button(mxResources.get("apply"),function(){if(B.checked){var z=f.value;var G="s"}else if(g.checked){z=k.value;var F=Editor.GOOGLE_FONTS+encodeURIComponent(z).replace(/%20/g,"+");G="g"}else n.checked&&(z=v.value,F=x.value,G="w");var U=F;var p=G,u=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==z||0==z.length?(t.querySelector(".dlg_fontName_"+p).style.border="1px solid red",U=!1):"w"!=p||u.test(U)?U=!0:(t.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",U=!1);U&&(l(z,F,G),b.hideDialog())});E.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keypress",m);mxEvent.addListener(k,"keypress",m);mxEvent.addListener(v,"keypress",m);mxEvent.addListener(x,"keypress",m);mxEvent.addListener(f,"focus",function(){B.setAttribute("checked","checked");B.checked=!0});mxEvent.addListener(k,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(v,"focus",function(){n.setAttribute("checked","checked");n.checked=
-!0});mxEvent.addListener(x,"focus",function(){n.setAttribute("checked","checked");n.checked=!0});A.appendChild(E);b.editor.cancelFirst||A.appendChild(d);C.appendChild(A);y.appendChild(C);t.appendChild(y);this.container=t};
-function AspectDialog(b,d,e,c,l){this.aspect={pageId:d||(b.pages?b.pages[0].getId():null),layerIds:e||[]};d=document.createElement("div");var m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("pages"));d.appendChild(m);e=document.createElement("div");e.className="geAspectDlgList";d.appendChild(e);m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("layers"));d.appendChild(m);m=document.createElement("div");m.className="geAspectDlgList";
-d.appendChild(m);this.pagesContainer=e;this.layersContainer=m;this.ui=b;e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="center";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&e.appendChild(m);var t=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));e.appendChild(t);t.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||e.appendChild(m);t.setAttribute("disabled","disabled");this.okBtn=t;d.appendChild(e);this.container=d}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var d=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(d.getId(),d.getName(),d.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
-AspectDialog.prototype.createViewer=function(b,d,e,c){mxEvent.disableContextMenu(b);b.style.userSelect="none";var l=new Graph(b);l.setTooltips(!1);l.setEnabled(!1);l.setPanning(!1);l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;d="mxGraphModel"==d.nodeName?d:Editor.parseDiagramNode(d);if(null!=d){var m=d.getAttribute("background");if(null==m||""==m||m==mxConstants.NONE)m=null!=c?c:"#ffffff";b.style.backgroundColor=m;c=new mxCodec(d.ownerDocument);b=l.getModel();c.decode(d,b);d=b.getChildCount(b.root);
-c=null==e;for(m=0;m<d;m++){var t=b.getChildAt(b.root,m);b.setVisible(t,c||e==t.id)}l.maxFitScale=1;l.fit(0);l.center()}return l};
-AspectDialog.prototype.createPageItem=function(b,d,e){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.pagesContainer.appendChild(c);var l=this.createViewer(c.childNodes[0],e);d=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
-this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var m=l.model;m=m.getChildCells(m.getRoot());for(var t=0;t<m.length;t++)this.createLayerItem(m[t],b,l,e)});mxEvent.addListener(c,"click",d);this.aspect.pageId==b&&d()};
-AspectDialog.prototype.createLayerItem=function(b,d,e,c){d=e.convertValueToString(b)||mxResources.get("background")||"Background";var l=document.createElement("div");l.setAttribute("data-layer-id",b.id);l.className="geAspectDlgListItem";l.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.layersContainer.appendChild(l);this.createViewer(l.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=l.className.indexOf("geAspectDlgListItemSelected")?
+var E=mxUtils.button(mxResources.get("apply"),function(){if(B.checked){var z=e.value;var G="s"}else if(g.checked){z=k.value;var F=Editor.GOOGLE_FONTS+encodeURIComponent(z).replace(/%20/g,"+");G="g"}else q.checked&&(z=u.value,F=x.value,G="w");var U=F;var p=G,v=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==z||0==z.length?(t.querySelector(".dlg_fontName_"+p).style.border="1px solid red",U=!1):"w"!=p||v.test(U)?U=!0:(t.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",U=!1);U&&(l(z,F,G),b.hideDialog())});E.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",m);mxEvent.addListener(k,"keypress",m);mxEvent.addListener(u,"keypress",m);mxEvent.addListener(x,"keypress",m);mxEvent.addListener(e,"focus",function(){B.setAttribute("checked","checked");B.checked=!0});mxEvent.addListener(k,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(u,"focus",function(){q.setAttribute("checked","checked");q.checked=
+!0});mxEvent.addListener(x,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});A.appendChild(E);b.editor.cancelFirst||A.appendChild(d);C.appendChild(A);y.appendChild(C);t.appendChild(y);this.container=t};
+function AspectDialog(b,d,f,c,l){this.aspect={pageId:d||(b.pages?b.pages[0].getId():null),layerIds:f||[]};d=document.createElement("div");var m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("pages"));d.appendChild(m);f=document.createElement("div");f.className="geAspectDlgList";d.appendChild(f);m=document.createElement("h5");m.style.margin="0 0 10px";mxUtils.write(m,mxResources.get("layers"));d.appendChild(m);m=document.createElement("div");m.className="geAspectDlgList";
+d.appendChild(m);this.pagesContainer=f;this.layersContainer=m;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);var t=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(t);t.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||f.appendChild(m);t.setAttribute("disabled","disabled");this.okBtn=t;d.appendChild(f);this.container=d}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var d=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(d.getId(),d.getName(),d.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+AspectDialog.prototype.createViewer=function(b,d,f,c){mxEvent.disableContextMenu(b);b.style.userSelect="none";var l=new Graph(b);l.setTooltips(!1);l.setEnabled(!1);l.setPanning(!1);l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;d="mxGraphModel"==d.nodeName?d:Editor.parseDiagramNode(d);if(null!=d){var m=d.getAttribute("background");if(null==m||""==m||m==mxConstants.NONE)m=null!=c?c:"#ffffff";b.style.backgroundColor=m;c=new mxCodec(d.ownerDocument);b=l.getModel();c.decode(d,b);d=b.getChildCount(b.root);
+c=null==f;for(m=0;m<d;m++){var t=b.getChildAt(b.root,m);b.setVisible(t,c||f==t.id)}l.maxFitScale=1;l.fit(0);l.center()}return l};
+AspectDialog.prototype.createPageItem=function(b,d,f){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.pagesContainer.appendChild(c);var l=this.createViewer(c.childNodes[0],f);d=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
+this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var m=l.model;m=m.getChildCells(m.getRoot());for(var t=0;t<m.length;t++)this.createLayerItem(m[t],b,l,f)});mxEvent.addListener(c,"click",d);this.aspect.pageId==b&&d()};
+AspectDialog.prototype.createLayerItem=function(b,d,f,c){d=f.convertValueToString(b)||mxResources.get("background")||"Background";var l=document.createElement("div");l.setAttribute("data-layer-id",b.id);l.className="geAspectDlgListItem";l.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(d)+"</div>";this.layersContainer.appendChild(l);this.createViewer(l.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=l.className.indexOf("geAspectDlgListItemSelected")?
(l.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(l.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(l,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
-var FilePropertiesDialog=function(b){var d=document.createElement("table"),e=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";var c=b.getCurrentFile();var l=null!=c&&null!=c.getTitle()?c.getTitle():b.defaultFilename;var m=function(){};if(/(\.png)$/i.test(l)){m=1;var t=0;l=b.fileNode;null!=l&&(l.hasAttribute("scale")&&(m=parseFloat(l.getAttribute("scale"))),l.hasAttribute("border")&&(t=parseInt(l.getAttribute("border"))));l=document.createElement("tr");var y=document.createElement("td");
-y.style.whiteSpace="nowrap";y.style.fontSize="10pt";y.style.width="120px";mxUtils.write(y,mxResources.get("zoom")+":");l.appendChild(y);var C=document.createElement("input");C.setAttribute("value",100*m+"%");C.style.marginLeft="4px";C.style.width="180px";y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(C);l.appendChild(y);e.appendChild(l);l=document.createElement("tr");y=document.createElement("td");y.style.whiteSpace="nowrap";y.style.fontSize="10pt";y.style.width="120px";
-mxUtils.write(y,mxResources.get("borderWidth")+":");l.appendChild(y);var A=document.createElement("input");A.setAttribute("value",t);A.style.marginLeft="4px";A.style.width="180px";y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(A);l.appendChild(y);e.appendChild(l);this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};m=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
+var FilePropertiesDialog=function(b){var d=document.createElement("table"),f=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";var c=b.getCurrentFile();var l=null!=c&&null!=c.getTitle()?c.getTitle():b.defaultFilename;var m=function(){};if(/(\.png)$/i.test(l)){m=1;var t=0;l=b.fileNode;null!=l&&(l.hasAttribute("scale")&&(m=parseFloat(l.getAttribute("scale"))),l.hasAttribute("border")&&(t=parseInt(l.getAttribute("border"))));l=document.createElement("tr");var y=document.createElement("td");
+y.style.whiteSpace="nowrap";y.style.fontSize="10pt";y.style.width="120px";mxUtils.write(y,mxResources.get("zoom")+":");l.appendChild(y);var C=document.createElement("input");C.setAttribute("value",100*m+"%");C.style.marginLeft="4px";C.style.width="180px";y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(C);l.appendChild(y);f.appendChild(l);l=document.createElement("tr");y=document.createElement("td");y.style.whiteSpace="nowrap";y.style.fontSize="10pt";y.style.width="120px";
+mxUtils.write(y,mxResources.get("borderWidth")+":");l.appendChild(y);var A=document.createElement("input");A.setAttribute("value",t);A.style.marginLeft="4px";A.style.width="180px";y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(A);l.appendChild(y);f.appendChild(l);this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};m=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
parseInt(C.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(A.value))),null!=c&&c.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(l)&&!/(\.svg)$/i.test(l)){var B=null!=c?c.isCompressed():Editor.compressXml;l=document.createElement("tr");y=document.createElement("td");y.style.whiteSpace="nowrap";y.style.fontSize="10pt";y.style.width="120px";mxUtils.write(y,mxResources.get("compressed")+":");l.appendChild(y);var J=document.createElement("input");J.setAttribute("type","checkbox");
-B&&(J.setAttribute("checked","checked"),J.defaultChecked=!0);y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(J);l.appendChild(y);e.appendChild(l);this.init=function(){J.focus()};m=function(){null!=b.fileNode&&B!=J.checked&&(b.fileNode.setAttribute("compressed",J.checked?"true":"false"),null!=c&&c.fileChanged());b.hideDialog()}}if(null!=c&&c.isRealtimeOptional()){l=document.createElement("tr");y=document.createElement("td");y.style.whiteSpace="nowrap";y.style.fontSize="10pt";
-y.style.width="120px";mxUtils.write(y,mxResources.get("realtimeCollaboration")+":");l.appendChild(y);var f=document.createElement("input");f.setAttribute("type","checkbox");var g=c.isRealtimeEnabled();if(g="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))f.setAttribute("checked","checked"),f.defaultChecked=!0;prevApply=m;m=function(){prevApply();b.hideDialog();f.checked!=g&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(f.checked,mxUtils.bind(this,
-function(k){b.spinner.stop()}),mxUtils.bind(this,function(k){b.spinner.stop();b.showError(mxResources.get("error"),null!=k&&null!=k.error?k.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){f.focus()};y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(f);y.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));l.appendChild(y);e.appendChild(l)}this.init=null!=this.init?this.init:
-function(){};m=mxUtils.button(mxResources.get("apply"),m);m.className="geBtn gePrimaryBtn";l=document.createElement("tr");y=document.createElement("td");y.colSpan=2;y.style.paddingTop="20px";y.style.whiteSpace="nowrap";y.setAttribute("align","center");t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&y.appendChild(t);y.appendChild(m);b.editor.cancelFirst||y.appendChild(t);l.appendChild(y);e.appendChild(l);d.appendChild(e);this.container=
-d},ConnectionPointsDialog=function(b,d){function e(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function m(N,I){N=new mxCell("",new mxGeometry(N,I,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");N.vertex=!0;N.cp=!0;return J.addCell(N)}function t(N){N=J.getSelectionCells();J.deleteCells(N)}function y(){var N=parseInt(p.value)||0;N=0>N?0:100<N?100:N;
-p.value=N;var I=parseInt(H.value)||0;I=0>I?0:100<I?100:I;H.value=I;var L=parseInt(u.value)||0,Q=parseInt(K.value)||0;N=J.getConnectionPoint(k,new mxConnectionConstraint(new mxPoint(N/100,I/100),!1,null,L,Q));I=J.getSelectionCell();if(null!=I){L=I.geometry.clone();Q=J.view.scale;var P=J.view.translate;L.x=(N.x-3*Q)/Q-P.x;L.y=(N.y-3*Q)/Q-P.y;J.model.setGeometry(I,L)}}function C(N){var I=0,L=0,Q=f.geometry,P=mxUtils.format((N.geometry.x+3-Q.x)/Q.width);N=mxUtils.format((N.geometry.y+3-Q.y)/Q.height);
-0>P?(I=P*Q.width,P=0):1<P&&(I=(P-1)*Q.width,P=1);0>N?(L=N*Q.height,N=0):1<N&&(L=(N-1)*Q.height,N=1);return{x:P,y:N,dx:parseInt(I),dy:parseInt(L)}}function A(){if(1==J.getSelectionCount()){var N=J.getSelectionCell();N=C(N);p.value=100*N.x;H.value=100*N.y;u.value=N.dx;K.value=N.dy;U.style.visibility=""}else U.style.visibility="hidden"}var B=document.createElement("div");B.style.width="350px";B.style.height="350px";B.style.overflow="hidden";B.style.border="1px solid lightGray";B.style.boxSizing="border-box";
-mxEvent.disableContextMenu(B);c.appendChild(B);var J=new Graph(B);J.autoExtend=!1;J.autoScroll=!1;J.setGridEnabled(!1);J.setEnabled(!0);J.setPanning(!0);J.setConnectable(!1);J.setTooltips(!1);J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;J.maxFitScale=2;B=d.geometry;var f=new mxCell(d.value,new mxGeometry(0,0,B.width,B.height),d.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");f.vertex=!0;J.addCell(f);J.dblClick=function(N,I){if(null!=I&&I!=f)J.setSelectionCell(I);else{I=
-mxUtils.convertPoint(J.container,mxEvent.getClientX(N),mxEvent.getClientY(N));mxEvent.consume(N);N=J.view.scale;var L=J.view.translate;J.setSelectionCell(m((I.x-3*N)/N-L.x,(I.y-3*N)/N-L.y))}};l=new mxKeyHandler(J);l.bindKey(46,t);l.bindKey(8,t);J.getRubberband().isForceRubberbandEvent=function(N){return 0==N.evt.button&&(null==N.getCell()||N.getCell()==f)};J.panningHandler.isForcePanningEvent=function(N){return 2==N.evt.button};var g=J.isCellSelectable;J.isCellSelectable=function(N){return N==f?!1:
-g.apply(this,arguments)};J.getLinkForCell=function(){return null};var k=J.view.getState(f);B=J.getAllConnectionConstraints(k);for(var n=0;null!=B&&n<B.length;n++){var v=J.getConnectionPoint(k,B[n]);m(v.x-3,v.y-3)}J.fit(8);J.center();n=mxUtils.button("",function(){J.zoomIn()});n.className="geSprite geSprite-zoomin";n.setAttribute("title",mxResources.get("zoomIn"));n.style.position="relative";n.style.outline="none";n.style.border="none";n.style.margin="2px";n.style.cursor="pointer";n.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(n,60);v=mxUtils.button("",function(){J.zoomOut()});v.className="geSprite geSprite-zoomout";v.setAttribute("title",mxResources.get("zoomOut"));v.style.position="relative";v.style.outline="none";v.style.border="none";v.style.margin="2px";v.style.cursor="pointer";v.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(v,60);var x=mxUtils.button("",function(){J.fit(8);J.center()});x.className="geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.position=
+B&&(J.setAttribute("checked","checked"),J.defaultChecked=!0);y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(J);l.appendChild(y);f.appendChild(l);this.init=function(){J.focus()};m=function(){null!=b.fileNode&&B!=J.checked&&(b.fileNode.setAttribute("compressed",J.checked?"true":"false"),null!=c&&c.fileChanged());b.hideDialog()}}if(null!=c&&c.isRealtimeOptional()){l=document.createElement("tr");y=document.createElement("td");y.style.whiteSpace="nowrap";y.style.fontSize="10pt";
+y.style.width="120px";mxUtils.write(y,mxResources.get("realtimeCollaboration")+":");l.appendChild(y);var e=document.createElement("input");e.setAttribute("type","checkbox");var g=c.isRealtimeEnabled();if(g="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))e.setAttribute("checked","checked"),e.defaultChecked=!0;prevApply=m;m=function(){prevApply();b.hideDialog();e.checked!=g&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(e.checked,mxUtils.bind(this,
+function(k){b.spinner.stop()}),mxUtils.bind(this,function(k){b.spinner.stop();b.showError(mxResources.get("error"),null!=k&&null!=k.error?k.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){e.focus()};y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(e);y.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));l.appendChild(y);f.appendChild(l)}this.init=null!=this.init?this.init:
+function(){};m=mxUtils.button(mxResources.get("apply"),m);m.className="geBtn gePrimaryBtn";l=document.createElement("tr");y=document.createElement("td");y.colSpan=2;y.style.paddingTop="20px";y.style.whiteSpace="nowrap";y.setAttribute("align","center");t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&y.appendChild(t);y.appendChild(m);b.editor.cancelFirst||y.appendChild(t);l.appendChild(y);f.appendChild(l);d.appendChild(f);this.container=
+d},ConnectionPointsDialog=function(b,d){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function m(N,I){N=new mxCell("",new mxGeometry(N,I,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");N.vertex=!0;N.cp=!0;return J.addCell(N)}function t(N){N=J.getSelectionCells();J.deleteCells(N)}function y(){var N=parseInt(p.value)||0;N=0>N?0:100<N?100:N;
+p.value=N;var I=parseInt(H.value)||0;I=0>I?0:100<I?100:I;H.value=I;var L=parseInt(v.value)||0,Q=parseInt(K.value)||0;N=J.getConnectionPoint(k,new mxConnectionConstraint(new mxPoint(N/100,I/100),!1,null,L,Q));I=J.getSelectionCell();if(null!=I){L=I.geometry.clone();Q=J.view.scale;var P=J.view.translate;L.x=(N.x-3*Q)/Q-P.x;L.y=(N.y-3*Q)/Q-P.y;J.model.setGeometry(I,L)}}function C(N){var I=0,L=0,Q=e.geometry,P=mxUtils.format((N.geometry.x+3-Q.x)/Q.width);N=mxUtils.format((N.geometry.y+3-Q.y)/Q.height);
+0>P?(I=P*Q.width,P=0):1<P&&(I=(P-1)*Q.width,P=1);0>N?(L=N*Q.height,N=0):1<N&&(L=(N-1)*Q.height,N=1);return{x:P,y:N,dx:parseInt(I),dy:parseInt(L)}}function A(){if(1==J.getSelectionCount()){var N=J.getSelectionCell();N=C(N);p.value=100*N.x;H.value=100*N.y;v.value=N.dx;K.value=N.dy;U.style.visibility=""}else U.style.visibility="hidden"}var B=document.createElement("div");B.style.width="350px";B.style.height="350px";B.style.overflow="hidden";B.style.border="1px solid lightGray";B.style.boxSizing="border-box";
+mxEvent.disableContextMenu(B);c.appendChild(B);var J=new Graph(B);J.autoExtend=!1;J.autoScroll=!1;J.setGridEnabled(!1);J.setEnabled(!0);J.setPanning(!0);J.setConnectable(!1);J.setTooltips(!1);J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;J.maxFitScale=2;B=d.geometry;var e=new mxCell(d.value,new mxGeometry(0,0,B.width,B.height),d.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");e.vertex=!0;J.addCell(e);J.dblClick=function(N,I){if(null!=I&&I!=e)J.setSelectionCell(I);else{I=
+mxUtils.convertPoint(J.container,mxEvent.getClientX(N),mxEvent.getClientY(N));mxEvent.consume(N);N=J.view.scale;var L=J.view.translate;J.setSelectionCell(m((I.x-3*N)/N-L.x,(I.y-3*N)/N-L.y))}};l=new mxKeyHandler(J);l.bindKey(46,t);l.bindKey(8,t);J.getRubberband().isForceRubberbandEvent=function(N){return 0==N.evt.button&&(null==N.getCell()||N.getCell()==e)};J.panningHandler.isForcePanningEvent=function(N){return 2==N.evt.button};var g=J.isCellSelectable;J.isCellSelectable=function(N){return N==e?!1:
+g.apply(this,arguments)};J.getLinkForCell=function(){return null};var k=J.view.getState(e);B=J.getAllConnectionConstraints(k);for(var q=0;null!=B&&q<B.length;q++){var u=J.getConnectionPoint(k,B[q]);m(u.x-3,u.y-3)}J.fit(8);J.center();q=mxUtils.button("",function(){J.zoomIn()});q.className="geSprite geSprite-zoomin";q.setAttribute("title",mxResources.get("zoomIn"));q.style.position="relative";q.style.outline="none";q.style.border="none";q.style.margin="2px";q.style.cursor="pointer";q.style.top=mxClient.IS_FF?
+"-6px":"0px";mxUtils.setOpacity(q,60);u=mxUtils.button("",function(){J.zoomOut()});u.className="geSprite geSprite-zoomout";u.setAttribute("title",mxResources.get("zoomOut"));u.style.position="relative";u.style.outline="none";u.style.border="none";u.style.margin="2px";u.style.cursor="pointer";u.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(u,60);var x=mxUtils.button("",function(){J.fit(8);J.center()});x.className="geSprite geSprite-fit";x.setAttribute("title",mxResources.get("fit"));x.style.position=
"relative";x.style.outline="none";x.style.border="none";x.style.margin="2px";x.style.cursor="pointer";x.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(x,60);var E=mxUtils.button("",function(){J.zoomActual();J.center()});E.className="geSprite geSprite-actualsize";E.setAttribute("title",mxResources.get("actualSize"));E.style.position="relative";E.style.outline="none";E.style.border="none";E.style.margin="2px";E.style.cursor="pointer";E.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(E,
-60);var z=mxUtils.button("",t);z.className="geSprite geSprite-delete";z.setAttribute("title",mxResources.get("delete"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.float="right";z.style.cursor="pointer";mxUtils.setOpacity(z,10);B=document.createElement("div");B.appendChild(n);B.appendChild(v);B.appendChild(E);B.appendChild(x);B.appendChild(z);c.appendChild(B);var G=document.createElement("input");G.setAttribute("type","number");G.setAttribute("min",
-"1");G.setAttribute("value","1");G.style.width="45px";G.style.position="relative";G.style.top=mxClient.IS_FF?"0px":"-4px";G.style.margin="0 4px 0 4px";B.appendChild(G);var F=document.createElement("select");F.style.position="relative";F.style.top=mxClient.IS_FF?"0px":"-4px";v=["left","right","top","bottom"];for(n=0;n<v.length;n++)x=v[n],E=document.createElement("option"),mxUtils.write(E,mxResources.get(x)),E.value=x,F.appendChild(E);B.appendChild(F);n=mxUtils.button(mxResources.get("add"),function(){var N=
-parseInt(G.value);N=1>N?1:100<N?100:N;G.value=N;for(var I=F.value,L=f.geometry,Q=[],P=0;P<N;P++){switch(I){case "left":var V=L.x;var W=L.y+(P+1)*L.height/(N+1);break;case "right":V=L.x+L.width;W=L.y+(P+1)*L.height/(N+1);break;case "top":V=L.x+(P+1)*L.width/(N+1);W=L.y;break;case "bottom":V=L.x+(P+1)*L.width/(N+1),W=L.y+L.height}Q.push(m(V-3,W-3))}J.setSelectionCells(Q)});n.style.position="relative";n.style.marginLeft="8px";n.style.top=mxClient.IS_FF?"0px":"-4px";B.appendChild(n);var U=document.createElement("div");
-U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";B=document.createElement("span");mxUtils.write(B,mxResources.get("dx"));U.appendChild(B);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.setAttribute("max","100");p.style.width="45px";p.style.margin="0 4px 0 4px";U.appendChild(p);mxUtils.write(U,"%");var u=document.createElement("input");u.setAttribute("type","number");u.style.width="45px";u.style.margin="0 4px 0 4px";
-U.appendChild(u);mxUtils.write(U,"pt");B=document.createElement("span");mxUtils.write(B,mxResources.get("dy"));B.style.marginLeft="12px";U.appendChild(B);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";U.appendChild(H);mxUtils.write(U,"%");var K=document.createElement("input");K.setAttribute("type","number");K.style.width="45px";K.style.margin="0 4px 0 4px";U.appendChild(K);
-mxUtils.write(U,"pt");c.appendChild(U);A();J.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<J.getSelectionCount()?mxUtils.setOpacity(z,60):mxUtils.setOpacity(z,10);A()});J.addListener(mxEvent.CELLS_MOVED,A);mxEvent.addListener(p,"change",y);mxEvent.addListener(H,"change",y);mxEvent.addListener(u,"change",y);mxEvent.addListener(K,"change",y);B=mxUtils.button(mxResources.get("cancel"),function(){e();b.hideDialog()});B.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){var N=
-J.model.cells,I=[],L=[],Q;for(Q in N){var P=N[Q];P.cp&&L.push(C(P))}L.sort(function(V,W){return V.x!=W.x?V.x-W.x:V.y!=W.y?V.y-W.y:V.dx!=W.dx?V.dx-W.dx:V.dy-W.dy});for(N=0;N<L.length;N++)0<N&&L[N].x==L[N-1].x&&L[N].y==L[N-1].y&&L[N].dx==L[N-1].dx&&L[N].dy==L[N-1].dy||I.push("["+L[N].x+","+L[N].y+",0,"+L[N].dx+","+L[N].dy+"]");b.editor.graph.setCellStyles("points","["+I.join(",")+"]",[d]);e();b.hideDialog()});n.className="geBtn gePrimaryBtn";v=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[d]);e();b.hideDialog()});v.className="geBtn";x=document.createElement("div");x.style.marginTop="10px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(B),x.appendChild(v),x.appendChild(n)):(x.appendChild(v),x.appendChild(n),x.appendChild(B));c.appendChild(x)};this.destroy=e;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.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,
-fontUrl:decodeURIComponent(Editor.sketchFontSource)}];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"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",
-gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},
-{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
+60);var z=mxUtils.button("",t);z.className="geSprite geSprite-delete";z.setAttribute("title",mxResources.get("delete"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.float="right";z.style.cursor="pointer";mxUtils.setOpacity(z,10);B=document.createElement("div");B.appendChild(q);B.appendChild(u);B.appendChild(E);B.appendChild(x);B.appendChild(z);c.appendChild(B);var G=document.createElement("input");G.setAttribute("type","number");G.setAttribute("min",
+"1");G.setAttribute("value","1");G.style.width="45px";G.style.position="relative";G.style.top=mxClient.IS_FF?"0px":"-4px";G.style.margin="0 4px 0 4px";B.appendChild(G);var F=document.createElement("select");F.style.position="relative";F.style.top=mxClient.IS_FF?"0px":"-4px";u=["left","right","top","bottom"];for(q=0;q<u.length;q++)x=u[q],E=document.createElement("option"),mxUtils.write(E,mxResources.get(x)),E.value=x,F.appendChild(E);B.appendChild(F);q=mxUtils.button(mxResources.get("add"),function(){var N=
+parseInt(G.value);N=1>N?1:100<N?100:N;G.value=N;for(var I=F.value,L=e.geometry,Q=[],P=0;P<N;P++){switch(I){case "left":var V=L.x;var W=L.y+(P+1)*L.height/(N+1);break;case "right":V=L.x+L.width;W=L.y+(P+1)*L.height/(N+1);break;case "top":V=L.x+(P+1)*L.width/(N+1);W=L.y;break;case "bottom":V=L.x+(P+1)*L.width/(N+1),W=L.y+L.height}Q.push(m(V-3,W-3))}J.setSelectionCells(Q)});q.style.position="relative";q.style.marginLeft="8px";q.style.top=mxClient.IS_FF?"0px":"-4px";B.appendChild(q);var U=document.createElement("div");
+U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";B=document.createElement("span");mxUtils.write(B,mxResources.get("dx"));U.appendChild(B);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.setAttribute("max","100");p.style.width="45px";p.style.margin="0 4px 0 4px";U.appendChild(p);mxUtils.write(U,"%");var v=document.createElement("input");v.setAttribute("type","number");v.style.width="45px";v.style.margin="0 4px 0 4px";
+U.appendChild(v);mxUtils.write(U,"pt");B=document.createElement("span");mxUtils.write(B,mxResources.get("dy"));B.style.marginLeft="12px";U.appendChild(B);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";U.appendChild(H);mxUtils.write(U,"%");var K=document.createElement("input");K.setAttribute("type","number");K.style.width="45px";K.style.margin="0 4px 0 4px";U.appendChild(K);
+mxUtils.write(U,"pt");c.appendChild(U);A();J.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<J.getSelectionCount()?mxUtils.setOpacity(z,60):mxUtils.setOpacity(z,10);A()});J.addListener(mxEvent.CELLS_MOVED,A);mxEvent.addListener(p,"change",y);mxEvent.addListener(H,"change",y);mxEvent.addListener(v,"change",y);mxEvent.addListener(K,"change",y);B=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});B.className="geBtn";q=mxUtils.button(mxResources.get("apply"),function(){var N=
+J.model.cells,I=[],L=[],Q;for(Q in N){var P=N[Q];P.cp&&L.push(C(P))}L.sort(function(V,W){return V.x!=W.x?V.x-W.x:V.y!=W.y?V.y-W.y:V.dx!=W.dx?V.dx-W.dx:V.dy-W.dy});for(N=0;N<L.length;N++)0<N&&L[N].x==L[N-1].x&&L[N].y==L[N-1].y&&L[N].dx==L[N-1].dx&&L[N].dy==L[N-1].dy||I.push("["+L[N].x+","+L[N].y+",0,"+L[N].dx+","+L[N].dy+"]");b.editor.graph.setCellStyles("points","["+I.join(",")+"]",[d]);f();b.hideDialog()});q.className="geBtn gePrimaryBtn";u=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[d]);f();b.hideDialog()});u.className="geBtn";x=document.createElement("div");x.style.marginTop="10px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(B),x.appendChild(u),x.appendChild(q)):(x.appendChild(u),x.appendChild(q),x.appendChild(B));c.appendChild(x)};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.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];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"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},
+commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",
+fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.userImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+";
Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==";
@@ -11212,121 +11220,123 @@ Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP/////
Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=";
Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
-Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
-"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,D){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
-D){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,D){return"1"==
-mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,D){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
-{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
-dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
-dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&&
-0==q.edges.length&&D.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&D.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,D){q=D.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},
-isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&D.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,D){q=D.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,D){D=D.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&D.isTable(q.vertices[0])}},{name:"fillOpacity",
-dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
-defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,D){return D.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,D){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
-{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,D){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;D=D.editorUi.editor.graph;return null!=q&&(D.isSwimlane(q)||0<D.model.getChildCount(q))},
-isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,D){var M=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;D=D.editorUi.editor.graph;return null!=M&&(D.isContainer(M)&&"0"!=q.style.collapsible||!D.isContainer(M)&&"1"==q.style.collapsible)},isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(q,D){return 1==q.vertices.length&&0==q.edges.length&&!D.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,D){D=D.editorUi.editor.graph.model;return 0<q.vertices.length?D.isVertex(D.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,D){q=0<q.vertices.length?D.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{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(q,D){var M=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return D.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==M||M==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,D){return 0<q.vertices.length&&
-D.editorUi.editor.graph.isContainer(q.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(q){var D=rough.canvas({getContext:function(){return q}});D.draw=function(M){var T=M.sets||[];M=M.options||this.getDefaultOptions();for(var O=0;O<T.length;O++){var R=T[O];switch(R.type){case "path":null!=M.stroke&&this._drawToContext(q,R,M);break;case "fillPath":this._drawToContext(q,R,M);break;case "fillSketch":this.fillSketch(q,R,M)}}};D.fillSketch=function(M,T,O){var R=q.state.strokeColor,S=q.state.strokeWidth,X=q.state.strokeAlpha,Y=q.state.dashed,aa=O.fillWeight;
-0>aa&&(aa=O.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(O.fill||"");q.setStrokeWidth(aa);q.setDashed(!1);this._drawToContext(M,T,O);q.setDashed(Y);q.setStrokeWidth(S);q.setStrokeColor(R);q.setStrokeAlpha(X)};D._drawToContext=function(M,T,O){M.begin();for(var R=0;R<T.ops.length;R++){var S=T.ops[R],X=S.data;switch(S.op){case "move":M.moveTo(X[0],X[1]);break;case "bcurveTo":M.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":M.lineTo(X[0],X[1])}}M.end();"fillPath"===
-T.type&&O.filled?M.fill():M.stroke()};return D};(function(){function q(R,S,X){this.canvas=R;this.rc=S;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
-mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,q.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(R,S){var X=1;if(null!=this.shape.state){var Y=this.shape.state.cell.id;if(null!=Y)for(var aa=0;aa<Y.length;aa++)X=(X<<5)-X+Y.charCodeAt(aa)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};Y=this.rc.getDefaultOptions();X.stroke=R?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
+Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.enableSimpleTheme="1"==urlParams["live-ui"];
+Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=
+null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(n){n.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(n,D){return"1"!=mxUtils.getValue(n.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",
+type:"float",min:0,defVal:1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"comic","0")||"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?
+"1":"0")&&0<n.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(n,D){return"1"==
+mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",
+type:"int",defVal:-1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},
+{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},
+{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(n){return"orthogonalEdgeStyle"==
+mxUtils.getValue(n.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",
+dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",
+dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(n,
+D){D=D.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&D.isTableCell(n.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(n,D){D=D.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&D.isTableCell(n.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(n,D){n=D.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:
+null);return"1"==mxUtils.getValue(n,"resizeLastRow","0")},isVisible:function(n,D){D=D.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&D.isTable(n.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(n,D){n=D.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null);return"1"==mxUtils.getValue(n,"resizeLast","0")},isVisible:function(n,D){D=D.editorUi.editor.graph;return 1==n.vertices.length&&
+0==n.edges.length&&D.isTable(n.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",
+defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},
+{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(n,D){return D.editorUi.editor.graph.isCellConnectable(0<n.vertices.length&&0==n.edges.length?n.vertices[0]:null)},isVisible:function(n,D){return 0<n.vertices.length&&0==n.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",
+dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",
+dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(n,D){return 1==n.vertices.length&&0==n.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(n,D){n=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;D=D.editorUi.editor.graph;
+return null!=n&&(D.isSwimlane(n)||0<D.model.getChildCount(n))},isVisible:function(n,D){return 1==n.vertices.length&&0==n.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(n,D){var M=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;D=D.editorUi.editor.graph;return null!=M&&(D.isContainer(M)&&"0"!=n.style.collapsible||!D.isContainer(M)&&"1"==n.style.collapsible)},isVisible:function(n,D){return 1==n.vertices.length&&0==n.edges.length}},{name:"recursiveResize",
+dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(n,D){return 1==n.vertices.length&&0==n.edges.length&&!D.editorUi.editor.graph.isSwimlane(n.vertices[0])&&null==mxUtils.getValue(n.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(n,D){D=D.editorUi.editor.graph.model;return 0<n.vertices.length?D.isVertex(D.getParent(n.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",
+defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(n,D){n=0<n.vertices.length?D.editorUi.editor.graph.getCellGeometry(n.vertices[0]):null;return null!=n&&!n.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",
+type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",
+type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(n,D){var M=mxUtils.getValue(n.style,mxConstants.STYLE_FILLCOLOR,null);return D.editorUi.editor.graph.isSwimlane(n.vertices[0])||null==M||M==mxConstants.NONE||0==mxUtils.getValue(n.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(n.style,mxConstants.STYLE_OPACITY,100)||null!=n.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(n,
+D){return 0<n.vertices.length&&D.editorUi.editor.graph.isContainer(n.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(n){var D=rough.canvas({getContext:function(){return n}});D.draw=function(M){var T=M.sets||[];M=M.options||this.getDefaultOptions();for(var O=0;O<T.length;O++){var R=T[O];switch(R.type){case "path":null!=M.stroke&&this._drawToContext(n,R,M);break;case "fillPath":this._drawToContext(n,R,M);break;case "fillSketch":this.fillSketch(n,R,M)}}};D.fillSketch=function(M,T,O){var R=n.state.strokeColor,S=n.state.strokeWidth,X=n.state.strokeAlpha,Y=n.state.dashed,aa=O.fillWeight;
+0>aa&&(aa=O.strokeWidth/2);n.setStrokeAlpha(n.state.fillAlpha);n.setStrokeColor(O.fill||"");n.setStrokeWidth(aa);n.setDashed(!1);this._drawToContext(M,T,O);n.setDashed(Y);n.setStrokeWidth(S);n.setStrokeColor(R);n.setStrokeAlpha(X)};D._drawToContext=function(M,T,O){M.begin();for(var R=0;R<T.ops.length;R++){var S=T.ops[R],X=S.data;switch(S.op){case "move":M.moveTo(X[0],X[1]);break;case "bcurveTo":M.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":M.lineTo(X[0],X[1])}}M.end();"fillPath"===
+T.type&&O.filled?M.fill():M.stroke()};return D};(function(){function n(R,S,X){this.canvas=R;this.rc=S;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,n.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,n.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,n.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+mxUtils.bind(this,n.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,n.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,n.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,n.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,n.prototype.fillAndStroke);
+this.path=[];this.passThrough=!1}n.prototype.moveOp="M";n.prototype.lineOp="L";n.prototype.quadOp="Q";n.prototype.curveOp="C";n.prototype.closeOp="Z";n.prototype.getStyle=function(R,S){var X=1;if(null!=this.shape.state){var Y=this.shape.state.cell.id;if(null!=Y)for(var aa=0;aa<Y.length;aa++)X=(X<<5)-X+Y.charCodeAt(aa)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};Y=this.rc.getDefaultOptions();X.stroke=R?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
mxConstants.NONE;R=null;(X.filled=S)?(X.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,R=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",Y.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",Y.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",Y.curveFitting);X.roughness=mxUtils.getValue(this.shape.style,"jiggle",
Y.roughness);X.simplification=mxUtils.getValue(this.shape.style,"simplification",Y.simplification);X.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",Y.disableMultiStroke);X.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",Y.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);X.hachureGap="auto"==S?-1:S;X.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);X.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
-S);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=X.fill&&(null!=R||null!=S&&X.fill==S)?"solid":Y.fillStyle);X.fillStyle=S;return X};q.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
-arguments):this.path=[]};q.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};q.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))};q.prototype.lineTo=function(R,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
-R,S),this.lastX=R,this.lastY=S)};q.prototype.moveTo=function(R,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,R,S),this.lastX=R,this.lastY=S,this.firstX=R,this.firstY=S)};q.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};q.prototype.quadTo=function(R,S,X,Y){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,R,S,X,Y),this.lastX=X,this.lastY=Y)};
-q.prototype.curveTo=function(R,S,X,Y,aa,ba){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,R,S,X,Y,aa,ba),this.lastX=aa,this.lastY=ba)};q.prototype.arcTo=function(R,S,X,Y,aa,ba,da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Z=mxUtils.arcToCurves(this.lastX,this.lastY,R,S,X,Y,aa,ba,da);if(null!=Z)for(var ia=0;ia<Z.length;ia+=6)this.curveTo(Z[ia],Z[ia+1],Z[ia+2],Z[ia+3],Z[ia+4],Z[ia+5]);this.lastX=ba;this.lastY=da}};q.prototype.rect=
-function(R,S,X,Y){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(R,S,X,Y,this.getStyle(!0,!0)))};q.prototype.ellipse=function(R,S,X,Y){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(R+X/2,S+Y/2,X,Y,this.getStyle(!0,!0)))};q.prototype.roundrect=function(R,S,X,Y,aa,ba){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(R+
-aa,S),this.lineTo(R+X-aa,S),this.quadTo(R+X,S,R+X,S+ba),this.lineTo(R+X,S+Y-ba),this.quadTo(R+X,S+Y,R+X-aa,S+Y),this.lineTo(R+aa,S+Y),this.quadTo(R,S+Y,R,S+Y-ba),this.lineTo(R,S+ba),this.quadTo(R,S,R+aa,S))};q.prototype.drawPath=function(R){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),R)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in R)this.nextShape.options[S]=R[S];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}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
-!0))};q.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(R){return new q(R,Editor.createRoughCanvas(R),this)};var D=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(R){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?D.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(R):
-this.createRoughCanvas(R)};var M=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(R,S,X,Y,aa){null!=R.handJiggle&&R.handJiggle.passThrough||M.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(R){var S=R.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=R.handJiggle&&R.handJiggle.constructor==q&&!this.outline){R.save();var Y=this.fill,aa=this.stroke;this.stroke=
+S);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=X.fill&&(null!=R||null!=S&&X.fill==S)?"solid":Y.fillStyle);X.fillStyle=S;return X};n.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
+arguments):this.path=[]};n.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};n.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var 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))};n.prototype.lineTo=function(R,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
+R,S),this.lastX=R,this.lastY=S)};n.prototype.moveTo=function(R,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,R,S),this.lastX=R,this.lastY=S,this.firstX=R,this.firstY=S)};n.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};n.prototype.quadTo=function(R,S,X,Y){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,R,S,X,Y),this.lastX=X,this.lastY=Y)};
+n.prototype.curveTo=function(R,S,X,Y,aa,ba){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,R,S,X,Y,aa,ba),this.lastX=aa,this.lastY=ba)};n.prototype.arcTo=function(R,S,X,Y,aa,ba,da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Z=mxUtils.arcToCurves(this.lastX,this.lastY,R,S,X,Y,aa,ba,da);if(null!=Z)for(var ia=0;ia<Z.length;ia+=6)this.curveTo(Z[ia],Z[ia+1],Z[ia+2],Z[ia+3],Z[ia+4],Z[ia+5]);this.lastX=ba;this.lastY=da}};n.prototype.rect=
+function(R,S,X,Y){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(R,S,X,Y,this.getStyle(!0,!0)))};n.prototype.ellipse=function(R,S,X,Y){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(R+X/2,S+Y/2,X,Y,this.getStyle(!0,!0)))};n.prototype.roundrect=function(R,S,X,Y,aa,ba){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(R+
+aa,S),this.lineTo(R+X-aa,S),this.quadTo(R+X,S,R+X,S+ba),this.lineTo(R+X,S+Y-ba),this.quadTo(R+X,S+Y,R+X-aa,S+Y),this.lineTo(R+aa,S+Y),this.quadTo(R,S+Y,R,S+Y-ba),this.lineTo(R,S+ba),this.quadTo(R,S,R+aa,S))};n.prototype.drawPath=function(R){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),R)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in R)this.nextShape.options[S]=R[S];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}};n.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};n.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};n.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+!0))};n.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;
+this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(R){return new n(R,Editor.createRoughCanvas(R),this)};var D=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(R){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?D.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(R):
+this.createRoughCanvas(R)};var M=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(R,S,X,Y,aa){null!=R.handJiggle&&R.handJiggle.passThrough||M.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(R){var S=R.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=R.handJiggle&&R.handJiggle.constructor==n&&!this.outline){R.save();var Y=this.fill,aa=this.stroke;this.stroke=
this.fill=null;var ba=this.configurePointerEvents,da=R.setStrokeColor;R.setStrokeColor=function(){};var Z=R.setFillColor;R.setFillColor=function(){};X||null==Y||(this.configurePointerEvents=function(){});R.handJiggle.passThrough=!0;T.apply(this,arguments);R.handJiggle.passThrough=!1;R.setFillColor=Z;R.setStrokeColor=da;this.configurePointerEvents=ba;this.stroke=aa;this.fill=Y;R.restore();X&&null!=Y&&(R.addTolerance=function(){})}T.apply(this,arguments);R.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;
-mxShape.prototype.paintGlassEffect=function(R,S,X,Y,aa,ba){null!=R.handJiggle&&R.handJiggle.constructor==q?(R.handJiggle.passThrough=!0,O.apply(this,arguments),R.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};
-Editor.extractGraphModel=function(q,D,M){if(null!=q&&"undefined"!==typeof pako){var T=q.ownerDocument.getElementsByTagName("div"),O=[];if(null!=T&&0<T.length)for(var R=0;R<T.length;R++)if("mxgraph"==T[R].getAttribute("class")){O.push(T[R]);break}0<O.length&&(T=O[0].getAttribute("data-mxgraph"),null!=T?(O=JSON.parse(T),null!=O&&null!=O.xml&&(q=mxUtils.parseXml(O.xml),q=q.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(T=mxUtils.getTextContent(O[0]),T=Graph.decompress(T,null,M),0<
-T.length&&(q=mxUtils.parseXml(T),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(T=q.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)q=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||D||(O=null,"diagram"==q.nodeName?O=q:"mxfile"==q.nodeName&&(T=q.getElementsByTagName("diagram"),0<T.length&&
-(O=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=O&&(q=Editor.parseDiagramNode(O,M)));null==q||"mxGraphModel"==q.nodeName||D&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,D){var M=mxUtils.trim(mxUtils.getTextContent(q)),T=null;0<M.length?(q=Graph.decompress(M,null,D),null!=q&&0<q.length&&(T=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(T=mxUtils.createXmlDocument(),T.appendChild(T.importNode(q[0],!0)),T=T.documentElement));
-return T};Editor.getDiagramNodeXml=function(q){var D=mxUtils.getTextContent(q),M=null;0<D.length?M=Graph.decompress(D):null!=q.firstChild&&(M=mxUtils.getXml(q.firstChild));return M};Editor.extractGraphModelFromPdf=function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var D=q.indexOf("EmbeddedFile");if(-1<D){var M=q.indexOf("stream",D)+9;if(0<q.substring(D,M).indexOf("application#2Fvnd.jgraph.mxfile"))return D=q.indexOf("endstream",
-M-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(M,D)),{to:"string"})}return null}M=null;D="";for(var T=0,O=0,R=[],S=null;O<q.length;){var X=q.charCodeAt(O);O+=1;10!=X&&(D+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var Y=q.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(Y>O){M=q.substring(O,Y);break}}10==X&&("endobj"==D?S=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(S=[],R[D.split(" ")[0]]=S):null!=S&&S.push(D),D="")}null==M&&(M=
-Editor.extractGraphModelFromXref(R));null!=M&&(M=decodeURIComponent(M.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return M};Editor.extractGraphModelFromXref=function(q){var D=q.trailer,M=null;null!=D&&(D=/.* \/Info (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(D=q[D[1]],null!=D&&(D=/.* \/Subject (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(q=q[D[1]],null!=q&&(q=q.join("\n"),M=q.substring(1,q.length-1))))));return M};Editor.extractParserError=function(q,D){var M=null;q=null!=
-q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(M=D||mxResources.get("invalidChars"),D=q[0].getElementsByTagName("div"),0<D.length&&(M=mxUtils.getTextContent(D[0])));return null!=M?mxUtils.trim(M):M};Editor.addRetryToError=function(q,D){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=D))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
-q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;
-q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=q.globalVars&&(Editor.globalVars=q.globalVars);null!=q.compressXml&&(Editor.compressXml=q.compressXml);null!=q.includeDiagram&&(Editor.defaultIncludeDiagram=q.includeDiagram);null!=q.simpleLabels&&(Editor.simpleLabels=q.simpleLabels);null!=q.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
-q.oneDriveInlinePicker);null!=q.darkColor&&(Editor.darkColor=q.darkColor);null!=q.lightColor&&(Editor.lightColor=q.lightColor);null!=q.settingsName&&(Editor.configurationKey="."+q.settingsName+"-configuration",Editor.settingsKey="."+q.settingsName+"-config",mxSettings.key=Editor.settingsKey);q.customFonts&&(Menus.prototype.defaultFonts=q.customFonts.concat(Menus.prototype.defaultFonts));q.customPresetColors&&(ColorDialog.prototype.presetColors=q.customPresetColors.concat(ColorDialog.prototype.presetColors));
-null!=q.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=q.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=q.css){var D=document.createElement("style");D.setAttribute("type","text/css");D.appendChild(document.createTextNode(q.css));var M=document.getElementsByTagName("script")[0];M.parentNode.insertBefore(D,M)}null!=q.libraries&&(Sidebar.prototype.customEntries=q.libraries);null!=q.enabledLibraries&&(Array.isArray(q.enabledLibraries)?Sidebar.prototype.enabledLibraries=
-q.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=q.defaultLibraries&&(Sidebar.prototype.defaultEntries=q.defaultLibraries);null!=q.defaultCustomLibraries&&(Editor.defaultCustomLibraries=q.defaultCustomLibraries);null!=q.enableCustomLibraries&&(Editor.enableCustomLibraries=q.enableCustomLibraries);null!=q.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=q.defaultVertexStyle);null!=q.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=q.defaultEdgeStyle);
-null!=q.defaultPageVisible&&(Graph.prototype.defaultPageVisible=q.defaultPageVisible);null!=q.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=q.defaultGridEnabled);null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(D=parseFloat(q.zoomFactor),!isNaN(D)&&1<D?Graph.prototype.zoomFactor=D:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=q.gridSteps&&(D=parseInt(q.gridSteps),!isNaN(D)&&0<D?mxGraphView.prototype.gridSteps=D:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=q.pageFormat&&(D=parseInt(q.pageFormat.width),M=parseInt(q.pageFormat.height),!isNaN(D)&&0<D&&!isNaN(M)&&0<M?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,D,M),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(D=parseInt(q.sidebarTitleSize),!isNaN(D)&&0<D?Sidebar.prototype.sidebarTitleSize=D:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
-null!=q.autosaveDelay&&(D=parseInt(q.autosaveDelay),!isNaN(D)&&0<D?DrawioFile.prototype.autosaveDelay=D:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};
-Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var D=document.getElementsByTagName("script")[0];if(null!=D&&null!=D.parentNode){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(q));D.parentNode.insertBefore(M,D);q=q.split("url(");for(M=1;M<q.length;M++){var T=q[M].indexOf(")");T=Editor.trimCssUrl(q[M].substring(0,T));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",T);
-O.setAttribute("as","font");O.setAttribute("crossorigin","");D.parentNode.insertBefore(O,D)}}}};Editor.trimCssUrl=function(q){return q.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(q){q=null!=q?q:Editor.GUID_LENGTH;for(var D=[],M=0;M<q;M++)D.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*
-Editor.GUID_ALPHABET.length)));return D.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(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var D=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(D)throw EditorUi.debug("Editor.setGraphXml ParserError",
-[this],"node",[q],"cause",[D]),Error(mxResources.get("notADiagramFile")+" ("+D+")");if("mxGraphModel"==q.nodeName){D=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=D&&""!=D)D!=this.graph.currentStyle&&(M=null!=this.graph.themes?this.graph.themes[D]:mxUtils.load(STYLE_PATH+"/"+D+".xml").getDocumentElement(),null!=M&&(T=new mxCodec(M.ownerDocument),T.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 T=new mxCodec(M.ownerDocument);T.decode(M,this.graph.getStylesheet())}}this.graph.currentStyle=D;this.graph.mathEnabled="1"==urlParams.math||"1"==q.getAttribute("math");D=q.getAttribute("backgroundImage");null!=D?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(D)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
-this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(D=q.getAttribute("extFonts"))try{for(D=D.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),M=0;M<D.length;M++)this.graph.addExtFont(D[M].name,D[M].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
-};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,D){q=null!=q?q:!0;var M=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&M.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,D);null!=T&&M.setAttribute("backgroundImage",JSON.stringify(T));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&&(T=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),M.setAttribute("extFonts",T.join("|")));return M};Editor.prototype.isDataSvg=function(q){try{var D=mxUtils.parseXml(q).documentElement.getAttribute("content");if(null!=D&&(null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(cont,D))),null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D)),null!=D&&0<D.length)){var M=mxUtils.parseXml(D).documentElement;return"mxfile"==
-M.nodeName||"mxGraphModel"==M.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(q,D,M){return Editor.extractGraphModel.apply(this,arguments)};var e=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();e.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(q,D){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),MathJax.typeset([O]),
-Editor.onMathJaxDone()}catch(R){MathJax.typesetClear([O]),null!=R.retry?R.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+R.toString())}};window.MathJax=null!=D?D:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}};
-Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,arguments);var O=mxUtils.bind(this,function(R,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
-O);this.graph.addListener(mxEvent.REFRESH,O)};D=document.getElementsByTagName("script");if(null!=D&&0<D.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",q);D[0].parentNode.appendChild(T)}}};Editor.prototype.csvToArray=function(q){if(0<q.length){var D="",M=[""],T=0,O=!0,R;q=$jscomp.makeIterator(q);for(R=q.next();!R.done;R=q.next())R=R.value,'"'===R?(O&&R===D&&(M[T]+=R),O=!O):","===R&&O?R=M[++T]="":M[T]+=R,D=R;return M}return[]};Editor.prototype.getProxiedUrl=
-function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var D=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);D=/\.png$/i.test(q)||/\.pdf$/i.test(q)||D;var M="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+M+(D?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.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(q)||"https://raw.githubusercontent.com/"===q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var D=q.convert,M=this;q.convert=function(T){if(null!=
-T){var O="http://"==T.substring(0,7)||"https://"==T.substring(0,8);O&&!navigator.onLine?T=Editor.svgBrokenImage.src:!O||T.substring(0,q.baseUrl.length)==q.baseUrl||M.crossOriginImages&&M.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=D.apply(this,arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=
-function(q,D){try{var M=!0,T=window.setTimeout(mxUtils.bind(this,function(){M=!1;D(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(R){window.clearTimeout(T);M&&D(Editor.createSvgDataUri(R.getText()))}),function(){window.clearTimeout(T);M&&D(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(T);if(M)try{var R=document.createElement("canvas"),S=R.getContext("2d");
-R.height=O.height;R.width=O.width;S.drawImage(O,0,0);D(R.toDataURL())}catch(X){D(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(T);M&&D(Editor.svgBrokenImage.src)};O.src=q}}catch(R){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,D,M,T){null==T&&(T=this.createImageUrlConverter());var O=0,R=M||{};M=mxUtils.bind(this,function(S,X){S=q.getElementsByTagName(S);for(var Y=0;Y<S.length;Y++)mxUtils.bind(this,function(aa){try{if(null!=aa){var ba=T.convert(aa.getAttribute(X));
-if(null!=ba&&"data:"!=ba.substring(0,5)){var da=R[ba];null==da?(O++,this.convertImageToDataUri(ba,function(Z){null!=Z&&(R[ba]=Z,aa.setAttribute(X,Z));O--;0==O&&D(q)})):aa.setAttribute(X,da)}else null!=ba&&aa.setAttribute(X,ba)}}catch(Z){}})(S[Y])});M("image","xlink:href");M("img","src");0==O&&D(q)};Editor.base64Encode=function(q){for(var D="",M=0,T=q.length,O,R,S;M<T;){O=q.charCodeAt(M++)&255;if(M==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4);D+="==";break}R=q.charCodeAt(M++);if(M==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(R&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2);D+="=";break}S=q.charCodeAt(M++);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4|(R&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2|(S&192)>>6);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return D};Editor.prototype.loadUrl=function(q,D,M,T,O,R,S,X){try{var Y=!S&&(T||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));O=null!=O?O:!0;var aa=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(ba){if(200<=ba.getStatus()&&
-299>=ba.getStatus()){if(null!=D){var da=ba.getText();if(Y){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){ba=mxUtilsBinaryToArray(ba.request.responseBody).toArray();da=Array(ba.length);for(var Z=0;Z<ba.length;Z++)da[Z]=String.fromCharCode(ba[Z]);da=da.join("")}R=null!=R?R:"data:image/png;base64,";da=R+Editor.base64Encode(da)}D(da)}}else null!=M&&(0==ba.getStatus()?M({message:mxResources.get("accessDenied")},ba):404==ba.getStatus()?M({code:ba.getStatus()},
-ba):M({message:mxResources.get("error")+" "+ba.getStatus()},ba))}),function(ba){null!=M&&M({message:mxResources.get("error")+" "+ba.getStatus()})},Y,this.timeout,function(){O&&null!=M&&M({code:App.ERROR_TIMEOUT,retry:aa})},X)});aa()}catch(ba){null!=M&&M(ba)}};Editor.prototype.absoluteCssFonts=function(q){var D=null;if(null!=q){var M=q.split("url(");if(0<M.length){D=[M[0]];q=window.location.pathname;var T=null!=q?q.lastIndexOf("/"):-1;0<=T&&(q=q.substring(0,T+1));T=document.getElementsByTagName("base");
-var O=null;null!=T&&0<T.length&&(O=T[0].getAttribute("href"));for(var R=1;R<M.length;R++)if(T=M[R].indexOf(")"),0<T){var S=Editor.trimCssUrl(M[R].substring(0,T));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":q)+S);D.push('url("'+S+'"'+M[R].substring(T))}else D.push(M[R])}else D=[q]}return null!=D?D.join(""):null};Editor.prototype.mapFontUrl=function(q,D,M){/^https?:\/\//.test(D)&&!this.isCorsEnabledForUrl(D)&&(D=PROXY_URL+"?url="+
-encodeURIComponent(D));M(q,D)};Editor.prototype.embedCssFonts=function(q,D){var M=q.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==T){for(var Y=[M[0]],aa=1;aa<M.length;aa++){var ba=M[aa].indexOf(")");Y.push('url("');Y.push(this.cachedFonts[Editor.trimCssUrl(M[aa].substring(0,ba))]);Y.push('"'+M[aa].substring(ba))}D(Y.join(""))}});if(0<M.length){for(q=1;q<M.length;q++){var R=M[q].indexOf(")"),S=null,X=M[q].indexOf("format(",R);0<X&&(S=Editor.trimCssUrl(M[q].substring(X+
-7,M[q].indexOf(")",X))));mxUtils.bind(this,function(Y){if(null==this.cachedFonts[Y]){this.cachedFonts[Y]=Y;T++;var aa="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(Y))aa="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(Y))aa="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(Y))aa="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(Y))aa="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(Y))aa="application/vnd.ms-fontobject";
-else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(Y))aa="application/font-sfnt";this.mapFontUrl(aa,Y,mxUtils.bind(this,function(ba,da){this.loadUrl(da,mxUtils.bind(this,function(Z){this.cachedFonts[Y]=Z;T--;O()}),mxUtils.bind(this,function(Z){T--;O()}),!0,null,"data:"+ba+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(M[q].substring(0,R)),S)}O()}else D(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(D){this.resolvedFontCss=
-D;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},D;for(D in Graph.fontMapping)Graph.isCssFontUrl(D)&&(q[D]=Graph.fontMapping[D]);return q};Editor.prototype.embedExtFonts=function(q){var D=this.graph.getCustomFonts();if(0<D.length){var M=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(M.join(""),q)}),R=0;R<D.length;R++)mxUtils.bind(this,function(S,X){Graph.isCssFontUrl(X)?
-null==this.cachedGoogleFonts[X]?(T++,this.loadUrl(X,mxUtils.bind(this,function(Y){this.cachedGoogleFonts[X]=Y;M.push(Y+"\n");T--;O()}),mxUtils.bind(this,function(Y){T--;M.push("@import url("+X+");\n");O()}))):M.push(this.cachedGoogleFonts[X]+"\n"):M.push('@font-face {font-family: "'+S+'";src: url("'+X+'")}\n')})(D[R].name,D[R].url);O()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var D=document.getElementsByTagName("style"),M=0;M<D.length;M++){var T=
-mxUtils.getTextContent(D[M]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&q[0].appendChild(D[M].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,D){D=null!=D?D:this.absoluteCssFonts(this.fontCss);if(null!=D){var M=q.getElementsByTagName("defs"),T=q.ownerDocument;0==M.length?(M=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=q.firstChild?q.insertBefore(M,q.firstChild):q.appendChild(M)):M=M[0];q=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,
-"style"):T.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,D);M.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,D,M){var T=mxClient.IS_FF?8192:16384;return Math.min(M,Math.min(T/q,T/D))};Editor.prototype.exportToCanvas=function(q,D,M,T,O,R,S,X,Y,aa,ba,da,Z,ia,ea,va,za,ya){try{R=null!=R?R:!0;S=null!=S?S:!0;da=null!=da?da:this.graph;Z=null!=Z?Z:0;var ua=
-Y?null:da.background;ua==mxConstants.NONE&&(ua=null);null==ua&&(ua=T);null==ua&&0==Y&&(ua=va?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(da.getSvg(null,null,Z,ia,null,S,null,null,null,aa,null,va,za,ya),mxUtils.bind(this,function(ca){try{var Na=new Image;Na.onload=mxUtils.bind(this,function(){try{var Ba=function(){mxClient.IS_SF?window.setTimeout(function(){ra.drawImage(Na,0,0);q(Fa,ca)},0):(ra.drawImage(Na,0,0),q(Fa,ca))},Fa=document.createElement("canvas"),na=parseInt(ca.getAttribute("width")),
-Ja=parseInt(ca.getAttribute("height"));X=null!=X?X:1;null!=D&&(X=R?Math.min(1,Math.min(3*D/(4*Ja),D/na)):D/na);X=this.getMaxCanvasScale(na,Ja,X);na=Math.ceil(X*na);Ja=Math.ceil(X*Ja);Fa.setAttribute("width",na);Fa.setAttribute("height",Ja);var ra=Fa.getContext("2d");null!=ua&&(ra.beginPath(),ra.rect(0,0,na,Ja),ra.fillStyle=ua,ra.fill());1!=X&&ra.scale(X,X);if(ea){var ha=da.view,fa=ha.scale;ha.scale=1;var wa=btoa(unescape(encodeURIComponent(ha.createSvgGrid(ha.gridColor))));ha.scale=fa;wa="data:image/svg+xml;base64,"+
-wa;var ja=da.gridSize*ha.gridSteps*X,ma=da.getGraphBounds(),sa=ha.translate.x*fa,oa=ha.translate.y*fa,pa=sa+(ma.x-sa)/fa-Z,Ea=oa+(ma.y-oa)/fa-Z,ka=new Image;ka.onload=function(){try{for(var la=-Math.round(ja-mxUtils.mod((sa-pa)*X,ja)),qa=-Math.round(ja-mxUtils.mod((oa-Ea)*X,ja));la<na;la+=ja)for(var Aa=qa;Aa<Ja;Aa+=ja)ra.drawImage(ka,la/X,Aa/X);Ba()}catch(Ca){null!=O&&O(Ca)}};ka.onerror=function(la){null!=O&&O(la)};ka.src=wa}else Ba()}catch(la){null!=O&&O(la)}});Na.onerror=function(Ba){null!=O&&O(Ba)};
-aa&&this.graph.addSvgShadow(ca);this.graph.mathEnabled&&this.addMathCss(ca);var Ka=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ca,this.resolvedFontCss),Na.src=Editor.createSvgDataUri(mxUtils.getXml(ca))}catch(Ba){null!=O&&O(Ba)}});this.embedExtFonts(mxUtils.bind(this,function(Ba){try{null!=Ba&&this.addFontCss(ca,Ba),this.loadFonts(Ka)}catch(Fa){null!=O&&O(Fa)}}))}catch(Ba){null!=O&&O(Ba)}}),M,ba)}catch(ca){null!=O&&O(ca)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var m=
-l,t=0;8>t;t++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[l]=m;Editor.updateCRC=function(q,D,M,T){for(var O=0;O<T;O++)q=Editor.crcTable[(q^D.charCodeAt(M+O))&255]^q>>>8;return q};Editor.crc32=function(q){for(var D=-1,M=0;M<q.length;M++)D=D>>>8^Editor.crcTable[(D^q.charCodeAt(M))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(q,D,M,T,O){function R(ba,da){var Z=Y;Y+=da;return ba.substring(Z,Y)}function S(ba){ba=R(ba,4);return ba.charCodeAt(3)+(ba.charCodeAt(2)<<8)+(ba.charCodeAt(1)<<
-16)+(ba.charCodeAt(0)<<24)}function X(ba){return String.fromCharCode(ba>>24&255,ba>>16&255,ba>>8&255,ba&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var Y=0;if(R(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(R(q,4),"IHDR"!=R(q,4))null!=O&&O();else{R(q,17);O=q.substring(0,Y);do{var aa=S(q);if("IDAT"==R(q,4)){O=q.substring(0,Y-8);"pHYs"==D&&"dpi"==M?(M=Math.round(T/.0254),M=X(M)+X(M)+String.fromCharCode(1)):M=M+String.fromCharCode(0)+
-("zTXt"==D?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,D,0,4);T=Editor.updateCRC(T,M,0,M.length);O+=X(M.length)+D+M+X(T^4294967295);O+=q.substring(Y-8,q.length);break}O+=q.substring(Y-8,Y-4+aa);R(q,aa);R(q,4)}while(aa);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,D){y.apply(this,
-arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var C=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){C.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,D){var M=null;null!=q.editor.graph.getModel().getParent(D)?M=D.getId():null!=q.currentPage&&(M=q.currentPage.getId());return M});if(null!=window.StyleFormatPanel){var A=Format.prototype.init;
-Format.prototype.init=function(){A.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var B=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?B.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(q){return!1};var J=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=J.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var D=this.editorUi,M=D.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return M.shadowVisible},function(O){var R=new ChangePageSetup(D);R.ignoreColor=!0;R.ignoreImage=!0;R.shadowVisible=O;M.model.execute(R)},{install:function(O){this.listener=function(){O(M.shadowVisible)};
-D.addListener("shadowVisibleChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});Editor.enableShadowOption||(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));q.appendChild(T)}return q};var f=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=f.apply(this,arguments);var D=this.editorUi,M=D.editor.graph;if(M.isEnabled()){var T=D.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var O=
-this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(S){D.editor.setAutosave(S);D.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(S){this.listener=function(){S(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}});q.appendChild(O)}}if(this.isMathOptionVisible()&&M.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return M.mathEnabled},function(S){D.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(M.mathEnabled)};D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});O.style.paddingTop="5px";q.appendChild(O);var R=D.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");R.style.position="relative";R.style.marginLeft="6px";R.style.top="2px";O.appendChild(R)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",
-dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",
-type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",
-dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
-[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=
-[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",
-type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",
-type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxShape.prototype.paintGlassEffect=function(R,S,X,Y,aa,ba){null!=R.handJiggle&&R.handJiggle.constructor==n?(R.handJiggle.passThrough=!0,O.apply(this,arguments),R.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?n:Graph.arrayBufferToString(pako.deflateRaw(n))};Editor.fastDecompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?n:pako.inflateRaw(Graph.stringToArrayBuffer(atob(n)),{to:"string"})};
+Editor.extractGraphModel=function(n,D,M){if(null!=n&&"undefined"!==typeof pako){var T=n.ownerDocument.getElementsByTagName("div"),O=[];if(null!=T&&0<T.length)for(var R=0;R<T.length;R++)if("mxgraph"==T[R].getAttribute("class")){O.push(T[R]);break}0<O.length&&(T=O[0].getAttribute("data-mxgraph"),null!=T?(O=JSON.parse(T),null!=O&&null!=O.xml&&(n=mxUtils.parseXml(O.xml),n=n.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(T=mxUtils.getTextContent(O[0]),T=Graph.decompress(T,null,M),0<
+T.length&&(n=mxUtils.parseXml(T),n=n.documentElement))))}if(null!=n&&"svg"==n.nodeName)if(T=n.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)n=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==n||D||(O=null,"diagram"==n.nodeName?O=n:"mxfile"==n.nodeName&&(T=n.getElementsByTagName("diagram"),0<T.length&&
+(O=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=O&&(n=Editor.parseDiagramNode(O,M)));null==n||"mxGraphModel"==n.nodeName||D&&"mxfile"==n.nodeName||(n=null);return n};Editor.parseDiagramNode=function(n,D){var M=mxUtils.trim(mxUtils.getTextContent(n)),T=null;0<M.length?(n=Graph.decompress(M,null,D),null!=n&&0<n.length&&(T=mxUtils.parseXml(n).documentElement)):(n=mxUtils.getChildNodes(n),0<n.length&&(T=mxUtils.createXmlDocument(),T.appendChild(T.importNode(n[0],!0)),T=T.documentElement));
+return T};Editor.getDiagramNodeXml=function(n){var D=mxUtils.getTextContent(n),M=null;0<D.length?M=Graph.decompress(D):null!=n.firstChild&&(M=mxUtils.getXml(n.firstChild));return M};Editor.extractGraphModelFromPdf=function(n){n=n.substring(n.indexOf(",")+1);n=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n,!0);if("%PDF-1.7"==n.substring(0,8)){var D=n.indexOf("EmbeddedFile");if(-1<D){var M=n.indexOf("stream",D)+9;if(0<n.substring(D,M).indexOf("application#2Fvnd.jgraph.mxfile"))return D=n.indexOf("endstream",
+M-1),pako.inflateRaw(Graph.stringToArrayBuffer(n.substring(M,D)),{to:"string"})}return null}M=null;D="";for(var T=0,O=0,R=[],S=null;O<n.length;){var X=n.charCodeAt(O);O+=1;10!=X&&(D+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var Y=n.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(Y>O){M=n.substring(O,Y);break}}10==X&&("endobj"==D?S=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(S=[],R[D.split(" ")[0]]=S):null!=S&&S.push(D),D="")}null==M&&(M=
+Editor.extractGraphModelFromXref(R));null!=M&&(M=decodeURIComponent(M.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return M};Editor.extractGraphModelFromXref=function(n){var D=n.trailer,M=null;null!=D&&(D=/.* \/Info (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(D=n[D[1]],null!=D&&(D=/.* \/Subject (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(n=n[D[1]],null!=n&&(n=n.join("\n"),M=n.substring(1,n.length-1))))));return M};Editor.extractParserError=function(n,D){var M=null;n=null!=
+n?n.getElementsByTagName("parsererror"):null;null!=n&&0<n.length&&(M=D||mxResources.get("invalidChars"),D=n[0].getElementsByTagName("div"),0<D.length&&(M=mxUtils.getTextContent(D[0])));return null!=M?mxUtils.trim(M):M};Editor.addRetryToError=function(n,D){null!=n&&(n=null!=n.error?n.error:n,null==n.retry&&(n.retry=D))};Editor.configure=function(n){if(null!=n){Editor.config=n;Editor.configVersion=n.version;Menus.prototype.defaultFonts=n.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+n.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=n.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=n.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=n.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=n.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=n.autosaveDelay||DrawioFile.prototype.autosaveDelay;
+n.debug&&(urlParams.test="1");null!=n.templateFile&&(EditorUi.templateFile=n.templateFile);null!=n.styles&&(Array.isArray(n.styles)?Editor.styles=n.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=n.globalVars&&(Editor.globalVars=n.globalVars);null!=n.compressXml&&(Editor.compressXml=n.compressXml);null!=n.includeDiagram&&(Editor.defaultIncludeDiagram=n.includeDiagram);null!=n.simpleLabels&&(Editor.simpleLabels=n.simpleLabels);null!=n.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
+n.oneDriveInlinePicker);null!=n.darkColor&&(Editor.darkColor=n.darkColor);null!=n.lightColor&&(Editor.lightColor=n.lightColor);null!=n.settingsName&&(Editor.configurationKey="."+n.settingsName+"-configuration",Editor.settingsKey="."+n.settingsName+"-config",mxSettings.key=Editor.settingsKey);n.customFonts&&(Menus.prototype.defaultFonts=n.customFonts.concat(Menus.prototype.defaultFonts));n.customPresetColors&&(ColorDialog.prototype.presetColors=n.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=n.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=n.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=n.css){var D=document.createElement("style");D.setAttribute("type","text/css");D.appendChild(document.createTextNode(n.css));var M=document.getElementsByTagName("script")[0];M.parentNode.insertBefore(D,M)}null!=n.libraries&&(Sidebar.prototype.customEntries=n.libraries);null!=n.enabledLibraries&&(Array.isArray(n.enabledLibraries)?Sidebar.prototype.enabledLibraries=
+n.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=n.defaultLibraries&&(Sidebar.prototype.defaultEntries=n.defaultLibraries);null!=n.defaultCustomLibraries&&(Editor.defaultCustomLibraries=n.defaultCustomLibraries);null!=n.enableCustomLibraries&&(Editor.enableCustomLibraries=n.enableCustomLibraries);null!=n.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=n.defaultVertexStyle);null!=n.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=n.defaultEdgeStyle);
+null!=n.defaultPageVisible&&(Graph.prototype.defaultPageVisible=n.defaultPageVisible);null!=n.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=n.defaultGridEnabled);null!=n.zoomWheel&&(Graph.zoomWheel=n.zoomWheel);null!=n.zoomFactor&&(D=parseFloat(n.zoomFactor),!isNaN(D)&&1<D?Graph.prototype.zoomFactor=D:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=n.gridSteps&&(D=parseInt(n.gridSteps),!isNaN(D)&&0<D?mxGraphView.prototype.gridSteps=D:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=n.pageFormat&&(D=parseInt(n.pageFormat.width),M=parseInt(n.pageFormat.height),!isNaN(D)&&0<D&&!isNaN(M)&&0<M?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,D,M),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));n.thumbWidth&&(Sidebar.prototype.thumbWidth=n.thumbWidth);n.thumbHeight&&(Sidebar.prototype.thumbHeight=n.thumbHeight);n.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+n.emptyLibraryXml);n.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=n.emptyDiagramXml);n.sidebarWidth&&(EditorUi.prototype.hsplitPosition=n.sidebarWidth);n.sidebarTitles&&(Sidebar.prototype.sidebarTitles=n.sidebarTitles);n.sidebarTitleSize&&(D=parseInt(n.sidebarTitleSize),!isNaN(D)&&0<D?Sidebar.prototype.sidebarTitleSize=D:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));n.fontCss&&("string"===typeof n.fontCss?Editor.configureFontCss(n.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
+null!=n.autosaveDelay&&(D=parseInt(n.autosaveDelay),!isNaN(D)&&0<D?DrawioFile.prototype.autosaveDelay=D:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=n.maxImageBytes&&(EditorUi.prototype.maxImageBytes=n.maxImageBytes);null!=n.maxImageSize&&(EditorUi.prototype.maxImageSize=n.maxImageSize);null!=n.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=n.shareCursorPosition);null!=n.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=n.showRemoteCursors)}};
+Editor.configureFontCss=function(n){if(null!=n){Editor.prototype.fontCss=n;var D=document.getElementsByTagName("script")[0];if(null!=D&&null!=D.parentNode){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(n));D.parentNode.insertBefore(M,D);n=n.split("url(");for(M=1;M<n.length;M++){var T=n[M].indexOf(")");T=Editor.trimCssUrl(n[M].substring(0,T));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",T);
+O.setAttribute("as","font");O.setAttribute("crossorigin","");D.parentNode.insertBefore(O,D)}}}};Editor.trimCssUrl=function(n){return n.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(n){n=null!=n?n:Editor.GUID_LENGTH;for(var D=[],M=0;M<n;M++)D.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*
+Editor.GUID_ALPHABET.length)));return D.join("")};Editor.updateStatusInterval=1E4;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.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(n){n=null!=n&&
+"mxlibrary"!=n.nodeName?this.extractGraphModel(n):null;if(null!=n){var D=Editor.extractParserError(n,mxResources.get("invalidOrMissingFile"));if(D)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[n],"cause",[D]),Error(mxResources.get("notADiagramFile")+" ("+D+")");if("mxGraphModel"==n.nodeName){D=n.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=D&&""!=D)D!=this.graph.currentStyle&&(M=null!=this.graph.themes?this.graph.themes[D]:mxUtils.load(STYLE_PATH+"/"+
+D+".xml").getDocumentElement(),null!=M&&(T=new mxCodec(M.ownerDocument),T.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 T=new mxCodec(M.ownerDocument);T.decode(M,this.graph.getStylesheet())}}this.graph.currentStyle=D;this.graph.mathEnabled="1"==urlParams.math||"1"==n.getAttribute("math");D=n.getAttribute("backgroundImage");null!=D?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(D)):
+this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==n.getAttribute("shadow"),!1);if(D=n.getAttribute("extFonts"))try{for(D=D.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),M=0;M<D.length;M++)this.graph.addExtFont(D[M].name,D[M].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&
+0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(n,D){n=null!=n?n:!0;var M=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&M.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
+D);null!=T&&M.setAttribute("backgroundImage",JSON.stringify(T));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&&(T=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),M.setAttribute("extFonts",T.join("|")));return M};Editor.prototype.isDataSvg=function(n){try{var D=mxUtils.parseXml(n).documentElement.getAttribute("content");if(null!=D&&(null!=D&&"<"!=D.charAt(0)&&"%"!=
+D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(cont,D))),null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D)),null!=D&&0<D.length)){var M=mxUtils.parseXml(D).documentElement;return"mxfile"==M.nodeName||"mxGraphModel"==M.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(n,D,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(n,D){if("undefined"===
+typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){n=null!=n?n:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),MathJax.typeset([O]),Editor.onMathJaxDone()}catch(R){MathJax.typesetClear([O]),null!=R.retry?R.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+R.toString())}};window.MathJax=null!=D?D:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==
+urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}};Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=
+function(){M.apply(this,arguments);var O=mxUtils.bind(this,function(R,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,O);this.graph.addListener(mxEvent.REFRESH,O)};D=document.getElementsByTagName("script");if(null!=D&&0<D.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",n);D[0].parentNode.appendChild(T)}}};Editor.prototype.csvToArray=
+function(n){if(0<n.length){var D="",M=[""],T=0,O=!0,R;n=$jscomp.makeIterator(n);for(R=n.next();!R.done;R=n.next())R=R.value,'"'===R?(O&&R===D&&(M[T]+=R),O=!O):","===R&&O?R=M[++T]="":M[T]+=R,D=R;return M}return[]};Editor.prototype.getProxiedUrl=function(n){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(n)){var D=/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n);D=/\.png$/i.test(n)||/\.pdf$/i.test(n)||
+D;var M="t="+(new Date).getTime();n=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+M+(D?"&base64=1":"")}return n};Editor.prototype.isCorsEnabledForUrl=function(n){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||n.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(n)||"https://raw.githubusercontent.com/"===n.substring(0,
+34)||"https://fonts.googleapis.com/"===n.substring(0,29)||"https://fonts.gstatic.com/"===n.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var n=new mxUrlConverter;n.updateBaseUrl();var D=n.convert,M=this;n.convert=function(T){if(null!=T){var O="http://"==T.substring(0,7)||"https://"==T.substring(0,8);O&&!navigator.onLine?T=Editor.svgBrokenImage.src:!O||T.substring(0,n.baseUrl.length)==n.baseUrl||M.crossOriginImages&&M.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,
+19)||mxClient.IS_CHROMEAPP||(T=D.apply(this,arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return n};Editor.createSvgDataUri=function(n){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))};Editor.prototype.convertImageToDataUri=function(n,D){try{var M=!0,T=window.setTimeout(mxUtils.bind(this,function(){M=!1;D(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(n))mxUtils.get(n,mxUtils.bind(this,function(R){window.clearTimeout(T);M&&D(Editor.createSvgDataUri(R.getText()))}),
+function(){window.clearTimeout(T);M&&D(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(T);if(M)try{var R=document.createElement("canvas"),S=R.getContext("2d");R.height=O.height;R.width=O.width;S.drawImage(O,0,0);D(R.toDataURL())}catch(X){D(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(T);M&&D(Editor.svgBrokenImage.src)};O.src=n}}catch(R){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(n,D,M,T){null==T&&(T=this.createImageUrlConverter());var O=0,R=M||{};M=mxUtils.bind(this,function(S,X){S=n.getElementsByTagName(S);for(var Y=0;Y<S.length;Y++)mxUtils.bind(this,function(aa){try{if(null!=aa){var ba=T.convert(aa.getAttribute(X));if(null!=ba&&"data:"!=ba.substring(0,5)){var da=R[ba];null==da?(O++,this.convertImageToDataUri(ba,function(Z){null!=Z&&(R[ba]=Z,aa.setAttribute(X,Z));O--;0==O&&D(n)})):aa.setAttribute(X,da)}else null!=ba&&aa.setAttribute(X,ba)}}catch(Z){}})(S[Y])});
+M("image","xlink:href");M("img","src");0==O&&D(n)};Editor.base64Encode=function(n){for(var D="",M=0,T=n.length,O,R,S;M<T;){O=n.charCodeAt(M++)&255;if(M==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4);D+="==";break}R=n.charCodeAt(M++);if(M==T){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4|(R&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2);D+="=";break}S=n.charCodeAt(M++);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(R&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2|(S&192)>>6);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return D};
+Editor.prototype.loadUrl=function(n,D,M,T,O,R,S,X){try{var Y=!S&&(T||/(\.png)($|\?)/i.test(n)||/(\.jpe?g)($|\?)/i.test(n)||/(\.gif)($|\?)/i.test(n)||/(\.pdf)($|\?)/i.test(n));O=null!=O?O:!0;var aa=mxUtils.bind(this,function(){mxUtils.get(n,mxUtils.bind(this,function(ba){if(200<=ba.getStatus()&&299>=ba.getStatus()){if(null!=D){var da=ba.getText();if(Y){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){ba=mxUtilsBinaryToArray(ba.request.responseBody).toArray();
+da=Array(ba.length);for(var Z=0;Z<ba.length;Z++)da[Z]=String.fromCharCode(ba[Z]);da=da.join("")}R=null!=R?R:"data:image/png;base64,";da=R+Editor.base64Encode(da)}D(da)}}else null!=M&&(0==ba.getStatus()?M({message:mxResources.get("accessDenied")},ba):404==ba.getStatus()?M({code:ba.getStatus()},ba):M({message:mxResources.get("error")+" "+ba.getStatus()},ba))}),function(ba){null!=M&&M({message:mxResources.get("error")+" "+ba.getStatus()})},Y,this.timeout,function(){O&&null!=M&&M({code:App.ERROR_TIMEOUT,
+retry:aa})},X)});aa()}catch(ba){null!=M&&M(ba)}};Editor.prototype.absoluteCssFonts=function(n){var D=null;if(null!=n){var M=n.split("url(");if(0<M.length){D=[M[0]];n=window.location.pathname;var T=null!=n?n.lastIndexOf("/"):-1;0<=T&&(n=n.substring(0,T+1));T=document.getElementsByTagName("base");var O=null;null!=T&&0<T.length&&(O=T[0].getAttribute("href"));for(var R=1;R<M.length;R++)if(T=M[R].indexOf(")"),0<T){var S=Editor.trimCssUrl(M[R].substring(0,T));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:
+window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":n)+S);D.push('url("'+S+'"'+M[R].substring(T))}else D.push(M[R])}else D=[n]}return null!=D?D.join(""):null};Editor.prototype.mapFontUrl=function(n,D,M){/^https?:\/\//.test(D)&&!this.isCorsEnabledForUrl(D)&&(D=PROXY_URL+"?url="+encodeURIComponent(D));M(n,D)};Editor.prototype.embedCssFonts=function(n,D){var M=n.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==T){for(var Y=
+[M[0]],aa=1;aa<M.length;aa++){var ba=M[aa].indexOf(")");Y.push('url("');Y.push(this.cachedFonts[Editor.trimCssUrl(M[aa].substring(0,ba))]);Y.push('"'+M[aa].substring(ba))}D(Y.join(""))}});if(0<M.length){for(n=1;n<M.length;n++){var R=M[n].indexOf(")"),S=null,X=M[n].indexOf("format(",R);0<X&&(S=Editor.trimCssUrl(M[n].substring(X+7,M[n].indexOf(")",X))));mxUtils.bind(this,function(Y){if(null==this.cachedFonts[Y]){this.cachedFonts[Y]=Y;T++;var aa="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(Y))aa=
+"image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(Y))aa="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(Y))aa="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(Y))aa="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(Y))aa="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(Y))aa="application/font-sfnt";this.mapFontUrl(aa,Y,mxUtils.bind(this,function(ba,da){this.loadUrl(da,mxUtils.bind(this,
+function(Z){this.cachedFonts[Y]=Z;T--;O()}),mxUtils.bind(this,function(Z){T--;O()}),!0,null,"data:"+ba+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(M[n].substring(0,R)),S)}O()}else D(n)};Editor.prototype.loadFonts=function(n){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(D){this.resolvedFontCss=D;null!=n&&n()})):null!=n&&n()};Editor.prototype.createGoogleFontCache=function(){var n={},D;for(D in Graph.fontMapping)Graph.isCssFontUrl(D)&&
+(n[D]=Graph.fontMapping[D]);return n};Editor.prototype.embedExtFonts=function(n){var D=this.graph.getCustomFonts();if(0<D.length){var M=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(M.join(""),n)}),R=0;R<D.length;R++)mxUtils.bind(this,function(S,X){Graph.isCssFontUrl(X)?null==this.cachedGoogleFonts[X]?(T++,this.loadUrl(X,mxUtils.bind(this,function(Y){this.cachedGoogleFonts[X]=Y;M.push(Y+"\n");
+T--;O()}),mxUtils.bind(this,function(Y){T--;M.push("@import url("+X+");\n");O()}))):M.push(this.cachedGoogleFonts[X]+"\n"):M.push('@font-face {font-family: "'+S+'";src: url("'+X+'")}\n')})(D[R].name,D[R].url);O()}else n()};Editor.prototype.addMathCss=function(n){n=n.getElementsByTagName("defs");if(null!=n&&0<n.length)for(var D=document.getElementsByTagName("style"),M=0;M<D.length;M++){var T=mxUtils.getTextContent(D[M]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&n[0].appendChild(D[M].cloneNode(!0))}};
+Editor.prototype.addFontCss=function(n,D){D=null!=D?D:this.absoluteCssFonts(this.fontCss);if(null!=D){var M=n.getElementsByTagName("defs"),T=n.ownerDocument;0==M.length?(M=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=n.firstChild?n.insertBefore(M,n.firstChild):n.appendChild(M)):M=M[0];n=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):T.createElement("style");n.setAttribute("type","text/css");mxUtils.setTextContent(n,D);M.appendChild(n)}};
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(n,D,M){var T=mxClient.IS_FF?8192:16384;return Math.min(M,Math.min(T/n,T/D))};Editor.prototype.exportToCanvas=function(n,D,M,T,O,R,S,X,Y,aa,ba,da,Z,ia,ea,va,za,ya){try{R=null!=R?R:!0;S=null!=S?S:!0;da=null!=da?da:this.graph;Z=null!=Z?Z:0;var ua=Y?null:da.background;ua==mxConstants.NONE&&(ua=null);null==ua&&(ua=T);null==ua&&0==Y&&(ua=va?this.graph.defaultPageBackgroundColor:
+"#ffffff");this.convertImages(da.getSvg(null,null,Z,ia,null,S,null,null,null,aa,null,va,za,ya),mxUtils.bind(this,function(ca){try{var Na=new Image;Na.onload=mxUtils.bind(this,function(){try{var Ba=function(){mxClient.IS_SF?window.setTimeout(function(){ra.drawImage(Na,0,0);n(Fa,ca)},0):(ra.drawImage(Na,0,0),n(Fa,ca))},Fa=document.createElement("canvas"),na=parseInt(ca.getAttribute("width")),Ja=parseInt(ca.getAttribute("height"));X=null!=X?X:1;null!=D&&(X=R?Math.min(1,Math.min(3*D/(4*Ja),D/na)):D/na);
+X=this.getMaxCanvasScale(na,Ja,X);na=Math.ceil(X*na);Ja=Math.ceil(X*Ja);Fa.setAttribute("width",na);Fa.setAttribute("height",Ja);var ra=Fa.getContext("2d");null!=ua&&(ra.beginPath(),ra.rect(0,0,na,Ja),ra.fillStyle=ua,ra.fill());1!=X&&ra.scale(X,X);if(ea){var ha=da.view,fa=ha.scale;ha.scale=1;var wa=btoa(unescape(encodeURIComponent(ha.createSvgGrid(ha.gridColor))));ha.scale=fa;wa="data:image/svg+xml;base64,"+wa;var ja=da.gridSize*ha.gridSteps*X,ma=da.getGraphBounds(),sa=ha.translate.x*fa,oa=ha.translate.y*
+fa,pa=sa+(ma.x-sa)/fa-Z,Ea=oa+(ma.y-oa)/fa-Z,ka=new Image;ka.onload=function(){try{for(var la=-Math.round(ja-mxUtils.mod((sa-pa)*X,ja)),qa=-Math.round(ja-mxUtils.mod((oa-Ea)*X,ja));la<na;la+=ja)for(var Aa=qa;Aa<Ja;Aa+=ja)ra.drawImage(ka,la/X,Aa/X);Ba()}catch(Ca){null!=O&&O(Ca)}};ka.onerror=function(la){null!=O&&O(la)};ka.src=wa}else Ba()}catch(la){null!=O&&O(la)}});Na.onerror=function(Ba){null!=O&&O(Ba)};aa&&this.graph.addSvgShadow(ca);this.graph.mathEnabled&&this.addMathCss(ca);var Ka=mxUtils.bind(this,
+function(){try{null!=this.resolvedFontCss&&this.addFontCss(ca,this.resolvedFontCss),Na.src=Editor.createSvgDataUri(mxUtils.getXml(ca))}catch(Ba){null!=O&&O(Ba)}});this.embedExtFonts(mxUtils.bind(this,function(Ba){try{null!=Ba&&this.addFontCss(ca,Ba),this.loadFonts(Ka)}catch(Fa){null!=O&&O(Fa)}}))}catch(Ba){null!=O&&O(Ba)}}),M,ba)}catch(ca){null!=O&&O(ca)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var m=l,t=0;8>t;t++)m=1==(m&1)?3988292384^m>>>1:m>>>1,Editor.crcTable[l]=m;Editor.updateCRC=function(n,
+D,M,T){for(var O=0;O<T;O++)n=Editor.crcTable[(n^D.charCodeAt(M+O))&255]^n>>>8;return n};Editor.crc32=function(n){for(var D=-1,M=0;M<n.length;M++)D=D>>>8^Editor.crcTable[(D^n.charCodeAt(M))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(n,D,M,T,O){function R(ba,da){var Z=Y;Y+=da;return ba.substring(Z,Y)}function S(ba){ba=R(ba,4);return ba.charCodeAt(3)+(ba.charCodeAt(2)<<8)+(ba.charCodeAt(1)<<16)+(ba.charCodeAt(0)<<24)}function X(ba){return String.fromCharCode(ba>>24&255,ba>>16&255,ba>>
+8&255,ba&255)}n=n.substring(n.indexOf(",")+1);n=window.atob?atob(n):Base64.decode(n,!0);var Y=0;if(R(n,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(R(n,4),"IHDR"!=R(n,4))null!=O&&O();else{R(n,17);O=n.substring(0,Y);do{var aa=S(n);if("IDAT"==R(n,4)){O=n.substring(0,Y-8);"pHYs"==D&&"dpi"==M?(M=Math.round(T/.0254),M=X(M)+X(M)+String.fromCharCode(1)):M=M+String.fromCharCode(0)+("zTXt"==D?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,D,0,4);
+T=Editor.updateCRC(T,M,0,M.length);O+=X(M.length)+D+M+X(T^4294967295);O+=n.substring(Y-8,n.length);break}O+=n.substring(Y-8,Y-4+aa);R(n,aa);R(n,4)}while(aa);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(n,D){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
+var C=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){C.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(n,D){var M=null;null!=n.editor.graph.getModel().getParent(D)?M=D.getId():null!=n.currentPage&&(M=n.currentPage.getId());return M});if(null!=window.StyleFormatPanel){var A=Format.prototype.init;Format.prototype.init=function(){A.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
+this.update)};var B=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?B.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var n=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=n&&n.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(n){return!1};var J=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
+function(n){n=J.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var D=this.editorUi,M=D.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return M.shadowVisible},function(O){var R=new ChangePageSetup(D);R.ignoreColor=!0;R.ignoreImage=!0;R.shadowVisible=O;M.model.execute(R)},{install:function(O){this.listener=function(){O(M.shadowVisible)};D.addListener("shadowVisibleChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});
+Editor.enableShadowOption||(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));n.appendChild(T)}return n};var e=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(n){n=e.apply(this,arguments);var D=this.editorUi,M=D.editor.graph;if(M.isEnabled()){var T=D.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var O=this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(S){D.editor.setAutosave(S);
+D.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(S){this.listener=function(){S(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}});n.appendChild(O)}}if(this.isMathOptionVisible()&&M.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return M.mathEnabled},function(S){D.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=
+function(){S(M.mathEnabled)};D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});O.style.paddingTop="5px";n.appendChild(O);var R=D.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");R.style.position="relative";R.style.marginLeft="6px";R.style.top="2px";O.appendChild(R)}return n};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
+[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
+type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
+type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",
+type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},
+{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",
+type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",
+type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",
+dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];
+mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
@@ -11339,27 +11349,27 @@ 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(q,D,M){if(null!=D){var T=function(R){if(null!=R)if(M)for(var S=0;S<R.length;S++)D[R[S].name]=R[S];else for(var X in D){var Y=!1;for(S=0;S<R.length;S++)if(R[S].name==X&&R[S].type==D[X].type){Y=!0;break}Y||delete D[X]}},O=this.editorUi.editor.graph.view.getState(q);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),T(O.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{T(JSON.parse(q))}catch(R){}}};var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments);if(Editor.enableCustomProperties){for(var D=
-{},M=q.vertices,T=q.edges,O=0;O<M.length;O++)this.findCommonProperties(M[O],D,0==O);for(O=0;O<T.length;O++)this.findCommonProperties(T[O],D,0==M.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(D).length&&this.container.appendChild(this.addProperties(this.createPanel(),D,q))}};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return k.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(q,D,M){function T(ra,ha,fa,wa){da.getModel().beginUpdate();try{var ja=[],ma=[];if(null!=fa.index){for(var sa=[],oa=fa.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==ra;)sa.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;fa.index<sa.length?null!=wa?sa.splice(wa,1):sa[fa.index]=ha:sa.push(ha);null!=fa.size&&sa.length>fa.size&&(sa=sa.slice(0,fa.size));ha=sa.join(",");null!=fa.countProperty&&(da.setCellStyles(fa.countProperty,sa.length,
+function(n,D,M){if(null!=D){var T=function(R){if(null!=R)if(M)for(var S=0;S<R.length;S++)D[R[S].name]=R[S];else for(var X in D){var Y=!1;for(S=0;S<R.length;S++)if(R[S].name==X&&R[S].type==D[X].type){Y=!0;break}Y||delete D[X]}},O=this.editorUi.editor.graph.view.getState(n);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),T(O.shape.customProperties));n=n.getAttribute("customProperties");if(null!=n)try{T(JSON.parse(n))}catch(R){}}};var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var n=this.editorUi.getSelectionState();"image"!=n.style.shape&&!n.containsLabel&&0<n.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments);if(Editor.enableCustomProperties){for(var D=
+{},M=n.vertices,T=n.edges,O=0;O<M.length;O++)this.findCommonProperties(M[O],D,0==O);for(O=0;O<T.length;O++)this.findCommonProperties(T[O],D,0==M.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(D).length&&this.container.appendChild(this.addProperties(this.createPanel(),D,n))}};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(n){this.addActions(n,["copyStyle","pasteStyle"]);return k.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(n,D,M){function T(ra,ha,fa,wa){da.getModel().beginUpdate();try{var ja=[],ma=[];if(null!=fa.index){for(var sa=[],oa=fa.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==ra;)sa.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;fa.index<sa.length?null!=wa?sa.splice(wa,1):sa[fa.index]=ha:sa.push(ha);null!=fa.size&&sa.length>fa.size&&(sa=sa.slice(0,fa.size));ha=sa.join(",");null!=fa.countProperty&&(da.setCellStyles(fa.countProperty,sa.length,
da.getSelectionCells()),ja.push(fa.countProperty),ma.push(sa.length))}da.setCellStyles(ra,ha,da.getSelectionCells());ja.push(ra);ma.push(ha);if(null!=fa.dependentProps)for(ra=0;ra<fa.dependentProps.length;ra++){var pa=fa.dependentPropsDefVal[ra],Ea=fa.dependentPropsVals[ra];if(Ea.length>ha)Ea=Ea.slice(0,ha);else for(var ka=Ea.length;ka<ha;ka++)Ea.push(pa);Ea=Ea.join(",");da.setCellStyles(fa.dependentProps[ra],Ea,da.getSelectionCells());ja.push(fa.dependentProps[ra]);ma.push(Ea)}if("function"==typeof fa.onChange)fa.onChange(da,
-ha);ba.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ja,"values",ma,"cells",da.getSelectionCells()))}finally{da.getModel().endUpdate()}}function O(ra,ha,fa){var wa=mxUtils.getOffset(q,!0),ja=mxUtils.getOffset(ra,!0);ha.style.position="absolute";ha.style.left=ja.x-wa.x+"px";ha.style.top=ja.y-wa.y+"px";ha.style.width=ra.offsetWidth+"px";ha.style.height=ra.offsetHeight-(fa?4:0)+"px";ha.style.zIndex=5}function R(ra,ha,fa){var wa=document.createElement("div");wa.style.width="32px";wa.style.height=
+ha);ba.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ja,"values",ma,"cells",da.getSelectionCells()))}finally{da.getModel().endUpdate()}}function O(ra,ha,fa){var wa=mxUtils.getOffset(n,!0),ja=mxUtils.getOffset(ra,!0);ha.style.position="absolute";ha.style.left=ja.x-wa.x+"px";ha.style.top=ja.y-wa.y+"px";ha.style.width=ra.offsetWidth+"px";ha.style.height=ra.offsetHeight-(fa?4:0)+"px";ha.style.zIndex=5}function R(ra,ha,fa){var wa=document.createElement("div");wa.style.width="32px";wa.style.height=
"4px";wa.style.margin="2px";wa.style.border="1px solid black";wa.style.background=ha&&"none"!=ha?ha:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ba,function(ja){this.editorUi.pickColor(ha,function(ma){wa.style.background="none"==ma?"url('"+Dialog.prototype.noColorImage+"')":ma;T(ra,ma,fa)});mxEvent.consume(ja)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(wa);return btn}function S(ra,ha,fa,wa,ja,ma,sa){null!=ha&&(ha=ha.split(","),
Z.push({name:ra,values:ha,type:fa,defVal:wa,countProperty:ja,parentRow:ma,isDeletable:!0,flipBkg:sa}));btn=mxUtils.button("+",mxUtils.bind(ba,function(oa){for(var pa=ma,Ea=0;null!=pa.nextSibling;)if(pa.nextSibling.getAttribute("data-pName")==ra)pa=pa.nextSibling,Ea++;else break;var ka={type:fa,parentRow:ma,index:Ea,isDeletable:!0,defVal:wa,countProperty:ja};Ea=aa(ra,"",ka,0==Ea%2,sa);T(ra,wa,ka);pa.parentNode.insertBefore(Ea,pa.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width=
"25px";btn.className="geColorBtn";return btn}function X(ra,ha,fa,wa,ja,ma,sa){if(0<ja){var oa=Array(ja);ha=null!=ha?ha.split(","):[];for(var pa=0;pa<ja;pa++)oa[pa]=null!=ha[pa]?ha[pa]:null!=wa?wa:"";Z.push({name:ra,values:oa,type:fa,defVal:wa,parentRow:ma,flipBkg:sa,size:ja})}return document.createElement("div")}function Y(ra,ha,fa){var wa=document.createElement("input");wa.type="checkbox";wa.checked="1"==ha;mxEvent.addListener(wa,"change",function(){T(ra,wa.checked?"1":"0",fa)});return wa}function aa(ra,
ha,fa,wa,ja){var ma=fa.dispName,sa=fa.type,oa=document.createElement("tr");oa.className="gePropRow"+(ja?"Dark":"")+(wa?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",ra);oa.setAttribute("data-pValue",ha);wa=!1;null!=fa.index&&(oa.setAttribute("data-index",fa.index),ma=(null!=ma?ma:"")+"["+fa.index+"]",wa=!0);var pa=document.createElement("td");pa.className="gePropRowCell";ma=mxResources.get(ma,null,ma);mxUtils.write(pa,ma);pa.setAttribute("title",ma);wa&&(pa.style.textAlign="right");
oa.appendChild(pa);pa=document.createElement("td");pa.className="gePropRowCell";if("color"==sa)pa.appendChild(R(ra,ha,fa));else if("bool"==sa||"boolean"==sa)pa.appendChild(Y(ra,ha,fa));else if("enum"==sa){var Ea=fa.enumList;for(ja=0;ja<Ea.length;ja++)if(ma=Ea[ja],ma.val==ha){mxUtils.write(pa,mxResources.get(ma.dispName,null,ma.dispName));break}mxEvent.addListener(pa,"click",mxUtils.bind(ba,function(){var ka=document.createElement("select");O(pa,ka);for(var la=0;la<Ea.length;la++){var qa=Ea[la],Aa=
-document.createElement("option");Aa.value=mxUtils.htmlEntities(qa.val);mxUtils.write(Aa,mxResources.get(qa.dispName,null,qa.dispName));ka.appendChild(Aa)}ka.value=ha;q.appendChild(ka);mxEvent.addListener(ka,"change",function(){var Ca=mxUtils.htmlEntities(ka.value);T(ra,Ca,fa)});ka.focus();mxEvent.addListener(ka,"blur",function(){q.removeChild(ka)})}))}else"dynamicArr"==sa?pa.appendChild(S(ra,ha,fa.subType,fa.subDefVal,fa.countProperty,oa,ja)):"staticArr"==sa?pa.appendChild(X(ra,ha,fa.subType,fa.subDefVal,
+document.createElement("option");Aa.value=mxUtils.htmlEntities(qa.val);mxUtils.write(Aa,mxResources.get(qa.dispName,null,qa.dispName));ka.appendChild(Aa)}ka.value=ha;n.appendChild(ka);mxEvent.addListener(ka,"change",function(){var Ca=mxUtils.htmlEntities(ka.value);T(ra,Ca,fa)});ka.focus();mxEvent.addListener(ka,"blur",function(){n.removeChild(ka)})}))}else"dynamicArr"==sa?pa.appendChild(S(ra,ha,fa.subType,fa.subDefVal,fa.countProperty,oa,ja)):"staticArr"==sa?pa.appendChild(X(ra,ha,fa.subType,fa.subDefVal,
fa.size,oa,ja)):"readOnly"==sa?(ja=document.createElement("input"),ja.setAttribute("readonly",""),ja.value=ha,ja.style.width="96px",ja.style.borderWidth="0px",pa.appendChild(ja)):(pa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ha)),mxEvent.addListener(pa,"click",mxUtils.bind(ba,function(){function ka(){var qa=la.value;qa=0==qa.length&&"string"!=sa?0:qa;fa.allowAuto&&(null!=qa.trim&&"auto"==qa.trim().toLowerCase()?(qa="auto",sa="string"):(qa=parseFloat(qa),qa=isNaN(qa)?0:qa));null!=fa.min&&qa<
-fa.min?qa=fa.min:null!=fa.max&&qa>fa.max&&(qa=fa.max);qa=encodeURIComponent(("int"==sa?parseInt(qa):qa)+"");T(ra,qa,fa)}var la=document.createElement("input");O(pa,la,!0);la.value=decodeURIComponent(ha);la.className="gePropEditor";"int"!=sa&&"float"!=sa||fa.allowAuto||(la.type="number",la.step="int"==sa?"1":"any",null!=fa.min&&(la.min=parseFloat(fa.min)),null!=fa.max&&(la.max=parseFloat(fa.max)));q.appendChild(la);mxEvent.addListener(la,"keypress",function(qa){13==qa.keyCode&&ka()});la.focus();mxEvent.addListener(la,
-"blur",function(){ka()})})));fa.isDeletable&&(ja=mxUtils.button("-",mxUtils.bind(ba,function(ka){T(ra,"",fa,fa.index);mxEvent.consume(ka)})),ja.style.height="16px",ja.style.width="25px",ja.style.float="right",ja.className="geColorBtn",pa.appendChild(ja));oa.appendChild(pa);return oa}var ba=this,da=this.editorUi.editor.graph,Z=[];q.style.position="relative";q.style.padding="0";var ia=document.createElement("table");ia.className="geProperties";ia.style.whiteSpace="nowrap";ia.style.width="100%";var ea=
-document.createElement("tr");ea.className="gePropHeader";var va=document.createElement("th");va.className="gePropHeaderCell";var za=document.createElement("img");za.src=Sidebar.prototype.expandedImage;za.style.verticalAlign="middle";va.appendChild(za);mxUtils.write(va,mxResources.get("property"));ea.style.cursor="pointer";var ya=function(){var ra=ia.querySelectorAll(".gePropNonHeaderRow");if(ba.editorUi.propertiesCollapsed){za.src=Sidebar.prototype.collapsedImage;var ha="none";for(var fa=q.childNodes.length-
-1;0<=fa;fa--)try{var wa=q.childNodes[fa],ja=wa.nodeName.toUpperCase();"INPUT"!=ja&&"SELECT"!=ja||q.removeChild(wa)}catch(ma){}}else za.src=Sidebar.prototype.expandedImage,ha="";for(fa=0;fa<ra.length;fa++)ra[fa].style.display=ha};mxEvent.addListener(ea,"click",function(){ba.editorUi.propertiesCollapsed=!ba.editorUi.propertiesCollapsed;ya()});ea.appendChild(va);va=document.createElement("th");va.className="gePropHeaderCell";va.innerHTML=mxResources.get("value");ea.appendChild(va);ia.appendChild(ea);
+fa.min?qa=fa.min:null!=fa.max&&qa>fa.max&&(qa=fa.max);qa=encodeURIComponent(("int"==sa?parseInt(qa):qa)+"");T(ra,qa,fa)}var la=document.createElement("input");O(pa,la,!0);la.value=decodeURIComponent(ha);la.className="gePropEditor";"int"!=sa&&"float"!=sa||fa.allowAuto||(la.type="number",la.step="int"==sa?"1":"any",null!=fa.min&&(la.min=parseFloat(fa.min)),null!=fa.max&&(la.max=parseFloat(fa.max)));n.appendChild(la);mxEvent.addListener(la,"keypress",function(qa){13==qa.keyCode&&ka()});la.focus();mxEvent.addListener(la,
+"blur",function(){ka()})})));fa.isDeletable&&(ja=mxUtils.button("-",mxUtils.bind(ba,function(ka){T(ra,"",fa,fa.index);mxEvent.consume(ka)})),ja.style.height="16px",ja.style.width="25px",ja.style.float="right",ja.className="geColorBtn",pa.appendChild(ja));oa.appendChild(pa);return oa}var ba=this,da=this.editorUi.editor.graph,Z=[];n.style.position="relative";n.style.padding="0";var ia=document.createElement("table");ia.className="geProperties";ia.style.whiteSpace="nowrap";ia.style.width="100%";var ea=
+document.createElement("tr");ea.className="gePropHeader";var va=document.createElement("th");va.className="gePropHeaderCell";var za=document.createElement("img");za.src=Sidebar.prototype.expandedImage;za.style.verticalAlign="middle";va.appendChild(za);mxUtils.write(va,mxResources.get("property"));ea.style.cursor="pointer";var ya=function(){var ra=ia.querySelectorAll(".gePropNonHeaderRow");if(ba.editorUi.propertiesCollapsed){za.src=Sidebar.prototype.collapsedImage;var ha="none";for(var fa=n.childNodes.length-
+1;0<=fa;fa--)try{var wa=n.childNodes[fa],ja=wa.nodeName.toUpperCase();"INPUT"!=ja&&"SELECT"!=ja||n.removeChild(wa)}catch(ma){}}else za.src=Sidebar.prototype.expandedImage,ha="";for(fa=0;fa<ra.length;fa++)ra[fa].style.display=ha};mxEvent.addListener(ea,"click",function(){ba.editorUi.propertiesCollapsed=!ba.editorUi.propertiesCollapsed;ya()});ea.appendChild(va);va=document.createElement("th");va.className="gePropHeaderCell";va.innerHTML=mxResources.get("value");ea.appendChild(va);ia.appendChild(ea);
var ua=!1,ca=!1;ea=null;1==M.vertices.length&&0==M.edges.length?ea=M.vertices[0].id:0==M.vertices.length&&1==M.edges.length&&(ea=M.edges[0].id);null!=ea&&ia.appendChild(aa("id",mxUtils.htmlEntities(ea),{dispName:"ID",type:"readOnly"},!0,!1));for(var Na in D)if(ea=D[Na],"function"!=typeof ea.isVisible||ea.isVisible(M,this)){var Ka=null!=M.style[Na]?mxUtils.htmlEntities(M.style[Na]+""):null!=ea.getDefaultValue?ea.getDefaultValue(M,this):ea.defVal;if("separator"==ea.type)ca=!ca;else{if("staticArr"==
ea.type)ea.size=parseInt(M.style[ea.sizeProperty]||D[ea.sizeProperty].defVal)||0;else if(null!=ea.dependentProps){var Ba=ea.dependentProps,Fa=[],na=[];for(va=0;va<Ba.length;va++){var Ja=M.style[Ba[va]];na.push(D[Ba[va]].subDefVal);Fa.push(null!=Ja?Ja.split(","):[])}ea.dependentPropsDefVal=na;ea.dependentPropsVals=Fa}ia.appendChild(aa(Na,Ka,ea,ua,ca));ua=!ua}}for(va=0;va<Z.length;va++)for(ea=Z[va],D=ea.parentRow,M=0;M<ea.values.length;M++)Na=aa(ea.name,ea.values[M],{type:ea.type,parentRow:ea.parentRow,
-isDeletable:ea.isDeletable,index:M,defVal:ea.defVal,countProperty:ea.countProperty,size:ea.size},0==M%2,ea.flipBkg),D.parentNode.insertBefore(Na,D.nextSibling),D=Na;q.appendChild(ia);ya();return q};StyleFormatPanel.prototype.addStyles=function(q){function D(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})}var M=this.editorUi,T=M.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";
-O.style.paddingLeft="24px";O.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(O);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(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],Y=0;Y<this.defaultColorSchemes.length;Y++){var aa=
+isDeletable:ea.isDeletable,index:M,defVal:ea.defVal,countProperty:ea.countProperty,size:ea.size},0==M%2,ea.flipBkg),D.parentNode.insertBefore(Na,D.nextSibling),D=Na;n.appendChild(ia);ya();return n};StyleFormatPanel.prototype.addStyles=function(n){function D(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})}var M=this.editorUi,T=M.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";
+O.style.paddingLeft="24px";O.style.paddingRight="20px";n.style.paddingLeft="16px";n.style.paddingBottom="6px";n.style.position="relative";n.appendChild(O);var 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(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var X=[],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(ea){mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){ba(ea)}))})(Y);X.push(aa);S.appendChild(aa)}var ba=mxUtils.bind(this,function(ea){null!=X[ea]&&(null!=this.format.currentScheme&&
null!=X[this.format.currentScheme]&&(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,da(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),da=mxUtils.bind(this,function(ea){var va=mxUtils.bind(this,function(ya){var ua=mxUtils.button("",mxUtils.bind(this,function(Ka){T.getModel().beginUpdate();try{for(var Ba=M.getSelectionState().cells,Fa=0;Fa<Ba.length;Fa++){for(var na=T.getModel().getStyle(Ba[Fa]),
Ja=0;Ja<R.length;Ja++)na=mxUtils.removeStylename(na,R[Ja]);var ra=T.getModel().isVertex(Ba[Fa])?T.defaultVertexStyle:T.defaultEdgeStyle;null!=ya?(mxEvent.isShiftDown(Ka)||(na=""==ya.fill?mxUtils.setStyle(na,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(na,mxConstants.STYLE_FILLCOLOR,ya.fill||mxUtils.getValue(ra,mxConstants.STYLE_FILLCOLOR,null)),na=mxUtils.setStyle(na,mxConstants.STYLE_GRADIENTCOLOR,ya.gradient||mxUtils.getValue(ra,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ka)||
@@ -11370,18 +11380,18 @@ ua.style.background="url('"+Dialog.prototype.noColorImage+"')":ua.style.backgrou
"#ffffff":Editor.darkColor):ca+" "+(ya.stroke||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=ya.title&&ua.setAttribute("title",ya.title)}else{ca=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Na=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");ua.style.backgroundColor=ca;ua.style.border="1px solid "+Na}ua.style.borderRadius="0";O.appendChild(ua)});O.innerText=
"";for(var za=0;za<ea.length;za++)0<za&&0==mxUtils.mod(za,4)&&mxUtils.br(O),va(ea[za])});null==this.format.currentScheme?ba(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ba(this.format.currentScheme);Y=10>=this.defaultColorSchemes.length?28:8;var Z=document.createElement("div");Z.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(Z,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ia=document.createElement("div");ia.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&&(q.appendChild(Z),q.appendChild(ia));mxEvent.addListener(ia,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));D(Z);D(ia);da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(S);return q};StyleFormatPanel.prototype.addEditOps=function(q){var D=this.editorUi.getSelectionState(),M=this.editorUi.editor.graph,T=null;1==D.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",q.appendChild(T));M=1==D.cells.length?M.view.getState(D.cells[0]):null;null!=M&&null!=M.shape&&null!=M.shape.stencil?(D=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),D.setAttribute("title",
-mxResources.get("editShape")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),q.appendChild(D)):D.image&&0<D.cells.length&&(D=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),D.setAttribute("title",mxResources.get("editImage")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),
-q.appendChild(D));return q}}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(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
-D){var M=Graph.fontMapping[D];null==M&&Graph.isCssFontUrl(D)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",D)):(null==M&&(M='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+D+'");\n}'),q=document.createElement("style"),mxUtils.write(q,M));return q};Graph.addFont=function(q,D,M){if(null!=q&&0<q.length&&null!=D&&0<D.length){var T=q.toLowerCase();if("helvetica"!=T&&"arial"!=q&&"sans-serif"!=
-T){var O=Graph.customFontElements[T];null!=O&&O.url!=D&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=D,"http:"==D.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(D)),O={name:q,url:D,elt:Graph.createFontElement(q,O)},Graph.customFontElements[T]=O,Graph.recentCustomFonts[T]=O,D=document.getElementsByTagName("head")[0],null!=M&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=M,O.elt.onerror=M):M()),null!=D&&D.appendChild(O.elt)):null!=M&&M()}else null!=M&&M()}else null!=M&&M();
-return q};Graph.getFontUrl=function(q,D){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(D=q.url);return D};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var D=0;D<q.length;D++){var M=q[D].getAttribute("data-font-src");if(null!=M){var T="FONT"==q[D].nodeName?q[D].getAttribute("face"):q[D].style.fontFamily;null!=T&&Graph.addFont(T,M)}}};Graph.processFontStyle=function(q){if(null!=q){var D=mxUtils.getValue(q,"fontSource",null);if(null!=D){var M=mxUtils.getValue(q,mxConstants.STYLE_FONTFAMILY,
-null);null!=M&&Graph.addFont(M,decodeURIComponent(D))}}return q};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 n=Graph.prototype.init;Graph.prototype.init=function(){function q(O){D=O}n.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var D=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(O){D=null});this.isMouseInsertPoint=function(){return null!=D};var M=this.getInsertPoint;
+1<this.defaultColorSchemes.length&&(n.appendChild(Z),n.appendChild(ia));mxEvent.addListener(ia,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));D(Z);D(ia);da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&n.appendChild(S);return n};StyleFormatPanel.prototype.addEditOps=function(n){var D=this.editorUi.getSelectionState(),M=this.editorUi.editor.graph,T=null;1==D.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",n.appendChild(T));M=1==D.cells.length?M.view.getState(D.cells[0]):null;null!=M&&null!=M.shape&&null!=M.shape.stencil?(D=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),D.setAttribute("title",
+mxResources.get("editShape")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),n.appendChild(D)):D.image&&0<D.cells.length&&(D=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),D.setAttribute("title",mxResources.get("editImage")),D.style.marginBottom="2px",null==T?D.style.width="210px":(T.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),
+n.appendChild(D));return n}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(n){return n.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(n){return Graph.isGoogleFontUrl(n)};Graph.createFontElement=function(n,
+D){var M=Graph.fontMapping[D];null==M&&Graph.isCssFontUrl(D)?(n=document.createElement("link"),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("charset","UTF-8"),n.setAttribute("href",D)):(null==M&&(M='@font-face {\nfont-family: "'+n+'";\nsrc: url("'+D+'");\n}'),n=document.createElement("style"),mxUtils.write(n,M));return n};Graph.addFont=function(n,D,M){if(null!=n&&0<n.length&&null!=D&&0<D.length){var T=n.toLowerCase();if("helvetica"!=T&&"arial"!=n&&"sans-serif"!=
+T){var O=Graph.customFontElements[T];null!=O&&O.url!=D&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=D,"http:"==D.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(D)),O={name:n,url:D,elt:Graph.createFontElement(n,O)},Graph.customFontElements[T]=O,Graph.recentCustomFonts[T]=O,D=document.getElementsByTagName("head")[0],null!=M&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=M,O.elt.onerror=M):M()),null!=D&&D.appendChild(O.elt)):null!=M&&M()}else null!=M&&M()}else null!=M&&M();
+return n};Graph.getFontUrl=function(n,D){n=Graph.customFontElements[n.toLowerCase()];null!=n&&(D=n.url);return D};Graph.processFontAttributes=function(n){n=n.getElementsByTagName("*");for(var D=0;D<n.length;D++){var M=n[D].getAttribute("data-font-src");if(null!=M){var T="FONT"==n[D].nodeName?n[D].getAttribute("face"):n[D].style.fontFamily;null!=T&&Graph.addFont(T,M)}}};Graph.processFontStyle=function(n){if(null!=n){var D=mxUtils.getValue(n,"fontSource",null);if(null!=D){var M=mxUtils.getValue(n,mxConstants.STYLE_FONTFAMILY,
+null);null!=M&&Graph.addFont(M,decodeURIComponent(D))}}return n};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var q=Graph.prototype.init;Graph.prototype.init=function(){function n(O){D=O}q.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var D=null;mxEvent.addListener(this.container,"mouseenter",n);mxEvent.addListener(this.container,"mousemove",n);mxEvent.addListener(this.container,"mouseleave",function(O){D=null});this.isMouseInsertPoint=function(){return null!=D};var M=this.getInsertPoint;
this.getInsertPoint=function(){return null!=D?this.getPointForEvent(D):M.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var R=this.graph.getCellStyle(O);if(null!=R&&"rack"==R.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=R.rackUnitSize?parseFloat(R.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=R.marginLeft||0;S.marginRight=R.marginRight||0;S.marginTop=R.marginTop||0;S.marginBottom=
-R.marginBottom||0;S.allowGaps=R.allowGaps||0;S.horizontal="1"==mxUtils.getValue(R,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,D){return Graph.processFontStyle(v.apply(this,arguments))};var x=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,D,M,T,O,R,S,X,Y,aa,ba){x.apply(this,arguments);Graph.processFontAttributes(ba)};
-var E=mxText.prototype.redraw;mxText.prototype.redraw=function(){E.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,D,M){function T(){for(var ea=S.getSelectionCells(),va=[],za=0;za<ea.length;za++)S.isCellVisible(ea[za])&&va.push(ea[za]);S.setSelectionCells(va)}function O(ea){S.setHiddenTags(ea?[]:X.slice());T();S.refresh()}function R(ea,va){aa.innerText="";if(0<ea.length){var za=document.createElement("table");
+R.marginBottom||0;S.allowGaps=R.allowGaps||0;S.horizontal="1"==mxUtils.getValue(R,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var u=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(n,D){return Graph.processFontStyle(u.apply(this,arguments))};var x=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(n,D,M,T,O,R,S,X,Y,aa,ba){x.apply(this,arguments);Graph.processFontAttributes(ba)};
+var E=mxText.prototype.redraw;mxText.prototype.redraw=function(){E.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(n,D,M){function T(){for(var ea=S.getSelectionCells(),va=[],za=0;za<ea.length;za++)S.isCellVisible(ea[za])&&va.push(ea[za]);S.setSelectionCells(va)}function O(ea){S.setHiddenTags(ea?[]:X.slice());T();S.refresh()}function R(ea,va){aa.innerText="";if(0<ea.length){var za=document.createElement("table");
za.setAttribute("cellpadding","2");za.style.boxSizing="border-box";za.style.tableLayout="fixed";za.style.width="100%";var ya=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var ua=0;ua<ea.length;ua++)(function(ca){var Na=0>mxUtils.indexOf(S.hiddenTags,ca),Ka=document.createElement("tr"),Ba=document.createElement("td");Ba.style.align="center";Ba.style.width="16px";var Fa=document.createElement("img");Fa.setAttribute("src",Na?Editor.visibleImage:Editor.hiddenImage);Fa.setAttribute("title",
mxResources.get(Na?"hideIt":"show",[ca]));mxUtils.setOpacity(Fa,Na?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(D||Editor.isDarkMode())Fa.style.filter="invert(100%)";Ba.appendChild(Fa);mxEvent.addListener(Fa,"click",function(Ja){mxEvent.isShiftDown(Ja)?O(0<=mxUtils.indexOf(S.hiddenTags,ca)):(S.toggleHiddenTag(ca),T(),S.refresh());mxEvent.consume(Ja)});Ka.appendChild(Ba);Ba=document.createElement("td");Ba.style.overflow="hidden";Ba.style.whiteSpace="nowrap";
Ba.style.textOverflow="ellipsis";Ba.style.verticalAlign="middle";Ba.style.cursor="pointer";Ba.setAttribute("title",ca);a=document.createElement("a");mxUtils.write(a,ca);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Na?100:40);Ba.appendChild(a);mxEvent.addListener(Ba,"click",function(Ja){if(mxEvent.isShiftDown(Ja)){O(!0);var ra=S.getCellsForTags([ca],null,null,!0);S.isEnabled()?S.setSelectionCells(ra):S.highlightCells(ra)}else if(Na&&0<S.hiddenTags.length)O(!0);else{ra=
@@ -11389,42 +11399,42 @@ X.slice();var ha=mxUtils.indexOf(ra,ca);ra.splice(ha,1);S.setHiddenTags(ra);T();
"middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(D||Editor.isDarkMode())Fa.style.filter="invert(100%)";mxEvent.addListener(Fa,"click",function(Ja){var ra=mxUtils.indexOf(X,ca);0<=ra&&X.splice(ra,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[ca]);S.refresh();mxEvent.consume(Ja)});Ba.appendChild(Fa)}else{var na=document.createElement("input");na.setAttribute("type","checkbox");na.style.margin="0px";na.defaultChecked=null!=va&&0<=mxUtils.indexOf(va,ca);na.checked=na.defaultChecked;
na.style.background="transparent";na.setAttribute("title",mxResources.get(na.defaultChecked?"removeIt":"add",[ca]));mxEvent.addListener(na,"change",function(Ja){na.checked?S.addTagsForCells(S.getSelectionCells(),[ca]):S.removeTagsForCells(S.getSelectionCells(),[ca]);mxEvent.consume(Ja)});Ba.appendChild(na)}Ka.appendChild(Ba)}ya.appendChild(Ka)})(ea[ua]);za.appendChild(ya);aa.appendChild(za)}}var S=this,X=S.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=S.isEnabled()?"1px solid #808080":"none";aa.style.bottom=S.isEnabled()?"48px":"10px";Y.appendChild(aa);var ba=mxUtils.button(mxResources.get("reset"),function(ea){S.setHiddenTags([]);mxEvent.isShiftDown(ea)||
-(X=S.hiddenTags.slice());T();S.refresh()});ba.setAttribute("title",mxResources.get("reset"));ba.className="geBtn";ba.style.margin="0 4px 0 0";var da=mxUtils.button(mxResources.get("add"),function(){null!=M&&M(X,function(ea){X=ea;Z()})});da.setAttribute("title",mxResources.get("add"));da.className="geBtn";da.style.margin="0";S.addListener(mxEvent.ROOT,function(){X=S.hiddenTags.slice()});var Z=mxUtils.bind(this,function(ea,va){if(q()){ea=S.getAllTags();for(va=0;va<ea.length;va++)0>mxUtils.indexOf(X,
+(X=S.hiddenTags.slice());T();S.refresh()});ba.setAttribute("title",mxResources.get("reset"));ba.className="geBtn";ba.style.margin="0 4px 0 0";var da=mxUtils.button(mxResources.get("add"),function(){null!=M&&M(X,function(ea){X=ea;Z()})});da.setAttribute("title",mxResources.get("add"));da.className="geBtn";da.style.margin="0";S.addListener(mxEvent.ROOT,function(){X=S.hiddenTags.slice()});var Z=mxUtils.bind(this,function(ea,va){if(n()){ea=S.getAllTags();for(va=0;va<ea.length;va++)0>mxUtils.indexOf(X,
ea[va])&&X.push(ea[va]);X.sort();S.isSelectionEmpty()?R(X):R(X,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,Z);S.model.addListener(mxEvent.CHANGE,Z);S.addListener(mxEvent.REFRESH,Z);var ia=document.createElement("div");ia.style.boxSizing="border-box";ia.style.whiteSpace="nowrap";ia.style.position="absolute";ia.style.overflow="hidden";ia.style.bottom="0px";ia.style.height="42px";ia.style.right="10px";ia.style.left="10px";S.isEnabled()&&(ia.appendChild(ba),
-ia.appendChild(da),Y.appendChild(ia));return{div:Y,refresh:Z}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var D in Graph.customFontElements){var M=Graph.customFontElements[D];q.push({name:M.name,url:M.url})}return q};Graph.prototype.setFont=function(q,D){Graph.addFont(q,D);document.execCommand("fontname",!1,q);if(null!=D){var M=this.cellEditor.textarea.getElementsByTagName("font");D=Graph.getFontUrl(q,D);for(var T=0;T<M.length;T++)M[T].getAttribute("face")==
-q&&M[T].getAttribute("data-font-src")!=D&&M[T].setAttribute("data-font-src",D)}};var z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return z.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=q)for(var D in q)this.globalVars[D]=
-q[D]}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 G=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var D=G.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[q]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var F=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,D,M,T,O,R,S,X,Y,aa,ba,da,Z,ia){var ea=null,va=null,za=null;da||null==this.themes||"darkTheme"!=this.defaultThemeName||(ea=this.stylesheet,va=this.shapeForegroundColor,za=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+ia.appendChild(da),Y.appendChild(ia));return{div:Y,refresh:Z}};Graph.prototype.getCustomFonts=function(){var n=this.extFonts;n=null!=n?n.slice():[];for(var D in Graph.customFontElements){var M=Graph.customFontElements[D];n.push({name:M.name,url:M.url})}return n};Graph.prototype.setFont=function(n,D){Graph.addFont(n,D);document.execCommand("fontname",!1,n);if(null!=D){var M=this.cellEditor.textarea.getElementsByTagName("font");D=Graph.getFontUrl(n,D);for(var T=0;T<M.length;T++)M[T].getAttribute("face")==
+n&&M[T].getAttribute("data-font-src")!=D&&M[T].setAttribute("data-font-src",D)}};var z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return z.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var n=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=n)for(var D in n)this.globalVars[D]=
+n[D]}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 G=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(n){var D=G.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[n]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var n=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(n.ownerDocument)).decode(n)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var F=Graph.prototype.getSvg;Graph.prototype.getSvg=function(n,D,M,T,O,R,S,X,Y,aa,ba,da,Z,ia){var ea=null,va=null,za=null;da||null==this.themes||"darkTheme"!=this.defaultThemeName||(ea=this.stylesheet,va=this.shapeForegroundColor,za=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 ya=F.apply(this,arguments),ua=this.getCustomFonts();if(ba&&0<ua.length){var ca=ya.ownerDocument,Na=null!=ca.createElementNS?ca.createElementNS(mxConstants.NS_SVG,"style"):ca.createElement("style");null!=ca.setAttributeNS?Na.setAttributeNS("type","text/css"):Na.setAttribute("type","text/css");for(var Ka="",Ba="",Fa=0;Fa<ua.length;Fa++){var na=ua[Fa].name,Ja=ua[Fa].url;Graph.isCssFontUrl(Ja)?
-Ka+="@import url("+Ja+");\n":Ba+='@font-face {\nfont-family: "'+na+'";\nsrc: url("'+Ja+'");\n}\n'}Na.appendChild(ca.createTextNode(Ka+Ba));ya.getElementsByTagName("defs")[0].appendChild(Na)}this.mathEnabled&&(document.body.appendChild(ya),Editor.MathJaxRender(ya),ya.parentNode.removeChild(ya));null!=ea&&(this.shapeBackgroundColor=za,this.shapeForegroundColor=va,this.stylesheet=ea,this.refresh());return ya};var U=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(q){U.apply(this,
-arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var p=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){p.apply(this,arguments);this.enumerationState=0};var u=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return u.apply(this,arguments)};
-mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var D="1"==mxUtils.getValue(q.style,"enumerate",0);D&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):D||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);D=q.secondLabel;if(null!=D){var M=q.view.scale,T=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*M,q.y+4*M,0,0):mxRectangle.fromPoint(q.view.getPoint(q));D.bounds.equals(q)&&D.value==T&&D.scale==M||(D.bounds=q,D.value=T,D.scale=
-M,D.redraw())}};var H=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){H.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=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;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var K=Graph.prototype.refresh;Graph.prototype.refresh=function(){K.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var N=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){N.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),null!=
-q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,D){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var M=!1,T=0,O=0,R=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
-function(){M&&(M=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<T&&T--;0==T&&Y()}),Y=mxUtils.bind(this,function(){if(O<q.length){var aa=this.stoppingCustomActions,ba=q[O++],da=[];if(null!=ba.open)if(S(),this.isCustomLink(ba.open)){if(!this.customLinkClicked(ba.open))return}else this.openLink(ba.open);null==ba.wait||aa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+Ka+="@import url("+Ja+");\n":Ba+='@font-face {\nfont-family: "'+na+'";\nsrc: url("'+Ja+'");\n}\n'}Na.appendChild(ca.createTextNode(Ka+Ba));ya.getElementsByTagName("defs")[0].appendChild(Na)}this.mathEnabled&&(document.body.appendChild(ya),Editor.MathJaxRender(ya),ya.parentNode.removeChild(ya));null!=ea&&(this.shapeBackgroundColor=za,this.shapeForegroundColor=va,this.stylesheet=ea,this.refresh());return ya};var U=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(n){U.apply(this,
+arguments);null!=n.secondLabel&&(n.secondLabel.destroy(),n.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(n){return[n.shape,n.text,n.secondLabel,n.control]};var p=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){p.apply(this,arguments);this.enumerationState=0};var v=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(n){null!=n.shape&&this.redrawEnumerationState(n);return v.apply(this,arguments)};
+mxGraphView.prototype.createEnumerationValue=function(n){n=decodeURIComponent(mxUtils.getValue(n.style,"enumerateValue",""));""==n&&(n=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(n)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(n){var D="1"==mxUtils.getValue(n.style,"enumerate",0);D&&null==n.secondLabel?(n.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+n.secondLabel.size=12,n.secondLabel.state=n,n.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(n,n.secondLabel)):D||null==n.secondLabel||(n.secondLabel.destroy(),n.secondLabel=null);D=n.secondLabel;if(null!=D){var M=n.view.scale,T=this.createEnumerationValue(n);n=this.graph.model.isVertex(n.cell)?new mxRectangle(n.x+n.width-4*M,n.y+4*M,0,0):mxRectangle.fromPoint(n.view.getPoint(n));D.bounds.equals(n)&&D.value==T&&D.scale==M||(D.bounds=n,D.value=T,D.scale=
+M,D.redraw())}};var H=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){H.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var n=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",n.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,n.ownerSVGElement))}};var K=Graph.prototype.refresh;Graph.prototype.refresh=function(){K.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var N=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){N.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(n){"data:action/json,"==n.substring(0,17)&&(n=JSON.parse(n.substring(17)),null!=
+n.actions&&this.executeCustomActions(n.actions))};Graph.prototype.executeCustomActions=function(n,D){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var M=!1,T=0,O=0,R=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
+function(){M&&(M=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<T&&T--;0==T&&Y()}),Y=mxUtils.bind(this,function(){if(O<n.length){var aa=this.stoppingCustomActions,ba=n[O++],da=[];if(null!=ba.open)if(S(),this.isCustomLink(ba.open)){if(!this.customLinkClicked(ba.open))return}else this.openLink(ba.open);null==ba.wait||aa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
""!=ba.wait?parseInt(ba.wait):1E3),S());null!=ba.opacity&&null!=ba.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ba.opacity,!0)),ba.opacity.value);null!=ba.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ba.fadeIn,!0)),0,1,X,aa?0:ba.fadeIn.delay));null!=ba.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ba.fadeOut,!0)),1,0,X,aa?0:ba.fadeOut.delay));null!=ba.wipeIn&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(ba.wipeIn,
!0),!0)));null!=ba.wipeOut&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(ba.wipeOut,!0),!1)));null!=ba.toggle&&(R(),this.toggleCells(this.getCellsForAction(ba.toggle,!0)));if(null!=ba.show){R();var Z=this.getCellsForAction(ba.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Z),1);this.setCellsVisible(Z,!0)}null!=ba.hide&&(R(),Z=this.getCellsForAction(ba.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Z),0),this.setCellsVisible(Z,!1));null!=ba.toggleStyle&&null!=ba.toggleStyle.key&&
(R(),this.toggleCellStyles(ba.toggleStyle.key,null!=ba.toggleStyle.defaultValue?ba.toggleStyle.defaultValue:"0",this.getCellsForAction(ba.toggleStyle,!0)));null!=ba.style&&null!=ba.style.key&&(R(),this.setCellStyles(ba.style.key,ba.style.value,this.getCellsForAction(ba.style,!0)));Z=[];null!=ba.select&&this.isEnabled()&&(Z=this.getCellsForAction(ba.select),this.setSelectionCells(Z));null!=ba.highlight&&(Z=this.getCellsForAction(ba.highlight),this.highlightCells(Z,ba.highlight.color,ba.highlight.duration,
ba.highlight.opacity));null!=ba.scroll&&(Z=this.getCellsForAction(ba.scroll));null!=ba.viewbox&&this.fitWindow(ba.viewbox,ba.viewbox.border);0<Z.length&&this.scrollCellToVisible(Z[0]);if(null!=ba.tags){Z=[];null!=ba.tags.hidden&&(Z=Z.concat(ba.tags.hidden));if(null!=ba.tags.visible)for(var ia=this.getAllTags(),ea=0;ea<ia.length;ea++)0>mxUtils.indexOf(ba.tags.visible,ia[ea])&&0>mxUtils.indexOf(Z,ia[ea])&&Z.push(ia[ea]);this.setHiddenTags(Z);this.refresh()}0<da.length&&(T++,this.executeAnimations(da,
-X,aa?1:ba.steps,aa?0:ba.delay));0==T?Y():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=D&&D()});Y()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,D){var M=this.getLinkForCell(D);null!=M&&"data:action/json,"==M.substring(0,17)&&this.setLinkForCell(D,this.updateCustomLink(q,M));if(this.isHtmlLabel(D)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(D));for(var O=T.getElementsByTagName("a"),R=!1,S=0;S<O.length;S++)M=O[S].getAttribute("href"),
-null!=M&&"data:action/json,"==M.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(q,M)),R=!0);R&&this.labelChanged(D,T.innerHTML)}};Graph.prototype.updateCustomLink=function(q,D){if("data:action/json,"==D.substring(0,17))try{var M=JSON.parse(D.substring(17));null!=M.actions&&(this.updateCustomLinkActions(q,M.actions),D="data:action/json,"+JSON.stringify(M))}catch(T){}return D};Graph.prototype.updateCustomLinkActions=function(q,D){for(var M=0;M<D.length;M++){var T=D[M],O;for(O in T)this.updateCustomLinkAction(q,
-T[O],"cells"),this.updateCustomLinkAction(q,T[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,D,M){if(null!=D&&null!=D[M]){for(var T=[],O=0;O<D[M].length;O++)if("*"==D[M][O])T.push(D[M][O]);else{var R=q[D[M][O]];null!=R?""!=R&&T.push(R):T.push(D[M][O])}D[M]=T}};Graph.prototype.getCellsForAction=function(q,D){D=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,null,D));if(null!=q.excludeCells){for(var M=[],T=0;T<D.length;T++)0>q.excludeCells.indexOf(D[T].id)&&M.push(D[T]);
-D=M}return D};Graph.prototype.getCellsById=function(q){var D=[];if(null!=q)for(var M=0;M<q.length;M++)if("*"==q[M]){var T=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(R){return R!=T},T))}else{var O=this.model.getCell(q[M]);null!=O&&D.push(O)}return D};var I=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return I.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(q))};Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.toggleHiddenTag=function(q){var D=mxUtils.indexOf(this.hiddenTags,q);0>D?this.hiddenTags.push(q):0<=D&&this.hiddenTags.splice(D,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;for(var D=0;D<q.length;D++)if(0>mxUtils.indexOf(this.hiddenTags,q[D]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,D,M,
-T){var O=[];if(null!=q){D=null!=D?D:this.model.getDescendants(this.model.getRoot());for(var R=0,S={},X=0;X<q.length;X++)0<q[X].length&&(S[q[X]]=!0,R++);for(X=0;X<D.length;X++)if(M&&this.model.getParent(D[X])==this.model.root||this.model.isVertex(D[X])||this.model.isEdge(D[X])){var Y=this.getTagsForCell(D[X]),aa=!1;if(0<Y.length&&(Y=Y.split(" "),Y.length>=q.length)){for(var ba=aa=0;ba<Y.length&&aa<R;ba++)null!=S[Y[ba]]&&aa++;aa=aa==R}aa&&(1!=T||this.isCellVisible(D[X]))&&O.push(D[X])}}return O};Graph.prototype.getAllTags=
-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var D=null,M=[],T=0;T<q.length;T++){var O=this.getTagsForCell(q[T]);M=[];if(0<O.length){O=O.split(" ");for(var R={},S=0;S<O.length;S++)if(null==D||null!=D[O[S]])R[O[S]]=!0,M.push(O[S]);D=R}else return[]}return M};Graph.prototype.getTagsForCells=function(q){for(var D=[],M={},T=0;T<q.length;T++){var O=this.getTagsForCell(q[T]);if(0<O.length){O=O.split(" ");for(var R=
-0;R<O.length;R++)null==M[O[R]]&&(M[O[R]]=!0,D.push(O[R]))}}return D};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,D){if(0<q.length&&0<D.length){this.model.beginUpdate();try{for(var M=0;M<q.length;M++){for(var T=this.getTagsForCell(q[M]),O=T.split(" "),R=!1,S=0;S<D.length;S++){var X=mxUtils.trim(D[S]);""!=X&&0>mxUtils.indexOf(O,X)&&(T=0<T.length?T+" "+X:X,R=!0)}R&&this.setAttributeForCell(q[M],"tags",T)}}finally{this.model.endUpdate()}}};
-Graph.prototype.removeTagsForCells=function(q,D){if(0<q.length&&0<D.length){this.model.beginUpdate();try{for(var M=0;M<q.length;M++){var T=this.getTagsForCell(q[M]);if(0<T.length){for(var O=T.split(" "),R=!1,S=0;S<D.length;S++){var X=mxUtils.indexOf(O,D[S]);0<=X&&(O.splice(X,1),R=!0)}R&&this.setAttributeForCell(q[M],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var D=0;D<q.length;D++)this.model.setVisible(q[D],!this.model.isVisible(q[D]))}finally{this.model.endUpdate()}};
-Graph.prototype.setCellsVisible=function(q,D){this.model.beginUpdate();try{for(var M=0;M<q.length;M++)this.model.setVisible(q[M],D)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(q,D,M,T){for(var O=0;O<q.length;O++)this.highlightCell(q[O],D,M,T)};Graph.prototype.highlightCell=function(q,D,M,T,O){D=null!=D?D:mxConstants.DEFAULT_VALID_COLOR;M=null!=M?M:1E3;q=this.view.getState(q);var R=null;null!=q&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,
-1)+O),R=new mxCellHighlight(this,D,O,!1),null!=T&&(R.opacity=T),R.highlight(q),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(q,D,M,T){M=null!=M?M:!1;T=null!=T?T:!0;var O=q.ownerDocument,R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");R.setAttribute("id",
+X,aa?1:ba.steps,aa?0:ba.delay));0==T?Y():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=D&&D()});Y()}};Graph.prototype.doUpdateCustomLinksForCell=function(n,D){var M=this.getLinkForCell(D);null!=M&&"data:action/json,"==M.substring(0,17)&&this.setLinkForCell(D,this.updateCustomLink(n,M));if(this.isHtmlLabel(D)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(D));for(var O=T.getElementsByTagName("a"),R=!1,S=0;S<O.length;S++)M=O[S].getAttribute("href"),
+null!=M&&"data:action/json,"==M.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(n,M)),R=!0);R&&this.labelChanged(D,T.innerHTML)}};Graph.prototype.updateCustomLink=function(n,D){if("data:action/json,"==D.substring(0,17))try{var M=JSON.parse(D.substring(17));null!=M.actions&&(this.updateCustomLinkActions(n,M.actions),D="data:action/json,"+JSON.stringify(M))}catch(T){}return D};Graph.prototype.updateCustomLinkActions=function(n,D){for(var M=0;M<D.length;M++){var T=D[M],O;for(O in T)this.updateCustomLinkAction(n,
+T[O],"cells"),this.updateCustomLinkAction(n,T[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(n,D,M){if(null!=D&&null!=D[M]){for(var T=[],O=0;O<D[M].length;O++)if("*"==D[M][O])T.push(D[M][O]);else{var R=n[D[M][O]];null!=R?""!=R&&T.push(R):T.push(D[M][O])}D[M]=T}};Graph.prototype.getCellsForAction=function(n,D){D=this.getCellsById(n.cells).concat(this.getCellsForTags(n.tags,null,D));if(null!=n.excludeCells){for(var M=[],T=0;T<D.length;T++)0>n.excludeCells.indexOf(D[T].id)&&M.push(D[T]);
+D=M}return D};Graph.prototype.getCellsById=function(n){var D=[];if(null!=n)for(var M=0;M<n.length;M++)if("*"==n[M]){var T=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(R){return R!=T},T))}else{var O=this.model.getCell(n[M]);null!=O&&D.push(O)}return D};var I=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(n){return I.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(n))};Graph.prototype.setHiddenTags=function(n){this.hiddenTags=n;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.toggleHiddenTag=function(n){var D=mxUtils.indexOf(this.hiddenTags,n);0>D?this.hiddenTags.push(n):0<=D&&this.hiddenTags.splice(D,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(n){if(null==n||0==n.length||0==this.hiddenTags.length)return!1;n=n.split(" ");if(n.length>this.hiddenTags.length)return!1;for(var D=0;D<n.length;D++)if(0>mxUtils.indexOf(this.hiddenTags,n[D]))return!1;return!0};Graph.prototype.getCellsForTags=function(n,D,M,
+T){var O=[];if(null!=n){D=null!=D?D:this.model.getDescendants(this.model.getRoot());for(var R=0,S={},X=0;X<n.length;X++)0<n[X].length&&(S[n[X]]=!0,R++);for(X=0;X<D.length;X++)if(M&&this.model.getParent(D[X])==this.model.root||this.model.isVertex(D[X])||this.model.isEdge(D[X])){var Y=this.getTagsForCell(D[X]),aa=!1;if(0<Y.length&&(Y=Y.split(" "),Y.length>=n.length)){for(var ba=aa=0;ba<Y.length&&aa<R;ba++)null!=S[Y[ba]]&&aa++;aa=aa==R}aa&&(1!=T||this.isCellVisible(D[X]))&&O.push(D[X])}}return O};Graph.prototype.getAllTags=
+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(n){for(var D=null,M=[],T=0;T<n.length;T++){var O=this.getTagsForCell(n[T]);M=[];if(0<O.length){O=O.split(" ");for(var R={},S=0;S<O.length;S++)if(null==D||null!=D[O[S]])R[O[S]]=!0,M.push(O[S]);D=R}else return[]}return M};Graph.prototype.getTagsForCells=function(n){for(var D=[],M={},T=0;T<n.length;T++){var O=this.getTagsForCell(n[T]);if(0<O.length){O=O.split(" ");for(var R=
+0;R<O.length;R++)null==M[O[R]]&&(M[O[R]]=!0,D.push(O[R]))}}return D};Graph.prototype.getTagsForCell=function(n){return this.getAttributeForCell(n,"tags","")};Graph.prototype.addTagsForCells=function(n,D){if(0<n.length&&0<D.length){this.model.beginUpdate();try{for(var M=0;M<n.length;M++){for(var T=this.getTagsForCell(n[M]),O=T.split(" "),R=!1,S=0;S<D.length;S++){var X=mxUtils.trim(D[S]);""!=X&&0>mxUtils.indexOf(O,X)&&(T=0<T.length?T+" "+X:X,R=!0)}R&&this.setAttributeForCell(n[M],"tags",T)}}finally{this.model.endUpdate()}}};
+Graph.prototype.removeTagsForCells=function(n,D){if(0<n.length&&0<D.length){this.model.beginUpdate();try{for(var M=0;M<n.length;M++){var T=this.getTagsForCell(n[M]);if(0<T.length){for(var O=T.split(" "),R=!1,S=0;S<D.length;S++){var X=mxUtils.indexOf(O,D[S]);0<=X&&(O.splice(X,1),R=!0)}R&&this.setAttributeForCell(n[M],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(n){this.model.beginUpdate();try{for(var D=0;D<n.length;D++)this.model.setVisible(n[D],!this.model.isVisible(n[D]))}finally{this.model.endUpdate()}};
+Graph.prototype.setCellsVisible=function(n,D){this.model.beginUpdate();try{for(var M=0;M<n.length;M++)this.model.setVisible(n[M],D)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(n,D,M,T){for(var O=0;O<n.length;O++)this.highlightCell(n[O],D,M,T)};Graph.prototype.highlightCell=function(n,D,M,T,O){D=null!=D?D:mxConstants.DEFAULT_VALID_COLOR;M=null!=M?M:1E3;n=this.view.getState(n);var R=null;null!=n&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(n.style,mxConstants.STYLE_STROKEWIDTH,
+1)+O),R=new mxCellHighlight(this,D,O,!1),null!=T&&(R.opacity=T),R.highlight(n),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(n,D,M,T){M=null!=M?M:!1;T=null!=T?T:!0;var O=n.ownerDocument,R=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");R.setAttribute("id",
this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",
"offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");
-S.setAttribute("result","offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");R.appendChild(S);S=q.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=q.firstChild?q.insertBefore(O,q.firstChild):q.appendChild(O)):O=S[0];O.appendChild(R);M||(D=null!=D?D:q.getElementsByTagName("g")[0],
-null!=D&&(D.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&T&&(q.setAttribute("width",parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+6),D=q.getAttribute("viewBox"),null!=D&&0<D.length&&(D=D.split(" "),3<D.length&&(w=parseFloat(D[2])+6,h=parseFloat(D[3])+6,q.setAttribute("viewBox",D[0]+" "+D[1]+" "+w+" "+h))))));return R};Graph.prototype.setShadowVisible=function(q,D){mxClient.IS_SVG&&!mxClient.IS_SF&&(D=
-null!=D?D:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),D&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),D=0;do var M=this.model.getChildAt(this.model.root,D);while(D++<q&&"1"==mxUtils.getValue(this.getCellStyle(M),"locked","0"));null!=M&&this.setDefaultParent(M)}};
+S.setAttribute("result","offsetBlur");R.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");R.appendChild(S);S=n.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=n.firstChild?n.insertBefore(O,n.firstChild):n.appendChild(O)):O=S[0];O.appendChild(R);M||(D=null!=D?D:n.getElementsByTagName("g")[0],
+null!=D&&(D.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(n.getAttribute("width")))&&T&&(n.setAttribute("width",parseInt(n.getAttribute("width"))+6),n.setAttribute("height",parseInt(n.getAttribute("height"))+6),D=n.getAttribute("viewBox"),null!=D&&0<D.length&&(D=D.split(" "),3<D.length&&(w=parseFloat(D[2])+6,h=parseFloat(D[3])+6,n.setAttribute("viewBox",D[0]+" "+D[1]+" "+w+" "+h))))));return R};Graph.prototype.setShadowVisible=function(n,D){mxClient.IS_SVG&&!mxClient.IS_SF&&(D=
+null!=D?D:!0,(this.shadowVisible=n)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),D&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var n=this.model.getChildCount(this.model.root),D=0;do var M=this.model.getChildAt(this.model.root,D);while(D++<n&&"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",
STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=
@@ -11436,583 +11446,587 @@ 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(q){var D=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?D="mxgraph.er":"sysML"==q.substring(0,5)&&(D="mxgraph.sysml"));return D};var L=mxMarker.createMarker;mxMarker.createMarker=function(q,D,M,T,O,R,S,X,Y,aa){if(null!=M&&null==mxMarker.markers[M]){var ba=this.getPackageForType(M);null!=ba&&mxStencilRegistry.getStencil(ba)}return L.apply(this,arguments)};var Q=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=
-function(q,D,M,T,O,R){"1"==mxUtils.getValue(D.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(D.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return Q.apply(this,arguments)};PrintDialog.prototype.create=function(q,D){function M(){Z.value=Math.max(1,Math.min(X,Math.max(parseInt(Z.value),parseInt(da.value))));da.value=Math.max(1,Math.min(X,Math.min(parseInt(Z.value),parseInt(da.value))))}function T(ma){function sa(Ha,La,Ma){var Pa=Ha.useCssTransforms,Ra=Ha.currentTranslate,Ua=Ha.currentScale,
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(n){var D=null;null!=n&&0<n.length&&("ER"==n.substring(0,2)?D="mxgraph.er":"sysML"==n.substring(0,5)&&(D="mxgraph.sysml"));return D};var L=mxMarker.createMarker;mxMarker.createMarker=function(n,D,M,T,O,R,S,X,Y,aa){if(null!=M&&null==mxMarker.markers[M]){var ba=this.getPackageForType(M);null!=ba&&mxStencilRegistry.getStencil(ba)}return L.apply(this,arguments)};var Q=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=
+function(n,D,M,T,O,R){"1"==mxUtils.getValue(D.style,"lineShape",null)&&n.setFillColor(mxUtils.getValue(D.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return Q.apply(this,arguments)};PrintDialog.prototype.create=function(n,D){function M(){Z.value=Math.max(1,Math.min(X,Math.max(parseInt(Z.value),parseInt(da.value))));da.value=Math.max(1,Math.min(X,Math.min(parseInt(Z.value),parseInt(da.value))))}function T(ma){function sa(Ha,La,Ma){var Pa=Ha.useCssTransforms,Ra=Ha.currentTranslate,Ua=Ha.currentScale,
Ia=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 Sa=Ha.getGraphBounds(),Wa=0,$a=0,Xa=wa.get(),ab=1/Ha.pageScale,Za=ya.checked;if(Za){ab=parseInt(ha.value);var gb=parseInt(fa.value);ab=Math.min(Xa.height*gb/(Sa.height/Ha.view.scale),Xa.width*ab/(Sa.width/Ha.view.scale))}else ab=parseInt(za.value)/(100*Ha.pageScale),isNaN(ab)&&(oa=1/Ha.pageScale,za.value="100 %");
-Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*oa);Xa.height=Math.ceil(Xa.height*oa);ab*=oa;!Za&&Ha.pageVisible?(Sa=Ha.getPageLayout(),Wa-=Sa.x*Xa.width,$a-=Sa.y*Xa.height):Za=!0;if(null==La){La=PrintDialog.createPrintPreview(Ha,ab,Xa,0,Wa,$a,Za);La.pageSelector=!1;La.mathEnabled=!1;ia.checked&&(La.isCellVisible=function(Ya){return Ha.isCellSelected(Ya)});Wa=q.getCurrentFile();null!=Wa&&(La.title=Wa.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!=q.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(q.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">'):
+Xa=mxRectangle.fromRectangle(Xa);Xa.width=Math.ceil(Xa.width*oa);Xa.height=Math.ceil(Xa.height*oa);ab*=oa;!Za&&Ha.pageVisible?(Sa=Ha.getPageLayout(),Wa-=Sa.x*Xa.width,$a-=Sa.y*Xa.height):Za=!0;if(null==La){La=PrintDialog.createPrintPreview(Ha,ab,Xa,0,Wa,$a,Za);La.pageSelector=!1;La.mathEnabled=!1;ia.checked&&(La.isCellVisible=function(Ya){return Ha.isCellSelected(Ya)});Wa=n.getCurrentFile();null!=Wa&&(La.title=Wa.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!=n.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(n.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">'):
(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}}Wa=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor;
Xa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Wa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());La.open(null,null,Ma,!0);O.enableFlowAnimation=Xa;null!=Wa&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Wa,O.refresh())}else{Xa=Ha.background;if(null==Xa||""==Xa||Xa==mxConstants.NONE)Xa="#ffffff";La.backgroundColor=Xa;La.autoOrigin=Za;La.appendGraph(Ha,
ab,Wa,$a,Ma,!0);Ma=Ha.getCustomFonts();if(null!=La.wnd)for(Wa=0;Wa<Ma.length;Wa++)$a=Ma[Wa].name,Za=Ma[Wa].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>"))}Pa&&(Ha.useCssTransforms=Pa,
-Ha.currentTranslate=Ra,Ha.currentScale=Ua,Ha.view.translate=Ia,Ha.view.scale=Ta);return La}var oa=parseInt(ja.value)/100;isNaN(oa)&&(oa=1,ja.value="100 %");oa*=.75;var pa=null,Ea=O.shapeForegroundColor,ka=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(pa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var la=da.value,qa=Z.value,Aa=!aa.checked,Ca=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,
-aa.checked,la,qa,ya.checked,ha.value,fa.value,parseInt(za.value)/100,parseInt(ja.value)/100,wa.get());else{Aa&&(Aa=ia.checked||la==Y&&qa==Y);if(!Aa&&null!=q.pages&&q.pages.length){var Ga=0;Aa=q.pages.length-1;aa.checked||(Ga=parseInt(la)-1,Aa=parseInt(qa)-1);for(var Da=Ga;Da<=Aa;Da++){var xa=q.pages[Da];la=xa==q.currentPage?O:null;if(null==la){la=q.createTemporaryGraph(O.stylesheet);la.shapeForegroundColor=O.shapeForegroundColor;la.shapeBackgroundColor=O.shapeBackgroundColor;qa=!0;Ga=!1;var ta=null,
-Oa=null;null==xa.viewState&&null==xa.root&&q.updatePageRoot(xa);null!=xa.viewState&&(qa=xa.viewState.pageVisible,Ga=xa.viewState.mathEnabled,ta=xa.viewState.background,Oa=xa.viewState.backgroundImage,la.extFonts=xa.viewState.extFonts);null!=Oa&&null!=Oa.originalSrc&&(Oa=q.createImageForPageLink(Oa.originalSrc,xa));la.background=ta;la.backgroundImage=null!=Oa?new mxImage(Oa.src,Oa.width,Oa.height,Oa.x,Oa.y):null;la.pageVisible=qa;la.mathEnabled=Ga;var Qa=la.getGraphBounds;la.getGraphBounds=function(){var Ha=
-Qa.apply(this,arguments),La=this.backgroundImage;if(null!=La&&null!=La.width&&null!=La.height){var Ma=this.view.translate,Pa=this.view.scale;Ha=mxRectangle.fromRectangle(Ha);Ha.add(new mxRectangle((Ma.x+La.x)*Pa,(Ma.y+La.y)*Pa,La.width*Pa,La.height*Pa))}return Ha};var Va=la.getGlobalVariable;la.getGlobalVariable=function(Ha){return"page"==Ha?xa.getName():"pagenumber"==Ha?Da+1:"pagecount"==Ha?null!=q.pages?q.pages.length:1:Va.apply(this,arguments)};document.body.appendChild(la.container);q.updatePageRoot(xa);
-la.model.setRoot(xa.root)}Ca=sa(la,Ca,Da!=Aa);la!=O&&la.container.parentNode.removeChild(la.container)}}else Ca=sa(O);null==Ca?q.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ca.mathEnabled&&(Aa=Ca.wnd.document,ma&&(Ca.wnd.IMMEDIATE_PRINT=!0),Aa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ca.closeDocument(),!Ca.mathEnabled&&ma&&PrintDialog.printPreview(Ca));null!=pa&&(O.shapeForegroundColor=Ea,O.shapeBackgroundColor=ka,O.stylesheet=
-pa,O.refresh())}}var O=q.editor.graph,R=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,D||mxResources.get("print"));R.appendChild(S);var X=1,Y=1;S=document.createElement("div");S.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",
+Ha.currentTranslate=Ra,Ha.currentScale=Ua,Ha.view.translate=Ia,Ha.view.scale=Ta);return La}var oa=parseInt(ja.value)/100;isNaN(oa)&&(oa=1,ja.value="100 %");oa*=.75;var pa=null,Ea=O.shapeForegroundColor,ka=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(pa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());var la=da.value,qa=Z.value,Aa=!aa.checked,Ca=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(n,
+aa.checked,la,qa,ya.checked,ha.value,fa.value,parseInt(za.value)/100,parseInt(ja.value)/100,wa.get());else{Aa&&(Aa=ia.checked||la==Y&&qa==Y);if(!Aa&&null!=n.pages&&n.pages.length){var Ga=0;Aa=n.pages.length-1;aa.checked||(Ga=parseInt(la)-1,Aa=parseInt(qa)-1);for(var Da=Ga;Da<=Aa;Da++){var xa=n.pages[Da];la=xa==n.currentPage?O:null;if(null==la){la=n.createTemporaryGraph(O.stylesheet);la.shapeForegroundColor=O.shapeForegroundColor;la.shapeBackgroundColor=O.shapeBackgroundColor;qa=!0;Ga=!1;var ta=null,
+Oa=null;null==xa.viewState&&null==xa.root&&n.updatePageRoot(xa);null!=xa.viewState&&(qa=xa.viewState.pageVisible,Ga=xa.viewState.mathEnabled,ta=xa.viewState.background,Oa=xa.viewState.backgroundImage,la.extFonts=xa.viewState.extFonts);null!=Oa&&null!=Oa.originalSrc&&(Oa=n.createImageForPageLink(Oa.originalSrc,xa));la.background=ta;la.backgroundImage=null!=Oa?new mxImage(Oa.src,Oa.width,Oa.height,Oa.x,Oa.y):null;la.pageVisible=qa;la.mathEnabled=Ga;var Qa=la.getGraphBounds;la.getGraphBounds=function(){var Ha=
+Qa.apply(this,arguments),La=this.backgroundImage;if(null!=La&&null!=La.width&&null!=La.height){var Ma=this.view.translate,Pa=this.view.scale;Ha=mxRectangle.fromRectangle(Ha);Ha.add(new mxRectangle((Ma.x+La.x)*Pa,(Ma.y+La.y)*Pa,La.width*Pa,La.height*Pa))}return Ha};var Va=la.getGlobalVariable;la.getGlobalVariable=function(Ha){return"page"==Ha?xa.getName():"pagenumber"==Ha?Da+1:"pagecount"==Ha?null!=n.pages?n.pages.length:1:Va.apply(this,arguments)};document.body.appendChild(la.container);n.updatePageRoot(xa);
+la.model.setRoot(xa.root)}Ca=sa(la,Ca,Da!=Aa);la!=O&&la.container.parentNode.removeChild(la.container)}}else Ca=sa(O);null==Ca?n.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ca.mathEnabled&&(Aa=Ca.wnd.document,ma&&(Ca.wnd.IMMEDIATE_PRINT=!0),Aa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ca.closeDocument(),!Ca.mathEnabled&&ma&&PrintDialog.printPreview(Ca));null!=pa&&(O.shapeForegroundColor=Ea,O.shapeBackgroundColor=ka,O.stylesheet=
+pa,O.refresh())}}var O=n.editor.graph,R=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,D||mxResources.get("print"));R.appendChild(S);var X=1,Y=1;S=document.createElement("div");S.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");S.appendChild(aa);D=document.createElement("span");mxUtils.write(D,mxResources.get("printAllPages"));S.appendChild(D);mxUtils.br(S);var ba=aa.cloneNode(!0);aa.setAttribute("checked","checked");ba.setAttribute("value","range");S.appendChild(ba);D=document.createElement("span");mxUtils.write(D,mxResources.get("pages")+":");S.appendChild(D);var da=document.createElement("input");da.style.cssText="margin:0 8px 0 8px;";da.setAttribute("value","1");da.setAttribute("type",
-"number");da.setAttribute("min","1");da.style.width="50px";S.appendChild(da);D=document.createElement("span");mxUtils.write(D,mxResources.get("to"));S.appendChild(D);var Z=da.cloneNode(!0);S.appendChild(Z);mxEvent.addListener(da,"focus",function(){ba.checked=!0});mxEvent.addListener(Z,"focus",function(){ba.checked=!0});mxEvent.addListener(da,"change",M);mxEvent.addListener(Z,"change",M);if(null!=q.pages&&(X=q.pages.length,null!=q.currentPage))for(D=0;D<q.pages.length;D++)if(q.currentPage==q.pages[D]){Y=
-D+1;da.value=Y;Z.value=Y;break}da.setAttribute("max",X);Z.setAttribute("max",X);q.isPagesEnabled()?1<X&&(R.appendChild(S),ba.checked=!0):ba.checked=!0;mxUtils.br(S);var ia=document.createElement("input");ia.setAttribute("value","all");ia.setAttribute("type","radio");ia.style.marginRight="8px";O.isSelectionEmpty()&&ia.setAttribute("disabled","disabled");var ea=document.createElement("div");ea.style.marginBottom="10px";1==X?(ia.setAttribute("type","checkbox"),ia.style.marginBottom="12px",ea.appendChild(ia)):
+"number");da.setAttribute("min","1");da.style.width="50px";S.appendChild(da);D=document.createElement("span");mxUtils.write(D,mxResources.get("to"));S.appendChild(D);var Z=da.cloneNode(!0);S.appendChild(Z);mxEvent.addListener(da,"focus",function(){ba.checked=!0});mxEvent.addListener(Z,"focus",function(){ba.checked=!0});mxEvent.addListener(da,"change",M);mxEvent.addListener(Z,"change",M);if(null!=n.pages&&(X=n.pages.length,null!=n.currentPage))for(D=0;D<n.pages.length;D++)if(n.currentPage==n.pages[D]){Y=
+D+1;da.value=Y;Z.value=Y;break}da.setAttribute("max",X);Z.setAttribute("max",X);n.isPagesEnabled()?1<X&&(R.appendChild(S),ba.checked=!0):ba.checked=!0;mxUtils.br(S);var ia=document.createElement("input");ia.setAttribute("value","all");ia.setAttribute("type","radio");ia.style.marginRight="8px";O.isSelectionEmpty()&&ia.setAttribute("disabled","disabled");var ea=document.createElement("div");ea.style.marginBottom="10px";1==X?(ia.setAttribute("type","checkbox"),ia.style.marginBottom="12px",ea.appendChild(ia)):
(ia.setAttribute("name","pages-printdialog"),ia.style.marginBottom="8px",S.appendChild(ia));D=document.createElement("span");mxUtils.write(D,mxResources.get("selectionOnly"));ia.parentNode.appendChild(D);1==X&&mxUtils.br(ia.parentNode);var va=document.createElement("input");va.style.marginRight="8px";va.setAttribute("value","adjust");va.setAttribute("type","radio");va.setAttribute("name","printZoom");ea.appendChild(va);D=document.createElement("span");mxUtils.write(D,mxResources.get("adjustTo"));
ea.appendChild(D);var za=document.createElement("input");za.style.cssText="margin:0 8px 0 8px;";za.setAttribute("value","100 %");za.style.width="50px";ea.appendChild(za);mxEvent.addListener(za,"focus",function(){va.checked=!0});R.appendChild(ea);S=S.cloneNode(!1);var ya=va.cloneNode(!0);ya.setAttribute("value","fit");va.setAttribute("checked","checked");D=document.createElement("div");D.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";D.appendChild(ya);S.appendChild(D);ea=
document.createElement("table");ea.style.display="inline-block";var ua=document.createElement("tbody"),ca=document.createElement("tr"),Na=ca.cloneNode(!0),Ka=document.createElement("td"),Ba=Ka.cloneNode(!0),Fa=Ka.cloneNode(!0),na=Ka.cloneNode(!0),Ja=Ka.cloneNode(!0),ra=Ka.cloneNode(!0);Ka.style.textAlign="right";na.style.textAlign="right";mxUtils.write(Ka,mxResources.get("fitTo"));var ha=document.createElement("input");ha.style.cssText="margin:0 8px 0 8px;";ha.setAttribute("value","1");ha.setAttribute("min",
"1");ha.setAttribute("type","number");ha.style.width="40px";Ba.appendChild(ha);D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsAcross"));Fa.appendChild(D);mxUtils.write(na,mxResources.get("fitToBy"));var fa=ha.cloneNode(!0);Ja.appendChild(fa);mxEvent.addListener(ha,"focus",function(){ya.checked=!0});mxEvent.addListener(fa,"focus",function(){ya.checked=!0});D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsDown"));ra.appendChild(D);ca.appendChild(Ka);
-ca.appendChild(Ba);ca.appendChild(Fa);Na.appendChild(na);Na.appendChild(Ja);Na.appendChild(ra);ua.appendChild(ca);ua.appendChild(Na);ea.appendChild(ua);S.appendChild(ea);R.appendChild(S);S=document.createElement("div");D=document.createElement("div");D.style.fontWeight="bold";D.style.marginBottom="12px";mxUtils.write(D,mxResources.get("paperSize"));S.appendChild(D);D=document.createElement("div");D.style.marginBottom="12px";var wa=PageSetupDialog.addPageFormatPanel(D,"printdialog",q.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(D);D=document.createElement("span");mxUtils.write(D,mxResources.get("pageScale"));S.appendChild(D);var ja=document.createElement("input");ja.style.cssText="margin:0 8px 0 8px;";ja.setAttribute("value","100 %");ja.style.width="60px";S.appendChild(ja);R.appendChild(S);D=document.createElement("div");D.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});S.className="geBtn";q.editor.cancelFirst&&
-D.appendChild(S);q.isOffline()||(ea=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ea.className="geBtn",D.appendChild(ea));PrintDialog.previewEnabled&&(ea=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();T(!1)}),ea.className="geBtn",D.appendChild(ea));ea=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();T(!0)});ea.className="geBtn gePrimaryBtn";D.appendChild(ea);q.editor.cancelFirst||
-D.appendChild(S);R.appendChild(D);this.container=R};var P=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=
+ca.appendChild(Ba);ca.appendChild(Fa);Na.appendChild(na);Na.appendChild(Ja);Na.appendChild(ra);ua.appendChild(ca);ua.appendChild(Na);ea.appendChild(ua);S.appendChild(ea);R.appendChild(S);S=document.createElement("div");D=document.createElement("div");D.style.fontWeight="bold";D.style.marginBottom="12px";mxUtils.write(D,mxResources.get("paperSize"));S.appendChild(D);D=document.createElement("div");D.style.marginBottom="12px";var wa=PageSetupDialog.addPageFormatPanel(D,"printdialog",n.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(D);D=document.createElement("span");mxUtils.write(D,mxResources.get("pageScale"));S.appendChild(D);var ja=document.createElement("input");ja.style.cssText="margin:0 8px 0 8px;";ja.setAttribute("value","100 %");ja.style.width="60px";S.appendChild(ja);R.appendChild(S);D=document.createElement("div");D.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});S.className="geBtn";n.editor.cancelFirst&&
+D.appendChild(S);n.isOffline()||(ea=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ea.className="geBtn",D.appendChild(ea));PrintDialog.previewEnabled&&(ea=mxUtils.button(mxResources.get("preview"),function(){n.hideDialog();T(!1)}),ea.className="geBtn",D.appendChild(ea));ea=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){n.hideDialog();T(!0)});ea.className="geBtn gePrimaryBtn";D.appendChild(ea);n.editor.cancelFirst||
+D.appendChild(S);R.appendChild(D);this.container=R};var P=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var n=this.image;null!=n&&null!=n.src&&Graph.isPageLink(n.src)&&(n={originalSrc:n.src});this.page.viewState.backgroundImage=n}null!=this.format&&(this.page.viewState.pageFormat=
this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else P.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
-!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var V=document.createElement("canvas"),W=new Image;W.onload=function(){try{V.getContext("2d").drawImage(W,0,0);var q=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(D){}};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(q){}Editor.prototype.useCanvasForExport=
-!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(d,e,c){c.ui=d.ui;return e};b.afterDecode=function(d,e,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(d,e,c){c.ui=d.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.4.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var V=document.createElement("canvas"),W=new Image;W.onload=function(){try{V.getContext("2d").drawImage(W,0,0);var n=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=n&&6<n.length}catch(D){}};W.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}Editor.prototype.useCanvasForExport=
+!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(d,f,c){c.ui=d.ui;return f};b.afterDecode=function(d,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(d,f,c){c.ui=d.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.4.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=
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(f,g,k,n,v,x,E){x=null!=x?x:0<=f.indexOf("NetworkError")||0<=f.indexOf("SecurityError")||0<=f.indexOf("NS_ERROR_FAILURE")||0<=f.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(f!=EditorUi.lastErrorMessage&&(null==f||null==g||-1==f.indexOf("Script error")&&-1==f.indexOf("extension"))&&null!=f&&0>f.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=f;var z=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";v=null!=v?v:Error(f);(new Image).src=z+"/log?severity="+x+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(f)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=n?":colno:"+
-encodeURIComponent(n):"")+(null!=v&&null!=v.stack?"&stack="+encodeURIComponent(v.stack):"")}}catch(G){}try{E||null==window.console||console.error(x,f,g,k,n,v)}catch(G){}};EditorUi.logEvent=function(f){if("1"==urlParams.dev)EditorUi.debug("logEvent",f);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=f?"&data="+encodeURIComponent(JSON.stringify(f)):"")}catch(k){}};EditorUi.sendReport=
-function(f,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",f);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,f.length>g&&(f=f.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(f))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var f=[(new Date).toISOString()],g=0;g<arguments.length;g++)f.push(arguments[g]);console.log.apply(console,
-f)}}catch(k){}};EditorUi.removeChildNodes=function(f){for(;null!=f.firstChild;)f.removeChild(f.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+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(e,g,k,q,u,x,E){x=null!=x?x:0<=e.indexOf("NetworkError")||0<=e.indexOf("SecurityError")||0<=e.indexOf("NS_ERROR_FAILURE")||0<=e.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(e!=EditorUi.lastErrorMessage&&(null==e||null==g||-1==e.indexOf("Script error")&&-1==e.indexOf("extension"))&&null!=e&&0>e.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=e;var z=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";u=null!=u?u:Error(e);(new Image).src=z+"/log?severity="+x+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(e)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=q?":colno:"+
+encodeURIComponent(q):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}}catch(G){}try{E||null==window.console||console.error(x,e,g,k,q,u)}catch(G){}};EditorUi.logEvent=function(e){if("1"==urlParams.dev)EditorUi.debug("logEvent",e);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=e?"&data="+encodeURIComponent(JSON.stringify(e)):"")}catch(k){}};EditorUi.sendReport=
+function(e,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",e);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,e.length>g&&(e=e.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(e))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var e=[(new Date).toISOString()],g=0;g<arguments.length;g++)e.push(arguments[g]);console.log.apply(console,
+e)}}catch(k){}};EditorUi.removeChildNodes=function(e){for(;null!=e.firstChild;)e.removeChild(e.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var f=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!f.getContext||!f.getContext("2d"))}catch(v){}try{var g=document.createElement("canvas"),k=new Image;k.onload=function(){try{g.getContext("2d").drawImage(k,0,0);var v=
-g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=v&&6<v.length}catch(x){}};k.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(v){}try{g=document.createElement("canvas");g.width=g.height=1;var n=g.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==n.match("image/jpeg")}catch(v){}})();EditorUi.prototype.openLink=function(f,g,k){return this.editor.graph.openLink(f,g,k)};EditorUi.prototype.showSplash=function(f){};EditorUi.prototype.getLocalData=function(f,g){g(localStorage.getItem(f))};EditorUi.prototype.setLocalData=function(f,g,k){localStorage.setItem(f,g);null!=k&&k()};EditorUi.prototype.removeLocalData=function(f,g){localStorage.removeItem(f);g()};EditorUi.prototype.setShareCursorPosition=function(f){this.shareCursorPosition=
-f;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(f){this.showRemoteCursors=f;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(f){this.editor.graph.mathEnabled=f;this.editor.updateGraphComponents();this.editor.graph.refresh();
-this.editor.graph.defaultMathEnabled=f;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(f){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(f){return this.isOfflineApp()||!navigator.onLine||!f&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(f,g,k){var n=null==f||null==g;k=null!=k?k:24;var v=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}),x=v.spin;v.spin=function(z,G){var F=!1;this.active||(x.call(this,z),this.active=!0,null!=G&&(n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,f=document.body.clientWidth/2-2),F=document.createElement("div"),
-F.style.position="absolute",F.style.whiteSpace="nowrap",F.style.background="#4B4243",F.style.color="white",F.style.fontFamily=Editor.defaultHtmlFont,F.style.fontSize="9pt",F.style.padding="6px",F.style.paddingLeft="10px",F.style.paddingRight="10px",F.style.zIndex=2E9,F.style.left=Math.max(0,f)+"px",F.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(F.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(F.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(F.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=G.substring(G.length-3,G.length)&&"!"!=G.charAt(G.length-1)&&(G+="..."),F.innerHTML=G,z.appendChild(F),v.status=F),this.pause=mxUtils.bind(this,function(){var U=function(){};this.active&&(U=mxUtils.bind(this,function(){this.spin(z,G)}));this.stop();return U}),F=!0);return F};var E=v.stop;v.stop=function(){E.call(this);this.active=!1;null!=v.status&&null!=v.status.parentNode&&v.status.parentNode.removeChild(v.status);v.status=null};v.pause=function(){return function(){}};
-return v};EditorUi.prototype.isCompatibleString=function(f){try{var g=mxUtils.parseXml(f),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(f){return 8<f.length&&(208==f.charCodeAt(0)&&207==f.charCodeAt(1)&&17==f.charCodeAt(2)&&224==f.charCodeAt(3)&&161==f.charCodeAt(4)&&177==f.charCodeAt(5)&&26==f.charCodeAt(6)&&225==f.charCodeAt(7)||80==f.charCodeAt(0)&&75==f.charCodeAt(1)&&
-3==f.charCodeAt(2)&&4==f.charCodeAt(3)||80==f.charCodeAt(0)&&75==f.charCodeAt(1)&&3==f.charCodeAt(2)&&6==f.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(f){return 8<f.length&&(208==f.charCodeAt(0)&&207==f.charCodeAt(1)&&17==f.charCodeAt(2)&&224==f.charCodeAt(3)&&161==f.charCodeAt(4)&&177==f.charCodeAt(5)&&26==f.charCodeAt(6)&&225==f.charCodeAt(7)||60==f.charCodeAt(0)&&63==f.charCodeAt(1)&&120==f.charCodeAt(2)&&109==f.charCodeAt(3)&&108==f.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(f){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,n=this.editor.graph,v=this;g.getFunction=function(x){if(n.isSelectionEmpty()&&null!=v.pages&&0<v.pages.length){var E=v.getSelectedPageIndex();if(mxEvent.isShiftDown(x)){if(37==x.keyCode)return function(){0<E&&v.movePage(E,E-1)};if(38==x.keyCode)return function(){0<E&&v.movePage(E,0)};if(39==x.keyCode)return function(){E<v.pages.length-1&&v.movePage(E,
-E+1)};if(40==x.keyCode)return function(){E<v.pages.length-1&&v.movePage(E,v.pages.length-1)}}else if(mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)){if(37==x.keyCode)return function(){0<E&&v.selectNextPage(!1)};if(38==x.keyCode)return function(){0<E&&v.selectPage(v.pages[0])};if(39==x.keyCode)return function(){E<v.pages.length-1&&v.selectNextPage(!0)};if(40==x.keyCode)return function(){E<v.pages.length-1&&v.selectPage(v.pages[v.pages.length-1])}}}return!(65<=x.keyCode&&90>=x.keyCode)||
-n.isSelectionEmpty()||mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)||mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)?k.apply(this,arguments):null}}return g};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(f){var g=d.apply(this,arguments);if(null==g)try{var k=f.indexOf("&lt;mxfile ");if(0<=k){var n=f.lastIndexOf("&lt;/mxfile&gt;");n>k&&(g=f.substring(k,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var v=mxUtils.parseXml(f),x=this.editor.extractGraphModel(v.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=x?mxUtils.getXml(x):""}}catch(E){}return g};EditorUi.prototype.validateFileData=function(f){if(null!=f&&0<f.length){var g=f.indexOf('<meta charset="utf-8">');0<=g&&(f=f.slice(0,g)+'<meta charset="utf-8"/>'+f.slice(g+23-1,f.length));f=Graph.zapGremlins(f)}return f};EditorUi.prototype.replaceFileData=function(f){f=this.validateFileData(f);
-f=null!=f&&0<f.length?mxUtils.parseXml(f).documentElement:null;var g=null!=f?this.editor.extractGraphModel(f,!0):null;null!=g&&(f=g);if(null!=f){g=this.editor.graph;g.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,n=f.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=f;this.pages=null!=this.pages?this.pages:[];for(var v=n.length-1;0<=v;v--){var x=this.updatePageRoot(new DiagramPage(n[v]));null==x.getName()&&
-x.setName(mxResources.get("pageWithNumber",[v+1]));g.model.execute(new ChangePage(this,x,0==v?x:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(f),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=k)for(v=0;v<k.length;v++)g.model.execute(new ChangePage(this,k[v],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(f,g,k,n,v,x,E,z,G,F,U){g=null!=g?g:this.editor.graph;v=null!=v?v:!1;G=null!=G?G:!0;var p=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var u="_blank";else p=u=n;if(null==f)return"";var H=f;if("mxfile"!=H.nodeName.toLowerCase()){if(U){var K=f.ownerDocument.createElement("diagram");K.setAttribute("id",Editor.guid());
-K.appendChild(f)}else{K=Graph.zapGremlins(mxUtils.getXml(f));H=Graph.compress(K);if(Graph.decompress(H)!=K)return K;K=f.ownerDocument.createElement("diagram");K.setAttribute("id",Editor.guid());mxUtils.setTextContent(K,H)}H=f.ownerDocument.createElement("mxfile");H.appendChild(K)}F?(H=H.cloneNode(!0),H.removeAttribute("modified"),H.removeAttribute("host"),H.removeAttribute("agent"),H.removeAttribute("etag"),H.removeAttribute("userAgent"),H.removeAttribute("version"),H.removeAttribute("editor"),H.removeAttribute("type")):
-(H.removeAttribute("userAgent"),H.removeAttribute("version"),H.removeAttribute("editor"),H.removeAttribute("pages"),H.removeAttribute("type"),mxClient.IS_CHROMEAPP?H.setAttribute("host","Chrome"):EditorUi.isElectronApp?H.setAttribute("host","Electron"):H.setAttribute("host",window.location.hostname),H.setAttribute("modified",(new Date).toISOString()),H.setAttribute("agent",navigator.appVersion),H.setAttribute("version",EditorUi.VERSION),H.setAttribute("etag",Editor.guid()),f=null!=k?k.getMode():this.mode,
-null!=f&&H.setAttribute("type",f),1<H.getElementsByTagName("diagram").length&&null!=this.pages&&H.setAttribute("pages",this.pages.length));U=U?mxUtils.getPrettyXml(H):mxUtils.getXml(H);if(!x&&!v&&(E||null!=k&&/(\.html)$/i.test(k.getTitle())))U=this.getHtml2(mxUtils.getXml(H),g,null!=k?k.getTitle():null,u,p);else if(x||!v&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(n=null),U=this.getEmbeddedSvg(U,g,n,null,z,G,p);return U};EditorUi.prototype.getXmlFileData=
-function(f,g,k,n){f=null!=f?f:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var v=this.editor.getGraphXml(f,n);if(f&&null!=this.fileNode&&null!=this.currentPage)if(f=function(G){var F=G.getElementsByTagName("mxGraphModel");F=0<F.length?F[0]:null;null==F&&k?(F=mxUtils.trim(mxUtils.getTextContent(G)),G=G.cloneNode(!1),0<F.length&&(F=Graph.decompress(F),null!=F&&0<F.length&&G.appendChild(mxUtils.parseXml(F).documentElement))):null==F||k?G=G.cloneNode(!0):(G=G.cloneNode(!1),mxUtils.setTextContent(G,
-Graph.compressNode(F)));v.appendChild(G)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(v)),v=this.fileNode.cloneNode(!1),g)f(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var x=this.pages[g],E=x.node;if(x!=this.currentPage)if(x.needsUpdate){var z=new mxCodec(mxUtils.createXmlDocument());z=z.encode(new mxGraphModel(x.root));this.editor.graph.saveViewState(x.viewState,z,null,n);EditorUi.removeChildNodes(E);mxUtils.setTextContent(E,
-Graph.compressNode(z));delete x.needsUpdate}else n&&(this.updatePageRoot(x),null!=x.viewState.backgroundImage&&(null!=x.viewState.backgroundImage.originalSrc?x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.originalSrc,x):Graph.isPageLink(x.viewState.backgroundImage.src)&&(x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.src,x))),null!=x.viewState.backgroundImage&&null!=x.viewState.backgroundImage.originalSrc&&(z=new mxCodec(mxUtils.createXmlDocument()),
-z=z.encode(new mxGraphModel(x.root)),this.editor.graph.saveViewState(x.viewState,z,null,n),E=E.cloneNode(!1),mxUtils.setTextContent(E,Graph.compressNode(z))));f(E)}return v};EditorUi.prototype.anonymizeString=function(f,g){for(var k=[],n=0;n<f.length;n++){var v=f.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(v)?k.push(v):isNaN(parseInt(v))?v.toLowerCase()!=v?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):v.toUpperCase()!=v?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(v)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(f){if(null!=f[EditorUi.DIFF_INSERT])for(var g=0;g<f[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(f[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));f[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(x){f[EditorUi.DIFF_INSERT][g].data=
-x.message}if(null!=f[EditorUi.DIFF_UPDATE]){for(var n in f[EditorUi.DIFF_UPDATE]){var v=f[EditorUi.DIFF_UPDATE][n];null!=v.name&&(v.name=this.anonymizeString(v.name));null!=v.cells&&(g=mxUtils.bind(this,function(x){var E=v.cells[x];if(null!=E){for(var z in E)null!=E[z].value&&(E[z].value="["+E[z].value.length+"]"),null!=E[z].xmlValue&&(E[z].xmlValue="["+E[z].xmlValue.length+"]"),null!=E[z].style&&(E[z].style="["+E[z].style.length+"]"),mxUtils.isEmptyObject(E[z])&&delete E[z];mxUtils.isEmptyObject(E)&&
-delete v.cells[x]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(v.cells)&&delete v.cells);mxUtils.isEmptyObject(v)&&delete f[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(f[EditorUi.DIFF_UPDATE])&&delete f[EditorUi.DIFF_UPDATE]}return f};EditorUi.prototype.anonymizeAttributes=function(f,g){if(null!=f.attributes)for(var k=0;k<f.attributes.length;k++)"as"!=f.attributes[k].name&&f.setAttribute(f.attributes[k].name,this.anonymizeString(f.attributes[k].value,g));if(null!=f.childNodes)for(k=
-0;k<f.childNodes.length;k++)this.anonymizeAttributes(f.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(f,g){g=f.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 f};EditorUi.prototype.synchronizeCurrentFile=function(f){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!f&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),
-this.editor.setStatus(""),f?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(f,g,k,n,v,x,E,z,G,F,U){v=null!=v?v:!0;x=null!=x?x:!1;var p=this.editor.graph;if(g||!f&&null!=G&&/(\.svg)$/i.test(G.getTitle())){var u=
-null!=p.themes&&"darkTheme"==p.defaultThemeName;F=!1;if(u||null!=this.pages&&this.currentPage!=this.pages[0]){var H=p.getGlobalVariable;p=this.createTemporaryGraph(u?p.getDefaultStylesheet():p.getStylesheet());p.setBackgroundImage=this.editor.graph.setBackgroundImage;p.background=this.editor.graph.background;var K=this.pages[0];this.currentPage==K?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&p.setBackgroundImage(K.viewState.backgroundImage);p.getGlobalVariable=
-function(N){return"page"==N?K.getName():"pagenumber"==N?1:H.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(K.root)}}E=null!=E?E:this.getXmlFileData(v,x,F,U);G=null!=G?G:this.getCurrentFile();f=this.createFileData(E,p,G,window.location.href,f,g,k,n,v,z,F);p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);return f};EditorUi.prototype.getHtml=function(f,g,k,n,v,x){x=null!=x?x:!0;var E=null,z=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){E=
-x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var G=g.view.scale;x=Math.floor(E.x/G-g.view.translate.x);G=Math.floor(E.y/G-g.view.translate.y);E=g.background;null==v&&(g=this.getBasenames().join(";"),0<g.length&&(z=EditorUi.drawHost+"/embed.js?s="+g));f.setAttribute("x0",x);f.setAttribute("y0",G)}null!=f&&(f.setAttribute("pan","1"),f.setAttribute("zoom","1"),f.setAttribute("resize","0"),f.setAttribute("fit","0"),f.setAttribute("border","20"),f.setAttribute("links","1"),null!=n&&f.setAttribute("edit",
-n));null!=v&&(v=v.replace(/&/g,"&amp;"));f=null!=f?Graph.zapGremlins(mxUtils.getXml(f)):"";n=Graph.compress(f);Graph.decompress(n)!=f&&(n=encodeURIComponent(f));return(null==v?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=v?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==v?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=v?'<meta http-equiv="refresh" content="0;URL=\''+
-v+"'\"/>\n":"")+"</head>\n<body"+(null==v&&null!=E&&E!=mxConstants.NONE?' style="background-color:'+E+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==v?'<script type="text/javascript" src="'+z+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+v+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
-"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(f,g,k,n,v){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=v&&(v=v.replace(/&/g,"&amp;"));f={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(f),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==v?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
-"")+"<!DOCTYPE html>\n<html"+(null!=v?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==v?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=v?'<meta http-equiv="refresh" content="0;URL=\''+v+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>\n'+(null==v?'<script type="text/javascript" src="'+
-g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+v+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(f){f=this.validateFileData(f);this.pages=this.fileNode=this.currentPage=null;var g=null!=f&&0<f.length?mxUtils.parseXml(f).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",
-[this],"data",[f],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");f=null!=g?this.editor.extractGraphModel(g,!0):null;null!=f&&(g=f);if(null!=g&&"mxfile"==g.nodeName&&(f=g.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<f.length||1==f.length&&f[0].hasAttribute("name"))){k=null;this.fileNode=g;this.pages=[];for(var n=0;n<f.length;n++)null==f[n].getAttribute("id")&&f[n].setAttribute("id",n),g=new DiagramPage(f[n]),null==g.getName()&&g.setName(mxResources.get("pageWithNumber",
-[n+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 v=urlParams["layer-ids"].split(" ");g={};for(n=0;n<v.length;n++)g[v[n]]=!0;var x=this.editor.graph.getModel(),E=x.getChildren(x.root);for(n=0;n<E.length;n++){var z=E[n];x.setVisible(z,g[z.id]||!1)}}catch(G){}};EditorUi.prototype.getBaseFilename=function(f){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(".")));!f&&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(f,g,k,n,v,x,E,z,G,F,U,p){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var u=this.getBaseFilename("remoteSvg"==f?
-!1:!v),H=u+("xml"==f||"pdf"==f&&U?".drawio":"")+"."+f;if("xml"==f){var K=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,v,null,null,null,g);this.saveData(H,f,K,"text/xml")}else if("html"==f)K=this.getHtml2(this.getFileData(!0),this.editor.graph,u),this.saveData(H,f,K,"text/html");else if("svg"!=f&&"xmlsvg"!=f||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==f)H=u+".png";else if("jpeg"==f)H=u+".jpg";else if("remoteSvg"==f){H=u+".svg";f="svg";var N=parseInt(G);
-"string"===typeof z&&0<z.indexOf("%")&&(z=parseInt(z)/100);if(0<N){var I=this.editor.graph,L=I.getGraphBounds();var Q=Math.ceil(L.width*z/I.view.scale+2*N);var P=Math.ceil(L.height*z/I.view.scale+2*N)}}this.saveRequest(H,f,mxUtils.bind(this,function(M,T){try{var O=this.editor.graph.pageVisible;0==x&&(this.editor.graph.pageVisible=x);var R=this.createDownloadRequest(M,f,n,T,E,v,z,G,F,U,p,Q,P);this.editor.graph.pageVisible=O;return R}catch(S){this.handleError(S)}}))}else{var V=null,W=mxUtils.bind(this,
-function(M){M.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",M,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});if("svg"==f){var q=this.editor.graph.background;if(E||q==mxConstants.NONE)q=null;var D=this.editor.graph.getSvg(q,null,null,null,null,n);k&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(M){this.spinner.stop();W(Graph.xmlDeclaration+
-"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(M))})))}else H=u+".svg",V=this.getFileData(!1,!0,null,mxUtils.bind(this,function(M){this.spinner.stop();W(M)}),n)}}catch(M){this.handleError(M)}};EditorUi.prototype.createDownloadRequest=function(f,g,k,n,v,x,E,z,G,F,U,p,u){var H=this.editor.graph,K=H.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var N="",I="";if(K.width*K.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
-F=F?"1":"0";"pdf"==g&&(null!=U?I="&from="+U.from+"&to="+U.to:0==x&&(I="&allPages=1"));"xmlpng"==g&&(F="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(x=0;x<this.pages.length;x++)if(this.pages[x]==this.currentPage){N="&from="+x;break}x=H.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!v?v||null!=x&&x!=mxConstants.NONE||(x="#ffffff"):x=mxConstants.NONE;v={globalVars:H.getExportVariables()};G&&(v.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});Graph.translateDiagram&&
-(v.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+N+I+"&bg="+(null!=x?x:mxConstants.NONE)+"&base64="+n+"&embedXml="+F+"&xml="+encodeURIComponent(k)+(null!=f?"&filename="+encodeURIComponent(f):"")+"&extras="+encodeURIComponent(JSON.stringify(v))+(null!=E?"&scale="+E:"")+(null!=z?"&border="+z:"")+(p&&isFinite(p)?"&w="+p:"")+(u&&isFinite(u)?"&h="+u:""))};EditorUi.prototype.setMode=function(f,g){this.mode=f};EditorUi.prototype.loadDescriptor=function(f,g,k){var n=
-window.location.hash,v=mxUtils.bind(this,function(E){var z=null!=f.data?f.data:"";null!=E&&0<E.length&&(0<z.length&&(z+="\n"),z+=E);E=new LocalFile(this,"csv"!=f.format&&0<z.length?z:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);E.getHash=function(){return n};this.fileLoaded(E);"csv"==f.format&&this.importCsv(z,mxUtils.bind(this,function(u){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=f.update){var G=
-null!=f.interval?parseInt(f.interval):6E4,F=null,U=mxUtils.bind(this,function(){var u=this.currentPage;mxUtils.post(f.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(H){u===this.currentPage&&(200<=H.getStatus()&&300>=H.getStatus()?(this.updateDiagram(H.getText()),p()):this.handleError({message:mxResources.get("error")+" "+H.getStatus()}))}),mxUtils.bind(this,function(H){this.handleError(H)}))}),p=mxUtils.bind(this,function(){window.clearTimeout(F);
-F=window.setTimeout(U,G)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){p();U()}));p();U()}null!=g&&g()});if(null!=f.url&&0<f.url.length){var x=this.editor.getProxiedUrl(f.url);this.editor.loadUrl(x,mxUtils.bind(this,function(E){v(E)}),mxUtils.bind(this,function(E){null!=k&&k(E)}))}else v("")};EditorUi.prototype.updateDiagram=function(f){function g(P){var V=new mxCellOverlay(P.image||v.warningImage,P.tooltip,P.align,P.valign,P.offset);V.addListener(mxEvent.CLICK,function(W,
-q){n.alert(P.tooltip)});return V}var k=null,n=this;if(null!=f&&0<f.length&&(k=mxUtils.parseXml(f),f=null!=k?k.documentElement:null,null!=f&&"updates"==f.nodeName)){var v=this.editor.graph,x=v.getModel();x.beginUpdate();var E=null;try{for(f=f.firstChild;null!=f;){if("update"==f.nodeName){var z=x.getCell(f.getAttribute("id"));if(null!=z){try{var G=f.getAttribute("value");if(null!=G){var F=mxUtils.parseXml(G).documentElement;if(null!=F)if("1"==F.getAttribute("replace-value"))x.setValue(z,F);else for(var U=
-F.attributes,p=0;p<U.length;p++)v.setAttributeForCell(z,U[p].nodeName,0<U[p].nodeValue.length?U[p].nodeValue:null)}}catch(P){null!=window.console&&console.log("Error in value for "+z.id+": "+P)}try{var u=f.getAttribute("style");null!=u&&v.model.setStyle(z,u)}catch(P){null!=window.console&&console.log("Error in style for "+z.id+": "+P)}try{var H=f.getAttribute("icon");if(null!=H){var K=0<H.length?JSON.parse(H):null;null!=K&&K.append||v.removeCellOverlays(z);null!=K&&v.addCellOverlay(z,g(K))}}catch(P){null!=
-window.console&&console.log("Error in icon for "+z.id+": "+P)}try{var N=f.getAttribute("geometry");if(null!=N){N=JSON.parse(N);var I=v.getCellGeometry(z);if(null!=I){I=I.clone();for(key in N){var L=parseFloat(N[key]);"dx"==key?I.x+=L:"dy"==key?I.y+=L:"dw"==key?I.width+=L:"dh"==key?I.height+=L:I[key]=parseFloat(N[key])}v.model.setGeometry(z,I)}}}catch(P){null!=window.console&&console.log("Error in icon for "+z.id+": "+P)}}}else if("model"==f.nodeName){for(var Q=f.firstChild;null!=Q&&Q.nodeType!=mxConstants.NODETYPE_ELEMENT;)Q=
-Q.nextSibling;null!=Q&&(new mxCodec(f.firstChild)).decode(Q,x)}else if("view"==f.nodeName){if(f.hasAttribute("scale")&&(v.view.scale=parseFloat(f.getAttribute("scale"))),f.hasAttribute("dx")||f.hasAttribute("dy"))v.view.translate=new mxPoint(parseFloat(f.getAttribute("dx")||0),parseFloat(f.getAttribute("dy")||0))}else"fit"==f.nodeName&&(E=f.hasAttribute("max-scale")?parseFloat(f.getAttribute("max-scale")):1);f=f.nextSibling}}finally{x.endUpdate()}null!=E&&this.chromelessResize&&this.chromelessResize(!0,
-E)}return k};EditorUi.prototype.getCopyFilename=function(f,g){var k=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;f="";var n=k.lastIndexOf(".");0<=n&&(f=k.substring(n),k=k.substring(0,n));if(g){g=k;var v=new Date;k=v.getFullYear();n=v.getMonth()+1;var x=v.getDate(),E=v.getHours(),z=v.getMinutes();v=v.getSeconds();k=g+(" "+(k+"-"+n+"-"+x+"-"+E+"-"+z+"-"+v))}return k=mxResources.get("copyOf",[k])+f};EditorUi.prototype.fileLoaded=function(f,g){var k=this.getCurrentFile();this.fileEditable=
-this.fileLoadedError=null;this.setCurrentFile(null);var n=!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 v=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!=f)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(f);f.addListener("descriptorChanged",this.descriptorChangedListener);f.addListener("contentChanged",this.descriptorChangedListener);f.open();
-delete this.openingFile;this.setGraphEnabled(!0);this.setMode(f.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();f.isEditable()?f.isModified()?(f.addUnsavedStatus(),null!=f.backupPatch&&f.patch([f.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),
-this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));n=!0;if(!this.isOffline()&&null!=f.getMode()){var x="1"==urlParams.sketch?"sketch":uiTheme;if(null==x)x="default";else if("sketch"==x||"min"==x)x+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:f.getMode().toUpperCase()+"-OPEN-FILE-"+f.getHash(),
-action:"size_"+f.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+x})}EditorUi.debug("File.opened",[f]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==f.getMode()&&f.getMode()!=App.MODE_DEVICE&&null!=f.getMode())try{this.addRecent({id:f.getHash(),title:f.getTitle(),mode:f.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=
-E;if(null!=f)try{f.close()}catch(z){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=f?f.getHash():"none"),action:"message_"+E.message,label:"stack_"+E.stack})}catch(z){}f=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)||v():v()});g?f():this.handleError(E,mxResources.get("errorLoadingFile"),f,!0,null,null,
-!0)}else v();return n};EditorUi.prototype.getHashValueForPages=function(f,g){var k=0,n=new mxGraphModel,v=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var x=0;x<f.length;x++){this.updatePageRoot(f[x]);var E=f[x].node.cloneNode(!1);E.removeAttribute("name");n.root=f[x].root;var z=v.encode(n);this.editor.graph.saveViewState(f[x].viewState,z,!0);z.removeAttribute("pageWidth");z.removeAttribute("pageHeight");E.appendChild(z);null!=g&&(g.eltCount+=E.getElementsByTagName("*").length,
-g.nodeCount+=E.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(E,function(G,F,U,p){return!p||"mxGeometry"!=G.nodeName&&"mxPoint"!=G.nodeName||"x"!=F&&"y"!=F&&"width"!=F&&"height"!=F?p&&"mxCell"==G.nodeName&&"previous"==F?null:U:Math.round(U)},g)<<0}return k};EditorUi.prototype.hashValue=function(f,g,k){var n=0;if(null!=f&&"object"===typeof f&&"number"===typeof f.nodeType&&"string"===typeof f.nodeName&&"function"===typeof f.getAttribute){null!=f.nodeName&&(n^=this.hashValue(f.nodeName,
-g,k));if(null!=f.attributes){null!=k&&(k.attrCount+=f.attributes.length);for(var v=0;v<f.attributes.length;v++){var x=f.attributes[v].name,E=null!=g?g(f,x,f.attributes[v].value,!0):f.attributes[v].value;null!=E&&(n^=this.hashValue(x,g,k)+this.hashValue(E,g,k))}}if(null!=f.childNodes)for(v=0;v<f.childNodes.length;v++)n=(n<<5)-n+this.hashValue(f.childNodes[v],g,k)<<0}else if(null!=f&&"function"!==typeof f){f=String(f);g=0;null!=k&&(k.byteCount+=f.length);for(v=0;v<f.length;v++)g=(g<<5)-g+f.charCodeAt(v)<<
-0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(f,g,k,n,v,x,E){};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(f){null==f&&(f=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
-f,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(f){var g=mxUtils.createXmlDocument(),k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(f));g.appendChild(k);return mxUtils.getXml(g)};EditorUi.prototype.closeLibrary=function(f){null!=f&&(this.removeLibrarySidebar(f.getHash()),f.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(f.getHash()),".scratchpad"==f.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
-function(f){var g=this.sidebar.palettes[f];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[f]}};EditorUi.prototype.repositionLibrary=function(f){var g=this.sidebar.container;if(null==f){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(f=k[k.length-1].nextSibling)}f=null!=f?f:g.firstChild.nextSibling.nextSibling;k=g.lastChild;var n=k.previousSibling;g.insertBefore(k,f);g.insertBefore(n,k)};EditorUi.prototype.loadLibrary=
-function(f,g){var k=mxUtils.parseXml(f.getData());if("mxlibrary"==k.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(f,n,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(f){return""};EditorUi.prototype.libraryLoaded=function(f,g,k,n){if(null!=this.sidebar){f.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(f.getHash());".scratchpad"==f.title&&
-(this.scratchpad=f);var v=this.sidebar.palettes[f.getHash()];v=null!=v?v[v.length-1].nextSibling:null;this.removeLibrarySidebar(f.getHash());var x=null,E=mxUtils.bind(this,function(Q,P){0==Q.length&&f.isEditable()?(null==x&&(x=document.createElement("div"),x.className="geDropTarget",mxUtils.write(x,mxResources.get("dragElementsHere"))),P.appendChild(x)):this.addLibraryEntries(Q,P)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=f.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,
-k.lastIndexOf("."))));var z=this.sidebar.addPalette(f.getHash(),k,null!=n?n:!0,mxUtils.bind(this,function(Q){E(g,Q)}));this.repositionLibrary(v);var G=z.parentNode.previousSibling;n=G.getAttribute("title");null!=n&&0<n.length&&".scratchpad"!=f.title&&G.setAttribute("title",this.getLibraryStorageHint(f)+"\n"+n);var F=document.createElement("div");F.style.position="absolute";F.style.right="0px";F.style.top="0px";F.style.padding="8px";F.style.backgroundColor="inherit";G.style.position="relative";var U=
-document.createElement("img");U.className="geAdaptiveAsset";U.setAttribute("src",Editor.crossImage);U.setAttribute("title",mxResources.get("close"));U.setAttribute("valign","absmiddle");U.setAttribute("border","0");U.style.position="relative";U.style.top="2px";U.style.width="14px";U.style.cursor="pointer";U.style.margin="0 3px";var p=null;if(".scratchpad"!=f.title||this.closableScratchpad)F.appendChild(U),mxEvent.addListener(U,"click",mxUtils.bind(this,function(Q){if(!mxEvent.isConsumed(Q)){var P=
-mxUtils.bind(this,function(){this.closeLibrary(f)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,P,mxResources.get("cancel"),mxResources.get("discardChanges")):P();mxEvent.consume(Q)}}));if(f.isEditable()){var u=this.editor.graph,H=null,K=mxUtils.bind(this,function(Q){this.showLibraryDialog(f.getTitle(),z,g,f,f.getMode());mxEvent.consume(Q)}),N=mxUtils.bind(this,function(Q){f.setModified(!0);f.isAutosave()?(null!=H&&null!=H.parentNode&&H.parentNode.removeChild(H),H=U.cloneNode(!1),
-H.setAttribute("src",Editor.spinImage),H.setAttribute("title",mxResources.get("saving")),H.style.cursor="default",H.style.marginRight="2px",H.style.marginTop="-2px",F.insertBefore(H,F.firstChild),G.style.paddingRight=18*F.childNodes.length+"px",this.saveLibrary(f.getTitle(),g,f,f.getMode(),!0,!0,function(){null!=H&&null!=H.parentNode&&(H.parentNode.removeChild(H),G.style.paddingRight=18*F.childNodes.length+"px")})):null==p&&(p=U.cloneNode(!1),p.setAttribute("src",Editor.saveImage),p.setAttribute("title",
-mxResources.get("save")),F.insertBefore(p,F.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(P){this.saveLibrary(f.getTitle(),g,f,f.getMode(),f.constructor==LocalLibrary,!0,function(){null==p||f.isModified()||(G.style.paddingRight=18*F.childNodes.length+"px",p.parentNode.removeChild(p),p=null)});mxEvent.consume(P)})),G.style.paddingRight=18*F.childNodes.length+"px")}),I=mxUtils.bind(this,function(Q,P,V,W){Q=u.cloneCells(mxUtils.sortCells(u.model.getTopmostCells(Q)));for(var q=
-0;q<Q.length;q++){var D=u.getCellGeometry(Q[q]);null!=D&&D.translate(-P.x,-P.y)}z.appendChild(this.sidebar.createVertexTemplateFromCells(Q,P.width,P.height,W||"",!0,null,!1));Q={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(Q))),w:P.width,h:P.height};null!=W&&(Q.title=W);g.push(Q);N(V);null!=x&&null!=x.parentNode&&0<g.length&&(x.parentNode.removeChild(x),x=null)}),L=mxUtils.bind(this,function(Q){if(u.isSelectionEmpty())u.getRubberband().isActive()?(u.getRubberband().execute(Q),u.getRubberband().reset()):
-this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var P=u.getSelectionCells(),V=u.view.getBounds(P),W=u.view.scale;V.x/=W;V.y/=W;V.width/=W;V.height/=W;V.x-=u.view.translate.x;V.y-=u.view.translate.y;I(P,V)}mxEvent.consume(Q)});mxEvent.addGestureListeners(z,function(){},mxUtils.bind(this,function(Q){u.isMouseDown&&null!=u.panningManager&&null!=u.graphHandler.first&&(u.graphHandler.suspend(),null!=u.graphHandler.hint&&(u.graphHandler.hint.style.visibility=
-"hidden"),z.style.backgroundColor="#f1f3f4",z.style.cursor="copy",u.panningManager.stop(),u.autoScroll=!1,mxEvent.consume(Q))}),mxUtils.bind(this,function(Q){u.isMouseDown&&null!=u.panningManager&&null!=u.graphHandler&&(z.style.backgroundColor="",z.style.cursor="default",this.sidebar.showTooltips=!0,u.panningManager.stop(),u.graphHandler.reset(),u.isMouseDown=!1,u.autoScroll=!0,L(Q),mxEvent.consume(Q))}));mxEvent.addListener(z,"mouseleave",mxUtils.bind(this,function(Q){u.isMouseDown&&null!=u.graphHandler.first&&
-(u.graphHandler.resume(),null!=u.graphHandler.hint&&(u.graphHandler.hint.style.visibility="visible"),z.style.backgroundColor="",z.style.cursor="",u.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(Q){z.style.backgroundColor="#f1f3f4";Q.dataTransfer.dropEffect="copy";z.style.cursor="copy";this.sidebar.hideTooltip();Q.stopPropagation();Q.preventDefault()})),mxEvent.addListener(z,"drop",mxUtils.bind(this,function(Q){z.style.cursor="";z.style.backgroundColor=
-"";0<Q.dataTransfer.files.length&&this.importFiles(Q.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(P,V,W,q,D,M,T,O,R){if(null!=P&&"image/"==V.substring(0,6))P="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(P),P=[new mxCell("",new mxGeometry(0,0,D,M),P)],P[0].vertex=!0,I(P,new mxRectangle(0,0,D,M),Q,mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),null!=x&&null!=x.parentNode&&0<g.length&&
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var e=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!e.getContext||!e.getContext("2d"))}catch(u){}try{var g=document.createElement("canvas"),k=new Image;k.onload=function(){try{g.getContext("2d").drawImage(k,0,0);var u=
+g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=u&&6<u.length}catch(x){}};k.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}try{g=document.createElement("canvas");g.width=g.height=1;var q=g.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==q.match("image/jpeg")}catch(u){}})();EditorUi.prototype.openLink=function(e,g,k){return this.editor.graph.openLink(e,g,k)};EditorUi.prototype.showSplash=function(e){};EditorUi.prototype.getLocalData=function(e,g){g(localStorage.getItem(e))};EditorUi.prototype.setLocalData=function(e,g,k){localStorage.setItem(e,g);null!=k&&k()};EditorUi.prototype.removeLocalData=function(e,g){localStorage.removeItem(e);g()};EditorUi.prototype.setShareCursorPosition=function(e){this.shareCursorPosition=
+e;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(e){this.showRemoteCursors=e;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(e){this.editor.graph.mathEnabled=e;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.editor.graph.defaultMathEnabled=e;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(e){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(e){return this.isOfflineApp()||!navigator.onLine||!e&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
+EditorUi.prototype.createSpinner=function(e,g,k){var q=null==e||null==g;k=null!=k?k:24;var u=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}),x=u.spin;u.spin=function(z,G){var F=!1;this.active||(x.call(this,z),this.active=!0,null!=G&&(q&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,e=document.body.clientWidth/2-2),F=document.createElement("div"),
+F.style.position="absolute",F.style.whiteSpace="nowrap",F.style.background="#4B4243",F.style.color="white",F.style.fontFamily=Editor.defaultHtmlFont,F.style.fontSize="9pt",F.style.padding="6px",F.style.paddingLeft="10px",F.style.paddingRight="10px",F.style.zIndex=2E9,F.style.left=Math.max(0,e)+"px",F.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(F.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(F.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(F.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=G.substring(G.length-3,G.length)&&"!"!=G.charAt(G.length-1)&&(G+="..."),F.innerHTML=G,z.appendChild(F),u.status=F),this.pause=mxUtils.bind(this,function(){var U=function(){};this.active&&(U=mxUtils.bind(this,function(){this.spin(z,G)}));this.stop();return U}),F=!0);return F};var E=u.stop;u.stop=function(){E.call(this);this.active=!1;null!=u.status&&null!=u.status.parentNode&&u.status.parentNode.removeChild(u.status);u.status=null};u.pause=function(){return function(){}};
+return u};EditorUi.prototype.isCompatibleString=function(e){try{var g=mxUtils.parseXml(e),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&
+3==e.charCodeAt(2)&&4==e.charCodeAt(3)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&3==e.charCodeAt(2)&&6==e.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||60==e.charCodeAt(0)&&63==e.charCodeAt(1)&&120==e.charCodeAt(2)&&109==e.charCodeAt(3)&&108==e.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
+EditorUi.prototype.createKeyHandler=function(e){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,q=this.editor.graph,u=this;g.getFunction=function(x){if(q.isSelectionEmpty()&&null!=u.pages&&0<u.pages.length){var E=u.getSelectedPageIndex();if(mxEvent.isShiftDown(x)){if(37==x.keyCode)return function(){0<E&&u.movePage(E,E-1)};if(38==x.keyCode)return function(){0<E&&u.movePage(E,0)};if(39==x.keyCode)return function(){E<u.pages.length-1&&u.movePage(E,
+E+1)};if(40==x.keyCode)return function(){E<u.pages.length-1&&u.movePage(E,u.pages.length-1)}}else if(mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)){if(37==x.keyCode)return function(){0<E&&u.selectNextPage(!1)};if(38==x.keyCode)return function(){0<E&&u.selectPage(u.pages[0])};if(39==x.keyCode)return function(){E<u.pages.length-1&&u.selectNextPage(!0)};if(40==x.keyCode)return function(){E<u.pages.length-1&&u.selectPage(u.pages[u.pages.length-1])}}}return!(65<=x.keyCode&&90>=x.keyCode)||
+q.isSelectionEmpty()||mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)||mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)?k.apply(this,arguments):null}}return g};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(e){var g=d.apply(this,arguments);if(null==g)try{var k=e.indexOf("&lt;mxfile ");if(0<=k){var q=e.lastIndexOf("&lt;/mxfile&gt;");q>k&&(g=e.substring(k,q+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var u=mxUtils.parseXml(e),x=this.editor.extractGraphModel(u.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=x?mxUtils.getXml(x):""}}catch(E){}return g};EditorUi.prototype.validateFileData=function(e){if(null!=e&&0<e.length){var g=e.indexOf('<meta charset="utf-8">');0<=g&&(e=e.slice(0,g)+'<meta charset="utf-8"/>'+e.slice(g+23-1,e.length));e=Graph.zapGremlins(e)}return e};EditorUi.prototype.replaceFileData=function(e){e=this.validateFileData(e);
+e=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null;var g=null!=e?this.editor.extractGraphModel(e,!0):null;null!=g&&(e=g);if(null!=e){g=this.editor.graph;g.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,q=e.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<q.length||1==q.length&&q[0].hasAttribute("name")){this.fileNode=e;this.pages=null!=this.pages?this.pages:[];for(var u=q.length-1;0<=u;u--){var x=this.updatePageRoot(new DiagramPage(q[u]));null==x.getName()&&
+x.setName(mxResources.get("pageWithNumber",[u+1]));g.model.execute(new ChangePage(this,x,0==u?x:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(e),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=k)for(u=0;u<k.length;u++)g.model.execute(new ChangePage(this,k[u],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(e,g,k,q,u,x,E,z,G,F,U){g=null!=g?g:this.editor.graph;u=null!=u?u:!1;G=null!=G?G:!0;var p=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var v="_blank";else p=v=q;if(null==e)return"";var H=e;if("mxfile"!=H.nodeName.toLowerCase()){if(U){var K=e.ownerDocument.createElement("diagram");K.setAttribute("id",Editor.guid());
+K.appendChild(e)}else{K=Graph.zapGremlins(mxUtils.getXml(e));H=Graph.compress(K);if(Graph.decompress(H)!=K)return K;K=e.ownerDocument.createElement("diagram");K.setAttribute("id",Editor.guid());mxUtils.setTextContent(K,H)}H=e.ownerDocument.createElement("mxfile");H.appendChild(K)}F?(H=H.cloneNode(!0),H.removeAttribute("modified"),H.removeAttribute("host"),H.removeAttribute("agent"),H.removeAttribute("etag"),H.removeAttribute("userAgent"),H.removeAttribute("version"),H.removeAttribute("editor"),H.removeAttribute("type")):
+(H.removeAttribute("userAgent"),H.removeAttribute("version"),H.removeAttribute("editor"),H.removeAttribute("pages"),H.removeAttribute("type"),mxClient.IS_CHROMEAPP?H.setAttribute("host","Chrome"):EditorUi.isElectronApp?H.setAttribute("host","Electron"):H.setAttribute("host",window.location.hostname),H.setAttribute("modified",(new Date).toISOString()),H.setAttribute("agent",navigator.appVersion),H.setAttribute("version",EditorUi.VERSION),H.setAttribute("etag",Editor.guid()),e=null!=k?k.getMode():this.mode,
+null!=e&&H.setAttribute("type",e),1<H.getElementsByTagName("diagram").length&&null!=this.pages&&H.setAttribute("pages",this.pages.length));U=U?mxUtils.getPrettyXml(H):mxUtils.getXml(H);if(!x&&!u&&(E||null!=k&&/(\.html)$/i.test(k.getTitle())))U=this.getHtml2(mxUtils.getXml(H),g,null!=k?k.getTitle():null,v,p);else if(x||!u&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(q=null),U=this.getEmbeddedSvg(U,g,q,null,z,G,p);return U};EditorUi.prototype.getXmlFileData=
+function(e,g,k,q){e=null!=e?e:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var u=this.editor.getGraphXml(e,q);if(e&&null!=this.fileNode&&null!=this.currentPage)if(e=function(G){var F=G.getElementsByTagName("mxGraphModel");F=0<F.length?F[0]:null;null==F&&k?(F=mxUtils.trim(mxUtils.getTextContent(G)),G=G.cloneNode(!1),0<F.length&&(F=Graph.decompress(F),null!=F&&0<F.length&&G.appendChild(mxUtils.parseXml(F).documentElement))):null==F||k?G=G.cloneNode(!0):(G=G.cloneNode(!1),mxUtils.setTextContent(G,
+Graph.compressNode(F)));u.appendChild(G)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(u)),u=this.fileNode.cloneNode(!1),g)e(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var x=this.pages[g],E=x.node;if(x!=this.currentPage)if(x.needsUpdate){var z=new mxCodec(mxUtils.createXmlDocument());z=z.encode(new mxGraphModel(x.root));this.editor.graph.saveViewState(x.viewState,z,null,q);EditorUi.removeChildNodes(E);mxUtils.setTextContent(E,
+Graph.compressNode(z));delete x.needsUpdate}else q&&(this.updatePageRoot(x),null!=x.viewState.backgroundImage&&(null!=x.viewState.backgroundImage.originalSrc?x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.originalSrc,x):Graph.isPageLink(x.viewState.backgroundImage.src)&&(x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.src,x))),null!=x.viewState.backgroundImage&&null!=x.viewState.backgroundImage.originalSrc&&(z=new mxCodec(mxUtils.createXmlDocument()),
+z=z.encode(new mxGraphModel(x.root)),this.editor.graph.saveViewState(x.viewState,z,null,q),E=E.cloneNode(!1),mxUtils.setTextContent(E,Graph.compressNode(z))));e(E)}return u};EditorUi.prototype.anonymizeString=function(e,g){for(var k=[],q=0;q<e.length;q++){var u=e.charAt(q);0<=EditorUi.ignoredAnonymizedChars.indexOf(u)?k.push(u):isNaN(parseInt(u))?u.toLowerCase()!=u?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):u.toUpperCase()!=u?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):
+/\s/.test(u)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(e){if(null!=e[EditorUi.DIFF_INSERT])for(var g=0;g<e[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(e[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));e[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(x){e[EditorUi.DIFF_INSERT][g].data=
+x.message}if(null!=e[EditorUi.DIFF_UPDATE]){for(var q in e[EditorUi.DIFF_UPDATE]){var u=e[EditorUi.DIFF_UPDATE][q];null!=u.name&&(u.name=this.anonymizeString(u.name));null!=u.cells&&(g=mxUtils.bind(this,function(x){var E=u.cells[x];if(null!=E){for(var z in E)null!=E[z].value&&(E[z].value="["+E[z].value.length+"]"),null!=E[z].xmlValue&&(E[z].xmlValue="["+E[z].xmlValue.length+"]"),null!=E[z].style&&(E[z].style="["+E[z].style.length+"]"),mxUtils.isEmptyObject(E[z])&&delete E[z];mxUtils.isEmptyObject(E)&&
+delete u.cells[x]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(u.cells)&&delete u.cells);mxUtils.isEmptyObject(u)&&delete e[EditorUi.DIFF_UPDATE][q]}mxUtils.isEmptyObject(e[EditorUi.DIFF_UPDATE])&&delete e[EditorUi.DIFF_UPDATE]}return e};EditorUi.prototype.anonymizeAttributes=function(e,g){if(null!=e.attributes)for(var k=0;k<e.attributes.length;k++)"as"!=e.attributes[k].name&&e.setAttribute(e.attributes[k].name,this.anonymizeString(e.attributes[k].value,g));if(null!=e.childNodes)for(k=
+0;k<e.childNodes.length;k++)this.anonymizeAttributes(e.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(e,g){g=e.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 e};EditorUi.prototype.synchronizeCurrentFile=function(e){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!e&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),
+this.editor.setStatus(""),e?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(e,g,k,q,u,x,E,z,G,F,U){u=null!=u?u:!0;x=null!=x?x:!1;var p=this.editor.graph;if(g||!e&&null!=G&&/(\.svg)$/i.test(G.getTitle())){var v=
+null!=p.themes&&"darkTheme"==p.defaultThemeName;F=!1;if(v||null!=this.pages&&this.currentPage!=this.pages[0]){var H=p.getGlobalVariable;p=this.createTemporaryGraph(v?p.getDefaultStylesheet():p.getStylesheet());p.setBackgroundImage=this.editor.graph.setBackgroundImage;p.background=this.editor.graph.background;var K=this.pages[0];this.currentPage==K?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&p.setBackgroundImage(K.viewState.backgroundImage);p.getGlobalVariable=
+function(N){return"page"==N?K.getName():"pagenumber"==N?1:H.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(K.root)}}E=null!=E?E:this.getXmlFileData(u,x,F,U);G=null!=G?G:this.getCurrentFile();e=this.createFileData(E,p,G,window.location.href,e,g,k,q,u,z,F);p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);return e};EditorUi.prototype.getHtml=function(e,g,k,q,u,x){x=null!=x?x:!0;var E=null,z=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){E=
+x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var G=g.view.scale;x=Math.floor(E.x/G-g.view.translate.x);G=Math.floor(E.y/G-g.view.translate.y);E=g.background;null==u&&(g=this.getBasenames().join(";"),0<g.length&&(z=EditorUi.drawHost+"/embed.js?s="+g));e.setAttribute("x0",x);e.setAttribute("y0",G)}null!=e&&(e.setAttribute("pan","1"),e.setAttribute("zoom","1"),e.setAttribute("resize","0"),e.setAttribute("fit","0"),e.setAttribute("border","20"),e.setAttribute("links","1"),null!=q&&e.setAttribute("edit",
+q));null!=u&&(u=u.replace(/&/g,"&amp;"));e=null!=e?Graph.zapGremlins(mxUtils.getXml(e)):"";q=Graph.compress(e);Graph.decompress(q)!=e&&(q=encodeURIComponent(e));return(null==u?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=u?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==u?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=u?'<meta http-equiv="refresh" content="0;URL=\''+
+u+"'\"/>\n":"")+"</head>\n<body"+(null==u&&null!=E&&E!=mxConstants.NONE?' style="background-color:'+E+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+q+"</div>\n</div>\n"+(null==u?'<script type="text/javascript" src="'+z+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+u+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(e,g,k,q,u){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=u&&(u=u.replace(/&/g,"&amp;"));e={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(e),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==u?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+"")+"<!DOCTYPE html>\n<html"+(null!=u?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==u?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=u?'<meta http-equiv="refresh" content="0;URL=\''+u+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(e))+'"></div>\n'+(null==u?'<script type="text/javascript" src="'+
+g+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+u+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(e){e=this.validateFileData(e);this.pages=this.fileNode=this.currentPage=null;var g=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",
+[this],"data",[e],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");e=null!=g?this.editor.extractGraphModel(g,!0):null;null!=e&&(g=e);if(null!=g&&"mxfile"==g.nodeName&&(e=g.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name"))){k=null;this.fileNode=g;this.pages=[];for(var q=0;q<e.length;q++)null==e[q].getAttribute("id")&&e[q].setAttribute("id",q),g=new DiagramPage(e[q]),null==g.getName()&&g.setName(mxResources.get("pageWithNumber",
+[q+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 u=urlParams["layer-ids"].split(" ");g={};for(q=0;q<u.length;q++)g[u[q]]=!0;var x=this.editor.graph.getModel(),E=x.getChildren(x.root);for(q=0;q<E.length;q++){var z=E[q];x.setVisible(z,g[z.id]||!1)}}catch(G){}};EditorUi.prototype.getBaseFilename=function(e){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(".")));!e&&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(e,g,k,q,u,x,E,z,G,F,U,p){try{q=null!=q?q:this.editor.graph.isSelectionEmpty();var v=this.getBaseFilename("remoteSvg"==e?
+!1:!u),H=v+("xml"==e||"pdf"==e&&U?".drawio":"")+"."+e;if("xml"==e){var K=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,q,u,null,null,null,g);this.saveData(H,e,K,"text/xml")}else if("html"==e)K=this.getHtml2(this.getFileData(!0),this.editor.graph,v),this.saveData(H,e,K,"text/html");else if("svg"!=e&&"xmlsvg"!=e||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==e)H=v+".png";else if("jpeg"==e)H=v+".jpg";else if("remoteSvg"==e){H=v+".svg";e="svg";var N=parseInt(G);
+"string"===typeof z&&0<z.indexOf("%")&&(z=parseInt(z)/100);if(0<N){var I=this.editor.graph,L=I.getGraphBounds();var Q=Math.ceil(L.width*z/I.view.scale+2*N);var P=Math.ceil(L.height*z/I.view.scale+2*N)}}this.saveRequest(H,e,mxUtils.bind(this,function(M,T){try{var O=this.editor.graph.pageVisible;0==x&&(this.editor.graph.pageVisible=x);var R=this.createDownloadRequest(M,e,q,T,E,u,z,G,F,U,p,Q,P);this.editor.graph.pageVisible=O;return R}catch(S){this.handleError(S)}}))}else{var V=null,W=mxUtils.bind(this,
+function(M){M.length<=MAX_REQUEST_SIZE?this.saveData(H,"svg",M,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});if("svg"==e){var n=this.editor.graph.background;if(E||n==mxConstants.NONE)n=null;var D=this.editor.graph.getSvg(n,null,null,null,null,q);k&&this.editor.graph.addSvgShadow(D);this.editor.convertImages(D,mxUtils.bind(this,mxUtils.bind(this,function(M){this.spinner.stop();W(Graph.xmlDeclaration+
+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(M))})))}else H=v+".svg",V=this.getFileData(!1,!0,null,mxUtils.bind(this,function(M){this.spinner.stop();W(M)}),q)}}catch(M){this.handleError(M)}};EditorUi.prototype.createDownloadRequest=function(e,g,k,q,u,x,E,z,G,F,U,p,v){var H=this.editor.graph,K=H.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var N="",I="";if(K.width*K.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
+F=F?"1":"0";"pdf"==g&&(null!=U?I="&from="+U.from+"&to="+U.to:0==x&&(I="&allPages=1"));"xmlpng"==g&&(F="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(x=0;x<this.pages.length;x++)if(this.pages[x]==this.currentPage){N="&from="+x;break}x=H.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!u?u||null!=x&&x!=mxConstants.NONE||(x="#ffffff"):x=mxConstants.NONE;u={globalVars:H.getExportVariables()};G&&(u.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});Graph.translateDiagram&&
+(u.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+N+I+"&bg="+(null!=x?x:mxConstants.NONE)+"&base64="+q+"&embedXml="+F+"&xml="+encodeURIComponent(k)+(null!=e?"&filename="+encodeURIComponent(e):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(null!=E?"&scale="+E:"")+(null!=z?"&border="+z:"")+(p&&isFinite(p)?"&w="+p:"")+(v&&isFinite(v)?"&h="+v:""))};EditorUi.prototype.setMode=function(e,g){this.mode=e};EditorUi.prototype.loadDescriptor=function(e,g,k){var q=
+window.location.hash,u=mxUtils.bind(this,function(E){var z=null!=e.data?e.data:"";null!=E&&0<E.length&&(0<z.length&&(z+="\n"),z+=E);E=new LocalFile(this,"csv"!=e.format&&0<z.length?z:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);E.getHash=function(){return q};this.fileLoaded(E);"csv"==e.format&&this.importCsv(z,mxUtils.bind(this,function(v){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=e.update){var G=
+null!=e.interval?parseInt(e.interval):6E4,F=null,U=mxUtils.bind(this,function(){var v=this.currentPage;mxUtils.post(e.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(H){v===this.currentPage&&(200<=H.getStatus()&&300>=H.getStatus()?(this.updateDiagram(H.getText()),p()):this.handleError({message:mxResources.get("error")+" "+H.getStatus()}))}),mxUtils.bind(this,function(H){this.handleError(H)}))}),p=mxUtils.bind(this,function(){window.clearTimeout(F);
+F=window.setTimeout(U,G)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){p();U()}));p();U()}null!=g&&g()});if(null!=e.url&&0<e.url.length){var x=this.editor.getProxiedUrl(e.url);this.editor.loadUrl(x,mxUtils.bind(this,function(E){u(E)}),mxUtils.bind(this,function(E){null!=k&&k(E)}))}else u("")};EditorUi.prototype.updateDiagram=function(e){function g(P){var V=new mxCellOverlay(P.image||u.warningImage,P.tooltip,P.align,P.valign,P.offset);V.addListener(mxEvent.CLICK,function(W,
+n){q.alert(P.tooltip)});return V}var k=null,q=this;if(null!=e&&0<e.length&&(k=mxUtils.parseXml(e),e=null!=k?k.documentElement:null,null!=e&&"updates"==e.nodeName)){var u=this.editor.graph,x=u.getModel();x.beginUpdate();var E=null;try{for(e=e.firstChild;null!=e;){if("update"==e.nodeName){var z=x.getCell(e.getAttribute("id"));if(null!=z){try{var G=e.getAttribute("value");if(null!=G){var F=mxUtils.parseXml(G).documentElement;if(null!=F)if("1"==F.getAttribute("replace-value"))x.setValue(z,F);else for(var U=
+F.attributes,p=0;p<U.length;p++)u.setAttributeForCell(z,U[p].nodeName,0<U[p].nodeValue.length?U[p].nodeValue:null)}}catch(P){null!=window.console&&console.log("Error in value for "+z.id+": "+P)}try{var v=e.getAttribute("style");null!=v&&u.model.setStyle(z,v)}catch(P){null!=window.console&&console.log("Error in style for "+z.id+": "+P)}try{var H=e.getAttribute("icon");if(null!=H){var K=0<H.length?JSON.parse(H):null;null!=K&&K.append||u.removeCellOverlays(z);null!=K&&u.addCellOverlay(z,g(K))}}catch(P){null!=
+window.console&&console.log("Error in icon for "+z.id+": "+P)}try{var N=e.getAttribute("geometry");if(null!=N){N=JSON.parse(N);var I=u.getCellGeometry(z);if(null!=I){I=I.clone();for(key in N){var L=parseFloat(N[key]);"dx"==key?I.x+=L:"dy"==key?I.y+=L:"dw"==key?I.width+=L:"dh"==key?I.height+=L:I[key]=parseFloat(N[key])}u.model.setGeometry(z,I)}}}catch(P){null!=window.console&&console.log("Error in icon for "+z.id+": "+P)}}}else if("model"==e.nodeName){for(var Q=e.firstChild;null!=Q&&Q.nodeType!=mxConstants.NODETYPE_ELEMENT;)Q=
+Q.nextSibling;null!=Q&&(new mxCodec(e.firstChild)).decode(Q,x)}else if("view"==e.nodeName){if(e.hasAttribute("scale")&&(u.view.scale=parseFloat(e.getAttribute("scale"))),e.hasAttribute("dx")||e.hasAttribute("dy"))u.view.translate=new mxPoint(parseFloat(e.getAttribute("dx")||0),parseFloat(e.getAttribute("dy")||0))}else"fit"==e.nodeName&&(E=e.hasAttribute("max-scale")?parseFloat(e.getAttribute("max-scale")):1);e=e.nextSibling}}finally{x.endUpdate()}null!=E&&this.chromelessResize&&this.chromelessResize(!0,
+E)}return k};EditorUi.prototype.getCopyFilename=function(e,g){var k=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;e="";var q=k.lastIndexOf(".");0<=q&&(e=k.substring(q),k=k.substring(0,q));if(g){g=k;var u=new Date;k=u.getFullYear();q=u.getMonth()+1;var x=u.getDate(),E=u.getHours(),z=u.getMinutes();u=u.getSeconds();k=g+(" "+(k+"-"+q+"-"+x+"-"+E+"-"+z+"-"+u))}return k=mxResources.get("copyOf",[k])+e};EditorUi.prototype.fileLoaded=function(e,g){var k=this.getCurrentFile();this.fileEditable=
+this.fileLoadedError=null;this.setCurrentFile(null);var q=!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 u=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!=e)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(e);e.addListener("descriptorChanged",this.descriptorChangedListener);e.addListener("contentChanged",this.descriptorChangedListener);e.open();
+delete this.openingFile;this.setGraphEnabled(!0);this.setMode(e.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();e.isEditable()?e.isModified()?(e.addUnsavedStatus(),null!=e.backupPatch&&e.patch([e.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),
+this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));q=!0;if(!this.isOffline()&&null!=e.getMode()){var x="1"==urlParams.sketch?"sketch":uiTheme;if(null==x)x="default";else if("sketch"==x||"min"==x)x+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:e.getMode().toUpperCase()+"-OPEN-FILE-"+e.getHash(),
+action:"size_"+e.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+x})}EditorUi.debug("File.opened",[e]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==e.getMode()&&e.getMode()!=App.MODE_DEVICE&&null!=e.getMode())try{this.addRecent({id:e.getHash(),title:e.getTitle(),mode:e.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=
+E;if(null!=e)try{e.close()}catch(z){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=e?e.getHash():"none"),action:"message_"+E.message,label:"stack_"+E.stack})}catch(z){}e=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)||u():u()});g?e():this.handleError(E,mxResources.get("errorLoadingFile"),e,!0,null,null,
+!0)}else u();return q};EditorUi.prototype.getHashValueForPages=function(e,g){var k=0,q=new mxGraphModel,u=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var x=0;x<e.length;x++){this.updatePageRoot(e[x]);var E=e[x].node.cloneNode(!1);E.removeAttribute("name");q.root=e[x].root;var z=u.encode(q);this.editor.graph.saveViewState(e[x].viewState,z,!0);z.removeAttribute("pageWidth");z.removeAttribute("pageHeight");E.appendChild(z);null!=g&&(g.eltCount+=E.getElementsByTagName("*").length,
+g.nodeCount+=E.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(E,function(G,F,U,p){return!p||"mxGeometry"!=G.nodeName&&"mxPoint"!=G.nodeName||"x"!=F&&"y"!=F&&"width"!=F&&"height"!=F?p&&"mxCell"==G.nodeName&&"previous"==F?null:U:Math.round(U)},g)<<0}return k};EditorUi.prototype.hashValue=function(e,g,k){var q=0;if(null!=e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName&&"function"===typeof e.getAttribute){null!=e.nodeName&&(q^=this.hashValue(e.nodeName,
+g,k));if(null!=e.attributes){null!=k&&(k.attrCount+=e.attributes.length);for(var u=0;u<e.attributes.length;u++){var x=e.attributes[u].name,E=null!=g?g(e,x,e.attributes[u].value,!0):e.attributes[u].value;null!=E&&(q^=this.hashValue(x,g,k)+this.hashValue(E,g,k))}}if(null!=e.childNodes)for(u=0;u<e.childNodes.length;u++)q=(q<<5)-q+this.hashValue(e.childNodes[u],g,k)<<0}else if(null!=e&&"function"!==typeof e){e=String(e);g=0;null!=k&&(k.byteCount+=e.length);for(u=0;u<e.length;u++)g=(g<<5)-g+e.charCodeAt(u)<<
+0;q^=g}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(e,g,k,q,u,x,E){};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(e){null==e&&(e=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
+e,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(e){var g=mxUtils.createXmlDocument(),k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(e));g.appendChild(k);return mxUtils.getXml(g)};EditorUi.prototype.closeLibrary=function(e){null!=e&&(this.removeLibrarySidebar(e.getHash()),e.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(e.getHash()),".scratchpad"==e.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
+function(e){var g=this.sidebar.palettes[e];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[e]}};EditorUi.prototype.repositionLibrary=function(e){var g=this.sidebar.container;if(null==e){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(e=k[k.length-1].nextSibling)}e=null!=e?e:g.firstChild.nextSibling.nextSibling;k=g.lastChild;var q=k.previousSibling;g.insertBefore(k,e);g.insertBefore(q,k)};EditorUi.prototype.loadLibrary=
+function(e,g){var k=mxUtils.parseXml(e.getData());if("mxlibrary"==k.documentElement.nodeName){var q=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(e,q,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(e){return""};EditorUi.prototype.libraryLoaded=function(e,g,k,q){if(null!=this.sidebar){e.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(e.getHash());".scratchpad"==e.title&&
+(this.scratchpad=e);var u=this.sidebar.palettes[e.getHash()];u=null!=u?u[u.length-1].nextSibling:null;this.removeLibrarySidebar(e.getHash());var x=null,E=mxUtils.bind(this,function(Q,P){0==Q.length&&e.isEditable()?(null==x&&(x=document.createElement("div"),x.className="geDropTarget",mxUtils.write(x,mxResources.get("dragElementsHere"))),P.appendChild(x)):this.addLibraryEntries(Q,P)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=e.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,
+k.lastIndexOf("."))));var z=this.sidebar.addPalette(e.getHash(),k,null!=q?q:!0,mxUtils.bind(this,function(Q){E(g,Q)}));this.repositionLibrary(u);var G=z.parentNode.previousSibling;q=G.getAttribute("title");null!=q&&0<q.length&&".scratchpad"!=e.title&&G.setAttribute("title",this.getLibraryStorageHint(e)+"\n"+q);var F=document.createElement("div");F.style.position="absolute";F.style.right="0px";F.style.top="0px";F.style.padding="8px";F.style.backgroundColor="inherit";G.style.position="relative";var U=
+document.createElement("img");U.className="geAdaptiveAsset";U.setAttribute("src",Editor.crossImage);U.setAttribute("title",mxResources.get("close"));U.setAttribute("valign","absmiddle");U.setAttribute("border","0");U.style.position="relative";U.style.top="2px";U.style.width="14px";U.style.cursor="pointer";U.style.margin="0 3px";var p=null;if(".scratchpad"!=e.title||this.closableScratchpad)F.appendChild(U),mxEvent.addListener(U,"click",mxUtils.bind(this,function(Q){if(!mxEvent.isConsumed(Q)){var P=
+mxUtils.bind(this,function(){this.closeLibrary(e)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,P,mxResources.get("cancel"),mxResources.get("discardChanges")):P();mxEvent.consume(Q)}}));if(e.isEditable()){var v=this.editor.graph,H=null,K=mxUtils.bind(this,function(Q){this.showLibraryDialog(e.getTitle(),z,g,e,e.getMode());mxEvent.consume(Q)}),N=mxUtils.bind(this,function(Q){e.setModified(!0);e.isAutosave()?(null!=H&&null!=H.parentNode&&H.parentNode.removeChild(H),H=U.cloneNode(!1),
+H.setAttribute("src",Editor.spinImage),H.setAttribute("title",mxResources.get("saving")),H.style.cursor="default",H.style.marginRight="2px",H.style.marginTop="-2px",F.insertBefore(H,F.firstChild),G.style.paddingRight=18*F.childNodes.length+"px",this.saveLibrary(e.getTitle(),g,e,e.getMode(),!0,!0,function(){null!=H&&null!=H.parentNode&&(H.parentNode.removeChild(H),G.style.paddingRight=18*F.childNodes.length+"px")})):null==p&&(p=U.cloneNode(!1),p.setAttribute("src",Editor.saveImage),p.setAttribute("title",
+mxResources.get("save")),F.insertBefore(p,F.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(P){this.saveLibrary(e.getTitle(),g,e,e.getMode(),e.constructor==LocalLibrary,!0,function(){null==p||e.isModified()||(G.style.paddingRight=18*F.childNodes.length+"px",p.parentNode.removeChild(p),p=null)});mxEvent.consume(P)})),G.style.paddingRight=18*F.childNodes.length+"px")}),I=mxUtils.bind(this,function(Q,P,V,W){Q=v.cloneCells(mxUtils.sortCells(v.model.getTopmostCells(Q)));for(var n=
+0;n<Q.length;n++){var D=v.getCellGeometry(Q[n]);null!=D&&D.translate(-P.x,-P.y)}z.appendChild(this.sidebar.createVertexTemplateFromCells(Q,P.width,P.height,W||"",!0,null,!1));Q={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(Q))),w:P.width,h:P.height};null!=W&&(Q.title=W);g.push(Q);N(V);null!=x&&null!=x.parentNode&&0<g.length&&(x.parentNode.removeChild(x),x=null)}),L=mxUtils.bind(this,function(Q){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(Q),v.getRubberband().reset()):
+this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var P=v.getSelectionCells(),V=v.view.getBounds(P),W=v.view.scale;V.x/=W;V.y/=W;V.width/=W;V.height/=W;V.x-=v.view.translate.x;V.y-=v.view.translate.y;I(P,V)}mxEvent.consume(Q)});mxEvent.addGestureListeners(z,function(){},mxUtils.bind(this,function(Q){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler.first&&(v.graphHandler.suspend(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility=
+"hidden"),z.style.backgroundColor="#f1f3f4",z.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,mxEvent.consume(Q))}),mxUtils.bind(this,function(Q){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler&&(z.style.backgroundColor="",z.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),v.isMouseDown=!1,v.autoScroll=!0,L(Q),mxEvent.consume(Q))}));mxEvent.addListener(z,"mouseleave",mxUtils.bind(this,function(Q){v.isMouseDown&&null!=v.graphHandler.first&&
+(v.graphHandler.resume(),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="visible"),z.style.backgroundColor="",z.style.cursor="",v.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(Q){z.style.backgroundColor="#f1f3f4";Q.dataTransfer.dropEffect="copy";z.style.cursor="copy";this.sidebar.hideTooltip();Q.stopPropagation();Q.preventDefault()})),mxEvent.addListener(z,"drop",mxUtils.bind(this,function(Q){z.style.cursor="";z.style.backgroundColor=
+"";0<Q.dataTransfer.files.length&&this.importFiles(Q.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(P,V,W,n,D,M,T,O,R){if(null!=P&&"image/"==V.substring(0,6))P="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(P),P=[new mxCell("",new mxGeometry(0,0,D,M),P)],P[0].vertex=!0,I(P,new mxRectangle(0,0,D,M),Q,mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),null!=x&&null!=x.parentNode&&0<g.length&&
(x.parentNode.removeChild(x),x=null);else{var S=!1,X=mxUtils.bind(this,function(Y,aa){null!=Y&&"application/pdf"==aa&&(aa=Editor.extractGraphModelFromPdf(Y),null!=aa&&0<aa.length&&(Y=aa));if(null!=Y)if(Y=mxUtils.parseXml(Y),"mxlibrary"==Y.documentElement.nodeName)try{var ba=JSON.parse(mxUtils.getTextContent(Y.documentElement));E(ba,z);g=g.concat(ba);N(Q);this.spinner.stop();S=!0}catch(ea){}else if("mxfile"==Y.documentElement.nodeName)try{var da=Y.documentElement.getElementsByTagName("diagram");for(ba=
0;ba<da.length;ba++){var Z=this.stringToCells(Editor.getDiagramNodeXml(da[ba])),ia=this.editor.graph.getBoundingBoxFromGeometry(Z);I(Z,new mxRectangle(0,0,ia.width,ia.height),Q)}S=!0}catch(ea){null!=window.console&&console.log("error in drop handler:",ea)}S||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=x&&null!=x.parentNode&&0<g.length&&(x.parentNode.removeChild(x),x=null)});null!=R&&null!=T&&(/(\.v(dx|sdx?))($|\?)/i.test(T)||/(\.vs(x|sx?))($|\?)/i.test(T))?
this.importVisio(R,function(Y){X(Y,"text/xml")},null,T):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(P,T)&&null!=R?this.isExternalDataComms()?this.parseFile(R,mxUtils.bind(this,function(Y){4==Y.readyState&&(this.spinner.stop(),200<=Y.status&&299>=Y.status?X(Y.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Y.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-X(P,V)}}));Q.stopPropagation();Q.preventDefault()})),mxEvent.addListener(z,"dragleave",function(Q){z.style.cursor="";z.style.backgroundColor="";Q.stopPropagation();Q.preventDefault()}));U=U.cloneNode(!1);U.setAttribute("src",Editor.editImage);U.setAttribute("title",mxResources.get("edit"));F.insertBefore(U,F.firstChild);mxEvent.addListener(U,"click",K);mxEvent.addListener(z,"dblclick",function(Q){mxEvent.getSource(Q)==z&&K(Q)});n=U.cloneNode(!1);n.setAttribute("src",Editor.plusImage);n.setAttribute("title",
-mxResources.get("add"));F.insertBefore(n,F.firstChild);mxEvent.addListener(n,"click",L);this.isOffline()||".scratchpad"!=f.title||null==EditorUi.scratchpadHelpLink||(n=document.createElement("span"),n.setAttribute("title",mxResources.get("help")),n.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(n,"?"),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(Q){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(Q)})),F.insertBefore(n,F.firstChild))}G.appendChild(F);
-G.style.paddingRight=18*F.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(f,g){for(var k=0;k<f.length;k++){var n=f[k],v=n.data;if(null!=v){v=this.convertDataUri(v);var x="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(x+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(x+"image="+v,n.w,n.h,"",n.title||"",!1,null,!0))}else null!=n.xml&&(v=this.stringToCells(Graph.decompress(n.xml)),0<v.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(v,
-n.w,n.h,n.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(f){return null!=f?f[mxLanguage]||f.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=
+X(P,V)}}));Q.stopPropagation();Q.preventDefault()})),mxEvent.addListener(z,"dragleave",function(Q){z.style.cursor="";z.style.backgroundColor="";Q.stopPropagation();Q.preventDefault()}));U=U.cloneNode(!1);U.setAttribute("src",Editor.editImage);U.setAttribute("title",mxResources.get("edit"));F.insertBefore(U,F.firstChild);mxEvent.addListener(U,"click",K);mxEvent.addListener(z,"dblclick",function(Q){mxEvent.getSource(Q)==z&&K(Q)});q=U.cloneNode(!1);q.setAttribute("src",Editor.plusImage);q.setAttribute("title",
+mxResources.get("add"));F.insertBefore(q,F.firstChild);mxEvent.addListener(q,"click",L);this.isOffline()||".scratchpad"!=e.title||null==EditorUi.scratchpadHelpLink||(q=document.createElement("span"),q.setAttribute("title",mxResources.get("help")),q.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(q,"?"),mxEvent.addGestureListeners(q,mxUtils.bind(this,function(Q){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(Q)})),F.insertBefore(q,F.firstChild))}G.appendChild(F);
+G.style.paddingRight=18*F.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(e,g){for(var k=0;k<e.length;k++){var q=e[k],u=q.data;if(null!=u){u=this.convertDataUri(u);var x="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==q.aspect&&(x+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(x+"image="+u,q.w,q.h,"",q.title||"",!1,null,!0))}else null!=q.xml&&(u=this.stringToCells(Graph.decompress(q.xml)),0<u.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(u,
+q.w,q.h,q.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(e){return null!=e?e[mxLanguage]||e.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);"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",
-targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(f,g,k,n,v,x,E){f=new ImageDialog(this,f,g,k,n,v,x,E);this.showDialog(f.container,Graph.fileSupport?480:360,Graph.fileSupport?
-200:90,!0,!0);f.init()};EditorUi.prototype.showBackgroundImageDialog=function(f,g){f=null!=f?f:mxUtils.bind(this,function(k,n){n||(k=new ChangePageSetup(this,null,k),k.ignoreColor=!0,this.editor.graph.model.execute(k))});f=new BackgroundImageDialog(this,f,g);this.showDialog(f.container,400,200,!0,!0);f.init()};EditorUi.prototype.showLibraryDialog=function(f,g,k,n,v){f=new LibraryDialog(this,f,g,k,n,v);this.showDialog(f.container,640,440,!0,!1,mxUtils.bind(this,function(x){x&&null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.showSplash()}));f.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(f){var g=e.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 f=this.createDiv("geSidebarContainer geSidebarFooter");f.style.position="absolute";f.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(n){n.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(n){this.actions.get("shapes").funct();
-mxEvent.consume(n)}));f.appendChild(g);return f};EditorUi.prototype.handleError=function(f,g,k,n,v,x,E){var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},G=null!=f&&null!=f.error?f.error:f;if(null!=f&&("1"==urlParams.test||null!=f.stack)&&null!=f.message)try{E?null!=window.console&&console.error("EditorUi.handleError:",f):EditorUi.logError("Caught: "+(""==f.message&&null!=f.name)?f.name:f.message,f.filename,f.lineNumber,f.columnNumber,f,"INFO")}catch(H){}if(null!=
-G||null!=g){E=mxUtils.htmlEntities(mxResources.get("unknownError"));var F=mxResources.get("ok"),U=null;g=null!=g?g:mxResources.get("error");if(null!=G){null!=G.retry&&(F=mxResources.get("cancel"),U=function(){z();G.retry()});if(404==G.code||404==G.status||403==G.code){E=403==G.code?null!=G.message?mxUtils.htmlEntities(G.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=v?v:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
-this.drive.user.displayName+", "+this.drive.user.email+")":""));var p=null!=v?null:null!=x?x:window.location.hash;if(null!=p&&("#G"==p.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==p.substring(0,45))&&(null!=f&&null!=f.error&&(null!=f.error.errors&&0<f.error.errors.length&&"fileAccess"==f.error.errors[0].reason||null!=f.error.data&&0<f.error.data.length&&"fileAccess"==f.error.data[0].reason)||404==G.code||404==G.status)){p="#U"==p.substring(0,2)?p.substring(45,p.lastIndexOf("%26ex")):
-p.substring(2);this.showError(g,E,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+p);this.handleError(f,g,k,n,v)}),U,mxResources.get("changeUser"),mxUtils.bind(this,function(){function H(){L.innerText="";for(var Q=0;Q<K.length;Q++){var P=document.createElement("option");mxUtils.write(P,K[Q].displayName);P.value=Q;L.appendChild(P);P=document.createElement("option");P.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(P,"<"+K[Q].email+
+targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(e,g,k,q,u,x,E){e=new ImageDialog(this,e,g,k,q,u,x,E);this.showDialog(e.container,Graph.fileSupport?480:360,Graph.fileSupport?
+200:90,!0,!0);e.init()};EditorUi.prototype.showBackgroundImageDialog=function(e,g){e=null!=e?e:mxUtils.bind(this,function(k,q){q||(k=new ChangePageSetup(this,null,k),k.ignoreColor=!0,this.editor.graph.model.execute(k))});e=new BackgroundImageDialog(this,e,g);this.showDialog(e.container,400,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(e,g,k,q,u){e=new LibraryDialog(this,e,g,k,q,u);this.showDialog(e.container,640,440,!0,!1,mxUtils.bind(this,function(x){x&&null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.showSplash()}));e.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(e){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 e=this.createDiv("geSidebarContainer geSidebarFooter");e.style.position="absolute";e.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(q){q.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(q){this.actions.get("shapes").funct();
+mxEvent.consume(q)}));e.appendChild(g);return e};EditorUi.prototype.handleError=function(e,g,k,q,u,x,E){var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},G=null!=e&&null!=e.error?e.error:e;if(null!=e&&("1"==urlParams.test||null!=e.stack)&&null!=e.message)try{E?null!=window.console&&console.error("EditorUi.handleError:",e):EditorUi.logError("Caught: "+(""==e.message&&null!=e.name)?e.name:e.message,e.filename,e.lineNumber,e.columnNumber,e,"INFO")}catch(H){}if(null!=
+G||null!=g){E=mxUtils.htmlEntities(mxResources.get("unknownError"));var F=mxResources.get("ok"),U=null;g=null!=g?g:mxResources.get("error");if(null!=G){null!=G.retry&&(F=mxResources.get("cancel"),U=function(){z();G.retry()});if(404==G.code||404==G.status||403==G.code){E=403==G.code?null!=G.message?mxUtils.htmlEntities(G.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=u?u:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
+this.drive.user.displayName+", "+this.drive.user.email+")":""));var p=null!=u?null:null!=x?x:window.location.hash;if(null!=p&&("#G"==p.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==p.substring(0,45))&&(null!=e&&null!=e.error&&(null!=e.error.errors&&0<e.error.errors.length&&"fileAccess"==e.error.errors[0].reason||null!=e.error.data&&0<e.error.data.length&&"fileAccess"==e.error.data[0].reason)||404==G.code||404==G.status)){p="#U"==p.substring(0,2)?p.substring(45,p.lastIndexOf("%26ex")):
+p.substring(2);this.showError(g,E,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+p);this.handleError(e,g,k,q,u)}),U,mxResources.get("changeUser"),mxUtils.bind(this,function(){function H(){L.innerText="";for(var Q=0;Q<K.length;Q++){var P=document.createElement("option");mxUtils.write(P,K[Q].displayName);P.value=Q;L.appendChild(P);P=document.createElement("option");P.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(P,"<"+K[Q].email+
">");P.setAttribute("disabled","disabled");L.appendChild(P)}P=document.createElement("option");mxUtils.write(P,mxResources.get("addAccount"));P.value=K.length;L.appendChild(P)}var K=this.drive.getUsersList(),N=document.createElement("div"),I=document.createElement("span");I.style.marginTop="6px";mxUtils.write(I,mxResources.get("changeUser")+": ");N.appendChild(I);var L=document.createElement("select");L.style.width="200px";H();mxEvent.addListener(L,"change",mxUtils.bind(this,function(){var Q=L.value,
P=K.length!=Q;P&&this.drive.setUser(K[Q]);this.drive.authorize(P,mxUtils.bind(this,function(){P||(K=this.drive.getUsersList(),H())}),mxUtils.bind(this,function(V){this.handleError(V)}),!0)}));N.appendChild(L);N=new CustomDialog(this,N,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(N.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=G.message?E=""==G.message&&null!=
-G.name?mxUtils.htmlEntities(G.name):mxUtils.htmlEntities(G.message):null!=G.response&&null!=G.response.error?E=mxUtils.htmlEntities(G.response.error):"undefined"!==typeof window.App&&(G.code==App.ERROR_TIMEOUT?E=mxUtils.htmlEntities(mxResources.get("timeout")):G.code==App.ERROR_BUSY?E=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof G&&0<G.length&&(E=mxUtils.htmlEntities(G)))}var u=x=null;null!=G&&null!=G.helpLink?(x=mxResources.get("help"),u=mxUtils.bind(this,function(){return this.editor.graph.openLink(G.helpLink)})):
-null!=G&&null!=G.ownerEmail&&(x=mxResources.get("contactOwner"),E+=mxUtils.htmlEntities(" ("+x+": "+G.ownerEmail+")"),u=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(G.ownerEmail))}));this.showError(g,E,F,k,U,null,null,x,u,null,null,null,n?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(f,g,k){f=new ErrorDialog(this,null,f,mxResources.get("ok"),g);this.showDialog(f.container,k||340,100,!0,!1);f.init()};EditorUi.prototype.confirm=function(f,g,k,n,v,x){var E=
-null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},z=Math.min(200,28*Math.ceil(f.length/50));f=new ConfirmDialog(this,f,function(){E();null!=g&&g()},function(){E();null!=k&&k()},n,v,null,null,null,null,z);this.showDialog(f.container,340,46+z,!0,x);f.init()};EditorUi.prototype.showBanner=function(f,g,k,n){var v=!1;if(!(this.bannerShowing||this["hideBanner"+f]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+f])){var x=document.createElement("div");
-x.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(x.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(x.style,"transition","all 1s ease");x.className="geBtn gePrimaryBtn";v=document.createElement("img");v.setAttribute("src",IMAGE_PATH+
-"/logo.png");v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";x.appendChild(v);v=document.createElement("img");v.setAttribute("src",Dialog.prototype.closeImage);v.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));v.setAttribute("border","0");v.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";x.appendChild(v);mxUtils.write(x,
-g);document.body.appendChild(x);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var E=document.createElement("input");E.setAttribute("type","checkbox");E.setAttribute("id","geDoNotShowAgainCheckbox");E.style.marginRight="6px";if(!n){g.appendChild(E);var z=document.createElement("label");z.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(z,mxResources.get("doNotShowAgain"));g.appendChild(z);x.style.paddingBottom=
-"30px";x.appendChild(g)}var G=mxUtils.bind(this,function(){null!=x.parentNode&&(x.parentNode.removeChild(x),this.bannerShowing=!1,E.checked||n)&&(this["hideBanner"+f]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+f]=Date.now(),mxSettings.save()))});mxEvent.addListener(v,"click",mxUtils.bind(this,function(U){mxEvent.consume(U);G()}));var F=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){G()}),1E3)});mxEvent.addListener(x,"click",mxUtils.bind(this,function(U){var p=mxEvent.getSource(U);p!=E&&p!=z?(null!=k&&k(),G(),mxEvent.consume(U)):F()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(F,3E4);v=!0}return v};EditorUi.prototype.setCurrentFile=function(f){null!=f&&(f.opened=new Date);this.currentFile=f};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
-function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(f,g,k,n){f=f.toDataURL("image/"+k);if(null!=f&&6<f.length)null!=g&&(f=Editor.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(g))),0<n&&(f=Editor.writeGraphModelToPng(f,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return f};EditorUi.prototype.saveCanvas=function(f,g,k,n,v){var x="jpeg"==k?"jpg":k;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+x;f=this.createImageDataUri(f,
-g,k,v);this.saveData(n,x,f.substring(f.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(f,g){f=new TextareaDialog(this,f,g,null,null,mxResources.get("close"));this.showDialog(f.container,620,460,
-!0,!0,null,null,null,null,!0);f.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(f,g,k,n,v,x){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)f=n?this.base64ToBlob(f,k):new Blob([f],{type:k}),navigator.msSaveOrOpenBlob(f,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(f,!0):(k.document.write(f),
-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+":",f):this.openInNewWindow(f,k,n);else{var E=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof E.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var z=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);x=65==(z?parseInt(z[2],10):
-!1)?!1:x}if(x||this.isOffline()){E.href=URL.createObjectURL(n?this.base64ToBlob(f,k):new Blob([f],{type:k}));x?E.download=g:E.setAttribute("target","_blank");document.body.appendChild(E);try{window.setTimeout(function(){URL.revokeObjectURL(E.href)},2E4),E.click(),E.parentNode.removeChild(E)}catch(G){}}else this.createEchoRequest(f,g,k,n,v).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(f,g,k,n,v,x){f="xml="+encodeURIComponent(f);return new mxXmlRequest(SAVE_URL,f+(null!=
-k?"&mime="+k:"")+(null!=v?"&format="+v:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(f,g){g=g||"";f=atob(f);for(var k=f.length,n=Math.ceil(k/1024),v=Array(n),x=0;x<n;++x){for(var E=1024*x,z=Math.min(E+1024,k),G=Array(z-E),F=0;E<z;++F,++E)G[F]=f[E].charCodeAt(0);v[x]=new Uint8Array(G)}return new Blob(v,{type:g})};EditorUi.prototype.saveLocalFile=function(f,g,k,n,v,x,E,z){x=null!=x?x:!1;E=null!=E?E:"vsdx"!=
-v&&(!mxClient.IS_IOS||!navigator.standalone);v=this.getServiceCount(x);isLocalStorage&&v++;var G=4>=v?2:6<v?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(F,U){try{if("_blank"==U)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(f,k,n);else if(null!=k&&"text/html"==k.substring(0,9)){var p=new EmbedDialog(this,f);this.showDialog(p.container,450,240,!0,!0);p.init()}else{var u=window.open("about:blank");null==u?mxUtils.popup(f,!0):(u.document.write("<pre>"+mxUtils.htmlEntities(f,
-!1)+"</pre>"),u.document.close())}else U==App.MODE_DEVICE||"download"==U?this.doSaveLocalFile(f,F,k,n,null,z):null!=F&&0<F.length&&this.pickFolder(U,mxUtils.bind(this,function(H){try{this.exportFile(f,F,k,n,U,H)}catch(K){this.handleError(K)}}))}catch(H){this.handleError(H)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,x,E,null,1<v,G,f,k,n);x=this.isServices(v)?v>G?390:280:160;this.showDialog(g.container,420,x,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=
-function(f,g,k){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(f,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(f=k?f:btoa(unescape(encodeURIComponent(f))),n.document.write('<html><img style="max-width:100%;" src="data:'+g+";base64,"+f+'"/></html>')):n.document.write("<html>"+f+"</html>"):n.document.write("<html><pre>"+mxUtils.htmlEntities(f,!1)+"</pre></html>"),n.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(f){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=f(mxUtils.bind(this,function(n){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=
+G.name?mxUtils.htmlEntities(G.name):mxUtils.htmlEntities(G.message):null!=G.response&&null!=G.response.error?E=mxUtils.htmlEntities(G.response.error):"undefined"!==typeof window.App&&(G.code==App.ERROR_TIMEOUT?E=mxUtils.htmlEntities(mxResources.get("timeout")):G.code==App.ERROR_BUSY?E=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof G&&0<G.length&&(E=mxUtils.htmlEntities(G)))}var v=x=null;null!=G&&null!=G.helpLink?(x=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(G.helpLink)})):
+null!=G&&null!=G.ownerEmail&&(x=mxResources.get("contactOwner"),E+=mxUtils.htmlEntities(" ("+x+": "+G.ownerEmail+")"),v=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(G.ownerEmail))}));this.showError(g,E,F,k,U,null,null,x,v,null,null,null,q?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(e,g,k){e=new ErrorDialog(this,null,e,mxResources.get("ok"),g);this.showDialog(e.container,k||340,100,!0,!1);e.init()};EditorUi.prototype.confirm=function(e,g,k,q,u,x){var E=
+null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},z=Math.min(200,28*Math.ceil(e.length/50));e=new ConfirmDialog(this,e,function(){E();null!=g&&g()},function(){E();null!=k&&k()},q,u,null,null,null,null,z);this.showDialog(e.container,340,46+z,!0,x);e.init()};EditorUi.prototype.showBanner=function(e,g,k,q){var u=!1;if(!(this.bannerShowing||this["hideBanner"+e]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+e])){var x=document.createElement("div");
+x.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(x.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(x.style,"transition","all 1s ease");x.className="geBtn gePrimaryBtn";u=document.createElement("img");u.setAttribute("src",IMAGE_PATH+
+"/logo.png");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";x.appendChild(u);u=document.createElement("img");u.setAttribute("src",Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get(q?"doNotShowAgain":"close"));u.setAttribute("border","0");u.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";x.appendChild(u);mxUtils.write(x,
+g);document.body.appendChild(x);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var E=document.createElement("input");E.setAttribute("type","checkbox");E.setAttribute("id","geDoNotShowAgainCheckbox");E.style.marginRight="6px";if(!q){g.appendChild(E);var z=document.createElement("label");z.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(z,mxResources.get("doNotShowAgain"));g.appendChild(z);x.style.paddingBottom=
+"30px";x.appendChild(g)}var G=mxUtils.bind(this,function(){null!=x.parentNode&&(x.parentNode.removeChild(x),this.bannerShowing=!1,E.checked||q)&&(this["hideBanner"+e]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+e]=Date.now(),mxSettings.save()))});mxEvent.addListener(u,"click",mxUtils.bind(this,function(U){mxEvent.consume(U);G()}));var F=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){G()}),1E3)});mxEvent.addListener(x,"click",mxUtils.bind(this,function(U){var p=mxEvent.getSource(U);p!=E&&p!=z?(null!=k&&k(),G(),mxEvent.consume(U)):F()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(F,3E4);u=!0}return u};EditorUi.prototype.setCurrentFile=function(e){null!=e&&(e.opened=new Date);this.currentFile=e};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(e,g,k,q){e=e.toDataURL("image/"+k);if(null!=e&&6<e.length)null!=g&&(e=Editor.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(g))),0<q&&(e=Editor.writeGraphModelToPng(e,"pHYs","dpi",q));else throw{message:mxResources.get("unknownError")};return e};EditorUi.prototype.saveCanvas=function(e,g,k,q,u){var x="jpeg"==k?"jpg":k;q=this.getBaseFilename(q)+(null!=g?".drawio":"")+"."+x;e=this.createImageDataUri(e,
+g,k,u);this.saveData(q,x,e.substring(e.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(e,g){e=new TextareaDialog(this,e,g,null,null,mxResources.get("close"));this.showDialog(e.container,620,460,
+!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(e,g,k,q,u,x){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)e=q?this.base64ToBlob(e,k):new Blob([e],{type:k}),navigator.msSaveOrOpenBlob(e,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(e,!0):(k.document.write(e),
+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+":",e):this.openInNewWindow(e,k,q);else{var E=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof E.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var z=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);x=65==(z?parseInt(z[2],10):
+!1)?!1:x}if(x||this.isOffline()){E.href=URL.createObjectURL(q?this.base64ToBlob(e,k):new Blob([e],{type:k}));x?E.download=g:E.setAttribute("target","_blank");document.body.appendChild(E);try{window.setTimeout(function(){URL.revokeObjectURL(E.href)},2E4),E.click(),E.parentNode.removeChild(E)}catch(G){}}else this.createEchoRequest(e,g,k,q,u).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(e,g,k,q,u,x){e="xml="+encodeURIComponent(e);return new mxXmlRequest(SAVE_URL,e+(null!=
+k?"&mime="+k:"")+(null!=u?"&format="+u:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(q?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(e,g){g=g||"";e=atob(e);for(var k=e.length,q=Math.ceil(k/1024),u=Array(q),x=0;x<q;++x){for(var E=1024*x,z=Math.min(E+1024,k),G=Array(z-E),F=0;E<z;++F,++E)G[F]=e[E].charCodeAt(0);u[x]=new Uint8Array(G)}return new Blob(u,{type:g})};EditorUi.prototype.saveLocalFile=function(e,g,k,q,u,x,E,z){x=null!=x?x:!1;E=null!=E?E:"vsdx"!=
+u&&(!mxClient.IS_IOS||!navigator.standalone);u=this.getServiceCount(x);isLocalStorage&&u++;var G=4>=u?2:6<u?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(F,U){try{if("_blank"==U)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(e,k,q);else if(null!=k&&"text/html"==k.substring(0,9)){var p=new EmbedDialog(this,e);this.showDialog(p.container,450,240,!0,!0);p.init()}else{var v=window.open("about:blank");null==v?mxUtils.popup(e,!0):(v.document.write("<pre>"+mxUtils.htmlEntities(e,
+!1)+"</pre>"),v.document.close())}else U==App.MODE_DEVICE||"download"==U?this.doSaveLocalFile(e,F,k,q,null,z):null!=F&&0<F.length&&this.pickFolder(U,mxUtils.bind(this,function(H){try{this.exportFile(e,F,k,q,U,H)}catch(K){this.handleError(K)}}))}catch(H){this.handleError(H)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,x,E,null,1<u,G,e,k,q);x=this.isServices(u)?u>G?390:280:160;this.showDialog(g.container,420,x,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=
+function(e,g,k){var q=window.open("about:blank");null==q||null==q.document?mxUtils.popup(e,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(e=k?e:btoa(unescape(encodeURIComponent(e))),q.document.write('<html><img style="max-width:100%;" src="data:'+g+";base64,"+e+'"/></html>')):q.document.write("<html>"+e+"</html>"):q.document.write("<html><pre>"+mxUtils.htmlEntities(e,!1)+"</pre></html>"),q.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(e){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=e(mxUtils.bind(this,function(q){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor=
"#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&
-(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var v=g.getBoundingClientRect();this.tagsDialog.style.left=v.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";v=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=v.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(n)}),
-Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var n=this.editor.graph.getAllTags();g.style.display=0<n.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var u=g.getBoundingClientRect();this.tagsDialog.style.left=u.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=u.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(q)}),
+Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var q=this.editor.graph.getAllTags();g.style.display=0<q.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),
-this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=f(mxUtils.bind(this,function(n){var v=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",v);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)v.apply(this);
+this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=e(mxUtils.bind(this,function(q){var u=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",u);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)u.apply(this);
else{this.exportDialog=document.createElement("div");var x=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=x.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=x.zIndex;var E=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});E.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
function(z){E.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var G=this.createImageDataUri(z,null,"png");z=document.createElement("img");z.style.maxWidth="140px";z.style.maxHeight="140px";z.style.cursor="pointer";z.style.backgroundColor="white";z.setAttribute("title",mxResources.get("openInNewWindow"));z.setAttribute("border","0");z.setAttribute("src",G);this.exportDialog.appendChild(z);mxEvent.addListener(z,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(G.substring(G.indexOf(",")+1),"image/png",!0);v.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",v);document.body.appendChild(this.exportDialog)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(f,g,k,n,v){this.isLocalFileSave()?
-this.saveLocalFile(k,f,n,v,g):this.saveRequest(f,g,mxUtils.bind(this,function(x,E){return this.createEchoRequest(k,x,n,v,g,E)}),k,v,n)};EditorUi.prototype.saveRequest=function(f,g,k,n,v,x,E){E=null!=E?E:!mxClient.IS_IOS||!navigator.standalone;var z=this.getServiceCount(!1);isLocalStorage&&z++;var G=4>=z?2:6<z?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(F,U){if("_blank"==U||null!=F&&0<F.length){var p=k("_blank"==U?null:F,U==App.MODE_DEVICE||"download"==U||null==U||"_blank"==U?"0":"1");
-null!=p&&(U==App.MODE_DEVICE||"download"==U||"_blank"==U?p.simulate(document,"_blank"):this.pickFolder(U,mxUtils.bind(this,function(u){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,F,x,!0,U,u)}catch(H){this.handleError(H)}else this.spinner.spin(document.body,mxResources.get("saving"))&&p.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=p.getStatus()&&299>=p.getStatus())try{this.exportFile(p.getText(),F,x,!0,U,u)}catch(H){this.handleError(H)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(H){this.spinner.stop();this.handleError(H)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,E,null,1<z,G,n,x,v);z=this.isServices(z)?4<z?390:280:160;this.showDialog(f.container,420,z,!0,!0);f.init()};EditorUi.prototype.isServices=function(f){return 1!=f};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(f,g,k,n,v,x){};EditorUi.prototype.pickFolder=function(f,
-g,k){g(null)};EditorUi.prototype.exportSvg=function(f,g,k,n,v,x,E,z,G,F,U,p,u,H){if(this.spinner.spin(document.body,mxResources.get("export")))try{var K=this.editor.graph.isSelectionEmpty();k=null!=k?k:K;var N=g?null:this.editor.graph.background;N==mxConstants.NONE&&(N=null);null==N&&0==g&&(N=U?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var I=this.editor.graph.getSvg(N,f,E,z,null,k,null,null,"blank"==F?"_blank":"self"==F?"_top":null,null,!u,U,p);n&&this.editor.graph.addSvgShadow(I);var L=
-this.getBaseFilename()+(v?".drawio":"")+".svg";H=null!=H?H:mxUtils.bind(this,function(V){this.isLocalFileSave()||V.length<=MAX_REQUEST_SIZE?this.saveData(L,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});var Q=mxUtils.bind(this,function(V){this.spinner.stop();v&&V.setAttribute("content",this.getFileData(!0,null,null,null,k,G,null,null,null,!1));H(Graph.xmlDeclaration+"\n"+(v?Graph.svgFileComment+
-"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(V))});this.editor.graph.mathEnabled&&this.editor.addMathCss(I);var P=mxUtils.bind(this,function(V){x?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(V,Q,this.thumbImageCache)):Q(V)});u?this.embedFonts(I,P):(this.editor.addFontCss(I),P(I))}catch(V){this.handleError(V)}};EditorUi.prototype.addRadiobox=function(f,g,k,n,v,x,E){return this.addCheckbox(f,k,n,v,x,E,!0,g)};EditorUi.prototype.addCheckbox=function(f,g,k,n,v,x,E,
-z){x=null!=x?x:!0;var G=document.createElement("input");G.style.marginRight="8px";G.style.marginTop="16px";G.setAttribute("type",E?"radio":"checkbox");E="geCheckbox-"+Editor.guid();G.id=E;null!=z&&G.setAttribute("name",z);k&&(G.setAttribute("checked","checked"),G.defaultChecked=!0);n&&G.setAttribute("disabled","disabled");x&&(f.appendChild(G),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",E),f.appendChild(k),v||mxUtils.br(f));return G};EditorUi.prototype.addEditButton=function(f,
-g){var k=this.addCheckbox(f,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var n=this.getCurrentFile(),v="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(v=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));x.appendChild(n);
-n=document.createElement("option");n.setAttribute("value","custom");mxUtils.write(n,mxResources.get("custom")+"...");x.appendChild(n);f.appendChild(x);mxEvent.addListener(x,"change",mxUtils.bind(this,function(){if("custom"==x.value){var E=new FilenameDialog(this,v,mxResources.get("ok"),function(z){null!=z?v=z:x.value="blank"},mxResources.get("url"),null,null,null,null,function(){x.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,
-function(){k.checked&&(null==g||g.checked)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));mxUtils.br(f);return{getLink:function(){return k.checked?"blank"===x.value?"_blank":v:null},getEditInput:function(){return k},getEditSelect:function(){return x}}};EditorUi.prototype.addLinkSection=function(f,g){function k(){var z=document.createElement("div");z.style.width="100%";z.style.height="100%";z.style.boxSizing="border-box";null!=x&&x!=mxConstants.NONE?(z.style.border="1px solid black",
-z.style.backgroundColor=x):(z.style.backgroundPosition="center center",z.style.backgroundRepeat="no-repeat",z.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");E.innerText="";E.appendChild(z)}mxUtils.write(f,mxResources.get("links")+":");var n=document.createElement("select");n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var v=document.createElement("option");v.setAttribute("value","auto");mxUtils.write(v,mxResources.get("automatic"));
-n.appendChild(v);v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("openInNewWindow"));n.appendChild(v);v=document.createElement("option");v.setAttribute("value","self");mxUtils.write(v,mxResources.get("openInThisWindow"));n.appendChild(v);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));f.appendChild(n);mxUtils.write(f,mxResources.get("borderColor")+
-":");var x="#0000ff",E=null;E=mxUtils.button("",mxUtils.bind(this,function(z){this.pickColor(x||"none",function(G){x=G;k()});mxEvent.consume(z)}));k();E.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";E.style.marginLeft="4px";E.style.height="22px";E.style.width="22px";E.style.position="relative";E.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";E.className="geColorBtn";f.appendChild(E);mxUtils.br(f);return{getColor:function(){return x},getTarget:function(){return n.value},
-focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(f,g,k,n,v,x,E){E=null!=E?E:[];n&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||E.push("lightbox=1"),"auto"!=f&&E.push("target="+f),null!=g&&g!=mxConstants.NONE&&E.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=v&&0<v.length&&E.push("edit="+encodeURIComponent(v)),x&&E.push("layers=1"),this.editor.graph.foldingEnabled&&E.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&
-this.currentPage!=this.pages[0]&&E.push("page-id="+this.currentPage.getId());return E};EditorUi.prototype.createLink=function(f,g,k,n,v,x,E,z,G,F){G=this.createUrlParameters(f,g,k,n,v,x,G);f=this.getCurrentFile();g=!0;null!=E?k="#U"+encodeURIComponent(E):(f=this.getCurrentFile(),z||null==f||f.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="#"+f.getHash(),g=!1));g&&
-null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&G.push("title="+encodeURIComponent(f.getTitle()));F&&1<k.length&&(G.push("open="+k.substring(1)),k="");return(n&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<G.length?"?"+G.join("&"):"")+k};EditorUi.prototype.createHtml=function(f,g,k,n,v,x,E,z,G,F,U,p){this.getBasenames();var u={};""!=
-v&&v!=mxConstants.NONE&&(u.highlight=v);"auto"!==n&&(u.target=n);F||(u.lightbox=!1);u.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(u.zoom=k/100);k=[];E&&(k.push("pages"),u.resize=!0,null!=this.pages&&null!=this.currentPage&&(u.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),u.resize=!0);z&&k.push("layers");G&&k.push("tags");0<k.length&&(F&&k.push("lightbox"),u.toolbar=k.join(" "));null!=U&&0<U.length&&(u.edit=U);null!=f?u.url=f:u.xml=this.getFileData(!0,
-null,null,null,null,!E);g='<div class="mxgraph" style="'+(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(u))+'"></div>';f=null!=f?"&fetch="+encodeURIComponent(f):"";p(g,'<script type="text/javascript" src="'+(0<f.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+f:"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(f,g,k,n){var v=document.createElement("div");v.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";v.appendChild(x);var E=document.createElement("div");E.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var z=document.createElement("input");
+function(){this.openInNewWindow(G.substring(G.indexOf(",")+1),"image/png",!0);u.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",u);document.body.appendChild(this.exportDialog)}mxEvent.consume(q)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(e,g,k,q,u){this.isLocalFileSave()?
+this.saveLocalFile(k,e,q,u,g):this.saveRequest(e,g,mxUtils.bind(this,function(x,E){return this.createEchoRequest(k,x,q,u,g,E)}),k,u,q)};EditorUi.prototype.saveRequest=function(e,g,k,q,u,x,E){E=null!=E?E:!mxClient.IS_IOS||!navigator.standalone;var z=this.getServiceCount(!1);isLocalStorage&&z++;var G=4>=z?2:6<z?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(F,U){if("_blank"==U||null!=F&&0<F.length){var p=k("_blank"==U?null:F,U==App.MODE_DEVICE||"download"==U||null==U||"_blank"==U?"0":"1");
+null!=p&&(U==App.MODE_DEVICE||"download"==U||"_blank"==U?p.simulate(document,"_blank"):this.pickFolder(U,mxUtils.bind(this,function(v){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=q)try{this.exportFile(q,F,x,!0,U,v)}catch(H){this.handleError(H)}else this.spinner.spin(document.body,mxResources.get("saving"))&&p.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=p.getStatus()&&299>=p.getStatus())try{this.exportFile(p.getText(),F,x,!0,U,v)}catch(H){this.handleError(H)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(H){this.spinner.stop();this.handleError(H)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,E,null,1<z,G,q,x,u);z=this.isServices(z)?4<z?390:280:160;this.showDialog(e.container,420,z,!0,!0);e.init()};EditorUi.prototype.isServices=function(e){return 1!=e};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(e,g,k,q,u,x){};EditorUi.prototype.pickFolder=function(e,
+g,k){g(null)};EditorUi.prototype.exportSvg=function(e,g,k,q,u,x,E,z,G,F,U,p,v,H){if(this.spinner.spin(document.body,mxResources.get("export")))try{var K=this.editor.graph.isSelectionEmpty();k=null!=k?k:K;var N=g?null:this.editor.graph.background;N==mxConstants.NONE&&(N=null);null==N&&0==g&&(N=U?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var I=this.editor.graph.getSvg(N,e,E,z,null,k,null,null,"blank"==F?"_blank":"self"==F?"_top":null,null,!v,U,p);q&&this.editor.graph.addSvgShadow(I);var L=
+this.getBaseFilename()+(u?".drawio":"")+".svg";H=null!=H?H:mxUtils.bind(this,function(V){this.isLocalFileSave()||V.length<=MAX_REQUEST_SIZE?this.saveData(L,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});var Q=mxUtils.bind(this,function(V){this.spinner.stop();u&&V.setAttribute("content",this.getFileData(!0,null,null,null,k,G,null,null,null,!1));H(Graph.xmlDeclaration+"\n"+(u?Graph.svgFileComment+
+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(V))});this.editor.graph.mathEnabled&&this.editor.addMathCss(I);var P=mxUtils.bind(this,function(V){x?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(V,Q,this.thumbImageCache)):Q(V)});v?this.embedFonts(I,P):(this.editor.addFontCss(I),P(I))}catch(V){this.handleError(V)}};EditorUi.prototype.addRadiobox=function(e,g,k,q,u,x,E){return this.addCheckbox(e,k,q,u,x,E,!0,g)};EditorUi.prototype.addCheckbox=function(e,g,k,q,u,x,E,
+z){x=null!=x?x:!0;var G=document.createElement("input");G.style.marginRight="8px";G.style.marginTop="16px";G.setAttribute("type",E?"radio":"checkbox");E="geCheckbox-"+Editor.guid();G.id=E;null!=z&&G.setAttribute("name",z);k&&(G.setAttribute("checked","checked"),G.defaultChecked=!0);q&&G.setAttribute("disabled","disabled");x&&(e.appendChild(G),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",E),e.appendChild(k),u||mxUtils.br(e));return G};EditorUi.prototype.addEditButton=function(e,
+g){var k=this.addCheckbox(e,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var q=this.getCurrentFile(),u="";null!=q&&q.getMode()!=App.MODE_DEVICE&&q.getMode()!=App.MODE_BROWSER&&(u=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("makeCopy"));x.appendChild(q);
+q=document.createElement("option");q.setAttribute("value","custom");mxUtils.write(q,mxResources.get("custom")+"...");x.appendChild(q);e.appendChild(x);mxEvent.addListener(x,"change",mxUtils.bind(this,function(){if("custom"==x.value){var E=new FilenameDialog(this,u,mxResources.get("ok"),function(z){null!=z?u=z:x.value="blank"},mxResources.get("url"),null,null,null,null,function(){x.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,
+function(){k.checked&&(null==g||g.checked)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));mxUtils.br(e);return{getLink:function(){return k.checked?"blank"===x.value?"_blank":u:null},getEditInput:function(){return k},getEditSelect:function(){return x}}};EditorUi.prototype.addLinkSection=function(e,g){function k(){var z=document.createElement("div");z.style.width="100%";z.style.height="100%";z.style.boxSizing="border-box";null!=x&&x!=mxConstants.NONE?(z.style.border="1px solid black",
+z.style.backgroundColor=x):(z.style.backgroundPosition="center center",z.style.backgroundRepeat="no-repeat",z.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");E.innerText="";E.appendChild(z)}mxUtils.write(e,mxResources.get("links")+":");var q=document.createElement("select");q.style.width="100px";q.style.padding="0px";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";var u=document.createElement("option");u.setAttribute("value","auto");mxUtils.write(u,mxResources.get("automatic"));
+q.appendChild(u);u=document.createElement("option");u.setAttribute("value","blank");mxUtils.write(u,mxResources.get("openInNewWindow"));q.appendChild(u);u=document.createElement("option");u.setAttribute("value","self");mxUtils.write(u,mxResources.get("openInThisWindow"));q.appendChild(u);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),q.appendChild(g));e.appendChild(q);mxUtils.write(e,mxResources.get("borderColor")+
+":");var x="#0000ff",E=null;E=mxUtils.button("",mxUtils.bind(this,function(z){this.pickColor(x||"none",function(G){x=G;k()});mxEvent.consume(z)}));k();E.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";E.style.marginLeft="4px";E.style.height="22px";E.style.width="22px";E.style.position="relative";E.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";E.className="geColorBtn";e.appendChild(E);mxUtils.br(e);return{getColor:function(){return x},getTarget:function(){return q.value},
+focus:function(){q.focus()}}};EditorUi.prototype.createUrlParameters=function(e,g,k,q,u,x,E){E=null!=E?E:[];q&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||E.push("lightbox=1"),"auto"!=e&&E.push("target="+e),null!=g&&g!=mxConstants.NONE&&E.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=u&&0<u.length&&E.push("edit="+encodeURIComponent(u)),x&&E.push("layers=1"),this.editor.graph.foldingEnabled&&E.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&
+this.currentPage!=this.pages[0]&&E.push("page-id="+this.currentPage.getId());return E};EditorUi.prototype.createLink=function(e,g,k,q,u,x,E,z,G,F){G=this.createUrlParameters(e,g,k,q,u,x,G);e=this.getCurrentFile();g=!0;null!=E?k="#U"+encodeURIComponent(E):(e=this.getCurrentFile(),z||null==e||e.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="#"+e.getHash(),g=!1));g&&
+null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&G.push("title="+encodeURIComponent(e.getTitle()));F&&1<k.length&&(G.push("open="+k.substring(1)),k="");return(q&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<G.length?"?"+G.join("&"):"")+k};EditorUi.prototype.createHtml=function(e,g,k,q,u,x,E,z,G,F,U,p){this.getBasenames();var v={};""!=
+u&&u!=mxConstants.NONE&&(v.highlight=u);"auto"!==q&&(v.target=q);F||(v.lightbox=!1);v.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(v.zoom=k/100);k=[];E&&(k.push("pages"),v.resize=!0,null!=this.pages&&null!=this.currentPage&&(v.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),v.resize=!0);z&&k.push("layers");G&&k.push("tags");0<k.length&&(F&&k.push("lightbox"),v.toolbar=k.join(" "));null!=U&&0<U.length&&(v.edit=U);null!=e?v.url=e:v.xml=this.getFileData(!0,
+null,null,null,null,!E);g='<div class="mxgraph" style="'+(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(v))+'"></div>';e=null!=e?"&fetch="+encodeURIComponent(e):"";p(g,'<script type="text/javascript" src="'+(0<e.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+e:"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(e,g,k,q){var u=document.createElement("div");u.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";u.appendChild(x);var E=document.createElement("div");E.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var z=document.createElement("input");
z.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";z.setAttribute("value","url");z.setAttribute("type","radio");z.setAttribute("name","type-embedhtmldialog");x=z.cloneNode(!0);x.setAttribute("value","copy");E.appendChild(x);var G=document.createElement("span");mxUtils.write(G,mxResources.get("includeCopyOfMyDiagram"));E.appendChild(G);mxUtils.br(E);E.appendChild(z);G=document.createElement("span");mxUtils.write(G,mxResources.get("publicDiagramUrl"));E.appendChild(G);var F=this.getCurrentFile();
-null==k&&null!=F&&F.constructor==window.DriveFile&&(G=document.createElement("a"),G.style.paddingLeft="12px",G.style.color="gray",G.style.cursor="pointer",mxUtils.write(G,mxResources.get("share")),E.appendChild(G),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(F.getId())})));x.setAttribute("checked","checked");null==k&&z.setAttribute("disabled","disabled");v.appendChild(E);var U=this.addLinkSection(v),p=this.addCheckbox(v,mxResources.get("zoom"),
-!0,null,!0);mxUtils.write(v,":");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="100%";v.appendChild(u);var H=this.addCheckbox(v,mxResources.get("fit"),!0);E=null!=this.pages&&1<this.pages.length;var K=K=this.addCheckbox(v,mxResources.get("allPages"),E,!E),N=this.addCheckbox(v,mxResources.get("layers"),!0),I=this.addCheckbox(v,mxResources.get("tags"),!0),L=this.addCheckbox(v,
-mxResources.get("lightbox"),!0),Q=null;E=380;if(EditorUi.enableHtmlEditOption){Q=this.addEditButton(v,L);var P=Q.getEditInput();P.style.marginBottom="16px";E+=50;mxEvent.addListener(L,"change",function(){L.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&L.checked?Q.getEditSelect().removeAttribute("disabled"):Q.getEditSelect().setAttribute("disabled","disabled")})}f=new CustomDialog(this,v,mxUtils.bind(this,function(){n(z.checked?k:null,p.checked,u.value,U.getTarget(),
-U.getColor(),H.checked,K.checked,N.checked,I.checked,L.checked,null!=Q?Q.getLink():null)}),null,f,g);this.showDialog(f.container,340,E,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(f,g,k,n,v,x,E,z){var G=document.createElement("div");G.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,f||mxResources.get("link"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";G.appendChild(F);var U=this.getCurrentFile();f=0;if(null==
-U||U.constructor!=window.DriveFile||g)E=null!=E?E:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{f=80;E=null!=E?E:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));F.appendChild(p);p=
+null==k&&null!=F&&F.constructor==window.DriveFile&&(G=document.createElement("a"),G.style.paddingLeft="12px",G.style.color="gray",G.style.cursor="pointer",mxUtils.write(G,mxResources.get("share")),E.appendChild(G),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(F.getId())})));x.setAttribute("checked","checked");null==k&&z.setAttribute("disabled","disabled");u.appendChild(E);var U=this.addLinkSection(u),p=this.addCheckbox(u,mxResources.get("zoom"),
+!0,null,!0);mxUtils.write(u,":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";u.appendChild(v);var H=this.addCheckbox(u,mxResources.get("fit"),!0);E=null!=this.pages&&1<this.pages.length;var K=K=this.addCheckbox(u,mxResources.get("allPages"),E,!E),N=this.addCheckbox(u,mxResources.get("layers"),!0),I=this.addCheckbox(u,mxResources.get("tags"),!0),L=this.addCheckbox(u,
+mxResources.get("lightbox"),!0),Q=null;E=380;if(EditorUi.enableHtmlEditOption){Q=this.addEditButton(u,L);var P=Q.getEditInput();P.style.marginBottom="16px";E+=50;mxEvent.addListener(L,"change",function(){L.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");P.checked&&L.checked?Q.getEditSelect().removeAttribute("disabled"):Q.getEditSelect().setAttribute("disabled","disabled")})}e=new CustomDialog(this,u,mxUtils.bind(this,function(){q(z.checked?k:null,p.checked,v.value,U.getTarget(),
+U.getColor(),H.checked,K.checked,N.checked,I.checked,L.checked,null!=Q?Q.getLink():null)}),null,e,g);this.showDialog(e.container,340,E,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(e,g,k,q,u,x,E,z){var G=document.createElement("div");G.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,e||mxResources.get("link"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";G.appendChild(F);var U=this.getCurrentFile();e=0;if(null==
+U||U.constructor!=window.DriveFile||g)E=null!=E?E:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{e=80;E=null!=E?E:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));F.appendChild(p);p=
mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(U.getId())}));p.style.marginTop="12px";p.className="geBtn";F.appendChild(p);G.appendChild(F);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("check"));F.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
-mxUtils.bind(this,function(W){this.spinner.stop();W=new ErrorDialog(this,null,mxResources.get(null!=W?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(W.container,300,80,!0,!1);W.init()}))}))}var u=null,H=null;if(null!=k||null!=n)f+=30,mxUtils.write(G,mxResources.get("width")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.marginRight="16px",u.style.width="50px",u.style.marginLeft="6px",u.style.marginRight="16px",u.style.marginBottom="10px",
-u.value="100%",G.appendChild(u),mxUtils.write(G,mxResources.get("height")+":"),H=document.createElement("input"),H.setAttribute("type","text"),H.style.width="50px",H.style.marginLeft="6px",H.style.marginBottom="10px",H.value=n+"px",G.appendChild(H),mxUtils.br(G);var K=this.addLinkSection(G,x);k=null!=this.pages&&1<this.pages.length;var N=null;if(null==U||U.constructor!=window.DriveFile||g)N=this.addCheckbox(G,mxResources.get("allPages"),k,!k);var I=this.addCheckbox(G,mxResources.get("lightbox"),!0,
-null,null,!x),L=this.addEditButton(G,I),Q=L.getEditInput();x&&(Q.style.marginLeft=I.style.marginLeft,I.style.display="none",f-=20);var P=this.addCheckbox(G,mxResources.get("layers"),!0);P.style.marginLeft=Q.style.marginLeft;P.style.marginTop="8px";var V=this.addCheckbox(G,mxResources.get("tags"),!0);V.style.marginLeft=Q.style.marginLeft;V.style.marginBottom="16px";V.style.marginTop="16px";mxEvent.addListener(I,"change",function(){I.checked?(P.removeAttribute("disabled"),Q.removeAttribute("disabled")):
-(P.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));Q.checked&&I.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,G,mxUtils.bind(this,function(){v(K.getTarget(),K.getColor(),null==N?!0:N.checked,I.checked,L.getLink(),P.checked,null!=u?u.value:null,null!=H?H.value:null,V.checked)}),null,mxResources.get("create"),E,z);this.showDialog(g.container,340,300+f,!0,!0);null!=u?(u.focus(),mxClient.IS_GC||
-mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)):K.focus()};EditorUi.prototype.showRemoteExportDialog=function(f,g,k,n,v){var x=document.createElement("div");x.style.whiteSpace="nowrap";var E=document.createElement("h3");mxUtils.write(E,mxResources.get("image"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(v?"10":"4")+"px";x.appendChild(E);if(v){mxUtils.write(x,mxResources.get("zoom")+":");var z=document.createElement("input");
+mxUtils.bind(this,function(W){this.spinner.stop();W=new ErrorDialog(this,null,mxResources.get(null!=W?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(W.container,300,80,!0,!1);W.init()}))}))}var v=null,H=null;if(null!=k||null!=q)e+=30,mxUtils.write(G,mxResources.get("width")+":"),v=document.createElement("input"),v.setAttribute("type","text"),v.style.marginRight="16px",v.style.width="50px",v.style.marginLeft="6px",v.style.marginRight="16px",v.style.marginBottom="10px",
+v.value="100%",G.appendChild(v),mxUtils.write(G,mxResources.get("height")+":"),H=document.createElement("input"),H.setAttribute("type","text"),H.style.width="50px",H.style.marginLeft="6px",H.style.marginBottom="10px",H.value=q+"px",G.appendChild(H),mxUtils.br(G);var K=this.addLinkSection(G,x);k=null!=this.pages&&1<this.pages.length;var N=null;if(null==U||U.constructor!=window.DriveFile||g)N=this.addCheckbox(G,mxResources.get("allPages"),k,!k);var I=this.addCheckbox(G,mxResources.get("lightbox"),!0,
+null,null,!x),L=this.addEditButton(G,I),Q=L.getEditInput();x&&(Q.style.marginLeft=I.style.marginLeft,I.style.display="none",e-=20);var P=this.addCheckbox(G,mxResources.get("layers"),!0);P.style.marginLeft=Q.style.marginLeft;P.style.marginTop="8px";var V=this.addCheckbox(G,mxResources.get("tags"),!0);V.style.marginLeft=Q.style.marginLeft;V.style.marginBottom="16px";V.style.marginTop="16px";mxEvent.addListener(I,"change",function(){I.checked?(P.removeAttribute("disabled"),Q.removeAttribute("disabled")):
+(P.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));Q.checked&&I.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,G,mxUtils.bind(this,function(){u(K.getTarget(),K.getColor(),null==N?!0:N.checked,I.checked,L.getLink(),P.checked,null!=v?v.value:null,null!=H?H.value:null,V.checked)}),null,mxResources.get("create"),E,z);this.showDialog(g.container,340,300+e,!0,!0);null!=v?(v.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null)):K.focus()};EditorUi.prototype.showRemoteExportDialog=function(e,g,k,q,u){var x=document.createElement("div");x.style.whiteSpace="nowrap";var E=document.createElement("h3");mxUtils.write(E,mxResources.get("image"));E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(u?"10":"4")+"px";x.appendChild(E);if(u){mxUtils.write(x,mxResources.get("zoom")+":");var z=document.createElement("input");
z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value=this.lastExportZoom||"100%";x.appendChild(z);mxUtils.write(x,mxResources.get("borderWidth")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.marginRight="16px";G.style.width="60px";G.style.marginLeft="4px";G.value=this.lastExportBorder||"0";x.appendChild(G);mxUtils.br(x)}var F=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,
-this.editor.graph.isSelectionEmpty()),U=n?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);E=this.editor.graph;var p=n?null:this.addCheckbox(x,mxResources.get("transparentBackground"),E.background==mxConstants.NONE||null==E.background);null!=p&&(p.style.marginBottom="16px");f=new CustomDialog(this,x,mxUtils.bind(this,function(){var u=parseInt(z.value)/100||1,H=parseInt(G.value)||0;k(!F.checked,null!=U?U.checked:!1,null!=p?p.checked:!1,u,H)}),null,f,g);
-this.showDialog(f.container,300,(v?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(f,g,k,n,v,x,E,z,G){E=null!=E?E:Editor.defaultIncludeDiagram;var F=document.createElement("div");F.style.whiteSpace="nowrap";var U=this.editor.graph,p="jpeg"==z?220:300,u=document.createElement("h3");mxUtils.write(u,f);u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";F.appendChild(u);mxUtils.write(F,mxResources.get("zoom")+":");var H=document.createElement("input");
+this.editor.graph.isSelectionEmpty()),U=q?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);E=this.editor.graph;var p=q?null:this.addCheckbox(x,mxResources.get("transparentBackground"),E.background==mxConstants.NONE||null==E.background);null!=p&&(p.style.marginBottom="16px");e=new CustomDialog(this,x,mxUtils.bind(this,function(){var v=parseInt(z.value)/100||1,H=parseInt(G.value)||0;k(!F.checked,null!=U?U.checked:!1,null!=p?p.checked:!1,v,H)}),null,e,g);
+this.showDialog(e.container,300,(u?25:0)+(q?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(e,g,k,q,u,x,E,z,G){E=null!=E?E:Editor.defaultIncludeDiagram;var F=document.createElement("div");F.style.whiteSpace="nowrap";var U=this.editor.graph,p="jpeg"==z?220:300,v=document.createElement("h3");mxUtils.write(v,e);v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";F.appendChild(v);mxUtils.write(F,mxResources.get("zoom")+":");var H=document.createElement("input");
H.setAttribute("type","text");H.style.marginRight="16px";H.style.width="60px";H.style.marginLeft="4px";H.style.marginRight="12px";H.value=this.lastExportZoom||"100%";F.appendChild(H);mxUtils.write(F,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";F.appendChild(K);mxUtils.br(F);var N=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,
-U.isSelectionEmpty()),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.style.marginLeft="24px";I.setAttribute("disabled","disabled");I.setAttribute("type","checkbox");var L=document.createElement("select");L.style.marginTop="16px";L.style.marginLeft="8px";f=["selectionOnly","diagram","page"];var Q={};for(u=0;u<f.length;u++)if(!U.isSelectionEmpty()||"selectionOnly"!=f[u]){var P=document.createElement("option");mxUtils.write(P,mxResources.get(f[u]));P.setAttribute("value",
-f[u]);L.appendChild(P);Q[f[u]]=P}G?(mxUtils.write(F,mxResources.get("size")+":"),F.appendChild(L),mxUtils.br(F),p+=26,mxEvent.addListener(L,"change",function(){"selectionOnly"==L.value&&(N.checked=!0)})):x&&(F.appendChild(I),mxUtils.write(F,mxResources.get("crop")),mxUtils.br(F),p+=30,mxEvent.addListener(N,"change",function(){N.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));U.isSelectionEmpty()?G&&(N.style.display="none",N.nextSibling.style.display="none",N.nextSibling.nextSibling.style.display=
-"none",p-=30):(L.value="diagram",I.setAttribute("checked","checked"),I.defaultChecked=!0,mxEvent.addListener(N,"change",function(){L.value=N.checked?"selectionOnly":"diagram"}));var V=this.addCheckbox(F,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=z),W=null;Editor.isDarkMode()&&(W=this.addCheckbox(F,mxResources.get("dark"),!0),p+=26);var q=this.addCheckbox(F,mxResources.get("shadow"),U.shadowVisible),D=null;if("png"==z||"jpeg"==z)D=this.addCheckbox(F,mxResources.get("grid"),!1,this.isOffline()||
+U.isSelectionEmpty()),I=document.createElement("input");I.style.marginTop="16px";I.style.marginRight="8px";I.style.marginLeft="24px";I.setAttribute("disabled","disabled");I.setAttribute("type","checkbox");var L=document.createElement("select");L.style.marginTop="16px";L.style.marginLeft="8px";e=["selectionOnly","diagram","page"];var Q={};for(v=0;v<e.length;v++)if(!U.isSelectionEmpty()||"selectionOnly"!=e[v]){var P=document.createElement("option");mxUtils.write(P,mxResources.get(e[v]));P.setAttribute("value",
+e[v]);L.appendChild(P);Q[e[v]]=P}G?(mxUtils.write(F,mxResources.get("size")+":"),F.appendChild(L),mxUtils.br(F),p+=26,mxEvent.addListener(L,"change",function(){"selectionOnly"==L.value&&(N.checked=!0)})):x&&(F.appendChild(I),mxUtils.write(F,mxResources.get("crop")),mxUtils.br(F),p+=30,mxEvent.addListener(N,"change",function(){N.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")}));U.isSelectionEmpty()?G&&(N.style.display="none",N.nextSibling.style.display="none",N.nextSibling.nextSibling.style.display=
+"none",p-=30):(L.value="diagram",I.setAttribute("checked","checked"),I.defaultChecked=!0,mxEvent.addListener(N,"change",function(){L.value=N.checked?"selectionOnly":"diagram"}));var V=this.addCheckbox(F,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=z),W=null;Editor.isDarkMode()&&(W=this.addCheckbox(F,mxResources.get("dark"),!0),p+=26);var n=this.addCheckbox(F,mxResources.get("shadow"),U.shadowVisible),D=null;if("png"==z||"jpeg"==z)D=this.addCheckbox(F,mxResources.get("grid"),!1,this.isOffline()||
!this.canvasSupported,!1,!0),p+=30;var M=this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram"),E,null,null,"jpeg"!=z);M.style.marginBottom="16px";var T=document.createElement("input");T.style.marginBottom="16px";T.style.marginRight="8px";T.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||T.setAttribute("disabled","disabled");var O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="8px";O.style.marginRight="10px";O.style.marginBottom="16px";
O.className="geBtn";x=document.createElement("option");x.setAttribute("value","none");mxUtils.write(x,mxResources.get("noChange"));O.appendChild(x);x=document.createElement("option");x.setAttribute("value","embedFonts");mxUtils.write(x,mxResources.get("embedFonts"));O.appendChild(x);x=document.createElement("option");x.setAttribute("value","lblToSvg");mxUtils.write(x,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||O.appendChild(x);mxEvent.addListener(O,"change",mxUtils.bind(this,
-function(){"lblToSvg"==O.value?(T.checked=!0,T.setAttribute("disabled","disabled"),Q.page.style.display="none","page"==L.value&&(L.value="diagram"),q.checked=!1,q.setAttribute("disabled","disabled"),S.style.display="inline-block",R.style.display="none"):"disabled"==T.getAttribute("disabled")&&(T.checked=!1,T.removeAttribute("disabled"),q.removeAttribute("disabled"),Q.page.style.display="",S.style.display="none",R.style.display="")}));g&&(F.appendChild(T),mxUtils.write(F,mxResources.get("embedImages")),
+function(){"lblToSvg"==O.value?(T.checked=!0,T.setAttribute("disabled","disabled"),Q.page.style.display="none","page"==L.value&&(L.value="diagram"),n.checked=!1,n.setAttribute("disabled","disabled"),S.style.display="inline-block",R.style.display="none"):"disabled"==T.getAttribute("disabled")&&(T.checked=!1,T.removeAttribute("disabled"),n.removeAttribute("disabled"),Q.page.style.display="",S.style.display="none",R.style.display="")}));g&&(F.appendChild(T),mxUtils.write(F,mxResources.get("embedImages")),
mxUtils.br(F),mxUtils.write(F,mxResources.get("txtSettings")+":"),F.appendChild(O),mxUtils.br(F),p+=60);var R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";R.style.marginRight="10px";R.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));R.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));R.appendChild(g);
g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));R.appendChild(g);var S=document.createElement("div");mxUtils.write(S,mxResources.get("LinksLost"));S.style.margin="7px";S.style.display="none";"svg"==z&&(mxUtils.write(F,mxResources.get("links")+":"),F.appendChild(R),F.appendChild(S),mxUtils.br(F),mxUtils.br(F),p+=50);k=new CustomDialog(this,F,mxUtils.bind(this,function(){this.lastExportBorder=K.value;this.lastExportZoom=H.value;
-v(H.value,V.checked,!N.checked,q.checked,M.checked,T.checked,K.value,I.checked,!1,R.value,null!=D?D.checked:null,null!=W?W.checked:null,L.value,"embedFonts"==O.value,"lblToSvg"==O.value)}),null,k,n);this.showDialog(k.container,340,p,!0,!0,null,null,null,null,!0);H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(f,g,k,n,v){var x=document.createElement("div");x.style.whiteSpace="nowrap";
-var E=this.editor.graph;if(null!=g){var z=document.createElement("h3");mxUtils.write(z,g);z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(z)}var G=this.addCheckbox(x,mxResources.get("fit"),!0),F=this.addCheckbox(x,mxResources.get("shadow"),E.shadowVisible&&n,!n),U=this.addCheckbox(x,k),p=this.addCheckbox(x,mxResources.get("lightbox"),!0),u=this.addEditButton(x,p),H=u.getEditInput(),K=1<E.model.getChildCount(E.model.getRoot()),N=this.addCheckbox(x,mxResources.get("layers"),
-K,!K);N.style.marginLeft=H.style.marginLeft;N.style.marginBottom="12px";N.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(K&&N.removeAttribute("disabled"),H.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&p.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){f(G.checked,F.checked,U.checked,
-p.checked,u.getLink(),N.checked)}),null,mxResources.get("embed"),v);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(f,g,k,n,v,x,E,z){function G(H){var K=" ",N="";n&&(K=" 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!=U?"&page="+U:"")+(v?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",N+="cursor:pointer;");f&&(N+="max-width:100%;");var I="";k&&(I=' width="'+Math.round(F.width)+'" height="'+Math.round(F.height)+'"');E('<img src="'+H+'"'+I+(""!=N?' style="'+N+'"':"")+K+"/>")}var F=this.editor.graph.getGraphBounds(),U=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(H){var K=n?this.getFileData(!0):null;H=
-this.createImageDataUri(H,K,"png");G(H)}),null,null,null,mxUtils.bind(this,function(H){z({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),F.width*F.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var p="";k&&(p="&w="+Math.round(2*F.width)+"&h="+Math.round(2*F.height));var u=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+p+"&xml="+encodeURIComponent(g));u.send(mxUtils.bind(this,function(){200<=u.getStatus()&&
-299>=u.getStatus()?G("data:image/png;base64,"+u.getText()):z({message:mxResources.get("unknownError")})}))}else z({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(f,g,k,n,v,x,E){var z=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),G=z.getElementsByTagName("a");if(null!=G)for(var F=0;F<G.length;F++){var U=G[F].getAttribute("href");null!=U&&"#"==U.charAt(0)&&"_blank"==G[F].getAttribute("target")&&G[F].removeAttribute("target")}n&&
-z.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(z);if(k){var p=" ",u="";n&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(v?"&edit=_blank":"")+(x?"&layers=1":
-"")+"');}})(this);\"",u+="cursor:pointer;");f&&(u+="max-width:100%;");this.editor.convertImages(z,mxUtils.bind(this,function(H){E('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(H))+'"'+(""!=u?' style="'+u+'"':"")+p+"/>")}))}else u="",n&&(g=this.getSelectedPageIndex(),z.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:"")+(v?"&edit=_blank":"")+(x?"&layers=1":"")+"');}}})(this);"),u+="cursor:pointer;"),f&&(f=parseInt(z.getAttribute("width")),v=parseInt(z.getAttribute("height")),z.setAttribute("viewBox","-0.5 -0.5 "+f+" "+v),u+="max-width:100%;max-height:"+v+"px;",z.removeAttribute("height")),""!=u&&z.setAttribute("style",u),this.editor.addFontCss(z),this.editor.graph.mathEnabled&&this.editor.addMathCss(z),E(mxUtils.getXml(z))};EditorUi.prototype.timeSince=function(f){f=
-Math.floor((new Date-f)/1E3);var g=Math.floor(f/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(f/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(f/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(f/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(f/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(f,g){if(null!=f){var k=null;if("diagram"==f.nodeName)k=
-f;else if("mxfile"==f.nodeName){var n=f.getElementsByTagName("diagram");if(0<n.length){k=n[0];var v=g.getGlobalVariable;g.getGlobalVariable=function(x){return"page"==x?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==x?1:v.apply(this,arguments)}}}null!=k&&(f=Editor.parseDiagramNode(k))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(f)}catch(x){}finally{this.editor.graph=n}return f};EditorUi.prototype.getPngFileProperties=function(f){var g=1,k=0;if(null!=
-f){if(f.hasAttribute("scale")){var n=parseFloat(f.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}f.hasAttribute("border")&&(n=parseInt(f.getAttribute("border")),!isNaN(n)&&0<n&&(k=n))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(f,g,k,n,v){try{var x=this.editor.graph,E=null!=x.themes&&"darkTheme"==x.defaultThemeName,z=null;if(null!=k&&0<k.length)x=this.createTemporaryGraph(E?x.getDefaultStylesheet():x.getStylesheet()),document.body.appendChild(x.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
+u(H.value,V.checked,!N.checked,n.checked,M.checked,T.checked,K.value,I.checked,!1,R.value,null!=D?D.checked:null,null!=W?W.checked:null,L.value,"embedFonts"==O.value,"lblToSvg"==O.value)}),null,k,q);this.showDialog(k.container,340,p,!0,!0,null,null,null,null,!0);H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(e,g,k,q,u){var x=document.createElement("div");x.style.whiteSpace="nowrap";
+var E=this.editor.graph;if(null!=g){var z=document.createElement("h3");mxUtils.write(z,g);z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(z)}var G=this.addCheckbox(x,mxResources.get("fit"),!0),F=this.addCheckbox(x,mxResources.get("shadow"),E.shadowVisible&&q,!q),U=this.addCheckbox(x,k),p=this.addCheckbox(x,mxResources.get("lightbox"),!0),v=this.addEditButton(x,p),H=v.getEditInput(),K=1<E.model.getChildCount(E.model.getRoot()),N=this.addCheckbox(x,mxResources.get("layers"),
+K,!K);N.style.marginLeft=H.style.marginLeft;N.style.marginBottom="12px";N.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(K&&N.removeAttribute("disabled"),H.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&p.checked?v.getEditSelect().removeAttribute("disabled"):v.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){e(G.checked,F.checked,U.checked,
+p.checked,v.getLink(),N.checked)}),null,mxResources.get("embed"),u);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(e,g,k,q,u,x,E,z){function G(H){var K=" ",N="";q&&(K=" 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!=U?"&page="+U:"")+(u?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",N+="cursor:pointer;");e&&(N+="max-width:100%;");var I="";k&&(I=' width="'+Math.round(F.width)+'" height="'+Math.round(F.height)+'"');E('<img src="'+H+'"'+I+(""!=N?' style="'+N+'"':"")+K+"/>")}var F=this.editor.graph.getGraphBounds(),U=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(H){var K=q?this.getFileData(!0):null;H=
+this.createImageDataUri(H,K,"png");G(H)}),null,null,null,mxUtils.bind(this,function(H){z({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),F.width*F.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var p="";k&&(p="&w="+Math.round(2*F.width)+"&h="+Math.round(2*F.height));var v=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(q?"1":"0")+p+"&xml="+encodeURIComponent(g));v.send(mxUtils.bind(this,function(){200<=v.getStatus()&&
+299>=v.getStatus()?G("data:image/png;base64,"+v.getText()):z({message:mxResources.get("unknownError")})}))}else z({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(e,g,k,q,u,x,E){var z=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),G=z.getElementsByTagName("a");if(null!=G)for(var F=0;F<G.length;F++){var U=G[F].getAttribute("href");null!=U&&"#"==U.charAt(0)&&"_blank"==G[F].getAttribute("target")&&G[F].removeAttribute("target")}q&&
+z.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(z);if(k){var p=" ",v="";q&&(p="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(u?"&edit=_blank":"")+(x?"&layers=1":
+"")+"');}})(this);\"",v+="cursor:pointer;");e&&(v+="max-width:100%;");this.editor.convertImages(z,mxUtils.bind(this,function(H){E('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(H))+'"'+(""!=v?' style="'+v+'"':"")+p+"/>")}))}else v="",q&&(g=this.getSelectedPageIndex(),z.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:"")+(u?"&edit=_blank":"")+(x?"&layers=1":"")+"');}}})(this);"),v+="cursor:pointer;"),e&&(e=parseInt(z.getAttribute("width")),u=parseInt(z.getAttribute("height")),z.setAttribute("viewBox","-0.5 -0.5 "+e+" "+u),v+="max-width:100%;max-height:"+u+"px;",z.removeAttribute("height")),""!=v&&z.setAttribute("style",v),this.editor.addFontCss(z),this.editor.graph.mathEnabled&&this.editor.addMathCss(z),E(mxUtils.getXml(z))};EditorUi.prototype.timeSince=function(e){e=
+Math.floor((new Date-e)/1E3);var g=Math.floor(e/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(e/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(e/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(e/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(e/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(e,g){if(null!=e){var k=null;if("diagram"==e.nodeName)k=
+e;else if("mxfile"==e.nodeName){var q=e.getElementsByTagName("diagram");if(0<q.length){k=q[0];var u=g.getGlobalVariable;g.getGlobalVariable=function(x){return"page"==x?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==x?1:u.apply(this,arguments)}}}null!=k&&(e=Editor.parseDiagramNode(k))}q=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(e)}catch(x){}finally{this.editor.graph=q}return e};EditorUi.prototype.getPngFileProperties=function(e){var g=1,k=0;if(null!=
+e){if(e.hasAttribute("scale")){var q=parseFloat(e.getAttribute("scale"));!isNaN(q)&&0<q&&(g=q)}e.hasAttribute("border")&&(q=parseInt(e.getAttribute("border")),!isNaN(q)&&0<q&&(k=q))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(e,g,k,q,u){try{var x=this.editor.graph,E=null!=x.themes&&"darkTheme"==x.defaultThemeName,z=null;if(null!=k&&0<k.length)x=this.createTemporaryGraph(E?x.getDefaultStylesheet():x.getStylesheet()),document.body.appendChild(x.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
!0),x),z=k;else if(E||null!=this.pages&&this.currentPage!=this.pages[0]){x=this.createTemporaryGraph(E?x.getDefaultStylesheet():x.getStylesheet());var G=x.getGlobalVariable;x.setBackgroundImage=this.editor.graph.setBackgroundImage;var F=this.pages[0];this.currentPage==F?x.setBackgroundImage(this.editor.graph.backgroundImage):null!=F.viewState&&null!=F.viewState&&x.setBackgroundImage(F.viewState.backgroundImage);x.getGlobalVariable=function(U){return"page"==U?F.getName():"pagenumber"==U?1:G.apply(this,
-arguments)};document.body.appendChild(x.container);x.model.setRoot(F.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(U){try{null==z&&(z=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var p=U.toDataURL("image/png");p=Editor.writeGraphModelToPng(p,"tEXt","mxfile",encodeURIComponent(z));f(p.substring(p.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(u){null!=g&&g(u)}}),null,null,null,mxUtils.bind(this,function(U){null!=g&&
-g(U)}),null,null,n,null,x.shadowVisible,null,x,v,null,null,null,"diagram",null)}catch(U){null!=g&&g(U)}};EditorUi.prototype.getEmbeddedSvg=function(f,g,k,n,v,x,E,z,G,F,U,p,u){z=null!=z?z:!0;U=null!=U?U:0;E=null!=G?G:g.background;E==mxConstants.NONE&&(E=null);x=g.getSvg(E,F,U,null,null,x,null,null,null,g.shadowVisible||p,null,u,"diagram");(g.shadowVisible||p)&&g.addSvgShadow(x,null,null,0==U);null!=f&&x.setAttribute("content",f);null!=k&&x.setAttribute("resource",k);var H=mxUtils.bind(this,function(K){K=
-(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(K);null!=v&&v(K);return K});g.mathEnabled&&this.editor.addMathCss(x);if(null!=v)this.embedFonts(x,mxUtils.bind(this,function(K){z?this.editor.convertImages(K,mxUtils.bind(this,function(N){H(N)})):H(K)}));else return H(x)};EditorUi.prototype.embedFonts=function(f,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(f,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(f,k),g(f)}catch(n){g(f)}}))}catch(k){g(f)}}))};EditorUi.prototype.exportImage=function(f,g,k,n,v,x,E,z,G,F,U,p,u){G=null!=G?G:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var H=this.editor.graph.isSelectionEmpty();k=null!=k?k:H;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(K){this.spinner.stop();try{this.saveCanvas(K,
-v?this.getFileData(!0,null,null,null,k,z):null,G,null==this.pages||0==this.pages.length,U)}catch(N){this.handleError(N)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}),null,k,f||1,g,n,null,null,x,E,F,p,u)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(f){return this.editor.isCorsEnabledForUrl(f)};EditorUi.prototype.importXml=function(f,g,k,n,v,x,E){g=null!=g?g:0;k=null!=k?k:0;var z=[];try{var G=
-this.editor.graph;if(null!=f&&0<f.length){G.model.beginUpdate();try{var F=mxUtils.parseXml(f);f={};var U=this.editor.extractGraphModel(F.documentElement,null!=this.pages);if(null!=U&&"mxfile"==U.nodeName&&null!=this.pages){var p=U.getElementsByTagName("diagram");if(1==p.length&&!x){if(U=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(f[p[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var u=p[0].getAttribute("name");null!=u&&""!=u&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,u))}}else if(0<p.length){x=[];var H=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(f[p[0].getAttribute("id")]=this.pages[0].getId(),U=Editor.parseDiagramNode(p[0]),n=!1,H=1);for(;H<p.length;H++){var K=p[H].getAttribute("id");p[H].removeAttribute("id");var N=this.updatePageRoot(new DiagramPage(p[H]));f[K]=p[H].getAttribute("id");var I=this.pages.length;null==N.getName()&&N.setName(mxResources.get("pageWithNumber",[I+1]));G.model.execute(new ChangePage(this,N,N,I,
-!0));x.push(N)}this.updatePageLinks(f,x)}}if(null!=U&&"mxGraphModel"===U.nodeName){z=G.importGraphModel(U,g,k,n);if(null!=z)for(H=0;H<z.length;H++)this.updatePageLinksForCell(f,z[H]);var L=G.parseBackgroundImage(U.getAttribute("backgroundImage"));if(null!=L&&null!=L.originalSrc){this.updateBackgroundPageLink(f,L);var Q=new ChangePageSetup(this,null,L);Q.ignoreColor=!0;G.model.execute(Q)}}E&&this.insertHandler(z,null,null,G.defaultVertexStyle,G.defaultEdgeStyle,!1,!0)}finally{G.model.endUpdate()}}}catch(P){if(v)throw P;
-this.handleError(P)}return z};EditorUi.prototype.updatePageLinks=function(f,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(f,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(f,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(f,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=f[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
-function(f,g){var k=document.createElement("div"),n=this.editor.graph,v=n.getLinkForCell(g);null!=v&&n.setLinkForCell(g,this.updatePageLink(f,v));if(n.isHtmlLabel(g)){k.innerHTML=n.sanitizeHtml(n.getLabel(g));for(var x=k.getElementsByTagName("a"),E=!1,z=0;z<x.length;z++)v=x[z].getAttribute("href"),null!=v&&(x[z].setAttribute("href",this.updatePageLink(f,v)),E=!0);E&&n.labelChanged(g,k.innerHTML)}for(z=0;z<n.model.getChildCount(g);z++)this.updatePageLinksForCell(f,n.model.getChildAt(g,z))};EditorUi.prototype.updatePageLink=
-function(f,g){if(Graph.isPageLink(g)){var k=f[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var v=0;v<n.actions.length;v++){var x=n.actions[v];if(null!=x.open&&Graph.isPageLink(x.open)){var E=x.open.substring(x.open.indexOf(",")+1);k=f[E];null!=k?x.open="data:page/id,"+k:null==this.getPageById(E)&&delete x.open}}g="data:action/json,"+JSON.stringify(n)}}catch(z){}return g};
-EditorUi.prototype.isRemoteVisioFormat=function(f){return/(\.v(sd|dx))($|\?)/i.test(f)||/(\.vs(s|x))($|\?)/i.test(f)};EditorUi.prototype.importVisio=function(f,g,k,n,v){n=null!=n?n:f.name;k=null!=k?k:mxUtils.bind(this,function(E){this.handleError(E)});var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var E=this.isRemoteVisioFormat(n);try{var z="UNKNOWN-VISIO",G=n.lastIndexOf(".");if(0<=G&&G<n.length)z=n.substring(G+1).toUpperCase();else{var F=n.lastIndexOf("/");0<=
-F&&F<n.length&&(n=n.substring(F+1))}EditorUi.logEvent({category:z+"-MS-IMPORT-FILE",action:"filename_"+n,label:E?"remote":"local"})}catch(p){}if(E)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{E=new FormData;E.append("file1",f,n);var U=new XMLHttpRequest;U.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));U.responseType="blob";this.addRemoteServiceSecurityCheck(U);
-null!=v&&U.setRequestHeader("x-convert-custom",v);U.onreadystatechange=mxUtils.bind(this,function(){if(4==U.readyState)if(200<=U.status&&299>=U.status)try{var p=U.response;if("text/xml"==p.type){var u=new FileReader;u.onload=mxUtils.bind(this,function(H){try{g(H.target.result)}catch(K){k({message:mxResources.get("errorLoadingFile")})}});u.readAsText(p)}else this.doImportVisio(p,g,k,n)}catch(H){k(H)}else try{""==U.responseType||"text"==U.responseType?k({message:U.responseText}):(u=new FileReader,u.onload=
-function(){k({message:JSON.parse(u.result).Message})},u.readAsText(U.response))}catch(H){k({})}});U.send(E)}else try{this.doImportVisio(f,g,k,n)}catch(p){k(p)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.importGraphML=function(f,g,k){k=null!=k?k:mxUtils.bind(this,function(v){this.handleError(v)});
-var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(f,g,k)}catch(v){k(v)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.exportVisio=function(f){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(f)||
-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(f,g,k){var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var v=
-JSON.parse(f);g(LucidImporter.importState(v));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+f.length}),null!=window.console&&"1"==urlParams.test){var x=[(new Date).toISOString(),"convertLucidChart",v];null!=v.state&&x.push(JSON.parse(v.state));if(null!=v.svgThumbs)for(var E=0;E<v.svgThumbs.length;E++)x.push(Editor.createSvgDataUri(v.svgThumbs[E]));null!=v.thumb&&x.push(v.thumb);console.log.apply(console,x)}}catch(z){}}catch(z){null!=window.console&&console.error(z),k(z)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(n,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",n)})})})}):mxscript("js/extensions.min.js",n))};EditorUi.prototype.generateMermaidImage=function(f,
-g,k,n){var v=this,x=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(),f,function(E){try{if(mxClient.IS_IE||mxClient.IS_IE11)E=E.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var z=mxUtils.parseXml(E).getElementsByTagName("svg");
-if(0<z.length){var G=parseFloat(z[0].getAttribute("width")),F=parseFloat(z[0].getAttribute("height"));if(isNaN(G)||isNaN(F))try{var U=z[0].getAttribute("viewBox").split(/\s+/);G=parseFloat(U[2]);F=parseFloat(U[3])}catch(p){G=G||100,F=F||100}k(v.convertDataUri(Editor.createSvgDataUri(E)),G,F)}else n({message:mxResources.get("invalidInput")})}catch(p){n(p)}})}catch(E){n(E)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?x():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-x):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generatePlantUmlImage=function(f,g,k,n){function v(z,G,F){c1=z>>2;c2=(z&3)<<4|G>>4;c3=(G&15)<<2|F>>6;c4=F&63;r="";r+=x(c1&63);r+=x(c2&63);r+=x(c3&63);return r+=x(c4&63)}function x(z){if(10>z)return String.fromCharCode(48+z);z-=10;if(26>z)return String.fromCharCode(65+z);z-=26;if(26>z)return String.fromCharCode(97+z);z-=26;return 0==z?"-":1==z?"_":"?"}var E=new XMLHttpRequest;E.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(z){r="";for(i=0;i<z.length;i+=3)r=i+2==z.length?r+v(z.charCodeAt(i),z.charCodeAt(i+1),0):i+1==z.length?r+v(z.charCodeAt(i),0,0):r+v(z.charCodeAt(i),z.charCodeAt(i+1),z.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(f))),!0);"txt"!=g&&(E.responseType="blob");E.onload=function(z){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var G=new FileReader;G.readAsDataURL(this.response);G.onloadend=function(F){var U=new Image;U.onload=
-function(){try{var p=U.width,u=U.height;if(0==p&&0==u){var H=G.result,K=H.indexOf(","),N=decodeURIComponent(escape(atob(H.substring(K+1)))),I=mxUtils.parseXml(N).getElementsByTagName("svg");0<I.length&&(p=parseFloat(I[0].getAttribute("width")),u=parseFloat(I[0].getAttribute("height")))}k(G.result,p,u)}catch(L){n(L)}};U.src=G.result};G.onerror=function(F){n(F)}}else n(z)};E.onerror=function(z){n(z)};E.send()};EditorUi.prototype.insertAsPreText=function(f,g,k){var n=this.editor.graph,v=null;n.getModel().beginUpdate();
-try{v=n.insertVertex(null,null,"<pre>"+f+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(v,!0)}finally{n.getModel().endUpdate()}return v};EditorUi.prototype.insertTextAt=function(f,g,k,n,v,x,E,z){x=null!=x?x:!0;E=null!=E?E:!0;if(null!=f)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(f.replace(/\s+/g," "),mxUtils.bind(this,function(u){4==
-u.readyState&&200<=u.status&&299>=u.status&&this.editor.graph.setSelectionCells(this.insertTextAt(u.responseText,g,k,!0))}));else if("data:"==f.substring(0,5)||!this.isOffline()&&(v||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f))){var G=this.editor.graph;if("data:application/pdf;base64,"==f.substring(0,28)){var F=Editor.extractGraphModelFromPdf(f);if(null!=F&&0<F.length)return this.importXml(F,g,k,x,!0,z)}if(Editor.isPngDataUrl(f)&&(F=Editor.extractGraphModelFromPng(f),null!=F&&0<F.length))return this.importXml(F,
-g,k,x,!0,z);if("data:image/svg+xml;"==f.substring(0,19))try{F=null;"data:image/svg+xml;base64,"==f.substring(0,26)?(F=f.substring(f.indexOf(",")+1),F=window.atob&&!mxClient.IS_SF?atob(F):Base64.decode(F,!0)):F=decodeURIComponent(f.substring(f.indexOf(",")+1));var U=this.importXml(F,g,k,x,!0,z);if(0<U.length)return U}catch(u){}this.loadImage(f,mxUtils.bind(this,function(u){if("data:"==f.substring(0,5))this.resizeImage(u,f,mxUtils.bind(this,function(N,I,L){G.setSelectionCell(G.insertVertex(null,null,
-"",G.snap(g),G.snap(k),I,L,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(N)+";"))}),E,this.maxImageSize);else{var H=Math.min(1,Math.min(this.maxImageSize/u.width,this.maxImageSize/u.height)),K=Math.round(u.width*H);u=Math.round(u.height*H);G.setSelectionCell(G.insertVertex(null,null,"",G.snap(g),G.snap(k),K,u,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-f+";"))}}),mxUtils.bind(this,function(){var u=null;G.getModel().beginUpdate();try{u=G.insertVertex(G.getDefaultParent(),null,f,G.snap(g),G.snap(k),1,1,"text;"+(n?"html=1;":"")),G.updateCellSize(u),G.fireEvent(new mxEventObject("textInserted","cells",[u]))}finally{G.getModel().endUpdate()}G.setSelectionCell(u)}))}else{f=Graph.zapGremlins(mxUtils.trim(f));if(this.isCompatibleString(f))return this.importXml(f,g,k,x,null,z);if(0<f.length)if(this.isLucidChartData(f))this.convertLucidChart(f,mxUtils.bind(this,
-function(u){this.editor.graph.setSelectionCells(this.importXml(u,g,k,x,null,z))}),mxUtils.bind(this,function(u){this.handleError(u)}));else{G=this.editor.graph;v=null;G.getModel().beginUpdate();try{v=G.insertVertex(G.getDefaultParent(),null,"",G.snap(g),G.snap(k),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));G.fireEvent(new mxEventObject("textInserted","cells",[v]));"<"==f.charAt(0)&&f.indexOf(">")==f.length-1&&(f=mxUtils.htmlEntities(f));f.length>this.maxTextBytes&&(f=f.substring(0,this.maxTextBytes)+
-"...");v.value=f;G.updateCellSize(v);if(0<this.maxTextWidth&&v.geometry.width>this.maxTextWidth){var p=G.getPreferredSizeForCell(v,this.maxTextWidth);v.geometry.width=p.width;v.geometry.height=p.height}Graph.isLink(v.value)&&G.setLinkForCell(v,v.value);v.geometry.width+=G.gridSize;v.geometry.height+=G.gridSize}finally{G.getModel().endUpdate()}return[v]}}return[]};EditorUi.prototype.formatFileSize=function(f){var g=-1;do f/=1024,g++;while(1024<f);return Math.max(f,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
-EditorUi.prototype.convertDataUri=function(f){if("data:"==f.substring(0,5)){var g=f.indexOf(";");0<g&&(f=f.substring(0,g)+f.substring(f.indexOf(",",g+1)))}return f};EditorUi.prototype.isRemoteFileFormat=function(f,g){return/("contentType":\s*"application\/gliffy\+json")/.test(f)};EditorUi.prototype.isLucidChartData=function(f){return null!=f&&('{"state":"{\\"Properties\\":'==f.substring(0,26)||'{"Properties":'==f.substring(0,14))};EditorUi.prototype.importLocalFile=function(f,g){if(f&&Graph.fileSupport){if(null==
+arguments)};document.body.appendChild(x.container);x.model.setRoot(F.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(U){try{null==z&&(z=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var p=U.toDataURL("image/png");p=Editor.writeGraphModelToPng(p,"tEXt","mxfile",encodeURIComponent(z));e(p.substring(p.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(v){null!=g&&g(v)}}),null,null,null,mxUtils.bind(this,function(U){null!=g&&
+g(U)}),null,null,q,null,x.shadowVisible,null,x,u,null,null,null,"diagram",null)}catch(U){null!=g&&g(U)}};EditorUi.prototype.getEmbeddedSvg=function(e,g,k,q,u,x,E,z,G,F,U,p,v){z=null!=z?z:!0;U=null!=U?U:0;E=null!=G?G:g.background;E==mxConstants.NONE&&(E=null);x=g.getSvg(E,F,U,null,null,x,null,null,null,g.shadowVisible||p,null,v,"diagram");(g.shadowVisible||p)&&g.addSvgShadow(x,null,null,0==U);null!=e&&x.setAttribute("content",e);null!=k&&x.setAttribute("resource",k);var H=mxUtils.bind(this,function(K){K=
+(q?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(K);null!=u&&u(K);return K});g.mathEnabled&&this.editor.addMathCss(x);if(null!=u)this.embedFonts(x,mxUtils.bind(this,function(K){z?this.editor.convertImages(K,mxUtils.bind(this,function(N){H(N)})):H(K)}));else return H(x)};EditorUi.prototype.embedFonts=function(e,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(e,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(e,k),g(e)}catch(q){g(e)}}))}catch(k){g(e)}}))};EditorUi.prototype.exportImage=function(e,g,k,q,u,x,E,z,G,F,U,p,v){G=null!=G?G:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var H=this.editor.graph.isSelectionEmpty();k=null!=k?k:H;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(K){this.spinner.stop();try{this.saveCanvas(K,
+u?this.getFileData(!0,null,null,null,k,z):null,G,null==this.pages||0==this.pages.length,U)}catch(N){this.handleError(N)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}),null,k,e||1,g,q,null,null,x,E,F,p,v)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(e){return this.editor.isCorsEnabledForUrl(e)};EditorUi.prototype.importXml=function(e,g,k,q,u,x,E){g=null!=g?g:0;k=null!=k?k:0;var z=[];try{var G=
+this.editor.graph;if(null!=e&&0<e.length){G.model.beginUpdate();try{var F=mxUtils.parseXml(e);e={};var U=this.editor.extractGraphModel(F.documentElement,null!=this.pages);if(null!=U&&"mxfile"==U.nodeName&&null!=this.pages){var p=U.getElementsByTagName("diagram");if(1==p.length&&!x){if(U=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(e[p[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var v=p[0].getAttribute("name");null!=v&&""!=v&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,v))}}else if(0<p.length){x=[];var H=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(e[p[0].getAttribute("id")]=this.pages[0].getId(),U=Editor.parseDiagramNode(p[0]),q=!1,H=1);for(;H<p.length;H++){var K=p[H].getAttribute("id");p[H].removeAttribute("id");var N=this.updatePageRoot(new DiagramPage(p[H]));e[K]=p[H].getAttribute("id");var I=this.pages.length;null==N.getName()&&N.setName(mxResources.get("pageWithNumber",[I+1]));G.model.execute(new ChangePage(this,N,N,I,
+!0));x.push(N)}this.updatePageLinks(e,x)}}if(null!=U&&"mxGraphModel"===U.nodeName){z=G.importGraphModel(U,g,k,q);if(null!=z)for(H=0;H<z.length;H++)this.updatePageLinksForCell(e,z[H]);var L=G.parseBackgroundImage(U.getAttribute("backgroundImage"));if(null!=L&&null!=L.originalSrc){this.updateBackgroundPageLink(e,L);var Q=new ChangePageSetup(this,null,L);Q.ignoreColor=!0;G.model.execute(Q)}}E&&this.insertHandler(z,null,null,G.defaultVertexStyle,G.defaultEdgeStyle,!1,!0)}finally{G.model.endUpdate()}}}catch(P){if(u)throw P;
+this.handleError(P)}return z};EditorUi.prototype.updatePageLinks=function(e,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(e,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(e,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(e,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=e[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(q){}};EditorUi.prototype.updatePageLinksForCell=
+function(e,g){var k=document.createElement("div"),q=this.editor.graph,u=q.getLinkForCell(g);null!=u&&q.setLinkForCell(g,this.updatePageLink(e,u));if(q.isHtmlLabel(g)){k.innerHTML=q.sanitizeHtml(q.getLabel(g));for(var x=k.getElementsByTagName("a"),E=!1,z=0;z<x.length;z++)u=x[z].getAttribute("href"),null!=u&&(x[z].setAttribute("href",this.updatePageLink(e,u)),E=!0);E&&q.labelChanged(g,k.innerHTML)}for(z=0;z<q.model.getChildCount(g);z++)this.updatePageLinksForCell(e,q.model.getChildAt(g,z))};EditorUi.prototype.updatePageLink=
+function(e,g){if(Graph.isPageLink(g)){var k=e[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var q=JSON.parse(g.substring(17));if(null!=q.actions){for(var u=0;u<q.actions.length;u++){var x=q.actions[u];if(null!=x.open&&Graph.isPageLink(x.open)){var E=x.open.substring(x.open.indexOf(",")+1);k=e[E];null!=k?x.open="data:page/id,"+k:null==this.getPageById(E)&&delete x.open}}g="data:action/json,"+JSON.stringify(q)}}catch(z){}return g};
+EditorUi.prototype.isRemoteVisioFormat=function(e){return/(\.v(sd|dx))($|\?)/i.test(e)||/(\.vs(s|x))($|\?)/i.test(e)};EditorUi.prototype.importVisio=function(e,g,k,q,u){q=null!=q?q:e.name;k=null!=k?k:mxUtils.bind(this,function(E){this.handleError(E)});var x=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var E=this.isRemoteVisioFormat(q);try{var z="UNKNOWN-VISIO",G=q.lastIndexOf(".");if(0<=G&&G<q.length)z=q.substring(G+1).toUpperCase();else{var F=q.lastIndexOf("/");0<=
+F&&F<q.length&&(q=q.substring(F+1))}EditorUi.logEvent({category:z+"-MS-IMPORT-FILE",action:"filename_"+q,label:E?"remote":"local"})}catch(p){}if(E)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{E=new FormData;E.append("file1",e,q);var U=new XMLHttpRequest;U.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(q)?"?stencil=1":""));U.responseType="blob";this.addRemoteServiceSecurityCheck(U);
+null!=u&&U.setRequestHeader("x-convert-custom",u);U.onreadystatechange=mxUtils.bind(this,function(){if(4==U.readyState)if(200<=U.status&&299>=U.status)try{var p=U.response;if("text/xml"==p.type){var v=new FileReader;v.onload=mxUtils.bind(this,function(H){try{g(H.target.result)}catch(K){k({message:mxResources.get("errorLoadingFile")})}});v.readAsText(p)}else this.doImportVisio(p,g,k,q)}catch(H){k(H)}else try{""==U.responseType||"text"==U.responseType?k({message:U.responseText}):(v=new FileReader,v.onload=
+function(){k({message:JSON.parse(v.result).Message})},v.readAsText(U.response))}catch(H){k({})}});U.send(E)}else try{this.doImportVisio(e,g,k,q)}catch(p){k(p)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.importGraphML=function(e,g,k){k=null!=k?k:mxUtils.bind(this,function(u){this.handleError(u)});
+var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(e,g,k)}catch(u){k(u)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.exportVisio=function(e){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(e)||
+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(e,g,k){var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var u=
+JSON.parse(e);g(LucidImporter.importState(u));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+e.length}),null!=window.console&&"1"==urlParams.test){var x=[(new Date).toISOString(),"convertLucidChart",u];null!=u.state&&x.push(JSON.parse(u.state));if(null!=u.svgThumbs)for(var E=0;E<u.svgThumbs.length;E++)x.push(Editor.createSvgDataUri(u.svgThumbs[E]));null!=u.thumb&&x.push(u.thumb);console.log.apply(console,x)}}catch(z){}}catch(z){null!=window.console&&console.error(z),k(z)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});
+"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(q,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",q)})})})}):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generateMermaidImage=function(e,
+g,k,q){var u=this,x=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(),e,function(E){try{if(mxClient.IS_IE||mxClient.IS_IE11)E=E.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var z=mxUtils.parseXml(E).getElementsByTagName("svg");
+if(0<z.length){var G=parseFloat(z[0].getAttribute("width")),F=parseFloat(z[0].getAttribute("height"));if(isNaN(G)||isNaN(F))try{var U=z[0].getAttribute("viewBox").split(/\s+/);G=parseFloat(U[2]);F=parseFloat(U[3])}catch(p){G=G||100,F=F||100}k(u.convertDataUri(Editor.createSvgDataUri(E)),G,F)}else q({message:mxResources.get("invalidInput")})}catch(p){q(p)}})}catch(E){q(E)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?x():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+x):mxscript("js/extensions.min.js",x))};EditorUi.prototype.generatePlantUmlImage=function(e,g,k,q){function u(z,G,F){c1=z>>2;c2=(z&3)<<4|G>>4;c3=(G&15)<<2|F>>6;c4=F&63;r="";r+=x(c1&63);r+=x(c2&63);r+=x(c3&63);return r+=x(c4&63)}function x(z){if(10>z)return String.fromCharCode(48+z);z-=10;if(26>z)return String.fromCharCode(65+z);z-=26;if(26>z)return String.fromCharCode(97+z);z-=26;return 0==z?"-":1==z?"_":"?"}var E=new XMLHttpRequest;E.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(z){r="";for(i=0;i<z.length;i+=3)r=i+2==z.length?r+u(z.charCodeAt(i),z.charCodeAt(i+1),0):i+1==z.length?r+u(z.charCodeAt(i),0,0):r+u(z.charCodeAt(i),z.charCodeAt(i+1),z.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(e))),!0);"txt"!=g&&(E.responseType="blob");E.onload=function(z){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var G=new FileReader;G.readAsDataURL(this.response);G.onloadend=function(F){var U=new Image;U.onload=
+function(){try{var p=U.width,v=U.height;if(0==p&&0==v){var H=G.result,K=H.indexOf(","),N=decodeURIComponent(escape(atob(H.substring(K+1)))),I=mxUtils.parseXml(N).getElementsByTagName("svg");0<I.length&&(p=parseFloat(I[0].getAttribute("width")),v=parseFloat(I[0].getAttribute("height")))}k(G.result,p,v)}catch(L){q(L)}};U.src=G.result};G.onerror=function(F){q(F)}}else q(z)};E.onerror=function(z){q(z)};E.send()};EditorUi.prototype.insertAsPreText=function(e,g,k){var q=this.editor.graph,u=null;q.getModel().beginUpdate();
+try{u=q.insertVertex(null,null,"<pre>"+e+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),q.updateCellSize(u,!0)}finally{q.getModel().endUpdate()}return u};EditorUi.prototype.insertTextAt=function(e,g,k,q,u,x,E,z){x=null!=x?x:!0;E=null!=E?E:!0;if(null!=e)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(e.replace(/\s+/g," "),mxUtils.bind(this,function(v){4==
+v.readyState&&200<=v.status&&299>=v.status&&this.editor.graph.setSelectionCells(this.insertTextAt(v.responseText,g,k,!0))}));else if("data:"==e.substring(0,5)||!this.isOffline()&&(u||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e))){var G=this.editor.graph;if("data:application/pdf;base64,"==e.substring(0,28)){var F=Editor.extractGraphModelFromPdf(e);if(null!=F&&0<F.length)return this.importXml(F,g,k,x,!0,z)}if(Editor.isPngDataUrl(e)&&(F=Editor.extractGraphModelFromPng(e),null!=F&&0<F.length))return this.importXml(F,
+g,k,x,!0,z);if("data:image/svg+xml;"==e.substring(0,19))try{F=null;"data:image/svg+xml;base64,"==e.substring(0,26)?(F=e.substring(e.indexOf(",")+1),F=window.atob&&!mxClient.IS_SF?atob(F):Base64.decode(F,!0)):F=decodeURIComponent(e.substring(e.indexOf(",")+1));var U=this.importXml(F,g,k,x,!0,z);if(0<U.length)return U}catch(v){}this.loadImage(e,mxUtils.bind(this,function(v){if("data:"==e.substring(0,5))this.resizeImage(v,e,mxUtils.bind(this,function(N,I,L){G.setSelectionCell(G.insertVertex(null,null,
+"",G.snap(g),G.snap(k),I,L,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(N)+";"))}),E,this.maxImageSize);else{var H=Math.min(1,Math.min(this.maxImageSize/v.width,this.maxImageSize/v.height)),K=Math.round(v.width*H);v=Math.round(v.height*H);G.setSelectionCell(G.insertVertex(null,null,"",G.snap(g),G.snap(k),K,v,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+e+";"))}}),mxUtils.bind(this,function(){var v=null;G.getModel().beginUpdate();try{v=G.insertVertex(G.getDefaultParent(),null,e,G.snap(g),G.snap(k),1,1,"text;"+(q?"html=1;":"")),G.updateCellSize(v),G.fireEvent(new mxEventObject("textInserted","cells",[v]))}finally{G.getModel().endUpdate()}G.setSelectionCell(v)}))}else{e=Graph.zapGremlins(mxUtils.trim(e));if(this.isCompatibleString(e))return this.importXml(e,g,k,x,null,z);if(0<e.length)if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,
+function(v){this.editor.graph.setSelectionCells(this.importXml(v,g,k,x,null,z))}),mxUtils.bind(this,function(v){this.handleError(v)}));else{G=this.editor.graph;u=null;G.getModel().beginUpdate();try{u=G.insertVertex(G.getDefaultParent(),null,"",G.snap(g),G.snap(k),1,1,"text;whiteSpace=wrap;"+(q?"html=1;":""));G.fireEvent(new mxEventObject("textInserted","cells",[u]));"<"==e.charAt(0)&&e.indexOf(">")==e.length-1&&(e=mxUtils.htmlEntities(e));e.length>this.maxTextBytes&&(e=e.substring(0,this.maxTextBytes)+
+"...");u.value=e;G.updateCellSize(u);if(0<this.maxTextWidth&&u.geometry.width>this.maxTextWidth){var p=G.getPreferredSizeForCell(u,this.maxTextWidth);u.geometry.width=p.width;u.geometry.height=p.height}Graph.isLink(u.value)&&G.setLinkForCell(u,u.value);u.geometry.width+=G.gridSize;u.geometry.height+=G.gridSize}finally{G.getModel().endUpdate()}return[u]}}return[]};EditorUi.prototype.formatFileSize=function(e){var g=-1;do e/=1024,g++;while(1024<e);return Math.max(e,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
+EditorUi.prototype.convertDataUri=function(e){if("data:"==e.substring(0,5)){var g=e.indexOf(";");0<g&&(e=e.substring(0,g)+e.substring(e.indexOf(",",g+1)))}return e};EditorUi.prototype.isRemoteFileFormat=function(e,g){return/("contentType":\s*"application\/gliffy\+json")/.test(e)};EditorUi.prototype.isLucidChartData=function(e){return null!=e&&('{"state":"{\\"Properties\\":'==e.substring(0,26)||'{"Properties":'==e.substring(0,14))};EditorUi.prototype.importLocalFile=function(e,g){if(e&&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(E,z){StorageFile.listFiles(this,
-"F",E,z)});window.openBrowserFile=mxUtils.bind(this,function(E,z,G){StorageFile.getFileContent(this,E,z,G)});window.deleteBrowserFile=mxUtils.bind(this,function(E,z,G){StorageFile.deleteFile(this,E,z,G)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!f}window.openFile=new OpenFile(mxUtils.bind(this,function(E){this.hideDialog(E)}));window.openFile.setConsumer(mxUtils.bind(this,function(E,z){null!=z&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(z)?(E=new Blob([E],{type:"application/octet-stream"}),
-this.importVisio(E,mxUtils.bind(this,function(G){this.importXml(G,0,0,!0)}),null,z)):this.editor.graph.setSelectionCells(this.importXml(E,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 v=this.dialog,x=v.close;this.dialog.close=mxUtils.bind(this,function(E){Editor.useLocalStorage=n;x.apply(v,arguments);E&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(f,g,k){var n=this,v=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(f).then(function(x){if(mxUtils.isEmptyObject(x.files))k();else{var E=0,z,G=!1;x.forEach(function(F,U){F=U.name.toLowerCase();"diagram/diagram.xml"==F?(G=!0,U.async("string").then(function(p){0==p.indexOf("<mxfile ")?g(p):k()})):0==F.indexOf("versions/")&&(F=parseInt(F.substr(9)),F>E&&(E=F,z=U))});0<E?z.async("string").then(function(F){(new XMLHttpRequest).upload&&
-n.isRemoteFileFormat(F,f.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):n.parseFileData(F,mxUtils.bind(this,function(U){4==U.readyState&&(200<=U.status&&299>=U.status?g(U.responseText):k())}),f.name):k()}):G||k()}},function(x){k(x)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?v():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",v))};EditorUi.prototype.importFile=function(f,g,k,n,v,x,E,z,G,F,U,p){F=null!=
-F?F:!0;var u=!1,H=null,K=mxUtils.bind(this,function(N){var I=null;null!=N&&"<mxlibrary"==N.substring(0,10)?this.loadLibrary(new LocalLibrary(this,N,E)):I=this.importXml(N,k,n,F,null,null!=p?mxEvent.isControlDown(p):null);null!=z&&z(I)});"image"==g.substring(0,5)?(G=!1,"image/png"==g.substring(0,9)&&(g=U?null:this.extractGraphModelFromPng(f),null!=g&&0<g.length&&(H=this.importXml(g,k,n,F,null,null!=p?mxEvent.isControlDown(p):null),G=!0)),G||(g=this.editor.graph,G=f.indexOf(";"),0<G&&(f=f.substring(0,
-G)+f.substring(f.indexOf(",",G+1))),F&&g.isGridEnabled()&&(k=g.snap(k),n=g.snap(n)),H=[g.insertVertex(null,null,"",k,n,v,x,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+f+";")])):/(\.*<graphml )/.test(f)?(u=!0,this.importGraphML(f,K)):null!=G&&null!=E&&(/(\.v(dx|sdx?))($|\?)/i.test(E)||/(\.vs(x|sx?))($|\?)/i.test(E))?(u=!0,this.importVisio(G,K)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,E)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(u=!0,v=mxUtils.bind(this,function(N){4==N.readyState&&(200<=N.status&&299>=N.status?K(N.responseText):null!=z&&z(null))}),null!=f?this.parseFileData(f,v,E):this.parseFile(G,v,E)):0==f.indexOf("PK")&&null!=G?(u=!0,this.importZipFile(G,K,mxUtils.bind(this,function(){H=this.insertTextAt(this.validateFileData(f),k,n,!0,null,F);z(H)}))):/(\.v(sd|dx))($|\?)/i.test(E)||/(\.vs(s|x))($|\?)/i.test(E)||(H=this.insertTextAt(this.validateFileData(f),
-k,n,!0,null,F,null,null!=p?mxEvent.isControlDown(p):null));u||null==z||z(H);return H};EditorUi.prototype.importFiles=function(f,g,k,n,v,x,E,z,G,F,U,p,u){n=null!=n?n:this.maxImageSize;F=null!=F?F:this.maxImageBytes;var H=null!=g&&null!=k,K=!0;g=null!=g?g:0;k=null!=k?k:0;var N=!1;if(!mxClient.IS_CHROMEAPP&&null!=f)for(var I=U||this.resampleThreshold,L=0;L<f.length;L++)if("image/svg"!==f[L].type.substring(0,9)&&"image/"===f[L].type.substring(0,6)&&f[L].size>I){N=!0;break}var Q=mxUtils.bind(this,function(){var P=
-this.editor.graph,V=P.gridSize;v=null!=v?v:mxUtils.bind(this,function(O,R,S,X,Y,aa,ba,da,Z){try{return null!=O&&"<mxlibrary"==O.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,O,ba)),null):"atlassian"!=this.getServiceName()&&"1"!=urlParams.embed&&this.isCompatibleString(O)&&1==f.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,O,ba,!0)),null):this.importFile(O,R,S,X,Y,aa,ba,da,Z,H,p,u)}catch(ia){return this.handleError(ia),
-null}});x=null!=x?x:mxUtils.bind(this,function(O){P.setSelectionCells(O)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var W=f.length,q=W,D=[],M=mxUtils.bind(this,function(O,R){D[O]=R;if(0==--q){this.spinner.stop();if(null!=z)z(D);else{var S=[];P.getModel().beginUpdate();try{for(O=0;O<D.length;O++){var X=D[O]();null!=X&&(S=S.concat(X))}}finally{P.getModel().endUpdate()}}x(S)}}),T=0;T<W;T++)mxUtils.bind(this,function(O){var R=f[O];if(null!=R){var S=new FileReader;S.onload=mxUtils.bind(this,
-function(X){if(null==E||E(R))if("image/"==R.type.substring(0,6))if("image/svg"==R.type.substring(0,9)){var Y=Graph.clipSvgDataUri(X.target.result),aa=Y.indexOf(",");aa=decodeURIComponent(escape(atob(Y.substring(aa+1))));var ba=mxUtils.parseXml(aa);aa=ba.getElementsByTagName("svg");if(0<aa.length){aa=aa[0];var da=p?null:aa.getAttribute("content");null!=da&&"<"!=da.charAt(0)&&"%"!=da.charAt(0)&&(da=unescape(window.atob?atob(da):Base64.decode(da,!0)));null!=da&&"%"==da.charAt(0)&&(da=decodeURIComponent(da));
-null==da||"<mxfile "!==da.substring(0,8)&&"<mxGraphModel "!==da.substring(0,14)?M(O,mxUtils.bind(this,function(){try{if(null!=ba){var ea=ba.getElementsByTagName("svg");if(0<ea.length){var va=ea[0],za=va.getAttribute("width"),ya=va.getAttribute("height");za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;ya=null!=ya&&"%"!=ya.charAt(ya.length-1)?parseFloat(ya):NaN;var ua=va.getAttribute("viewBox");if(null==ua||0==ua.length)va.setAttribute("viewBox","0 0 "+za+" "+ya);else if(isNaN(za)||isNaN(ya)){var ca=
-ua.split(" ");3<ca.length&&(za=parseFloat(ca[2]),ya=parseFloat(ca[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(va));var Na=Math.min(1,Math.min(n/Math.max(1,za)),n/Math.max(1,ya)),Ka=v(Y,R.type,g+O*V,k+O*V,Math.max(1,Math.round(za*Na)),Math.max(1,Math.round(ya*Na)),R.name);if(isNaN(za)||isNaN(ya)){var Ba=new Image;Ba.onload=mxUtils.bind(this,function(){za=Math.max(1,Ba.width);ya=Math.max(1,Ba.height);Ka[0].geometry.width=za;Ka[0].geometry.height=ya;va.setAttribute("viewBox","0 0 "+za+" "+ya);Y=Editor.createSvgDataUri(mxUtils.getXml(va));
-var Fa=Y.indexOf(";");0<Fa&&(Y=Y.substring(0,Fa)+Y.substring(Y.indexOf(",",Fa+1)));P.setCellStyles("image",Y,[Ka[0]])});Ba.src=Editor.createSvgDataUri(mxUtils.getXml(va))}return Ka}}}catch(Fa){}return null})):M(O,mxUtils.bind(this,function(){return v(da,"text/xml",g+O*V,k+O*V,0,0,R.name)}))}else M(O,mxUtils.bind(this,function(){return null}))}else{aa=!1;if("image/png"==R.type){var Z=p?null:this.extractGraphModelFromPng(X.target.result);if(null!=Z&&0<Z.length){var ia=new Image;ia.src=X.target.result;
-M(O,mxUtils.bind(this,function(){return v(Z,"text/xml",g+O*V,k+O*V,ia.width,ia.height,R.name)}));aa=!0}}aa||(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(X.target.result,mxUtils.bind(this,function(ea){this.resizeImage(ea,X.target.result,mxUtils.bind(this,
-function(va,za,ya){M(O,mxUtils.bind(this,function(){if(null!=va&&va.length<F){var ua=K&&this.isResampleImageSize(R.size,U)?Math.min(1,Math.min(n/za,n/ya)):1;return v(va,R.type,g+O*V,k+O*V,Math.round(za*ua),Math.round(ya*ua),R.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),K,n,U,R.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=X.target.result,v(Y,R.type,g+O*V,k+O*V,240,160,R.name,function(ea){M(O,
-function(){return ea})},R)});/(\.v(dx|sdx?))($|\?)/i.test(R.name)||/(\.vs(x|sx?))($|\?)/i.test(R.name)?v(null,R.type,g+O*V,k+O*V,240,160,R.name,function(X){M(O,function(){return X})},R):"image"==R.type.substring(0,5)||"application/pdf"==R.type?S.readAsDataURL(R):S.readAsText(R)}})(T)});if(N){N=[];for(L=0;L<f.length;L++)N.push(f[L]);f=N;this.confirmImageResize(function(P){K=P;Q()},G)}else Q()};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(f,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,v=function(x,E){if(x||g)mxSettings.setResizeImages(x?E:null),mxSettings.save();k();f(E)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(x){v(x,!0)},function(x){v(x,
-!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):v(!1,n)};EditorUi.prototype.parseFile=function(f,g,k){k=null!=k?k:f.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,k)});n.readAsText(f)};EditorUi.prototype.parseFileData=
-function(f,g,k){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){g(n)};n.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(f));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(v){}};EditorUi.prototype.isResampleImageSize=function(f,g){g=null!=g?g:this.resampleThreshold;return f>g};EditorUi.prototype.resizeImage=function(f,g,k,n,v,x,
-E){v=null!=v?v:this.maxImageSize;var z=Math.max(1,f.width),G=Math.max(1,f.height);if(n&&this.isResampleImageSize(null!=E?E:g.length,x))try{var F=Math.max(z/v,G/v);if(1<F){var U=Math.round(z/F),p=Math.round(G/F),u=document.createElement("canvas");u.width=U;u.height=p;u.getContext("2d").drawImage(f,0,0,U,p);var H=u.toDataURL();if(H.length<g.length){var K=document.createElement("canvas");K.width=U;K.height=p;var N=K.toDataURL();H!==N&&(g=H,z=U,G=p)}}}catch(I){}k(g,z,G)};EditorUi.prototype.extractGraphModelFromPng=
-function(f){return Editor.extractGraphModelFromPng(f)};EditorUi.prototype.loadImage=function(f,g,k){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=k&&(n.onerror=k);n.src=f}catch(v){if(null!=k)k(v);else throw v;}};EditorUi.prototype.getDefaultSketchMode=function(){var f="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:f)};var l=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 f=this,g=this.editor.graph;Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(I){var L=I.getEvent();
-return null==I.getState()&&!mxEvent.isMouseEvent(L)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(L)&&(null==I.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))});g.cellEditor.editPlantUmlData=function(I,L,Q){var P=JSON.parse(Q);L=new TextareaDialog(f,mxResources.get("plantUml")+":",P.data,function(V){null!=V&&f.spinner.spin(document.body,mxResources.get("inserting"))&&f.generatePlantUmlImage(V,P.format,function(W,q,D){f.spinner.stop();g.getModel().beginUpdate();try{if("txt"==P.format)g.labelChanged(I,
-"<pre>"+W+"</pre>"),g.updateCellSize(I,!0);else{g.setCellStyles("image",f.convertDataUri(W),[I]);var M=g.model.getGeometry(I);null!=M&&(M=M.clone(),M.width=q,M.height=D,g.cellsResized([I],[M],!1))}g.setAttributeForCell(I,"plantUmlData",JSON.stringify({data:V,format:P.format}))}finally{g.getModel().endUpdate()}},function(W){f.handleError(W)})},null,null,400,220);f.showDialog(L.container,420,300,!0,!0);L.init()};g.cellEditor.editMermaidData=function(I,L,Q){var P=JSON.parse(Q);L=new TextareaDialog(f,
-mxResources.get("mermaid")+":",P.data,function(V){null!=V&&f.spinner.spin(document.body,mxResources.get("inserting"))&&f.generateMermaidImage(V,P.config,function(W,q,D){f.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",W,[I]);var M=g.model.getGeometry(I);null!=M&&(M=M.clone(),M.width=Math.max(M.width,q),M.height=Math.max(M.height,D),g.cellsResized([I],[M],!1));g.setAttributeForCell(I,"mermaidData",JSON.stringify({data:V,config:P.config},null,2))}finally{g.getModel().endUpdate()}},
-function(W){f.handleError(W)})},null,null,400,220);f.showDialog(L.container,420,300,!0,!0);L.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(I,L){try{var Q=this.graph.getAttributeForCell(I,"plantUmlData");if(null!=Q)this.editPlantUmlData(I,L,Q);else if(Q=this.graph.getAttributeForCell(I,"mermaidData"),null!=Q)this.editMermaidData(I,L,Q);else{var P=g.getCellStyle(I);"1"==mxUtils.getValue(P,"metaEdit","0")?f.showDataDialog(I):k.apply(this,arguments)}}catch(V){f.handleError(V)}};
-g.getLinkTitle=function(I){return f.getLinkTitle(I)};g.customLinkClicked=function(I){var L=!1;try{f.handleCustomLink(I),L=!0}catch(Q){f.handleError(Q)}return L};var n=g.parseBackgroundImage;g.parseBackgroundImage=function(I){var L=n.apply(this,arguments);null!=L&&null!=L.src&&Graph.isPageLink(L.src)&&(L={originalSrc:L.src});return L};var v=g.setBackgroundImage;g.setBackgroundImage=function(I){null!=I&&null!=I.originalSrc&&(I=f.createImageForPageLink(I.originalSrc,f.currentPage,this));v.apply(this,
+"F",E,z)});window.openBrowserFile=mxUtils.bind(this,function(E,z,G){StorageFile.getFileContent(this,E,z,G)});window.deleteBrowserFile=mxUtils.bind(this,function(E,z,G){StorageFile.deleteFile(this,E,z,G)});if(!g){var q=Editor.useLocalStorage;Editor.useLocalStorage=!e}window.openFile=new OpenFile(mxUtils.bind(this,function(E){this.hideDialog(E)}));window.openFile.setConsumer(mxUtils.bind(this,function(E,z){null!=z&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(z)?(E=new Blob([E],{type:"application/octet-stream"}),
+this.importVisio(E,mxUtils.bind(this,function(G){this.importXml(G,0,0,!0)}),null,z)):this.editor.graph.setSelectionCells(this.importXml(E,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 u=this.dialog,x=u.close;this.dialog.close=mxUtils.bind(this,function(E){Editor.useLocalStorage=q;x.apply(u,arguments);E&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(e,g,k){var q=this,u=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(e).then(function(x){if(mxUtils.isEmptyObject(x.files))k();else{var E=0,z,G=!1;x.forEach(function(F,U){F=U.name.toLowerCase();"diagram/diagram.xml"==F?(G=!0,U.async("string").then(function(p){0==p.indexOf("<mxfile ")?g(p):k()})):0==F.indexOf("versions/")&&(F=parseInt(F.substr(9)),F>E&&(E=F,z=U))});0<E?z.async("string").then(function(F){(new XMLHttpRequest).upload&&
+q.isRemoteFileFormat(F,e.name)?q.isOffline()?q.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):q.parseFileData(F,mxUtils.bind(this,function(U){4==U.readyState&&(200<=U.status&&299>=U.status?g(U.responseText):k())}),e.name):k()}):G||k()}},function(x){k(x)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.importFile=function(e,g,k,q,u,x,E,z,G,F,U,p){F=null!=
+F?F:!0;var v=!1,H=null,K=mxUtils.bind(this,function(N){var I=null;null!=N&&"<mxlibrary"==N.substring(0,10)?this.loadLibrary(new LocalLibrary(this,N,E)):I=this.importXml(N,k,q,F,null,null!=p?mxEvent.isControlDown(p):null);null!=z&&z(I)});"image"==g.substring(0,5)?(G=!1,"image/png"==g.substring(0,9)&&(g=U?null:this.extractGraphModelFromPng(e),null!=g&&0<g.length&&(H=this.importXml(g,k,q,F,null,null!=p?mxEvent.isControlDown(p):null),G=!0)),G||(g=this.editor.graph,G=e.indexOf(";"),0<G&&(e=e.substring(0,
+G)+e.substring(e.indexOf(",",G+1))),F&&g.isGridEnabled()&&(k=g.snap(k),q=g.snap(q)),H=[g.insertVertex(null,null,"",k,q,u,x,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+e+";")])):/(\.*<graphml )/.test(e)?(v=!0,this.importGraphML(e,K)):null!=G&&null!=E&&(/(\.v(dx|sdx?))($|\?)/i.test(E)||/(\.vs(x|sx?))($|\?)/i.test(E))?(v=!0,this.importVisio(G,K)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,E)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(v=!0,u=mxUtils.bind(this,function(N){4==N.readyState&&(200<=N.status&&299>=N.status?K(N.responseText):null!=z&&(z(null),this.showError(mxResources.get("error"),413==N.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=e?this.parseFileData(e,u,E):this.parseFile(G,u,E)):0==e.indexOf("PK")&&null!=G?(v=!0,this.importZipFile(G,K,mxUtils.bind(this,function(){H=this.insertTextAt(this.validateFileData(e),
+k,q,!0,null,F);z(H)}))):/(\.v(sd|dx))($|\?)/i.test(E)||/(\.vs(s|x))($|\?)/i.test(E)||(H=this.insertTextAt(this.validateFileData(e),k,q,!0,null,F,null,null!=p?mxEvent.isControlDown(p):null));v||null==z||z(H);return H};EditorUi.prototype.importFiles=function(e,g,k,q,u,x,E,z,G,F,U,p,v){q=null!=q?q:this.maxImageSize;F=null!=F?F:this.maxImageBytes;var H=null!=g&&null!=k,K=!0;g=null!=g?g:0;k=null!=k?k:0;var N=!1;if(!mxClient.IS_CHROMEAPP&&null!=e)for(var I=U||this.resampleThreshold,L=0;L<e.length;L++)if("image/svg"!==
+e[L].type.substring(0,9)&&"image/"===e[L].type.substring(0,6)&&e[L].size>I){N=!0;break}var Q=mxUtils.bind(this,function(){var P=this.editor.graph,V=P.gridSize;u=null!=u?u:mxUtils.bind(this,function(O,R,S,X,Y,aa,ba,da,Z){try{return null!=O&&"<mxlibrary"==O.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,O,ba)),null):"atlassian"!=this.getServiceName()&&"1"!=urlParams.embed&&this.isCompatibleString(O)&&1==e.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),
+this.fileLoaded(new LocalFile(this,O,ba,!0)),null):this.importFile(O,R,S,X,Y,aa,ba,da,Z,H,p,v)}catch(ia){return this.handleError(ia),null}});x=null!=x?x:mxUtils.bind(this,function(O){P.setSelectionCells(O)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var W=e.length,n=W,D=[],M=mxUtils.bind(this,function(O,R){D[O]=R;if(0==--n){this.spinner.stop();if(null!=z)z(D);else{var S=[];P.getModel().beginUpdate();try{for(O=0;O<D.length;O++){var X=D[O]();null!=X&&(S=S.concat(X))}}finally{P.getModel().endUpdate()}}x(S)}}),
+T=0;T<W;T++)mxUtils.bind(this,function(O){var R=e[O];if(null!=R){var S=new FileReader;S.onload=mxUtils.bind(this,function(X){if(null==E||E(R))if("image/"==R.type.substring(0,6))if("image/svg"==R.type.substring(0,9)){var Y=Graph.clipSvgDataUri(X.target.result),aa=Y.indexOf(",");aa=decodeURIComponent(escape(atob(Y.substring(aa+1))));var ba=mxUtils.parseXml(aa);aa=ba.getElementsByTagName("svg");if(0<aa.length){aa=aa[0];var da=p?null:aa.getAttribute("content");null!=da&&"<"!=da.charAt(0)&&"%"!=da.charAt(0)&&
+(da=unescape(window.atob?atob(da):Base64.decode(da,!0)));null!=da&&"%"==da.charAt(0)&&(da=decodeURIComponent(da));null==da||"<mxfile "!==da.substring(0,8)&&"<mxGraphModel "!==da.substring(0,14)?M(O,mxUtils.bind(this,function(){try{if(null!=ba){var ea=ba.getElementsByTagName("svg");if(0<ea.length){var va=ea[0],za=va.getAttribute("width"),ya=va.getAttribute("height");za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;ya=null!=ya&&"%"!=ya.charAt(ya.length-1)?parseFloat(ya):NaN;var ua=va.getAttribute("viewBox");
+if(null==ua||0==ua.length)va.setAttribute("viewBox","0 0 "+za+" "+ya);else if(isNaN(za)||isNaN(ya)){var ca=ua.split(" ");3<ca.length&&(za=parseFloat(ca[2]),ya=parseFloat(ca[3]))}Y=Editor.createSvgDataUri(mxUtils.getXml(va));var Na=Math.min(1,Math.min(q/Math.max(1,za)),q/Math.max(1,ya)),Ka=u(Y,R.type,g+O*V,k+O*V,Math.max(1,Math.round(za*Na)),Math.max(1,Math.round(ya*Na)),R.name);if(isNaN(za)||isNaN(ya)){var Ba=new Image;Ba.onload=mxUtils.bind(this,function(){za=Math.max(1,Ba.width);ya=Math.max(1,Ba.height);
+Ka[0].geometry.width=za;Ka[0].geometry.height=ya;va.setAttribute("viewBox","0 0 "+za+" "+ya);Y=Editor.createSvgDataUri(mxUtils.getXml(va));var Fa=Y.indexOf(";");0<Fa&&(Y=Y.substring(0,Fa)+Y.substring(Y.indexOf(",",Fa+1)));P.setCellStyles("image",Y,[Ka[0]])});Ba.src=Editor.createSvgDataUri(mxUtils.getXml(va))}return Ka}}}catch(Fa){}return null})):M(O,mxUtils.bind(this,function(){return u(da,"text/xml",g+O*V,k+O*V,0,0,R.name)}))}else M(O,mxUtils.bind(this,function(){return null}))}else{aa=!1;if("image/png"==
+R.type){var Z=p?null:this.extractGraphModelFromPng(X.target.result);if(null!=Z&&0<Z.length){var ia=new Image;ia.src=X.target.result;M(O,mxUtils.bind(this,function(){return u(Z,"text/xml",g+O*V,k+O*V,ia.width,ia.height,R.name)}));aa=!0}}aa||(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(X.target.result,mxUtils.bind(this,function(ea){this.resizeImage(ea,X.target.result,mxUtils.bind(this,function(va,za,ya){M(O,mxUtils.bind(this,function(){if(null!=va&&va.length<F){var ua=K&&this.isResampleImageSize(R.size,U)?Math.min(1,Math.min(q/za,q/ya)):1;return u(va,R.type,g+O*V,k+O*V,Math.round(za*ua),Math.round(ya*ua),R.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),K,q,U,R.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=
+X.target.result,u(Y,R.type,g+O*V,k+O*V,240,160,R.name,function(ea){M(O,function(){return ea})},R)});/(\.v(dx|sdx?))($|\?)/i.test(R.name)||/(\.vs(x|sx?))($|\?)/i.test(R.name)?u(null,R.type,g+O*V,k+O*V,240,160,R.name,function(X){M(O,function(){return X})},R):"image"==R.type.substring(0,5)||"application/pdf"==R.type?S.readAsDataURL(R):S.readAsText(R)}})(T)});if(N){N=[];for(L=0;L<e.length;L++)N.push(e[L]);e=N;this.confirmImageResize(function(P){K=P;Q()},G)}else Q()};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(e,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},q=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,u=function(x,E){if(x||g)mxSettings.setResizeImages(x?E:null),mxSettings.save();k();e(E)};null==q||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+function(x){u(x,!0)},function(x){u(x,!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):u(!1,q)};EditorUi.prototype.parseFile=function(e,g,k){k=null!=k?k:e.name;var q=new FileReader;q.onload=mxUtils.bind(this,function(){this.parseFileData(q.result,g,k)});q.readAsText(e)};
+EditorUi.prototype.parseFileData=function(e,g,k){var q=new XMLHttpRequest;q.open("POST",OPEN_URL);q.setRequestHeader("Content-Type","application/x-www-form-urlencoded");q.onreadystatechange=function(){g(q)};q.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(e));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(u){}};EditorUi.prototype.isResampleImageSize=function(e,g){g=null!=g?g:this.resampleThreshold;return e>g};EditorUi.prototype.resizeImage=
+function(e,g,k,q,u,x,E){u=null!=u?u:this.maxImageSize;var z=Math.max(1,e.width),G=Math.max(1,e.height);if(q&&this.isResampleImageSize(null!=E?E:g.length,x))try{var F=Math.max(z/u,G/u);if(1<F){var U=Math.round(z/F),p=Math.round(G/F),v=document.createElement("canvas");v.width=U;v.height=p;v.getContext("2d").drawImage(e,0,0,U,p);var H=v.toDataURL();if(H.length<g.length){var K=document.createElement("canvas");K.width=U;K.height=p;var N=K.toDataURL();H!==N&&(g=H,z=U,G=p)}}}catch(I){}k(g,z,G)};EditorUi.prototype.extractGraphModelFromPng=
+function(e){return Editor.extractGraphModelFromPng(e)};EditorUi.prototype.loadImage=function(e,g,k){try{var q=new Image;q.onload=function(){q.width=0<q.width?q.width:120;q.height=0<q.height?q.height:120;g(q)};null!=k&&(q.onerror=k);q.src=e}catch(u){if(null!=k)k(u);else throw u;}};EditorUi.prototype.getDefaultSketchMode=function(){var e="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:e)};var l=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 e=this,g=this.editor.graph;Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(I){var L=I.getEvent();
+return null==I.getState()&&!mxEvent.isMouseEvent(L)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(L)&&(null==I.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))});g.cellEditor.editPlantUmlData=function(I,L,Q){var P=JSON.parse(Q);L=new TextareaDialog(e,mxResources.get("plantUml")+":",P.data,function(V){null!=V&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generatePlantUmlImage(V,P.format,function(W,n,D){e.spinner.stop();g.getModel().beginUpdate();try{if("txt"==P.format)g.labelChanged(I,
+"<pre>"+W+"</pre>"),g.updateCellSize(I,!0);else{g.setCellStyles("image",e.convertDataUri(W),[I]);var M=g.model.getGeometry(I);null!=M&&(M=M.clone(),M.width=n,M.height=D,g.cellsResized([I],[M],!1))}g.setAttributeForCell(I,"plantUmlData",JSON.stringify({data:V,format:P.format}))}finally{g.getModel().endUpdate()}},function(W){e.handleError(W)})},null,null,400,220);e.showDialog(L.container,420,300,!0,!0);L.init()};g.cellEditor.editMermaidData=function(I,L,Q){var P=JSON.parse(Q);L=new TextareaDialog(e,
+mxResources.get("mermaid")+":",P.data,function(V){null!=V&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generateMermaidImage(V,P.config,function(W,n,D){e.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",W,[I]);var M=g.model.getGeometry(I);null!=M&&(M=M.clone(),M.width=Math.max(M.width,n),M.height=Math.max(M.height,D),g.cellsResized([I],[M],!1));g.setAttributeForCell(I,"mermaidData",JSON.stringify({data:V,config:P.config},null,2))}finally{g.getModel().endUpdate()}},
+function(W){e.handleError(W)})},null,null,400,220);e.showDialog(L.container,420,300,!0,!0);L.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(I,L){try{var Q=this.graph.getAttributeForCell(I,"plantUmlData");if(null!=Q)this.editPlantUmlData(I,L,Q);else if(Q=this.graph.getAttributeForCell(I,"mermaidData"),null!=Q)this.editMermaidData(I,L,Q);else{var P=g.getCellStyle(I);"1"==mxUtils.getValue(P,"metaEdit","0")?e.showDataDialog(I):k.apply(this,arguments)}}catch(V){e.handleError(V)}};
+g.getLinkTitle=function(I){return e.getLinkTitle(I)};g.customLinkClicked=function(I){var L=!1;try{e.handleCustomLink(I),L=!0}catch(Q){e.handleError(Q)}return L};var q=g.parseBackgroundImage;g.parseBackgroundImage=function(I){var L=q.apply(this,arguments);null!=L&&null!=L.src&&Graph.isPageLink(L.src)&&(L={originalSrc:L.src});return L};var u=g.setBackgroundImage;g.setBackgroundImage=function(I){null!=I&&null!=I.originalSrc&&(I=e.createImageForPageLink(I.originalSrc,e.currentPage,this));u.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(I,L){I=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=I){var Q=I.indexOf(",");if(0<Q)for(I=I.substring(Q+1),L=L.getProperty("patches"),Q=0;Q<L.length;Q++)if(null!=L[Q][EditorUi.DIFF_UPDATE]&&null!=L[Q][EditorUi.DIFF_UPDATE][I]||
null!=L[Q][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(L[Q][EditorUi.DIFF_REMOVE],I)){g.refreshBackgroundImage();break}}}));var x=g.getBackgroundImageObject;g.getBackgroundImageObject=function(I,L){var Q=x.apply(this,arguments);if(null!=Q&&null!=Q.originalSrc)if(!L)Q={src:Q.originalSrc};else if(L&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var P=this.stylesheet,V=this.shapeForegroundColor,W=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";
-this.shapeForegroundColor="#000000";Q=f.createImageForPageLink(Q.originalSrc);this.shapeBackgroundColor=W;this.shapeForegroundColor=V;this.stylesheet=P}return Q};var E=this.clearDefaultStyle;this.clearDefaultStyle=function(){E.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 z=f.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(I){I=null!=I?I:"";"1"==urlParams.dev&&(I+=(0<I.length?"&":"?")+"dev=1");return z.apply(this,arguments)};var G=g.addClickHandler;g.addClickHandler=function(I,L,Q){var P=L;L=function(V,W){if(null==W){var q=mxEvent.getSource(V);"a"==q.nodeName.toLowerCase()&&(W=q.getAttribute("href"))}null!=W&&g.isCustomLink(W)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&g.customLinkClicked(W)&&mxEvent.consume(V);
-null!=P&&P(V,W)};G.call(this,I,L,Q)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var F=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(I,L,Q){f.editor.graph.isSelectionEmpty()?F.apply(this,arguments):f.menus.addMenuItems(I,"delete - cut copy copyAsImage - duplicate".split(" "),null,Q)}}f.actions.get("print").funct=function(){f.showDialog((new PrintDialog(f)).container,360,null!=
-f.pages&&1<f.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var U=g.getExportVariables;g.getExportVariables=function(){var I=U.apply(this,arguments),L=f.getCurrentFile();null!=L&&(I.filename=L.getTitle());I.pagecount=null!=f.pages?f.pages.length:1;I.page=null!=f.currentPage?f.currentPage.getName():"";I.pagenumber=null!=f.pages&&null!=f.currentPage?mxUtils.indexOf(f.pages,f.currentPage)+1:1;return I};var p=g.getGlobalVariable;g.getGlobalVariable=function(I){var L=
-f.getCurrentFile();return"filename"==I&&null!=L?L.getTitle():"page"==I&&null!=f.currentPage?f.currentPage.getName():"pagenumber"==I?null!=f.currentPage&&null!=f.pages?mxUtils.indexOf(f.pages,f.currentPage)+1:1:"pagecount"==I?null!=f.pages?f.pages.length:1:p.apply(this,arguments)};var u=g.labelLinkClicked;g.labelLinkClicked=function(I,L,Q){var P=L.getAttribute("href");if(null==P||!g.isCustomLink(P)||!mxEvent.isTouchEvent(Q)&&mxEvent.isPopupTrigger(Q))u.apply(this,arguments);else{if(!g.isEnabled()||
-null!=I&&g.isCellLocked(I.cell))g.customLinkClicked(P),g.getRubberband().reset();mxEvent.consume(Q)}};this.editor.getOrCreateFilename=function(){var I=f.defaultFilename,L=f.getCurrentFile();null!=L&&(I=null!=L.getTitle()?L.getTitle():I);return I};var H=this.actions.get("print");H.setEnabled(!mxClient.IS_IOS||!navigator.standalone);H.visible=H.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),
+this.shapeForegroundColor="#000000";Q=e.createImageForPageLink(Q.originalSrc);this.shapeBackgroundColor=W;this.shapeForegroundColor=V;this.stylesheet=P}return Q};var E=this.clearDefaultStyle;this.clearDefaultStyle=function(){E.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 z=e.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(I){I=null!=I?I:"";"1"==urlParams.dev&&(I+=(0<I.length?"&":"?")+"dev=1");return z.apply(this,arguments)};var G=g.addClickHandler;g.addClickHandler=function(I,L,Q){var P=L;L=function(V,W){if(null==W){var n=mxEvent.getSource(V);"a"==n.nodeName.toLowerCase()&&(W=n.getAttribute("href"))}null!=W&&g.isCustomLink(W)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&g.customLinkClicked(W)&&mxEvent.consume(V);
+null!=P&&P(V,W)};G.call(this,I,L,Q)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var F=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(I,L,Q){e.editor.graph.isSelectionEmpty()?F.apply(this,arguments):e.menus.addMenuItems(I,"delete - cut copy copyAsImage - duplicate".split(" "),null,Q)}}e.actions.get("print").funct=function(){e.showDialog((new PrintDialog(e)).container,360,null!=
+e.pages&&1<e.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var U=g.getExportVariables;g.getExportVariables=function(){var I=U.apply(this,arguments),L=e.getCurrentFile();null!=L&&(I.filename=L.getTitle());I.pagecount=null!=e.pages?e.pages.length:1;I.page=null!=e.currentPage?e.currentPage.getName():"";I.pagenumber=null!=e.pages&&null!=e.currentPage?mxUtils.indexOf(e.pages,e.currentPage)+1:1;return I};var p=g.getGlobalVariable;g.getGlobalVariable=function(I){var L=
+e.getCurrentFile();return"filename"==I&&null!=L?L.getTitle():"page"==I&&null!=e.currentPage?e.currentPage.getName():"pagenumber"==I?null!=e.currentPage&&null!=e.pages?mxUtils.indexOf(e.pages,e.currentPage)+1:1:"pagecount"==I?null!=e.pages?e.pages.length:1:p.apply(this,arguments)};var v=g.labelLinkClicked;g.labelLinkClicked=function(I,L,Q){var P=L.getAttribute("href");if(null==P||!g.isCustomLink(P)||!mxEvent.isTouchEvent(Q)&&mxEvent.isPopupTrigger(Q))v.apply(this,arguments);else{if(!g.isEnabled()||
+null!=I&&g.isCellLocked(I.cell))g.customLinkClicked(P),g.getRubberband().reset();mxEvent.consume(Q)}};this.editor.getOrCreateFilename=function(){var I=e.defaultFilename,L=e.getCurrentFile();null!=L&&(I=null!=L.getTitle()?L.getTitle():I);return I};var H=this.actions.get("print");H.setEnabled(!mxClient.IS_IOS||!navigator.standalone);H.visible=H.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,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,
!0,"toggleShapes",!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(I){var L=g.cellEditor.text2,Q=null;null!=L&&(mxEvent.addListener(L,"dragleave",function(P){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);P.stopPropagation();
-P.preventDefault()}),mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(P){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=this.highlightElement(L));P.stopPropagation();P.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(P){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(0<P.dataTransfer.files.length)this.importFiles(P.dataTransfer.files,0,0,this.maxImageSize,function(W,q,D,M,T,O){g.insertImage(W,T,O)},function(){},function(W){return"image/"==W.type.substring(0,
-6)},function(W){for(var q=0;q<W.length;q++)W[q]()},mxEvent.isControlDown(P));else if(0<=mxUtils.indexOf(P.dataTransfer.types,"text/uri-list")){var V=P.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(W){var q=Math.max(1,W.width);W=Math.max(1,W.height);var D=this.maxImageSize;D=Math.min(1,Math.min(D/Math.max(1,q)),D/Math.max(1,W));g.insertImage(decodeURIComponent(V),q*D,W*D)})):document.execCommand("insertHTML",
+P.preventDefault()}),mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(P){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=this.highlightElement(L));P.stopPropagation();P.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(P){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(0<P.dataTransfer.files.length)this.importFiles(P.dataTransfer.files,0,0,this.maxImageSize,function(W,n,D,M,T,O){g.insertImage(W,T,O)},function(){},function(W){return"image/"==W.type.substring(0,
+6)},function(W){for(var n=0;n<W.length;n++)W[n]()},mxEvent.isControlDown(P));else if(0<=mxUtils.indexOf(P.dataTransfer.types,"text/uri-list")){var V=P.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(W){var n=Math.max(1,W.width);W=Math.max(1,W.height);var D=this.maxImageSize;D=Math.min(1,Math.min(D/Math.max(1,n)),D/Math.max(1,W));g.insertImage(decodeURIComponent(V),n*D,W*D)})):document.execCommand("insertHTML",
!1,P.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(P.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,P.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(P.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,P.dataTransfer.getData("text/plain"));P.stopPropagation();P.preventDefault()})))}));this.isSettingsEnabled()&&(H=this.editor.graph.view,H.setUnit(mxSettings.getUnit()),H.addListener("unitChanged",function(I,L){mxSettings.setUnit(L.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,H.unit),this.refresh());if("1"==urlParams.styledev){H=document.getElementById("geFooter");null!=H&&(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)})),H.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(I,L){0<this.editor.graph.getSelectionCount()?(I=this.editor.graph.getSelectionCell(),
I=this.editor.graph.getModel().getStyle(I),this.styleInput.value=I||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(I){return mxEvent.getSource(I)==this.styleInput?!0:K.apply(this,arguments)}}H=document.getElementById("geInfo");null!=H&&H.parentNode.removeChild(H);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var N=null;mxEvent.addListener(g.container,"dragleave",function(I){g.isEnabled()&&
(null!=N&&(N.parentNode.removeChild(N),N=null),I.stopPropagation(),I.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(I){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();I.stopPropagation();I.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(I){null!=N&&(N.parentNode.removeChild(N),N=null);if(g.isEnabled()){var L=mxUtils.convertPoint(g.container,
-mxEvent.getClientX(I),mxEvent.getClientY(I)),Q=I.dataTransfer.files,P=g.view.translate,V=g.view.scale,W=L.x/V-P.x,q=L.y/V-P.y;if(0<Q.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(I)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(Q,!0)):(mxEvent.isAltDown(I)&&(q=W=null),this.importFiles(Q,W,q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(I),null,null,mxEvent.isShiftDown(I),I));else{mxEvent.isAltDown(I)&&(q=W=0);var D=0<=mxUtils.indexOf(I.dataTransfer.types,
-"text/uri-list")?I.dataTransfer.getData("text/uri-list"):null;L=this.extractGraphModelFromEvent(I,null!=this.pages);if(null!=L)g.setSelectionCells(this.importXml(L,W,q,!0));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")){var M=I.dataTransfer.getData("text/html");L=document.createElement("div");L.innerHTML=g.sanitizeHtml(M);var T=null;Q=L.getElementsByTagName("img");null!=Q&&1==Q.length?(M=Q[0].getAttribute("src"),null==M&&(M=Q[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(M)||
-(T=!0)):(Q=L.getElementsByTagName("a"),null!=Q&&1==Q.length?M=Q[0].getAttribute("href"):(L=L.getElementsByTagName("pre"),null!=L&&1==L.length&&(M=mxUtils.getTextContent(L[0]))));var O=!0,R=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(M,W,q,!0,T,null,O,mxEvent.isControlDown(I)))});T&&null!=M&&M.length>this.resampleThreshold?this.confirmImageResize(function(S){O=S;R()},mxEvent.isControlDown(I)):R()}else null!=D&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(D)?this.loadImage(decodeURIComponent(D),
-mxUtils.bind(this,function(S){var X=Math.max(1,S.width);S=Math.max(1,S.height);var Y=this.maxImageSize;Y=Math.min(1,Math.min(Y/Math.max(1,X)),Y/Math.max(1,S));g.setSelectionCell(g.insertVertex(null,null,"",W,q,X*Y,S*Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+D+";"))}),mxUtils.bind(this,function(S){g.setSelectionCells(this.insertTextAt(D,W,q,!0))})):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(I.dataTransfer.getData("text/plain"),
-W,q,!0))}}I.stopPropagation();I.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();H=mxUtils.bind(this,function(){g.refresh();g.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",H);this.addListener("sketchModeChanged",H);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.refresh()}));g.addListener("enabledChanged",mxUtils.bind(this,
+mxEvent.getClientX(I),mxEvent.getClientY(I)),Q=I.dataTransfer.files,P=g.view.translate,V=g.view.scale,W=L.x/V-P.x,n=L.y/V-P.y;if(0<Q.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(I)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(Q,!0)):(mxEvent.isAltDown(I)&&(n=W=null),this.importFiles(Q,W,n,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(I),null,null,mxEvent.isShiftDown(I),I));else{mxEvent.isAltDown(I)&&(n=W=0);var D=0<=mxUtils.indexOf(I.dataTransfer.types,
+"text/uri-list")?I.dataTransfer.getData("text/uri-list"):null;L=this.extractGraphModelFromEvent(I,null!=this.pages);if(null!=L)g.setSelectionCells(this.importXml(L,W,n,!0));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")){var M=I.dataTransfer.getData("text/html");L=document.createElement("div");L.innerHTML=g.sanitizeHtml(M);var T=null;Q=L.getElementsByTagName("img");null!=Q&&1==Q.length?(M=Q[0].getAttribute("src"),null==M&&(M=Q[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(M)||
+(T=!0)):(Q=L.getElementsByTagName("a"),null!=Q&&1==Q.length?M=Q[0].getAttribute("href"):(L=L.getElementsByTagName("pre"),null!=L&&1==L.length&&(M=mxUtils.getTextContent(L[0]))));var O=!0,R=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(M,W,n,!0,T,null,O,mxEvent.isControlDown(I)))});T&&null!=M&&M.length>this.resampleThreshold?this.confirmImageResize(function(S){O=S;R()},mxEvent.isControlDown(I)):R()}else null!=D&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(D)?this.loadImage(decodeURIComponent(D),
+mxUtils.bind(this,function(S){var X=Math.max(1,S.width);S=Math.max(1,S.height);var Y=this.maxImageSize;Y=Math.min(1,Math.min(Y/Math.max(1,X)),Y/Math.max(1,S));g.setSelectionCell(g.insertVertex(null,null,"",W,n,X*Y,S*Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+D+";"))}),mxUtils.bind(this,function(S){g.setSelectionCells(this.insertTextAt(D,W,n,!0))})):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(I.dataTransfer.getData("text/plain"),
+W,n,!0))}}I.stopPropagation();I.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();H=mxUtils.bind(this,function(){g.refresh();g.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",H);this.addListener("sketchModeChanged",H);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.refresh()}));g.addListener("enabledChanged",mxUtils.bind(this,
function(){g.isEnabled()||this.hideShapePicker()}));"simple"==Editor.currentTheme&&(Editor.currentTheme="",this.doSetCurrentTheme("simple",0));mxClient.IS_IE||mxClient.IS_IE11||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(H=!1,this.isSettingsEnabled()&&(H="auto"==mxSettings.settings.darkMode||"auto"==urlParams.dark?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches:!0===mxSettings.settings.darkMode),(H||"dark"==uiTheme||"1"==
-urlParams.dark)&&this.setDarkMode(!0));this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var f=this.editor.graph;f.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,n=!1,v=0;v<k.types.length;v++)if("text/"===k.types[v].substring(0,5)){n=!0;break}if(!n){var x=k.items;for(index in x){var E=x[index];if("file"===E.kind){if(f.isEditing())this.importFiles([E.getAsFile()],
-0,0,this.maxImageSize,function(G,F,U,p,u,H){f.insertImage(G,u,H)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var F=0;F<G.length;F++)G[F]()});else{var z=this.editor.graph.getInsertPoint();this.importFiles([E.getAsFile()],z.x,z.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(G){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function f(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},
+urlParams.dark)&&this.setDarkMode(!0));this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var e=this.editor.graph;e.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,q=!1,u=0;u<k.types.length;u++)if("text/"===k.types[u].substring(0,5)){q=!0;break}if(!q){var x=k.items;for(index in x){var E=x[index];if("file"===E.kind){if(e.isEditing())this.importFiles([E.getAsFile()],
+0,0,this.maxImageSize,function(G,F,U,p,v,H){e.insertImage(G,v,H)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var F=0;F<G.length;F++)G[F]()});else{var z=this.editor.graph.getInsertPoint();this.importFiles([E.getAsFile()],z.x,z.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(G){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function e(){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 n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(x){var E=mxEvent.getSource(x);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==E.nodeName||"TEXTAREA"==E.nodeName||
-224!=x.keyCode&&(mxClient.IS_MAC||17!=x.keyCode)&&(!mxClient.IS_MAC||91!=x.keyCode&&93!=x.keyCode)||n||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",x=g.container.scrollLeft,E=g.container.scrollTop,g.container.appendChild(k),n=!0,k.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=x,g.container.scrollTop=E)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(x){var E=x.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||
-224!=E&&17!=E&&91!=E&&93!=E||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k),f()}catch(E){this.handleError(E)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k,!0),f()}catch(E){this.handleError(E)}}));
-mxEvent.addListener(k,"paste",mxUtils.bind(this,function(x){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(k.innerHTML="&nbsp;",k.focus(),null!=x.clipboardData&&this.pasteCells(x,k,!0,!0),!mxEvent.isConsumed(x))){var E=g.container.scrollLeft,z=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){g.container.scrollLeft=E;g.container.scrollTop=z;this.pasteCells(x,k,!1,!0)}),0)}}),!0);var v=this.isSelectionAllowed;this.isSelectionAllowed=function(x){return mxEvent.getSource(x)==
-k?!0:v.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(f,g){mxSettings.setUi(f);(g=this.doSetCurrentTheme(f)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(f,g){function k(p){return""==p||"dark"==p||"kennedy"==p||null==p}var n=Editor.currentTheme;f=k(f)?"default":f;n=k(n)?"default":n;var v="simple"==n&&"default"==f||"default"==n&&"simple"==f;if(v&&!this.themeSwitching){Editor.currentTheme=f;this.themeSwitching=!0;var x=
-this.editor.graph.view.translate,E=x.x,z=x.y,G=mxUtils.getOffset(this.editor.graph.container),F=this.editor.graph.container.scrollLeft-G.x,U=this.editor.graph.container.scrollTop-G.y;g=null!=g?g:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+g+"ms");0==g&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"simple"==n&&"default"==f?(this.sidebarFooterContainer.style.display=
-"block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==n&&"simple"==f&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display=
-"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(f);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();var p=this.editor.graph.view.scale;G=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=F+G.x+(x.x-E)*p;this.editor.graph.container.scrollTop=U+G.y+(x.y-z)*p;
-this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),g)}),g)}),g)}),0)}return v};EditorUi.prototype.installStatusMinimizer=function(f){f=null!=f?f:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(){""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-block")}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,
-function(){g||(this.statusContainer.style.display="none")}));var k=mxUtils.bind(this,function(){if("simple"==Editor.currentTheme||"1"==urlParams.sketch){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=n&&null!=n.getAttribute("class");if(!g&&null!=n){n=n.getAttribute("title");var v=this.getCurrentFile();v=null!=v?v.savingStatusKey:DrawioFile.prototype.savingStatusKey;n==mxResources.get(v)+"..."&&
-(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(v))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";n=26>f.clientWidth;f.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||g)this.statusContainer.style.display="inline-block",g=!0}});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(f){"default"==f&&(null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex=
-"1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer)),this.toggleCompactMode(!0));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();
-this.switchThemeConstants(f);this.switchCssForTheme(f);this.createWrapperForTheme(f);this.createPickerMenuForTheme(f);this.createMainMenuForTheme(f);this.createMenubarForTheme(f);this.createFooterMenuForTheme(f);this.sidebarContainer.style.display="";"simple"==f&&(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),
-this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%");null!=this.format&&(f="default"==f||"atlas"==f,this.format.showCloseButton!=f&&(this.format.showCloseButton=f,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=
-this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&
-(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(f){var g=this.editor.graph;g.defaultEdgeLength=Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=Graph.prototype.defaultGridEnabled;g.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=f);"simple"==f?(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,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),g.defaultEdgeLength=120,null==urlParams.grid&&(g.defaultGridEnabled=
-!1),null==urlParams.pv&&(g.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(f){"simple"==f?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=
-Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(f){"simple"==f?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),
-this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(f){"simple"==f&&null==this.sketchMainMenuElt&&(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText=
-"position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",
-Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(f){if("simple"==f&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
-f=this.sketchFooterMenuElt;var g=this.createPageMenuTab(!1,!0);g.className="geToolbarButton";g.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";f.appendChild(g);var k=mxUtils.bind(this,function(){g.innerText="";if(null!=this.currentPage){mxUtils.write(g,this.currentPage.getName());var n=null!=this.pages?this.pages.length:1,v=this.getPageIndex(this.currentPage);v=null!=v?v+1:1;var x=this.currentPage.getId();
-g.setAttribute("title",this.currentPage.getName()+" ("+v+"/"+n+")"+(null!=x?" ["+x+"]":""))}});this.editor.addListener("pagesPatched",k);this.editor.addListener("pageSelected",k);this.editor.addListener("pageRenamed",k);this.editor.addListener("fileLoaded",k);k();k=mxUtils.bind(this,function(){g.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",k);this.addListener("pagesVisibleChanged",
-k);this.editor.addListener("pagesPatched",k);k();f.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));k=this.createMenu("viewZoom");k.setAttribute("title",mxResources.get("zoom"));k.innerHTML="100%";k.className="geToolbarButton";k.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";f.appendChild(k);mxUtils.bind(this,function(n){mxEvent.addListener(n,"click",
-mxUtils.bind(this,function(x){mxEvent.isAltDown(x)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(x)):mxEvent.isShiftDown(x)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(x))}));var v=mxUtils.bind(this,function(){n.innerText="";mxUtils.write(n,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,v);this.editor.addListener("resetGraphView",v);this.editor.addListener("pageSelected",
-v)})(k);f.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(f){if("simple"==f&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
-var g=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(g.style,"transition","transform .3s ease-out");var k=document.createElement("a");k.style.padding="0px";k.style.boxShadow="none";k.className="geMenuItem";k.style.display="block";k.style.width="100%";k.style.height="14px";k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";k.style.backgroundPosition="top center";k.style.backgroundRepeat="no-repeat";k.setAttribute("title","Minimize");var n=this.createMenuItem("insertFreehand",Editor.freehandImage,
-!0);n.style.paddingLeft="12px";n.style.backgroundSize="";n.style.width="26px";n.style.height="30px";n.style.opacity="0.7";var v=this.createMenu("insert",Editor.shapesImage);v.style.backgroundSize="";v.style.marginBottom="4px";v.style.display="block";v.style.width="30px";v.style.height="30px";v.style.padding="4px";v.style.opacity="0.7";var x=!1,E=mxUtils.bind(this,function(){g.innerText="";if(!x){var z=function(F,U,p,u){null!=U&&F.setAttribute("title",U);F.style.cursor="pointer";F.style.margin="8px 0px";
-F.style.display="block";g.appendChild(F);null!=u&&(F.style.position="relative",F.style.overflow="visible",U=document.createElement("div"),U.style.position="absolute",U.style.fontSize="8px",U.style.left="32px",U.style.top="28px",mxUtils.write(U,u),F.appendChild(U));return F};z(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+"-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 q=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(x){var E=mxEvent.getSource(x);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==E.nodeName||"TEXTAREA"==E.nodeName||
+224!=x.keyCode&&(mxClient.IS_MAC||17!=x.keyCode)&&(!mxClient.IS_MAC||91!=x.keyCode&&93!=x.keyCode)||q||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",x=g.container.scrollLeft,E=g.container.scrollTop,g.container.appendChild(k),q=!0,k.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=x,g.container.scrollTop=E)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(x){var E=x.keyCode;window.setTimeout(mxUtils.bind(this,function(){!q||
+224!=E&&17!=E&&91!=E&&93!=E||(q=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k),e()}catch(E){this.handleError(E)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k,!0),e()}catch(E){this.handleError(E)}}));
+mxEvent.addListener(k,"paste",mxUtils.bind(this,function(x){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(k.innerHTML="&nbsp;",k.focus(),null!=x.clipboardData&&this.pasteCells(x,k,!0,!0),!mxEvent.isConsumed(x))){var E=g.container.scrollLeft,z=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){g.container.scrollLeft=E;g.container.scrollTop=z;this.pasteCells(x,k,!1,!0)}),0)}}),!0);var u=this.isSelectionAllowed;this.isSelectionAllowed=function(x){return mxEvent.getSource(x)==
+k?!0:u.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(e,g){mxSettings.setUi(e);(g=this.doSetCurrentTheme(e)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(e,g){function k(p){return""==p||"dark"==p||"kennedy"==p||null==p}var q=Editor.currentTheme;e=k(e)?"default":e;q=k(q)?"default":q;var u="simple"==q&&"default"==e||"default"==q&&"simple"==e;if(u&&!this.themeSwitching){Editor.currentTheme=e;this.themeSwitching=!0;var x=
+this.editor.graph.view.translate,E=x.x,z=x.y,G=mxUtils.getOffset(this.editor.graph.container),F=this.editor.graph.container.scrollLeft-G.x,U=this.editor.graph.container.scrollTop-G.y;g=null!=g?g:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+g+"ms");0==g&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"simple"==q&&"default"==e?(this.sidebarFooterContainer.style.display=
+"block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==q&&"simple"==e&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display=
+"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(e);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var p=this.editor.graph.view.scale;G=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=F+G.x+(x.x-E)*p;this.editor.graph.container.scrollTop=U+G.y+(x.y-z)*p;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),g)}),g)}),g)}),0)}return u};EditorUi.prototype.installStatusMinimizer=function(e){e=null!=e?e:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(){""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-block")}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(){g||(this.statusContainer.style.display="none")}));
+var k=mxUtils.bind(this,function(){if("simple"==Editor.currentTheme||"1"==urlParams.sketch){var q=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=q&&null!=q.getAttribute("class");if(!g&&null!=q){q=q.getAttribute("title");var u=this.getCurrentFile();u=null!=u?u.savingStatusKey:DrawioFile.prototype.savingStatusKey;q==mxResources.get(u)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(u))+
+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";q=26>e.clientWidth;e.style.visibility=q&&""==this.editor.getStatus()?"hidden":"";if(q||g)this.statusContainer.style.display="inline-block",g=!0}});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(e){"default"==e&&(null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&
+this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer)),this.toggleCompactMode(!0));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(e);this.switchCssForTheme(e);this.createWrapperForTheme(e);
+this.createPickerMenuForTheme(e);this.createMainMenuForTheme(e);this.createMenubarForTheme(e);this.createFooterMenuForTheme(e);this.sidebarContainer.style.display="";"simple"==e&&(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom=
+"63px",this.sidebarContainer.style.width="100%");null!=this.format&&(e="default"==e||"atlas"==e,this.format.showCloseButton!=e&&(this.format.showCloseButton=e,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&
+(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),
+this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(e){var g=this.editor.graph;g.defaultEdgeLength=Graph.prototype.defaultEdgeLength;g.defaultGridEnabled=Graph.prototype.defaultGridEnabled;g.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=e);"simple"==e?(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,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),g.defaultEdgeLength=120,null==urlParams.grid&&(g.defaultGridEnabled=!1),null==urlParams.pv&&(g.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=
+mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(e){"simple"==e?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),
+this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(e){"simple"==e?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,
+this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(e){"simple"==e&&null==this.sketchMainMenuElt&&(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(e){if("simple"==e&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=
+document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";e=this.sketchFooterMenuElt;var g=this.createPageMenuTab(!1,!0);g.className="geToolbarButton";g.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";
+e.appendChild(g);var k=mxUtils.bind(this,function(){g.innerText="";if(null!=this.currentPage){mxUtils.write(g,this.currentPage.getName());var q=null!=this.pages?this.pages.length:1,u=this.getPageIndex(this.currentPage);u=null!=u?u+1:1;var x=this.currentPage.getId();g.setAttribute("title",this.currentPage.getName()+" ("+u+"/"+q+")"+(null!=x?" ["+x+"]":""))}});this.editor.addListener("pagesPatched",k);this.editor.addListener("pageSelected",k);this.editor.addListener("pageRenamed",k);this.editor.addListener("fileLoaded",
+k);k();k=mxUtils.bind(this,function(){g.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",k);this.addListener("pagesVisibleChanged",k);this.editor.addListener("pagesPatched",k);k();e.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));k=this.createMenu("viewZoom");k.setAttribute("title",mxResources.get("zoom"));k.innerHTML="100%";k.className="geToolbarButton";k.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";
+e.appendChild(k);mxUtils.bind(this,function(q){mxEvent.addListener(q,"click",mxUtils.bind(this,function(x){mxEvent.isAltDown(x)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(x)):mxEvent.isShiftDown(x)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(x))}));var u=mxUtils.bind(this,function(){q.innerText="";mxUtils.write(q,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,u);this.editor.addListener("resetGraphView",
+u);this.editor.addListener("pageSelected",u)})(k);e.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(e){if("simple"==e&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;max-height:100%;width:48px;z-index:1;box-sizing:border-box;transform:translate(0, -50%);top:50%;user-select:none;";
+var g=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(g.style,"transition","transform .3s ease-out");var k=document.createElement("a");k.style.padding="0px";k.style.boxShadow="none";k.className="geMenuItem";k.style.display="block";k.style.width="100%";k.style.height="14px";k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";k.style.backgroundPosition="top center";k.style.backgroundRepeat="no-repeat";k.setAttribute("title","Minimize");var q=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);q.style.paddingLeft="12px";q.style.backgroundSize="";q.style.width="26px";q.style.height="30px";q.style.opacity="0.7";var u=this.createMenu("insert",Editor.shapesImage);u.style.backgroundSize="";u.style.marginBottom="4px";u.style.display="block";u.style.width="30px";u.style.height="30px";u.style.padding="4px";u.style.opacity="0.7";var x=!1,E=mxUtils.bind(this,function(){g.innerText="";if(!x){var z=function(F,U,p,v){null!=U&&F.setAttribute("title",U);F.style.cursor="pointer";F.style.margin="8px 0px";
+F.style.display="block";g.appendChild(F);null!=v&&(F.style.position="relative",F.style.overflow="visible",U=document.createElement("div"),U.style.position="absolute",U.style.fontSize="8px",U.style.left="32px",U.style.top="28px",mxUtils.write(U,v),F.appendChild(U));return F};z(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
" (A)",null,"A");z(this.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")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");z(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");z(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var G=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");G.geometry.setTerminalPoint(new mxPoint(0,0),!0);G.geometry.setTerminalPoint(new mxPoint(G.geometry.width,0),!1);G.geometry.points=
[];G.geometry.relative=!0;G.edge=!0;z(this.sidebar.createEdgeTemplateFromCells([G],G.geometry.width,G.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");G=G.clone();G.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";G.geometry.width=this.editor.graph.defaultEdgeLength+20;G.geometry.setTerminalPoint(new mxPoint(0,20),!0);G.geometry.setTerminalPoint(new mxPoint(G.geometry.width,20),!1);
-z(this.sidebar.createEdgeTemplateFromCells([G],G.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));z(n,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(v)}"1"!=urlParams.embedInline&&g.appendChild(k)});mxEvent.addListener(k,"click",mxUtils.bind(this,function(){x?(mxUtils.setPrefixedStyle(g.style,"transform","translate(0, -50%)"),g.style.padding="8px 6px 4px",g.style.width="40px",g.style.top="50%",g.style.bottom="",g.style.height="",
-k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",k.setAttribute("title","Minimize"),k.style.height="14px",x=!1,E()):(g.innerText="",g.appendChild(k),mxUtils.setPrefixedStyle(g.style,"transform","translate(0, 0)"),g.style.bottom="12px",g.style.padding="0px",g.style.height="24px",g.style.width="24px",g.style.top="",k.style.backgroundImage="url("+Editor.plusImage+")",k.setAttribute("title",mxResources.get("insert")),k.style.height="24px",x=!0)}));this.addListener("darkModeChanged",
-E);this.addListener("sketchModeChanged",E);E();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(f){"simple"==f?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="display:flex;position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;flex-wrap:nowrap;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;max-width:calc(100% - 170px);min-width:40px;justify-content:flex-end;align-items:center;",
-this.sketchWrapperElt.appendChild(this.sketchMenubarElt),"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&this.installStatusMinimizer(this.sketchMenubarElt)),null!=this.statusContainer&&(this.statusContainer.style.flexShrink="1",this.statusContainer.style.overflow="hidden",this.sketchMenubarElt.appendChild(this.statusContainer)),null!=this.userElement&&(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement)),f=this.menubar.langIcon,
-null!=f&&(f.style.position="",f.style.height="21px",f.style.width="21px",f.style.flexShrink="0",this.sketchMenubarElt.appendChild(f)),null!=this.buttonContainer&&(this.buttonContainer.style.flexShrink="0",this.buttonContainer.style.padding="0px",this.buttonContainer.style.position="",this.sketchMenubarElt.appendChild(this.buttonContainer))):(null!=this.statusContainer&&(this.menubar.container.appendChild(this.statusContainer),this.statusContainer.style.flexShrink="",this.statusContainer.style.overflow=
-""),null!=this.userElement&&(this.userElement.style.flexShrink="",this.userElement.style.top="3px",this.menubarContainer.appendChild(this.userElement)),f=this.menubar.langIcon,null!=f&&(f.style.position="absolute",f.style.height="18px",f.style.width="18px",f.style.flexShrink="",this.menubarContainer.parentNode.insertBefore(f,this.menubarContainer)))};EditorUi.prototype.createMenu=function(f,g){var k=this.menus.get(f),n=this.menubar.addMenu(mxResources.get(f),k.funct);n.className="geToolbarButton";
-n.style.display="inline-block";n.style.cursor="pointer";n.style.height="24px";n.setAttribute("title",mxResources.get(f));this.menus.menuCreated(k,n,"geToolbarButton");null!=g&&(n.style.backgroundImage="url("+g+")",n.style.backgroundPosition="center center",n.style.backgroundRepeat="no-repeat",n.style.backgroundSize="100% 100%",n.style.width="24px",n.innerText="");return n};EditorUi.prototype.createMenuItem=function(f,g,k){var n=document.createElement("a");n.className="geToolbarButton";n.setAttribute("title",
-mxResources.get(f));n.style.backgroundImage="url("+g+")";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";n.style.backgroundSize="100% 100%";n.style.display="inline-block";n.style.cursor="pointer";n.style.marginLeft="6px";n.style.width="24px";n.style.height="24px";var v=this.actions.get(f);null!=v&&(mxEvent.addListener(n,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(x){x.preventDefault()})),mxEvent.addListener(n,"click",function(x){"disabled"!=
-n.getAttribute("disabled")&&v.funct(x);mxEvent.consume(x)}),k||(f=function(){v.isEnabled()?(n.removeAttribute("disabled"),n.style.cursor="pointer"):(n.setAttribute("disabled","disabled"),n.style.cursor="default");n.style.opacity=v.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",f),v.addListener("stateChanged",f),f()));return n};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var f=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==
-urlParams.winCtrls&&"1"==urlParams.sketch?80:60,k="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),f,g,240,k,mxUtils.bind(this,function(n){n.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};
-var m=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(f){var g=this.formatWindow;null!=g?g.window.setVisible(null!=f?f:!this.isFormatPanelVisible()):m.apply(this,arguments)};var t=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var f=this.formatWindow;return null!=f?f.window.isVisible():t.apply(this,arguments)};var y=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(f){if(null!=this.sketchWrapperElt&&null!=
-this.sketchWrapperElt.parentNode){f=null!=f?f:!0;var g=this.getDiagramContainerOffset();this.diagramContainer.style.left=g.x+"px";this.diagramContainer.style.top=g.y+"px";this.diagramContainer.style.right="0";this.diagramContainer.style.bottom="0";f&&this.editor.graph.sizeDidChange()}else y.apply(this,arguments)};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var f=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
-650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?66:10,"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,f-6,g-6,mxUtils.bind(this,function(k){k.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
-0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(f){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(f);null==urlParams.rough&&(mxSettings.settings.sketchMode=f,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+
-(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
-"html > body > div > .geToolbarContainer { box-shadow:0px 2px 10px #e0e0e0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
+z(this.sidebar.createEdgeTemplateFromCells([G],G.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));z(q,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(u)}"1"!=urlParams.embedInline&&g.appendChild(k)});mxEvent.addListener(k,"click",mxUtils.bind(this,function(){x?(mxUtils.setPrefixedStyle(g.style,"transform","translate(0, -50%)"),g.style.padding="8px 6px 4px",g.style.width="48px",g.style.top="50%",g.style.bottom="",g.style.height="",
+k.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",k.setAttribute("title","Minimize"),k.style.width="100%",k.style.height="14px",x=!1,E()):(g.innerText="",g.appendChild(k),mxUtils.setPrefixedStyle(g.style,"transform","translate(0, 0)"),g.style.width="auto",g.style.bottom="12px",g.style.padding="0px",g.style.top="",k.style.backgroundImage="url("+Editor.plusImage+")",k.setAttribute("title",mxResources.get("insert")),k.style.width="24px",k.style.height="24px",x=!0)}));this.addListener("darkModeChanged",
+E);this.addListener("sketchModeChanged",E);E();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(e){"simple"==e?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="display:flex;position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;flex-wrap:nowrap;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;max-width:calc(100% - 170px);min-width:40px;justify-content:flex-end;align-items:center;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt),e=mxUtils.bind(this,function(){var g=58>this.sketchPickerMenuElt.offsetTop-this.sketchPickerMenuElt.offsetHeight/2;this.sketchMainMenuElt.style.left=g?"70px":"10px";this.sketchMenubarElt.style.maxWidth=g?"calc(100% - 230px)":"calc(100% - 170px)"}),e(),mxEvent.addListener(window,"resize",e)),null!=this.statusContainer&&(this.statusContainer.style.flexShrink="1",this.sketchMenubarElt.appendChild(this.statusContainer)),null!=this.userElement&&
+(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement)),e=this.menubar.langIcon,null!=e&&(e.style.position="",e.style.height="21px",e.style.width="21px",e.style.flexShrink="0",this.sketchMenubarElt.appendChild(e)),null!=this.buttonContainer&&(this.buttonContainer.style.flexShrink="0",this.buttonContainer.style.padding="0px",this.buttonContainer.style.position="",this.sketchMenubarElt.appendChild(this.buttonContainer))):(null!=this.statusContainer&&
+(this.menubar.container.appendChild(this.statusContainer),this.statusContainer.style.flexShrink="",this.statusContainer.style.overflow=""),null!=this.userElement&&(this.userElement.style.flexShrink="",this.userElement.style.top="3px",this.menubarContainer.appendChild(this.userElement)),e=this.menubar.langIcon,null!=e&&(e.style.position="absolute",e.style.height="18px",e.style.width="18px",e.style.flexShrink="",this.menubarContainer.parentNode.insertBefore(e,this.menubarContainer)))};EditorUi.prototype.createMenu=
+function(e,g,k){k=null!=k?k:"geToolbarButton";var q=this.menus.get(e),u=this.menubar.addMenu(mxResources.get(e),q.funct);u.className=k;u.style.display="inline-block";u.style.cursor="pointer";u.style.height="24px";u.setAttribute("title",mxResources.get(e));this.menus.menuCreated(q,u,k);null!=g&&(u.style.backgroundImage="url("+g+")",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",u.style.backgroundSize="100% 100%",u.style.width="24px",u.innerText="");return u};EditorUi.prototype.createToolbarButton=
+function(e,g,k,q){q=null!=q?q:24;var u=document.createElement("a");u.className="geToolbarButton geAdaptiveAsset";u.setAttribute("title",g);u.style.backgroundImage="url("+e+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="100% 100%";u.style.display="inline-block";u.style.cursor="pointer";u.style.marginLeft="6px";u.style.width=q+"px";u.style.height=q+"px";null!=k&&(mxEvent.addListener(u,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
+function(x){x.preventDefault()})),mxEvent.addListener(u,"click",function(x){"disabled"!=u.getAttribute("disabled")&&k(x);mxEvent.consume(x)}));return u};EditorUi.prototype.createMenuItem=function(e,g,k){var q=this.actions.get(e),u=null!=q?q.funct:null,x=this.createToolbarButton(g,mxResources.get(e),u);null==q||k||(e=function(){q.isEnabled()?(x.removeAttribute("disabled"),x.style.cursor="pointer"):(x.setAttribute("disabled","disabled"),x.style.cursor="default");x.style.opacity=q.isEnabled()?"":"0.2"},
+this.editor.graph.addListener("enabledChanged",e),q.addListener("stateChanged",e),e());return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var e=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,k="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),e,g,240,k,mxUtils.bind(this,
+function(q){q.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};var m=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(e){var g=this.formatWindow;null!=g?g.window.setVisible(null!=e?e:!this.isFormatPanelVisible()):m.apply(this,arguments)};var t=EditorUi.prototype.isFormatPanelVisible;
+EditorUi.prototype.isFormatPanelVisible=function(){var e=this.formatWindow;return null!=e?e.window.isVisible():t.apply(this,arguments)};var y=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){e=null!=e?e:!0;var g=this.getDiagramContainerOffset();this.diagramContainer.style.left=g.x+"px";this.diagramContainer.style.top=g.y+"px";this.diagramContainer.style.right="0";this.diagramContainer.style.bottom="0";e&&this.editor.graph.sizeDidChange()}else y.apply(this,
+arguments)};EditorUi.prototype.createShapesPanel=function(e){var g=document.createElement("div");g.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;";g.className="geTitle";var k=document.createElement("span");k.style.fontSize="18px";k.style.marginRight="5px";k.innerHTML="+";g.appendChild(k);mxUtils.write(g,mxResources.get("moreShapes"));e.appendChild(g);mxEvent.addListener(g,"click",mxUtils.bind(this,
+function(){this.actions.get("shapes").funct()}));k=mxUtils.bind(this,function(q,u){q=this.createMenu(q,null,"geTitle");q.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;";e.appendChild(q);return q});!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?g.style.bottom="0":null!=this.actions.get("newLibrary")?(g=document.createElement("div"),g.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+g.className="geTitle",k=document.createElement("span"),k.style.cssText="position:relative;top:6px;",mxUtils.write(k,mxResources.get("newLibrary")),g.appendChild(k),e.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),g=g.cloneNode(!1),g.style.left="50%",g.style.borderLeft="1px solid lightgray",k=k.cloneNode(!1),mxUtils.write(k,mxResources.get("openLibrary")),g.appendChild(k),e.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct)):(g=k("newLibrary",
+mxResources.get("newLibrary")),g.style.boxSizing="border-box",g.style.paddingRight="6px",g.style.paddingLeft="6px",g.style.height="32px",g.style.left="0",g=k("openLibraryFrom",mxResources.get("openLibraryFrom")),g.style.borderLeft="1px solid lightgray",g.style.boxSizing="border-box",g.style.paddingRight="6px",g.style.paddingLeft="6px",g.style.height="32px",g.style.left="50%");e.appendChild(this.sidebarContainer);e.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==
+this.sidebarWindow){var e=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?66:10,"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,e-6,g-6,mxUtils.bind(this,function(k){this.createShapesPanel(k)}));
+this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(e){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(e);null==urlParams.rough&&(mxSettings.settings.sketchMode=e,mxSettings.save());
+this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+"html > body > div > .geToolbarContainer { box-shadow:0px 2px 10px #e0e0e0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html body .geStatus > *:not([class]) { vertical-align:top; }html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }html body .geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+
"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(f){this.doSetDarkMode(f);this.fireEvent(new mxEventObject("darkModeChanged"))};var C=document.createElement("link");C.setAttribute("rel","stylesheet");C.setAttribute("href",STYLE_PATH+"/dark.css");C.setAttribute("charset","UTF-8");C.setAttribute("type","text/css");
-EditorUi.prototype.doSetDarkMode=function(f){if(Editor.darkMode!=f){var g=this.editor.graph;Editor.darkMode=f;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";g.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;g.view.gridColor=g.view.defaultGridColor;g.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.defaultPageBorderColor=Editor.isDarkMode()?"#505759":
-"#ffffff";g.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";g.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";g.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.loadStylesheet();null!=this.actions.layersWindow&&(f=this.actions.layersWindow.window.isVisible(),
-this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,f&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=g.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=g.defaultPageBorderColor;
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(e){this.doSetDarkMode(e);this.fireEvent(new mxEventObject("darkModeChanged"))};var C=document.createElement("link");C.setAttribute("rel","stylesheet");C.setAttribute("href",STYLE_PATH+"/dark.css");C.setAttribute("charset","UTF-8");C.setAttribute("type","text/css");
+EditorUi.prototype.doSetDarkMode=function(e){if(Editor.darkMode!=e){var g=this.editor.graph;Editor.darkMode=e;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";g.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;g.view.gridColor=g.view.defaultGridColor;g.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.defaultPageBorderColor=Editor.isDarkMode()?"#505759":
+"#ffffff";g.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";g.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";g.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.loadStylesheet();null!=this.actions.layersWindow&&(e=this.actions.layersWindow.window.isVisible(),
+this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,e&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=g.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=g.defaultPageBorderColor;
Graph.prototype.shapeBackgroundColor=g.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=g.shapeForegroundColor;Graph.prototype.defaultThemeName=g.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=
Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==C.parentNode&&document.getElementsByTagName("head")[0].appendChild(C):
-null!=C.parentNode&&C.parentNode.removeChild(C)}};EditorUi.prototype.setPagesVisible=function(f){Editor.pagesVisible!=f&&(Editor.pagesVisible=f,mxSettings.settings.pagesVisible=f,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(f,g){this.sidebar.sidebarTitles!=f&&(this.sidebar.sidebarTitles=f,this.sidebar.refresh(),this.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=f,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
-EditorUi.prototype.setInlineFullscreen=function(f){Editor.inlineFullscreen!=f&&(Editor.inlineFullscreen=f,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(f){Editor.sketchMode!=
-f&&(Editor.sketchMode=f,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var f=this.editor.graph;f.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)f.defaultEdgeStyle.fontSize=null,f.defaultVertexStyle.fontSize=
-null;else{f.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var g=parseInt(this.menus.defaultFontSize)-4;f.defaultEdgeStyle.fontSize=g}"simple"==Editor.currentTheme&&(f.defaultEdgeStyle.edgeStyle="none",f.defaultEdgeStyle.curved="1",f.defaultEdgeStyle.rounded="0",f.defaultEdgeStyle.jettySize="auto",f.defaultEdgeStyle.orthogonalLoop="1",f.defaultEdgeStyle.endArrow="open",f.defaultEdgeStyle.endSize="14",f.defaultEdgeStyle.startSize="14",f.defaultEdgeStyle.sourcePerimeterSpacing="8",f.defaultEdgeStyle.targetPerimeterSpacing=
-"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),f.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,f.defaultVertexStyle.fontSource=Editor.sketchFontSource,f.defaultVertexStyle.hachureGap="4",f.defaultVertexStyle.sketch="1",f.defaultVertexStyle.jiggle="2",f.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,f.defaultEdgeStyle.fontSource=Editor.sketchFontSource,f.defaultEdgeStyle.sketch="1",f.defaultEdgeStyle.jiggle="2",f.defaultEdgeStyle.hachureGap=
-"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(f){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(f)){var k=f.indexOf(",");0<k&&(g=this.getPageById(f.substring(k+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==f.substring(0,5)&&(g=mxResources.get("action"));return g};
-EditorUi.prototype.handleCustomLink=function(f){if(Graph.isPageLink(f)){var g=f.indexOf(",");if(f=this.getPageById(f.substring(g+1)))this.selectPage(f);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(f)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
-ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,
-g){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(f=g.getProperty("customFonts"),this.menus.customFonts=f,mxSettings.setCustomFonts(f));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,g){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
-null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
-mxUtils.bind(this,function(f,g){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,g){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
-this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(f,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(n,v){try{this.spinner.stop();var x=this.createImageDataUri(n,g,"png"),E=parseInt(v.getAttribute("width")),z=parseInt(v.getAttribute("height"));this.writeImageToClipboard(x,E,z,mxUtils.bind(this,function(G){this.handleError(G)}))}catch(G){this.handleError(G)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!1,null,0<f.length?f:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(f,g,k,n){var v=this.base64ToBlob(f.substring(f.indexOf(",")+1),"image/png");f=new ClipboardItem({"image/png":v,"text/html":new Blob(['<img src="'+f+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([f])["catch"](n)};EditorUi.prototype.copyCells=function(f,g){var k=this.editor.graph;if(k.isSelectionEmpty())f.innerText="";else{var n=
-mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),v=mxUtils.getXml(k.encodeCells(n));mxUtils.setTextContent(f,encodeURIComponent(v));g?(k.removeCells(n,!1),k.lastPasteXml=null):(k.lastPasteXml=v,k.pasteCounter=0);f.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var f=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;g.isSelectionEmpty()||(f=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),
-g=mxUtils.getXml(g.encodeCells(f)),navigator.clipboard.writeText(g))}return f};EditorUi.prototype.pasteXml=function(f,g,k,n){var v=this.editor.graph,x=null;v.lastPasteXml==f?v.pasteCounter++:(v.lastPasteXml=f,v.pasteCounter=0);var E=v.pasteCounter*v.gridSize;if(k||this.isCompatibleString(f))x=this.importXml(f,E,E),v.setSelectionCells(x);else if(g&&1==v.getSelectionCount()){E=v.getStartEditingCell(v.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&"image"==v.getCurrentCellStyle(E)[mxConstants.STYLE_SHAPE])v.setCellStyles(mxConstants.STYLE_IMAGE,
-f,[E]);else{v.model.beginUpdate();try{v.labelChanged(E,f),Graph.isLink(f)&&v.setLinkForCell(E,f)}finally{v.model.endUpdate()}}v.setSelectionCell(E)}else x=v.getInsertPoint(),v.isMouseInsertPoint()&&(E=0,v.lastPasteXml==f&&0<v.pasteCounter&&v.pasteCounter--),x=this.insertTextAt(f,x.x+E,x.y+E,!0),v.setSelectionCells(x);v.isSelectionEmpty()||(v.scrollCellToVisible(v.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(v.view.getState(v.getSelectionCell())));return x};EditorUi.prototype.pasteCells=
-function(f,g,k,n){if(!mxEvent.isConsumed(f)){var v=g,x=!1;if(k&&null!=f.clipboardData&&f.clipboardData.getData){var E=f.clipboardData.getData("text/plain"),z=!1;if(null!=E&&0<E.length&&"%3CmxGraphModel%3E"==E.substring(0,18))try{var G=decodeURIComponent(E);this.isCompatibleString(G)&&(z=!0,E=G)}catch(K){}z=z?null:f.clipboardData.getData("text/html");null!=z&&0<z.length?(v=this.parseHtmlData(z),x="text/plain"!=v.getAttribute("data-type")):null!=E&&0<E.length&&(v=document.createElement("div"),mxUtils.setTextContent(v,
-z))}E=v.getElementsByTagName("span");if(null!=E&&0<E.length&&"application/vnd.lucid.chart.objects"===E[0].getAttribute("data-lucid-type"))k=E[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(K){var N=this.editor.graph;N.lastPasteXml==K?N.pasteCounter++:(N.lastPasteXml=K,N.pasteCounter=0);var I=N.pasteCounter*N.gridSize;N.setSelectionCells(this.importXml(K,I,I));N.scrollCellToVisible(N.getSelectionCell())}),mxUtils.bind(this,function(K){this.handleError(K)})),
-mxEvent.consume(f));else{var F=x?v.innerHTML:mxUtils.trim(null==v.innerText?mxUtils.getTextContent(v):v.innerText),U=!1;try{var p=F.lastIndexOf("%3E");0<=p&&p<F.length-3&&(F=F.substring(0,p+3))}catch(K){}try{E=v.getElementsByTagName("span"),(G=null!=E&&0<E.length?mxUtils.trim(decodeURIComponent(E[0].textContent)):decodeURIComponent(F))&&(this.isCompatibleString(G)||0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(U=!0,F=G)}catch(K){}try{if(null!=F&&0<F.length){if(0==F.substring(0,
-20).replace(/\s/g,"").indexOf('{"isProtected":')){var u=mxUtils.bind(this,function(){try{F=(new MiroImporter).importMiroJson(JSON.parse(F)),this.pasteXml(F,n,U,f)}catch(K){console.log("Miro import error:",K)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",u):u()}else this.pasteXml(F,n,U,f);try{mxEvent.consume(f)}catch(K){}}else if(!k){var H=this.editor.graph;H.lastPasteXml=null;H.pasteCounter=0}}catch(K){this.handleError(K)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=
-function(f){if(Graph.fileSupport)for(var g=null,k=0;k<f.length;k++)mxEvent.addListener(f[k],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(f[k],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(f[k],"drop",
-mxUtils.bind(this,function(n){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,!0);else{var v=this.extractGraphModelFromEvent(n);if(null==v){var x=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=x&&(10==
-document.documentMode||11==document.documentMode?v=x.getData("Text"):(v=null,v=0<=mxUtils.indexOf(x.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(x.types,"text/html")?x.getData("text/html"):null,null!=v&&0<v.length?(x=document.createElement("div"),x.innerHTML=this.editor.graph.sanitizeHtml(v),x=x.getElementsByTagName("img"),0<x.length&&(v=x[0].getAttribute("src"))):0<=mxUtils.indexOf(x.types,"text/plain")&&(v=x.getData("text/plain"))),null!=v&&(Editor.isPngDataUrl(v)?
-(v=Editor.extractGraphModelFromPng(v),null!=v&&0<v.length&&this.openLocalFile(v,null,!0)):this.isRemoteFileFormat(v)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(v))).send(mxUtils.bind(this,function(E){200<=E.getStatus()&&299>=E.getStatus()&&this.openLocalFile(E.getText(),null,!0)})):/^https?:\/\//.test(v)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(v):window.openWindow((mxClient.IS_CHROMEAPP?
-EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(v)))))}else this.openLocalFile(v,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(f){var g=0,k=0;if(null==f){var n=document.body;var v=document.documentElement;var x=(n.clientWidth||v.clientWidth)-3;n=Math.max(n.clientHeight||0,v.clientHeight)-3}else g=f.offsetTop,k=f.offsetLeft,x=f.clientWidth,n=f.clientHeight;v=document.createElement("div");v.style.zIndex=
-mxPopupMenu.prototype.zIndex+2;v.style.border="3px dotted rgb(254, 137, 12)";v.style.pointerEvents="none";v.style.position="absolute";v.style.top=g+"px";v.style.left=k+"px";v.style.width=Math.max(0,x-3)+"px";v.style.height=Math.max(0,n-3)+"px";null!=f&&f.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(v):document.body.appendChild(v);return v};EditorUi.prototype.stringToCells=function(f){f=mxUtils.parseXml(f);var g=this.editor.extractGraphModel(f.documentElement);f=
-[];if(null!=g){var k=new mxCodec(g.ownerDocument),n=new mxGraphModel;k.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(k=0;k<n.getChildCount(g);k++)f.push(n.getChildAt(g,k))}return f};EditorUi.prototype.openFileHandle=function(f,g,k,n,v){if(null!=g&&0<g.length){!this.useCanvasForExport&&/(\.png)$/i.test(g)?g=g.substring(0,g.length-4)+".drawio":/(\.pdf)$/i.test(g)&&(g=g.substring(0,g.length-4)+".drawio");var x=mxUtils.bind(this,function(z){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":
-g+".drawio";if("<mxlibrary"==z.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,z,g))}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(z,g,n)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k,mxUtils.bind(this,function(z){this.spinner.stop();x(z)}));else if(/(\.*<graphml )/.test(f))this.importGraphML(f,
-mxUtils.bind(this,function(z){this.spinner.stop();x(z)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(z){4==z.readyState&&(this.spinner.stop(),200<=z.status&&299>=z.status?x(z.responseText):this.handleError({message:mxResources.get(413==z.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-else if(this.isLucidChartData(f))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(f,mxUtils.bind(this,function(z){this.spinner.stop();this.openLocalFile(z,g,n)}),mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}));else if("<mxlibrary"==f.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,f,k.name))}catch(z){this.handleError(z,
-mxResources.get("errorLoadingFile"))}}else if(0==f.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(z){this.spinner.stop();x(z)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(f,g,n)}));else{if("image/png"==k.type.substring(0,9))f=this.extractGraphModelFromPng(f);else if("application/pdf"==k.type){var E=Editor.extractGraphModelFromPdf(f);null!=E&&(v=null,n=!0,f=E)}this.spinner.stop();this.openLocalFile(f,g,n,v,null!=v?k:null)}}};EditorUi.prototype.openFiles=function(f,
-g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<f.length;k++)mxUtils.bind(this,function(n){var v=new FileReader;v.onload=mxUtils.bind(this,function(x){try{this.openFileHandle(x.target.result,n.name,n,g)}catch(E){this.handleError(E)}});v.onerror=mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x);window.openFile=null});"image"!==n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?v.readAsText(n):v.readAsDataURL(n)})(f[k])};
-EditorUi.prototype.openLocalFile=function(f,g,k,n,v){var x=this.getCurrentFile(),E=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var z=mxUtils.parseXml(f);null!=z&&(this.editor.setGraphXml(z.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,f,g||this.defaultFilename,k,n,v))});if(null!=f&&0<f.length)null==x||!x.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?E():(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||null!=n)&&null!=x&&x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(f,g),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=x&&x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E()})));else throw Error(mxResources.get("notADiagramFile"));
-};EditorUi.prototype.getBasenames=function(){var f={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,f);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),f);g=[];for(var k in f)g.push(k);return g};EditorUi.prototype.addBasenamesForCell=function(f,g){function k(E){if(null!=E){var z=E.lastIndexOf(".");0<z&&(E=E.substring(z+1,E.length));null==g[E]&&(g[E]=!0)}}var n=this.editor.graph,v=n.getCellStyle(f);
-k(mxStencilRegistry.getBasenameForStencil(v[mxConstants.STYLE_SHAPE]));n.model.isEdge(f)&&(k(mxMarker.getPackageForType(v[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(v[mxConstants.STYLE_ENDARROW])));v=n.model.getChildCount(f);for(var x=0;x<v;x++)this.addBasenamesForCell(n.model.getChildAt(f,x),g)};EditorUi.prototype.setGraphEnabled=function(f){this.diagramContainer.style.visibility=f?"":"hidden";this.formatContainer.style.visibility=f?"":"hidden";this.sidebarFooterContainer.style.display=
-f?"":"none";this.sidebarContainer.style.display=f?"":"none";this.hsplit.style.display=f?"":"none";this.editor.graph.setEnabled(f);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=f?"":"hidden",this.ruler.vRuler.container.style.visibility=f?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=f?"":"hidden");f||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),
-null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var f=!1;this.installMessageHandler(mxUtils.bind(this,function(g,
-k,n,v){f||(f=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(v)try{var x=this.editor.graph;x.setGridEnabled(!1);x.pageVisible=!1;var E=x.model.cells,z;for(z in E){var G=E[z];null!=G&&null!=G.style&&(G.style+=";sketch=1;"+(-1==G.style.indexOf("fontFamily=")||-1<G.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(F){console.log(F)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=n?n:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(f,g){null!=f?f.getPublicUrl(g):g(null)};EditorUi.prototype.createLoadMessage=function(f){var g=this.editor.graph;return{event:f,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(f){var g=this.editor.graph;
-g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(v){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=f?!f:!0,data:Editor.createSvgDataUri(v)}),"*")}),null,null,!0,n,1,this.embedExportBorder)}else f||
-k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");f||(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(f){var g=null,k=!1,n=!1,v=null,x=mxUtils.bind(this,function(G,F){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,x);mxEvent.addListener(window,"message",mxUtils.bind(this,function(G){if(G.source==(window.opener||window.parent)){var F=G.data,U=null,p=mxUtils.bind(this,function(Z){if(null!=Z&&"function"===typeof Z.charAt&&"<"!=Z.charAt(0))try{Editor.isPngDataUrl(Z)?Z=Editor.extractGraphModelFromPng(Z):"data:image/svg+xml;base64,"==Z.substring(0,
-26)?Z=atob(Z.substring(26)):"data:image/svg+xml;utf8,"==Z.substring(0,24)&&(Z=Z.substring(24)),null!=Z&&("%"==Z.charAt(0)?Z=decodeURIComponent(Z):"<"!=Z.charAt(0)&&(Z=Graph.decompress(Z)))}catch(ia){}return Z});if("json"==urlParams.proto){var u=!1;try{F=JSON.parse(F),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[G],"data",[F])}catch(Z){F=null}try{if(null==F)return;if("dialog"==F.action){this.showError(null!=F.titleKey?mxResources.get(F.titleKey):F.title,null!=F.messageKey?mxResources.get(F.messageKey):
-F.message,null!=F.buttonKey?mxResources.get(F.buttonKey):F.button);null!=F.modified&&(this.editor.modified=F.modified);return}if("layout"==F.action){this.executeLayouts(this.editor.graph.createLayouts(F.layouts));return}if("prompt"==F.action){this.spinner.stop();var H=new FilenameDialog(this,F.defaultValue||"",null!=F.okKey?mxResources.get(F.okKey):F.ok,function(Z){null!=Z?E.postMessage(JSON.stringify({event:"prompt",value:Z,message:F}),"*"):E.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),
-"*")},null!=F.titleKey?mxResources.get(F.titleKey):F.title);this.showDialog(H.container,300,80,!0,!1);H.init();return}if("draft"==F.action){var K=p(F.xml);this.spinner.stop();H=new DraftDialog(this,mxResources.get("draftFound",[F.name||this.defaultFilename]),K,mxUtils.bind(this,function(){this.hideDialog();E.postMessage(JSON.stringify({event:"draft",result:"edit",message:F}),"*")}),mxUtils.bind(this,function(){this.hideDialog();E.postMessage(JSON.stringify({event:"draft",result:"discard",message:F}),
-"*")}),F.editKey?mxResources.get(F.editKey):null,F.discardKey?mxResources.get(F.discardKey):null,F.ignore?mxUtils.bind(this,function(){this.hideDialog();E.postMessage(JSON.stringify({event:"draft",result:"ignore",message:F}),"*")}):null);this.showDialog(H.container,640,480,!0,!1,mxUtils.bind(this,function(Z){Z&&this.actions.get("exit").funct()}));try{H.init()}catch(Z){E.postMessage(JSON.stringify({event:"draft",error:Z.toString(),message:F}),"*")}return}if("template"==F.action){this.spinner.stop();
-var N=1==F.enableRecent,I=1==F.enableSearch,L=1==F.enableCustomTemp;if("1"==urlParams.newTempDlg&&!F.templatesOnly&&null!=F.callback){var Q=this.getCurrentUser(),P=new TemplatesDialog(this,function(Z,ia,ea){Z=Z||this.emptyDiagramXml;E.postMessage(JSON.stringify({event:"template",xml:Z,blank:Z==this.emptyDiagramXml,name:ia,tempUrl:ea.url,libs:ea.libs,builtIn:null!=ea.info&&null!=ea.info.custContentId,message:F}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=
-Q?Q.id:null,N?mxUtils.bind(this,function(Z,ia,ea){this.remoteInvoke("getRecentDiagrams",[ea],null,Z,ia)}):null,I?mxUtils.bind(this,function(Z,ia,ea,va){this.remoteInvoke("searchDiagrams",[Z,va],null,ia,ea)}):null,mxUtils.bind(this,function(Z,ia,ea){this.remoteInvoke("getFileContent",[Z.url],null,ia,ea)}),null,L?mxUtils.bind(this,function(Z){this.remoteInvoke("getCustomTemplates",null,null,Z,function(){Z({},0)})}):null,!1,!1,!0,!0);this.showDialog(P.container,window.innerWidth,window.innerHeight,!0,
-!1,null,!1,!0);return}H=new NewDialog(this,!1,F.templatesOnly?!1:null!=F.callback,mxUtils.bind(this,function(Z,ia,ea,va){Z=Z||this.emptyDiagramXml;null!=F.callback?E.postMessage(JSON.stringify({event:"template",xml:Z,blank:Z==this.emptyDiagramXml,name:ia,tempUrl:ea,libs:va,builtIn:!0,message:F}),"*"):(f(Z,G,Z!=this.emptyDiagramXml,F.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,N?mxUtils.bind(this,function(Z){this.remoteInvoke("getRecentDiagrams",
-[null],null,Z,function(){Z(null,"Network Error!")})}):null,I?mxUtils.bind(this,function(Z,ia){this.remoteInvoke("searchDiagrams",[Z,null],null,ia,function(){ia(null,"Network Error!")})}):null,mxUtils.bind(this,function(Z,ia,ea){E.postMessage(JSON.stringify({event:"template",docUrl:Z,info:ia,name:ea}),"*")}),null,null,L?mxUtils.bind(this,function(Z){this.remoteInvoke("getCustomTemplates",null,null,Z,function(){Z({},0)})}):null,1==F.withoutType);this.showDialog(H.container,620,460,!0,!1,mxUtils.bind(this,
-function(Z){this.sidebar.hideTooltip();Z&&this.actions.get("exit").funct()}));H.init();return}if("textContent"==F.action){var V=this.getDiagramTextContent();E.postMessage(JSON.stringify({event:"textContent",data:V,message:F}),"*");return}if("status"==F.action){null!=F.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(F.messageKey))):null!=F.message&&this.editor.setStatus(mxUtils.htmlEntities(F.message));null!=F.modified&&(this.editor.modified=F.modified);return}if("spinner"==F.action){var W=
-null!=F.messageKey?mxResources.get(F.messageKey):F.message;null==F.show||F.show?this.spinner.spin(document.body,W):this.spinner.stop();return}if("exit"==F.action){this.actions.get("exit").funct();return}if("viewport"==F.action){null!=F.viewport&&(this.embedViewport=F.viewport);return}if("snapshot"==F.action){this.sendEmbeddedSvgExport(!0);return}if("export"==F.action){if("png"==F.format||"xmlpng"==F.format){if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):
-F.spin)){var q=null!=F.xml?F.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var D=this.editor.graph,M=mxUtils.bind(this,function(Z){this.editor.graph.setEnabled(!0);this.spinner.stop();var ia=this.createLoadMessage("export");ia.format=F.format;ia.message=F;ia.data=Z;ia.xml=q;E.postMessage(JSON.stringify(ia),"*")}),T=mxUtils.bind(this,function(Z){null==Z&&(Z=Editor.blankImage);"xmlpng"==F.format&&(Z=Editor.writeGraphModelToPng(Z,"tEXt","mxfile",encodeURIComponent(q)));D!=this.editor.graph&&
-D.container.parentNode.removeChild(D.container);M(Z)}),O=F.pageId||(null!=this.pages?F.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var R=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=O){var Z=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());for(var ia,ea=0;ea<this.pages.length;ea++)if(this.pages[ea].getId()==O){ia=this.updatePageRoot(this.pages[ea]);break}null==ia&&(ia=this.currentPage);D.getGlobalVariable=
-function(ua){return"page"==ua?ia.getName():"pagenumber"==ua?1:Z.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(ia.root)}if(null!=F.layerIds){var va=D.model,za=va.getChildCells(va.getRoot()),ya={};for(ea=0;ea<F.layerIds.length;ea++)ya[F.layerIds[ea]]=!0;for(ea=0;ea<za.length;ea++)va.setVisible(za[ea],ya[za[ea].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ua){T(ua.toDataURL("image/png"))}),F.width,null,F.background,mxUtils.bind(this,function(){T(null)}),
-null,null,F.scale,F.transparent,F.shadow,null,D,F.border,null,F.grid,F.keepTheme)});null!=F.xml&&0<F.xml.length&&(k=!0,this.setFileData(q),k=!1);R()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==F.format?"1":"0")+(null!=O?"&pageId="+O:"")+(null!=F.layerIds&&0<F.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:F.layerIds})):"")+(null!=F.scale?"&scale="+F.scale:"")+"&base64=1&xml="+encodeURIComponent(q))).send(mxUtils.bind(this,function(Z){200<=Z.getStatus()&&
-299>=Z.getStatus()?M("data:image/png;base64,"+Z.getText()):T(null)}),mxUtils.bind(this,function(){T(null)}))}}else if(R=mxUtils.bind(this,function(){var Z=this.createLoadMessage("export");Z.message=F;if("html2"==F.format||"html"==F.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ia=this.getXmlFileData();Z.xml=mxUtils.getXml(ia);Z.data=this.getFileData(null,null,!0,null,null,null,ia);Z.format=F.format}else if("html"==F.format)ia=this.editor.getGraphXml(),Z.data=this.getHtml(ia,
-this.editor.graph),Z.xml=mxUtils.getXml(ia),Z.format=F.format;else{mxSvgCanvas2D.prototype.foAltText=null;ia=null!=F.background?F.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);Z.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Z.format="svg";var ea=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();Z.data=Editor.createSvgDataUri(va);E.postMessage(JSON.stringify(Z),"*")});if("xmlsvg"==F.format)(null==F.spin&&null==F.spinKey||
-this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin))&&this.getEmbeddedSvg(Z.xml,this.editor.graph,null,!0,ea,null,null,F.embedImages,ia,F.scale,F.border,F.shadow,F.keepTheme);else if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin))this.editor.graph.setEnabled(!1),ia=this.editor.graph.getSvg(ia,F.scale,F.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||F.shadow,null,F.keepTheme),(this.editor.graph.shadowVisible||
-F.shadow)&&this.editor.graph.addSvgShadow(ia),this.embedFonts(ia,mxUtils.bind(this,function(va){F.embedImages||null==F.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(za){ea(mxUtils.getXml(za))})):ea(mxUtils.getXml(va))}));return}E.postMessage(JSON.stringify(Z),"*")}),null!=F.xml&&0<F.xml.length){if(this.editor.graph.mathEnabled){var S=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){S.apply(this,arguments);R()}}k=!0;this.setFileData(F.xml);k=!1;this.editor.graph.mathEnabled||
-R()}else R();return}if("load"==F.action){u=F.toSketch;n=1==F.autosave;this.hideDialog();null!=F.modified&&null==urlParams.modified&&(urlParams.modified=F.modified);null!=F.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=F.saveAndExit);null!=F.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=F.noSaveBtn);if(null!=F.rough){var X=Editor.sketchMode;this.doSetSketchMode(F.rough);X!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=F.dark&&this.setDarkMode(F.dark);
-null!=F.border&&(this.embedExportBorder=F.border);null!=F.background&&(this.embedExportBackground=F.background);null!=F.viewport&&(this.embedViewport=F.viewport);this.embedExitPoint=null;if(null!=F.rect){var Y=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=F.rect.top+"px";this.diagramContainer.style.left=F.rect.left+"px";this.diagramContainer.style.height=F.rect.height+"px";this.diagramContainer.style.width=F.rect.width+"px";this.diagramContainer.style.bottom=
-"";this.diagramContainer.style.right="";U=mxUtils.bind(this,function(){var Z=this.editor.graph,ia=Z.maxFitScale;Z.maxFitScale=F.maxFitScale;Z.fit(2*Y);Z.maxFitScale=ia;Z.container.scrollTop-=2*Y;Z.container.scrollLeft-=2*Y;this.fireEvent(new mxEventObject("editInlineStart","data",[F]))})}null!=F.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=F.noExitBtn);null!=F.title&&null!=this.buttonContainer&&(K=document.createElement("span"),mxUtils.write(K,F.title),null!=this.embedFilenameSpan&&
-this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(K),this.embedFilenameSpan=K);try{F.libs&&this.sidebar.showEntries(F.libs)}catch(Z){}F=null!=F.xmlpng?this.extractGraphModelFromPng(F.xmlpng):null!=F.descriptor?F.descriptor:F.xml}else{if("merge"==F.action){var aa=this.getCurrentFile();null!=aa&&(K=p(F.xml),null!=K&&""!=K&&aa.mergeFile(new LocalFile(this,K),function(){E.postMessage(JSON.stringify({event:"merge",message:F}),"*")},function(Z){E.postMessage(JSON.stringify({event:"merge",
-message:F,error:Z}),"*")}))}else"remoteInvokeReady"==F.action?this.handleRemoteInvokeReady(E):"remoteInvoke"==F.action?this.handleRemoteInvoke(F,G.origin):"remoteInvokeResponse"==F.action?this.handleRemoteInvokeResponse(F):E.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(F)}),"*");return}}catch(Z){this.handleError(Z)}}var ba=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),
-da=mxUtils.bind(this,function(Z,ia){k=!0;try{f(Z,ia,null,u)}catch(ea){this.handleError(ea)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");v=ba();n&&null==g&&(g=mxUtils.bind(this,function(ea,va){ea=ba();ea==v||k||(va=this.createLoadMessage("autosave"),va.xml=ea,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));v=ea}),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)ia=this.createLoadMessage("load"),ia.xml=Z,E.postMessage(JSON.stringify(ia),
-"*");null!=U&&U()});null!=F&&"function"===typeof F.substring&&"data:application/vnd.visio;base64,"==F.substring(0,34)?(p="0M8R4KGxGuE"==F.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(F.substring(F.indexOf(",")+1)),function(Z){da(Z,G)},mxUtils.bind(this,function(Z){this.handleError(Z)}),p)):null!=F&&"function"===typeof F.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):
-this.parseFileData(F,mxUtils.bind(this,function(Z){4==Z.readyState&&200<=Z.status&&299>=Z.status&&"<mxGraphModel"==Z.responseText.substring(0,13)&&da(Z.responseText,G)}),""):null!=F&&"function"===typeof F.substring&&this.isLucidChartData(F)?this.convertLucidChart(F,mxUtils.bind(this,function(Z){da(Z)}),mxUtils.bind(this,function(Z){this.handleError(Z)})):null==F||"object"!==typeof F||null==F.format||null==F.data&&null==F.url?(F=p(F),da(F,G)):this.loadDescriptor(F,mxUtils.bind(this,function(Z){da(ba(),
-G)}),mxUtils.bind(this,function(Z){this.handleError(Z,mxResources.get("errorLoadingFile"))}))}}));var E=window.opener||window.parent;x="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";E.postMessage(x,"*");if("json"==urlParams.proto){var z=this.editor.graph.openLink;this.editor.graph.openLink=function(G,F,U){z.apply(this,arguments);E.postMessage(JSON.stringify({event:"openLink",href:G,target:F,allowOpener:U}),"*")}}};EditorUi.prototype.createEmbedButton=function(f,g,
-k,n){var v="simple"==Editor.currentTheme||"min"==Editor.currentTheme,x=document.createElement(v?"a":"button");x.setAttribute("title",f+(null!=k?" ("+k+")":""));x.style.marginLeft="6px";mxUtils.write(x,f);v?(x.className="geMenuItem"+(n?" gePrimaryBtn":""),x.style.marginLeft="8px",x.style.padding="6px"):x.className="geBigButton"+(n?"":" geBigStandardButton");mxEvent.addListener(x,"click",g);return x};EditorUi.prototype.addEmbedButtons=function(){if("1"!=urlParams.embedInline){var f=document.createElement("div");
-f.style.display="inline-block";document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&f.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,null,!0)):(f.appendChild(this.createEmbedButton(mxResources.get("save"),this.actions.get("save").funct,Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&f.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),
-this.actions.get("saveAndExit").funct)));"1"!=urlParams.noExitBtn&&f.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"==Editor.currentTheme||"min"==Editor.currentTheme?null!=this.buttonContainer&&(f.style.position="relative","simple"!=Editor.currentTheme&&(f.style.marginRight="4px","1"!=urlParams.sketch?(f.style.marginTop="6px",this.buttonContainer.style.top="6px"):this.buttonContainer.style.top=
-"0px"),this.buttonContainer.appendChild(f),this.editor.fireEvent(new mxEventObject("statusChanged"))):null!=this.menubar&&(f.style.position="absolute",f.style.padding="2px",f.style.right="62px",this.toolbar.container.appendChild(f),this.toolbar.staticElements.push(f))}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(f){this.importCsv(f)}),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(f){var g=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();f()});"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(f,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(f,g)}))};EditorUi.prototype.doImportCsv=function(f,g){try{var k=f.split("\n"),
-n=[],v=[],x=[],E={};if(0<k.length){var z={},G=this.editor.graph,F=null,U=null,p=null,u=null,H=null,K=null,N=null,I="whiteSpace=wrap;html=1;",L=null,Q=null,P="",V="auto",W="auto",q=!1,D=null,M=null,T=40,O=40,R=100,S=0,X=mxUtils.bind(this,function(){null!=g?g(pa):(G.setSelectionCells(pa),G.scrollCellToVisible(G.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Y=G.getFreeInsertPoint(),aa=Y.x,ba=Y.y;Y=ba;var da=null,Z="auto";
-Q=null;for(var ia=[],ea=null,va=null,za=0;za<k.length&&"#"==k[za].charAt(0);){f=k[za].replace(/\r$/,"");for(za++;za<k.length&&"\\"==f.charAt(f.length-1)&&"#"==k[za].charAt(0);)f=f.substring(0,f.length-1)+mxUtils.trim(k[za].substring(1)),za++;if("#"!=f.charAt(1)){var ya=f.indexOf(":");if(0<ya){var ua=mxUtils.trim(f.substring(1,ya)),ca=mxUtils.trim(f.substring(ya+1));"label"==ua?da=G.sanitizeHtml(ca):"labelname"==ua&&0<ca.length&&"-"!=ca?H=ca:"labels"==ua&&0<ca.length&&"-"!=ca?N=JSON.parse(ca):"style"==
-ua?U=ca:"parentstyle"==ua?I=ca:"unknownStyle"==ua&&"-"!=ca?K=ca:"stylename"==ua&&0<ca.length&&"-"!=ca?u=ca:"styles"==ua&&0<ca.length&&"-"!=ca?p=JSON.parse(ca):"vars"==ua&&0<ca.length&&"-"!=ca?F=JSON.parse(ca):"identity"==ua&&0<ca.length&&"-"!=ca?L=ca:"parent"==ua&&0<ca.length&&"-"!=ca?Q=ca:"namespace"==ua&&0<ca.length&&"-"!=ca?P=ca:"width"==ua?V=ca:"height"==ua?W=ca:"collapsed"==ua&&"-"!=ca?q="true"==ca:"left"==ua&&0<ca.length?D=ca:"top"==ua&&0<ca.length?M=ca:"ignore"==ua?va=ca.split(","):"connect"==
-ua?ia.push(JSON.parse(ca)):"link"==ua?ea=ca:"padding"==ua?S=parseFloat(ca):"edgespacing"==ua?T=parseFloat(ca):"nodespacing"==ua?O=parseFloat(ca):"levelspacing"==ua?R=parseFloat(ca):"layout"==ua&&(Z=ca)}}}if(null==k[za])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(k[za].replace(/\r$/,""));ya=f=null;ua=[];for(ca=0;ca<Na.length;ca++)L==Na[ca]&&(f=ca),Q==Na[ca]&&(ya=ca),ua.push(mxUtils.trim(Na[ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));
-null==da&&(da="%"+ua[0]+"%");if(null!=ia)for(var Ka=0;Ka<ia.length;Ka++)null==z[ia[Ka].to]&&(z[ia[Ka].to]={});L=[];for(ca=za+1;ca<k.length;ca++){var Ba=this.editor.csvToArray(k[ca].replace(/\r$/,""));if(null==Ba){var Fa=40<k[ca].length?k[ca].substring(0,40)+"...":k[ca];throw Error(Fa+" ("+ca+"):\n"+mxResources.get("containsValidationErrors"));}0<Ba.length&&L.push(Ba)}G.model.beginUpdate();try{for(ca=0;ca<L.length;ca++){Ba=L[ca];var na=null,Ja=null!=f?P+Ba[f]:null;k=!1;null!=Ja&&(na=G.model.getCell(Ja),
-k=null==na||0<=mxUtils.indexOf(n,na));var ra=new mxCell(da,new mxGeometry(aa,Y,0,0),U||"whiteSpace=wrap;html=1;");ra.collapsed=q;ra.vertex=!0;ra.id=Ja;null==na||k||G.model.setCollapsed(na,q);for(var ha=0;ha<Ba.length;ha++)G.setAttributeForCell(ra,ua[ha],Ba[ha]),null==na||k||G.setAttributeForCell(na,ua[ha],Ba[ha]);if(null!=H&&null!=N){var fa=N[ra.getAttribute(H)];null!=fa&&(G.labelChanged(ra,fa),null==na||k||G.cellLabelChanged(na,fa))}if(null!=u&&null!=p){var wa=p[ra.getAttribute(u)];null!=wa&&(ra.style=
-wa)}G.setAttributeForCell(ra,"placeholders","1");ra.style=G.replacePlaceholders(ra,ra.style,F);null==na||k?G.fireEvent(new mxEventObject("cellsInserted","cells",[ra])):(G.model.setStyle(na,ra.style),0>mxUtils.indexOf(x,na)&&x.push(na),G.fireEvent(new mxEventObject("cellsInserted","cells",[na])));k=null!=na;na=ra;if(!k)for(Ka=0;Ka<ia.length;Ka++)z[ia[Ka].to][na.getAttribute(ia[Ka].to)]=na;null!=ea&&"link"!=ea&&(G.setLinkForCell(na,na.getAttribute(ea)),G.setAttributeForCell(na,ea,null));var ja=this.editor.graph.getPreferredSizeForCell(na);
-Q=null!=ya?G.model.getCell(P+Ba[ya]):null;if(na.vertex){Fa=null!=Q?0:aa;za=null!=Q?0:ba;null!=D&&null!=na.getAttribute(D)&&(na.geometry.x=Fa+parseFloat(na.getAttribute(D)));null!=M&&null!=na.getAttribute(M)&&(na.geometry.y=za+parseFloat(na.getAttribute(M)));var ma="@"==V.charAt(0)?na.getAttribute(V.substring(1)):null;na.geometry.width=null!=ma&&"auto"!=ma?parseFloat(na.getAttribute(V.substring(1))):"auto"==V||"auto"==ma?ja.width+S:parseFloat(V);var sa="@"==W.charAt(0)?na.getAttribute(W.substring(1)):
-null;na.geometry.height=null!=sa&&"auto"!=sa?parseFloat(sa):"auto"==W||"auto"==sa?ja.height+S:parseFloat(W);Y+=na.geometry.height+O}k?(null==E[Ja]&&(E[Ja]=[]),E[Ja].push(na)):(n.push(na),null!=Q?(Q.style=G.replacePlaceholders(Q,I,F),G.addCell(na,Q),v.push(Q)):x.push(G.addCell(na)))}for(ca=0;ca<v.length;ca++)ma="@"==V.charAt(0)?v[ca].getAttribute(V.substring(1)):null,sa="@"==W.charAt(0)?v[ca].getAttribute(W.substring(1)):null,"auto"!=V&&"auto"!=ma||"auto"!=W&&"auto"!=sa||G.updateGroupBounds([v[ca]],
-S,!0);var oa=x.slice(),pa=x.slice();for(Ka=0;Ka<ia.length;Ka++){var Ea=ia[Ka];for(ca=0;ca<n.length;ca++){na=n[ca];var ka=mxUtils.bind(this,function(Ha,La,Ma){var Pa=La.getAttribute(Ma.from);if(null!=Pa&&""!=Pa){Pa=Pa.split(",");for(var Ra=0;Ra<Pa.length;Ra++){var Ua=z[Ma.to][Pa[Ra]];if(null==Ua&&null!=K){Ua=new mxCell(Pa[Ra],new mxGeometry(aa,ba,0,0),K);Ua.style=G.replacePlaceholders(La,Ua.style,F);var Ia=this.editor.graph.getPreferredSizeForCell(Ua);Ua.geometry.width=Ia.width+S;Ua.geometry.height=
-Ia.height+S;z[Ma.to][Pa[Ra]]=Ua;Ua.vertex=!0;Ua.id=Pa[Ra];x.push(G.addCell(Ua))}if(null!=Ua){Ia=Ma.label;null!=Ma.fromlabel&&(Ia=(La.getAttribute(Ma.fromlabel)||"")+(Ia||""));null!=Ma.sourcelabel&&(Ia=G.replacePlaceholders(La,Ma.sourcelabel,F)+(Ia||""));null!=Ma.tolabel&&(Ia=(Ia||"")+(Ua.getAttribute(Ma.tolabel)||""));null!=Ma.targetlabel&&(Ia=(Ia||"")+G.replacePlaceholders(Ua,Ma.targetlabel,F));var Ta="target"==Ma.placeholders==!Ma.invert?Ua:Ha;Ta=null!=Ma.style?G.replacePlaceholders(Ta,Ma.style,
-F):G.createCurrentEdgeStyle();Ia=G.insertEdge(null,null,Ia||"",Ma.invert?Ua:Ha,Ma.invert?Ha:Ua,Ta);if(null!=Ma.labels)for(Ta=0;Ta<Ma.labels.length;Ta++){var Sa=Ma.labels[Ta],Wa=new mxCell(Sa.label||Ta,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Wa.vertex=!0;Wa.connectable=!1;Wa.geometry.relative=!0;null!=Sa.placeholders&&(Wa.value=G.replacePlaceholders("target"==Sa.placeholders==!Ma.invert?Ua:Ha,Wa.value,F));if(null!=Sa.dx||null!=Sa.dy)Wa.geometry.offset=new mxPoint(null!=
-Sa.dx?Sa.dx:0,null!=Sa.dy?Sa.dy:0);Ia.insert(Wa)}pa.push(Ia);mxUtils.remove(Ma.invert?Ha:Ua,oa)}}}});ka(na,na,Ea);if(null!=E[na.id])for(ha=0;ha<E[na.id].length;ha++)ka(na,E[na.id][ha],Ea)}}if(null!=va)for(ca=0;ca<n.length;ca++)for(na=n[ca],ha=0;ha<va.length;ha++)G.setAttributeForCell(na,mxUtils.trim(va[ha]),null);if(0<x.length){var la=new mxParallelEdgeLayout(G);la.spacing=T;la.checkOverlap=!0;var qa=function(){0<la.spacing&&la.execute(G.getDefaultParent());for(var Ha=0;Ha<x.length;Ha++){var La=G.getCellGeometry(x[Ha]);
-La.x=Math.round(G.snap(La.x));La.y=Math.round(G.snap(La.y));"auto"==V&&(La.width=Math.round(G.snap(La.width)));"auto"==W&&(La.height=Math.round(G.snap(La.height)))}};if("["==Z.charAt(0)){var Aa=X;G.view.validate();this.executeLayouts(G.createLayouts(JSON.parse(Z)),function(){qa();Aa()});X=null}else if("circle"==Z){var Ca=new mxCircleLayout(G);Ca.disableEdgeStyle=!1;Ca.resetEdges=!1;var Ga=Ca.isVertexIgnored;Ca.isVertexIgnored=function(Ha){return Ga.apply(this,arguments)||0>mxUtils.indexOf(x,Ha)};
-this.executeLayout(function(){Ca.execute(G.getDefaultParent());qa()},!0,X);X=null}else if("horizontaltree"==Z||"verticaltree"==Z||"auto"==Z&&pa.length==2*x.length-1&&1==oa.length){G.view.validate();var Da=new mxCompactTreeLayout(G,"horizontaltree"==Z);Da.levelDistance=O;Da.edgeRouting=!1;Da.resetEdges=!1;this.executeLayout(function(){Da.execute(G.getDefaultParent(),0<oa.length?oa[0]:null)},!0,X);X=null}else if("horizontalflow"==Z||"verticalflow"==Z||"auto"==Z&&1==oa.length){G.view.validate();var xa=
-new mxHierarchicalLayout(G,"horizontalflow"==Z?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=O;xa.parallelEdgeSpacing=T;xa.interRankCellSpacing=R;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(G.getDefaultParent(),pa);G.moveCells(pa,aa,ba)},!0,X);X=null}else if("orgchart"==Z){G.view.validate();var ta=new mxOrgChartLayout(G,2,R,O),Oa=ta.isVertexIgnored;ta.isVertexIgnored=function(Ha){return Oa.apply(this,arguments)||0>mxUtils.indexOf(x,Ha)};this.executeLayout(function(){ta.execute(G.getDefaultParent());
-qa()},!0,X);X=null}else if("organic"==Z||"auto"==Z&&pa.length>x.length){G.view.validate();var Qa=new mxFastOrganicLayout(G);Qa.forceConstant=3*O;Qa.disableEdgeStyle=!1;Qa.resetEdges=!1;var Va=Qa.isVertexIgnored;Qa.isVertexIgnored=function(Ha){return Va.apply(this,arguments)||0>mxUtils.indexOf(x,Ha)};this.executeLayout(function(){Qa.execute(G.getDefaultParent());qa()},!0,X);X=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=X&&X()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=
-function(f){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=f&&0<window.location.search.length){var k="?",n;for(n in urlParams)0>mxUtils.indexOf(f,n)&&null!=urlParams[n]&&(g+=k+n+"="+urlParams[n],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(f){f=null!=f?f:window.location.pathname;var g=0<f.indexOf("?")?1:0;if("1"==urlParams.offline)f+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-n;for(n in urlParams)0>mxUtils.indexOf(k,n)&&(f=0==g?f+"?":f+"&",null!=urlParams[n]&&(f+=n+"="+urlParams[n],g++))}return f};EditorUi.prototype.showLinkDialog=function(f,g,k,n,v){f=new LinkDialog(this,f,g,k,!0,n,v);this.showDialog(f.container,560,130,!0,!0);f.init()};EditorUi.prototype.getServiceCount=function(f){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++;f&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var f=this.getCurrentFile(),g=null!=f||"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==f||f.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));f="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);
-this.actions.get("resetView").setEnabled(g);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&f);this.actions.get("redo").setEnabled(this.canRedo()&&f);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(f);this.menus.get("arrange").setEnabled(f);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(f),null!=this.toolbar.edgeStyleMenu&&
-this.toolbar.edgeStyleMenu.setEnabled(f));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var f=this.getCurrentFile();return null!=f&&f.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var A=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
-function(f){var g=A.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){g.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}));return g};var B=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){B.apply(this,arguments);var f=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),n=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(n);this.actions.get("autosave").setEnabled(null!=
-g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(f.isEnabled());this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!f.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(n&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(n);
-this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(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")+(f.isEnabled()?"/"+mxResources.get("replace"):"");f=f.view.getState(f.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=
-f&&null!=f.shape&&null!=f.shape.stencil)};var J=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);J.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(f,g,k,n,v,x,E,z){var G=f.editor.graph;if("xml"==k)f.hideDialog(),f.saveData(g,"xml",mxUtils.getXml(f.editor.getGraphXml()),"text/xml");
-else if("svg"==k)f.hideDialog(),f.saveData(g,"svg",mxUtils.getXml(G.getSvg(n,v,x)),"image/svg+xml");else{var F=f.getFileData(!0,null,null,null,null,!0),U=G.getGraphBounds(),p=Math.floor(U.width*v/G.view.scale),u=Math.floor(U.height*v/G.view.scale);if(F.length<=MAX_REQUEST_SIZE&&p*u<MAX_AREA)if(f.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!f.isExportToCanvas()){var H={globalVars:G.getExportVariables()};z&&(H.grid={size:G.gridSize,steps:G.view.gridSteps,color:G.view.gridColor});f.saveRequest(g,k,function(K,
-N){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(N||"0")+(null!=K?"&filename="+encodeURIComponent(K):"")+"&extras="+encodeURIComponent(JSON.stringify(H))+(0<E?"&dpi="+E:"")+"&bg="+(null!=n?n:"none")+"&w="+p+"&h="+u+"&border="+x+"&xml="+encodeURIComponent(F))})}else"png"==k?f.exportImage(v,null==n||"none"==n,!0,!1,!1,x,!0,!1,null,z,E):f.exportImage(v,!1,!0,!1,!1,x,!0,!1,"jpeg",z);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
-var f=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var n=f;this.currentPage!=this.pages[k]&&(n=this.createTemporaryGraph(f.getStylesheet()),this.updatePageRoot(this.pages[k]),n.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+n.getIndexableText()+" "}else g=f.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(f){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var n=
-document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(f));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var v=document.createElement("div");v.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";v.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var x={};try{var E=mxSettings.getCustomLibraries();for(f=0;f<E.length;f++){var z=E[f];if("R"==z.substring(0,1)){var G=JSON.parse(decodeURIComponent(z.substring(1)));
-x[G[0]]={id:G[0],title:G[1],downloadUrl:G[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(F){v.innerText="";if(0==F.length)v.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var U=0;U<F.length;U++){var p=F[U];x[p.id]&&(g[p.id]=p);var u=this.addCheckbox(v,p.title,x[p.id]);(function(H,K){mxEvent.addListener(K,"change",function(){this.checked?g[H.id]=H:delete g[H.id]})})(p,u)}},mxUtils.bind(this,
-function(F){v.innerText="";var U=document.createElement("div");U.style.padding="8px";U.style.textAlign="center";mxUtils.write(U,mxResources.get("error")+": ");mxUtils.write(U,null!=F&&null!=F.message?F.message:mxResources.get("unknownError"));v.appendChild(U)}));k.appendChild(v);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var F=0,U;for(U in g)null==x[U]&&(F++,mxUtils.bind(this,function(p){this.remoteInvoke("getFileContent",[p.downloadUrl],
-null,mxUtils.bind(this,function(u){F--;0==F&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,u,p))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){F--;0==F&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[U]));for(U in x)g[U]||this.closeLibrary(new RemoteLibrary(this,null,x[U]));0==F&&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(f){this.remoteWin=f;for(var g=0;g<this.remoteInvokeQueue.length;g++)f.postMessage(this.remoteInvokeQueue[g],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(f){var g=f.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));f.error?k.error&&k.error(f.error.errResp):k.callback&&k.callback.apply(this,f.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(f,g,k,n,v){var x=!0,E=window.setTimeout(mxUtils.bind(this,function(){x=!1;v({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),z=mxUtils.bind(this,function(){window.clearTimeout(E);x&&n.apply(this,arguments)}),G=mxUtils.bind(this,function(){window.clearTimeout(E);x&&v.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:z,error:G});f=JSON.stringify({event:"remoteInvoke",funtionName:f,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(f,"*"):this.remoteInvokeQueue.push(f)};EditorUi.prototype.handleRemoteInvoke=function(f,
-g){var k=mxUtils.bind(this,function(F,U){var p={event:"remoteInvokeResponse",msgMarkers:f.msgMarkers};null!=U?p.error={errResp:U}:null!=F&&(p.resp=F);this.remoteWin.postMessage(JSON.stringify(p),"*")});try{var n=f.funtionName,v=this.remoteInvokableFns[n];if(null!=v&&"function"===typeof this[n]){if(v.allowedDomains){for(var x=!1,E=0;E<v.allowedDomains.length;E++)if(g=="https://"+v.allowedDomains[E]){x=!0;break}if(!x){k(null,"Invalid Call: "+n+" is not allowed.");return}}var z=f.functionArgs;Array.isArray(z)||
-(z=[]);if(v.isAsync)z.push(function(){k(Array.prototype.slice.apply(arguments))}),z.push(function(F){k(null,F||"Unkown Error")}),this[n].apply(this,z);else{var G=this[n].apply(this,z);k([G])}}else k(null,"Invalid Call: "+n+" is not found.")}catch(F){k(null,"Invalid Call: An error occurred, "+F.message)}};EditorUi.prototype.openDatabase=function(f,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var n=k.open("database",2);n.onupgradeneeded=
-function(v){try{var x=n.result;1>v.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>v.oldVersion&&(x.createObjectStore("files",{keyPath:"title"}),x.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(E){null!=g&&g(E)}};n.onsuccess=mxUtils.bind(this,function(v){var x=n.result;this.database=x;EditorUi.migrateStorageFiles&&(StorageFile.migrate(x),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(E){if(!E||"1"==urlParams.forceMigration){var z=document.createElement("iframe");z.style.display="none";z.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(z);var G=!0,F=!1,U,p=0,u=mxUtils.bind(this,function(){F=!0;this.setDatabaseItem(".drawioMigrated3",!0);z.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),H=mxUtils.bind(this,function(){p++;K()}),K=mxUtils.bind(this,function(){try{if(p>=U.length)u();else{var I=U[p];StorageFile.getFileContent(this,I,mxUtils.bind(this,function(L){null==L||".scratchpad"==I&&L==this.emptyLibraryXml?z.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[I]}),"*"):H()}),H)}}catch(L){console.log(L)}}),N=mxUtils.bind(this,function(I){try{this.setDatabaseItem(null,[{title:I.title,
-size:I.data.length,lastModified:Date.now(),type:I.isLib?"L":"F"},{title:I.title,data:I.data}],H,H,["filesInfo","files"])}catch(L){console.log(L)}});E=mxUtils.bind(this,function(I){try{if(I.source==z.contentWindow){var L={};try{L=JSON.parse(I.data)}catch(Q){}"init"==L.event?(z.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),z.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=L.event||F||
-(G?null!=L.resp&&0<L.resp.length&&null!=L.resp[0]?(U=L.resp[0],G=!1,K()):u():null!=L.resp&&0<L.resp.length&&null!=L.resp[0]?N(L.resp[0]):H())}}catch(Q){console.log(Q)}});window.addEventListener("message",E)}})));f(x);x.onversionchange=function(){x.close()}});n.onerror=g;n.onblocked=function(){}}catch(v){null!=g&&g(v)}else null!=g&&g()}else f(this.database)};EditorUi.prototype.setDatabaseItem=function(f,g,k,n,v){this.openDatabase(mxUtils.bind(this,function(x){try{v=v||"objects";Array.isArray(v)||(v=
-[v],f=[f],g=[g]);var E=x.transaction(v,"readwrite");E.oncomplete=k;E.onerror=n;for(x=0;x<v.length;x++)E.objectStore(v[x]).put(null!=f&&null!=f[x]?{key:f[x],data:g[x]}:g[x])}catch(z){null!=n&&n(z)}}),n)};EditorUi.prototype.removeDatabaseItem=function(f,g,k,n){this.openDatabase(mxUtils.bind(this,function(v){n=n||"objects";Array.isArray(n)||(n=[n],f=[f]);v=v.transaction(n,"readwrite");v.oncomplete=g;v.onerror=k;for(var x=0;x<n.length;x++)v.objectStore(n[x]).delete(f[x])}),k)};EditorUi.prototype.getDatabaseItem=
-function(f,g,k,n){this.openDatabase(mxUtils.bind(this,function(v){try{n=n||"objects";var x=v.transaction([n],"readonly").objectStore(n).get(f);x.onsuccess=function(){g(x.result)};x.onerror=k}catch(E){null!=k&&k(E)}}),k)};EditorUi.prototype.getDatabaseItems=function(f,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var v=n.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),x=[];v.onsuccess=function(E){null==E.target.result?f(x):(x.push(E.target.result.value),
-E.target.result.continue())};v.onerror=g}catch(E){null!=g&&g(E)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(f,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var v=n.transaction([k],"readonly").objectStore(k).getAllKeys();v.onsuccess=function(){f(v.result)};v.onerror=g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.commentsSupported=function(){var f=this.getCurrentFile();return null!=f?f.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var f=
-this.getCurrentFile();return null!=f?f.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var f=this.getCurrentFile();return null!=f?f.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(f,g){var k=this.getCurrentFile();null!=k?k.getComments(f,g):f([])};EditorUi.prototype.addComment=function(f,g,k){var n=this.getCurrentFile();null!=n?n.addComment(f,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var f=this.getCurrentFile();return null!=f?
-f.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var f=this.getCurrentFile();return null!=f?f.canComment():!0};EditorUi.prototype.newComment=function(f,g){var k=this.getCurrentFile();return null!=k?k.newComment(f,g):new DrawioComment(this,null,f,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var f=this.getCurrentFile();return null!=f&&f.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(f,g){var k=this.getCurrentFile();null!=
-k&&k.getRevisions?k.getRevisions(f,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var f=this.getCurrentFile();return null!=f&&(f.constructor==DriveFile&&f.isEditable()||f.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(f){f.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(f,g,k,n,v,x,E,z){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(f,g,k,n,v,x,E,z)};EditorUi.prototype.loadFonts=function(f){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(f)};EditorUi.prototype.createSvgDataUri=function(f){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(f)};EditorUi.prototype.embedCssFonts=function(f,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(f,g)};EditorUi.prototype.embedExtFonts=function(f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(f)};EditorUi.prototype.exportToCanvas=function(f,g,k,n,v,x,E,z,G,F,U,p,u,H,K,N){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(f,g,k,n,v,x,E,z,G,F,U,p,u,H,K,N)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(f,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(f,g,k,n)};EditorUi.prototype.convertImageToDataUri=function(f,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(f,g)};EditorUi.prototype.base64Encode=function(f){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(f)};EditorUi.prototype.updateCRC=function(f,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(f,g,k,n)};EditorUi.prototype.crc32=function(f){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(f)};EditorUi.prototype.writeGraphModelToPng=function(f,g,k,n,v){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(f,g,k,n,v)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var f=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),n=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<n.length){var v=
-"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(v||n)&&f.push(k)}}return f};EditorUi.prototype.getLocalStorageFile=function(f){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(f);return{title:f,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,d,e,c,l,m){function t(){for(var H=E.getElementsByTagName("div"),K=0,N=0;N<H.length;N++)"none"!=H[N].style.display&&H[N].parentNode==E&&K++;z.style.display=0==K?"block":"none"}function y(H,K,N,I){function L(){K.removeChild(V);K.removeChild(W);P.style.display="block";Q.style.display="block"}n={div:K,comment:H,saveCallback:N,deleteOnCancel:I};var Q=K.querySelector(".geCommentTxt"),P=K.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
-"geCommentEditTxtArea";V.style.minHeight=Q.offsetHeight+"px";V.value=H.content;K.insertBefore(V,Q);var W=document.createElement("div");W.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){I?(K.parentNode.removeChild(K),t()):L();n=null});q.className="geCommentEditBtn";W.appendChild(q);var D=mxUtils.button(mxResources.get("save"),function(){Q.innerText="";H.content=V.value;mxUtils.write(Q,H.content);L();N(H);n=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
-function(M){mxEvent.isConsumed(M)||((mxEvent.isControlDown(M)||mxClient.IS_MAC&&mxEvent.isMetaDown(M))&&13==M.keyCode?(D.click(),mxEvent.consume(M)):27==M.keyCode&&(q.click(),mxEvent.consume(M)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";W.appendChild(D);K.insertBefore(W,Q);P.style.display="none";Q.style.display="none";V.focus()}function C(H,K){K.innerText="";H=new Date(H.modifiedDate);var N=b.timeSince(H);null==N&&(N=mxResources.get("lessThanAMinute"));mxUtils.write(K,mxResources.get("timeAgo",
-[N],"{1} ago"));K.setAttribute("title",H.toLocaleDateString()+" "+H.toLocaleTimeString())}function A(H){var K=document.createElement("img");K.className="geCommentBusyImg";K.src=IMAGE_PATH+"/spin.gif";H.appendChild(K);H.busyImg=K}function B(H){H.style.border="1px solid red";H.removeChild(H.busyImg)}function J(H){H.style.border="";H.removeChild(H.busyImg)}function f(H,K,N,I,L){function Q(O,R,S){var X=document.createElement("li");X.className="geCommentAction";var Y=document.createElement("a");Y.className=
+null!=C.parentNode&&C.parentNode.removeChild(C)}};EditorUi.prototype.setPagesVisible=function(e){Editor.pagesVisible!=e&&(Editor.pagesVisible=e,mxSettings.settings.pagesVisible=e,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(e,g){this.sidebar.sidebarTitles!=e&&(this.sidebar.sidebarTitles=e,this.sidebar.refresh(),this.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=e,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(e){Editor.inlineFullscreen!=e&&(Editor.inlineFullscreen=e,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(e){Editor.sketchMode!=
+e&&(Editor.sketchMode=e,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var e=this.editor.graph;e.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)e.defaultEdgeStyle.fontSize=null,e.defaultVertexStyle.fontSize=
+null;else{e.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var g=parseInt(this.menus.defaultFontSize)-4;e.defaultEdgeStyle.fontSize=g}"simple"==Editor.currentTheme&&(e.defaultEdgeStyle.edgeStyle="none",e.defaultEdgeStyle.curved="1",e.defaultEdgeStyle.rounded="0",e.defaultEdgeStyle.jettySize="auto",e.defaultEdgeStyle.orthogonalLoop="1",e.defaultEdgeStyle.endArrow="open",e.defaultEdgeStyle.endSize="14",e.defaultEdgeStyle.startSize="14",e.defaultEdgeStyle.sourcePerimeterSpacing="8",e.defaultEdgeStyle.targetPerimeterSpacing=
+"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),e.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,e.defaultVertexStyle.fontSource=Editor.sketchFontSource,e.defaultVertexStyle.hachureGap="4",e.defaultVertexStyle.sketch="1",e.defaultVertexStyle.jiggle="2",e.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,e.defaultEdgeStyle.fontSource=Editor.sketchFontSource,e.defaultEdgeStyle.sketch="1",e.defaultEdgeStyle.jiggle="2",e.defaultEdgeStyle.hachureGap=
+"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(e){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(e)){var k=e.indexOf(",");0<k&&(g=this.getPageById(e.substring(k+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==e.substring(0,5)&&(g=mxResources.get("action"));return g};
+EditorUi.prototype.handleCustomLink=function(e){if(Graph.isPageLink(e)){var g=e.indexOf(",");if(e=this.getPageById(e.substring(g+1)))this.selectPage(e);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(e)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
+ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(e){e.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(e,
+g){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(e=g.getProperty("customFonts"),this.menus.customFonts=e,mxSettings.setCustomFonts(e));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(e,g){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(e,g){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
+mxUtils.bind(this,function(e,g){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(e,g){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(e,g,k){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(q,u){try{this.spinner.stop();var x=this.createImageDataUri(q,g,"png"),E=parseInt(u.getAttribute("width")),z=parseInt(u.getAttribute("height"));this.writeImageToClipboard(x,E,z,mxUtils.bind(this,function(G){this.handleError(G)}))}catch(G){this.handleError(G)}}),null,null,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<e.length?e:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(e,g,k,q){var u=this.base64ToBlob(e.substring(e.indexOf(",")+1),"image/png");e=new ClipboardItem({"image/png":u,"text/html":new Blob(['<img src="'+e+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([e])["catch"](q)};EditorUi.prototype.copyCells=function(e,g){var k=this.editor.graph;if(k.isSelectionEmpty())e.innerText="";else{var q=
+mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),u=mxUtils.getXml(k.encodeCells(q));mxUtils.setTextContent(e,encodeURIComponent(u));g?(k.removeCells(q,!1),k.lastPasteXml=null):(k.lastPasteXml=u,k.pasteCounter=0);e.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var e=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;g.isSelectionEmpty()||(e=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),
+g=mxUtils.getXml(g.encodeCells(e)),navigator.clipboard.writeText(g))}return e};EditorUi.prototype.pasteXml=function(e,g,k,q){var u=this.editor.graph,x=null;u.lastPasteXml==e?u.pasteCounter++:(u.lastPasteXml=e,u.pasteCounter=0);var E=u.pasteCounter*u.gridSize;if(k||this.isCompatibleString(e))x=this.importXml(e,E,E),u.setSelectionCells(x);else if(g&&1==u.getSelectionCount()){E=u.getStartEditingCell(u.getSelectionCell(),q);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==u.getCurrentCellStyle(E)[mxConstants.STYLE_SHAPE])u.setCellStyles(mxConstants.STYLE_IMAGE,
+e,[E]);else{u.model.beginUpdate();try{u.labelChanged(E,e),Graph.isLink(e)&&u.setLinkForCell(E,e)}finally{u.model.endUpdate()}}u.setSelectionCell(E)}else x=u.getInsertPoint(),u.isMouseInsertPoint()&&(E=0,u.lastPasteXml==e&&0<u.pasteCounter&&u.pasteCounter--),x=this.insertTextAt(e,x.x+E,x.y+E,!0),u.setSelectionCells(x);u.isSelectionEmpty()||(u.scrollCellToVisible(u.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(u.view.getState(u.getSelectionCell())));return x};EditorUi.prototype.pasteCells=
+function(e,g,k,q){if(!mxEvent.isConsumed(e)){var u=g,x=!1;if(k&&null!=e.clipboardData&&e.clipboardData.getData){var E=e.clipboardData.getData("text/plain"),z=!1;if(null!=E&&0<E.length&&"%3CmxGraphModel%3E"==E.substring(0,18))try{var G=decodeURIComponent(E);this.isCompatibleString(G)&&(z=!0,E=G)}catch(K){}z=z?null:e.clipboardData.getData("text/html");null!=z&&0<z.length?(u=this.parseHtmlData(z),x="text/plain"!=u.getAttribute("data-type")):null!=E&&0<E.length&&(u=document.createElement("div"),mxUtils.setTextContent(u,
+z))}E=u.getElementsByTagName("span");if(null!=E&&0<E.length&&"application/vnd.lucid.chart.objects"===E[0].getAttribute("data-lucid-type"))k=E[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(K){var N=this.editor.graph;N.lastPasteXml==K?N.pasteCounter++:(N.lastPasteXml=K,N.pasteCounter=0);var I=N.pasteCounter*N.gridSize;N.setSelectionCells(this.importXml(K,I,I));N.scrollCellToVisible(N.getSelectionCell())}),mxUtils.bind(this,function(K){this.handleError(K)})),
+mxEvent.consume(e));else{var F=x?u.innerHTML:mxUtils.trim(null==u.innerText?mxUtils.getTextContent(u):u.innerText),U=!1;try{var p=F.lastIndexOf("%3E");0<=p&&p<F.length-3&&(F=F.substring(0,p+3))}catch(K){}try{E=u.getElementsByTagName("span"),(G=null!=E&&0<E.length?mxUtils.trim(decodeURIComponent(E[0].textContent)):decodeURIComponent(F))&&(this.isCompatibleString(G)||0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(U=!0,F=G)}catch(K){}try{if(null!=F&&0<F.length){if(0==F.substring(0,
+20).replace(/\s/g,"").indexOf('{"isProtected":')){var v=mxUtils.bind(this,function(){try{F=(new MiroImporter).importMiroJson(JSON.parse(F)),this.pasteXml(F,q,U,e)}catch(K){console.log("Miro import error:",K)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",v):v()}else this.pasteXml(F,q,U,e);try{mxEvent.consume(e)}catch(K){}}else if(!k){var H=this.editor.graph;H.lastPasteXml=null;H.pasteCounter=0}}catch(K){this.handleError(K)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=
+function(e){if(Graph.fileSupport)for(var g=null,k=0;k<e.length;k++)mxEvent.addListener(e[k],"dragleave",function(q){null!=g&&(g.parentNode.removeChild(g),g=null);q.stopPropagation();q.preventDefault()}),mxEvent.addListener(e[k],"dragover",mxUtils.bind(this,function(q){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());q.stopPropagation();q.preventDefault()})),mxEvent.addListener(e[k],"drop",
+mxUtils.bind(this,function(q){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<q.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(q.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(q)&&!mxEvent.isShiftDown(q)):this.openFiles(q.dataTransfer.files,!0);else{var u=this.extractGraphModelFromEvent(q);if(null==u){var x=null!=q.dataTransfer?q.dataTransfer:q.clipboardData;null!=x&&(10==
+document.documentMode||11==document.documentMode?u=x.getData("Text"):(u=null,u=0<=mxUtils.indexOf(x.types,"text/uri-list")?q.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(x.types,"text/html")?x.getData("text/html"):null,null!=u&&0<u.length?(x=document.createElement("div"),x.innerHTML=this.editor.graph.sanitizeHtml(u),x=x.getElementsByTagName("img"),0<x.length&&(u=x[0].getAttribute("src"))):0<=mxUtils.indexOf(x.types,"text/plain")&&(u=x.getData("text/plain"))),null!=u&&(Editor.isPngDataUrl(u)?
+(u=Editor.extractGraphModelFromPng(u),null!=u&&0<u.length&&this.openLocalFile(u,null,!0)):this.isRemoteFileFormat(u)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(u))).send(mxUtils.bind(this,function(E){200<=E.getStatus()&&299>=E.getStatus()?this.openLocalFile(E.getText(),null,!0):this.showError(mxResources.get("error"),413==E.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):
+/^https?:\/\//.test(u)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(u):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(u)))))}else this.openLocalFile(u,null,!0)}q.stopPropagation();q.preventDefault()}))};EditorUi.prototype.highlightElement=function(e){var g=0,k=0;if(null==e){var q=document.body;var u=document.documentElement;var x=(q.clientWidth||u.clientWidth)-3;q=Math.max(q.clientHeight||
+0,u.clientHeight)-3}else g=e.offsetTop,k=e.offsetLeft,x=e.clientWidth,q=e.clientHeight;u=document.createElement("div");u.style.zIndex=mxPopupMenu.prototype.zIndex+2;u.style.border="3px dotted rgb(254, 137, 12)";u.style.pointerEvents="none";u.style.position="absolute";u.style.top=g+"px";u.style.left=k+"px";u.style.width=Math.max(0,x-3)+"px";u.style.height=Math.max(0,q-3)+"px";null!=e&&e.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(u):document.body.appendChild(u);
+return u};EditorUi.prototype.stringToCells=function(e){e=mxUtils.parseXml(e);var g=this.editor.extractGraphModel(e.documentElement);e=[];if(null!=g){var k=new mxCodec(g.ownerDocument),q=new mxGraphModel;k.decode(g,q);g=q.getChildAt(q.getRoot(),0);for(k=0;k<q.getChildCount(g);k++)e.push(q.getChildAt(g,k))}return e};EditorUi.prototype.openFileHandle=function(e,g,k,q,u){if(null!=g&&0<g.length){!this.useCanvasForExport&&/(\.png)$/i.test(g)?g=g.substring(0,g.length-4)+".drawio":/(\.pdf)$/i.test(g)&&(g=
+g.substring(0,g.length-4)+".drawio");var x=mxUtils.bind(this,function(z){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==z.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,z,g))}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(z,g,q)});if(/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g))this.importVisio(k,
+mxUtils.bind(this,function(z){this.spinner.stop();x(z)}));else if(/(\.*<graphml )/.test(e))this.importGraphML(e,mxUtils.bind(this,function(z){this.spinner.stop();x(z)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(z){4==z.readyState&&(this.spinner.stop(),200<=z.status&&299>=z.status?x(z.responseText):this.handleError({message:mxResources.get(413==
+z.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(e))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(e,mxUtils.bind(this,function(z){this.spinner.stop();this.openLocalFile(z,g,q)}),mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z)}));else if("<mxlibrary"==e.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,q);try{this.loadLibrary(new LocalLibrary(this,e,k.name))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else if(0==e.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(z){this.spinner.stop();x(z)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(e,g,q)}));else{if("image/png"==k.type.substring(0,9))e=this.extractGraphModelFromPng(e);else if("application/pdf"==k.type){var E=Editor.extractGraphModelFromPdf(e);null!=E&&(u=null,q=!0,
+e=E)}this.spinner.stop();this.openLocalFile(e,g,q,u,null!=u?k:null)}}};EditorUi.prototype.openFiles=function(e,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<e.length;k++)mxUtils.bind(this,function(q){var u=new FileReader;u.onload=mxUtils.bind(this,function(x){try{this.openFileHandle(x.target.result,q.name,q,g)}catch(E){this.handleError(E)}});u.onerror=mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x);window.openFile=null});"image"!==q.type.substring(0,
+5)&&"application/pdf"!==q.type||"image/svg"===q.type.substring(0,9)?u.readAsText(q):u.readAsDataURL(q)})(e[k])};EditorUi.prototype.openLocalFile=function(e,g,k,q,u){var x=this.getCurrentFile(),E=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var z=mxUtils.parseXml(e);null!=z&&(this.editor.setGraphXml(z.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,e,g||this.defaultFilename,k,q,u))});if(null!=
+e&&0<e.length)null==x||!x.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)?E():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)&&null!=x&&x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(e,g),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=x&&x.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var e={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,e);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),e);g=[];for(var k in e)g.push(k);return g};EditorUi.prototype.addBasenamesForCell=function(e,g){function k(E){if(null!=
+E){var z=E.lastIndexOf(".");0<z&&(E=E.substring(z+1,E.length));null==g[E]&&(g[E]=!0)}}var q=this.editor.graph,u=q.getCellStyle(e);k(mxStencilRegistry.getBasenameForStencil(u[mxConstants.STYLE_SHAPE]));q.model.isEdge(e)&&(k(mxMarker.getPackageForType(u[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(u[mxConstants.STYLE_ENDARROW])));u=q.model.getChildCount(e);for(var x=0;x<u;x++)this.addBasenamesForCell(q.model.getChildAt(e,x),g)};EditorUi.prototype.setGraphEnabled=function(e){this.diagramContainer.style.visibility=
+e?"":"hidden";this.formatContainer.style.visibility=e?"":"hidden";this.sidebarFooterContainer.style.display=e?"":"none";this.sidebarContainer.style.display=e?"":"none";this.hsplit.style.display=e?"":"none";this.editor.graph.setEnabled(e);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=e?"":"hidden",this.ruler.vRuler.container.style.visibility=e?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=e?"":"hidden");e||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
+null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var e=
+!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,q,u){e||(e=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(u)try{var x=this.editor.graph;x.setGridEnabled(!1);x.pageVisible=!1;var E=x.model.cells,z;for(z in E){var G=E[z];null!=G&&null!=G.style&&(G.style+=";sketch=1;"+(-1==G.style.indexOf("fontFamily=")||-1<G.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(F){console.log(F)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=q?q:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
+function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(e,g){null!=e?e.getPublicUrl(g):g(null)};EditorUi.prototype.createLoadMessage=function(e){var g=this.editor.graph;return{event:e,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(e){var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var q=g.background;if(null==q||q==mxConstants.NONE)q=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(u){k.postMessage(JSON.stringify({event:"export",
+point:this.embedExitPoint,exit:null!=e?!e:!0,data:Editor.createSvgDataUri(u)}),"*")}),null,null,!0,q,1,this.embedExportBorder)}else e||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");e||(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(e){var g=null,k=!1,q=!1,u=null,x=mxUtils.bind(this,function(G,F){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,x);mxEvent.addListener(window,"message",mxUtils.bind(this,function(G){if(G.source==(window.opener||window.parent)){var F=G.data,U=null,p=mxUtils.bind(this,function(Z){if(null!=Z&&"function"===typeof Z.charAt&&
+"<"!=Z.charAt(0))try{Editor.isPngDataUrl(Z)?Z=Editor.extractGraphModelFromPng(Z):"data:image/svg+xml;base64,"==Z.substring(0,26)?Z=atob(Z.substring(26)):"data:image/svg+xml;utf8,"==Z.substring(0,24)&&(Z=Z.substring(24)),null!=Z&&("%"==Z.charAt(0)?Z=decodeURIComponent(Z):"<"!=Z.charAt(0)&&(Z=Graph.decompress(Z)))}catch(ia){}return Z});if("json"==urlParams.proto){var v=!1;try{F=JSON.parse(F),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[G],"data",[F])}catch(Z){F=null}try{if(null==F)return;
+if("dialog"==F.action){this.showError(null!=F.titleKey?mxResources.get(F.titleKey):F.title,null!=F.messageKey?mxResources.get(F.messageKey):F.message,null!=F.buttonKey?mxResources.get(F.buttonKey):F.button);null!=F.modified&&(this.editor.modified=F.modified);return}if("layout"==F.action){this.executeLayouts(this.editor.graph.createLayouts(F.layouts));return}if("prompt"==F.action){this.spinner.stop();var H=new FilenameDialog(this,F.defaultValue||"",null!=F.okKey?mxResources.get(F.okKey):F.ok,function(Z){null!=
+Z?E.postMessage(JSON.stringify({event:"prompt",value:Z,message:F}),"*"):E.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),"*")},null!=F.titleKey?mxResources.get(F.titleKey):F.title);this.showDialog(H.container,300,80,!0,!1);H.init();return}if("draft"==F.action){var K=p(F.xml);this.spinner.stop();H=new DraftDialog(this,mxResources.get("draftFound",[F.name||this.defaultFilename]),K,mxUtils.bind(this,function(){this.hideDialog();E.postMessage(JSON.stringify({event:"draft",result:"edit",
+message:F}),"*")}),mxUtils.bind(this,function(){this.hideDialog();E.postMessage(JSON.stringify({event:"draft",result:"discard",message:F}),"*")}),F.editKey?mxResources.get(F.editKey):null,F.discardKey?mxResources.get(F.discardKey):null,F.ignore?mxUtils.bind(this,function(){this.hideDialog();E.postMessage(JSON.stringify({event:"draft",result:"ignore",message:F}),"*")}):null);this.showDialog(H.container,640,480,!0,!1,mxUtils.bind(this,function(Z){Z&&this.actions.get("exit").funct()}));try{H.init()}catch(Z){E.postMessage(JSON.stringify({event:"draft",
+error:Z.toString(),message:F}),"*")}return}if("template"==F.action){this.spinner.stop();var N=1==F.enableRecent,I=1==F.enableSearch,L=1==F.enableCustomTemp;if("1"==urlParams.newTempDlg&&!F.templatesOnly&&null!=F.callback){var Q=this.getCurrentUser(),P=new TemplatesDialog(this,function(Z,ia,ea){Z=Z||this.emptyDiagramXml;E.postMessage(JSON.stringify({event:"template",xml:Z,blank:Z==this.emptyDiagramXml,name:ia,tempUrl:ea.url,libs:ea.libs,builtIn:null!=ea.info&&null!=ea.info.custContentId,message:F}),
+"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=Q?Q.id:null,N?mxUtils.bind(this,function(Z,ia,ea){this.remoteInvoke("getRecentDiagrams",[ea],null,Z,ia)}):null,I?mxUtils.bind(this,function(Z,ia,ea,va){this.remoteInvoke("searchDiagrams",[Z,va],null,ia,ea)}):null,mxUtils.bind(this,function(Z,ia,ea){this.remoteInvoke("getFileContent",[Z.url],null,ia,ea)}),null,L?mxUtils.bind(this,function(Z){this.remoteInvoke("getCustomTemplates",null,null,Z,function(){Z({},0)})}):
+null,!1,!1,!0,!0);this.showDialog(P.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}H=new NewDialog(this,!1,F.templatesOnly?!1:null!=F.callback,mxUtils.bind(this,function(Z,ia,ea,va){Z=Z||this.emptyDiagramXml;null!=F.callback?E.postMessage(JSON.stringify({event:"template",xml:Z,blank:Z==this.emptyDiagramXml,name:ia,tempUrl:ea,libs:va,builtIn:!0,message:F}),"*"):(e(Z,G,Z!=this.emptyDiagramXml,F.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,
+null,null,null,N?mxUtils.bind(this,function(Z){this.remoteInvoke("getRecentDiagrams",[null],null,Z,function(){Z(null,"Network Error!")})}):null,I?mxUtils.bind(this,function(Z,ia){this.remoteInvoke("searchDiagrams",[Z,null],null,ia,function(){ia(null,"Network Error!")})}):null,mxUtils.bind(this,function(Z,ia,ea){E.postMessage(JSON.stringify({event:"template",docUrl:Z,info:ia,name:ea}),"*")}),null,null,L?mxUtils.bind(this,function(Z){this.remoteInvoke("getCustomTemplates",null,null,Z,function(){Z({},
+0)})}):null,1==F.withoutType);this.showDialog(H.container,620,460,!0,!1,mxUtils.bind(this,function(Z){this.sidebar.hideTooltip();Z&&this.actions.get("exit").funct()}));H.init();return}if("textContent"==F.action){var V=this.getDiagramTextContent();E.postMessage(JSON.stringify({event:"textContent",data:V,message:F}),"*");return}if("status"==F.action){null!=F.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(F.messageKey))):null!=F.message&&this.editor.setStatus(mxUtils.htmlEntities(F.message));
+null!=F.modified&&(this.editor.modified=F.modified);return}if("spinner"==F.action){var W=null!=F.messageKey?mxResources.get(F.messageKey):F.message;null==F.show||F.show?this.spinner.spin(document.body,W):this.spinner.stop();return}if("exit"==F.action){this.actions.get("exit").funct();return}if("viewport"==F.action){null!=F.viewport&&(this.embedViewport=F.viewport);return}if("snapshot"==F.action){this.sendEmbeddedSvgExport(!0);return}if("export"==F.action){if("png"==F.format||"xmlpng"==F.format){if(null==
+F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin)){var n=null!=F.xml?F.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var D=this.editor.graph,M=mxUtils.bind(this,function(Z){this.editor.graph.setEnabled(!0);this.spinner.stop();var ia=this.createLoadMessage("export");ia.format=F.format;ia.message=F;ia.data=Z;ia.xml=n;E.postMessage(JSON.stringify(ia),"*")}),T=mxUtils.bind(this,function(Z){null==Z&&(Z=Editor.blankImage);"xmlpng"==F.format&&
+(Z=Editor.writeGraphModelToPng(Z,"tEXt","mxfile",encodeURIComponent(n)));D!=this.editor.graph&&D.container.parentNode.removeChild(D.container);M(Z)}),O=F.pageId||(null!=this.pages?F.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var R=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=O){var Z=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());for(var ia,ea=0;ea<this.pages.length;ea++)if(this.pages[ea].getId()==
+O){ia=this.updatePageRoot(this.pages[ea]);break}null==ia&&(ia=this.currentPage);D.getGlobalVariable=function(ua){return"page"==ua?ia.getName():"pagenumber"==ua?1:Z.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(ia.root)}if(null!=F.layerIds){var va=D.model,za=va.getChildCells(va.getRoot()),ya={};for(ea=0;ea<F.layerIds.length;ea++)ya[F.layerIds[ea]]=!0;for(ea=0;ea<za.length;ea++)va.setVisible(za[ea],ya[za[ea].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ua){T(ua.toDataURL("image/png"))}),
+F.width,null,F.background,mxUtils.bind(this,function(){T(null)}),null,null,F.scale,F.transparent,F.shadow,null,D,F.border,null,F.grid,F.keepTheme)});null!=F.xml&&0<F.xml.length&&(k=!0,this.setFileData(n),k=!1);R()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==F.format?"1":"0")+(null!=O?"&pageId="+O:"")+(null!=F.layerIds&&0<F.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:F.layerIds})):"")+(null!=F.scale?"&scale="+F.scale:"")+"&base64=1&xml="+encodeURIComponent(n))).send(mxUtils.bind(this,
+function(Z){200<=Z.getStatus()&&299>=Z.getStatus()?M("data:image/png;base64,"+Z.getText()):T(null)}),mxUtils.bind(this,function(){T(null)}))}}else if(R=mxUtils.bind(this,function(){var Z=this.createLoadMessage("export");Z.message=F;if("html2"==F.format||"html"==F.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ia=this.getXmlFileData();Z.xml=mxUtils.getXml(ia);Z.data=this.getFileData(null,null,!0,null,null,null,ia);Z.format=F.format}else if("html"==F.format)ia=this.editor.getGraphXml(),
+Z.data=this.getHtml(ia,this.editor.graph),Z.xml=mxUtils.getXml(ia),Z.format=F.format;else{mxSvgCanvas2D.prototype.foAltText=null;ia=null!=F.background?F.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);Z.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Z.format="svg";var ea=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();Z.data=Editor.createSvgDataUri(va);E.postMessage(JSON.stringify(Z),"*")});if("xmlsvg"==F.format)(null==
+F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin))&&this.getEmbeddedSvg(Z.xml,this.editor.graph,null,!0,ea,null,null,F.embedImages,ia,F.scale,F.border,F.shadow,F.keepTheme);else if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin))this.editor.graph.setEnabled(!1),ia=this.editor.graph.getSvg(ia,F.scale,F.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||F.shadow,
+null,F.keepTheme),(this.editor.graph.shadowVisible||F.shadow)&&this.editor.graph.addSvgShadow(ia),this.embedFonts(ia,mxUtils.bind(this,function(va){F.embedImages||null==F.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(za){ea(mxUtils.getXml(za))})):ea(mxUtils.getXml(va))}));return}E.postMessage(JSON.stringify(Z),"*")}),null!=F.xml&&0<F.xml.length){if(this.editor.graph.mathEnabled){var S=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){S.apply(this,arguments);R()}}k=!0;this.setFileData(F.xml);
+k=!1;this.editor.graph.mathEnabled||R()}else R();return}if("load"==F.action){v=F.toSketch;q=1==F.autosave;this.hideDialog();null!=F.modified&&null==urlParams.modified&&(urlParams.modified=F.modified);null!=F.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=F.saveAndExit);null!=F.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=F.noSaveBtn);if(null!=F.rough){var X=Editor.sketchMode;this.doSetSketchMode(F.rough);X!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
+F.dark&&this.setDarkMode(F.dark);null!=F.border&&(this.embedExportBorder=F.border);null!=F.background&&(this.embedExportBackground=F.background);null!=F.viewport&&(this.embedViewport=F.viewport);this.embedExitPoint=null;if(null!=F.rect){var Y=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=F.rect.top+"px";this.diagramContainer.style.left=F.rect.left+"px";this.diagramContainer.style.height=F.rect.height+"px";this.diagramContainer.style.width=
+F.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";U=mxUtils.bind(this,function(){var Z=this.editor.graph,ia=Z.maxFitScale;Z.maxFitScale=F.maxFitScale;Z.fit(2*Y);Z.maxFitScale=ia;Z.container.scrollTop-=2*Y;Z.container.scrollLeft-=2*Y;this.fireEvent(new mxEventObject("editInlineStart","data",[F]))})}null!=F.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=F.noExitBtn);null!=F.title&&null!=this.buttonContainer&&(K=document.createElement("span"),mxUtils.write(K,
+F.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(K),this.embedFilenameSpan=K);try{F.libs&&this.sidebar.showEntries(F.libs)}catch(Z){}F=null!=F.xmlpng?this.extractGraphModelFromPng(F.xmlpng):null!=F.descriptor?F.descriptor:F.xml}else{if("merge"==F.action){var aa=this.getCurrentFile();null!=aa&&(K=p(F.xml),null!=K&&""!=K&&aa.mergeFile(new LocalFile(this,K),function(){E.postMessage(JSON.stringify({event:"merge",
+message:F}),"*")},function(Z){E.postMessage(JSON.stringify({event:"merge",message:F,error:Z}),"*")}))}else"remoteInvokeReady"==F.action?this.handleRemoteInvokeReady(E):"remoteInvoke"==F.action?this.handleRemoteInvoke(F,G.origin):"remoteInvokeResponse"==F.action?this.handleRemoteInvokeResponse(F):E.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(F)}),"*");return}}catch(Z){this.handleError(Z)}}var ba=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<
+this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),da=mxUtils.bind(this,function(Z,ia){k=!0;try{e(Z,ia,null,v)}catch(ea){this.handleError(ea)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");u=ba();q&&null==g&&(g=mxUtils.bind(this,function(ea,va){ea=ba();ea==u||k||(va=this.createLoadMessage("autosave"),va.xml=ea,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));u=ea}),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)ia=this.createLoadMessage("load"),
+ia.xml=Z,E.postMessage(JSON.stringify(ia),"*");null!=U&&U()});null!=F&&"function"===typeof F.substring&&"data:application/vnd.visio;base64,"==F.substring(0,34)?(p="0M8R4KGxGuE"==F.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(F.substring(F.indexOf(",")+1)),function(Z){da(Z,G)},mxUtils.bind(this,function(Z){this.handleError(Z)}),p)):null!=F&&"function"===typeof F.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,"")?this.isOffline()?this.showError(mxResources.get("error"),
+mxResources.get("notInOffline")):this.parseFileData(F,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status&&"<mxGraphModel"==Z.responseText.substring(0,13)?da(Z.responseText,G):this.handleError({message:413==Z.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=F&&"function"===typeof F.substring&&this.isLucidChartData(F)?this.convertLucidChart(F,mxUtils.bind(this,function(Z){da(Z)}),mxUtils.bind(this,function(Z){this.handleError(Z)})):null==
+F||"object"!==typeof F||null==F.format||null==F.data&&null==F.url?(F=p(F),da(F,G)):this.loadDescriptor(F,mxUtils.bind(this,function(Z){da(ba(),G)}),mxUtils.bind(this,function(Z){this.handleError(Z,mxResources.get("errorLoadingFile"))}))}}));var E=window.opener||window.parent;x="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";E.postMessage(x,"*");if("json"==urlParams.proto){var z=this.editor.graph.openLink;this.editor.graph.openLink=function(G,F,U){z.apply(this,arguments);
+E.postMessage(JSON.stringify({event:"openLink",href:G,target:F,allowOpener:U}),"*")}}};EditorUi.prototype.createEmbedButton=function(e,g,k,q){var u="simple"==Editor.currentTheme||"min"==Editor.currentTheme,x=document.createElement(u?"a":"button");x.setAttribute("title",e+(null!=k?" ("+k+")":""));x.style.marginLeft="6px";mxUtils.write(x,e);u?(x.className="geMenuItem"+(q?" gePrimaryBtn":""),x.style.marginLeft="8px",x.style.padding="6px"):x.className="geBigButton"+(q?"":" geBigStandardButton");mxEvent.addListener(x,
+"click",g);return x};EditorUi.prototype.addEmbedButtons=function(){if("1"!=urlParams.embedInline){var e=document.createElement("div");e.style.display="inline-block";document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&e.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,null,!0)):(e.appendChild(this.createEmbedButton(mxResources.get("save"),
+this.actions.get("save").funct,Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&e.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct)));"1"!=urlParams.noExitBtn&&e.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"==Editor.currentTheme||"min"==Editor.currentTheme?null!=this.buttonContainer&&(e.style.position="relative","simple"!=Editor.currentTheme&&
+(e.style.marginRight="4px","1"!=urlParams.sketch?(e.style.marginTop="6px",this.buttonContainer.style.top="6px"):this.buttonContainer.style.top="0px"),this.buttonContainer.appendChild(e),this.editor.fireEvent(new mxEventObject("statusChanged"))):null!=this.menubar&&(e.style.position="absolute",e.style.padding="2px",e.style.right="62px",this.toolbar.container.appendChild(e),this.toolbar.staticElements.push(e))}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=
+new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(e){this.importCsv(e)}),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(e){var g=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();e()});
+"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(e,g){this.loadOrgChartLayouts(mxUtils.bind(this,
+function(){this.doImportCsv(e,g)}))};EditorUi.prototype.doImportCsv=function(e,g){try{var k=e.split("\n"),q=[],u=[],x=[],E={};if(0<k.length){var z={},G=this.editor.graph,F=null,U=null,p=null,v=null,H=null,K=null,N=null,I="whiteSpace=wrap;html=1;",L=null,Q=null,P="",V="auto",W="auto",n=!1,D=null,M=null,T=40,O=40,R=100,S=0,X=mxUtils.bind(this,function(){null!=g?g(pa):(G.setSelectionCells(pa),G.scrollCellToVisible(G.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,
+function(){this.chromelessResize(!0)}),0)}),Y=G.getFreeInsertPoint(),aa=Y.x,ba=Y.y;Y=ba;var da=null,Z="auto";Q=null;for(var ia=[],ea=null,va=null,za=0;za<k.length&&"#"==k[za].charAt(0);){e=k[za].replace(/\r$/,"");for(za++;za<k.length&&"\\"==e.charAt(e.length-1)&&"#"==k[za].charAt(0);)e=e.substring(0,e.length-1)+mxUtils.trim(k[za].substring(1)),za++;if("#"!=e.charAt(1)){var ya=e.indexOf(":");if(0<ya){var ua=mxUtils.trim(e.substring(1,ya)),ca=mxUtils.trim(e.substring(ya+1));"label"==ua?da=G.sanitizeHtml(ca):
+"labelname"==ua&&0<ca.length&&"-"!=ca?H=ca:"labels"==ua&&0<ca.length&&"-"!=ca?N=JSON.parse(ca):"style"==ua?U=ca:"parentstyle"==ua?I=ca:"unknownStyle"==ua&&"-"!=ca?K=ca:"stylename"==ua&&0<ca.length&&"-"!=ca?v=ca:"styles"==ua&&0<ca.length&&"-"!=ca?p=JSON.parse(ca):"vars"==ua&&0<ca.length&&"-"!=ca?F=JSON.parse(ca):"identity"==ua&&0<ca.length&&"-"!=ca?L=ca:"parent"==ua&&0<ca.length&&"-"!=ca?Q=ca:"namespace"==ua&&0<ca.length&&"-"!=ca?P=ca:"width"==ua?V=ca:"height"==ua?W=ca:"collapsed"==ua&&"-"!=ca?n="true"==
+ca:"left"==ua&&0<ca.length?D=ca:"top"==ua&&0<ca.length?M=ca:"ignore"==ua?va=ca.split(","):"connect"==ua?ia.push(JSON.parse(ca)):"link"==ua?ea=ca:"padding"==ua?S=parseFloat(ca):"edgespacing"==ua?T=parseFloat(ca):"nodespacing"==ua?O=parseFloat(ca):"levelspacing"==ua?R=parseFloat(ca):"layout"==ua&&(Z=ca)}}}if(null==k[za])throw Error(mxResources.get("invalidOrMissingFile"));var Na=this.editor.csvToArray(k[za].replace(/\r$/,""));ya=e=null;ua=[];for(ca=0;ca<Na.length;ca++)L==Na[ca]&&(e=ca),Q==Na[ca]&&(ya=
+ca),ua.push(mxUtils.trim(Na[ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==da&&(da="%"+ua[0]+"%");if(null!=ia)for(var Ka=0;Ka<ia.length;Ka++)null==z[ia[Ka].to]&&(z[ia[Ka].to]={});L=[];for(ca=za+1;ca<k.length;ca++){var Ba=this.editor.csvToArray(k[ca].replace(/\r$/,""));if(null==Ba){var Fa=40<k[ca].length?k[ca].substring(0,40)+"...":k[ca];throw Error(Fa+" ("+ca+"):\n"+mxResources.get("containsValidationErrors"));}0<Ba.length&&L.push(Ba)}G.model.beginUpdate();try{for(ca=
+0;ca<L.length;ca++){Ba=L[ca];var na=null,Ja=null!=e?P+Ba[e]:null;k=!1;null!=Ja&&(na=G.model.getCell(Ja),k=null==na||0<=mxUtils.indexOf(q,na));var ra=new mxCell(da,new mxGeometry(aa,Y,0,0),U||"whiteSpace=wrap;html=1;");ra.collapsed=n;ra.vertex=!0;ra.id=Ja;null==na||k||G.model.setCollapsed(na,n);for(var ha=0;ha<Ba.length;ha++)G.setAttributeForCell(ra,ua[ha],Ba[ha]),null==na||k||G.setAttributeForCell(na,ua[ha],Ba[ha]);if(null!=H&&null!=N){var fa=N[ra.getAttribute(H)];null!=fa&&(G.labelChanged(ra,fa),
+null==na||k||G.cellLabelChanged(na,fa))}if(null!=v&&null!=p){var wa=p[ra.getAttribute(v)];null!=wa&&(ra.style=wa)}G.setAttributeForCell(ra,"placeholders","1");ra.style=G.replacePlaceholders(ra,ra.style,F);null==na||k?G.fireEvent(new mxEventObject("cellsInserted","cells",[ra])):(G.model.setStyle(na,ra.style),0>mxUtils.indexOf(x,na)&&x.push(na),G.fireEvent(new mxEventObject("cellsInserted","cells",[na])));k=null!=na;na=ra;if(!k)for(Ka=0;Ka<ia.length;Ka++)z[ia[Ka].to][na.getAttribute(ia[Ka].to)]=na;
+null!=ea&&"link"!=ea&&(G.setLinkForCell(na,na.getAttribute(ea)),G.setAttributeForCell(na,ea,null));var ja=this.editor.graph.getPreferredSizeForCell(na);Q=null!=ya?G.model.getCell(P+Ba[ya]):null;if(na.vertex){Fa=null!=Q?0:aa;za=null!=Q?0:ba;null!=D&&null!=na.getAttribute(D)&&(na.geometry.x=Fa+parseFloat(na.getAttribute(D)));null!=M&&null!=na.getAttribute(M)&&(na.geometry.y=za+parseFloat(na.getAttribute(M)));var ma="@"==V.charAt(0)?na.getAttribute(V.substring(1)):null;na.geometry.width=null!=ma&&"auto"!=
+ma?parseFloat(na.getAttribute(V.substring(1))):"auto"==V||"auto"==ma?ja.width+S:parseFloat(V);var sa="@"==W.charAt(0)?na.getAttribute(W.substring(1)):null;na.geometry.height=null!=sa&&"auto"!=sa?parseFloat(sa):"auto"==W||"auto"==sa?ja.height+S:parseFloat(W);Y+=na.geometry.height+O}k?(null==E[Ja]&&(E[Ja]=[]),E[Ja].push(na)):(q.push(na),null!=Q?(Q.style=G.replacePlaceholders(Q,I,F),G.addCell(na,Q),u.push(Q)):x.push(G.addCell(na)))}for(ca=0;ca<u.length;ca++)ma="@"==V.charAt(0)?u[ca].getAttribute(V.substring(1)):
+null,sa="@"==W.charAt(0)?u[ca].getAttribute(W.substring(1)):null,"auto"!=V&&"auto"!=ma||"auto"!=W&&"auto"!=sa||G.updateGroupBounds([u[ca]],S,!0);var oa=x.slice(),pa=x.slice();for(Ka=0;Ka<ia.length;Ka++){var Ea=ia[Ka];for(ca=0;ca<q.length;ca++){na=q[ca];var ka=mxUtils.bind(this,function(Ha,La,Ma){var Pa=La.getAttribute(Ma.from);if(null!=Pa&&""!=Pa){Pa=Pa.split(",");for(var Ra=0;Ra<Pa.length;Ra++){var Ua=z[Ma.to][Pa[Ra]];if(null==Ua&&null!=K){Ua=new mxCell(Pa[Ra],new mxGeometry(aa,ba,0,0),K);Ua.style=
+G.replacePlaceholders(La,Ua.style,F);var Ia=this.editor.graph.getPreferredSizeForCell(Ua);Ua.geometry.width=Ia.width+S;Ua.geometry.height=Ia.height+S;z[Ma.to][Pa[Ra]]=Ua;Ua.vertex=!0;Ua.id=Pa[Ra];x.push(G.addCell(Ua))}if(null!=Ua){Ia=Ma.label;null!=Ma.fromlabel&&(Ia=(La.getAttribute(Ma.fromlabel)||"")+(Ia||""));null!=Ma.sourcelabel&&(Ia=G.replacePlaceholders(La,Ma.sourcelabel,F)+(Ia||""));null!=Ma.tolabel&&(Ia=(Ia||"")+(Ua.getAttribute(Ma.tolabel)||""));null!=Ma.targetlabel&&(Ia=(Ia||"")+G.replacePlaceholders(Ua,
+Ma.targetlabel,F));var Ta="target"==Ma.placeholders==!Ma.invert?Ua:Ha;Ta=null!=Ma.style?G.replacePlaceholders(Ta,Ma.style,F):G.createCurrentEdgeStyle();Ia=G.insertEdge(null,null,Ia||"",Ma.invert?Ua:Ha,Ma.invert?Ha:Ua,Ta);if(null!=Ma.labels)for(Ta=0;Ta<Ma.labels.length;Ta++){var Sa=Ma.labels[Ta],Wa=new mxCell(Sa.label||Ta,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Wa.vertex=!0;Wa.connectable=!1;Wa.geometry.relative=!0;null!=Sa.placeholders&&(Wa.value=G.replacePlaceholders("target"==
+Sa.placeholders==!Ma.invert?Ua:Ha,Wa.value,F));if(null!=Sa.dx||null!=Sa.dy)Wa.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=Sa.dy?Sa.dy:0);Ia.insert(Wa)}pa.push(Ia);mxUtils.remove(Ma.invert?Ha:Ua,oa)}}}});ka(na,na,Ea);if(null!=E[na.id])for(ha=0;ha<E[na.id].length;ha++)ka(na,E[na.id][ha],Ea)}}if(null!=va)for(ca=0;ca<q.length;ca++)for(na=q[ca],ha=0;ha<va.length;ha++)G.setAttributeForCell(na,mxUtils.trim(va[ha]),null);if(0<x.length){var la=new mxParallelEdgeLayout(G);la.spacing=T;la.checkOverlap=
+!0;var qa=function(){0<la.spacing&&la.execute(G.getDefaultParent());for(var Ha=0;Ha<x.length;Ha++){var La=G.getCellGeometry(x[Ha]);La.x=Math.round(G.snap(La.x));La.y=Math.round(G.snap(La.y));"auto"==V&&(La.width=Math.round(G.snap(La.width)));"auto"==W&&(La.height=Math.round(G.snap(La.height)))}};if("["==Z.charAt(0)){var Aa=X;G.view.validate();this.executeLayouts(G.createLayouts(JSON.parse(Z)),function(){qa();Aa()});X=null}else if("circle"==Z){var Ca=new mxCircleLayout(G);Ca.disableEdgeStyle=!1;Ca.resetEdges=
+!1;var Ga=Ca.isVertexIgnored;Ca.isVertexIgnored=function(Ha){return Ga.apply(this,arguments)||0>mxUtils.indexOf(x,Ha)};this.executeLayout(function(){Ca.execute(G.getDefaultParent());qa()},!0,X);X=null}else if("horizontaltree"==Z||"verticaltree"==Z||"auto"==Z&&pa.length==2*x.length-1&&1==oa.length){G.view.validate();var Da=new mxCompactTreeLayout(G,"horizontaltree"==Z);Da.levelDistance=O;Da.edgeRouting=!1;Da.resetEdges=!1;this.executeLayout(function(){Da.execute(G.getDefaultParent(),0<oa.length?oa[0]:
+null)},!0,X);X=null}else if("horizontalflow"==Z||"verticalflow"==Z||"auto"==Z&&1==oa.length){G.view.validate();var xa=new mxHierarchicalLayout(G,"horizontalflow"==Z?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);xa.intraCellSpacing=O;xa.parallelEdgeSpacing=T;xa.interRankCellSpacing=R;xa.disableEdgeStyle=!1;this.executeLayout(function(){xa.execute(G.getDefaultParent(),pa);G.moveCells(pa,aa,ba)},!0,X);X=null}else if("orgchart"==Z){G.view.validate();var ta=new mxOrgChartLayout(G,2,R,O),Oa=ta.isVertexIgnored;
+ta.isVertexIgnored=function(Ha){return Oa.apply(this,arguments)||0>mxUtils.indexOf(x,Ha)};this.executeLayout(function(){ta.execute(G.getDefaultParent());qa()},!0,X);X=null}else if("organic"==Z||"auto"==Z&&pa.length>x.length){G.view.validate();var Qa=new mxFastOrganicLayout(G);Qa.forceConstant=3*O;Qa.disableEdgeStyle=!1;Qa.resetEdges=!1;var Va=Qa.isVertexIgnored;Qa.isVertexIgnored=function(Ha){return Va.apply(this,arguments)||0>mxUtils.indexOf(x,Ha)};this.executeLayout(function(){Qa.execute(G.getDefaultParent());
+qa()},!0,X);X=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=X&&X()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=function(e){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=e&&0<window.location.search.length){var k="?",q;for(q in urlParams)0>mxUtils.indexOf(e,q)&&null!=urlParams[q]&&(g+=k+q+"="+urlParams[q],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(e){e=null!=e?e:window.location.pathname;var g=0<e.indexOf("?")?1:0;
+if("1"==urlParams.offline)e+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),q;for(q in urlParams)0>mxUtils.indexOf(k,q)&&(e=0==g?e+"?":e+"&",null!=urlParams[q]&&(e+=q+"="+urlParams[q],g++))}return e};EditorUi.prototype.showLinkDialog=function(e,g,k,q,u){e=new LinkDialog(this,e,g,k,!0,q,u);this.showDialog(e.container,560,130,!0,!0);e.init()};EditorUi.prototype.getServiceCount=function(e){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++;e&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var e=this.getCurrentFile(),g=null!=e||"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==e||e.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));
+e="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);this.actions.get("resetView").setEnabled(g);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&e);this.actions.get("redo").setEnabled(this.canRedo()&&e);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(e);
+this.menus.get("arrange").setEnabled(e);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(e),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(e));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var e=this.getCurrentFile();
+return null!=e&&e.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var A=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(e){var g=A.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){g.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}));return g};var B=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){B.apply(this,arguments);var e=this.editor.graph,
+g=this.getCurrentFile(),k=this.getSelectionState(),q=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(q);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(q);this.actions.get("editData").setEnabled(e.isEnabled());this.actions.get("shadowVisible").setEnabled(q);this.actions.get("connectionArrows").setEnabled(q);this.actions.get("connectionPoints").setEnabled(q);this.actions.get("copyStyle").setEnabled(q&&!e.isSelectionEmpty());
+this.actions.get("pasteStyle").setEnabled(q&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(q);this.actions.get("createRevision").setEnabled(q);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(q&&(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")+(e.isEnabled()?"/"+mxResources.get("replace"):"");e=e.view.getState(e.getSelectionCell());this.actions.get("editShape").setEnabled(q&&null!=e&&null!=e.shape&&null!=e.shape.stencil)};var J=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);J.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
+!1,ExportDialog.exportFile=function(e,g,k,q,u,x,E,z){var G=e.editor.graph;if("xml"==k)e.hideDialog(),e.saveData(g,"xml",mxUtils.getXml(e.editor.getGraphXml()),"text/xml");else if("svg"==k)e.hideDialog(),e.saveData(g,"svg",mxUtils.getXml(G.getSvg(q,u,x)),"image/svg+xml");else{var F=e.getFileData(!0,null,null,null,null,!0),U=G.getGraphBounds(),p=Math.floor(U.width*u/G.view.scale),v=Math.floor(U.height*u/G.view.scale);if(F.length<=MAX_REQUEST_SIZE&&p*v<MAX_AREA)if(e.hideDialog(),"png"!=k&&"jpg"!=k&&
+"jpeg"!=k||!e.isExportToCanvas()){var H={globalVars:G.getExportVariables()};z&&(H.grid={size:G.gridSize,steps:G.view.gridSteps,color:G.view.gridColor});e.saveRequest(g,k,function(K,N){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(N||"0")+(null!=K?"&filename="+encodeURIComponent(K):"")+"&extras="+encodeURIComponent(JSON.stringify(H))+(0<E?"&dpi="+E:"")+"&bg="+(null!=q?q:"none")+"&w="+p+"&h="+v+"&border="+x+"&xml="+encodeURIComponent(F))})}else"png"==k?e.exportImage(u,null==q||"none"==
+q,!0,!1,!1,x,!0,!1,null,z,E):e.exportImage(u,!1,!0,!1,!1,x,!0,!1,"jpeg",z);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var e=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var q=e;this.currentPage!=this.pages[k]&&(q=this.createTemporaryGraph(e.getStylesheet()),this.updatePageRoot(this.pages[k]),q.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+q.getIndexableText()+
+" "}else g=e.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(e){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var q=document.createElement("h3");mxUtils.write(q,mxUtils.htmlEntities(e));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(q);var u=document.createElement("div");u.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";u.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
+IMAGE_PATH+'/spin.gif"></div>';var x={};try{var E=mxSettings.getCustomLibraries();for(e=0;e<E.length;e++){var z=E[e];if("R"==z.substring(0,1)){var G=JSON.parse(decodeURIComponent(z.substring(1)));x[G[0]]={id:G[0],title:G[1],downloadUrl:G[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(F){u.innerText="";if(0==F.length)u.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var U=0;U<
+F.length;U++){var p=F[U];x[p.id]&&(g[p.id]=p);var v=this.addCheckbox(u,p.title,x[p.id]);(function(H,K){mxEvent.addListener(K,"change",function(){this.checked?g[H.id]=H:delete g[H.id]})})(p,v)}},mxUtils.bind(this,function(F){u.innerText="";var U=document.createElement("div");U.style.padding="8px";U.style.textAlign="center";mxUtils.write(U,mxResources.get("error")+": ");mxUtils.write(U,null!=F&&null!=F.message?F.message:mxResources.get("unknownError"));u.appendChild(U)}));k.appendChild(u);k=new CustomDialog(this,
+k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var F=0,U;for(U in g)null==x[U]&&(F++,mxUtils.bind(this,function(p){this.remoteInvoke("getFileContent",[p.downloadUrl],null,mxUtils.bind(this,function(v){F--;0==F&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,v,p))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){F--;0==F&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[U]));
+for(U in x)g[U]||this.closeLibrary(new RemoteLibrary(this,null,x[U]));0==F&&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(e){this.remoteWin=e;for(var g=0;g<this.remoteInvokeQueue.length;g++)e.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(e){var g=e.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));e.error?k.error&&k.error(e.error.errResp):
+k.callback&&k.callback.apply(this,e.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(e,g,k,q,u){var x=!0,E=window.setTimeout(mxUtils.bind(this,function(){x=!1;u({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),z=mxUtils.bind(this,function(){window.clearTimeout(E);x&&q.apply(this,arguments)}),G=mxUtils.bind(this,function(){window.clearTimeout(E);x&&u.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;
+this.remoteInvokeCallbacks.push({callback:z,error:G});e=JSON.stringify({event:"remoteInvoke",funtionName:e,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(e,"*"):this.remoteInvokeQueue.push(e)};EditorUi.prototype.handleRemoteInvoke=function(e,g){var k=mxUtils.bind(this,function(F,U){var p={event:"remoteInvokeResponse",msgMarkers:e.msgMarkers};null!=U?p.error={errResp:U}:null!=F&&(p.resp=F);this.remoteWin.postMessage(JSON.stringify(p),"*")});try{var q=e.funtionName,u=
+this.remoteInvokableFns[q];if(null!=u&&"function"===typeof this[q]){if(u.allowedDomains){for(var x=!1,E=0;E<u.allowedDomains.length;E++)if(g=="https://"+u.allowedDomains[E]){x=!0;break}if(!x){k(null,"Invalid Call: "+q+" is not allowed.");return}}var z=e.functionArgs;Array.isArray(z)||(z=[]);if(u.isAsync)z.push(function(){k(Array.prototype.slice.apply(arguments))}),z.push(function(F){k(null,F||"Unkown Error")}),this[q].apply(this,z);else{var G=this[q].apply(this,z);k([G])}}else k(null,"Invalid Call: "+
+q+" is not found.")}catch(F){k(null,"Invalid Call: An error occurred, "+F.message)}};EditorUi.prototype.openDatabase=function(e,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var q=k.open("database",2);q.onupgradeneeded=function(u){try{var x=q.result;1>u.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>u.oldVersion&&(x.createObjectStore("files",{keyPath:"title"}),x.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
+isLocalStorage)}catch(E){null!=g&&g(E)}};q.onsuccess=mxUtils.bind(this,function(u){var x=q.result;this.database=x;EditorUi.migrateStorageFiles&&(StorageFile.migrate(x),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(E){if(!E||"1"==urlParams.forceMigration){var z=document.createElement("iframe");z.style.display="none";z.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
+urlParams.forceMigration);document.body.appendChild(z);var G=!0,F=!1,U,p=0,v=mxUtils.bind(this,function(){F=!0;this.setDatabaseItem(".drawioMigrated3",!0);z.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),H=mxUtils.bind(this,function(){p++;K()}),K=mxUtils.bind(this,function(){try{if(p>=U.length)v();else{var I=U[p];StorageFile.getFileContent(this,I,mxUtils.bind(this,function(L){null==L||".scratchpad"==I&&L==this.emptyLibraryXml?z.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[I]}),"*"):H()}),H)}}catch(L){console.log(L)}}),N=mxUtils.bind(this,function(I){try{this.setDatabaseItem(null,[{title:I.title,size:I.data.length,lastModified:Date.now(),type:I.isLib?"L":"F"},{title:I.title,data:I.data}],H,H,["filesInfo","files"])}catch(L){console.log(L)}});E=mxUtils.bind(this,function(I){try{if(I.source==z.contentWindow){var L={};try{L=JSON.parse(I.data)}catch(Q){}"init"==L.event?(z.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),z.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=L.event||F||(G?null!=L.resp&&0<L.resp.length&&null!=L.resp[0]?(U=L.resp[0],G=!1,K()):v():null!=L.resp&&0<L.resp.length&&null!=L.resp[0]?N(L.resp[0]):H())}}catch(Q){console.log(Q)}});window.addEventListener("message",E)}})));e(x);x.onversionchange=function(){x.close()}});q.onerror=g;q.onblocked=function(){}}catch(u){null!=g&&g(u)}else null!=g&&g()}else e(this.database)};
+EditorUi.prototype.setDatabaseItem=function(e,g,k,q,u){this.openDatabase(mxUtils.bind(this,function(x){try{u=u||"objects";Array.isArray(u)||(u=[u],e=[e],g=[g]);var E=x.transaction(u,"readwrite");E.oncomplete=k;E.onerror=q;for(x=0;x<u.length;x++)E.objectStore(u[x]).put(null!=e&&null!=e[x]?{key:e[x],data:g[x]}:g[x])}catch(z){null!=q&&q(z)}}),q)};EditorUi.prototype.removeDatabaseItem=function(e,g,k,q){this.openDatabase(mxUtils.bind(this,function(u){q=q||"objects";Array.isArray(q)||(q=[q],e=[e]);u=u.transaction(q,
+"readwrite");u.oncomplete=g;u.onerror=k;for(var x=0;x<q.length;x++)u.objectStore(q[x]).delete(e[x])}),k)};EditorUi.prototype.getDatabaseItem=function(e,g,k,q){this.openDatabase(mxUtils.bind(this,function(u){try{q=q||"objects";var x=u.transaction([q],"readonly").objectStore(q).get(e);x.onsuccess=function(){g(x.result)};x.onerror=k}catch(E){null!=k&&k(E)}}),k)};EditorUi.prototype.getDatabaseItems=function(e,g,k){this.openDatabase(mxUtils.bind(this,function(q){try{k=k||"objects";var u=q.transaction([k],
+"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),x=[];u.onsuccess=function(E){null==E.target.result?e(x):(x.push(E.target.result.value),E.target.result.continue())};u.onerror=g}catch(E){null!=g&&g(E)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(e,g,k){this.openDatabase(mxUtils.bind(this,function(q){try{k=k||"objects";var u=q.transaction([k],"readonly").objectStore(k).getAllKeys();u.onsuccess=function(){e(u.result)};u.onerror=g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.commentsSupported=
+function(){var e=this.getCurrentFile();return null!=e?e.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(e,g){var k=this.getCurrentFile();null!=k?k.getComments(e,g):e([])};EditorUi.prototype.addComment=function(e,g,k){var q=this.getCurrentFile();
+null!=q?q.addComment(e,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var e=this.getCurrentFile();return null!=e?e.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var e=this.getCurrentFile();return null!=e?e.canComment():!0};EditorUi.prototype.newComment=function(e,g){var k=this.getCurrentFile();return null!=k?k.newComment(e,g):new DrawioComment(this,null,e,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var e=this.getCurrentFile();
+return null!=e&&e.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(e,g){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(e,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var e=this.getCurrentFile();return null!=e&&(e.constructor==DriveFile&&e.isEditable()||e.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(e){e.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(e,g,k,q,u,x,E,z){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(e,g,k,q,u,x,E,z)};EditorUi.prototype.loadFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(e)};EditorUi.prototype.createSvgDataUri=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(e)};EditorUi.prototype.embedCssFonts=function(e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(e,g)};EditorUi.prototype.embedExtFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(e)};EditorUi.prototype.exportToCanvas=function(e,g,k,q,u,x,E,z,G,F,U,p,v,H,K,N){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(e,g,k,q,u,x,E,z,G,F,U,p,v,H,K,N)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(e,g,k,q){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(e,g,k,q)};EditorUi.prototype.convertImageToDataUri=function(e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(e,g)};EditorUi.prototype.base64Encode=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(e)};EditorUi.prototype.updateCRC=
+function(e,g,k,q){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(e,g,k,q)};EditorUi.prototype.crc32=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(e)};EditorUi.prototype.writeGraphModelToPng=function(e,g,k,q,u){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(e,g,k,q,u)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var e=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),q=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<q.length){var u="<mxfile "===q.substring(0,8)||"<?xml"===q.substring(0,5)||"\x3c!--[if IE]>"===q.substring(0,12);q="<mxlibrary>"===q.substring(0,11);(u||q)&&e.push(k)}}return e};EditorUi.prototype.getLocalStorageFile=function(e){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var g=localStorage.getItem(e);return{title:e,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,d,f,c,l,m){function t(){for(var H=E.getElementsByTagName("div"),K=0,N=0;N<H.length;N++)"none"!=H[N].style.display&&H[N].parentNode==E&&K++;z.style.display=0==K?"block":"none"}function y(H,K,N,I){function L(){K.removeChild(V);K.removeChild(W);P.style.display="block";Q.style.display="block"}q={div:K,comment:H,saveCallback:N,deleteOnCancel:I};var Q=K.querySelector(".geCommentTxt"),P=K.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
+"geCommentEditTxtArea";V.style.minHeight=Q.offsetHeight+"px";V.value=H.content;K.insertBefore(V,Q);var W=document.createElement("div");W.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){I?(K.parentNode.removeChild(K),t()):L();q=null});n.className="geCommentEditBtn";W.appendChild(n);var D=mxUtils.button(mxResources.get("save"),function(){Q.innerText="";H.content=V.value;mxUtils.write(Q,H.content);L();N(H);q=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
+function(M){mxEvent.isConsumed(M)||((mxEvent.isControlDown(M)||mxClient.IS_MAC&&mxEvent.isMetaDown(M))&&13==M.keyCode?(D.click(),mxEvent.consume(M)):27==M.keyCode&&(n.click(),mxEvent.consume(M)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";W.appendChild(D);K.insertBefore(W,Q);P.style.display="none";Q.style.display="none";V.focus()}function C(H,K){K.innerText="";H=new Date(H.modifiedDate);var N=b.timeSince(H);null==N&&(N=mxResources.get("lessThanAMinute"));mxUtils.write(K,mxResources.get("timeAgo",
+[N],"{1} ago"));K.setAttribute("title",H.toLocaleDateString()+" "+H.toLocaleTimeString())}function A(H){var K=document.createElement("img");K.className="geCommentBusyImg";K.src=IMAGE_PATH+"/spin.gif";H.appendChild(K);H.busyImg=K}function B(H){H.style.border="1px solid red";H.removeChild(H.busyImg)}function J(H){H.style.border="";H.removeChild(H.busyImg)}function e(H,K,N,I,L){function Q(O,R,S){var X=document.createElement("li");X.className="geCommentAction";var Y=document.createElement("a");Y.className=
"geCommentActionLnk";mxUtils.write(Y,O);X.appendChild(Y);mxEvent.addListener(Y,"click",function(aa){R(aa,H);aa.preventDefault();mxEvent.consume(aa)});T.appendChild(X);S&&(X.style.display="none")}function P(){function O(X){R.push(S);if(null!=X.replies)for(var Y=0;Y<X.replies.length;Y++)S=S.nextSibling,O(X.replies[Y])}var R=[],S=W;O(H);return{pdiv:S,replies:R}}function V(O,R,S,X,Y){function aa(){A(ia);H.addReply(Z,function(ea){Z.id=ea;H.replies.push(Z);J(ia);S&&S()},function(ea){ba();B(ia);b.handleError(ea,
-null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,Y)}function ba(){y(Z,ia,function(ea){aa()},!0)}var da=P().pdiv,Z=b.newComment(O,b.getCurrentUser());Z.pCommentId=H.id;null==H.replies&&(H.replies=[]);var ia=f(Z,H.replies,da,I+1);R?ba():aa()}if(L||!H.isResolved){z.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 q=document.createElement("div");q.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=H.user.pictureUrl||Editor.userImage;q.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";q.appendChild(D);var M=document.createElement("div");M.className="geCommentUsername";mxUtils.write(M,H.user.displayName||"");D.appendChild(M);M=document.createElement("div");M.className="geCommentDate";M.setAttribute("data-commentId",
-H.id);C(H,M);D.appendChild(M);W.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,H.content||"");W.appendChild(q);H.isLocked&&(W.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";q.appendChild(T);g||H.isLocked||0!=I&&!k||Q(mxResources.get("reply"),function(){V("",!0)},H.isResolved);D=b.getCurrentUser();null==D||D.id!=H.user.id||g||H.isLocked||(Q(mxResources.get("edit"),
+null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,Y)}function ba(){y(Z,ia,function(ea){aa()},!0)}var da=P().pdiv,Z=b.newComment(O,b.getCurrentUser());Z.pCommentId=H.id;null==H.replies&&(H.replies=[]);var ia=e(Z,H.replies,da,I+1);R?ba():aa()}if(L||!H.isResolved){z.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 n=document.createElement("div");n.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=H.user.pictureUrl||Editor.userImage;n.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";n.appendChild(D);var M=document.createElement("div");M.className="geCommentUsername";mxUtils.write(M,H.user.displayName||"");D.appendChild(M);M=document.createElement("div");M.className="geCommentDate";M.setAttribute("data-commentId",
+H.id);C(H,M);D.appendChild(M);W.appendChild(n);n=document.createElement("div");n.className="geCommentTxt";mxUtils.write(n,H.content||"");W.appendChild(n);H.isLocked&&(W.style.opacity="0.5");n=document.createElement("div");n.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";n.appendChild(T);g||H.isLocked||0!=I&&!k||Q(mxResources.get("reply"),function(){V("",!0)},H.isResolved);D=b.getCurrentUser();null==D||D.id!=H.user.id||g||H.isLocked||(Q(mxResources.get("edit"),
function(){function O(){y(H,W,function(){A(W);H.editComment(H.content,function(){J(W)},function(R){B(W);O();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},H.isResolved),Q(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){A(W);H.deleteComment(function(O){if(!0===O){O=W.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var R=W.querySelectorAll(".geCommentAction");for(O=
0;O<R.length;O++)R[O].parentNode.removeChild(R[O]);J(W);W.style.opacity="0.5"}else{R=P(H).replies;for(O=0;O<R.length;O++)E.removeChild(R[O]);for(O=0;O<K.length;O++)if(K[O]==H){K.splice(O,1);break}z.style.display=0==E.getElementsByTagName("div").length?"block":"none"}},function(O){B(W);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},H.isResolved));g||H.isLocked||0!=I||Q(H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function R(){var S=
O.target;S.innerText="";H.isResolved=!H.isResolved;mxUtils.write(S,H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=H.isResolved?"none":"",Y=P(H).replies,aa=Editor.isDarkMode()?"transparent":H.isResolved?"ghostWhite":"white",ba=0;ba<Y.length;ba++){Y[ba].style.backgroundColor=aa;for(var da=Y[ba].querySelectorAll(".geCommentAction"),Z=0;Z<da.length;Z++)da[Z]!=S.parentNode&&(da[Z].style.display=X);U||(Y[ba].style.display="none")}t()}H.isResolved?V(mxResources.get("reOpened")+
-": ",!0,R,!1,!0):V(mxResources.get("markedAsResolved"),!1,R,!0)});W.appendChild(q);null!=N?E.insertBefore(W,N.nextSibling):E.appendChild(W);for(N=0;null!=H.replies&&N<H.replies.length;N++)q=H.replies[N],q.isResolved=H.isResolved,f(q,H.replies,null,I+1,L);null!=n&&(n.comment.id==H.id?(L=H.content,H.content=n.comment.content,y(H,W,n.saveCallback,n.deleteOnCancel),H.content=L):null==n.comment.id&&n.comment.pCommentId==H.id&&(E.appendChild(n.div),y(n.comment,n.div,n.saveCallback,n.deleteOnCancel)));return W}}
-var g=!b.canComment(),k=b.canReplyToReplies(),n=null,v=document.createElement("div");v.className="geCommentsWin";v.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var x=EditorUi.compactUi?"26px":"30px",E=document.createElement("div");E.className="geCommentsList";E.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";E.style.bottom=parseInt(x)+7+"px";v.appendChild(E);var z=document.createElement("span");z.style.cssText="display:none;padding-top:10px;text-align:center;";
+": ",!0,R,!1,!0):V(mxResources.get("markedAsResolved"),!1,R,!0)});W.appendChild(n);null!=N?E.insertBefore(W,N.nextSibling):E.appendChild(W);for(N=0;null!=H.replies&&N<H.replies.length;N++)n=H.replies[N],n.isResolved=H.isResolved,e(n,H.replies,null,I+1,L);null!=q&&(q.comment.id==H.id?(L=H.content,H.content=q.comment.content,y(H,W,q.saveCallback,q.deleteOnCancel),H.content=L):null==q.comment.id&&q.comment.pCommentId==H.id&&(E.appendChild(q.div),y(q.comment,q.div,q.saveCallback,q.deleteOnCancel)));return W}}
+var g=!b.canComment(),k=b.canReplyToReplies(),q=null,u=document.createElement("div");u.className="geCommentsWin";u.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var x=EditorUi.compactUi?"26px":"30px",E=document.createElement("div");E.className="geCommentsList";E.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";E.style.bottom=parseInt(x)+7+"px";u.appendChild(E);var z=document.createElement("span");z.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(z,mxResources.get("noCommentsFound"));var G=document.createElement("div");G.className="geToolbarContainer geCommentsToolbar";G.style.height=x;G.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";G.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";x=document.createElement("a");x.className="geButton";if(!g){var F=x.cloneNode();F.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';F.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(F,"click",function(H){function K(){y(N,I,function(L){A(I);b.addComment(L,function(Q){L.id=Q;p.push(L);J(I)},function(Q){B(I);K();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var N=b.newComment("",b.getCurrentUser()),I=f(N,p,null,0);K();H.preventDefault();mxEvent.consume(H)});G.appendChild(F)}F=x.cloneNode();F.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';F.setAttribute("title",mxResources.get("showResolved"));
-F.className="geAdaptiveAsset";var U=!1;mxEvent.addListener(F,"click",function(H){this.className=(U=!U)?"geButton geCheckedBtn":"geButton";u();H.preventDefault();mxEvent.consume(H)});G.appendChild(F);b.commentsRefreshNeeded()&&(F=x.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',F.setAttribute("title",mxResources.get("refresh")),F.className="geAdaptiveAsset",mxEvent.addListener(F,"click",function(H){u();H.preventDefault();mxEvent.consume(H)}),G.appendChild(F));
-b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geAdaptiveAsset",mxEvent.addListener(x,"click",function(H){m();H.preventDefault();mxEvent.consume(H)}),G.appendChild(x));v.appendChild(G);var p=[],u=mxUtils.bind(this,function(){this.hasError=!1;if(null!=n)try{n.div=n.div.cloneNode(!0);var H=n.div.querySelector(".geCommentEditTxtArea"),K=n.div.querySelector(".geCommentEditBtns");
-n.comment.content=H.value;H.parentNode.removeChild(H);K.parentNode.removeChild(K)}catch(N){b.handleError(N)}E.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";k=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(N){function I(L){if(null!=L){L.sort(function(P,V){return new Date(P.modifiedDate)-new Date(V.modifiedDate)});for(var Q=0;Q<L.length;Q++)I(L[Q].replies)}}
-N.sort(function(L,Q){return new Date(L.modifiedDate)-new Date(Q.modifiedDate)});E.innerText="";E.appendChild(z);z.style.display="block";p=N;for(N=0;N<p.length;N++)I(p[N].replies),f(p[N],p,null,0,U);null!=n&&null==n.comment.id&&null==n.comment.pCommentId&&(E.appendChild(n.div),y(n.comment,n.div,n.saveCallback,n.deleteOnCancel))},mxUtils.bind(this,function(N){E.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(N&&N.message?": "+N.message:""));this.hasError=!0})):E.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
-u();this.refreshComments=u;G=mxUtils.bind(this,function(){function H(Q){var P=N[Q.id];if(null!=P)for(C(Q,P),P=0;null!=Q.replies&&P<Q.replies.length;P++)H(Q.replies[P])}if(this.window.isVisible()){for(var K=E.querySelectorAll(".geCommentDate"),N={},I=0;I<K.length;I++){var L=K[I];N[L.getAttribute("data-commentId")]=L}for(I=0;I<p.length;I++)H(p[I])}});setInterval(G,6E4);this.refreshCommentsTime=G;this.window=new mxWindow(mxResources.get("comments"),v,d,e,c,l,!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,d,e,c,l,m,t,y,C,A,B){var J=document.createElement("div");J.style.textAlign="center";B=null!=B?B:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=B+
-"px";f.style.lineHeight="1.2em";mxUtils.write(f,d);J.appendChild(f);null!=A&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",A),f.appendChild(d),J.appendChild(f));A=document.createElement("div");A.style.textAlign="center";A.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(g.checked)});m.className="geBtn";
-null!=y&&(m.innerHTML=y+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");b.editor.cancelFirst&&A.appendChild(m);var k=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(g.checked)});A.appendChild(k);null!=t?(k.innerHTML=t+"<br>"+k.innerHTML+"<br>",k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.className="geBtn",k.style.width="40%"):k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-A.appendChild(m);J.appendChild(A);C?(A.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.style.marginBottom="0px",f.appendChild(g),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),f.appendChild(l),J.appendChild(f),mxEvent.addListener(l,"click",function(n){g.checked=!g.checked;mxEvent.consume(n)})):A.style.marginTop="12px";this.init=function(){k.focus()};this.container=J};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,d,e,c,l){if(null!=d)for(var m=0;m<d.length;m++)null!=d[m]&&(b=this.patchPages(b,d[m],e,c,l));return b};
-EditorUi.prototype.patchPages=function(b,d,e,c,l){var m={},t=[],y={},C={},A={},B={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var J in c[EditorUi.DIFF_UPDATE])m[J]=c[EditorUi.DIFF_UPDATE][J];if(null!=d[EditorUi.DIFF_REMOVE])for(c=0;c<d[EditorUi.DIFF_REMOVE].length;c++)C[d[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(c=0;c<d[EditorUi.DIFF_INSERT].length;c++)y[d[EditorUi.DIFF_INSERT][c].previous]=d[EditorUi.DIFF_INSERT][c];if(null!=d[EditorUi.DIFF_UPDATE])for(J in d[EditorUi.DIFF_UPDATE])c=
-d[EditorUi.DIFF_UPDATE][J],null!=c.previous&&(B[c.previous]=J);if(null!=b){var f="";for(c=0;c<b.length;c++){var g=b[c].getId();A[g]=b[c];null!=B[f]||C[g]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][g]&&null!=d[EditorUi.DIFF_UPDATE][g].previous||(B[f]=g);f=g}}var k={},n=mxUtils.bind(this,function(x){var E=null!=x?x.getId():"";if(null!=x&&!k[E]){k[E]=!0;t.push(x);var z=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][E]:null;null!=z&&(this.updatePageRoot(x),null!=z.name&&x.setName(z.name),
-null!=z.view&&this.patchViewState(x,z.view),null!=z.cells&&this.patchPage(x,z.cells,m[x.getId()],l),!e||null==z.cells&&null==z.view||(x.needsUpdate=!0))}x=B[E];null!=x&&(delete B[E],n(A[x]));x=y[E];null!=x&&(delete y[E],v(x))}),v=mxUtils.bind(this,function(x){x=mxUtils.parseXml(x.data).documentElement;x=new DiagramPage(x);this.updatePageRoot(x);var E=A[x.getId()];null==E?n(x):(this.patchPage(E,this.diffPages([E],[x]),m[E.getId()],l),e&&(E.needsUpdate=!0))});n();for(J in B)n(A[B[J]]),delete B[J];for(J in y)v(y[J]),
-delete y[J];return t};EditorUi.prototype.patchViewState=function(b,d){if(null!=b.viewState&&null!=d){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var e in d)try{this.patchViewStateProperty(b,d,e)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,d,e){b.viewState[e]=JSON.parse(d[e])};
-EditorUi.prototype.createParentLookup=function(b,d){function e(A){var B=c[A];null==B&&(B={inserted:[],moved:{}},c[A]=B);return B}var c={};if(null!=d[EditorUi.DIFF_INSERT])for(var l=0;l<d[EditorUi.DIFF_INSERT].length;l++){var m=d[EditorUi.DIFF_INSERT][l],t=null!=m.parent?m.parent:"",y=null!=m.previous?m.previous:"";e(t).inserted[y]=m}if(null!=d[EditorUi.DIFF_UPDATE])for(var C in d[EditorUi.DIFF_UPDATE])m=d[EditorUi.DIFF_UPDATE][C],null!=m.previous&&(t=m.parent,null==t&&(l=b.getCell(C),null!=l&&(l=
-b.getParent(l),null!=l&&(t=l.getId()))),null!=t&&(e(t).moved[m.previous]=C));return c};
-EditorUi.prototype.patchPage=function(b,d,e,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),m=this.createParentLookup(l,d);l.beginUpdate();try{var t=l.updateEdgeParent,y=new mxDictionary,C=[];l.updateEdgeParent=function(v,x){!y.get(v)&&c&&(y.put(v,!0),C.push(v))};var A=m[""],B=null!=A&&null!=A.inserted?A.inserted[""]:null,J=null;null!=B&&(J=this.getCellForJson(B));if(null==J){var f=null!=A&&null!=A.moved?A.moved[""]:null;null!=f&&(J=l.getCell(f))}null!=J&&(l.setRoot(J),
-b.root=J);this.patchCellRecursive(b,l,l.root,m,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var g=0;g<d[EditorUi.DIFF_REMOVE].length;g++){var k=l.getCell(d[EditorUi.DIFF_REMOVE][g]);null!=k&&l.remove(k)}if(null!=d[EditorUi.DIFF_UPDATE]){var n=null!=e&&null!=e.cells?e.cells[EditorUi.DIFF_UPDATE]:null;for(f in d[EditorUi.DIFF_UPDATE])this.patchCell(l,l.getCell(f),d[EditorUi.DIFF_UPDATE][f],null!=n?n[f]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(g=0;g<d[EditorUi.DIFF_INSERT].length;g++)B=d[EditorUi.DIFF_INSERT][g],
+"...");mxEvent.addListener(F,"click",function(H){function K(){y(N,I,function(L){A(I);b.addComment(L,function(Q){L.id=Q;p.push(L);J(I)},function(Q){B(I);K();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var N=b.newComment("",b.getCurrentUser()),I=e(N,p,null,0);K();H.preventDefault();mxEvent.consume(H)});G.appendChild(F)}F=x.cloneNode();F.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';F.setAttribute("title",mxResources.get("showResolved"));
+F.className="geAdaptiveAsset";var U=!1;mxEvent.addListener(F,"click",function(H){this.className=(U=!U)?"geButton geCheckedBtn":"geButton";v();H.preventDefault();mxEvent.consume(H)});G.appendChild(F);b.commentsRefreshNeeded()&&(F=x.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',F.setAttribute("title",mxResources.get("refresh")),F.className="geAdaptiveAsset",mxEvent.addListener(F,"click",function(H){v();H.preventDefault();mxEvent.consume(H)}),G.appendChild(F));
+b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geAdaptiveAsset",mxEvent.addListener(x,"click",function(H){m();H.preventDefault();mxEvent.consume(H)}),G.appendChild(x));u.appendChild(G);var p=[],v=mxUtils.bind(this,function(){this.hasError=!1;if(null!=q)try{q.div=q.div.cloneNode(!0);var H=q.div.querySelector(".geCommentEditTxtArea"),K=q.div.querySelector(".geCommentEditBtns");
+q.comment.content=H.value;H.parentNode.removeChild(H);K.parentNode.removeChild(K)}catch(N){b.handleError(N)}E.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";k=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(N){function I(L){if(null!=L){L.sort(function(P,V){return new Date(P.modifiedDate)-new Date(V.modifiedDate)});for(var Q=0;Q<L.length;Q++)I(L[Q].replies)}}
+N.sort(function(L,Q){return new Date(L.modifiedDate)-new Date(Q.modifiedDate)});E.innerText="";E.appendChild(z);z.style.display="block";p=N;for(N=0;N<p.length;N++)I(p[N].replies),e(p[N],p,null,0,U);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(E.appendChild(q.div),y(q.comment,q.div,q.saveCallback,q.deleteOnCancel))},mxUtils.bind(this,function(N){E.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(N&&N.message?": "+N.message:""));this.hasError=!0})):E.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
+v();this.refreshComments=v;G=mxUtils.bind(this,function(){function H(Q){var P=N[Q.id];if(null!=P)for(C(Q,P),P=0;null!=Q.replies&&P<Q.replies.length;P++)H(Q.replies[P])}if(this.window.isVisible()){for(var K=E.querySelectorAll(".geCommentDate"),N={},I=0;I<K.length;I++){var L=K[I];N[L.getAttribute("data-commentId")]=L}for(I=0;I<p.length;I++)H(p[I])}});setInterval(G,6E4);this.refreshCommentsTime=G;this.window=new mxWindow(mxResources.get("comments"),u,d,f,c,l,!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,d,f,c,l,m,t,y,C,A,B){var J=document.createElement("div");J.style.textAlign="center";B=null!=B?B:44;var e=document.createElement("div");e.style.padding="6px";e.style.overflow="auto";e.style.maxHeight=B+
+"px";e.style.lineHeight="1.2em";mxUtils.write(e,d);J.appendChild(e);null!=A&&(e=document.createElement("div"),e.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",A),e.appendChild(d),J.appendChild(e));A=document.createElement("div");A.style.textAlign="center";A.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(g.checked)});m.className="geBtn";
+null!=y&&(m.innerHTML=y+"<br>"+m.innerHTML,m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");b.editor.cancelFirst&&A.appendChild(m);var k=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(g.checked)});A.appendChild(k);null!=t?(k.innerHTML=t+"<br>"+k.innerHTML+"<br>",k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.className="geBtn",k.style.width="40%"):k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+A.appendChild(m);J.appendChild(A);C?(A.style.marginTop="10px",e=document.createElement("p"),e.style.marginTop="20px",e.style.marginBottom="0px",e.appendChild(g),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),e.appendChild(l),J.appendChild(e),mxEvent.addListener(l,"click",function(q){g.checked=!g.checked;mxEvent.consume(q)})):A.style.marginTop="12px";this.init=function(){k.focus()};this.container=J};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,d,f,c,l){if(null!=d)for(var m=0;m<d.length;m++)null!=d[m]&&(b=this.patchPages(b,d[m],f,c,l));return b};
+EditorUi.prototype.patchPages=function(b,d,f,c,l){var m={},t=[],y={},C={},A={},B={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var J in c[EditorUi.DIFF_UPDATE])m[J]=c[EditorUi.DIFF_UPDATE][J];if(null!=d[EditorUi.DIFF_REMOVE])for(c=0;c<d[EditorUi.DIFF_REMOVE].length;c++)C[d[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(c=0;c<d[EditorUi.DIFF_INSERT].length;c++)y[d[EditorUi.DIFF_INSERT][c].previous]=d[EditorUi.DIFF_INSERT][c];if(null!=d[EditorUi.DIFF_UPDATE])for(J in d[EditorUi.DIFF_UPDATE])c=
+d[EditorUi.DIFF_UPDATE][J],null!=c.previous&&(B[c.previous]=J);if(null!=b){var e="";for(c=0;c<b.length;c++){var g=b[c].getId();A[g]=b[c];null!=B[e]||C[g]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][g]&&null!=d[EditorUi.DIFF_UPDATE][g].previous||(B[e]=g);e=g}}var k={},q=mxUtils.bind(this,function(x){var E=null!=x?x.getId():"";if(null!=x&&!k[E]){k[E]=!0;t.push(x);var z=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][E]:null;null!=z&&(this.updatePageRoot(x),null!=z.name&&x.setName(z.name),
+null!=z.view&&this.patchViewState(x,z.view),null!=z.cells&&this.patchPage(x,z.cells,m[x.getId()],l),!f||null==z.cells&&null==z.view||(x.needsUpdate=!0))}x=B[E];null!=x&&(delete B[E],q(A[x]));x=y[E];null!=x&&(delete y[E],u(x))}),u=mxUtils.bind(this,function(x){x=mxUtils.parseXml(x.data).documentElement;x=new DiagramPage(x);this.updatePageRoot(x);var E=A[x.getId()];null==E?q(x):(this.patchPage(E,this.diffPages([E],[x]),m[E.getId()],l),f&&(E.needsUpdate=!0))});q();for(J in B)q(A[B[J]]),delete B[J];for(J in y)u(y[J]),
+delete y[J];return t};EditorUi.prototype.patchViewState=function(b,d){if(null!=b.viewState&&null!=d){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in d)try{this.patchViewStateProperty(b,d,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,d,f){b.viewState[f]=JSON.parse(d[f])};
+EditorUi.prototype.createParentLookup=function(b,d){function f(A){var B=c[A];null==B&&(B={inserted:[],moved:{}},c[A]=B);return B}var c={};if(null!=d[EditorUi.DIFF_INSERT])for(var l=0;l<d[EditorUi.DIFF_INSERT].length;l++){var m=d[EditorUi.DIFF_INSERT][l],t=null!=m.parent?m.parent:"",y=null!=m.previous?m.previous:"";f(t).inserted[y]=m}if(null!=d[EditorUi.DIFF_UPDATE])for(var C in d[EditorUi.DIFF_UPDATE])m=d[EditorUi.DIFF_UPDATE][C],null!=m.previous&&(t=m.parent,null==t&&(l=b.getCell(C),null!=l&&(l=
+b.getParent(l),null!=l&&(t=l.getId()))),null!=t&&(f(t).moved[m.previous]=C));return c};
+EditorUi.prototype.patchPage=function(b,d,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),m=this.createParentLookup(l,d);l.beginUpdate();try{var t=l.updateEdgeParent,y=new mxDictionary,C=[];l.updateEdgeParent=function(u,x){!y.get(u)&&c&&(y.put(u,!0),C.push(u))};var A=m[""],B=null!=A&&null!=A.inserted?A.inserted[""]:null,J=null;null!=B&&(J=this.getCellForJson(B));if(null==J){var e=null!=A&&null!=A.moved?A.moved[""]:null;null!=e&&(J=l.getCell(e))}null!=J&&(l.setRoot(J),
+b.root=J);this.patchCellRecursive(b,l,l.root,m,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var g=0;g<d[EditorUi.DIFF_REMOVE].length;g++){var k=l.getCell(d[EditorUi.DIFF_REMOVE][g]);null!=k&&l.remove(k)}if(null!=d[EditorUi.DIFF_UPDATE]){var q=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(e in d[EditorUi.DIFF_UPDATE])this.patchCell(l,l.getCell(e),d[EditorUi.DIFF_UPDATE][e],null!=q?q[e]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(g=0;g<d[EditorUi.DIFF_INSERT].length;g++)B=d[EditorUi.DIFF_INSERT][g],
k=l.getCell(B.id),null!=k&&(l.setTerminal(k,l.getCell(B.source),!0),l.setTerminal(k,l.getCell(B.target),!1));l.updateEdgeParent=t;if(c&&0<C.length)for(g=0;g<C.length;g++)l.contains(C[g])&&l.updateEdgeParent(C[g])}finally{l.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,d,e,c,l){if(null!=e){var m=c[e.getId()],t=null!=m&&null!=m.inserted?m.inserted:{};m=null!=m&&null!=m.moved?m.moved:{};for(var y=0,C=d.getChildCount(e),A="",B=0;B<C;B++){var J=d.getChildAt(e,B).getId();null==m[A]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][J]||null==l[EditorUi.DIFF_UPDATE][J].previous&&null==l[EditorUi.DIFF_UPDATE][J].parent)&&(m[A]=J);A=J}C=mxUtils.bind(this,function(f,g){var k=null!=f?f.getId():"";null!=f&&g&&(g=
-d.getCell(k),null!=g&&g!=f&&(f=null));null!=f&&(d.getChildAt(e,y)!=f&&d.add(e,f,y),this.patchCellRecursive(b,d,f,c,l),y++);return k});for(A=[null];0<A.length;)if(B=A.shift(),B=C(null!=B?B.child:null,null!=B?B.insert:!1),J=m[B],null!=J&&(delete m[B],A.push({child:d.getCell(J)})),J=t[B],null!=J&&(delete t[B],A.push({child:this.getCellForJson(J),insert:!0})),0==A.length){for(B in m)A.push({child:d.getCell(m[B])}),delete m[B];for(B in t)A.push({child:this.getCellForJson(t[B]),insert:!0}),delete t[B]}}};
-EditorUi.prototype.patchCell=function(b,d,e,c){if(null!=d&&null!=e){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in e?b.setValue(d,e.value):null!=e.xmlValue&&b.setValue(d,mxUtils.parseXml(e.xmlValue).documentElement);null!=c&&null!=c.style||null==e.style||b.setStyle(d,e.style);null!=e.visible&&b.setVisible(d,1==e.visible);null!=e.collapsed&&b.setCollapsed(d,1==e.collapsed);null!=e.vertex&&(d.vertex=1==e.vertex);null!=e.edge&&(d.edge=1==e.edge);null!=e.connectable&&(d.connectable=
-1==e.connectable);null!=e.geometry&&b.setGeometry(d,this.codec.decode(mxUtils.parseXml(e.geometry).documentElement));null!=e.source&&b.setTerminal(d,b.getCell(e.source),!0);null!=e.target&&b.setTerminal(d,b.getCell(e.target),!1);for(var l in e)this.cellProperties[l]||(d[l]=e[l])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var d=null;null!=b&&(d=mxUtils.getXml(b));return d};
-EditorUi.prototype.getNodeForPages=function(b){var d=null;if(null!=this.fileNode&&null!=b){d=this.fileNode.cloneNode(!1);for(var e=0;e<b.length;e++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[e].root));this.editor.graph.saveViewState(b[e].viewState,c);var l=b[e].node.cloneNode(!1);l.appendChild(c);d.appendChild(l)}}return d};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
-EditorUi.prototype.getPagesForNode=function(b,d){var e=this.editor.extractGraphModel(b,!0,!0);null!=e&&(b=e);d=b.getElementsByTagName(d||"diagram");e=[];if(0<d.length)for(b=0;b<d.length;b++){var c=new DiagramPage(d[b]);this.updatePageRoot(c,!0);e.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(c.node,Graph.compressNode(b,!0)),e.push(c));return e};
-EditorUi.prototype.diffPages=function(b,d){var e=[],c=[],l={},m={},t={},y=null;if(null!=b&&null!=d){for(var C=0;C<d.length;C++)m[d[C].getId()]={page:d[C],prev:y},y=d[C];y=null;for(C=0;C<b.length;C++){var A=b[C].getId();d=m[A];if(null==d)c.push(A);else{var B=this.diffPage(b[C],d.page),J={};mxUtils.isEmptyObject(B)||(J.cells=B);B=this.diffViewState(b[C],d.page);mxUtils.isEmptyObject(B)||(J.view=B);if((null!=d.prev?null==y:null!=y)||null!=y&&null!=d.prev&&y.getId()!=d.prev.getId())J.previous=null!=d.prev?
-d.prev.getId():"";null!=d.page.getName()&&b[C].getName()!=d.page.getName()&&(J.name=d.page.getName());mxUtils.isEmptyObject(J)||(t[A]=J)}delete m[b[C].getId()];y=b[C]}for(A in m)d=m[A],e.push({data:mxUtils.getXml(d.page.node),previous:null!=d.prev?d.prev.getId():""});mxUtils.isEmptyObject(t)||(l[EditorUi.DIFF_UPDATE]=t);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<e.length&&(l[EditorUi.DIFF_INSERT]=e)}return l};
-EditorUi.prototype.createCellLookup=function(b,d,e){e=null!=e?e:{};e[b.getId()]={cell:b,prev:d};var c=b.getChildCount();d=null;for(var l=0;l<c;l++){var m=b.getChildAt(l);this.createCellLookup(m,d,e);d=m}return e};
-EditorUi.prototype.diffCellRecursive=function(b,d,e,c,l){c=null!=c?c:{};var m=e[b.getId()];delete e[b.getId()];if(null==m)l.push(b.getId());else{var t=this.diffCell(b,m.cell);if(null!=t.parent||(null!=m.prev?null==d:null!=d)||null!=d&&null!=m.prev&&d.getId()!=m.prev.getId())t.previous=null!=m.prev?m.prev.getId():"";mxUtils.isEmptyObject(t)||(c[b.getId()]=t)}m=b.getChildCount();d=null;for(t=0;t<m;t++){var y=b.getChildAt(t);this.diffCellRecursive(y,d,e,c,l);d=y}return c};
-EditorUi.prototype.diffPage=function(b,d){var e=[],c=[],l={};this.updatePageRoot(b);this.updatePageRoot(d);d=this.createCellLookup(d.root);var m=this.diffCellRecursive(b.root,null,d,m,c),t;for(t in d)b=d[t],e.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(m)||(l[EditorUi.DIFF_UPDATE]=m);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<e.length&&(l[EditorUi.DIFF_INSERT]=e);return l};
-EditorUi.prototype.diffViewState=function(b,d){b=b.viewState;var e=d.viewState,c={};d==this.currentPage&&(e=this.editor.graph.getViewState());if(null!=b&&null!=e)for(var l in this.viewStateProperties)this.diffViewStateProperty(b,e,l,c);return c};EditorUi.prototype.diffViewStateProperty=function(b,d,e,c){b=JSON.stringify(this.getViewStateProperty(b,e));d=JSON.stringify(this.getViewStateProperty(d,e));b!=d&&(c[e]=d)};
+EditorUi.prototype.patchCellRecursive=function(b,d,f,c,l){if(null!=f){var m=c[f.getId()],t=null!=m&&null!=m.inserted?m.inserted:{};m=null!=m&&null!=m.moved?m.moved:{};for(var y=0,C=d.getChildCount(f),A="",B=0;B<C;B++){var J=d.getChildAt(f,B).getId();null==m[A]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][J]||null==l[EditorUi.DIFF_UPDATE][J].previous&&null==l[EditorUi.DIFF_UPDATE][J].parent)&&(m[A]=J);A=J}C=mxUtils.bind(this,function(e,g){var k=null!=e?e.getId():"";null!=e&&g&&(g=
+d.getCell(k),null!=g&&g!=e&&(e=null));null!=e&&(d.getChildAt(f,y)!=e&&d.add(f,e,y),this.patchCellRecursive(b,d,e,c,l),y++);return k});for(A=[null];0<A.length;)if(B=A.shift(),B=C(null!=B?B.child:null,null!=B?B.insert:!1),J=m[B],null!=J&&(delete m[B],A.push({child:d.getCell(J)})),J=t[B],null!=J&&(delete t[B],A.push({child:this.getCellForJson(J),insert:!0})),0==A.length){for(B in m)A.push({child:d.getCell(m[B])}),delete m[B];for(B in t)A.push({child:this.getCellForJson(t[B]),insert:!0}),delete t[B]}}};
+EditorUi.prototype.patchCell=function(b,d,f,c){if(null!=d&&null!=f){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in f?b.setValue(d,f.value):null!=f.xmlValue&&b.setValue(d,mxUtils.parseXml(f.xmlValue).documentElement);null!=c&&null!=c.style||null==f.style||b.setStyle(d,f.style);null!=f.visible&&b.setVisible(d,1==f.visible);null!=f.collapsed&&b.setCollapsed(d,1==f.collapsed);null!=f.vertex&&(d.vertex=1==f.vertex);null!=f.edge&&(d.edge=1==f.edge);null!=f.connectable&&(d.connectable=
+1==f.connectable);null!=f.geometry&&b.setGeometry(d,this.codec.decode(mxUtils.parseXml(f.geometry).documentElement));null!=f.source&&b.setTerminal(d,b.getCell(f.source),!0);null!=f.target&&b.setTerminal(d,b.getCell(f.target),!1);for(var l in f)this.cellProperties[l]||(d[l]=f[l])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var d=null;null!=b&&(d=mxUtils.getXml(b));return d};
+EditorUi.prototype.getNodeForPages=function(b){var d=null;if(null!=this.fileNode&&null!=b){d=this.fileNode.cloneNode(!1);for(var f=0;f<b.length;f++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[f].root));this.editor.graph.saveViewState(b[f].viewState,c);var l=b[f].node.cloneNode(!1);l.appendChild(c);d.appendChild(l)}}return d};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
+EditorUi.prototype.getPagesForNode=function(b,d){var f=this.editor.extractGraphModel(b,!0,!0);null!=f&&(b=f);d=b.getElementsByTagName(d||"diagram");f=[];if(0<d.length)for(b=0;b<d.length;b++){var c=new DiagramPage(d[b]);this.updatePageRoot(c,!0);f.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(c.node,Graph.compressNode(b,!0)),f.push(c));return f};
+EditorUi.prototype.diffPages=function(b,d){var f=[],c=[],l={},m={},t={},y=null;if(null!=b&&null!=d){for(var C=0;C<d.length;C++)m[d[C].getId()]={page:d[C],prev:y},y=d[C];y=null;for(C=0;C<b.length;C++){var A=b[C].getId();d=m[A];if(null==d)c.push(A);else{var B=this.diffPage(b[C],d.page),J={};mxUtils.isEmptyObject(B)||(J.cells=B);B=this.diffViewState(b[C],d.page);mxUtils.isEmptyObject(B)||(J.view=B);if((null!=d.prev?null==y:null!=y)||null!=y&&null!=d.prev&&y.getId()!=d.prev.getId())J.previous=null!=d.prev?
+d.prev.getId():"";null!=d.page.getName()&&b[C].getName()!=d.page.getName()&&(J.name=d.page.getName());mxUtils.isEmptyObject(J)||(t[A]=J)}delete m[b[C].getId()];y=b[C]}for(A in m)d=m[A],f.push({data:mxUtils.getXml(d.page.node),previous:null!=d.prev?d.prev.getId():""});mxUtils.isEmptyObject(t)||(l[EditorUi.DIFF_UPDATE]=t);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f)}return l};
+EditorUi.prototype.createCellLookup=function(b,d,f){f=null!=f?f:{};f[b.getId()]={cell:b,prev:d};var c=b.getChildCount();d=null;for(var l=0;l<c;l++){var m=b.getChildAt(l);this.createCellLookup(m,d,f);d=m}return f};
+EditorUi.prototype.diffCellRecursive=function(b,d,f,c,l){c=null!=c?c:{};var m=f[b.getId()];delete f[b.getId()];if(null==m)l.push(b.getId());else{var t=this.diffCell(b,m.cell);if(null!=t.parent||(null!=m.prev?null==d:null!=d)||null!=d&&null!=m.prev&&d.getId()!=m.prev.getId())t.previous=null!=m.prev?m.prev.getId():"";mxUtils.isEmptyObject(t)||(c[b.getId()]=t)}m=b.getChildCount();d=null;for(t=0;t<m;t++){var y=b.getChildAt(t);this.diffCellRecursive(y,d,f,c,l);d=y}return c};
+EditorUi.prototype.diffPage=function(b,d){var f=[],c=[],l={};this.updatePageRoot(b);this.updatePageRoot(d);d=this.createCellLookup(d.root);var m=this.diffCellRecursive(b.root,null,d,m,c),t;for(t in d)b=d[t],f.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(m)||(l[EditorUi.DIFF_UPDATE]=m);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f);return l};
+EditorUi.prototype.diffViewState=function(b,d){b=b.viewState;var f=d.viewState,c={};d==this.currentPage&&(f=this.editor.graph.getViewState());if(null!=b&&null!=f)for(var l in this.viewStateProperties)this.diffViewStateProperty(b,f,l,c);return c};EditorUi.prototype.diffViewStateProperty=function(b,d,f,c){b=JSON.stringify(this.getViewStateProperty(b,f));d=JSON.stringify(this.getViewStateProperty(d,f));b!=d&&(c[f]=d)};
EditorUi.prototype.getViewStateProperty=function(b,d){b=b[d];"backgroundImage"==d&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==d&&null==b&&(b=[]);return b};
-EditorUi.prototype.getCellForJson=function(b){var d=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,e=b.value;null!=b.xmlValue&&(e=mxUtils.parseXml(b.xmlValue).documentElement);d=new mxCell(e,d,b.style);d.connectable=0!=b.connectable;d.collapsed=1==b.collapsed;d.visible=0!=b.visible;d.vertex=1==b.vertex;d.edge=1==b.edge;d.id=b.id;for(var c in b)this.cellProperties[c]||(d[c]=b[c]);return d};
-EditorUi.prototype.getJsonForCell=function(b,d){var e={id:b.getId()};b.vertex&&(e.vertex=1);b.edge&&(e.edge=1);b.connectable||(e.connectable=0);null!=b.parent&&(e.parent=b.parent.getId());null!=d&&(e.previous=d.getId());null!=b.source&&(e.source=b.source.getId());null!=b.target&&(e.target=b.target.getId());null!=b.style&&(e.style=b.style);null!=b.geometry&&(e.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(e.collapsed=1);b.visible||(e.visible=0);null!=b.value&&("object"===typeof b.value&&
-"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?e.xmlValue=mxUtils.getXml(b.value):e.value=b.value);for(var c in b)this.cellProperties[c]||"function"===typeof b[c]||(e[c]=b[c]);return e};
-EditorUi.prototype.diffCell=function(b,d){function e(t){return null!=t&&"object"===typeof t&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName&&"function"===typeof t.getAttribute}var c={};b.vertex!=d.vertex&&(c.vertex=d.vertex?1:0);b.edge!=d.edge&&(c.edge=d.edge?1:0);b.connectable!=d.connectable&&(c.connectable=d.connectable?1:0);if((null!=b.parent?null==d.parent:null!=d.parent)||null!=b.parent&&null!=d.parent&&b.parent.getId()!=d.parent.getId())c.parent=null!=d.parent?d.parent.getId():"";
-if((null!=b.source?null==d.source:null!=d.source)||null!=b.source&&null!=d.source&&b.source.getId()!=d.source.getId())c.source=null!=d.source?d.source.getId():"";if((null!=b.target?null==d.target:null!=d.target)||null!=b.target&&null!=d.target&&b.target.getId()!=d.target.getId())c.target=null!=d.target?d.target.getId():"";e(b.value)&&e(d.value)?b.value.isEqualNode(d.value)||(c.xmlValue=mxUtils.getXml(d.value)):b.value!=d.value&&(e(d.value)?c.xmlValue=mxUtils.getXml(d.value):c.value=null!=d.value?
+EditorUi.prototype.getCellForJson=function(b){var d=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,f=b.value;null!=b.xmlValue&&(f=mxUtils.parseXml(b.xmlValue).documentElement);d=new mxCell(f,d,b.style);d.connectable=0!=b.connectable;d.collapsed=1==b.collapsed;d.visible=0!=b.visible;d.vertex=1==b.vertex;d.edge=1==b.edge;d.id=b.id;for(var c in b)this.cellProperties[c]||(d[c]=b[c]);return d};
+EditorUi.prototype.getJsonForCell=function(b,d){var f={id:b.getId()};b.vertex&&(f.vertex=1);b.edge&&(f.edge=1);b.connectable||(f.connectable=0);null!=b.parent&&(f.parent=b.parent.getId());null!=d&&(f.previous=d.getId());null!=b.source&&(f.source=b.source.getId());null!=b.target&&(f.target=b.target.getId());null!=b.style&&(f.style=b.style);null!=b.geometry&&(f.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(f.collapsed=1);b.visible||(f.visible=0);null!=b.value&&("object"===typeof b.value&&
+"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?f.xmlValue=mxUtils.getXml(b.value):f.value=b.value);for(var c in b)this.cellProperties[c]||"function"===typeof b[c]||(f[c]=b[c]);return f};
+EditorUi.prototype.diffCell=function(b,d){function f(t){return null!=t&&"object"===typeof t&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName&&"function"===typeof t.getAttribute}var c={};b.vertex!=d.vertex&&(c.vertex=d.vertex?1:0);b.edge!=d.edge&&(c.edge=d.edge?1:0);b.connectable!=d.connectable&&(c.connectable=d.connectable?1:0);if((null!=b.parent?null==d.parent:null!=d.parent)||null!=b.parent&&null!=d.parent&&b.parent.getId()!=d.parent.getId())c.parent=null!=d.parent?d.parent.getId():"";
+if((null!=b.source?null==d.source:null!=d.source)||null!=b.source&&null!=d.source&&b.source.getId()!=d.source.getId())c.source=null!=d.source?d.source.getId():"";if((null!=b.target?null==d.target:null!=d.target)||null!=b.target&&null!=d.target&&b.target.getId()!=d.target.getId())c.target=null!=d.target?d.target.getId():"";f(b.value)&&f(d.value)?b.value.isEqualNode(d.value)||(c.xmlValue=mxUtils.getXml(d.value)):b.value!=d.value&&(f(d.value)?c.xmlValue=mxUtils.getXml(d.value):c.value=null!=d.value?
d.value:null);b.style!=d.style&&(c.style=d.style);b.visible!=d.visible&&(c.visible=d.visible?1:0);b.collapsed!=d.collapsed&&(c.collapsed=d.collapsed?1:0);if(!this.isObjectEqual(b.geometry,d.geometry,new mxGeometry)){var l=this.codec.encode(d.geometry);null!=l&&(c.geometry=mxUtils.getXml(l))}for(var m in b)this.cellProperties[m]||"function"===typeof b[m]||"function"===typeof d[m]||b[m]==d[m]||(c[m]=void 0===d[m]?null:d[m]);for(m in d)m in b||this.cellProperties[m]||"function"===typeof b[m]||"function"===
-typeof d[m]||b[m]==d[m]||(c[m]=void 0===d[m]?null:d[m]);return c};EditorUi.prototype.isObjectEqual=function(b,d,e){if(null==b&&null==d)return!0;if(null!=b?null==d:null!=d)return!1;var c=function(l,m){return null==e||e[l]!=m?!0===m?1:m:void 0};return JSON.stringify(b,c)==JSON.stringify(d,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
+typeof d[m]||b[m]==d[m]||(c[m]=void 0===d[m]?null:d[m]);return c};EditorUi.prototype.isObjectEqual=function(b,d,f){if(null==b&&null==d)return!0;if(null!=b?null==d:null!=d)return!1;var c=function(l,m){return null==f||f[l]!=m?!0===m?1:m:void 0};return JSON.stringify(b,c)==JSON.stringify(d,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings()){mxSettings.settings.ui=b;if("kennedy"==b||""==b)mxSettings.settings.darkMode=!1;mxSettings.save()}else{var d=mxSettings.getMainSettings();d.ui=b;"kennedy"==b&&(d.darkMode=!1);localStorage.setItem(".drawio-config",JSON.stringify(d))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?
mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,d){d?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],d=0;d<b.length;d++)"string"===typeof b[d]&&(b[d]={name:b[d],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(b){mxSettings.settings.plugins=b},getRecentColors:function(){return mxSettings.settings.recentColors},
setRecentColors:function(b){mxSettings.settings.recentColors=b},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(b){mxSettings.settings.formatWidth=b},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(b){mxSettings.settings.createTarget=b},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(b){mxSettings.settings.pageFormat=b},getUnit:function(){return mxSettings.settings.unit||
mxConstants.POINTS},setUnit:function(b){mxSettings.settings.unit=b},isRulerOn:function(){return mxSettings.settings.isRulerOn},setRulerOn:function(b){mxSettings.settings.isRulerOn=b},getDraftSaveDelay:function(){return mxSettings.settings.draftSaveDelay},setDraftSaveDelay:function(b){mxSettings.settings.draftSaveDelay=b},getDefaults:function(){return{language:"",configVersion:Editor.configVersion,customFonts:[],libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,
-plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,createTarget:"1"==urlParams.sketch||"1"==urlParams["live-ui"],pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.defaultGridColor,darkGridColor:mxGraphView.prototype.defaultDarkGridColor,autosave:!EditorUi.isElectronApp,resizeImages:null,openCounter:0,version:mxSettings.currentVersion,isNew:!0,unit:mxConstants.POINTS,isRulerOn:!1}},init:function(){mxSettings.settings=mxSettings.getDefaults()},
+plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,createTarget:"1"==urlParams.sketch||Editor.enableSimpleTheme,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.defaultGridColor,darkGridColor:mxGraphView.prototype.defaultDarkGridColor,autosave:!EditorUi.isElectronApp,resizeImages:null,openCounter:0,version:mxSettings.currentVersion,isNew:!0,unit:mxConstants.POINTS,isRulerOn:!1}},init:function(){mxSettings.settings=mxSettings.getDefaults()},
save:function(){if(isLocalStorage&&"undefined"!==typeof JSON)try{delete mxSettings.settings.isNew,mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSettings.key,JSON.stringify(mxSettings.settings))}catch(b){}},load:function(){isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key));null==mxSettings.settings&&mxSettings.init()},parse:function(b){b=null!=b?JSON.parse(b):null;null==b||b.configVersion!=Editor.configVersion||null!=Editor.config&&
Editor.config.override?(mxSettings.settings=null,mxSettings.init()):(mxSettings.settings=b,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.customFonts&&(mxSettings.settings.customFonts=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),
null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&
(mxSettings.settings.showStartScreen=!0),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.defaultGridColor),null==mxSettings.settings.darkGridColor&&(mxSettings.settings.darkGridColor=mxGraphView.prototype.defaultDarkGridColor),null==mxSettings.settings.autosave?mxSettings.settings.autosave=!EditorUi.isElectronApp:EditorUi.isElectronApp&&null==localStorage.getItem("._autoSaveTrans_")&&(localStorage.setItem("._autoSaveTrans_","1"),mxSettings.settings.autosave=
!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePuller=function(b,d){this.file=b;this.sync=d};
-DrawioFilePuller.prototype.start=function(b){var d=mxUtils.bind(this,function(){this.sync.lastModified=this.file.getLastModifiedDate();this.sync.updateStatus()});this.intId=setInterval(mxUtils.bind(this,function(){this.file.getLatestVersionId(mxUtils.bind(this,function(e){e!=this.file.getCurrentRevisionId()?this.file.getLatestVersion(mxUtils.bind(this,function(c){this.file.mergeFile(c,d)}),mxUtils.bind(this,function(){})):d()}),mxUtils.bind(this,function(){}))}),b);this._isConnected=!0};
+DrawioFilePuller.prototype.start=function(b){var d=mxUtils.bind(this,function(){this.sync.lastModified=this.file.getLastModifiedDate();this.sync.updateStatus()});this.intId=setInterval(mxUtils.bind(this,function(){this.file.getLatestVersionId(mxUtils.bind(this,function(f){f!=this.file.getCurrentRevisionId()?this.file.getLatestVersion(mxUtils.bind(this,function(c){this.file.mergeFile(c,d)}),mxUtils.bind(this,function(){})):d()}),mxUtils.bind(this,function(){}))}),b);this._isConnected=!0};
DrawioFilePuller.prototype.stop=function(){clearInterval(this.intId);this._isConnected=!1};DrawioFilePuller.prototype.isConnected=function(){return this._isConnected};DrawioFileSync=function(b){mxEventSource.call(this);this.lastActivity=Date.now();this.clientId=Editor.guid();this.ui=b.ui;this.file=b;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();this.isConnected()&&this.fileChangedNotify()});mxEvent.addListener(window,"online",this.onlineListener);this.realtimeListener=mxUtils.bind(this,function(){this.updateOnlineState()});this.file.addListener("realtimeStateChanged",this.realtimeListener);this.autosaveListener=mxUtils.bind(this,function(){this.updateRealtime()});
this.ui.editor.addListener("autosaveChanged",this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(d){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",
this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(d){null!=d.error&&null!=d.error.data&&4004===d.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=
-mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected())if(this.announced)this.fileChangedNotify();else{var d=this.file.getCurrentUser(),e={a:"join"};null!=d&&(e.name=encodeURIComponent(d.displayName),e.uid=d.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(e))));this.file.stats.msgSent++;this.announced=!0}});this.changeListener=mxUtils.bind(this,function(d){this.file.stats.msgReceived++;
-this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var e=this.stringToObject(d);null!=e&&(EditorUi.debug("DrawioFileSync.message",[this],e,d.length,"bytes"),e.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):e.v===DrawioFileSync.PROTOCOL&&null!=e.d&&this.handleMessageData(e.d))}catch(c){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;
-mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;DrawioFileSync.prototype.syncReceiveMessageDelay=50;DrawioFileSync.prototype.cleanupDelay=12E3;DrawioFileSync.prototype.syncChangeCounter=0;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;
-DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=1;DrawioFileSync.prototype.cacheReadyDelay=700;DrawioFileSync.prototype.maxOptimisticRetries=6;DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null;
+mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected())if(this.announced)this.fileChangedNotify();else{var d=this.file.getCurrentUser(),f={a:"join"};null!=d&&(f.name=encodeURIComponent(d.displayName),f.uid=d.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(f))));this.file.stats.msgSent++;this.announced=!0}});this.changeListener=mxUtils.bind(this,function(d){this.file.stats.msgReceived++;
+this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var f=this.stringToObject(d);null!=f&&(EditorUi.debug("DrawioFileSync.message",[this],f,d.length,"bytes"),f.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):f.v===DrawioFileSync.PROTOCOL&&null!=f.d&&this.handleMessageData(f.d))}catch(c){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;
+mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;DrawioFileSync.prototype.syncReceiveMessageDelay=50;DrawioFileSync.prototype.cleanupDelay=12E3;DrawioFileSync.prototype.syncChangeCounter=0;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;
+DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=1;DrawioFileSync.prototype.cacheReadyDelay=700;DrawioFileSync.prototype.maxOptimisticRetries=6;DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null;
DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());var b=!1;if(DrawioFileSync.PULLING_MODE&&null==this.puller&&"hidden"!=document.visibilityState)null==this.puller&&(this.puller=new DrawioFilePuller(this.file,this)),this.puller.start(this.file.getPullingInterval()),EditorUi.debug("DrawioFileSync.start (Pulling)",[this,"v"+DrawioFileSync.PROTOCOL],"rev",this.file.getCurrentRevisionId()),b=!0;
else if(!DrawioFileSync.PULLING_MODE&&null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(d){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start",[this,"v"+DrawioFileSync.PROTOCOL],"rev",this.file.getCurrentRevisionId())}catch(d){}this.installListeners()}b=
!0}b&&window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=Date.now();this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus()},0));this.updateRealtime()};
@@ -12022,371 +12036,370 @@ DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=
DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(c){mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){l=this.file.getRealtimeState();var m=mxResources.get("disconnected");this.file.invalidChecksum?m=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?m=mxResources.get("offline"):1==l&&(m=mxResources.get("online"));
this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(m))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var d=document.createElement("a");d.className="geButton geAdaptiveAsset";d.style.position="absolute";d.style.display="inline-block";d.style.verticalAlign=
"bottom";d.style.color="#666";d.style.top="6px";d.style.right="atlas"!=uiTheme?null!=this.ui.darkModeElement?"90px":"70px":"50px";d.style.padding="2px";d.style.fontSize="8pt";d.style.verticalAlign="middle";d.style.textDecoration="none";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="16px 16px";d.style.width="16px";d.style.height="16px";mxUtils.setOpacity(d,60);mxEvent.addListener(d,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
-function(c){c.preventDefault()}));b(d);this.ui.toolbarContainer.appendChild(d);this.collaboratorsElement=d}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var e=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),e=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),e=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&&
-this.file.isRealtimeSupported()&&(d=this.file.getRealtimeError(),e=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==e?(this.collaboratorsElement.style.display="none",e=Editor.syncImage):(e=Editor.syncProblemImage,b=null!=d&&null!=d.message?b+(" ("+d.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),e=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+
-e+")"}}};
-DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var d=this.file.isRevisionHistorySupported(),e=
-this.lastMessage;this.lastMessage=null;null!=e&&40<e.length&&(e=e.substring(0,40)+"...");b=mxResources.get("lastChange",[b]);this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>")+(null!=e?' <span title="'+mxUtils.htmlEntities(e)+
-'">('+mxUtils.htmlEntities(e)+")</span>":""));e=this.ui.statusContainer.getElementsByTagName("div");0<e.length&&d&&(e[0].style.display="inline-block",d&&(e[0].style.cursor="pointer",e[0].style.textDecoration="underline",mxEvent.addListener(e[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))));d=this.ui.statusContainer.getElementsByTagName("span");if(0<d.length){var c=d[0];c.style.opacity="0";mxUtils.setPrefixedStyle(c.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(c,100);mxUtils.setPrefixedStyle(c.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(c,0);window.setTimeout(mxUtils.bind(this,function(){this.updateStatus()}),1E3)}),this.updateStatusInterval/2)}),0)}this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};
-DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),this.updateStatusInterval))};DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)};
+function(c){c.preventDefault()}));b(d);this.ui.toolbarContainer.appendChild(d);this.collaboratorsElement=d}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var f=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),f=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),f=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&&
+this.file.isRealtimeSupported()&&(d=this.file.getRealtimeError(),f=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==f?(this.collaboratorsElement.style.display="none",f=Editor.syncImage):(f=Editor.syncProblemImage,b=null!=d&&null!=d.message?b+(" ("+d.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),f=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+
+f+")"}}};
+DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var d=this.lastMessage;this.lastMessage=null;
+null!=d&&40<d.length&&(d=d.substring(0,40)+"...");b=mxResources.get("lastChange",[b]);var f=this.file.isRevisionHistorySupported()?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+f+'title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>")+
+(null!=d?' <div data-effect="fade" title="'+mxUtils.htmlEntities(d)+'">('+mxUtils.htmlEntities(d)+")</div>":""));this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),Editor.updateStatusInterval))};
+DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)};
DrawioFileSync.prototype.handleMessageData=function(b){if("desc"==b.a)this.file.savingFile||this.reloadDescriptor();else if("join"==b.a||"leave"==b.a)"join"==b.a&&this.file.stats.joined++,null!=b.name&&(this.lastMessage=mxResources.get("join"==b.a?"userJoined":"userLeft",[decodeURIComponent(b.name)]),this.resetUpdateStatusThread(),this.updateStatus());else if("change"==b.a)this.receiveRemoteChanges(b);else if(null!=b.m){var d=new Date(b.m);if(null==this.lastMessageModified||this.lastMessageModified<
d)this.lastMessageModified=d,this.fileChangedNotify(b)}};DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing};
-DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){this.file.getLatestVersion(mxUtils.bind(this,function(d){this.reloadThread=null;if(null!=d){var e=this.file.getCurrentRevisionId(),c=d.getCurrentRevisionId();e==c?this.optimisticSync(b+1):this.file.mergeFile(d,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),
+DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){this.file.getLatestVersion(mxUtils.bind(this,function(d){this.reloadThread=null;if(null!=d){var f=this.file.getCurrentRevisionId(),c=d.getCurrentRevisionId();f==c?this.optimisticSync(b+1):this.file.mergeFile(d,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),
mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)),EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries))};
-DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var d=this.fileChanged(mxUtils.bind(this,function(e){this.updateStatus()}),mxUtils.bind(this,function(e){this.file.handleFileError(e)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=d}),!0)};
+DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var d=this.fileChanged(mxUtils.bind(this,function(f){this.updateStatus()}),mxUtils.bind(this,function(f){this.file.handleFileError(f)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=d}),!0)};
DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};
-DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var d=this.clientId+"."+this.syncChangeCounter++,e=this.createMessage({a:"change",c:b,id:d,t:Date.now()});d=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(e):"1"==urlParams.dev?(e=encodeURIComponent(this.objectToString(e)),0==this.maxSyncMessageSize||e.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+e):d=!0):d=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
+DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var d=this.clientId+"."+this.syncChangeCounter++,f=this.createMessage({a:"change",c:b,id:d,t:Date.now()});d=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(f):"1"==urlParams.dev?(f=encodeURIComponent(this.objectToString(f)),0==this.maxSyncMessageSize||f.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+f):d=!0):d=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
"changes",b,d?"(skipped)":"")}};
-DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(l,m){return l.id<m.id?-1:l.id>m.id?1:0});for(var d=null,e=0;e<this.receivedData.length;e++){var c=JSON.stringify(this.receivedData[e].c);c!=d&&this.doReceiveRemoteChanges(this.receivedData[e].c);
+DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(l,m){return l.id<m.id?-1:l.id>m.id?1:0});for(var d=null,f=0;f<this.receivedData.length;f++){var c=JSON.stringify(this.receivedData[f].c);c!=d&&this.doReceiveRemoteChanges(this.receivedData[f].c);
d=c}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(d){this.file.handleFileError(d)}))}),this.cleanupDelay))};
-DrawioFileSync.prototype.cleanup=function(b,d,e){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var c=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",c,"checkFile",e);e?this.file.getLatestVersion(mxUtils.bind(this,function(l){try{if(this.isValidState()&&
-!this.file.inConflictState&&this.file.isRealtime()){var m=this.ui.getPagesForXml(l.data);c=[this.ui.diffPages(this.ui.pages,m),this.ui.diffPages(m,this.file.ownPages)];this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",l,"patches",c)}null!=b&&b()}catch(t){null!=d&&d(t)}}),d):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",e,"modified",this.file.isModified()))};
+DrawioFileSync.prototype.cleanup=function(b,d,f){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var c=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",c,"checkFile",f);f?this.file.getLatestVersion(mxUtils.bind(this,function(l){try{if(this.isValidState()&&
+!this.file.inConflictState&&this.file.isRealtime()){var m=this.ui.getPagesForXml(l.data);c=[this.ui.diffPages(this.ui.pages,m),this.ui.diffPages(m,this.file.ownPages)];this.file.ignorePatches(c)||this.file.patch(c);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",l,"patches",c)}null!=b&&b()}catch(t){null!=d&&d(t)}}),d):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",f,"modified",this.file.isModified()))};
DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
-DrawioFileSync.prototype.extractRemove=function(b){var d={};null!=b[EditorUi.DIFF_REMOVE]&&(d[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var e in b[EditorUi.DIFF_UPDATE]){var c=b[EditorUi.DIFF_UPDATE][e];if(null!=c.cells&&null!=c.cells[EditorUi.DIFF_REMOVE]){null==d[EditorUi.DIFF_UPDATE]&&(d[EditorUi.DIFF_UPDATE]={});d[EditorUi.DIFF_UPDATE][e]={};var l=d[EditorUi.DIFF_UPDATE][e];l.cells={};l.cells[EditorUi.DIFF_REMOVE]=c.cells[EditorUi.DIFF_REMOVE]}}return d};
-DrawioFileSync.prototype.patchRealtime=function(b,d,e){var c=null;if(this.file.isRealtime()){c=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var l=this.extractRemove(this.extractLocal(c)),m=(null==e?b:b.concat(e)).concat([l]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,m,!0,d);mxUtils.isEmptyObject(l)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",d,"own",e,"all",c,"local",
+DrawioFileSync.prototype.extractRemove=function(b){var d={};null!=b[EditorUi.DIFF_REMOVE]&&(d[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var f in b[EditorUi.DIFF_UPDATE]){var c=b[EditorUi.DIFF_UPDATE][f];if(null!=c.cells&&null!=c.cells[EditorUi.DIFF_REMOVE]){null==d[EditorUi.DIFF_UPDATE]&&(d[EditorUi.DIFF_UPDATE]={});d[EditorUi.DIFF_UPDATE][f]={};var l=d[EditorUi.DIFF_UPDATE][f];l.cells={};l.cells[EditorUi.DIFF_REMOVE]=c.cells[EditorUi.DIFF_REMOVE]}}return d};
+DrawioFileSync.prototype.patchRealtime=function(b,d,f){var c=null;if(this.file.isRealtime()){c=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var l=this.extractRemove(this.extractLocal(c)),m=(null==f?b:b.concat(f)).concat([l]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,m,!0,d);mxUtils.isEmptyObject(l)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",d,"own",f,"all",c,"local",
l,"applied",m)}return c};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
-DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),d=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,d,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([d])}this.localFileWasChanged=!1}catch(e){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
-b,e)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,d,e,c,l,m){try{this.file.stats.merged++;this.lastModified=new Date;var t=this.file.getDescriptorRevisionId(e);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var y=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(y,this.ui.pages):null;var C=this.file.isRealtime()?this.ui.diffPages(y,this.file.ownPages):null;y=this.ui.applyPatches(y,b);var A=null==d?null:this.ui.getHashValueForPages(y);
-this.file.setShadowPages(y);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",C,"checksum",d,"current",A,"valid",d==A,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",t,"etag",this.file.getDescriptorEtag(e));if(null!=d&&d!=A){var B=this.ui.hashValue(t),J=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(l,b,"From: "+J+"\nTo: "+B+"\nChecksum: "+d+"\nCurrent: "+A,t,"merge",
-d,A,t);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(y)]);return}null==this.patchRealtime(b,null,C)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),e);this.file.backupPatch=null;null!=c&&c(!0)}catch(k){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=l&&l(k);try{if(this.file.errorReportsEnabled)J=this.ui.hashValue(this.file.getCurrentRevisionId()),B=this.ui.hashValue(t),this.file.sendErrorReport("Error in merge","From: "+J+"\nTo: "+B+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),k);else{var f=this.file.getCurrentUser(),g=null!=f?f.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),g,k)}}catch(n){}}};
-DrawioFileSync.prototype.fileChanged=function(b,d,e,c){var l=window.setTimeout(mxUtils.bind(this,function(){null!=e&&e()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(m){null!=e&&e()||(this.isValidState()?this.catchup(m,b,d,e):null!=d&&d())}),d):null!=d&&d())}),c?this.cacheReadyDelay:0);return this.notifyThread=l};
+DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),d=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,d,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([d])}this.localFileWasChanged=!1}catch(f){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
+b,f)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
+DrawioFileSync.prototype.merge=function(b,d,f,c,l,m){try{this.file.stats.merged++;this.lastModified=new Date;var t=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var y=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(y,this.ui.pages):null;var C=this.file.isRealtime()?this.ui.diffPages(y,this.file.ownPages):null;y=this.ui.applyPatches(y,b);var A=null==d?null:this.ui.getHashValueForPages(y);
+this.file.setShadowPages(y);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",C,"checksum",d,"current",A,"valid",d==A,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",t,"etag",this.file.getDescriptorEtag(f));if(null!=d&&d!=A){var B=this.ui.hashValue(t),J=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(l,b,"From: "+J+"\nTo: "+B+"\nChecksum: "+d+"\nCurrent: "+A,t,"merge",
+d,A,t);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(y)]);return}null==this.patchRealtime(b,null,C)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);this.file.backupPatch=null;null!=c&&c(!0)}catch(k){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
+null!=l&&l(k);try{if(this.file.errorReportsEnabled)J=this.ui.hashValue(this.file.getCurrentRevisionId()),B=this.ui.hashValue(t),this.file.sendErrorReport("Error in merge","From: "+J+"\nTo: "+B+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),k);else{var e=this.file.getCurrentUser(),g=null!=e?e.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),g,k)}}catch(q){}}};
+DrawioFileSync.prototype.fileChanged=function(b,d,f,c){var l=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(m){null!=f&&f()||(this.isValidState()?this.catchup(m,b,d,f):null!=d&&d())}),d):null!=d&&d())}),c?this.cacheReadyDelay:0);return this.notifyThread=l};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(b,d,e,c){if(null!=b&&(null==c||!c())){var l=this.file.getCurrentRevisionId(),m=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",l,"to",m,"valid",this.isValidState());if(l==m)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=d&&d(!0);else if(this.isValidState()){var t=this.file.getDescriptorSecret(b);if(null==t||"1"==urlParams.lockdown)this.reload(d,e,c);else{var y=0,C=!1,A=mxUtils.bind(this,function(){if(null==
-c||!c())if(l!=this.file.getCurrentRevisionId())null!=d&&d(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var B=!0,J=window.setTimeout(mxUtils.bind(this,function(){B=!1;this.reload(d,e,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(l)+"&to="+encodeURIComponent(m)+(null!=t?"&secret="+encodeURIComponent(t):""),mxUtils.bind(this,function(f){this.file.stats.bytesReceived+=f.getText().length;window.clearTimeout(J);if(B&&
-(null==c||!c()))if(l!=this.file.getCurrentRevisionId())null!=d&&d(!0);else if(this.isValidState()){var g=null,k=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[f],"status",f.getStatus(),"cacheReadyRetryCount",y,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=f.getStatus()&&299>=f.getStatus()&&0<f.getText().length)try{var n=JSON.parse(f.getText());if(null!=n&&0<n.length)for(var v=0;v<n.length;v++){var x=this.stringToObject(n[v]);if(x.v>DrawioFileSync.PROTOCOL){C=!0;k=[];break}else if(x.v===
-DrawioFileSync.PROTOCOL&&null!=x.d)g=x.d.checksum,k.push(x.d.patch);else{C=!0;k=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[n],"failed",C,"temp",k,"checksum",g)}catch(E){k=[],null!=window.console&&"1"==urlParams.test&&console.log(E)}try{0<k.length?(this.file.stats.cacheHits++,this.merge(k,g,b,d,e,c)):y<=this.maxCacheReadyRetries-1&&!C&&401!=f.getStatus()&&503!=f.getStatus()&&410!=f.getStatus()?(y++,this.file.stats.cacheMiss++,window.setTimeout(A,(y+1)*this.cacheReadyDelay)):
-(this.file.stats.cacheFail++,this.reload(d,e,c))}catch(E){null!=e&&e(E)}}else null!=e&&e()}))}else null!=e&&e()});window.setTimeout(A,this.cacheReadyDelay)}}else null!=e&&e()}};DrawioFileSync.prototype.reload=function(b,d,e,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(l){null!=d&&d(l)}),e,c)};
-DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var d=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),e=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(d)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
-EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",e)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
-DrawioFileSync.prototype.createToken=function(b,d,e){var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(m){window.clearTimeout(l);c&&(200<=m.getStatus()&&299>=m.getStatus()?d(m.getText()):e({code:m.getStatus(),message:"Token Error "+m.getStatus()}))}))};
+DrawioFileSync.prototype.catchup=function(b,d,f,c){if(null!=b&&(null==c||!c())){var l=this.file.getCurrentRevisionId(),m=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",l,"to",m,"valid",this.isValidState());if(l==m)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=d&&d(!0);else if(this.isValidState()){var t=this.file.getDescriptorSecret(b);if(null==t||"1"==urlParams.lockdown)this.reload(d,f,c);else{var y=0,C=!1,A=mxUtils.bind(this,function(){if(null==
+c||!c())if(l!=this.file.getCurrentRevisionId())null!=d&&d(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var B=!0,J=window.setTimeout(mxUtils.bind(this,function(){B=!1;this.reload(d,f,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(l)+"&to="+encodeURIComponent(m)+(null!=t?"&secret="+encodeURIComponent(t):""),mxUtils.bind(this,function(e){this.file.stats.bytesReceived+=e.getText().length;window.clearTimeout(J);if(B&&
+(null==c||!c()))if(l!=this.file.getCurrentRevisionId())null!=d&&d(!0);else if(this.isValidState()){var g=null,k=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[e],"status",e.getStatus(),"cacheReadyRetryCount",y,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=e.getStatus()&&299>=e.getStatus()&&0<e.getText().length)try{var q=JSON.parse(e.getText());if(null!=q&&0<q.length)for(var u=0;u<q.length;u++){var x=this.stringToObject(q[u]);if(x.v>DrawioFileSync.PROTOCOL){C=!0;k=[];break}else if(x.v===
+DrawioFileSync.PROTOCOL&&null!=x.d)g=x.d.checksum,k.push(x.d.patch);else{C=!0;k=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[q],"failed",C,"temp",k,"checksum",g)}catch(E){k=[],null!=window.console&&"1"==urlParams.test&&console.log(E)}try{0<k.length?(this.file.stats.cacheHits++,this.merge(k,g,b,d,f,c)):y<=this.maxCacheReadyRetries-1&&!C&&401!=e.getStatus()&&503!=e.getStatus()&&410!=e.getStatus()?(y++,this.file.stats.cacheMiss++,window.setTimeout(A,(y+1)*this.cacheReadyDelay)):
+(this.file.stats.cacheFail++,this.reload(d,f,c))}catch(E){null!=f&&f(E)}}else null!=f&&f()}))}else null!=f&&f()});window.setTimeout(A,this.cacheReadyDelay)}}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,d,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(l){null!=d&&d(l)}),f,c)};
+DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var d=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(d)+"&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))};
+DrawioFileSync.prototype.createToken=function(b,d,f){var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(m){window.clearTimeout(l);c&&(200<=m.getStatus()&&299>=m.getStatus()?d(m.getText()):f({code:m.getStatus(),message:"Token Error "+m.getStatus()}))}))};
DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})}EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
-DrawioFileSync.prototype.fileSaved=function(b,d,e,c,l){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),t=this.file.getDescriptorSecret(this.file.getDescriptor()),y=this.file.getDescriptorRevisionId(d),C=this.file.getCurrentRevisionId();if(null==
-t||null==l||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(m),function(){}),null!=e&&e(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",y,"to",C,"etag",this.file.getCurrentEtag());else{var A=this.ui.diffPages(this.file.getShadowPages(),b);d=this.file.getDescriptorSecret(d);var B=this.ui.getHashValueForPages(b),J=this.objectToString(this.createMessage({patch:A,checksum:B}));this.file.stats.bytesSent+=J.length;
-this.file.stats.msgSent++;var f=!0,g=window.setTimeout(mxUtils.bind(this,function(){f=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(y)+"&to="+encodeURIComponent(C)+"&msg="+encodeURIComponent(m)+(null!=t?"&secret="+encodeURIComponent(t):"")+(null!=d?"&last-secret="+encodeURIComponent(d):"")+(J.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(J):"")+(null!=l?"&token="+encodeURIComponent(l):
-""),mxUtils.bind(this,function(k){window.clearTimeout(g);f&&(200<=k.getStatus()&&299>=k.getStatus()?null!=e&&e():c({code:k.getStatus(),message:k.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",A,J.length,"bytes","from",y,"to",C,"etag",this.file.getCurrentEtag(),"checksum",B)}}this.file.setShadowPages(b);this.scheduleCleanup()};
+DrawioFileSync.prototype.fileSaved=function(b,d,f,c,l){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var m=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),t=this.file.getDescriptorSecret(this.file.getDescriptor()),y=this.file.getDescriptorRevisionId(d),C=this.file.getCurrentRevisionId();if(null==
+t||null==l||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(m),function(){}),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",y,"to",C,"etag",this.file.getCurrentEtag());else{var A=this.ui.diffPages(this.file.getShadowPages(),b);d=this.file.getDescriptorSecret(d);var B=this.ui.getHashValueForPages(b),J=this.objectToString(this.createMessage({patch:A,checksum:B}));this.file.stats.bytesSent+=J.length;
+this.file.stats.msgSent++;var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(y)+"&to="+encodeURIComponent(C)+"&msg="+encodeURIComponent(m)+(null!=t?"&secret="+encodeURIComponent(t):"")+(null!=d?"&last-secret="+encodeURIComponent(d):"")+(J.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(J):"")+(null!=l?"&token="+encodeURIComponent(l):
+""),mxUtils.bind(this,function(k){window.clearTimeout(g);e&&(200<=k.getStatus()&&299>=k.getStatus()?null!=f&&f():c({code:k.getStatus(),message:k.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",A,J.length,"bytes","from",y,"to",C,"etag",this.file.getCurrentEtag(),"checksum",B)}}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
-DrawioFileSync.prototype.fileConflict=function(b,d,e){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,d,e):this.fileChanged(d,e)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
+DrawioFileSync.prototype.fileConflict=function(b,d,f){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,d,f):this.fileChanged(d,f)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher?(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null)):null!=this.puller&&(EditorUi.debug("DrawioFileSync.stop (Pulling)",
[this]),this.puller.stop(),this.puller=null);this.updateOnlineState();this.updateStatus()};
DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),d={a:"leave"};null!=b&&(d.name=encodeURIComponent(b.displayName),d.uid=b.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(d))));this.file.stats.msgSent++}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged",
this.autosaveListener),this.autosaveListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,
"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];function mxAsyncCanvas(b){mxAbstractCanvas2D.call(this);this.htmlCanvas=b;b.images=b.images||[];b.subCanvas=b.subCanvas||[]}mxUtils.extend(mxAsyncCanvas,mxAbstractCanvas2D);mxAsyncCanvas.prototype.htmlCanvas=null;mxAsyncCanvas.prototype.canvasIndex=0;mxAsyncCanvas.prototype.waitCounter=0;mxAsyncCanvas.prototype.onComplete=null;mxAsyncCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
-mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,d,e,c,l){};
+mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,d,f,c,l){};
mxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
-mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,d,e,c){};mxAsyncCanvas.prototype.roundrect=function(b,d,e,c,l,m){};mxAsyncCanvas.prototype.ellipse=function(b,d,e,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxAsyncCanvas.prototype.image=function(b,d,e,c,l,m,t,y){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(b,d,e,c,l,m,t,y,C,A,B,J){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==C&&"function"===typeof html2canvas)){this.incWaitCounter();var f=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(g){this.htmlCanvas.subCanvas[f]=g;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
-mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(d,e,c,l){return e+e+c+c+l+l});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
+mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,d,f,c){};mxAsyncCanvas.prototype.roundrect=function(b,d,f,c,l,m){};mxAsyncCanvas.prototype.ellipse=function(b,d,f,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
+mxAsyncCanvas.prototype.image=function(b,d,f,c,l,m,t,y){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(b,d,f,c,l,m,t,y,C,A,B,J){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==C&&"function"===typeof html2canvas)){this.incWaitCounter();var e=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(g){this.htmlCanvas.subCanvas[e]=g;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(d,f,c,l){return f+f+c+c+l+l});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,d){this.state.dx+=b;this.state.dy+=d;this.ctx.translate(b,d)};
-mxJsCanvas.prototype.rotate=function(b,d,e,c,l){c-=this.state.dx;l-=this.state.dy;this.ctx.translate(c,l);(d||e)&&this.ctx.scale(d?-1:1,e?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-l)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
-mxJsCanvas.prototype.setGradient=function(b,d,e,c,l,m,t,y,C){e=this.ctx.createLinearGradient(0,c,0,c+m);c=this.state;c.fillColor=b;c.fillAlpha=null!=y?y:1;c.gradientColor=d;c.gradientAlpha=null!=C?C:1;c.gradientDirection=t;b=this.hexToRgb(b);d=this.hexToRgb(d);null!=b&&e.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=d&&e.addColorStop(1,"rgba("+d.r+","+d.g+","+d.b+","+c.gradientAlpha+")");this.ctx.fillStyle=e};
+mxJsCanvas.prototype.rotate=function(b,d,f,c,l){c-=this.state.dx;l-=this.state.dy;this.ctx.translate(c,l);(d||f)&&this.ctx.scale(d?-1:1,f?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-l)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
+mxJsCanvas.prototype.setGradient=function(b,d,f,c,l,m,t,y,C){f=this.ctx.createLinearGradient(0,c,0,c+m);c=this.state;c.fillColor=b;c.fillAlpha=null!=y?y:1;c.gradientColor=d;c.gradientAlpha=null!=C?C:1;c.gradientDirection=t;b=this.hexToRgb(b);d=this.hexToRgb(d);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=d&&f.addColorStop(1,"rgba("+d.r+","+d.g+","+d.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f};
mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var d=0;d<b.length;d++)b[d]=parseInt(b[d],10);this.setLineDash(b)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(d){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var d=0;d<b.length;d++)b[d]=parseInt(b[d],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b};
mxJsCanvas.prototype.setMiterLimit=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setFontColor=function(b){this.ctx.fillStyle=b};mxJsCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxJsCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxJsCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
mxJsCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxJsCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxJsCanvas.prototype.setShadow=function(b){(this.state.shadow=b)?(this.setShadowOffset(this.state.shadowDx,this.state.shadowDy),this.setShadowAlpha(this.state.shadowAlpha)):(this.ctx.shadowColor="transparent",this.ctx.shadowBlur=0,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0)};
mxJsCanvas.prototype.setShadowColor=function(b){if(null==b||b==mxConstants.NONE)b=null,this.ctx.shadowColor="transparent";this.state.shadowColor=b;if(this.state.shadow&&null!=b){var d=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;b=this.hexToRgb(b);this.ctx.shadowColor="rgba("+b.r+","+b.g+","+b.b+","+d+")"}};mxJsCanvas.prototype.setShadowAlpha=function(b){this.state.shadowAlpha=b;this.setShadowColor(this.state.shadowColor)};
-mxJsCanvas.prototype.setShadowOffset=function(b,d){this.state.shadowDx=b;this.state.shadowDy=d;this.state.shadow&&(this.ctx.shadowOffsetX=b,this.ctx.shadowOffsetY=d)};mxJsCanvas.prototype.moveTo=function(b,d){this.ctx.moveTo(b,d);this.lastMoveX=b;this.lastMoveY=d};mxJsCanvas.prototype.lineTo=function(b,d){this.ctx.lineTo(b,d);this.lastMoveX=b;this.lastMoveY=d};mxJsCanvas.prototype.quadTo=function(b,d,e,c){this.ctx.quadraticCurveTo(b,d,e,c);this.lastMoveX=e;this.lastMoveY=c};
-mxJsCanvas.prototype.arcTo=function(b,d,e,c,l,m,t){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,d,e,c,l,m,t);if(null!=b)for(d=0;d<b.length;d+=6)this.curveTo(b[d],b[d+1],b[d+2],b[d+3],b[d+4],b[d+5])};mxJsCanvas.prototype.curveTo=function(b,d,e,c,l,m){this.ctx.bezierCurveTo(b,d,e,c,l,m);this.lastMoveX=l;this.lastMoveY=m};mxJsCanvas.prototype.rect=function(b,d,e,c){this.begin();this.moveTo(b,d);this.lineTo(b+e,d);this.lineTo(b+e,d+c);this.lineTo(b,d+c);this.close()};
-mxJsCanvas.prototype.roundrect=function(b,d,e,c,l,m){this.begin();this.moveTo(b+l,d);this.lineTo(b+e-l,d);this.quadTo(b+e,d,b+e,d+m);this.lineTo(b+e,d+c-m);this.quadTo(b+e,d+c,b+e-l,d+c);this.lineTo(b+l,d+c);this.quadTo(b,d+c,b,d+c-m);this.lineTo(b,d+m);this.quadTo(b,d,b+l,d)};mxJsCanvas.prototype.ellipse=function(b,d,e,c){this.ctx.save();this.ctx.translate(b+e/2,d+c/2);this.ctx.scale(e/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
+mxJsCanvas.prototype.setShadowOffset=function(b,d){this.state.shadowDx=b;this.state.shadowDy=d;this.state.shadow&&(this.ctx.shadowOffsetX=b,this.ctx.shadowOffsetY=d)};mxJsCanvas.prototype.moveTo=function(b,d){this.ctx.moveTo(b,d);this.lastMoveX=b;this.lastMoveY=d};mxJsCanvas.prototype.lineTo=function(b,d){this.ctx.lineTo(b,d);this.lastMoveX=b;this.lastMoveY=d};mxJsCanvas.prototype.quadTo=function(b,d,f,c){this.ctx.quadraticCurveTo(b,d,f,c);this.lastMoveX=f;this.lastMoveY=c};
+mxJsCanvas.prototype.arcTo=function(b,d,f,c,l,m,t){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,d,f,c,l,m,t);if(null!=b)for(d=0;d<b.length;d+=6)this.curveTo(b[d],b[d+1],b[d+2],b[d+3],b[d+4],b[d+5])};mxJsCanvas.prototype.curveTo=function(b,d,f,c,l,m){this.ctx.bezierCurveTo(b,d,f,c,l,m);this.lastMoveX=l;this.lastMoveY=m};mxJsCanvas.prototype.rect=function(b,d,f,c){this.begin();this.moveTo(b,d);this.lineTo(b+f,d);this.lineTo(b+f,d+c);this.lineTo(b,d+c);this.close()};
+mxJsCanvas.prototype.roundrect=function(b,d,f,c,l,m){this.begin();this.moveTo(b+l,d);this.lineTo(b+f-l,d);this.quadTo(b+f,d,b+f,d+m);this.lineTo(b+f,d+c-m);this.quadTo(b+f,d+c,b+f-l,d+c);this.lineTo(b+l,d+c);this.quadTo(b,d+c,b,d+c-m);this.lineTo(b,d+m);this.quadTo(b,d,b+l,d)};mxJsCanvas.prototype.ellipse=function(b,d,f,c){this.ctx.save();this.ctx.translate(b+f/2,d+c/2);this.ctx.scale(f/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxJsCanvas.prototype.image=function(b,d,e,c,l,m,t,y){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var C=this.ctx;C.save();if(m){m=l.width;var A=l.height,B=Math.min(e/m,c/A);b+=(e-m*B)/2;d+=(c-A*B)/2;e=m*B;c=A*B}t&&(C.translate(2*b+e,0),C.scale(-1,1));y&&(C.translate(0,2*d+c),C.scale(1,-1));C.drawImage(l,b,d,e,c);C.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
-mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,d=this.ctx.shadowOffsetX,e=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=d;this.ctx.shadowOffsetY=e}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(b,d,e,c,l,m,t,y,C,A,B,J){if(null!=l&&0!=l.length){e=this.state.scale;0!=J&&(this.ctx.translate(Math.round(b),Math.round(d)),this.ctx.rotate(J*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-d)));if("html"==C){l=this.subCanvas[this.canvasIndex++];C=l.height;J=l.width;switch(t){case mxConstants.ALIGN_MIDDLE:d-=C/2/e;break;case mxConstants.ALIGN_BOTTOM:d-=C/e}switch(m){case mxConstants.ALIGN_CENTER:b-=J/2/e;break;case mxConstants.ALIGN_RIGHT:b-=J/e}this.ctx.save();
-if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(d)-.5,Math.round(l.width/e),Math.round(l.height/e))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(d)-.5,Math.round(l.width/e),Math.round(l.height/e)));this.ctx.scale(1/e,1/e);this.ctx.drawImage(l,
-Math.round(b*e),Math.round(d*e))}else{this.ctx.save();this.updateFont();J=document.createElement("div");J.innerHTML=l;J.style.position="absolute";J.style.top="-9999px";J.style.left="-9999px";J.style.fontFamily=this.state.fontFamily;J.style.fontWeight="bold";J.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(J);C=[J.offsetWidth,J.offsetHeight];document.body.removeChild(J);l=l.split("\n");J=C[1];this.ctx.textBaseline="top";C=d;switch(t){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";d-=(l.length-1)*J/2;C=d-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",d-=J*(l.length-1),C=d-this.state.fontSize}t=[];J=[];for(e=0;e<l.length;e++)J[e]=b,t[e]=this.ctx.measureText(l[e]).width,null!=m&&m!=mxConstants.ALIGN_LEFT&&(J[e]-=t[e],m==mxConstants.ALIGN_CENTER&&(J[e]+=t[e]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=J[0];m=t[0];for(e=1;e<l.length;e++)b=Math.min(b,J[e]),m=Math.max(m,t[e]);this.ctx.save();
-b=Math.round(b)-.5;C=Math.round(C)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,C,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,C,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));this.ctx.restore()}for(e=0;e<l.length;e++)this.ctx.fillText(l[e],J[e],d),d+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+mxJsCanvas.prototype.image=function(b,d,f,c,l,m,t,y){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var C=this.ctx;C.save();if(m){m=l.width;var A=l.height,B=Math.min(f/m,c/A);b+=(f-m*B)/2;d+=(c-A*B)/2;f=m*B;c=A*B}t&&(C.translate(2*b+f,0),C.scale(-1,1));y&&(C.translate(0,2*d+c),C.scale(1,-1));C.drawImage(l,b,d,f,c);C.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,d=this.ctx.shadowOffsetX,f=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=d;this.ctx.shadowOffsetY=f}else this.ctx.fill(),this.ctx.stroke()};
+mxJsCanvas.prototype.text=function(b,d,f,c,l,m,t,y,C,A,B,J){if(null!=l&&0!=l.length){f=this.state.scale;0!=J&&(this.ctx.translate(Math.round(b),Math.round(d)),this.ctx.rotate(J*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-d)));if("html"==C){l=this.subCanvas[this.canvasIndex++];C=l.height;J=l.width;switch(t){case mxConstants.ALIGN_MIDDLE:d-=C/2/f;break;case mxConstants.ALIGN_BOTTOM:d-=C/f}switch(m){case mxConstants.ALIGN_CENTER:b-=J/2/f;break;case mxConstants.ALIGN_RIGHT:b-=J/f}this.ctx.save();
+if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(d)-.5,Math.round(l.width/f),Math.round(l.height/f))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(d)-.5,Math.round(l.width/f),Math.round(l.height/f)));this.ctx.scale(1/f,1/f);this.ctx.drawImage(l,
+Math.round(b*f),Math.round(d*f))}else{this.ctx.save();this.updateFont();J=document.createElement("div");J.innerHTML=l;J.style.position="absolute";J.style.top="-9999px";J.style.left="-9999px";J.style.fontFamily=this.state.fontFamily;J.style.fontWeight="bold";J.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(J);C=[J.offsetWidth,J.offsetHeight];document.body.removeChild(J);l=l.split("\n");J=C[1];this.ctx.textBaseline="top";C=d;switch(t){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";d-=(l.length-1)*J/2;C=d-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",d-=J*(l.length-1),C=d-this.state.fontSize}t=[];J=[];for(f=0;f<l.length;f++)J[f]=b,t[f]=this.ctx.measureText(l[f]).width,null!=m&&m!=mxConstants.ALIGN_LEFT&&(J[f]-=t[f],m==mxConstants.ALIGN_CENTER&&(J[f]+=t[f]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=J[0];m=t[0];for(f=1;f<l.length;f++)b=Math.min(b,J[f]),m=Math.max(m,t[f]);this.ctx.save();
+b=Math.round(b)-.5;C=Math.round(C)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,C,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,C,m,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));this.ctx.restore()}for(f=0;f<l.length;f++)this.ctx.fillText(l[f],J[f],d),d+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};DrawioClient=function(b,d){mxEventSource.call(this);this.ui=b;this.cookieName=d;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(b){this.user=b;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+b.toUTCString()}};
-DrawioClient.prototype.getPersistentToken=function(b){var d=null;isLocalStorage&&(d=localStorage.getItem("."+this.cookieName),null==d&&b&&(d=sessionStorage.getItem("."+this.cookieName)));if(null==d&&"undefined"!=typeof Storage){var e=document.cookie;b=this.cookieName+"=";var c=e.indexOf(b);0<=c&&(c+=b.length,d=e.indexOf(";",c),0>d?d=e.length:postCookie=e.substring(d),d=e.substring(c,d),d=0<d.length?d:null,null!=d&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie=b+"; expires="+
-e.toUTCString(),localStorage.setItem("."+this.cookieName,d)))}return d};DrawioClient.prototype.setPersistentToken=function(b,d){try{if(null!=b)if(isLocalStorage)d?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var e=new Date;e.setYear(e.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(d?"":"; expires="+e.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(l){this.ui.handleError(l)}};DrawioUser=function(b,d,e,c,l){this.id=b;this.email=d;this.displayName=e;this.pictureUrl=c;this.locale=l};DriveFile=function(b,d,e){DrawioFile.call(this,b,d);this.desc=e};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
+DrawioClient.prototype.getPersistentToken=function(b){var d=null;isLocalStorage&&(d=localStorage.getItem("."+this.cookieName),null==d&&b&&(d=sessionStorage.getItem("."+this.cookieName)));if(null==d&&"undefined"!=typeof Storage){var f=document.cookie;b=this.cookieName+"=";var c=f.indexOf(b);0<=c&&(c+=b.length,d=f.indexOf(";",c),0>d?d=f.length:postCookie=f.substring(d),d=f.substring(c,d),d=0<d.length?d:null,null!=d&&isLocalStorage&&(f=new Date,f.setYear(f.getFullYear()-1),document.cookie=b+"; expires="+
+f.toUTCString(),localStorage.setItem("."+this.cookieName,d)))}return d};DrawioClient.prototype.setPersistentToken=function(b,d){try{if(null!=b)if(isLocalStorage)d?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var f=new Date;f.setYear(f.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(d?"":"; expires="+f.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(l){this.ui.handleError(l)}};DrawioUser=function(b,d,f,c,l){this.id=b;this.email=d;this.displayName=f;this.pictureUrl=c;this.locale=l};DriveFile=function(b,d,f){DrawioFile.call(this,b,d);this.desc=f};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==b.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};
-DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(d){if(null!=d&&null!=d.items)for(var e=0;e<d.items.length;e++)if("anyoneWithLink"===d.items[e].id||"anyone"===d.items[e].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
-DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,d,e,c,l){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,d,e,c,l)}),e,c,l])};
-DriveFile.prototype.saveFile=function(b,d,e,c,l,m){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(t,y){var C=mxUtils.bind(this,function(A,B){try{var J=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,B,mxUtils.bind(this,function(f,g){try{this.savingFile=!1,0!=f?(this.setModified(this.getShadowModified()),d&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
-Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=f,null!=y?this.fileSaved(g,J,mxUtils.bind(this,function(){this.contentChanged();null!=e&&e(f)}),c,y):null!=e&&e(f)):null!=c&&c(f)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),mxUtils.bind(this,function(f,g){try{this.savingFile=!1,this.isConflict(f)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(g,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
-function(){this.updateFileData();this.setShadowModified(!1);C(A,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(f)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),l,l,A,null,t)}catch(f){if(this.savingFile=!1,null!=c)c(f);else throw f;}});C(m,d)}))):null!=e&&e()}catch(t){if(null!=c)c(t);else throw t;}};
-DriveFile.prototype.copyFile=function(b,d){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,d)}catch(e){d(e)}}),d,!0)};
-DriveFile.prototype.makeCopy=function(b,d,e){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,e),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=d&&d()}))};DriveFile.prototype.saveAs=function(b,d,e){this.ui.drive.copyFile(this.getId(),b,d,e)};
-DriveFile.prototype.rename=function(b,d,e){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.desc=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=d&&d(l)):(this.desc=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,d,e))}),e)};
-DriveFile.prototype.move=function(b,d,e){this.ui.drive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.desc=c;this.descriptorChanged();null!=d&&d(c)}),e)};DriveFile.prototype.share=function(){this.ui.drive.showPermissions(this.getId())};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};
+DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(d){if(null!=d&&null!=d.items)for(var f=0;f<d.items.length;f++)if("anyoneWithLink"===d.items[f].id||"anyone"===d.items[f].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
+DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,d,f,c,l){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,d,f,c,l)}),f,c,l])};
+DriveFile.prototype.saveFile=function(b,d,f,c,l,m){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(t,y){var C=mxUtils.bind(this,function(A,B){try{var J=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,B,mxUtils.bind(this,function(e,g){try{this.savingFile=!1,0!=e?(this.setModified(this.getShadowModified()),d&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=
+Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=e,null!=y?this.fileSaved(g,J,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(e)}),c,y):null!=f&&f(e)):null!=c&&c(e)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),mxUtils.bind(this,function(e,g){try{this.savingFile=!1,this.isConflict(e)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(g,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
+function(){this.updateFileData();this.setShadowModified(!1);C(A,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(e)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),l,l,A,null,t)}catch(e){if(this.savingFile=!1,null!=c)c(e);else throw e;}});C(m,d)}))):null!=f&&f()}catch(t){if(null!=c)c(t);else throw t;}};
+DriveFile.prototype.copyFile=function(b,d){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,d)}catch(f){d(f)}}),d,!0)};
+DriveFile.prototype.makeCopy=function(b,d,f){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,f),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=d&&d()}))};DriveFile.prototype.saveAs=function(b,d,f){this.ui.drive.copyFile(this.getId(),b,d,f)};
+DriveFile.prototype.rename=function(b,d,f){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.desc=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=d&&d(l)):(this.desc=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,d,f))}),f)};
+DriveFile.prototype.move=function(b,d,f){this.ui.drive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.desc=c;this.descriptorChanged();null!=d&&d(c)}),f)};DriveFile.prototype.share=function(){this.ui.drive.showPermissions(this.getId())};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};
DriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};DriveFile.prototype.isSyncSupported=function(){return!0};DriveFile.prototype.isRealtimeSupported=function(){return!0};DriveFile.prototype.isRealtimeOptional=function(){return null!=this.sync&&this.sync.isConnected()};
-DriveFile.prototype.setRealtimeEnabled=function(b,d,e){null!=this.sync?this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/properties?alt=json&supportsAllDrives=true",method:"POST",contentType:"application/json; charset=UTF-8",params:{key:"collaboration",value:b?"enabled":"0"!=urlParams["fast-sync"]?"disabled":""}},mxUtils.bind(this,function(){this.loadDescriptor(mxUtils.bind(this,function(c){null!=c?(this.sync.descriptorChanged(this.getCurrentEtag()),this.sync.updateDescriptor(c),d()):e()}),
-e)}),e):e()};DriveFile.prototype.isRealtimeEnabled=function(){var b=this.ui.drive.getCustomProperty(this.desc,"collaboration");return DrawioFile.prototype.isRealtimeEnabled.apply(this,arguments)&&"disabled"!=b||Editor.enableRealtime&&"enabled"==b};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};
-DriveFile.prototype.getRevisions=function(b,d){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(e){for(var c=0;c<e.items.length;c++)mxUtils.bind(this,function(l){l.title=l.originalFilename;l.getXml=mxUtils.bind(this,function(m,t){this.ui.drive.getXmlFile(l,mxUtils.bind(this,function(y){m(y.getData())}),t)});l.getUrl=mxUtils.bind(this,function(m){return this.ui.getUrl(window.location.pathname+"?rev="+l.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
-m?"&page="+m:""))+window.location.hash})})(e.items[c]);b(e.items)}),d)};DriveFile.prototype.getLatestVersion=function(b,d){this.ui.drive.getFile(this.getId(),b,d,!0)};DriveFile.prototype.getChannelId=function(){var b=this.ui.drive.getCustomProperty(this.desc,"channel");null!=b&&(b="G-"+this.getId()+"."+b);return b};DriveFile.prototype.getChannelKey=function(){return this.ui.drive.getCustomProperty(this.desc,"key")};DriveFile.prototype.getLastModifiedDate=function(){return new Date(this.desc.modifiedDate)};
+DriveFile.prototype.setRealtimeEnabled=function(b,d,f){null!=this.sync?this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/properties?alt=json&supportsAllDrives=true",method:"POST",contentType:"application/json; charset=UTF-8",params:{key:"collaboration",value:b?"enabled":"0"!=urlParams["fast-sync"]?"disabled":""}},mxUtils.bind(this,function(){this.loadDescriptor(mxUtils.bind(this,function(c){null!=c?(this.sync.descriptorChanged(this.getCurrentEtag()),this.sync.updateDescriptor(c),d()):f()}),
+f)}),f):f()};DriveFile.prototype.isRealtimeEnabled=function(){var b=this.ui.drive.getCustomProperty(this.desc,"collaboration");return DrawioFile.prototype.isRealtimeEnabled.apply(this,arguments)&&"disabled"!=b||Editor.enableRealtime&&"enabled"==b};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};
+DriveFile.prototype.getRevisions=function(b,d){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(f){for(var c=0;c<f.items.length;c++)mxUtils.bind(this,function(l){l.title=l.originalFilename;l.getXml=mxUtils.bind(this,function(m,t){this.ui.drive.getXmlFile(l,mxUtils.bind(this,function(y){m(y.getData())}),t)});l.getUrl=mxUtils.bind(this,function(m){return this.ui.getUrl(window.location.pathname+"?rev="+l.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
+m?"&page="+m:""))+window.location.hash})})(f.items[c]);b(f.items)}),d)};DriveFile.prototype.getLatestVersion=function(b,d){this.ui.drive.getFile(this.getId(),b,d,!0)};DriveFile.prototype.getChannelId=function(){var b=this.ui.drive.getCustomProperty(this.desc,"channel");null!=b&&(b="G-"+this.getId()+"."+b);return b};DriveFile.prototype.getChannelKey=function(){return this.ui.drive.getCustomProperty(this.desc,"key")};DriveFile.prototype.getLastModifiedDate=function(){return new Date(this.desc.modifiedDate)};
DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototype.setDescriptor=function(b){this.desc=b};DriveFile.prototype.getDescriptorSecret=function(b){return this.ui.drive.getCustomProperty(b,"secret")};DriveFile.prototype.setDescriptorRevisionId=function(b,d){b.headRevisionId=d};DriveFile.prototype.getDescriptorRevisionId=function(b){return b.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(b){return b.etag};
-DriveFile.prototype.setDescriptorEtag=function(b,d){b.etag=d};DriveFile.prototype.loadPatchDescriptor=function(b,d){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(e){b(e)}),d)};DriveFile.prototype.patchDescriptor=function(b,d){b.headRevisionId=d.headRevisionId;b.modifiedDate=d.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)};
+DriveFile.prototype.setDescriptorEtag=function(b,d){b.etag=d};DriveFile.prototype.loadPatchDescriptor=function(b,d){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(f){b(f)}),d)};DriveFile.prototype.patchDescriptor=function(b,d){b.headRevisionId=d.headRevisionId;b.modifiedDate=d.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)};
DriveFile.prototype.loadDescriptor=function(b,d){this.ui.drive.loadDescriptor(this.getId(),b,d)};DriveFile.prototype.commentsSupported=function(){return!0};
-DriveFile.prototype.getComments=function(b,d){function e(l,m,t){if(m.deleted)return null;t=new DriveComment(l,m.commentId||m.replyId,m.content,m.modifiedDate,m.createdDate,"resolved"==m.status,m.author.isAuthenticatedUser?c:new DrawioUser(m.author.permissionId,m.author.emailAddress,m.author.displayName,m.author.picture.url),t);for(var y=0;null!=m.replies&&y<m.replies.length;y++)t.addReplyDirect(e(l,m.replies[y],m.commentId));return t}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
-this.getId()+"/comments"},mxUtils.bind(this,function(l){for(var m=[],t=0;t<l.items.length;t++){var y=e(this,l.items[t]);null!=y&&m.push(y)}b(m)}),d)};DriveFile.prototype.addComment=function(b,d,e){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){d(c.commentId)}),e)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
-DriveFile.prototype.newComment=function(b,d){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,d)};DriveLibrary=function(b,d,e){DriveFile.call(this,b,d,e)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,d,e){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(c){this.desc=c;null!=d&&d(c)}),e)};DriveLibrary.prototype.open=function(){};(function(){var b=null,d={};window.DriveClient=function(e,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,e,"gDriveAuthInfo");this.isExtAuth=c;this.ui=e;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),
+DriveFile.prototype.getComments=function(b,d){function f(l,m,t){if(m.deleted)return null;t=new DriveComment(l,m.commentId||m.replyId,m.content,m.modifiedDate,m.createdDate,"resolved"==m.status,m.author.isAuthenticatedUser?c:new DrawioUser(m.author.permissionId,m.author.emailAddress,m.author.displayName,m.author.picture.url),t);for(var y=0;null!=m.replies&&y<m.replies.length;y++)t.addReplyDirect(f(l,m.replies[y],m.commentId));return t}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
+this.getId()+"/comments"},mxUtils.bind(this,function(l){for(var m=[],t=0;t<l.items.length;t++){var y=f(this,l.items[t]);null!=y&&m.push(y)}b(m)}),d)};DriveFile.prototype.addComment=function(b,d,f){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(c){d(c.commentId)}),f)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
+DriveFile.prototype.newComment=function(b,d){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,d)};DriveLibrary=function(b,d,f){DriveFile.call(this,b,d,f)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,d,f){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(c){this.desc=c;null!=d&&d(c)}),f)};DriveLibrary.prototype.open=function(){};(function(){var b=null,d={};window.DriveClient=function(f,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,f,"gDriveAuthInfo");this.isExtAuth=c;this.ui=f;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),
this.appId=window.DRAWIO_GOOGLE_VIEWER_APP_ID||"850530949725",this.clientId=window.DRAWIO_GOOGLE_VIEWER_CLIENT_ID||"850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","https://www.googleapis.com/auth/userinfo.profile"]):(this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532",this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com");this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";
-e=JSON.parse(this.token);null!=e&&null!=e.current&&(this.userId=e.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";DriveClient.prototype.scopes=["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];
+f=JSON.parse(this.token);null!=f&&null!=f.current&&(this.userId=f.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";DriveClient.prototype.scopes=["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];
DriveClient.prototype.allFields="kind,id,parents,headRevisionId,etag,title,mimeType,modifiedDate,editable,copyable,canComment,labels,properties,downloadUrl,webContentLink,userPermission,fileSize";DriveClient.prototype.catchupFields="etag,headRevisionId,modifiedDate,properties(key,value)";DriveClient.prototype.enableThumbnails=!0;DriveClient.prototype.thumbnailWidth=1E3;DriveClient.prototype.maxThumbnailSize=2E6;DriveClient.prototype.placeholderThumbnail="iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAACN1BMVEXwhwXvhgX4iwXzhwXgbQzvhgXhbAzocgzqcwzldAoAAADhbgvjcQnmdgrlbgDwhgXsfwXufgjwhgXwgQfziAXxgADibgz4iwX4jAX3iwTpcwr1igXoewjsfgj3igX4iwXqcQv4jAX3iwXtfQnndQrvhAbibArwhwXgbQz//////v39jwX6jQX+/v7fagHfawzdVQDwhADgbhPgbhXwhwPocQ3uvKvwiA/faQDscgzxiAT97+XgciTgcSP6jAXgbQ3gcCHwiRfpcQzwhwfeXQD77ef74NLvhgTvegD66uPgbAf66+TvfADwjCzgcCfwiSD67ObhcjjwiBHhczvwiyrgbxj///777ujgcSHgcB/xiRzgbhveWgDeVwDhdEDgbRDqfgffYgDfXwD97+bvfQDxiz7//vvwiRr118rrcgztggbfZgDfZAD++PT98+3gbBPsgAb99vD33tPgcB7icAvuhAX//Pn66N/00sTyy7vuuqbjekLwhwzkcgr88er449n++vfutp/kh1vgcBvhbwvmdwnwgwDwgADeWQD87eLxxrTssJjqpIf0roHmjWTkhFP759n63czvvanomnjnlHDhczD22cr4y6/wwa/3xKX2wJ3rqpH0tY7qp4vpnoDymlbjf0vxjjntcwzldAroegj/kgX12s7518PzqnnnkWfynmLieUjpewjrdAD40Lj1uZTzpm3idTbiciLydQzzfwnyiQTsfgD3xqnzp3TxlkzgbCrdTwDdSwBLKUlNAAAAJ3RSTlP8/b2X/YH8wb+FAIuIggJbQin5opAM9+a/ubaubyD78NjSyr2WgRp4sjN4AAAI70lEQVR42u2cZ38SQRDGT8WGvfde4E4BxVMRRaKiUURRlJhQRDCCSgQVO/bee++9994+nMt5ywoezFJd/fm8uITi3p9n5mbYkcCpO6rVnVu2YEXd+3dRIySuo7pLv4GjGNKg7j3UHTl1l14PajmG9OFBnx7Ird4PumpYEtf1QXc112l0M7OGKXEfeg3guo3iNIyJG92Jaz61mYYxcaNacs1H/8f6j6X5j1WI/mMVIsawRFEzI49SjwOqAJa43emclk8Rp2c7AFZ+LDGyvXE2kmO2Q1Lq17RSd6ND48QIwFVuLNHTOPbEpTOz8ujMpccHGz0AV5mxIo4TpwUeUPj0YwfAVVYs0Tn7VZjnBUA8v+n6CyfERY8FR/DEJj7MQ6oL85vOvfDUAsuVC8s19s5yXuAppOPnvPk4EeSCsehCeBVTwVzHfE6RcFUQa4an8Qw91kpbw2oz4aoc1sSxniO0WAI/J24wriabmEpizZtM79bc+fr4/tUarEpiLabGElJYRsOGjbJfjGDpJCxtmosRLOEnVpqLESzZLYlLg65H1rAkLo2GESwcROwXI1jELcS1Y6OGQSzEVaupZQJLDiLhYtCtFBcbbslYhOueqKllDwtzwVhTq4RFuBh0C3EdEBl0C3OBWNUrEISLvSD+5GLQLYmLoSqfwcUiFuaqzhYDxiJc981lxqqdVsCGbHPcQLBgrtK3rwLt9tWqhblKxxI9hW3267U5ZHhuBrCKzXl4NIJTS5FrmbmMWGIEDZIouOp0/O6boYQ2jxBXWcdu13fzRILuF/2Ku+aGr96uBbhALHo5Z38+XcfXyVRZVx/+Ed513ldDCCCu0rFE0Xlo2mu5TAj8ki0XV0q6ePHilhi+d/15b9ACQGGusg3AFzc+XSMBCPzu89+CNlnB7zfD8t1z4iaLXUvDVT6sGdMOnv5pi47f6r9Qk9YF3xZ0l8S11UfMArlgLMpZM6bamYy6rWnta9q7TrZrzZPgPgoqg3atubY8WK6D8lQXHfb4p/wSK7vFfxmxSsAPQ96AlZ4LxoLNeompdkUDGQVznL5mLr4ar5ESD3PBWHA9fbpbjlT4pq1Bm6H6w9dwfOd69ePouNDYt3S3ULPGZ96S3YqtAW/Tepz1E8bgAANc+xEXhAX36ut1cslcd6rJq81SIvgEe7lmL3kY5iqxVYvOI9isswp22KeMOcrriJlWai5giwHl+yec73Ma9Mbfz+qOJndKz6hLpR5V1uPxavFuTTt0K1XfpbNeO0wKeUaR2IPBN5sMRlqu1eY8bsFmPeIFUpi0CjIGTLvSZY2EGeYSi3VL9Dgeb0I+SQl9MlcZT4TObZKzfmfS5NZSx1GsLQ5r+8Sxp7ERR/1TtDlUn2qNuGXCrZGM5URlLDiEVzDVkje5fdjXdDsm27XpXChBz4XG0UpYcDOMYaxjGc3wtyJxFtu1PohaI71f2K2imqEONcN4nrMZ9TWbMf81wg9z3VNwC26Gr3enY4ObobLqbccFefuz5AKONpVfzQp2y3NoVvrN32GLNl9orA22lTiM+Nqg5CJY1DueOjkwsdtNgAP7gidR2SWVhFqt3o9QwoKHIuiwDcwX+xT/UWztSlvCaqXGmtQBY1GadQmfh6anuE0XlkhhRFs3tGGkd+tuIVhiJN0M+brj0mlAu46lX0bcbizVLbgZrgwl4JhYA+NQa9TJQUetsSJYHscJvAVct7eJKoUbQudxPYmdirqzsYsIojhjoitD01yadH287J+vpZF1/uGt2K4ttinjshQo2C2XMzI2U64X6WY4tyZq99a7wZS3eA3BpNyrUPn1x00Z0uM1ACzilOfg7EN3VmRo8dN16WYYerYw6G9qCOSDCjQ0jQkufRbalt65LVyapaA/2mClxhK3Rxy3rsyavDxDR/DL5sMLFiyYu/7sXps7z8VldPv2Xl6PnjlTwOOuJQuytH7CXpvXCOQWoZrYeHWd4nw2Q+v22OLGnFSG0Nk1PCi0xjgjpVvTGi8hht9F+ARBGq8dtXmtOSLoDm1FhUSHnihkTecESalHkPAaWVhtFbA8jqvQGBmbt8fWkKtNn0Xw9GvAWK6DX9bBVHjzqtyvvcG9a+jXyC5oKoKV/a4YFG7Yij2ofszlgtaA3ZoRwW+pIOH3w0qZFURNh3oNtKsDsAr9LNvMC0pj93H6hTPpX9ocg8FIgTVvcgFYC03jFLBMi6ix0MDAoi8/lh7Cgt2q0VfNrSX0ayhjTa2IW0tKdotNrMq4NbPkILKZW+xdiSoGgshogfh7Ul7FcIEoFevfrPLC3+XWf6y/CEvHZoFQqlts9sQigqjLxFpQCJauakFcsqhKPXH79rGb6bE2B5Qmu0b91zn0WJtN8Wys9tgtIqfjEf2SWw7XKI8gHuKQ0X0eDsQSI44TaGBN6dYN5dlI/eFj9I7f8GWtoUJYOIgkiq6Ds/gw5T7dZDUqTrfscbLbB9eIB7JmEKsUgiii/4uO8ToBfJlhfif5tEGWEsGTMT4Mr6HDa0BBlP5Y88lcnkdkCtLhnyjMM0+Gcn2WzW6xnd/J8zn+LZq4SUeEvUBaA8LCs6Tk1p1AetXt3JoMWexWZSyr3RK6vSUGrRHbmkRUVgCLpP1HW/L4tgl5tO140mdKKFFhrkTUdxta4xleA8DCXC6n/vCYvPJFa9zAWL4m6qNaA8IiqjW73lreWnJrSj0AJYFZpvwq6RZRzjVUGEtB5tX7DdoqCXaL+PXHuEjdYsuvVqva4Sqv6NdabdW4YLeIKsoFYzHGhYPIGBd2izGuVpPaSVgAV7VEsOQgsuUXdosxLuwWxLVMW0WRK5ExLiiIpN4vq2YYVTiIbPmFgii5xRiXimCBqmIcVSS3WMqvdMqz5VcKqzdKeca4UrnVT/ryR6bi2Opuf64TwYJlfl4FLqu2Zxeux5BRXZnisvZ8103NqTtzoziuGa24+wZVRdVK9W7wyNSX1nYeOmrU6JSmjp6KhH5BR+kGvk++Ld0c/X66rPH4SEQeGl+kpq8a33eAumPqK347durWpzm9hrWhUevi1Hd4ZzVC+gGMHY0TYnDOYwAAAABJRU5ErkJggg==".replace(/\+/g,
"-").replace(/\//g,"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="www.draw.io";DriveClient.prototype.extension=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.staleEtagMaxRetries=3;DriveClient.prototype.coolOff=1E3;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user=
-null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(e){this.user=e;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=e.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(e){this.userId=e;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
-function(){return this.user};DriveClient.prototype.getUsersList=function(){var e=[],c=JSON.parse(this.getPersistentToken(!0)),l=null;if(null!=c){null!=c.current&&(l=c.current.userId,e.push(c[l].user),e[0].isCurrent=!0);for(var m in c)"current"!=m&&m!=l&&e.push(c[m].user)}return e};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
-this.setUser(null);b=null};DriveClient.prototype.execute=function(e){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,t){this.authorize(!1,mxUtils.bind(this,function(){null!=t&&t();e()}),mxUtils.bind(this,function(y){var C=null!=y.message?y.message:mxResources.get("cannotLogin");null!=y&&null!=y.error&&403==y.error.code&&null!=y.error.data&&0<y.error.data.length&&"domainPolicy"==y.error.data[0].reason&&(C=y.error.message);this.logout();this.ui.showError(mxResources.get("error"),
-C,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),m)}))});this.authorize(!0,e,c)};DriveClient.prototype.executeRequest=function(e,c,l){try{var m=!0,t=null,y=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var C=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=e;null!=t&&window.clearTimeout(t);t=window.setTimeout(mxUtils.bind(this,
-function(){m=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})}),this.ui.timeout);var A=null,B=!1;"string"===typeof e.params?A=e.params:null!=e.params&&(A=JSON.stringify(e.params),B=!0);var J=e.fullUrl||this.GDriveBaseUrl+e.url;B&&(J+=(0<J.indexOf("?")?"&":"?")+"alt=json");var f=new mxXmlRequest(J,A,e.method||"GET");f.setRequestHeaders=mxUtils.bind(this,function(g,k){if(null!=e.headers)for(var n in e.headers)g.setRequestHeader(n,e.headers[n]);else null!=e.contentType?
-g.setRequestHeader("Content-Type",e.contentType):B&&g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b)});f.send(mxUtils.bind(this,function(g){try{if(window.clearTimeout(t),m){try{var k=JSON.parse(g.getText())}catch(x){k=null}if(200<=g.getStatus()&&299>=g.getStatus())null!=c&&c(k);else{var n=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,v=null!=n&&0<n.length?n[0].reason:null;null==l||null==k||null==k.error||-1!=k.error.code&&
-(403!=k.error.code||"domainPolicy"!=v&&"The requested mime type change is forbidden."!=k.error.message)?null!=k&&null!=k.error&&(401==k.error.code||403==k.error.code&&"rateLimitExceeded"!=v)?403==k.error.code&&this.retryAuth||401==k.error.code&&this.retryAuth&&"authError"==v?(null!=l&&l(k),this.retryAuth=!1):(this.retryAuth=!0,this.execute(C)):null!=k&&null!=k.error&&412!=k.error.code&&404!=k.error.code&&400!=k.error.code&&this.currentRequest==e&&y<this.maxRetries?(y++,this.requestThread=window.setTimeout(C,
-Math.round(Math.pow(2,y)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(k):l(k)}}}catch(x){if(null!=l)l(x);else throw x;}}))}catch(g){if(null!=l)l(g);else throw g;}});null!=b&&this.authCalled?C():this.execute(C)}catch(A){if(null!=l)l(A);else throw A;}};DriveClient.prototype.createAuthWin=function(e){return window.open(e?e:"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(e,c,l,m,t){this.isExtAuth&&!e?window.parent.driveAuth(mxUtils.bind(this,function(y){this.updateAuthInfo(y,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()?this.authorizeStep2(y.getText(),e,c,l,m,t):null!=l&&l(y)}),l)};DriveClient.prototype.updateAuthInfo=function(e,c,l,m,t){b=e.access_token;delete e.access_token;e.expires=Date.now()+1E3*parseInt(e.expires_in);
-e.remember=c;this.resetTokenRefresh(e);this.authCalled=!0;if(l||null==this.user){var y=JSON.stringify(e);this.updateUser(mxUtils.bind(this,function(){var C=JSON.parse(y);this.setPersistentToken(C,!c);null!=m&&m()}),t)}else null!=m&&(this.setPersistentToken(e,!c),m())};DriveClient.prototype.authorizeStep2=function(e,c,l,m,t,y){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 C=
-JSON.parse(this.getPersistentToken(!0));C&&null!=C.current&&(this.userId=C.current.userId)}if(c&&null==this.userId)null!=m&&m();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(B){200<=B.getStatus()&&299>=B.getStatus()?(B=JSON.parse(B.getText()),this.updateAuthInfo(B,!0,!1,l,m)):(0!=B.getStatus()&&this.logout(),null!=m&&m(B))}),m);else{var A=
-"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(t?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(A),
-y=null):null==y?y=this.createAuthWin(A):y.location=A;null!=y?(window.onGoogleDriveCallback=mxUtils.bind(this,function(B,J){window.onGoogleDriveCallback=null;try{null==B?null!=m&&m({message:mxResources.get("accessDenied")}):this.updateAuthInfo(B,t,!0,l,m)}catch(f){null!=m&&m(f)}finally{null!=J&&J.close()}}),y.focus()):null!=m&&m({message:mxResources.get("allowPopups")})}}catch(B){if(null!=m)m(B);else throw B;}};DriveClient.prototype.resetTokenRefresh=function(e){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),
-this.tokenRefreshThread=null);null!=e&&null==e.error&&0<e.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(e.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*e.expires_in))};DriveClient.prototype.checkToken=function(e){var c=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?
-this.execute(mxUtils.bind(this,function(){e();c&&this.fireEvent(new mxEventObject("disconnected"))})):e()};DriveClient.prototype.updateUser=function(e,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(m){var t=JSON.parse(m);this.executeRequest({url:"/about"},mxUtils.bind(this,function(y){var C=mxResources.get("notAvailable"),A=C,B=null;null!=y&&null!=y.user&&(C=y.user.emailAddress,A=y.user.displayName,
-B=null!=y.user.picture?y.user.picture.url:null);this.setUser(new DrawioUser(t.id,C,A,B,t.locale));this.userId=t.id;null!=e&&e()}),c)}),c,null,null,null,null,l)}catch(m){if(null!=c)c(m);else throw m;}};DriveClient.prototype.copyFile=function(e,c,l,m){null!=e&&null!=c&&this.executeRequest({url:"/files/"+e+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},l,m)};DriveClient.prototype.renameFile=
-function(e,c,l,m){null!=e&&null!=c&&this.executeRequest(this.createDriveRequest(e,{title:c}),l,m)};DriveClient.prototype.moveFile=function(e,c,l,m){null!=e&&null!=c&&this.executeRequest(this.createDriveRequest(e,{parents:[{kind:"drive#fileLink",id:c}]}),l,m)};DriveClient.prototype.createDriveRequest=function(e,c){return{url:"/files/"+e+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(e,c,
-l){return this.getFile(e,c,l,!0,!0)};DriveClient.prototype.loadDescriptor=function(e,c,l,m){this.executeRequest({url:"/files/"+e+"?supportsAllDrives=true&fields="+(null!=m?m:this.allFields)},c,l)};DriveClient.prototype.listFiles=function(e,c,l,m,t){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(e?" and (title contains '"+e+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(l?" and ('me' in owners)":
-""))+"&orderBy=modifiedDate desc,title"},m,t)};DriveClient.prototype.getCustomProperty=function(e,c){e=e.properties;var l=null;if(null!=e)for(var m=0;m<e.length;m++)if(e[m].key==c){l=e[m].value;break}return l};DriveClient.prototype.getFile=function(e,c,l,m,t){m=null!=m?m:!1;t=null!=t?t:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+e+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(y){y.title=y.originalFilename;y.headRevisionId=y.id;y.id=e;this.getXmlFile(y,
-c,l)}),l):this.loadDescriptor(e,mxUtils.bind(this,function(y){try{if(null!=this.user){var C=/\.png$/i.test(y.title);/\.v(dx|sdx?)$/i.test(y.title)||/\.gliffy$/i.test(y.title)||!this.ui.useCanvasForExport&&C?this.ui.convertFile(y.downloadUrl,y.title,y.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):m||t||y.mimeType==this.libraryMimeType||y.mimeType==this.xmlMimeType?this.getXmlFile(y,c,l,!0,t):this.getXmlFile(y,c,l)}else l({message:mxResources.get("loggedOut")})}catch(A){if(null!=l)l(A);
-else throw A;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(e){return null!=e&&"application/vnd.jgraph.mxfile."==e.substring(0,30)};DriveClient.prototype.getXmlFile=function(e,c,l,m,t){try{var y={Authorization:"Bearer "+b},C=e.downloadUrl;if(null==C)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var A=0,B=mxUtils.bind(this,function(){this.ui.editor.loadUrl(C,mxUtils.bind(this,function(J){try{if(null==J)l({message:mxResources.get("invalidOrMissingFile")});
-else if(e.mimeType==this.libraryMimeType||t)e.mimeType!=this.libraryMimeType||t?c(new DriveLibrary(this.ui,J,e)):l({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(e.title)){var g=J.lastIndexOf(",");if(0<g){var k=this.ui.extractGraphModelFromPng(J);if(null!=k&&0<k.length)J=k;else try{k=J.substring(g+1);var n=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):atob(k),v=this.ui.editor.extractGraphModel(mxUtils.parseXml(n).documentElement,!0);null==v||0<v.getElementsByTagName("parsererror").length?
-f=!0:J=n}catch(x){f=!0}}}else/\.pdf$/i.test(e.title)?(k=Editor.extractGraphModelFromPdf(J),null!=k&&0<k.length&&(f=!0,J=k)):"data:image/png;base64,PG14ZmlsZS"==J.substring(0,32)&&(n=J.substring(22),J=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(J,C)?this.ui.parseFileData(J,mxUtils.bind(this,function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?c(new LocalFile(this.ui,x.responseText,e.title+this.extension,
-!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(E){if(null!=l)l(E);else throw E;}}),e.title):c(f?new LocalFile(this.ui,J,e.title,!0):new DriveFile(this.ui,J,e))}}catch(x){if(null!=l)l(x);else throw x;}}),mxUtils.bind(this,function(J,f){if(A<this.maxRetries&&null!=f&&403==f.getStatus())A++,window.setTimeout(B,2*A*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=l)l(J);else throw J;}),null!=e.mimeType&&"image/"==e.mimeType.substring(0,6)&&"image/svg"!=e.mimeType.substring(0,
-9)||/\.png$/i.test(e.title)||/\.jpe?g$/i.test(e.title)||/\.pdf$/i.test(e.title),null,null,null,y)});B()}}catch(J){if(null!=l)l(J);else throw J;}};DriveClient.prototype.saveFile=function(e,c,l,m,t,y,C,A,B){try{var J=0;e.saveLevel=1;var f=mxUtils.bind(this,function(p){if(null!=m)m(p);else throw p;try{if(!e.isConflict(p)){var u="sl_"+e.saveLevel+"-error_"+(e.getErrorMessage(p)||"unknown");null!=p&&null!=p.error&&null!=p.error.code&&(u+="-code_"+p.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
-e.getHash()+"-rev_"+e.desc.headRevisionId+"-mod_"+e.desc.modifiedDate+"-size_"+e.getSize()+"-mime_"+e.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(e.isAutosave()?"":"-noauto")+(e.changeListenerEnabled?"":"-nolisten")+(e.inConflictState?"-conflict":"")+(e.invalidChecksum?"-invalid":""),action:u,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=e.sync?"-client_"+e.sync.clientId:"-nosync")})}}catch(H){}}),g=mxUtils.bind(this,function(p){f(p);try{EditorUi.logError(p.message,null,null,
-p)}catch(u){}});if(e.isEditable()&&null!=e.desc){var k=(new Date).getTime(),n=e.desc.etag,v=e.desc.modifiedDate,x=e.desc.headRevisionId,E=this.ui.useCanvasForExport&&/(\.png)$/i.test(e.getTitle());y=null!=y?y:!1;var z=null,G=!1,F={mimeType:e.desc.mimeType,title:e.getTitle()};if(this.isGoogleRealtimeMimeType(F.mimeType))F.mimeType=this.xmlMimeType,z=e.desc,G=c=!0;else if("application/octet-stream"==F.mimeType||"1"==urlParams["override-mime"]&&F.mimeType!=this.xmlMimeType)F.mimeType=this.xmlMimeType;
-var U=mxUtils.bind(this,function(p,u,H){try{e.saveLevel=3;e.constructor==DriveFile&&(null==A&&(A=[]),null==e.getChannelId()&&A.push({key:"channel",value:Editor.guid(32)}),null==e.getChannelKey()&&A.push({key:"key",value:Editor.guid(32)}),A.push({key:"secret",value:null!=B?B:Editor.guid(32)}));H||(null!=p||y||(p=this.placeholderThumbnail,u=this.placeholderMimeType),null!=p&&null!=u&&(F.thumbnail={image:p,mimeType:u}));var K=e.getData(),N=mxUtils.bind(this,function(Q){try{if(e.saveDelay=(new Date).getTime()-
-k,e.saveLevel=11,null==Q)f({message:mxResources.get("errorSavingFile")+": Empty response"});else{var P=(new Date(Q.modifiedDate)).getTime()-(new Date(v)).getTime();if(0>=P||n==Q.etag||c&&x==Q.headRevisionId){e.saveLevel=12;var V=[];0>=P&&V.push("invalid modified time");n==Q.etag&&V.push("stale etag");c&&x==Q.headRevisionId&&V.push("stale revision");var W=V.join(", ");f({message:mxResources.get("errorSavingFile")+": "+W},Q);try{EditorUi.logError("Critical: Error saving to Google Drive "+e.desc.id,
-null,"from-"+x+"."+v+"-"+this.ui.hashValue(n)+"-to-"+Q.headRevisionId+"."+Q.modifiedDate+"-"+this.ui.hashValue(Q.etag)+(0<W.length?"-errors-"+W:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=e.sync?"-client_"+e.sync.clientId:"-nosync"))}catch(q){}}else if(e.saveLevel=null,l(Q,K),null!=z){this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(q){q.pinned=!0;this.executeRequest({url:"/files/"+z.id+"/revisions/"+
-z.headRevisionId,method:"PUT",params:q})})));try{EditorUi.logEvent({category:e.convertedFrom+"-CONVERT-FILE-"+e.getHash(),action:"from_"+z.id+"."+z.headRevisionId+"-to_"+e.desc.id+"."+e.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=e.sync?"-client_"+e.sync.clientId:"nosync")})}catch(q){}}}}catch(q){g(q)}}),I=mxUtils.bind(this,function(Q,P){e.saveLevel=4;try{null!=A&&(F.properties=A);var V=C||e.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:e.getCurrentEtag(),W=mxUtils.bind(this,function(M){e.saveLevel=5;try{var T=e.desc.mimeType!=this.xmlMimeType&&e.desc.mimeType!=this.mimeType&&e.desc.mimeType!=this.libraryMimeType,O=!0,R=null;try{R=window.setTimeout(mxUtils.bind(this,function(){O=!1;f({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(S){}this.executeRequest(this.createUploadRequest(e.getId(),F,Q,c||M||T,P,M?null:V,G),mxUtils.bind(this,function(S){window.clearTimeout(R);O&&N(S)}),mxUtils.bind(this,function(S){window.clearTimeout(R);
-if(O){e.saveLevel=6;try{e.isConflict(S)?this.executeRequest({url:"/files/"+e.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){e.saveLevel=7;try{if(null!=X&&X.etag==V)if(J<this.staleEtagMaxRetries){J++;var Y=2*J*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(q,Y);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",J,"delay",Y)}else{q(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+e.getHash(),action:"rev_"+
-e.desc.headRevisionId+"-mod_"+e.desc.modifiedDate+"-size_"+e.getSize()+"-mime_"+e.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(e.isAutosave()?"":"-noauto")+(e.changeListenerEnabled?"":"-nolisten")+(e.inConflictState?"-conflict":"")+(e.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=e.sync?"-client_"+e.sync.clientId:"-nosync")})}catch(aa){}}else"1"==urlParams.test&&X.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,
-"remote",X.etag,"rev",e.desc.headRevisionId,"response",[X],"file",[e]),f(S,X)}catch(aa){g(aa)}}),mxUtils.bind(this,function(){f(S)})):f(S)}catch(X){g(X)}}}))}catch(S){g(S)}}),q=mxUtils.bind(this,function(M){e.saveLevel=9;if(M||null==V)W(M);else{var T=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){T=!1;f({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(R){}this.executeRequest({url:"/files/"+e.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(R){window.clearTimeout(O);
-if(T){e.saveLevel=10;try{null!=R&&R.headRevisionId==x?("1"==urlParams.test&&V!=R.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",R.etag,"rev",e.desc.headRevisionId,"response",[R],"file",[e]),V=R.etag,W(M)):f({error:{code:412}},R)}catch(S){g(S)}}}),mxUtils.bind(this,function(R){window.clearTimeout(O);T&&(e.saveLevel=11,f(R))}))}});if(E&&null==p){e.saveLevel=8;var D=new Image;D.onload=mxUtils.bind(this,function(){try{var M=this.thumbnailWidth/D.width,T=document.createElement("canvas");
-T.width=this.thumbnailWidth;T.height=Math.floor(D.height*M);T.getContext("2d").drawImage(D,0,0,T.width,T.height);var O=T.toDataURL();O=O.substring(O.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");F.thumbnail={image:O,mimeType:"image/png"};q(!1)}catch(R){try{q(!1)}catch(S){g(S)}}});D.src="data:image/png;base64,"+Q}else q(!1)}catch(M){g(M)}});if(E){var L=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(Q){I(Q,!0)}),f,this.ui.getCurrentFile()!=e?
-K:null,L.scale,L.border)}else I(K,!1)}catch(Q){g(Q)}});try{e.saveLevel=2,(y||E||e.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=F.mimeType&&"application/vnd.jgraph.mxfile"!=F.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(p){try{var u=null;try{null!=p&&(u=p.toDataURL("image/png")),null!=u&&(u=u.length>this.maxThumbnailSize?null:u.substring(u.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(H){u=null}U(u,"image/png")}catch(H){g(H)}})))&&
-U(null,null,e.constructor!=DriveLibrary)}catch(p){g(p)}}else this.ui.editor.graph.reset(),f({message:mxResources.get("readOnly")})}catch(p){g(p)}};DriveClient.prototype.insertFile=function(e,c,l,m,t,y,C){y=null!=y?y:this.xmlMimeType;e={mimeType:y,title:e};null!=l&&(e.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,e,c,!1,C),mxUtils.bind(this,function(A){y==this.libraryMimeType?m(new DriveLibrary(this.ui,c,A)):0==A?null!=t&&t({message:mxResources.get("errorSavingFile")}):
-m(new DriveFile(this.ui,c,A))}),t)};DriveClient.prototype.createUploadRequest=function(e,c,l,m,t,y,C){t=null!=t?t:!1;var A={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=y&&(A["If-Match"]=y);e={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=e?"/"+e:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=e?"PUT":"POST",headers:A,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!=l?t?l:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};m||(e.fullUrl+="&newRevision=false");C&&(e.fullUrl+="&pinned=true");return e};DriveClient.prototype.createLinkPicker=function(){var e=d.linkPicker;if(null==e||d.linkPickerToken!=b){d.linkPickerToken=b;e=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);
-var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);e=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(d.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(e).addView(c).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED)}return e};DriveClient.prototype.pickFile=function(e,c,l){this.filePickerCallback=
-null!=e?e:mxUtils.bind(this,function(m){this.ui.loadFile("G"+m)});this.filePicked=mxUtils.bind(this,function(m){m.action==google.picker.Action.PICKED&&this.filePickerCallback(m.docs[0].id,m.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var m=c?"genericPicker":"filePicker",t=mxUtils.bind(this,function(f){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(f).className&&(mxEvent.removeListener(document,
+null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(f){this.user=f;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=f.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(f){this.userId=f;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
+function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),l=null;if(null!=c){null!=c.current&&(l=c.current.userId,f.push(c[l].user),f[0].isCurrent=!0);for(var m in c)"current"!=m&&m!=l&&f.push(c[m].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
+this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,t){this.authorize(!1,mxUtils.bind(this,function(){null!=t&&t();f()}),mxUtils.bind(this,function(y){var C=null!=y.message?y.message:mxResources.get("cannotLogin");null!=y&&null!=y.error&&403==y.error.code&&null!=y.error.data&&0<y.error.data.length&&"domainPolicy"==y.error.data[0].reason&&(C=y.error.message);this.logout();this.ui.showError(mxResources.get("error"),
+C,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),m)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var m=!0,t=null,y=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var C=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=t&&window.clearTimeout(t);t=window.setTimeout(mxUtils.bind(this,
+function(){m=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})}),this.ui.timeout);var A=null,B=!1;"string"===typeof f.params?A=f.params:null!=f.params&&(A=JSON.stringify(f.params),B=!0);var J=f.fullUrl||this.GDriveBaseUrl+f.url;B&&(J+=(0<J.indexOf("?")?"&":"?")+"alt=json");var e=new mxXmlRequest(J,A,f.method||"GET");e.setRequestHeaders=mxUtils.bind(this,function(g,k){if(null!=f.headers)for(var q in f.headers)g.setRequestHeader(q,f.headers[q]);else null!=f.contentType?
+g.setRequestHeader("Content-Type",f.contentType):B&&g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b)});e.send(mxUtils.bind(this,function(g){try{if(window.clearTimeout(t),m){try{var k=JSON.parse(g.getText())}catch(x){k=null}if(200<=g.getStatus()&&299>=g.getStatus())null!=c&&c(k);else{var q=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,u=null!=q&&0<q.length?q[0].reason:null;null==l||null==k||null==k.error||-1!=k.error.code&&
+(403!=k.error.code||"domainPolicy"!=u&&"The requested mime type change is forbidden."!=k.error.message)?null!=k&&null!=k.error&&(401==k.error.code||403==k.error.code&&"rateLimitExceeded"!=u)?403==k.error.code&&this.retryAuth||401==k.error.code&&this.retryAuth&&"authError"==u?(null!=l&&l(k),this.retryAuth=!1):(this.retryAuth=!0,this.execute(C)):null!=k&&null!=k.error&&412!=k.error.code&&404!=k.error.code&&400!=k.error.code&&this.currentRequest==f&&y<this.maxRetries?(y++,this.requestThread=window.setTimeout(C,
+Math.round(Math.pow(2,y)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(k):l(k)}}}catch(x){if(null!=l)l(x);else throw x;}}))}catch(g){if(null!=l)l(g);else throw g;}});null!=b&&this.authCalled?C():this.execute(C)}catch(A){if(null!=l)l(A);else throw A;}};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,l,m,t){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(y){this.updateAuthInfo(y,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()?this.authorizeStep2(y.getText(),f,c,l,m,t):null!=l&&l(y)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,m,t){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(l||null==this.user){var y=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var C=JSON.parse(y);this.setPersistentToken(C,!c);null!=m&&m()}),t)}else null!=m&&(this.setPersistentToken(f,!c),m())};DriveClient.prototype.authorizeStep2=function(f,c,l,m,t,y){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 C=
+JSON.parse(this.getPersistentToken(!0));C&&null!=C.current&&(this.userId=C.current.userId)}if(c&&null==this.userId)null!=m&&m();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(B){200<=B.getStatus()&&299>=B.getStatus()?(B=JSON.parse(B.getText()),this.updateAuthInfo(B,!0,!1,l,m)):(0!=B.getStatus()&&this.logout(),null!=m&&m(B))}),m);else{var A=
+"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(t?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(A),
+y=null):null==y?y=this.createAuthWin(A):y.location=A;null!=y?(window.onGoogleDriveCallback=mxUtils.bind(this,function(B,J){window.onGoogleDriveCallback=null;try{null==B?null!=m&&m({message:mxResources.get("accessDenied")}):this.updateAuthInfo(B,t,!0,l,m)}catch(e){null!=m&&m(e)}finally{null!=J&&J.close()}}),y.focus()):null!=m&&m({message:mxResources.get("allowPopups")})}}catch(B){if(null!=m)m(B);else throw B;}};DriveClient.prototype.resetTokenRefresh=function(f){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),
+this.tokenRefreshThread=null);null!=f&&null==f.error&&0<f.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(f.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*f.expires_in))};DriveClient.prototype.checkToken=function(f){var c=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?
+this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(m){var t=JSON.parse(m);this.executeRequest({url:"/about"},mxUtils.bind(this,function(y){var C=mxResources.get("notAvailable"),A=C,B=null;null!=y&&null!=y.user&&(C=y.user.emailAddress,A=y.user.displayName,
+B=null!=y.user.picture?y.user.picture.url:null);this.setUser(new DrawioUser(t.id,C,A,B,t.locale));this.userId=t.id;null!=f&&f()}),c)}),c,null,null,null,null,l)}catch(m){if(null!=c)c(m);else throw m;}};DriveClient.prototype.copyFile=function(f,c,l,m){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},l,m)};DriveClient.prototype.renameFile=
+function(f,c,l,m){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{title:c}),l,m)};DriveClient.prototype.moveFile=function(f,c,l,m){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{parents:[{kind:"drive#fileLink",id:c}]}),l,m)};DriveClient.prototype.createDriveRequest=function(f,c){return{url:"/files/"+f+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(f,c,
+l){return this.getFile(f,c,l,!0,!0)};DriveClient.prototype.loadDescriptor=function(f,c,l,m){this.executeRequest({url:"/files/"+f+"?supportsAllDrives=true&fields="+(null!=m?m:this.allFields)},c,l)};DriveClient.prototype.listFiles=function(f,c,l,m,t){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(f?" and (title contains '"+f+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(l?" and ('me' in owners)":
+""))+"&orderBy=modifiedDate desc,title"},m,t)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var l=null;if(null!=f)for(var m=0;m<f.length;m++)if(f[m].key==c){l=f[m].value;break}return l};DriveClient.prototype.getFile=function(f,c,l,m,t){m=null!=m?m:!1;t=null!=t?t:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(y){y.title=y.originalFilename;y.headRevisionId=y.id;y.id=f;this.getXmlFile(y,
+c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(y){try{if(null!=this.user){var C=/\.png$/i.test(y.title);/\.v(dx|sdx?)$/i.test(y.title)||/\.gliffy$/i.test(y.title)||!this.ui.useCanvasForExport&&C?this.ui.convertFile(y.downloadUrl,y.title,y.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):m||t||y.mimeType==this.libraryMimeType||y.mimeType==this.xmlMimeType?this.getXmlFile(y,c,l,!0,t):this.getXmlFile(y,c,l)}else l({message:mxResources.get("loggedOut")})}catch(A){if(null!=l)l(A);
+else throw A;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,m,t){try{var y={Authorization:"Bearer "+b},C=f.downloadUrl;if(null==C)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var A=0,B=mxUtils.bind(this,function(){this.ui.editor.loadUrl(C,mxUtils.bind(this,function(J){try{if(null==J)l({message:mxResources.get("invalidOrMissingFile")});
+else if(f.mimeType==this.libraryMimeType||t)f.mimeType!=this.libraryMimeType||t?c(new DriveLibrary(this.ui,J,f)):l({message:mxResources.get("notADiagramFile")});else{var e=!1;if(/\.png$/i.test(f.title)){var g=J.lastIndexOf(",");if(0<g){var k=this.ui.extractGraphModelFromPng(J);if(null!=k&&0<k.length)J=k;else try{k=J.substring(g+1);var q=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):atob(k),u=this.ui.editor.extractGraphModel(mxUtils.parseXml(q).documentElement,!0);null==u||0<u.getElementsByTagName("parsererror").length?
+e=!0:J=q}catch(x){e=!0}}}else/\.pdf$/i.test(f.title)?(k=Editor.extractGraphModelFromPdf(J),null!=k&&0<k.length&&(e=!0,J=k)):"data:image/png;base64,PG14ZmlsZS"==J.substring(0,32)&&(q=J.substring(22),J=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(J,C)?this.ui.parseFileData(J,mxUtils.bind(this,function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?c(new LocalFile(this.ui,x.responseText,f.title+this.extension,
+!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(E){if(null!=l)l(E);else throw E;}}),f.title):c(e?new LocalFile(this.ui,J,f.title,!0):new DriveFile(this.ui,J,f))}}catch(x){if(null!=l)l(x);else throw x;}}),mxUtils.bind(this,function(J,e){if(A<this.maxRetries&&null!=e&&403==e.getStatus())A++,window.setTimeout(B,2*A*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=l)l(J);else throw J;}),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,y)});B()}}catch(J){if(null!=l)l(J);else throw J;}};DriveClient.prototype.saveFile=function(f,c,l,m,t,y,C,A,B){try{var J=0;f.saveLevel=1;var e=mxUtils.bind(this,function(p){if(null!=m)m(p);else throw p;try{if(!f.isConflict(p)){var v="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(p)||"unknown");null!=p&&null!=p.error&&null!=p.error.code&&(v+="-code_"+p.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:v,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(H){}}),g=mxUtils.bind(this,function(p){e(p);try{EditorUi.logError(p.message,null,null,
+p)}catch(v){}});if(f.isEditable()&&null!=f.desc){var k=(new Date).getTime(),q=f.desc.etag,u=f.desc.modifiedDate,x=f.desc.headRevisionId,E=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());y=null!=y?y:!1;var z=null,G=!1,F={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(F.mimeType))F.mimeType=this.xmlMimeType,z=f.desc,G=c=!0;else if("application/octet-stream"==F.mimeType||"1"==urlParams["override-mime"]&&F.mimeType!=this.xmlMimeType)F.mimeType=this.xmlMimeType;
+var U=mxUtils.bind(this,function(p,v,H){try{f.saveLevel=3;f.constructor==DriveFile&&(null==A&&(A=[]),null==f.getChannelId()&&A.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&A.push({key:"key",value:Editor.guid(32)}),A.push({key:"secret",value:null!=B?B:Editor.guid(32)}));H||(null!=p||y||(p=this.placeholderThumbnail,v=this.placeholderMimeType),null!=p&&null!=v&&(F.thumbnail={image:p,mimeType:v}));var K=f.getData(),N=mxUtils.bind(this,function(Q){try{if(f.saveDelay=(new Date).getTime()-
+k,f.saveLevel=11,null==Q)e({message:mxResources.get("errorSavingFile")+": Empty response"});else{var P=(new Date(Q.modifiedDate)).getTime()-(new Date(u)).getTime();if(0>=P||q==Q.etag||c&&x==Q.headRevisionId){f.saveLevel=12;var V=[];0>=P&&V.push("invalid modified time");q==Q.etag&&V.push("stale etag");c&&x==Q.headRevisionId&&V.push("stale revision");var W=V.join(", ");e({message:mxResources.get("errorSavingFile")+": "+W},Q);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
+null,"from-"+x+"."+u+"-"+this.ui.hashValue(q)+"-to-"+Q.headRevisionId+"."+Q.modifiedDate+"-"+this.ui.hashValue(Q.etag)+(0<W.length?"-errors-"+W:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(n){}}else if(f.saveLevel=null,l(Q,K),null!=z){this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(n){n.pinned=!0;this.executeRequest({url:"/files/"+z.id+"/revisions/"+
+z.headRevisionId,method:"PUT",params:n})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+z.id+"."+z.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(n){}}}}catch(n){g(n)}}),I=mxUtils.bind(this,function(Q,P){f.saveLevel=4;try{null!=A&&(F.properties=A);var V=C||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
+null:f.getCurrentEtag(),W=mxUtils.bind(this,function(M){f.saveLevel=5;try{var T=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,O=!0,R=null;try{R=window.setTimeout(mxUtils.bind(this,function(){O=!1;e({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(S){}this.executeRequest(this.createUploadRequest(f.getId(),F,Q,c||M||T,P,M?null:V,G),mxUtils.bind(this,function(S){window.clearTimeout(R);O&&N(S)}),mxUtils.bind(this,function(S){window.clearTimeout(R);
+if(O){f.saveLevel=6;try{f.isConflict(S)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){f.saveLevel=7;try{if(null!=X&&X.etag==V)if(J<this.staleEtagMaxRetries){J++;var Y=2*J*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(n,Y);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",J,"delay",Y)}else{n(!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&&X.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,
+"remote",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),e(S,X)}catch(aa){g(aa)}}),mxUtils.bind(this,function(){e(S)})):e(S)}catch(X){g(X)}}}))}catch(S){g(S)}}),n=mxUtils.bind(this,function(M){f.saveLevel=9;if(M||null==V)W(M);else{var T=!0,O=null;try{O=window.setTimeout(mxUtils.bind(this,function(){T=!1;e({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(O);
+if(T){f.saveLevel=10;try{null!=R&&R.headRevisionId==x?("1"==urlParams.test&&V!=R.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",R.etag,"rev",f.desc.headRevisionId,"response",[R],"file",[f]),V=R.etag,W(M)):e({error:{code:412}},R)}catch(S){g(S)}}}),mxUtils.bind(this,function(R){window.clearTimeout(O);T&&(f.saveLevel=11,e(R))}))}});if(E&&null==p){f.saveLevel=8;var D=new Image;D.onload=mxUtils.bind(this,function(){try{var M=this.thumbnailWidth/D.width,T=document.createElement("canvas");
+T.width=this.thumbnailWidth;T.height=Math.floor(D.height*M);T.getContext("2d").drawImage(D,0,0,T.width,T.height);var O=T.toDataURL();O=O.substring(O.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");F.thumbnail={image:O,mimeType:"image/png"};n(!1)}catch(R){try{n(!1)}catch(S){g(S)}}});D.src="data:image/png;base64,"+Q}else n(!1)}catch(M){g(M)}});if(E){var L=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(Q){I(Q,!0)}),e,this.ui.getCurrentFile()!=f?
+K:null,L.scale,L.border)}else I(K,!1)}catch(Q){g(Q)}});try{f.saveLevel=2,(y||E||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=F.mimeType&&"application/vnd.jgraph.mxfile"!=F.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(p){try{var v=null;try{null!=p&&(v=p.toDataURL("image/png")),null!=v&&(v=v.length>this.maxThumbnailSize?null:v.substring(v.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(H){v=null}U(v,"image/png")}catch(H){g(H)}})))&&
+U(null,null,f.constructor!=DriveLibrary)}catch(p){g(p)}}else this.ui.editor.graph.reset(),e({message:mxResources.get("readOnly")})}catch(p){g(p)}};DriveClient.prototype.insertFile=function(f,c,l,m,t,y,C){y=null!=y?y:this.xmlMimeType;f={mimeType:y,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,C),mxUtils.bind(this,function(A){y==this.libraryMimeType?m(new DriveLibrary(this.ui,c,A)):0==A?null!=t&&t({message:mxResources.get("errorSavingFile")}):
+m(new DriveFile(this.ui,c,A))}),t)};DriveClient.prototype.createUploadRequest=function(f,c,l,m,t,y,C){t=null!=t?t:!1;var A={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=y&&(A["If-Match"]=y);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:A,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!=l?t?l:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};m||(f.fullUrl+="&newRevision=false");C&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=d.linkPicker;if(null==f||d.linkPickerToken!=b){d.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);
+var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);f=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(d.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(c).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED)}return f};DriveClient.prototype.pickFile=function(f,c,l){this.filePickerCallback=
+null!=f?f:mxUtils.bind(this,function(m){this.ui.loadFile("G"+m)});this.filePicked=mxUtils.bind(this,function(m){m.action==google.picker.Action.PICKED&&this.filePickerCallback(m.docs[0].id,m.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var m=c?"genericPicker":"filePicker",t=mxUtils.bind(this,function(e){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(e).className&&(mxEvent.removeListener(document,
"click",t),this[m].setVisible(!1),l&&l())});if(null==d[m]||d[m+"Token"]!=b){d[m+"Token"]=b;var y=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),C=(new google.picker.DocsView).setIncludeFolders(!0),A=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),B=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(y.setMimeTypes("*/*"),C.setMimeTypes("*/*"),A.setMimeTypes("*/*")):(y.setMimeTypes(this.mimeTypes),C.setMimeTypes(this.mimeTypes),
A.setMimeTypes(this.mimeTypes));d[m]=(new google.picker.PickerBuilder).setOAuthToken(d[m+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(y).addView(C).addView(A).addView(google.picker.ViewId.RECENTLY_PICKED).addView(B);if(urlParams.gPickerSize){var J=urlParams.gPickerSize.split(",");d[m]=d[m].setSize(J[0],J[1])}urlParams.topBaseUrl&&(d[m]=d[m].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));d[m]=d[m].setCallback(mxUtils.bind(this,
-function(f){if(f.action==google.picker.Action.PICKED||f.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",t),l&&f.action==google.picker.Action.CANCEL&&l();f.action==google.picker.Action.PICKED&&this.filePicked(f)})).build()}mxEvent.addListener(document,"click",t);d[m].setVisible(!0)}catch(f){this.ui.spinner.stop(),this.ui.handleError(f)}}))};DriveClient.prototype.pickFolder=function(e,c){this.folderPickerCallback=e;var l=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,
+function(e){if(e.action==google.picker.Action.PICKED||e.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",t),l&&e.action==google.picker.Action.CANCEL&&l();e.action==google.picker.Action.PICKED&&this.filePicked(e)})).build()}mxEvent.addListener(document,"click",t);d[m].setVisible(!0)}catch(e){this.ui.spinner.stop(),this.ui.handleError(e)}}))};DriveClient.prototype.pickFolder=function(f,c){this.folderPickerCallback=f;var l=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,
mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var m=mxUtils.bind(this,function(B){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(B).className&&(mxEvent.removeListener(document,"click",m),d.folderPicker.setVisible(!1))});if(null==d.folderPicker||d.folderPickerToken!=b){d.folderPickerToken=b;var t=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
y=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),C=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");d.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(d.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(t).addView(y).addView(C).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
if(urlParams.gPickerSize){var A=urlParams.gPickerSize.split(",");d.folderPicker=d.folderPicker.setSize(A[0],A[1])}urlParams.topBaseUrl&&(d.folderPicker=d.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));d.folderPicker=d.folderPicker.setCallback(mxUtils.bind(this,function(B){B.action!=google.picker.Action.PICKED&&B.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",m);this.folderPickerCallback(B)})).build()}mxEvent.addListener(document,"click",m);d.folderPicker.setVisible(!0)}catch(B){this.ui.spinner.stop(),
-this.ui.handleError(B)}}))}catch(m){this.ui.handleError(m)}});c?l():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){l()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(e){this.filePickerCallback=e;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?
+this.ui.handleError(B)}}))}catch(m){this.ui.handleError(m)}});c?l():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){l()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(f){this.filePickerCallback=f;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?
this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(A){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(A).className&&(mxEvent.removeListener(document,"click",c),d.libraryPicker.setVisible(!1))});if(null==d.libraryPicker||d.libraryPickerToken!=
b){d.libraryPickerToken=b;var l=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),m=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),t=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
y=(new google.picker.DocsUploadView).setIncludeFolders(!0);d.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(d.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(l).addView(m).addView(t).addView(google.picker.ViewId.RECENTLY_PICKED).addView(y);if(urlParams.gPickerSize){var C=urlParams.gPickerSize.split(",");d.libraryPicker=d.libraryPicker.setSize(C[0],C[1])}urlParams.topBaseUrl&&(d.libraryPicker=d.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));
-d.libraryPicker=d.libraryPicker.setCallback(mxUtils.bind(this,function(A){A.action!=google.picker.Action.PICKED&&A.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);A.action==google.picker.Action.PICKED&&this.filePicked(A)})).build()}mxEvent.addListener(document,"click",c);d.libraryPicker.setVisible(!0)}catch(A){this.ui.spinner.stop(),this.ui.handleError(A)}}))};DriveClient.prototype.showPermissions=function(e){var c=mxUtils.bind(this,function(){var l=new ConfirmDialog(this.ui,
-mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+e)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(l.container,360,190,!0,!0);l.init()});this.sharingFailed?c():this.checkToken(mxUtils.bind(this,function(){try{var l=new gapi.drive.share.ShareClient(this.appId);l.setOAuthToken(b);l.setItemIds([e]);l.showSettingsDialog();"MutationObserver"in window&&(null!=
+d.libraryPicker=d.libraryPicker.setCallback(mxUtils.bind(this,function(A){A.action!=google.picker.Action.PICKED&&A.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);A.action==google.picker.Action.PICKED&&this.filePicked(A)})).build()}mxEvent.addListener(document,"click",c);d.libraryPicker.setVisible(!0)}catch(A){this.ui.spinner.stop(),this.ui.handleError(A)}}))};DriveClient.prototype.showPermissions=function(f){var c=mxUtils.bind(this,function(){var l=new ConfirmDialog(this.ui,
+mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+f)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(l.container,360,190,!0,!0);l.init()});this.sharingFailed?c():this.checkToken(mxUtils.bind(this,function(){try{var l=new gapi.drive.share.ShareClient(this.appId);l.setOAuthToken(b);l.setItemIds([f]);l.showSettingsDialog();"MutationObserver"in window&&(null!=
this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(m){for(var t=!1,y=0;y<m.length;y++)for(var C=0;C<m[y].addedNodes.length;C++){var A=m[y].addedNodes[C];"BUTTON"==A.nodeName&&"ok"==A.getAttribute("name")&&null!=A.parentNode&&null!=A.parentNode.parentNode&&"dialog"==A.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,A.click(),c(),t=!0):"DIV"==A.nodeName&&"shr-q-shr-r-shr-xb"==A.className&&
-(t=!0)}t&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(m){this.ui.handleError(m)}}))};DriveClient.prototype.clearPersistentToken=function(){var e=JSON.parse(this.getPersistentToken(!0))||{};delete e.current;delete e[this.userId];for(var c in e){e.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(e))};DriveClient.prototype.setPersistentToken=function(e,c){var l=
-JSON.parse(this.getPersistentToken(!0))||{};e.userId=this.userId;l.current=e;l[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(l),c)}})();DropboxFile=function(b,d,e){DrawioFile.call(this,b,d);this.stat=e};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
+(t=!0)}t&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(m){this.ui.handleError(m)}}))};DriveClient.prototype.clearPersistentToken=function(){var f=JSON.parse(this.getPersistentToken(!0))||{};delete f.current;delete f[this.userId];for(var c in f){f.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(f))};DriveClient.prototype.setPersistentToken=function(f,c){var l=
+JSON.parse(this.getPersistentToken(!0))||{};f.userId=this.userId;l.current=f;l[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(l),c)}})();DropboxFile=function(b,d,f){DrawioFile.call(this,b,d);this.stat=f};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};
-DropboxFile.prototype.getRevisions=function(b,d){var e=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});e.then(mxUtils.bind(this,function(c){try{for(var l=[],m=c.entries.length-1;0<=m;m--)mxUtils.bind(this,function(t){l.push({modifiedDate:t.client_modified,fileSize:t.size,getXml:mxUtils.bind(this,function(y,C){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:t.rev},y,C)}),getUrl:mxUtils.bind(this,function(y){return this.ui.getUrl(window.location.pathname+"?rev="+
-t.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=y?"&page="+y:""))+window.location.hash})})})(c.entries[m]);b(l)}catch(t){d(t)}}));e["catch"](function(c){d(c)})};DropboxFile.prototype.getLatestVersion=function(b,d){this.ui.dropbox.getFile(this.getId(),b,d)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,d,e,c,l){this.doSave(this.getTitle(),b,d,e,c,l)};DropboxFile.prototype.saveAs=function(b,d,e){this.doSave(b,!1,d,e)};
-DropboxFile.prototype.doSave=function(b,d,e,c,l,m){var t=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=t;this.saveFile(b,d,e,c,l,m)}),c,l,m])};
-DropboxFile.prototype.saveFile=function(b,d,e,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(d=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var m=mxUtils.bind(this,function(y){var C=this.stat.path_display.lastIndexOf("/");C=1<C?this.stat.path_display.substring(1,C+1):null;this.ui.dropbox.saveFile(b,y,mxUtils.bind(this,function(A){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=A;this.contentChanged();
-null!=e&&e()}),mxUtils.bind(this,function(A){this.savingFile=!1;null!=c&&c(A)}),C)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var t=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(y){m(this.ui.base64ToBlob(y,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,t.scale,t.border)}else m(this.getData())}catch(y){if(this.savingFile=!1,null!=c)c(y);else throw y;}else null!=c&&c()}),this.getTitle()==b?d(!0):this.ui.dropbox.checkExists(b,
-d)):null!=e&&e()};DropboxFile.prototype.rename=function(b,d,e){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=d&&d()):(this.stat=c,this.descriptorChanged(),this.save(!0,d,e))}),e)};DropboxLibrary=function(b,d,e){DropboxFile.call(this,b,d,e)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,d,e){this.saveFile(b,!1,d,e)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(d){DrawioClient.call(this,d,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+
-"/dropbox";DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(d,e,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;e({code:App.ERROR_TIMEOUT})}),this.ui.timeout),
-t=this.client.usersGetCurrentAccount();t.then(mxUtils.bind(this,function(y){window.clearTimeout(m);l&&(this.setUser(new DrawioUser(y.account_id,y.email,y.name.display_name)),d())}));t["catch"](mxUtils.bind(this,function(y){window.clearTimeout(m);l&&(null==y||401!==y.status||c?e({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,e,!0)}),e)))}))};DropboxClient.prototype.authenticate=
-function(d,e){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),d,e):null!=e&&e(c)}),e)};DropboxClient.prototype.authenticateStep2=function(d,e,c){if(null==window.onDropboxCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+
-"&token="+d),null,"GET")).send(mxUtils.bind(this,function(t){200<=t.getStatus()&&299>=t.getStatus()?(b=JSON.parse(t.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),e()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==t.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(t,y){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+
+DropboxFile.prototype.getRevisions=function(b,d){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var l=[],m=c.entries.length-1;0<=m;m--)mxUtils.bind(this,function(t){l.push({modifiedDate:t.client_modified,fileSize:t.size,getXml:mxUtils.bind(this,function(y,C){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:t.rev},y,C)}),getUrl:mxUtils.bind(this,function(y){return this.ui.getUrl(window.location.pathname+"?rev="+
+t.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=y?"&page="+y:""))+window.location.hash})})})(c.entries[m]);b(l)}catch(t){d(t)}}));f["catch"](function(c){d(c)})};DropboxFile.prototype.getLatestVersion=function(b,d){this.ui.dropbox.getFile(this.getId(),b,d)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,d,f,c,l){this.doSave(this.getTitle(),b,d,f,c,l)};DropboxFile.prototype.saveAs=function(b,d,f){this.doSave(b,!1,d,f)};
+DropboxFile.prototype.doSave=function(b,d,f,c,l,m){var t=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=t;this.saveFile(b,d,f,c,l,m)}),c,l,m])};
+DropboxFile.prototype.saveFile=function(b,d,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(d=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var m=mxUtils.bind(this,function(y){var C=this.stat.path_display.lastIndexOf("/");C=1<C?this.stat.path_display.substring(1,C+1):null;this.ui.dropbox.saveFile(b,y,mxUtils.bind(this,function(A){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=A;this.contentChanged();
+null!=f&&f()}),mxUtils.bind(this,function(A){this.savingFile=!1;null!=c&&c(A)}),C)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var t=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(y){m(this.ui.base64ToBlob(y,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,t.scale,t.border)}else m(this.getData())}catch(y){if(this.savingFile=!1,null!=c)c(y);else throw y;}else null!=c&&c()}),this.getTitle()==b?d(!0):this.ui.dropbox.checkExists(b,
+d)):null!=f&&f()};DropboxFile.prototype.rename=function(b,d,f){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=d&&d()):(this.stat=c,this.descriptorChanged(),this.save(!0,d,f))}),f)};DropboxLibrary=function(b,d,f){DropboxFile.call(this,b,d,f)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,d,f){this.saveFile(b,!1,d,f)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(d){DrawioClient.call(this,d,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+
+"/dropbox";DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(d,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),
+t=this.client.usersGetCurrentAccount();t.then(mxUtils.bind(this,function(y){window.clearTimeout(m);l&&(this.setUser(new DrawioUser(y.account_id,y.email,y.name.display_name)),d())}));t["catch"](mxUtils.bind(this,function(y){window.clearTimeout(m);l&&(null==y||401!==y.status||c?f({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,f,!0)}),f)))}))};DropboxClient.prototype.authenticate=
+function(d,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),d,f):null!=f&&f(c)}),f)};DropboxClient.prototype.authenticateStep2=function(d,f,c){if(null==window.onDropboxCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+
+"&token="+d),null,"GET")).send(mxUtils.bind(this,function(t){200<=t.getStatus()&&299>=t.getStatus()?(b=JSON.parse(t.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==t.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(t,y){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+
(t?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(C,A){if(m){window.onDropboxCallback=null;m=!1;try{null==C?c({message:mxResources.get("accessDenied"),retry:l}):(null!=y&&y(),b=C.access_token,this.client.setAccessToken(b),this.setUser(null),t&&this.setPersistentToken("remembered"),
-e())}catch(B){c(B)}finally{null!=A&&A.close()}}else null!=A&&A.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onDropboxCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(d,e,c){var l=mxUtils.bind(this,function(t){var y=!0,C=window.setTimeout(mxUtils.bind(this,function(){y=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),
-A=d();A.then(mxUtils.bind(this,function(B){window.clearTimeout(C);y&&null!=e&&e(B)}));A["catch"](mxUtils.bind(this,function(B){window.clearTimeout(C);y&&(null==B||500!=B.status&&400!=B.status&&401!=B.status?c({message:mxResources.get("error")+" "+B.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,t?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),m=mxUtils.bind(this,
-function(t){null==this.user?this.updateUser(function(){m(!0)},c,t):l(t)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};DropboxClient.prototype.getLibrary=function(d,e,c){this.getFile(d,e,c,!0)};DropboxClient.prototype.getFile=function(d,e,c,l){l=null!=l?l:!1;var m=/\.png$/i.test(d);if(/^https:\/\//i.test(d)||/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&m){var t=mxUtils.bind(this,function(){var y=d.split("/");this.ui.convertFile(d,0<y.length?
-y[y.length-1]:d,null,this.extension,e,c)});null!=b?t():this.authenticate(t,c)}else t={path:"/"+d},null!=urlParams.rev&&(t.rev=urlParams.rev),this.readFile(t,mxUtils.bind(this,function(y,C){var A=null;if(0<(m?y.lastIndexOf(","):-1)){var B=this.ui.extractGraphModelFromPng(y);null!=B&&0<B.length?y=B:A=new LocalFile(this,y,d,!0)}e(null!=A?A:l?new DropboxLibrary(this.ui,y,C):new DropboxFile(this.ui,y,C))}),c,m)};DropboxClient.prototype.readFile=function(d,e,c,l){var m=mxUtils.bind(this,function(y){var C=
-!0,A=window.setTimeout(mxUtils.bind(this,function(){C=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),B=this.client.filesGetMetadata({path:"/"+d.path.substring(1),include_deleted:!1});B.then(mxUtils.bind(this,function(J){}));B["catch"](function(J){window.clearTimeout(A);C&&null!=J&&409==J.status&&(C=!1,c({message:mxResources.get("fileNotFound")}))});B=this.client.filesDownload(d);B.then(mxUtils.bind(this,function(J){window.clearTimeout(A);if(C){C=!1;try{var f=new FileReader;f.onload=mxUtils.bind(this,
-function(g){e(f.result,J)});l?f.readAsDataURL(J.fileBlob):f.readAsText(J.fileBlob)}catch(g){c(g)}}}));B["catch"](mxUtils.bind(this,function(J){window.clearTimeout(A);C&&(C=!1,null==J||500!=J.status&&400!=J.status&&401!=J.status?c({message:mxResources.get("error")+" "+J.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){t(!0)},c)})}):this.authenticate(function(){m(!0)},c)))}))}),
-t=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){t(!0)},c,y):m(y)});null==b?this.authenticate(function(){t(!0)},c):t(!1)};DropboxClient.prototype.checkExists=function(d,e,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+d.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(m){c?e(!1,!0,m):this.ui.confirm(mxResources.get("replaceIt",[d]),function(){e(!0,!0,m)},function(){e(!1,!0,m)})}),function(m){e(!0,!1)})};
-DropboxClient.prototype.renameFile=function(d,e,c,l){if(/[\\\/:\?\*"\|]/.test(e))l({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=d&&null!=e){var m=d.stat.path_display.substring(1),t=m.lastIndexOf("/");0<t&&(e=m.substring(0,t+1)+e)}null!=d&&null!=e&&d.stat.path_lower.substring(1)!==e.toLowerCase()?this.checkExists(e,mxUtils.bind(this,function(y,C,A){y?(y=mxUtils.bind(this,function(B){B=mxUtils.bind(this,function(){return this.client.filesMove({from_path:d.stat.path_display,to_path:"/"+
-e,autorename:!1})});this.executePromise(B,c,l)}),C&&A.path_lower.substring(1)!==e.toLowerCase()?(C=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+e.toLowerCase()})}),this.executePromise(C,y,l)):y()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(d,e,c,l){this.insertFile(d,e,c,l,!0)};DropboxClient.prototype.insertFile=function(d,e,c,l,m){m=null!=m?m:!1;this.checkExists(d,mxUtils.bind(this,function(t){t?this.saveFile(d,e,mxUtils.bind(this,
-function(y){m?c(new DropboxLibrary(this.ui,e,y)):c(new DropboxFile(this.ui,e,y))}),l):l()}))};DropboxClient.prototype.saveFile=function(d,e,c,l,m){if(/[\\\/:\?\*"\|]/.test(d))l({message:mxResources.get("dropboxCharsNotAllowed")});else if(15E7<=e.length)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 150 MB)"});else{m=null!=m?m:"";var t=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+m+d,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([e],
-{type:"text/plain"})})});this.executePromise(t,c,l)}};DropboxClient.prototype.pickLibrary=function(d){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(e){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(t){this.ui.spinner.stop();this.ui.handleError(t)}),l=e[0].link.indexOf(this.appPath);if(0<l){var m=decodeURIComponent(e[0].link.substring(l+this.appPath.length-1));this.readFile({path:m},mxUtils.bind(this,
-function(t,y){if(null!=y&&y.id==e[0].id)try{this.ui.spinner.stop(),d(m.substring(1),new DropboxLibrary(this.ui,t,y))}catch(C){this.ui.handleError(C)}else this.createLibrary(e[0],d,c)}),c)}else this.createLibrary(e[0],d,c)}})})};DropboxClient.prototype.createLibrary=function(d,e,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[d.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(d.link,mxUtils.bind(this,function(l){this.insertFile(d.name,l,mxUtils.bind(this,
-function(m){try{this.ui.spinner.stop(),e(m.getHash().substring(1),m)}catch(t){c(t)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(d,e){null!=Dropbox.choose?(d=null!=d?d:mxUtils.bind(this,function(c,l){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):l.getHash(),null,l)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(e)this.ui.spinner.stop(),
+f())}catch(B){c(B)}finally{null!=A&&A.close()}}else null!=A&&A.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onDropboxCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(d,f,c){var l=mxUtils.bind(this,function(t){var y=!0,C=window.setTimeout(mxUtils.bind(this,function(){y=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),
+A=d();A.then(mxUtils.bind(this,function(B){window.clearTimeout(C);y&&null!=f&&f(B)}));A["catch"](mxUtils.bind(this,function(B){window.clearTimeout(C);y&&(null==B||500!=B.status&&400!=B.status&&401!=B.status?c({message:mxResources.get("error")+" "+B.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,t?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),m=mxUtils.bind(this,
+function(t){null==this.user?this.updateUser(function(){m(!0)},c,t):l(t)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};DropboxClient.prototype.getLibrary=function(d,f,c){this.getFile(d,f,c,!0)};DropboxClient.prototype.getFile=function(d,f,c,l){l=null!=l?l:!1;var m=/\.png$/i.test(d);if(/^https:\/\//i.test(d)||/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&m){var t=mxUtils.bind(this,function(){var y=d.split("/");this.ui.convertFile(d,0<y.length?
+y[y.length-1]:d,null,this.extension,f,c)});null!=b?t():this.authenticate(t,c)}else t={path:"/"+d},null!=urlParams.rev&&(t.rev=urlParams.rev),this.readFile(t,mxUtils.bind(this,function(y,C){var A=null;if(0<(m?y.lastIndexOf(","):-1)){var B=this.ui.extractGraphModelFromPng(y);null!=B&&0<B.length?y=B:A=new LocalFile(this,y,d,!0)}f(null!=A?A:l?new DropboxLibrary(this.ui,y,C):new DropboxFile(this.ui,y,C))}),c,m)};DropboxClient.prototype.readFile=function(d,f,c,l){var m=mxUtils.bind(this,function(y){var C=
+!0,A=window.setTimeout(mxUtils.bind(this,function(){C=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),B=this.client.filesGetMetadata({path:"/"+d.path.substring(1),include_deleted:!1});B.then(mxUtils.bind(this,function(J){}));B["catch"](function(J){window.clearTimeout(A);C&&null!=J&&409==J.status&&(C=!1,c({message:mxResources.get("fileNotFound")}))});B=this.client.filesDownload(d);B.then(mxUtils.bind(this,function(J){window.clearTimeout(A);if(C){C=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,
+function(g){f(e.result,J)});l?e.readAsDataURL(J.fileBlob):e.readAsText(J.fileBlob)}catch(g){c(g)}}}));B["catch"](mxUtils.bind(this,function(J){window.clearTimeout(A);C&&(C=!1,null==J||500!=J.status&&400!=J.status&&401!=J.status?c({message:mxResources.get("error")+" "+J.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){t(!0)},c)})}):this.authenticate(function(){m(!0)},c)))}))}),
+t=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){t(!0)},c,y):m(y)});null==b?this.authenticate(function(){t(!0)},c):t(!1)};DropboxClient.prototype.checkExists=function(d,f,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+d.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(m){c?f(!1,!0,m):this.ui.confirm(mxResources.get("replaceIt",[d]),function(){f(!0,!0,m)},function(){f(!1,!0,m)})}),function(m){f(!0,!1)})};
+DropboxClient.prototype.renameFile=function(d,f,c,l){if(/[\\\/:\?\*"\|]/.test(f))l({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=d&&null!=f){var m=d.stat.path_display.substring(1),t=m.lastIndexOf("/");0<t&&(f=m.substring(0,t+1)+f)}null!=d&&null!=f&&d.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(y,C,A){y?(y=mxUtils.bind(this,function(B){B=mxUtils.bind(this,function(){return this.client.filesMove({from_path:d.stat.path_display,to_path:"/"+
+f,autorename:!1})});this.executePromise(B,c,l)}),C&&A.path_lower.substring(1)!==f.toLowerCase()?(C=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+f.toLowerCase()})}),this.executePromise(C,y,l)):y()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(d,f,c,l){this.insertFile(d,f,c,l,!0)};DropboxClient.prototype.insertFile=function(d,f,c,l,m){m=null!=m?m:!1;this.checkExists(d,mxUtils.bind(this,function(t){t?this.saveFile(d,f,mxUtils.bind(this,
+function(y){m?c(new DropboxLibrary(this.ui,f,y)):c(new DropboxFile(this.ui,f,y))}),l):l()}))};DropboxClient.prototype.saveFile=function(d,f,c,l,m){if(/[\\\/:\?\*"\|]/.test(d))l({message:mxResources.get("dropboxCharsNotAllowed")});else if(15E7<=f.length)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 150 MB)"});else{m=null!=m?m:"";var t=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+m+d,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([f],
+{type:"text/plain"})})});this.executePromise(t,c,l)}};DropboxClient.prototype.pickLibrary=function(d){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(f){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(t){this.ui.spinner.stop();this.ui.handleError(t)}),l=f[0].link.indexOf(this.appPath);if(0<l){var m=decodeURIComponent(f[0].link.substring(l+this.appPath.length-1));this.readFile({path:m},mxUtils.bind(this,
+function(t,y){if(null!=y&&y.id==f[0].id)try{this.ui.spinner.stop(),d(m.substring(1),new DropboxLibrary(this.ui,t,y))}catch(C){this.ui.handleError(C)}else this.createLibrary(f[0],d,c)}),c)}else this.createLibrary(f[0],d,c)}})})};DropboxClient.prototype.createLibrary=function(d,f,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[d.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(d.link,mxUtils.bind(this,function(l){this.insertFile(d.name,l,mxUtils.bind(this,
+function(m){try{this.ui.spinner.stop(),f(m.getHash().substring(1),m)}catch(t){c(t)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(d,f){null!=Dropbox.choose?(d=null!=d?d:mxUtils.bind(this,function(c,l){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):l.getHash(),null,l)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(f)this.ui.spinner.stop(),
d(c[0].link);else{var l=mxUtils.bind(this,function(A){this.ui.spinner.stop();this.ui.handleError(A)}),m=mxUtils.bind(this,function(A,B){this.ui.spinner.stop();d(A,B)}),t=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&t)m(c[0].link);else{var y=c[0].link.indexOf(this.appPath);if(0<y){var C=decodeURIComponent(c[0].link.substring(y+this.appPath.length-1));this.readFile({path:C},mxUtils.bind(this,function(A,B){if(null!=B&&B.id==c[0].id){var J=
-t?A.lastIndexOf(","):-1;this.ui.spinner.stop();var f=null;0<J&&(J=this.ui.extractGraphModelFromPng(A),null!=J&&0<J.length?A=J:f=new LocalFile(this,A,C,!0));d(C.substring(1),null!=f?f:new DropboxFile(this.ui,A,B))}else this.createFile(c[0],m,l)}),l,t)}else this.createFile(c[0],m,l)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(d,e,c){var l=/(\.png)$/i.test(d.name);this.ui.editor.loadUrl(d.link,mxUtils.bind(this,function(m){null!=
-m&&0<m.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[d.name]),mxUtils.bind(this,function(){var t=l?m.lastIndexOf(","):-1;0<t&&(t=this.ui.extractGraphModelFromPng(m.substring(t+1)),null!=t&&0<t.length&&(m=t));this.insertFile(d.name,m,mxUtils.bind(this,function(y){e(d.name,y)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,l)}})();OneDriveFile=function(b,d,e){DrawioFile.call(this,b,d);this.meta=e};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};
-OneDriveFile.prototype.share=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var d=this.meta.parentReference.path;d=d.substring(d.indexOf("/root:")+6);var e=this.meta.webUrl;b=e.substring(0,e.length-
-d.length-this.meta.name.length-(0<d.length?1:0));e=e.substring(e.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+e+"&parent="+e.substring(0,e.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");d=e=this.meta.webUrl;e=e.substring(8);e=e.substring(e.indexOf("/"));d=d.substring(0,d.lastIndexOf("/"));d=d.substring(d.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+e+"&parent="+
+t?A.lastIndexOf(","):-1;this.ui.spinner.stop();var e=null;0<J&&(J=this.ui.extractGraphModelFromPng(A),null!=J&&0<J.length?A=J:e=new LocalFile(this,A,C,!0));d(C.substring(1),null!=e?e:new DropboxFile(this.ui,A,B))}else this.createFile(c[0],m,l)}),l,t)}else this.createFile(c[0],m,l)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(d,f,c){var l=/(\.png)$/i.test(d.name);this.ui.editor.loadUrl(d.link,mxUtils.bind(this,function(m){null!=
+m&&0<m.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[d.name]),mxUtils.bind(this,function(){var t=l?m.lastIndexOf(","):-1;0<t&&(t=this.ui.extractGraphModelFromPng(m.substring(t+1)),null!=t&&0<t.length&&(m=t));this.insertFile(d.name,m,mxUtils.bind(this,function(y){f(d.name,y)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,l)}})();OneDriveFile=function(b,d,f){DrawioFile.call(this,b,d);this.meta=f};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};
+OneDriveFile.prototype.share=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var d=this.meta.parentReference.path;d=d.substring(d.indexOf("/root:")+6);var f=this.meta.webUrl;b=f.substring(0,f.length-
+d.length-this.meta.name.length-(0<d.length?1:0));f=f.substring(f.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+f+"&parent="+f.substring(0,f.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");d=f=this.meta.webUrl;f=f.substring(8);f=f.substring(f.indexOf("/"));d=d.substring(0,d.lastIndexOf("/"));d=d.substring(d.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+f+"&parent="+
d}}catch(l){}this.ui.editor.graph.openLink(b)};OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(b,d){return(null!=b.parentReference&&null!=b.parentReference.driveId?b.parentReference.driveId+"/":"")+(null!=d?b.parentReference.id:b.id+(b.folder&&b.folder.isRoot?"/root":""))};
OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};OneDriveFile.prototype.isOptimisticSync=function(){return!0};
OneDriveFile.prototype.isSyncEnabled=function(){return!0};OneDriveFile.prototype.isSyncSupported=function(){return!0};OneDriveFile.prototype.getSize=function(){return this.meta.size};OneDriveFile.prototype.isConflict=function(b){return null!=b&&(412==b.getStatus()||409==b.getStatus())};OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?this.ui.oneDrive.user:null};
-OneDriveFile.prototype.loadDescriptor=function(b,d){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?b(JSON.parse(e.getText())):null!=d&&d()}),d)};OneDriveFile.prototype.getLatestVersion=function(b,d){this.ui.oneDrive.getFile(this.getId(),b,d)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};
-OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,d){b.eTag=d};OneDriveFile.prototype.loadPatchDescriptor=function(b,d){var e=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(e+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):d(this.ui.oneDrive.parseRequestText(c))}),d)};
-OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,d,e,c,l){this.doSave(this.getTitle(),b,d,e,c,l)};OneDriveFile.prototype.saveAs=function(b,d,e){this.doSave(b,!1,d,e)};
-OneDriveFile.prototype.doSave=function(b,d,e,c,l,m){var t=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=t;this.saveFile(b,d,e,c,l,m)}),c,l,m])};
-OneDriveFile.prototype.saveFile=function(b,d,e,c,l,m){if(!this.isEditable())null!=e&&e();else if(!this.savingFile)if(this.getTitle()==b){var t=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var y=m||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),C=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(A,B){this.setModified(this.getShadowModified());
-this.savingFile=!1;this.meta=A;this.fileSaved(B,C,mxUtils.bind(this,function(){this.contentChanged();null!=e&&e()}),c)}),mxUtils.bind(this,function(A,B){try{this.savingFile=!1,this.isConflict(B)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();t()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
-c(A)}catch(J){if(this.savingFile=!1,null!=c)c(J);else throw J;}}),y)}catch(A){if(this.savingFile=!1,null!=c)c(A);else throw A;}});t()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(y){this.setModified(this.getShadowModified());this.savingFile=!1;null!=e&&e();this.ui.fileLoaded(y)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
-OneDriveFile.prototype.rename=function(b,d,e){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.meta=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=d&&d(l)):(this.meta=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,d,e))}),e)};
-OneDriveFile.prototype.move=function(b,d,e){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=d&&d(c)}),e)};OneDriveLibrary=function(b,d,e){OneDriveFile.call(this,b,d,e)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,d,e){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=d&&d(c)}),e)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(d,e,c,l){null==e&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(e=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==l&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(l=!0);DrawioClient.call(this,d,e?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=e;this.inlinePicker=c;this.noLogout=l;d=JSON.parse(this.token);null!=d&&(this.endpointHint=null!=d.endpointHint?d.endpointHint.replace("/Documents",
+OneDriveFile.prototype.loadDescriptor=function(b,d){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(f){200<=f.getStatus()&&299>=f.getStatus()?b(JSON.parse(f.getText())):null!=d&&d()}),d)};OneDriveFile.prototype.getLatestVersion=function(b,d){this.ui.oneDrive.getFile(this.getId(),b,d)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};
+OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,d){b.eTag=d};OneDriveFile.prototype.loadPatchDescriptor=function(b,d){var f=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(f+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):d(this.ui.oneDrive.parseRequestText(c))}),d)};
+OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,d,f,c,l){this.doSave(this.getTitle(),b,d,f,c,l)};OneDriveFile.prototype.saveAs=function(b,d,f){this.doSave(b,!1,d,f)};
+OneDriveFile.prototype.doSave=function(b,d,f,c,l,m){var t=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=t;this.saveFile(b,d,f,c,l,m)}),c,l,m])};
+OneDriveFile.prototype.saveFile=function(b,d,f,c,l,m){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var t=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var y=m||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),C=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(A,B){this.setModified(this.getShadowModified());
+this.savingFile=!1;this.meta=A;this.fileSaved(B,C,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(A,B){try{this.savingFile=!1,this.isConflict(B)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();t()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
+c(A)}catch(J){if(this.savingFile=!1,null!=c)c(J);else throw J;}}),y)}catch(A){if(this.savingFile=!1,null!=c)c(A);else throw A;}});t()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(y){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(y)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
+OneDriveFile.prototype.rename=function(b,d,f){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.meta=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=d&&d(l)):(this.meta=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,d,f))}),f)};
+OneDriveFile.prototype.move=function(b,d,f){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=d&&d(c)}),f)};OneDriveLibrary=function(b,d,f){OneDriveFile.call(this,b,d,f)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,d,f){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=d&&d(c)}),f)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(d,f,c,l){null==f&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(f=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==l&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(l=!0);DrawioClient.call(this,d,f?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=f;this.inlinePicker=c;this.noLogout=l;d=JSON.parse(this.token);null!=d&&(this.endpointHint=null!=d.endpointHint?d.endpointHint.replace("/Documents",
"/_layouts/15/onedrive.aspx"):d.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"95e4b4ed-ed5c-4a05-935b-b411b4562ef2":"24b129a6-117b-4394-bdc8-3b9955e5cdef");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId="viewer.diagrams.net"==window.location.hostname?
"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/microsoft";OneDriveClient.prototype.pickerRedirectUri=window.location.protocol+"//"+window.location.host+"/onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;
-OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(d){if(null==d||""===d)return!1;for(var e=0;e<this.invalidFilenameRegExs.length;e++)if(this.invalidFilenameRegExs[e].test(d))return!1;
-return!0};OneDriveClient.prototype.get=function(d,e,c){d=new mxXmlRequest(d,null,"GET");d.setRequestHeaders=mxUtils.bind(this,function(l,m){l.setRequestHeader("Authorization","Bearer "+b)});d.send(e,c);return d};OneDriveClient.prototype.updateUser=function(d,e,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;e({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(t){window.clearTimeout(m);l&&(200>t.getStatus()||300<=t.getStatus()?c?e({message:mxResources.get("accessDenied")}):
-(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,e,!0)}),e)):(t=JSON.parse(t.getText()),this.setUser(new DrawioUser(t.id,t.mail,t.displayName)),d()))}),mxUtils.bind(this,function(t){window.clearTimeout(m);l&&e(t)}))};OneDriveClient.prototype.resetTokenRefresh=function(d){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<d&&(this.tokenRefreshInterval=1E3*d,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
-function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*d))};OneDriveClient.prototype.authenticate=function(d,e,c){if(this.isExtAuth)window.parent.oneDriveAuth(mxUtils.bind(this,function(l){this.updateAuthInfo(l,!0,null==this.endpointHint,d,e)}),e,null!=window.urlParams&&"1"==urlParams.odAuthCancellable);else(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()?this.authenticateStep2(l.getText(),d,e,c):null!=
-e&&e(l)}),e)};OneDriveClient.prototype.updateAuthInfo=function(d,e,c,l,m){c&&this.setUser(null);b=d.access_token;delete d.access_token;d.expiresOn=Date.now()+1E3*d.expires_in;this.tokenExpiresOn=d.expiresOn;d.remember=e;this.setPersistentToken(JSON.stringify(d),!e);this.resetTokenRefresh(d.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),m):l()};OneDriveClient.prototype.authenticateStep2=function(d,e,c,l){if(null==window.onOneDriveCallback){var m=mxUtils.bind(this,function(){var t=
-!0,y=JSON.parse(this.getPersistentToken(!0));null!=y?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),null,"GET")).send(mxUtils.bind(this,function(C){200<=C.getStatus()&&299>=C.getStatus()?this.updateAuthInfo(JSON.parse(C.getText()),y.remember,!1,e,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=C.getStatus()&&400!=C.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:m}):m())}),c):this.ui.showAuthDialog(this,
+OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(d){if(null==d||""===d)return!1;for(var f=0;f<this.invalidFilenameRegExs.length;f++)if(this.invalidFilenameRegExs[f].test(d))return!1;
+return!0};OneDriveClient.prototype.get=function(d,f,c){d=new mxXmlRequest(d,null,"GET");d.setRequestHeaders=mxUtils.bind(this,function(l,m){l.setRequestHeader("Authorization","Bearer "+b)});d.send(f,c);return d};OneDriveClient.prototype.updateUser=function(d,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(t){window.clearTimeout(m);l&&(200>t.getStatus()||300<=t.getStatus()?c?f({message:mxResources.get("accessDenied")}):
+(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,f,!0)}),f)):(t=JSON.parse(t.getText()),this.setUser(new DrawioUser(t.id,t.mail,t.displayName)),d()))}),mxUtils.bind(this,function(t){window.clearTimeout(m);l&&f(t)}))};OneDriveClient.prototype.resetTokenRefresh=function(d){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<d&&(this.tokenRefreshInterval=1E3*d,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
+function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*d))};OneDriveClient.prototype.authenticate=function(d,f,c){if(this.isExtAuth)window.parent.oneDriveAuth(mxUtils.bind(this,function(l){this.updateAuthInfo(l,!0,null==this.endpointHint,d,f)}),f,null!=window.urlParams&&"1"==urlParams.odAuthCancellable);else(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()?this.authenticateStep2(l.getText(),d,f,c):null!=
+f&&f(l)}),f)};OneDriveClient.prototype.updateAuthInfo=function(d,f,c,l,m){c&&this.setUser(null);b=d.access_token;delete d.access_token;d.expiresOn=Date.now()+1E3*d.expires_in;this.tokenExpiresOn=d.expiresOn;d.remember=f;this.setPersistentToken(JSON.stringify(d),!f);this.resetTokenRefresh(d.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),m):l()};OneDriveClient.prototype.authenticateStep2=function(d,f,c,l){if(null==window.onOneDriveCallback){var m=mxUtils.bind(this,function(){var t=
+!0,y=JSON.parse(this.getPersistentToken(!0));null!=y?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),null,"GET")).send(mxUtils.bind(this,function(C){200<=C.getStatus()&&299>=C.getStatus()?this.updateAuthInfo(JSON.parse(C.getText()),y.remember,!1,f,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=C.getStatus()&&400!=C.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:m}):m())}),c):this.ui.showAuthDialog(this,
!0,mxUtils.bind(this,function(C,A){var B="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(C?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d);B=window.open(B,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+
-Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=B&&(window.onOneDriveCallback=mxUtils.bind(this,function(J,f){if(t){window.onOneDriveCallback=null;t=!1;try{null==J?c({message:mxResources.get("accessDenied"),retry:m}):(null!=A&&A(),this.updateAuthInfo(J,C,!0,e,c))}catch(g){c(g)}finally{null!=f&&f.close()}}else null!=f&&f.close()}),B.focus())}),mxUtils.bind(this,function(){t&&(window.onOneDriveCallback=null,t=!1,c({message:mxResources.get("accessDenied"),
-retry:m}))}))});m()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(d,e){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var l=JSON.parse(c.getText());0<l.webUrl.indexOf(".sharepoint.com")?this.endpointHint=l.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var m=JSON.parse(this.getPersistentToken(!0));null!=m&&(m.endpointHint=this.endpointHint,
-this.setPersistentToken(JSON.stringify(m),!m.remember));d();return}}catch(t){}e({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),e)};OneDriveClient.prototype.executeRequest=function(d,e,c){var l=mxUtils.bind(this,function(m){var t=!0,y=window.setTimeout(mxUtils.bind(this,function(){t=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(d,mxUtils.bind(this,function(C){window.clearTimeout(y);t&&(200<=C.getStatus()&&299>=C.getStatus()||404==C.getStatus()?(null==
-this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),e(C)):m||401!==C.getStatus()&&400!==C.getStatus()?c(this.parseRequestText(C)):this.authenticate(function(){l(!0)},c,m))}),mxUtils.bind(this,function(C){window.clearTimeout(y);t&&c(C)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(d,e){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(d,null!=e?e:this.emptyFn):
-d()};OneDriveClient.prototype.getItemRef=function(d){var e=d.split("/");return 1<e.length?{driveId:e[0],id:e[1]}:{id:d}};OneDriveClient.prototype.getItemURL=function(d,e){var c=d.split("/");return 1<c.length?(d=c[1],(e?"":this.baseUrl)+"/drives/"+c[0]+("root"==d?"/root":"/items/"+d)):(e?"":this.baseUrl)+"/me/drive/items/"+d};OneDriveClient.prototype.getLibrary=function(d,e,c){this.getFile(d,e,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(d){var e=d.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
-0<e&&(d=d.substring(0,e));return d};OneDriveClient.prototype.getFile=function(d,e,c,l,m){m=null!=m?m:!1;this.executeRequest(this.getItemURL(d),mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus()){var y=JSON.parse(t.getText()),C=/\.png$/i.test(y.name);if(/\.v(dx|sdx?)$/i.test(y.name)||/\.gliffy$/i.test(y.name)||/\.pdf$/i.test(y.name)||!this.ui.useCanvasForExport&&C)this.ui.convertFile(y["@microsoft.graph.downloadUrl"],y.name,null!=y.file?y.file.mimeType:null,this.extension,e,c);
-else{var A=!0,B=window.setTimeout(mxUtils.bind(this,function(){A=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(y["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(J){try{if(window.clearTimeout(B),A){/\.html$/i.test(y.name)&&(J=this.removeExtraHtmlContent(J));var f=null;if(0<(C?J.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(J);null!=g&&0<g.length?J=g:f=new LocalFile(this.ui,J,y.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==J.substring(0,32)){var k=
-J.substring(22);J=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(J,y["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(J,mxUtils.bind(this,function(n){try{4==n.readyState&&(200<=n.status&&299>=n.status?e(new LocalFile(this.ui,n.responseText,y.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(v){if(null!=c)c(v);else throw v;}}),y.name):null!=f?e(f):m?e(new OneDriveLibrary(this.ui,
-J,y)):e(new OneDriveFile(this.ui,J,y))}}catch(n){if(null!=c)c(n);else throw n;}}),mxUtils.bind(this,function(J){window.clearTimeout(B);A&&c(this.parseRequestText(J))}),C||null!=y.file&&null!=y.file.mimeType&&("image/"==y.file.mimeType.substring(0,6)&&"image/svg"!=y.file.mimeType.substring(0,9)||"application/pdf"==y.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(t))}),c)};OneDriveClient.prototype.renameFile=
-function(d,e,c,l){null!=d&&null!=e&&(this.isValidFilename(e)?this.checkExists(d.getParentId(),e,!1,mxUtils.bind(this,function(m){m?this.writeFile(this.getItemURL(d.getId()),JSON.stringify({name:e}),"PATCH","application/json",c,l):l()})):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(d,e,c,l){e=this.getItemRef(e);var m=this.getItemRef(d);e.driveId!=m.driveId?l({message:mxResources.get("cannotMoveOneDrive",
-null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(d),JSON.stringify({parentReference:e}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(d,e,c,l,m){this.insertFile(d,e,c,l,!0,m)};OneDriveClient.prototype.insertFile=function(d,e,c,l,m,t){this.isValidFilename(d)?(m=null!=m?m:!1,this.checkExists(t,d,!0,mxUtils.bind(this,function(y){if(y){y="/me/drive/root";null!=t&&(y=this.getItemURL(t,!0));var C=mxUtils.bind(this,function(A){m?
-c(new OneDriveLibrary(this.ui,e,A)):c(new OneDriveFile(this.ui,e,A))});y=this.baseUrl+y+"/children/"+encodeURIComponent(d)+"/content";4E6<=e.length?this.writeFile(y,"","PUT",null,mxUtils.bind(this,function(A){this.writeLargeFile(this.getItemURL(A.id),e,C,l)}),l):this.writeFile(y,e,"PUT",null,C,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(d,e,
-c,l){var m="/me/drive/root";null!=d&&(m=this.getItemURL(d,!0));this.executeRequest(this.baseUrl+m+"/children/"+encodeURIComponent(e),mxUtils.bind(this,function(t){404==t.getStatus()?l(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[e]),function(){l(!0)},function(){l(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){l(!1)}))}),function(t){l(!1)},!0)};OneDriveClient.prototype.saveFile=function(d,
-e,c,l){try{var m=d.getData(),t=mxUtils.bind(this,function(C){var A=mxUtils.bind(this,function(J){e(J,m)}),B=this.getItemURL(d.getId());4E6<=C.length?this.writeLargeFile(B,C,A,c,l):this.writeFile(B+"/content/",C,"PUT",null,A,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d.meta.name)){var y=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(C){t(this.ui.base64ToBlob(C,"image/png"))}),c,this.ui.getCurrentFile()!=d?m:null,y.scale,y.border)}else t(m)}catch(C){c(C)}};
-OneDriveClient.prototype.writeLargeFile=function(d,e,c,l,m){try{if(null!=e){var t=mxUtils.bind(this,function(C,A,B){try{B=B||0;var J=!0,f=null;f=window.setTimeout(mxUtils.bind(this,function(){J=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var g=e.substr(A,4194304),k=new mxXmlRequest(C,g,"PUT");k.setRequestHeaders=mxUtils.bind(this,function(n,v){n.setRequestHeader("Content-Length",g.length);n.setRequestHeader("Content-Range","bytes "+A+"-"+(A+g.length-1)+"/"+e.length)});k.send(mxUtils.bind(this,
-function(n){window.clearTimeout(f);if(J){var v=n.getStatus();200<=v&&299>=v?(v=A+g.length,v==e.length?c(JSON.parse(n.getText())):t(C,v,B)):500<=v&&599>=v&&2>B?(B++,t(C,A,B)):l(this.parseRequestText(n),n)}}),mxUtils.bind(this,function(n){window.clearTimeout(f);J&&l(this.parseRequestText(n))}))}catch(n){l(n)}}),y=mxUtils.bind(this,function(C){try{var A=!0,B=null;try{B=window.setTimeout(mxUtils.bind(this,function(){A=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(f){}var J=new mxXmlRequest(d+
-"/createUploadSession","{}","POST");J.setRequestHeaders=mxUtils.bind(this,function(f,g){f.setRequestHeader("Content-Type","application/json");f.setRequestHeader("Authorization","Bearer "+b);null!=m&&f.setRequestHeader("If-Match",m)});J.send(mxUtils.bind(this,function(f){window.clearTimeout(B);A&&(200<=f.getStatus()&&299>=f.getStatus()?(f=JSON.parse(f.getText()),t(f.uploadUrl,0)):C||401!==f.getStatus()?l(this.parseRequestText(f),f):this.authenticate(function(){y(!0)},l,C))}),mxUtils.bind(this,function(f){window.clearTimeout(B);
-A&&l(this.parseRequestText(f))}))}catch(f){l(f)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){y(!0)},l):y(!1)}else l({message:mxResources.get("unknownError")})}catch(C){l(C)}};OneDriveClient.prototype.writeFile=function(d,e,c,l,m,t,y){try{if(null!=d&&null!=e){var C=mxUtils.bind(this,function(A){try{var B=!0,J=null;try{J=window.setTimeout(mxUtils.bind(this,function(){B=!1;t({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var f=new mxXmlRequest(d,e,c);f.setRequestHeaders=
-mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type",l||" ");g.setRequestHeader("Authorization","Bearer "+b);null!=y&&g.setRequestHeader("If-Match",y)});f.send(mxUtils.bind(this,function(g){window.clearTimeout(J);B&&(200<=g.getStatus()&&299>=g.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),m(JSON.parse(g.getText()))):A||401!==g.getStatus()?t(this.parseRequestText(g),g):this.authenticate(function(){C(!0)},t,A))}),mxUtils.bind(this,function(g){window.clearTimeout(J);
-B&&t(this.parseRequestText(g))}))}catch(g){t(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){C(!0)},t):C(!1)}else t({message:mxResources.get("unknownError")})}catch(A){t(A)}};OneDriveClient.prototype.parseRequestText=function(d){var e={message:mxResources.get("unknownError")};try{e=JSON.parse(d.getText()),e.status=d.getStatus(),e.error&&(e.error.status=e.status,e.error.code=e.status)}catch(c){}return e};OneDriveClient.prototype.pickLibrary=function(d){this.pickFile(function(e){d(e)})};
-OneDriveClient.prototype.createInlinePicker=function(d,e,c){return mxUtils.bind(this,function(){var l=null,m=document.createElement("div");m.style.position="relative";var t=new CustomDialog(this.ui,m,mxUtils.bind(this,function(){var y=l.getSelectedItem();if(null!=y)if(e&&"object"==typeof y.folder)d({value:[y]});else{if(!y.folder){var C=OneDriveFile.prototype.getIdOf(y);this.executeRequest(this.getItemURL(C),mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()&&(A=JSON.parse(A.getText()),
-d(C,{value:[A]}))}),null)}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(e?"save":"open"),null,null,null,null,!0);this.ui.showDialog(t.container,550,500,!0,!0);m.style.width=t.container.parentNode.style.width;m.style.height=parseInt(t.container.parentNode.style.height)-60+"px";l=new mxODPicker(m,null,mxUtils.bind(this,function(y,C,A,B){this.executeRequest(B?y:this.baseUrl+y,function(J){C(JSON.parse(J.getText()))},A)}),mxUtils.bind(this,function(y,C,A,B){this.executeRequest(this.baseUrl+
-"/drives/"+C+"/items/"+y,function(J){A(JSON.parse(J.getText()))},B)}),null,null,function(y){e?d({value:[y]}):d(OneDriveFile.prototype.getIdOf(y))},mxUtils.bind(this,function(y){this.ui.showError(mxResources.get("error"),y)}),e,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(d,e){var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),m&&m.message?m.message:m)}),l=mxUtils.bind(this,function(m){var t=this.inlinePicker?this.createInlinePicker(d,!0):mxUtils.bind(this,
+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=B&&(window.onOneDriveCallback=mxUtils.bind(this,function(J,e){if(t){window.onOneDriveCallback=null;t=!1;try{null==J?c({message:mxResources.get("accessDenied"),retry:m}):(null!=A&&A(),this.updateAuthInfo(J,C,!0,f,c))}catch(g){c(g)}finally{null!=e&&e.close()}}else null!=e&&e.close()}),B.focus())}),mxUtils.bind(this,function(){t&&(window.onOneDriveCallback=null,t=!1,c({message:mxResources.get("accessDenied"),
+retry:m}))}))});m()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(d,f){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var l=JSON.parse(c.getText());0<l.webUrl.indexOf(".sharepoint.com")?this.endpointHint=l.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var m=JSON.parse(this.getPersistentToken(!0));null!=m&&(m.endpointHint=this.endpointHint,
+this.setPersistentToken(JSON.stringify(m),!m.remember));d();return}}catch(t){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=function(d,f,c){var l=mxUtils.bind(this,function(m){var t=!0,y=window.setTimeout(mxUtils.bind(this,function(){t=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(d,mxUtils.bind(this,function(C){window.clearTimeout(y);t&&(200<=C.getStatus()&&299>=C.getStatus()||404==C.getStatus()?(null==
+this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(C)):m||401!==C.getStatus()&&400!==C.getStatus()?c(this.parseRequestText(C)):this.authenticate(function(){l(!0)},c,m))}),mxUtils.bind(this,function(C){window.clearTimeout(y);t&&c(C)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(d,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(d,null!=f?f:this.emptyFn):
+d()};OneDriveClient.prototype.getItemRef=function(d){var f=d.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:d}};OneDriveClient.prototype.getItemURL=function(d,f){var c=d.split("/");return 1<c.length?(d=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==d?"/root":"/items/"+d)):(f?"":this.baseUrl)+"/me/drive/items/"+d};OneDriveClient.prototype.getLibrary=function(d,f,c){this.getFile(d,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(d){var f=d.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
+0<f&&(d=d.substring(0,f));return d};OneDriveClient.prototype.getFile=function(d,f,c,l,m){m=null!=m?m:!1;this.executeRequest(this.getItemURL(d),mxUtils.bind(this,function(t){if(200<=t.getStatus()&&299>=t.getStatus()){var y=JSON.parse(t.getText()),C=/\.png$/i.test(y.name);if(/\.v(dx|sdx?)$/i.test(y.name)||/\.gliffy$/i.test(y.name)||/\.pdf$/i.test(y.name)||!this.ui.useCanvasForExport&&C)this.ui.convertFile(y["@microsoft.graph.downloadUrl"],y.name,null!=y.file?y.file.mimeType:null,this.extension,f,c);
+else{var A=!0,B=window.setTimeout(mxUtils.bind(this,function(){A=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(y["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(J){try{if(window.clearTimeout(B),A){/\.html$/i.test(y.name)&&(J=this.removeExtraHtmlContent(J));var e=null;if(0<(C?J.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(J);null!=g&&0<g.length?J=g:e=new LocalFile(this.ui,J,y.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==J.substring(0,32)){var k=
+J.substring(22);J=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(J,y["@microsoft.graph.downloadUrl"])?this.ui.parseFileData(J,mxUtils.bind(this,function(q){try{4==q.readyState&&(200<=q.status&&299>=q.status?f(new LocalFile(this.ui,q.responseText,y.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(u){if(null!=c)c(u);else throw u;}}),y.name):null!=e?f(e):m?f(new OneDriveLibrary(this.ui,
+J,y)):f(new OneDriveFile(this.ui,J,y))}}catch(q){if(null!=c)c(q);else throw q;}}),mxUtils.bind(this,function(J){window.clearTimeout(B);A&&c(this.parseRequestText(J))}),C||null!=y.file&&null!=y.file.mimeType&&("image/"==y.file.mimeType.substring(0,6)&&"image/svg"!=y.file.mimeType.substring(0,9)||"application/pdf"==y.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(t))}),c)};OneDriveClient.prototype.renameFile=
+function(d,f,c,l){null!=d&&null!=f&&(this.isValidFilename(f)?this.checkExists(d.getParentId(),f,!1,mxUtils.bind(this,function(m){m?this.writeFile(this.getItemURL(d.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,l):l()})):l({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(d,f,c,l){f=this.getItemRef(f);var m=this.getItemRef(d);f.driveId!=m.driveId?l({message:mxResources.get("cannotMoveOneDrive",
+null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(d),JSON.stringify({parentReference:f}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(d,f,c,l,m){this.insertFile(d,f,c,l,!0,m)};OneDriveClient.prototype.insertFile=function(d,f,c,l,m,t){this.isValidFilename(d)?(m=null!=m?m:!1,this.checkExists(t,d,!0,mxUtils.bind(this,function(y){if(y){y="/me/drive/root";null!=t&&(y=this.getItemURL(t,!0));var C=mxUtils.bind(this,function(A){m?
+c(new OneDriveLibrary(this.ui,f,A)):c(new OneDriveFile(this.ui,f,A))});y=this.baseUrl+y+"/children/"+encodeURIComponent(d)+"/content";4E6<=f.length?this.writeFile(y,"","PUT",null,mxUtils.bind(this,function(A){this.writeLargeFile(this.getItemURL(A.id),f,C,l)}),l):this.writeFile(y,f,"PUT",null,C,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(d,f,
+c,l){var m="/me/drive/root";null!=d&&(m=this.getItemURL(d,!0));this.executeRequest(this.baseUrl+m+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(t){404==t.getStatus()?l(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){l(!0)},function(){l(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){l(!1)}))}),function(t){l(!1)},!0)};OneDriveClient.prototype.saveFile=function(d,
+f,c,l){try{var m=d.getData(),t=mxUtils.bind(this,function(C){var A=mxUtils.bind(this,function(J){f(J,m)}),B=this.getItemURL(d.getId());4E6<=C.length?this.writeLargeFile(B,C,A,c,l):this.writeFile(B+"/content/",C,"PUT",null,A,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(d.meta.name)){var y=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(C){t(this.ui.base64ToBlob(C,"image/png"))}),c,this.ui.getCurrentFile()!=d?m:null,y.scale,y.border)}else t(m)}catch(C){c(C)}};
+OneDriveClient.prototype.writeLargeFile=function(d,f,c,l,m){try{if(null!=f){var t=mxUtils.bind(this,function(C,A,B){try{B=B||0;var J=!0,e=null;e=window.setTimeout(mxUtils.bind(this,function(){J=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var g=f.substr(A,4194304),k=new mxXmlRequest(C,g,"PUT");k.setRequestHeaders=mxUtils.bind(this,function(q,u){q.setRequestHeader("Content-Length",g.length);q.setRequestHeader("Content-Range","bytes "+A+"-"+(A+g.length-1)+"/"+f.length)});k.send(mxUtils.bind(this,
+function(q){window.clearTimeout(e);if(J){var u=q.getStatus();200<=u&&299>=u?(u=A+g.length,u==f.length?c(JSON.parse(q.getText())):t(C,u,B)):500<=u&&599>=u&&2>B?(B++,t(C,A,B)):l(this.parseRequestText(q),q)}}),mxUtils.bind(this,function(q){window.clearTimeout(e);J&&l(this.parseRequestText(q))}))}catch(q){l(q)}}),y=mxUtils.bind(this,function(C){try{var A=!0,B=null;try{B=window.setTimeout(mxUtils.bind(this,function(){A=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(e){}var J=new mxXmlRequest(d+
+"/createUploadSession","{}","POST");J.setRequestHeaders=mxUtils.bind(this,function(e,g){e.setRequestHeader("Content-Type","application/json");e.setRequestHeader("Authorization","Bearer "+b);null!=m&&e.setRequestHeader("If-Match",m)});J.send(mxUtils.bind(this,function(e){window.clearTimeout(B);A&&(200<=e.getStatus()&&299>=e.getStatus()?(e=JSON.parse(e.getText()),t(e.uploadUrl,0)):C||401!==e.getStatus()?l(this.parseRequestText(e),e):this.authenticate(function(){y(!0)},l,C))}),mxUtils.bind(this,function(e){window.clearTimeout(B);
+A&&l(this.parseRequestText(e))}))}catch(e){l(e)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){y(!0)},l):y(!1)}else l({message:mxResources.get("unknownError")})}catch(C){l(C)}};OneDriveClient.prototype.writeFile=function(d,f,c,l,m,t,y){try{if(null!=d&&null!=f){var C=mxUtils.bind(this,function(A){try{var B=!0,J=null;try{J=window.setTimeout(mxUtils.bind(this,function(){B=!1;t({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var e=new mxXmlRequest(d,f,c);e.setRequestHeaders=
+mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type",l||" ");g.setRequestHeader("Authorization","Bearer "+b);null!=y&&g.setRequestHeader("If-Match",y)});e.send(mxUtils.bind(this,function(g){window.clearTimeout(J);B&&(200<=g.getStatus()&&299>=g.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),m(JSON.parse(g.getText()))):A||401!==g.getStatus()?t(this.parseRequestText(g),g):this.authenticate(function(){C(!0)},t,A))}),mxUtils.bind(this,function(g){window.clearTimeout(J);
+B&&t(this.parseRequestText(g))}))}catch(g){t(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){C(!0)},t):C(!1)}else t({message:mxResources.get("unknownError")})}catch(A){t(A)}};OneDriveClient.prototype.parseRequestText=function(d){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(d.getText()),f.status=d.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(d){this.pickFile(function(f){d(f)})};
+OneDriveClient.prototype.createInlinePicker=function(d,f,c){return mxUtils.bind(this,function(){var l=null,m=document.createElement("div");m.style.position="relative";var t=new CustomDialog(this.ui,m,mxUtils.bind(this,function(){var y=l.getSelectedItem();if(null!=y)if(f&&"object"==typeof y.folder)d({value:[y]});else{if(!y.folder){var C=OneDriveFile.prototype.getIdOf(y);this.executeRequest(this.getItemURL(C),mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()&&(A=JSON.parse(A.getText()),
+d(C,{value:[A]}))}),null)}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"save":"open"),null,null,null,null,!0);this.ui.showDialog(t.container,550,500,!0,!0);m.style.width=t.container.parentNode.style.width;m.style.height=parseInt(t.container.parentNode.style.height)-60+"px";l=new mxODPicker(m,null,mxUtils.bind(this,function(y,C,A,B){this.executeRequest(B?y:this.baseUrl+y,function(J){C(JSON.parse(J.getText()))},A)}),mxUtils.bind(this,function(y,C,A,B){this.executeRequest(this.baseUrl+
+"/drives/"+C+"/items/"+y,function(J){A(JSON.parse(J.getText()))},B)}),null,null,function(y){f?d({value:[y]}):d(OneDriveFile.prototype.getIdOf(y))},mxUtils.bind(this,function(y){this.ui.showError(mxResources.get("error"),y)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=function(d,f){var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),m&&m.message?m.message:m)}),l=mxUtils.bind(this,function(m){var t=this.inlinePicker?this.createInlinePicker(d,!0):mxUtils.bind(this,
function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(y){d(y);mxClient.IS_IE11&&(b=y.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});m?t():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){d({value:[{id:"root",
-name:"root",parentReference:{driveId:"me"}}]})}),t,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){l(!1)}),c):l(e)};OneDriveClient.prototype.pickFile=function(d,e){d=null!=d?d:mxUtils.bind(this,function(m){this.ui.loadFile("W"+encodeURIComponent(m))});var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),
-m&&m.message?m.message:m)}),l=this.inlinePicker?this.createInlinePicker(d,null,e):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference,webUrl",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(m){null!=m&&null!=m.value&&0<m.value.length&&(mxClient.IS_IE11&&(b=m.accessToken),d(OneDriveFile.prototype.getIdOf(m.value[0]),
+name:"root",parentReference:{driveId:"me"}}]})}),t,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){l(!1)}),c):l(f)};OneDriveClient.prototype.pickFile=function(d,f){d=null!=d?d:mxUtils.bind(this,function(m){this.ui.loadFile("W"+encodeURIComponent(m))});var c=mxUtils.bind(this,function(m){this.ui.showError(mxResources.get("error"),
+m&&m.message?m.message:m)}),l=this.inlinePicker?this.createInlinePicker(d,null,f):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference,webUrl",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(m){null!=m&&null!=m.value&&0<m.value.length&&(mxClient.IS_IE11&&(b=m.accessToken),d(OneDriveFile.prototype.getIdOf(m.value[0]),
m))}),cancel:mxUtils.bind(this,function(){}),error:c});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){this.inlinePicker?l():this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){this.ui.hideDialog();l()}))).container,300,140,!0,!0)}),c):l()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var d=localStorage.getItem("odpickerv7cache");
-null!=d&&'{"odsdkLoginHint":{'==d.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}window.open("https://login.microsoftonline.com/common/oauth2/v2.0/logout","logout","width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null}})();GitHubFile=function(b,d,e){DrawioFile.call(this,b,d);this.meta=e;this.peer=this.ui.gitHub};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.share=function(){this.ui.editor.graph.openLink("https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/settings/access")};
+null!=d&&'{"odsdkLoginHint":{'==d.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}window.open("https://login.microsoftonline.com/common/oauth2/v2.0/logout","logout","width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null}})();GitHubFile=function(b,d,f){DrawioFile.call(this,b,d);this.meta=f;this.peer=this.ui.gitHub};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.share=function(){this.ui.editor.graph.openLink("https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/settings/access")};
GitHubFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+this.getId())};
GitHubFile.prototype.getPublicUrl=function(b){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(d){b(200<=d.getStatus()&&299>=d.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)})):b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,d){this.peer.getFile(this.getId(),b,d)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};GitHubFile.prototype.setDescriptorEtag=function(b,d){b.sha=d};
-GitHubFile.prototype.save=function(b,d,e,c,l,m){this.doSave(this.getTitle(),d,e,c,l,m)};GitHubFile.prototype.saveAs=function(b,d,e){this.doSave(b,d,e)};GitHubFile.prototype.doSave=function(b,d,e,c,l,m){var t=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=t;this.saveFile(b,!1,d,e,c,l,m)}),e,c,l])};
-GitHubFile.prototype.saveFile=function(b,d,e,c,l,m,t){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var y=mxUtils.bind(this,function(C){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var A=this.getCurrentEtag(),B=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(J){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,J);this.fileSaved(B,A,mxUtils.bind(this,function(){this.contentChanged();
-null!=e&&e()}),c)}),mxUtils.bind(this,function(J){this.savingFile=!1;this.isConflict(J)?(this.inConflictState=!0,null!=c&&c({commitMessage:C})):null!=c&&c(J)}),m,C)}catch(J){if(this.savingFile=!1,null!=c)c(J);else throw J;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(J){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(f){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
-e&&e();this.ui.fileLoaded(f)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,J,C)}))});null!=t?y(t):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(C){y(C)}),c)}else null!=e&&e()};GitHubLibrary=function(b,d,e){GitHubFile.call(this,b,d,e)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,d,e){this.saveFile(b,!1,d,e)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(d,e){DrawioClient.call(this,d,e||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/github2";
-GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(d){b=d};GitHubClient.prototype.updateUser=function(d,e,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),t=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),y=this.authToken+" "+b;t.setRequestHeaders=function(C,A){C.setRequestHeader("Authorization",y)};t.send(mxUtils.bind(this,function(){window.clearTimeout(m);
-l&&(401===t.getStatus()?c?e({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,e,!0)}),e)):200>t.getStatus()||300<=t.getStatus()?e({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(t.getText()))),d()))}),e)};GitHubClient.prototype.createUser=function(d){return new DrawioUser(d.id,d.email,d.name)};GitHubClient.prototype.authenticate=function(d,e){(new mxXmlRequest(this.redirectUri+"?getState=1",
-null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),d,e):null!=e&&e(c)}),e)};GitHubClient.prototype.authenticateStep2=function(d,e,c){if(null==window.onGitHubCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),null,"GET")).send(mxUtils.bind(this,function(t){200<=
-t.getStatus()&&299>=t.getStatus()?(b=JSON.parse(t.getText()).access_token,this.setUser(null),e()):(this.clearPersistentToken(),this.setUser(null),b=null,401==t.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(t,y){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"ghauth")?window.onGitHubCallback=
-mxUtils.bind(this,function(C,A){m?(window.onGitHubCallback=null,m=!1,null==C?c({message:mxResources.get("accessDenied"),retry:l}):(null!=y&&y(),b=C.access_token,this.setUser(null),t&&this.setPersistentToken("remembered"),e(),null!=A&&A.close())):null!=A&&A.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitHubCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=
-function(d,e){try{var c=JSON.parse(d.getText());null!=c&&null!=c.message&&(e=c.message)}catch(l){}return e};GitHubClient.prototype.showAuthorizeDialog=function(d,e){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/blog/single-repository-diagrams")}),d,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")}),mxResources.get("cancel"),e,480,null,!1)};GitHubClient.prototype.executeRequest=function(d,e,c,l,m){var t=mxUtils.bind(this,function(C){var A=!0,B=window.setTimeout(mxUtils.bind(this,function(){A=!1;c({code:App.ERROR_TIMEOUT,retry:y})}),this.ui.timeout),J=this.authToken+" "+b;d.setRequestHeaders=function(f,g){f.setRequestHeader("Authorization",J)};d.send(mxUtils.bind(this,function(){window.clearTimeout(B);var f=
-mxUtils.bind(this,function(){var n=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){n();y()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(A)if(200<=d.getStatus()&&299>=d.getStatus()||l&&404==d.getStatus())e(d);else if(401===d.getStatus())C?c({code:d.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){y(!0)},c)})}):this.authenticate(function(){t(!0)},c);else if(403===d.getStatus()){var g=
-!1;try{var k=JSON.parse(d.getText());null!=k&&"Resource not accessible by integration"==k.message?f():(null!=k&&null!=k.errors&&0<k.errors.length&&(g="too_large"==k.errors[0].code),c({message:mxResources.get(g?"drawingTooLarge":"forbidden")}))}catch(n){c({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}}else 404===d.getStatus()?m?c({code:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):f():409===d.getStatus()?c({code:d.getStatus(),status:409}):c({code:d.getStatus(),
-message:this.getErrorMessage(d,mxResources.get("error")+" "+d.getStatus())})}),mxUtils.bind(this,function(f){window.clearTimeout(B);A&&c(f)}))}),y=mxUtils.bind(this,function(C){null==this.user?this.updateUser(function(){y(!0)},c,C):t(C)});null==b?this.authenticate(function(){y(!0)},c):y(!1)};GitHubClient.prototype.getLibrary=function(d,e,c){this.getFile(d,e,c,!0)};GitHubClient.prototype.getSha=function(d,e,c,l,m,t,y){var C="&t="+(new Date).getTime();d=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+
-e+"/contents/"+c+"?ref="+l+C,null,"HEAD");this.executeRequest(d,mxUtils.bind(this,function(A){try{m(A.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(B){t(B)}}),t,null,y)};GitHubClient.prototype.getFile=function(d,e,c,l,m){l=null!=l?l:!1;var t=d.split("/"),y=t[0],C=t[1],A=t[2];d=t.slice(3,t.length).join("/");t=/\.png$/i.test(d);if(!m&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&t))if(null!=b){m=this.baseUrl+"/repos/"+y+"/"+C+"/contents/"+
-d+"?ref="+A;var B={Authorization:"token "+b};t=d.split("/");this.ui.convertFile(m,0<t.length?t[t.length-1]:d,null,this.extension,e,c,null,B)}else c({message:mxResources.get("accessDenied")});else t="&t="+(new Date).getTime(),d=new mxXmlRequest(this.baseUrl+"/repos/"+y+"/"+C+"/contents/"+d+"?ref="+A+t,null,"GET"),this.executeRequest(d,mxUtils.bind(this,function(J){try{e(this.createGitHubFile(y,C,A,JSON.parse(J.getText()),l))}catch(f){c(f)}}),c)};GitHubClient.prototype.createGitHubFile=function(d,e,
-c,l,m){d={org:d,repo:e,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};e=l.content;"base64"===l.encoding&&(/\.jpe?g$/i.test(l.name)?e="data:image/jpeg;base64,"+e:/\.gif$/i.test(l.name)?e="data:image/gif;base64,"+e:/\.png$/i.test(l.name)?(l=this.ui.extractGraphModelFromPng(e),e=null!=l&&0<l.length?l:"data:image/png;base64,"+e):e=Base64.decode(e));return m?new GitHubLibrary(this.ui,e,d):new GitHubFile(this.ui,e,d)};GitHubClient.prototype.insertLibrary=function(d,
-e,c,l,m){this.insertFile(d,e,c,l,!0,m,!1)};GitHubClient.prototype.insertFile=function(d,e,c,l,m,t,y){m=null!=m?m:!1;t=t.split("/");var C=t[0],A=t[1],B=t[2],J=t.slice(3,t.length).join("/");0<J.length&&(J+="/");J+=d;this.checkExists(C+"/"+A+"/"+B+"/"+J,!0,mxUtils.bind(this,function(f,g){f?m?(y||(e=Base64.encode(e)),this.showCommitDialog(d,!0,mxUtils.bind(this,function(k){this.writeFile(C,A,B,J,k,e,g,mxUtils.bind(this,function(n){try{var v=JSON.parse(n.getText());c(this.createGitHubFile(C,A,B,v.content,
-m))}catch(x){l(x)}}),l)}),l)):c(new GitHubFile(this.ui,e,{org:C,repo:A,ref:B,name:d,path:J,sha:g,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=function(d,e,c,l){var m=this.ui.spinner.pause();d=new FilenameDialog(this.ui,mxResources.get(e?"addedFile":"updateFile",[d]),mxResources.get("ok"),mxUtils.bind(this,function(t){m();c(t)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}),null,280);this.ui.showDialog(d.container,400,80,!0,!1);d.init()};GitHubClient.prototype.writeFile=
-function(d,e,c,l,m,t,y,C,A){t.length>=this.maxFileSize?A({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(t.length)+" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:m,content:t},null!=y&&(c.sha=y),d=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+e+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(d,mxUtils.bind(this,function(B){C(B)}),mxUtils.bind(this,function(B){404==B.code&&(B.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,
-B.code=null);A(B)})))};GitHubClient.prototype.checkExists=function(d,e,c){var l=d.split("/"),m=l[0],t=l[1],y=l[2];d=l.slice(3,l.length).join("/");this.getSha(m,t,d,y,mxUtils.bind(this,function(C){if(e){var A=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[d]),function(){A();c(!0,C)},function(){A();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(C){c(!0)}),
-!0)};GitHubClient.prototype.saveFile=function(d,e,c,l,m){var t=d.meta.org,y=d.meta.repo,C=d.meta.ref,A=d.meta.path,B=mxUtils.bind(this,function(f,g){this.writeFile(t,y,C,A,m,g,f,mxUtils.bind(this,function(k){delete d.meta.isNew;e(JSON.parse(k.getText()).content.sha)}),mxUtils.bind(this,function(k){c(k)}))}),J=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(A)){var f=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){B(d.meta.sha,
-g)}),c,this.ui.getCurrentFile()!=d?d.getData():null,f.scale,f.border)}else B(d.meta.sha,Base64.encode(d.getData()))});l?this.getSha(t,y,A,C,mxUtils.bind(this,function(f){d.meta.sha=f;J()}),c):J()};GitHubClient.prototype.pickLibrary=function(d){this.pickFile(d)};GitHubClient.prototype.pickFolder=function(d){this.showGitHubDialog(!1,d)};GitHubClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(e){this.ui.loadFile("H"+encodeURIComponent(e))});this.showGitHubDialog(!0,d)};GitHubClient.prototype.showGitHubDialog=
-function(d,e){var c=null,l=null,m=null,t=null,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.height="304px";var C=document.createElement("h3");mxUtils.write(C,mxResources.get(d?"selectFile":"selectFolder"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(C);var A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.border="1px solid lightgray";A.style.boxSizing="border-box";A.style.padding="4px";
-A.style.overflow="auto";A.style.lineHeight="1.2em";A.style.height="274px";y.appendChild(A);var B=document.createElement("div");B.style.textOverflow="ellipsis";B.style.boxSizing="border-box";B.style.overflow="hidden";B.style.padding="4px";B.style.width="100%";var J=new CustomDialog(this.ui,y,mxUtils.bind(this,function(){e(c+"/"+l+"/"+encodeURIComponent(m)+"/"+t)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this,
-function(){z()})],[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(J.container,420,370,!0,!0);d&&J.okButton.parentNode.removeChild(J.okButton);var f=mxUtils.bind(this,function(G,F,U,p){var u=document.createElement("a");u.setAttribute("title",G);u.style.cursor="pointer";mxUtils.write(u,G);mxEvent.addListener(u,"click",F);
-p&&(u.style.textDecoration="underline");null!=U&&(G=B.cloneNode(),G.style.padding=U,G.appendChild(u),u=G);return u}),g=mxUtils.bind(this,function(G){var F=document.createElement("div");F.style.marginBottom="8px";F.appendChild(f(c+"/"+l,mxUtils.bind(this,function(){t=null;z()}),null,!0));G||(mxUtils.write(F," / "),F.appendChild(f(decodeURIComponent(m),mxUtils.bind(this,function(){t=null;E()}),null,!0)));if(null!=t&&0<t.length){var U=t.split("/");for(G=0;G<U.length;G++)(function(p){mxUtils.write(F,
-" / ");F.appendChild(f(U[p],mxUtils.bind(this,function(){t=U.slice(0,p+1).join("/");x()}),null,!0))})(G)}A.appendChild(F)}),k=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(t=m=l=c=null,z()):this.ui.hideDialog()}),null,{})}),n=null,v=null,x=mxUtils.bind(this,function(G){null==G&&(A.innerText="",G=1);var F=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/contents/"+t+"?ref="+encodeURIComponent(m)+"&per_page=100&page="+
-G,null,"GET");this.ui.spinner.spin(A,mxResources.get("loading"));J.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(A,"scroll",v),v=null);null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){x(G+1)});mxEvent.addListener(n,"click",U);this.executeRequest(F,mxUtils.bind(this,function(p){this.ui.spinner.stop();1==G&&(g(),
-A.appendChild(f("../ [Up]",mxUtils.bind(this,function(){if(""==t)t=null,z();else{var N=t.split("/");t=N.slice(0,N.length-1).join("/");x()}}),"4px")));var u=JSON.parse(p.getText());if(null==u||0==u.length)mxUtils.write(A,mxResources.get("noFiles"));else{var H=!0,K=0;p=mxUtils.bind(this,function(N){for(var I=0;I<u.length;I++)mxUtils.bind(this,function(L,Q){if(N==("dir"==L.type)){Q=B.cloneNode();Q.style.backgroundColor=H?Editor.isDarkMode()?"#000000":"#eeeeee":"";H=!H;var P=document.createElement("img");
-P.src=IMAGE_PATH+"/"+("dir"==L.type?"folder.png":"file.png");P.setAttribute("align","absmiddle");P.style.marginRight="4px";P.style.marginTop="-4px";P.width=20;Q.appendChild(P);Q.appendChild(f(L.name+("dir"==L.type?"/":""),mxUtils.bind(this,function(){"dir"==L.type?(t=L.path,x()):d&&"file"==L.type&&(this.ui.hideDialog(),e(c+"/"+l+"/"+encodeURIComponent(m)+"/"+L.path))})));A.appendChild(Q);K++}})(u[I],I)});p(!0);d&&p(!1)}}),k,!0)}),E=mxUtils.bind(this,function(G,F){null==G&&(A.innerText="",G=1);var U=
-new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/branches?per_page=100&page="+G,null,"GET");J.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(A,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(A,"scroll",v),v=null);null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("more")+"...");var p=mxUtils.bind(this,function(){E(G+1)});mxEvent.addListener(n,"click",
-p);this.executeRequest(U,mxUtils.bind(this,function(u){this.ui.spinner.stop();1==G&&(g(!0),A.appendChild(f("../ [Up]",mxUtils.bind(this,function(){t=null;z()}),"4px")));u=JSON.parse(u.getText());if(null==u||0==u.length)mxUtils.write(A,mxResources.get("noFiles"));else if(1==u.length&&F)m=u[0].name,t="",x();else{for(var H=0;H<u.length;H++)mxUtils.bind(this,function(K,N){var I=B.cloneNode();I.style.backgroundColor=0==N%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";I.appendChild(f(K.name,mxUtils.bind(this,
-function(){m=K.name;t="";x()})));A.appendChild(I)})(u[H],H);100==u.length&&(A.appendChild(n),v=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&p()},mxEvent.addListener(A,"scroll",v))}}),k)}),z=mxUtils.bind(this,function(G){null==G&&(A.innerText="",G=1);var F=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+G,null,"GET");J.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(A,mxResources.get("loading"));null!=v&&mxEvent.removeListener(A,"scroll",v);null!=n&&null!=
-n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){z(G+1)});mxEvent.addListener(n,"click",U);this.executeRequest(F,mxUtils.bind(this,function(p){this.ui.spinner.stop();p=JSON.parse(p.getText());if(null==p||0==p.length)mxUtils.write(A,mxResources.get("noFiles"));else{1==G&&(A.appendChild(f(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var H=
+GitHubFile.prototype.save=function(b,d,f,c,l,m){this.doSave(this.getTitle(),d,f,c,l,m)};GitHubFile.prototype.saveAs=function(b,d,f){this.doSave(b,d,f)};GitHubFile.prototype.doSave=function(b,d,f,c,l,m){var t=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=t;this.saveFile(b,!1,d,f,c,l,m)}),f,c,l])};
+GitHubFile.prototype.saveFile=function(b,d,f,c,l,m,t){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var y=mxUtils.bind(this,function(C){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var A=this.getCurrentEtag(),B=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(J){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,J);this.fileSaved(B,A,mxUtils.bind(this,function(){this.contentChanged();
+null!=f&&f()}),c)}),mxUtils.bind(this,function(J){this.savingFile=!1;this.isConflict(J)?(this.inConflictState=!0,null!=c&&c({commitMessage:C})):null!=c&&c(J)}),m,C)}catch(J){if(this.savingFile=!1,null!=c)c(J);else throw J;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(J){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(e){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
+f&&f();this.ui.fileLoaded(e)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,J,C)}))});null!=t?y(t):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(C){y(C)}),c)}else null!=f&&f()};GitHubLibrary=function(b,d,f){GitHubFile.call(this,b,d,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,d,f){this.saveFile(b,!1,d,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(d,f){DrawioClient.call(this,d,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/github2";
+GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(d){b=d};GitHubClient.prototype.updateUser=function(d,f,c){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),t=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),y=this.authToken+" "+b;t.setRequestHeaders=function(C,A){C.setRequestHeader("Authorization",y)};t.send(mxUtils.bind(this,function(){window.clearTimeout(m);
+l&&(401===t.getStatus()?c?f({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(d,f,!0)}),f)):200>t.getStatus()||300<=t.getStatus()?f({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(t.getText()))),d()))}),f)};GitHubClient.prototype.createUser=function(d){return new DrawioUser(d.id,d.email,d.name)};GitHubClient.prototype.authenticate=function(d,f){(new mxXmlRequest(this.redirectUri+"?getState=1",
+null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),d,f):null!=f&&f(c)}),f)};GitHubClient.prototype.authenticateStep2=function(d,f,c){if(null==window.onGitHubCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),null,"GET")).send(mxUtils.bind(this,function(t){200<=
+t.getStatus()&&299>=t.getStatus()?(b=JSON.parse(t.getText()).access_token,this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,401==t.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(t,y){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"ghauth")?window.onGitHubCallback=
+mxUtils.bind(this,function(C,A){m?(window.onGitHubCallback=null,m=!1,null==C?c({message:mxResources.get("accessDenied"),retry:l}):(null!=y&&y(),b=C.access_token,this.setUser(null),t&&this.setPersistentToken("remembered"),f(),null!=A&&A.close())):null!=A&&A.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitHubCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=
+function(d,f){try{var c=JSON.parse(d.getText());null!=c&&null!=c.message&&(f=c.message)}catch(l){}return f};GitHubClient.prototype.showAuthorizeDialog=function(d,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/blog/single-repository-diagrams")}),d,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")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(d,f,c,l,m){var t=mxUtils.bind(this,function(C){var A=!0,B=window.setTimeout(mxUtils.bind(this,function(){A=!1;c({code:App.ERROR_TIMEOUT,retry:y})}),this.ui.timeout),J=this.authToken+" "+b;d.setRequestHeaders=function(e,g){e.setRequestHeader("Authorization",J)};d.send(mxUtils.bind(this,function(){window.clearTimeout(B);var e=
+mxUtils.bind(this,function(){var q=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){q();y()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(A)if(200<=d.getStatus()&&299>=d.getStatus()||l&&404==d.getStatus())f(d);else if(401===d.getStatus())C?c({code:d.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){y(!0)},c)})}):this.authenticate(function(){t(!0)},c);else if(403===d.getStatus()){var g=
+!1;try{var k=JSON.parse(d.getText());null!=k&&"Resource not accessible by integration"==k.message?e():(null!=k&&null!=k.errors&&0<k.errors.length&&(g="too_large"==k.errors[0].code),c({message:mxResources.get(g?"drawingTooLarge":"forbidden")}))}catch(q){c({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}}else 404===d.getStatus()?m?c({code:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):e():409===d.getStatus()?c({code:d.getStatus(),status:409}):c({code:d.getStatus(),
+message:this.getErrorMessage(d,mxResources.get("error")+" "+d.getStatus())})}),mxUtils.bind(this,function(e){window.clearTimeout(B);A&&c(e)}))}),y=mxUtils.bind(this,function(C){null==this.user?this.updateUser(function(){y(!0)},c,C):t(C)});null==b?this.authenticate(function(){y(!0)},c):y(!1)};GitHubClient.prototype.getLibrary=function(d,f,c){this.getFile(d,f,c,!0)};GitHubClient.prototype.getSha=function(d,f,c,l,m,t,y){var C="&t="+(new Date).getTime();d=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+
+f+"/contents/"+c+"?ref="+l+C,null,"HEAD");this.executeRequest(d,mxUtils.bind(this,function(A){try{m(A.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(B){t(B)}}),t,null,y)};GitHubClient.prototype.getFile=function(d,f,c,l,m){l=null!=l?l:!1;var t=d.split("/"),y=t[0],C=t[1],A=t[2];d=t.slice(3,t.length).join("/");t=/\.png$/i.test(d);if(!m&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&t))if(null!=b){m=this.baseUrl+"/repos/"+y+"/"+C+"/contents/"+
+d+"?ref="+A;var B={Authorization:"token "+b};t=d.split("/");this.ui.convertFile(m,0<t.length?t[t.length-1]:d,null,this.extension,f,c,null,B)}else c({message:mxResources.get("accessDenied")});else t="&t="+(new Date).getTime(),d=new mxXmlRequest(this.baseUrl+"/repos/"+y+"/"+C+"/contents/"+d+"?ref="+A+t,null,"GET"),this.executeRequest(d,mxUtils.bind(this,function(J){try{f(this.createGitHubFile(y,C,A,JSON.parse(J.getText()),l))}catch(e){c(e)}}),c)};GitHubClient.prototype.createGitHubFile=function(d,f,
+c,l,m){d={org:d,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;"base64"===l.encoding&&(/\.jpe?g$/i.test(l.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(l.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(l.name)?(l=this.ui.extractGraphModelFromPng(f),f=null!=l&&0<l.length?l:"data:image/png;base64,"+f):f=Base64.decode(f));return m?new GitHubLibrary(this.ui,f,d):new GitHubFile(this.ui,f,d)};GitHubClient.prototype.insertLibrary=function(d,
+f,c,l,m){this.insertFile(d,f,c,l,!0,m,!1)};GitHubClient.prototype.insertFile=function(d,f,c,l,m,t,y){m=null!=m?m:!1;t=t.split("/");var C=t[0],A=t[1],B=t[2],J=t.slice(3,t.length).join("/");0<J.length&&(J+="/");J+=d;this.checkExists(C+"/"+A+"/"+B+"/"+J,!0,mxUtils.bind(this,function(e,g){e?m?(y||(f=Base64.encode(f)),this.showCommitDialog(d,!0,mxUtils.bind(this,function(k){this.writeFile(C,A,B,J,k,f,g,mxUtils.bind(this,function(q){try{var u=JSON.parse(q.getText());c(this.createGitHubFile(C,A,B,u.content,
+m))}catch(x){l(x)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:C,repo:A,ref:B,name:d,path:J,sha:g,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=function(d,f,c,l){var m=this.ui.spinner.pause();d=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[d]),mxResources.get("ok"),mxUtils.bind(this,function(t){m();c(t)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}),null,280);this.ui.showDialog(d.container,400,80,!0,!1);d.init()};GitHubClient.prototype.writeFile=
+function(d,f,c,l,m,t,y,C,A){t.length>=this.maxFileSize?A({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(t.length)+" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:m,content:t},null!=y&&(c.sha=y),d=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(d,mxUtils.bind(this,function(B){C(B)}),mxUtils.bind(this,function(B){404==B.code&&(B.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,
+B.code=null);A(B)})))};GitHubClient.prototype.checkExists=function(d,f,c){var l=d.split("/"),m=l[0],t=l[1],y=l[2];d=l.slice(3,l.length).join("/");this.getSha(m,t,d,y,mxUtils.bind(this,function(C){if(f){var A=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[d]),function(){A();c(!0,C)},function(){A();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(C){c(!0)}),
+!0)};GitHubClient.prototype.saveFile=function(d,f,c,l,m){var t=d.meta.org,y=d.meta.repo,C=d.meta.ref,A=d.meta.path,B=mxUtils.bind(this,function(e,g){this.writeFile(t,y,C,A,m,g,e,mxUtils.bind(this,function(k){delete d.meta.isNew;f(JSON.parse(k.getText()).content.sha)}),mxUtils.bind(this,function(k){c(k)}))}),J=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(A)){var e=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){B(d.meta.sha,
+g)}),c,this.ui.getCurrentFile()!=d?d.getData():null,e.scale,e.border)}else B(d.meta.sha,Base64.encode(d.getData()))});l?this.getSha(t,y,A,C,mxUtils.bind(this,function(e){d.meta.sha=e;J()}),c):J()};GitHubClient.prototype.pickLibrary=function(d){this.pickFile(d)};GitHubClient.prototype.pickFolder=function(d){this.showGitHubDialog(!1,d)};GitHubClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,d)};GitHubClient.prototype.showGitHubDialog=
+function(d,f){var c=null,l=null,m=null,t=null,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.height="304px";var C=document.createElement("h3");mxUtils.write(C,mxResources.get(d?"selectFile":"selectFolder"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(C);var A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.border="1px solid lightgray";A.style.boxSizing="border-box";A.style.padding="4px";
+A.style.overflow="auto";A.style.lineHeight="1.2em";A.style.height="274px";y.appendChild(A);var B=document.createElement("div");B.style.textOverflow="ellipsis";B.style.boxSizing="border-box";B.style.overflow="hidden";B.style.padding="4px";B.style.width="100%";var J=new CustomDialog(this.ui,y,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+t)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this,
+function(){z()})],[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(J.container,420,370,!0,!0);d&&J.okButton.parentNode.removeChild(J.okButton);var e=mxUtils.bind(this,function(G,F,U,p){var v=document.createElement("a");v.setAttribute("title",G);v.style.cursor="pointer";mxUtils.write(v,G);mxEvent.addListener(v,"click",F);
+p&&(v.style.textDecoration="underline");null!=U&&(G=B.cloneNode(),G.style.padding=U,G.appendChild(v),v=G);return v}),g=mxUtils.bind(this,function(G){var F=document.createElement("div");F.style.marginBottom="8px";F.appendChild(e(c+"/"+l,mxUtils.bind(this,function(){t=null;z()}),null,!0));G||(mxUtils.write(F," / "),F.appendChild(e(decodeURIComponent(m),mxUtils.bind(this,function(){t=null;E()}),null,!0)));if(null!=t&&0<t.length){var U=t.split("/");for(G=0;G<U.length;G++)(function(p){mxUtils.write(F,
+" / ");F.appendChild(e(U[p],mxUtils.bind(this,function(){t=U.slice(0,p+1).join("/");x()}),null,!0))})(G)}A.appendChild(F)}),k=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(t=m=l=c=null,z()):this.ui.hideDialog()}),null,{})}),q=null,u=null,x=mxUtils.bind(this,function(G){null==G&&(A.innerText="",G=1);var F=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/contents/"+t+"?ref="+encodeURIComponent(m)+"&per_page=100&page="+
+G,null,"GET");this.ui.spinner.spin(A,mxResources.get("loading"));J.okButton.removeAttribute("disabled");null!=u&&(mxEvent.removeListener(A,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){x(G+1)});mxEvent.addListener(q,"click",U);this.executeRequest(F,mxUtils.bind(this,function(p){this.ui.spinner.stop();1==G&&(g(),
+A.appendChild(e("../ [Up]",mxUtils.bind(this,function(){if(""==t)t=null,z();else{var N=t.split("/");t=N.slice(0,N.length-1).join("/");x()}}),"4px")));var v=JSON.parse(p.getText());if(null==v||0==v.length)mxUtils.write(A,mxResources.get("noFiles"));else{var H=!0,K=0;p=mxUtils.bind(this,function(N){for(var I=0;I<v.length;I++)mxUtils.bind(this,function(L,Q){if(N==("dir"==L.type)){Q=B.cloneNode();Q.style.backgroundColor=H?Editor.isDarkMode()?"#000000":"#eeeeee":"";H=!H;var P=document.createElement("img");
+P.src=IMAGE_PATH+"/"+("dir"==L.type?"folder.png":"file.png");P.setAttribute("align","absmiddle");P.style.marginRight="4px";P.style.marginTop="-4px";P.width=20;Q.appendChild(P);Q.appendChild(e(L.name+("dir"==L.type?"/":""),mxUtils.bind(this,function(){"dir"==L.type?(t=L.path,x()):d&&"file"==L.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+L.path))})));A.appendChild(Q);K++}})(v[I],I)});p(!0);d&&p(!1)}}),k,!0)}),E=mxUtils.bind(this,function(G,F){null==G&&(A.innerText="",G=1);var U=
+new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+l+"/branches?per_page=100&page="+G,null,"GET");J.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(A,mxResources.get("loading"));null!=u&&(mxEvent.removeListener(A,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var p=mxUtils.bind(this,function(){E(G+1)});mxEvent.addListener(q,"click",
+p);this.executeRequest(U,mxUtils.bind(this,function(v){this.ui.spinner.stop();1==G&&(g(!0),A.appendChild(e("../ [Up]",mxUtils.bind(this,function(){t=null;z()}),"4px")));v=JSON.parse(v.getText());if(null==v||0==v.length)mxUtils.write(A,mxResources.get("noFiles"));else if(1==v.length&&F)m=v[0].name,t="",x();else{for(var H=0;H<v.length;H++)mxUtils.bind(this,function(K,N){var I=B.cloneNode();I.style.backgroundColor=0==N%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";I.appendChild(e(K.name,mxUtils.bind(this,
+function(){m=K.name;t="";x()})));A.appendChild(I)})(v[H],H);100==v.length&&(A.appendChild(q),u=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&p()},mxEvent.addListener(A,"scroll",u))}}),k)}),z=mxUtils.bind(this,function(G){null==G&&(A.innerText="",G=1);var F=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+G,null,"GET");J.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(A,mxResources.get("loading"));null!=u&&mxEvent.removeListener(A,"scroll",u);null!=q&&null!=
+q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){z(G+1)});mxEvent.addListener(q,"click",U);this.executeRequest(F,mxUtils.bind(this,function(p){this.ui.spinner.stop();p=JSON.parse(p.getText());if(null==p||0==p.length)mxUtils.write(A,mxResources.get("noFiles"));else{1==G&&(A.appendChild(e(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var H=
new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(K){if(null!=K){var N=K.split("/");if(1<N.length){K=N[0];var I=N[1];3>N.length?(c=K,l=I,t=m=null,E()):this.ui.spinner.spin(A,mxResources.get("loading"))&&(N=encodeURIComponent(N.slice(2,N.length).join("/")),this.getFile(K+"/"+I+"/"+N,mxUtils.bind(this,function(L){this.ui.spinner.stop();c=L.meta.org;l=L.meta.repo;m=decodeURIComponent(L.meta.ref);t="";x()}),mxUtils.bind(this,function(L){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(A),mxUtils.br(A));for(var u=0;u<p.length;u++)mxUtils.bind(this,function(H,K){var N=B.cloneNode();N.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";N.appendChild(f(H.full_name,mxUtils.bind(this,function(){c=H.owner.login;
-l=H.name;t="";E(null,!0)})));A.appendChild(N)})(p[u],u)}100==p.length&&(A.appendChild(n),v=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&U()},mxEvent.addListener(A,"scroll",v))}),k)});z()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,d,e){DrawioFile.call(this,b,d);this.meta=e;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,d,e){this.doSave(this.getTitle(),d,e)};TrelloFile.prototype.saveAs=function(b,d,e){this.doSave(b,d,e)};TrelloFile.prototype.doSave=function(b,d,e){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,d,e)}),e])};
-TrelloFile.prototype.saveFile=function(b,d,e,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(l){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=l;this.contentChanged();null!=e&&e();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,d,e,c))}),mxUtils.bind(this,
-function(l){this.savingFile=!1;null!=c&&c(l)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(l){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(m){this.savingFile=!1;null!=e&&e();this.ui.fileLoaded(m);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,d,e,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,l)}))):null!=e&&e()};TrelloLibrary=function(b,d,e){TrelloFile.call(this,b,d,e)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,d,e){this.saveFile(b,!1,d,e)};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";
-TrelloClient.prototype.authenticate=function(b,d,e){e&&this.logout();e=mxUtils.bind(this,function(c,l){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=l&&l();b()},error:function(){null!=l&&l();null!=d&&d(mxResources.get("loggedOut"))}})});this.isAuthorized()?e(!0):this.ui.showAuthDialog(this,!0,e)};TrelloClient.prototype.getLibrary=function(b,d,e){this.getFile(b,d,e,!1,!0)};
-TrelloClient.prototype.getFile=function(b,d,e,c,l){l=null!=l?l:!1;var m=mxUtils.bind(this,function(){var t=b.split(this.SEPARATOR),y=!0,C=window.setTimeout(mxUtils.bind(this,function(){y=!1;e({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);Trello.cards.get(t[0]+"/attachments/"+t[1],mxUtils.bind(this,function(A){window.clearTimeout(C);if(y){var B=/\.png$/i.test(A.name),J={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(A.name)||
-/\.gliffy$/i.test(A.name)||!this.ui.useCanvasForExport&&B?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(A.url),A.name,A.mimeType,this.extension,d,e,null,J):(y=!0,C=window.setTimeout(mxUtils.bind(this,function(){y=!1;e({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(A.url),mxUtils.bind(this,function(f){window.clearTimeout(C);if(y){A.compoundId=b;if(0<(B?f.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(f);null!=g&&0<g.length&&
-(f=g)}l?d(new TrelloLibrary(this.ui,f,A)):d(new TrelloFile(this.ui,f,A))}}),mxUtils.bind(this,function(f,g){window.clearTimeout(C);y&&(401==g.status?this.authenticate(m,e,!0):e())}),B||null!=A.mimeType&&"image/"==A.mimeType.substring(0,6),null,null,null,J))}}),mxUtils.bind(this,function(A){window.clearTimeout(C);y&&(null!=A&&401==A.status?this.authenticate(m,e,!0):e())}))});this.authenticate(m,e)};TrelloClient.prototype.insertLibrary=function(b,d,e,c,l){this.insertFile(b,d,e,c,!0,l)};
-TrelloClient.prototype.insertFile=function(b,d,e,c,l,m){l=null!=l?l:!1;var t=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(C){this.writeFile(b,C,m,mxUtils.bind(this,function(A){l?e(new TrelloLibrary(this.ui,d,A)):e(new TrelloFile(this.ui,d,A))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(C){y(this.ui.base64ToBlob(C,"image/png"))}),c,d):y(d)});this.authenticate(t,c)};
-TrelloClient.prototype.saveFile=function(b,d,e){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(t){this.writeFile(b.meta.name,t,c[0],function(y){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){d(y)}),mxUtils.bind(this,function(C){null!=C&&401==C.status?this.authenticate(m,e,!0):e()}))},e)}),m=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(t){l(this.ui.base64ToBlob(t,
-"image/png"))}),e,this.ui.getCurrentFile()!=b?b.getData():null):l(b.getData())});this.authenticate(m,e)};
-TrelloClient.prototype.writeFile=function(b,d,e,c,l){if(null!=b&&null!=d)if(d.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 10 MB)"});else{var m=mxUtils.bind(this,function(){var t=!0,y=window.setTimeout(mxUtils.bind(this,function(){t=!1;l({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),C=new FormData;C.append("key",Trello.key());C.append("token",Trello.token());C.append("file","string"===typeof d?new Blob([d]):d,b);C.append("name",
-b);var A=new XMLHttpRequest;A.responseType="json";A.onreadystatechange=mxUtils.bind(this,function(){if(4===A.readyState&&(window.clearTimeout(y),t))if(200==A.status){var B=A.response;B.compoundId=e+this.SEPARATOR+B.id;c(B)}else 401==A.status?this.authenticate(m,l,!0):l()});A.open("POST",this.baseUrl+"cards/"+e+"/attachments");A.send(C)});this.authenticate(m,l)}else l({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(d){this.ui.showError(mxResources.get("error"),d)}))};TrelloClient.prototype.pickFile=function(b,d){b=null!=b?b:mxUtils.bind(this,function(e){this.ui.loadFile("T"+encodeURIComponent(e))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(b,d){var e=null,c="@me",l=0,m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.height="224px";var t=document.createElement("h3");mxUtils.write(t,b?mxResources.get("selectFile"):mxResources.get("selectCard"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(t);var y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="auto";y.style.height=
-"194px";m.appendChild(y);m=new CustomDialog(this.ui,m);this.ui.showDialog(m.container,340,290,!0,!0);m.okButton.parentNode.removeChild(m.okButton);var C=mxUtils.bind(this,function(k,n,v){l++;var x=document.createElement("div");x.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var E=document.createElement("a");E.style.cursor="pointer";if(null!=v){var z=document.createElement("img");
-z.src=v.url;z.width=v.width;z.height=v.height;z.style="border: 1px solid black;margin:5px;vertical-align:middle";E.appendChild(z)}mxUtils.write(E,k);mxEvent.addListener(E,"click",n);x.appendChild(E);return x}),A=mxUtils.bind(this,function(k){this.ui.handleError(k,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),B=mxUtils.bind(this,function(){l=0;y.innerText="";this.ui.spinner.spin(y,mxResources.get("loading"));var k=mxUtils.bind(this,function(){Trello.cards.get(e+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(n){this.ui.spinner.stop();y.appendChild(C("../ [Up]",mxUtils.bind(this,function(){g()})));mxUtils.br(y);null==n||0==n.length?mxUtils.write(y,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var v=0;v<n.length;v++)mxUtils.bind(this,function(x){y.appendChild(C(x.name,mxUtils.bind(this,function(){this.ui.hideDialog();d(e+this.SEPARATOR+x.id)}),null!=x.previews?x.previews[0]:null))})(n[v])})()}),mxUtils.bind(this,function(n){401==
-n.status?this.authenticate(k,A,!0):null!=A&&A(n)}))});k()}),J=null,f=null,g=mxUtils.bind(this,function(k){null==k&&(l=0,y.innerText="",k=1);this.ui.spinner.spin(y,mxResources.get("loading"));null!=J&&null!=J.parentNode&&J.parentNode.removeChild(J);J=document.createElement("a");J.style.display="block";J.style.cursor="pointer";mxUtils.write(J,mxResources.get("more")+"...");var n=mxUtils.bind(this,function(){mxEvent.removeListener(y,"scroll",f);g(k+1)});mxEvent.addListener(J,"click",n);var v=mxUtils.bind(this,
+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(A),mxUtils.br(A));for(var v=0;v<p.length;v++)mxUtils.bind(this,function(H,K){var N=B.cloneNode();N.style.backgroundColor=0==K%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";N.appendChild(e(H.full_name,mxUtils.bind(this,function(){c=H.owner.login;
+l=H.name;t="";E(null,!0)})));A.appendChild(N)})(p[v],v)}100==p.length&&(A.appendChild(q),u=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&U()},mxEvent.addListener(A,"scroll",u))}),k)});z()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,d,f){DrawioFile.call(this,b,d);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,d,f){this.doSave(this.getTitle(),d,f)};TrelloFile.prototype.saveAs=function(b,d,f){this.doSave(b,d,f)};TrelloFile.prototype.doSave=function(b,d,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,d,f)}),f])};
+TrelloFile.prototype.saveFile=function(b,d,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(l){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=l;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,d,f,c))}),mxUtils.bind(this,
+function(l){this.savingFile=!1;null!=c&&c(l)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(l){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(m){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(m);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,d,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,l)}))):null!=f&&f()};TrelloLibrary=function(b,d,f){TrelloFile.call(this,b,d,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,d,f){this.saveFile(b,!1,d,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";
+TrelloClient.prototype.authenticate=function(b,d,f){f&&this.logout();f=mxUtils.bind(this,function(c,l){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=l&&l();b()},error:function(){null!=l&&l();null!=d&&d(mxResources.get("loggedOut"))}})});this.isAuthorized()?f(!0):this.ui.showAuthDialog(this,!0,f)};TrelloClient.prototype.getLibrary=function(b,d,f){this.getFile(b,d,f,!1,!0)};
+TrelloClient.prototype.getFile=function(b,d,f,c,l){l=null!=l?l:!1;var m=mxUtils.bind(this,function(){var t=b.split(this.SEPARATOR),y=!0,C=window.setTimeout(mxUtils.bind(this,function(){y=!1;f({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);Trello.cards.get(t[0]+"/attachments/"+t[1],mxUtils.bind(this,function(A){window.clearTimeout(C);if(y){var B=/\.png$/i.test(A.name),J={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(A.name)||
+/\.gliffy$/i.test(A.name)||!this.ui.useCanvasForExport&&B?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(A.url),A.name,A.mimeType,this.extension,d,f,null,J):(y=!0,C=window.setTimeout(mxUtils.bind(this,function(){y=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(A.url),mxUtils.bind(this,function(e){window.clearTimeout(C);if(y){A.compoundId=b;if(0<(B?e.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(e);null!=g&&0<g.length&&
+(e=g)}l?d(new TrelloLibrary(this.ui,e,A)):d(new TrelloFile(this.ui,e,A))}}),mxUtils.bind(this,function(e,g){window.clearTimeout(C);y&&(401==g.status?this.authenticate(m,f,!0):f())}),B||null!=A.mimeType&&"image/"==A.mimeType.substring(0,6),null,null,null,J))}}),mxUtils.bind(this,function(A){window.clearTimeout(C);y&&(null!=A&&401==A.status?this.authenticate(m,f,!0):f())}))});this.authenticate(m,f)};TrelloClient.prototype.insertLibrary=function(b,d,f,c,l){this.insertFile(b,d,f,c,!0,l)};
+TrelloClient.prototype.insertFile=function(b,d,f,c,l,m){l=null!=l?l:!1;var t=mxUtils.bind(this,function(){var y=mxUtils.bind(this,function(C){this.writeFile(b,C,m,mxUtils.bind(this,function(A){l?f(new TrelloLibrary(this.ui,d,A)):f(new TrelloFile(this.ui,d,A))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(C){y(this.ui.base64ToBlob(C,"image/png"))}),c,d):y(d)});this.authenticate(t,c)};
+TrelloClient.prototype.saveFile=function(b,d,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(t){this.writeFile(b.meta.name,t,c[0],function(y){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){d(y)}),mxUtils.bind(this,function(C){null!=C&&401==C.status?this.authenticate(m,f,!0):f()}))},f)}),m=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(t){l(this.ui.base64ToBlob(t,
+"image/png"))}),f,this.ui.getCurrentFile()!=b?b.getData():null):l(b.getData())});this.authenticate(m,f)};
+TrelloClient.prototype.writeFile=function(b,d,f,c,l){if(null!=b&&null!=d)if(d.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 10 MB)"});else{var m=mxUtils.bind(this,function(){var t=!0,y=window.setTimeout(mxUtils.bind(this,function(){t=!1;l({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),C=new FormData;C.append("key",Trello.key());C.append("token",Trello.token());C.append("file","string"===typeof d?new Blob([d]):d,b);C.append("name",
+b);var A=new XMLHttpRequest;A.responseType="json";A.onreadystatechange=mxUtils.bind(this,function(){if(4===A.readyState&&(window.clearTimeout(y),t))if(200==A.status){var B=A.response;B.compoundId=f+this.SEPARATOR+B.id;c(B)}else 401==A.status?this.authenticate(m,l,!0):l()});A.open("POST",this.baseUrl+"cards/"+f+"/attachments");A.send(C)});this.authenticate(m,l)}else l({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(d){this.ui.showError(mxResources.get("error"),d)}))};TrelloClient.prototype.pickFile=function(b,d){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,d){var f=null,c="@me",l=0,m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="hidden";m.style.height="224px";var t=document.createElement("h3");mxUtils.write(t,b?mxResources.get("selectFile"):mxResources.get("selectCard"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(t);var y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="auto";y.style.height=
+"194px";m.appendChild(y);m=new CustomDialog(this.ui,m);this.ui.showDialog(m.container,340,290,!0,!0);m.okButton.parentNode.removeChild(m.okButton);var C=mxUtils.bind(this,function(k,q,u){l++;var x=document.createElement("div");x.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var E=document.createElement("a");E.style.cursor="pointer";if(null!=u){var z=document.createElement("img");
+z.src=u.url;z.width=u.width;z.height=u.height;z.style="border: 1px solid black;margin:5px;vertical-align:middle";E.appendChild(z)}mxUtils.write(E,k);mxEvent.addListener(E,"click",q);x.appendChild(E);return x}),A=mxUtils.bind(this,function(k){this.ui.handleError(k,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),B=mxUtils.bind(this,function(){l=0;y.innerText="";this.ui.spinner.spin(y,mxResources.get("loading"));var k=mxUtils.bind(this,function(){Trello.cards.get(f+
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(q){this.ui.spinner.stop();y.appendChild(C("../ [Up]",mxUtils.bind(this,function(){g()})));mxUtils.br(y);null==q||0==q.length?mxUtils.write(y,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var u=0;u<q.length;u++)mxUtils.bind(this,function(x){y.appendChild(C(x.name,mxUtils.bind(this,function(){this.ui.hideDialog();d(f+this.SEPARATOR+x.id)}),null!=x.previews?x.previews[0]:null))})(q[u])})()}),mxUtils.bind(this,function(q){401==
+q.status?this.authenticate(k,A,!0):null!=A&&A(q)}))});k()}),J=null,e=null,g=mxUtils.bind(this,function(k){null==k&&(l=0,y.innerText="",k=1);this.ui.spinner.spin(y,mxResources.get("loading"));null!=J&&null!=J.parentNode&&J.parentNode.removeChild(J);J=document.createElement("a");J.style.display="block";J.style.cursor="pointer";mxUtils.write(J,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){mxEvent.removeListener(y,"scroll",e);g(k+1)});mxEvent.addListener(J,"click",q);var u=mxUtils.bind(this,
function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:k-1},mxUtils.bind(this,function(x){this.ui.spinner.stop();x=null!=x?x.cards:null;if(null==x||0==x.length)mxUtils.write(y,mxResources.get("noFiles"));else{1==k&&(y.appendChild(C(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var z=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(G){null!=G&&(c=G,g())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(z.container,300,80,!0,!1);z.init()}))),mxUtils.br(y));for(var E=0;E<x.length;E++)mxUtils.bind(this,function(z){y.appendChild(C(z.name,mxUtils.bind(this,function(){b?(e=z.id,B()):(this.ui.hideDialog(),d(z.id))})))})(x[E]);100==x.length&&(y.appendChild(J),f=function(){y.scrollTop>=y.scrollHeight-y.offsetHeight&&n()},mxEvent.addListener(y,"scroll",f))}}),mxUtils.bind(this,function(x){401==x.status?this.authenticate(v,A,!0):null!=A&&A({message:x.responseText})}))});v()});g()};
-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,d,e){GitHubFile.call(this,b,d,e);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")};
+this.ui.showDialog(z.container,300,80,!0,!1);z.init()}))),mxUtils.br(y));for(var E=0;E<x.length;E++)mxUtils.bind(this,function(z){y.appendChild(C(z.name,mxUtils.bind(this,function(){b?(f=z.id,B()):(this.ui.hideDialog(),d(z.id))})))})(x[E]);100==x.length&&(y.appendChild(J),e=function(){y.scrollTop>=y.scrollHeight-y.offsetHeight&&q()},mxEvent.addListener(y,"scroll",e))}}),mxUtils.bind(this,function(x){401==x.status?this.authenticate(u,A,!0):null!=A&&A({message:x.responseText})}))});u()});g()};
+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,d,f){GitHubFile.call(this,b,d,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,d){b.last_commit_id=d};GitLabLibrary=function(b,d,e){GitLabFile.call(this,b,d,e)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,d,e){this.saveFile(b,!1,d,e)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(d){GitHubClient.call(this,d,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate=
-function(d,e){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),d,e):null!=e&&e(c)}),e)};GitLabClient.prototype.authenticateStep2=function(d,e,c){if(null==window.onGitLabCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+
-d),null,"GET")).send(mxUtils.bind(this,function(t){200<=t.getStatus()&&299>=t.getStatus()?(b=JSON.parse(t.getText()).access_token,this.setToken(b),this.setUser(null),e()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==t.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(t,y){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+
-encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(C,A){m?(window.onGitLabCallback=null,m=!1,null==C?c({message:mxResources.get("accessDenied"),retry:l}):(null!=y&&y(),b=C.access_token,this.setToken(b),this.setUser(null),t&&this.setPersistentToken("remembered"),e(),null!=A&&A.close())):null!=A&&A.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),
-retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitLabCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(d,e,c,l){var m=mxUtils.bind(this,function(y){var C=!0,A=window.setTimeout(mxUtils.bind(this,function(){C=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),B=this.authToken+" "+b;d.setRequestHeaders=function(J,f){J.setRequestHeader("Authorization",
-B);J.setRequestHeader("PRIVATE_TOKEN",B);J.setRequestHeader("Content-Type","application/json")};d.send(mxUtils.bind(this,function(){window.clearTimeout(A);if(C)if(200<=d.getStatus()&&299>=d.getStatus()||l&&404==d.getStatus())e(d);else if(401===d.getStatus())y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){t(!0)},c)})}):this.authenticate(function(){m(!0)},c);else if(403===d.getStatus()){var J=!1;try{var f=JSON.parse(d.getText());null!=f&&
-null!=f.errors&&0<f.errors.length&&(J="too_large"==f.errors[0].code)}catch(g){}c({message:mxResources.get(J?"drawingTooLarge":"forbidden")})}else 404===d.getStatus()?c({message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):400===d.getStatus()?c({status:400}):c({status:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("error")+" "+d.getStatus())})}),mxUtils.bind(this,function(J){window.clearTimeout(A);C&&c(J)}))}),t=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){t(!0)},
-c,y):m(y)});null==b?this.authenticate(function(){t(!0)},c):t(!1)};GitLabClient.prototype.getRefIndex=function(d,e,c,l,m,t){if(null!=m)c(d,m);else{var y=d.length-2,C=mxUtils.bind(this,function(){if(2>y)l({message:mxResources.get("fileNotFound")});else{var A=Math.max(y-1,0),B=d.slice(0,A).join("/");A=d[A];var J=d[y],f=d.slice(y+1,d.length).join("/");B=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+A)+"/repository/"+(e?t?"branches?per_page=1&page=1&ref="+J:"tree?path="+f+"&ref="+J:"files/"+encodeURIComponent(f)+
-"?ref="+J);var g=new mxXmlRequest(B,null,"HEAD");this.executeRequest(g,mxUtils.bind(this,function(){200==g.getStatus()?c(d,y):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==g.getStatus()?(y--,C()):l({message:mxResources.get("fileNotFound")})}))}});C()}};GitLabClient.prototype.getFile=function(d,e,c,l,m,t){l=null!=l?l:!1;this.getRefIndex(d.split("/"),!1,mxUtils.bind(this,function(y,C){var A=Math.max(C-1,0),B=y.slice(0,A).join("/"),J=y[A],f=y[C];d=y.slice(C+1,y.length).join("/");
-y=/\.png$/i.test(d);if(!m&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&y))if(null!=b){A="&t="+(new Date).getTime();var g=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+J)+"/repository/files/"+encodeURIComponent(d)+"?ref="+f;y=d.split("/");this.ui.convertFile(g+A,0<y.length?y[y.length-1]:d,null,this.extension,e,c,mxUtils.bind(this,function(k,n,v){k=new mxXmlRequest(k,null,"GET");this.executeRequest(k,mxUtils.bind(this,function(x){try{n(this.getFileContent(JSON.parse(x.getText())))}catch(E){v(E)}}),
-v)}))}else c({message:mxResources.get("accessDenied")});else A="&t="+(new Date).getTime(),g=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+J)+"/repository/files/"+encodeURIComponent(d)+"?ref="+f,y=new mxXmlRequest(g+A,null,"GET"),this.executeRequest(y,mxUtils.bind(this,function(k){try{e(this.createGitLabFile(B,J,f,JSON.parse(k.getText()),l,C))}catch(n){c(n)}}),c)}),c,t)};GitLabClient.prototype.getFileContent=function(d){var e=d.file_name,c=d.content;"base64"===d.encoding&&(/\.jpe?g$/i.test(e)?
-c="data:image/jpeg;base64,"+c:/\.gif$/i.test(e)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(e)?c="data:application/pdf;base64,"+c:/\.png$/i.test(e)?(d=this.ui.extractGraphModelFromPng(c),c=null!=d&&0<d.length?d:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(d,e,c,l,m,t){var y=DRAWIO_GITLAB_URL+"/";d={org:d,repo:e,ref:c,name:l.file_name,path:l.file_path,html_url:y+d+"/"+e+"/blob/"+c+"/"+l.file_path,download_url:y+d+"/"+e+"/raw/"+c+"/"+l.file_path+
-"?inline=false",last_commit_id:l.last_commit_id,refPos:t};l=this.getFileContent(l);return m?new GitLabLibrary(this.ui,l,d):new GitLabFile(this.ui,l,d)};GitLabClient.prototype.insertFile=function(d,e,c,l,m,t,y){m=null!=m?m:!1;t=t.split("/");this.getRefIndex(t,!0,mxUtils.bind(this,function(C,A){var B=Math.max(A-1,0),J=C.slice(0,B).join("/"),f=C[B],g=C[A];path=C.slice(A+1,C.length).join("/");0<path.length&&(path+="/");path+=d;this.checkExists(J+"/"+f+"/"+g+"/"+path,!0,mxUtils.bind(this,function(k,n){k?
-m?(y||(e=Base64.encode(e)),this.showCommitDialog(d,!0,mxUtils.bind(this,function(v){this.writeFile(J,f,g,path,v,e,n,mxUtils.bind(this,function(x){try{var E=JSON.parse(x.getText());c(this.createGitLabFile(J,f,g,null!=E.content?E.content:E,m,A))}catch(z){l(z)}}),l)}),l)):(k=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,e,{org:J,repo:f,ref:g,name:d,path:path,html_url:k+J+"/"+f+"/blob/"+g+"/"+path,download_url:k+J+"/"+f+"/raw/"+g+"/"+path+"?inline=false",refPos:A,last_commit_id:n,isNew:!0}))):l()}))}),
-l,null,4>=t.length)};GitLabClient.prototype.checkExists=function(d,e,c){this.getFile(d,mxUtils.bind(this,function(l){if(e){var m=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[d]),function(){m();c(!0,l.getCurrentEtag())},function(){m();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(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(d,
-e,c,l,m,t,y,C,A){if(t.length>=this.maxFileSize)A({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(t.length)+" / 10 MB)"});else{var B="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:m,content:t,encoding:"base64"};null!=y&&(c.last_commit_id=y,B="PUT");d=this.baseUrl+"/projects/"+encodeURIComponent(d+"/"+e)+"/repository/files/"+encodeURIComponent(l);B=new mxXmlRequest(d,JSON.stringify(c),B);this.executeRequest(B,mxUtils.bind(this,function(J){C(J)}),
-A)}};GitLabClient.prototype.saveFile=function(d,e,c,l,m){var t=d.meta.org,y=d.meta.repo,C=d.meta.ref,A=d.meta.path,B=mxUtils.bind(this,function(f,g){this.writeFile(t,y,C,A,m,g,f,mxUtils.bind(this,function(k){delete d.meta.isNew;this.getFile(t+"/"+y+"/"+C+"/"+A,mxUtils.bind(this,function(n){n.getData()==d.getData()?e(n.getCurrentEtag()):e({content:d.getCurrentEtag()})}),c,null,null,d.meta.refPos)}),c)}),J=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(A)){var f=this.ui.getPngFileProperties(this.ui.fileNode);
-this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){B(d.meta.last_commit_id,g)}),c,this.ui.getCurrentFile()!=d?d.getData():null,f.scale,f.border)}else B(d.meta.last_commit_id,Base64.encode(d.getData()))});l?this.getFile(t+"/"+y+"/"+C+"/"+A,mxUtils.bind(this,function(f){d.meta.last_commit_id=f.meta.last_commit_id;J()}),c):J()};GitLabClient.prototype.pickFolder=function(d){this.showGitLabDialog(!1,d)};GitLabClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(e){this.ui.loadFile("A"+
-encodeURIComponent(e))});this.showGitLabDialog(!0,d)};GitLabClient.prototype.showGitLabDialog=function(d,e){var c=null,l=null,m=null,t=null,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.height="304px";var C=document.createElement("h3");mxUtils.write(C,mxResources.get(d?"selectFile":"selectFolder"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(C);var A=document.createElement("div");A.style.whiteSpace=
-"nowrap";A.style.border="1px solid lightgray";A.style.boxSizing="border-box";A.style.padding="4px";A.style.overflow="auto";A.style.lineHeight="1.2em";A.style.height="274px";y.appendChild(A);var B=document.createElement("div");B.style.textOverflow="ellipsis";B.style.boxSizing="border-box";B.style.overflow="hidden";B.style.padding="4px";B.style.width="100%";var J=new CustomDialog(this.ui,y,mxUtils.bind(this,function(){e(c+"/"+l+"/"+encodeURIComponent(m)+"/"+t)}));this.ui.showDialog(J.container,420,
-370,!0,!0);d&&J.okButton.parentNode.removeChild(J.okButton);var f=mxUtils.bind(this,function(G,F,U,p){var u=document.createElement("a");u.setAttribute("title",G);u.style.cursor="pointer";mxUtils.write(u,G);mxEvent.addListener(u,"click",F);p&&(u.style.textDecoration="underline");null!=U&&(G=B.cloneNode(),G.style.padding=U,G.appendChild(u),u=G);return u}),g=mxUtils.bind(this,function(G){var F=document.createElement("div");F.style.marginBottom="8px";F.appendChild(f(c+"/"+l,mxUtils.bind(this,function(){t=
-null;z()}),null,!0));G||(mxUtils.write(F," / "),F.appendChild(f(decodeURIComponent(m),mxUtils.bind(this,function(){t=null;E()}),null,!0)));if(null!=t&&0<t.length){var U=t.split("/");for(G=0;G<U.length;G++)(function(p){mxUtils.write(F," / ");F.appendChild(f(U[p],mxUtils.bind(this,function(){t=U.slice(0,p+1).join("/");x()}),null,!0))})(G)}A.appendChild(F)}),k=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(t=m=l=c=null,
-z()):this.ui.hideDialog()}))}),n=null,v=null,x=mxUtils.bind(this,function(G){null==G&&(A.innerText="",G=1);var F=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/tree?path="+t+"&ref="+m+"&per_page=100&page="+G,null,"GET");this.ui.spinner.spin(A,mxResources.get("loading"));J.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(A,"scroll",v),v=null);null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display=
-"block";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){x(G+1)});mxEvent.addListener(n,"click",U);this.executeRequest(F,mxUtils.bind(this,function(p){this.ui.spinner.stop();1==G&&(g(!m),A.appendChild(f("../ [Up]",mxUtils.bind(this,function(){if(""==t)t=null,z();else{var N=t.split("/");t=N.slice(0,N.length-1).join("/");x()}}),"4px")));var u=JSON.parse(p.getText());if(null==u||0==u.length)mxUtils.write(A,mxResources.get("noFiles"));else{var H=
-!0,K=0;p=mxUtils.bind(this,function(N){for(var I=0;I<u.length;I++)mxUtils.bind(this,function(L){if(N==("tree"==L.type)){var Q=B.cloneNode();Q.style.backgroundColor=H?Editor.isDarkMode()?"#000000":"#eeeeee":"";H=!H;var P=document.createElement("img");P.src=IMAGE_PATH+"/"+("tree"==L.type?"folder.png":"file.png");P.setAttribute("align","absmiddle");P.style.marginRight="4px";P.style.marginTop="-4px";P.width=20;Q.appendChild(P);Q.appendChild(f(L.name+("tree"==L.type?"/":""),mxUtils.bind(this,function(){"tree"==
-L.type?(t=L.path,x()):d&&"blob"==L.type&&(this.ui.hideDialog(),e(c+"/"+l+"/"+m+"/"+L.path))})));A.appendChild(Q);K++}})(u[I])});p(!0);d&&p(!1);100==K&&(A.appendChild(n),v=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&U()},mxEvent.addListener(A,"scroll",v))}}),k,!0)}),E=mxUtils.bind(this,function(G,F){null==G&&(A.innerText="",G=1);var U=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/branches?per_page=100&page="+G,null,"GET");J.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(A,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(A,"scroll",v),v=null);null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("more")+"...");var p=mxUtils.bind(this,function(){E(G+1)});mxEvent.addListener(n,"click",p);this.executeRequest(U,mxUtils.bind(this,function(u){this.ui.spinner.stop();1==G&&(g(!0),A.appendChild(f("../ [Up]",mxUtils.bind(this,
-function(){t=null;z()}),"4px")));u=JSON.parse(u.getText());if(null==u||0==u.length)mxUtils.write(A,mxResources.get("noFiles"));else if(1==u.length&&F)m=u[0].name,t="",x();else{for(var H=0;H<u.length;H++)mxUtils.bind(this,function(K,N){var I=B.cloneNode();I.style.backgroundColor=0==N%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";I.appendChild(f(K.name,mxUtils.bind(this,function(){m=encodeURIComponent(K.name);t="";x()})));A.appendChild(I)})(u[H],H);100==u.length&&(A.appendChild(n),v=function(){A.scrollTop>=
-A.scrollHeight-A.offsetHeight&&p()},mxEvent.addListener(A,"scroll",v))}}),k)});J.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(A,mxResources.get("loading"));var z=mxUtils.bind(this,function(G){var F=this.ui.spinner,U=0;this.ui.spinner.stop();var p=function(){F.spin(A,mxResources.get("loading"));U+=1},u=function(){--U;0===U&&F.stop()};null==G&&(A.innerText="",G=1);null!=v&&(mxEvent.removeListener(A,"scroll",v),v=null);null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");
-n.style.display="block";n.style.cursor="pointer";mxUtils.write(n,mxResources.get("more")+"...");var H=mxUtils.bind(this,function(){0===U&&z(G+1)});mxEvent.addListener(n,"click",H);var K=mxUtils.bind(this,function(I){p();var L=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(L,mxUtils.bind(this,function(Q){I(JSON.parse(Q.getText()));u()}),k)}),N=mxUtils.bind(this,function(I,L){p();var Q=new mxXmlRequest(this.baseUrl+"/groups/"+I.id+"/projects?per_page=100",null,
-"GET");this.executeRequest(Q,mxUtils.bind(this,function(P){L(I,JSON.parse(P.getText()));u()}),k)});K(mxUtils.bind(this,function(I){if(null==this.user)mxUtils.write(A,mxResources.get("loggedOut"));else{p();var L=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+G,null,"GET");this.executeRequest(L,mxUtils.bind(this,function(Q){Q=JSON.parse(Q.getText());if(null!=Q&&0!=Q.length||null!=I&&0!=I.length){1==G&&(A.appendChild(f(mxResources.get("enterValue")+"...",mxUtils.bind(this,
-function(){if(0===U){var W=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(q){null!=q&&(q=q.split("/"),1<q.length?(c=q[0],l=q[1],m=t=null,2<q.length?(m=encodeURIComponent(q.slice(2,q.length).join("/")),x()):E(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(A),mxUtils.br(A));for(var P=!0,V=0;V<Q.length;V++)mxUtils.bind(this,
-function(W){var q=B.cloneNode();q.style.backgroundColor=P?Editor.isDarkMode()?"#000000":"#eeeeee":"";P=!P;q.appendChild(f(W.name_with_namespace,mxUtils.bind(this,function(){0===U&&(c=W.owner.username,l=W.path,t="",E(null,!0))})));A.appendChild(q)})(Q[V]);for(V=0;V<I.length;V++)p(),N(I[V],mxUtils.bind(this,function(W,q){u();for(var D=0;D<q.length;D++){var M=B.cloneNode();M.style.backgroundColor=P?Editor.isDarkMode()?"#000000":"#eeeeee":"";P=!P;mxUtils.bind(this,function(T){M.appendChild(f(T.name_with_namespace,
-mxUtils.bind(this,function(){0===U&&(c=W.full_path,l=T.path,t="",E(null,!0))})));A.appendChild(M)})(q[D])}}));u()}else u(),mxUtils.write(A,mxResources.get("noFiles"));100==Q.length&&(A.appendChild(n),v=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&H()},mxEvent.addListener(A,"scroll",v))}),k)}}))});b?this.user?z():this.updateUser(function(){z()},k,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){z()},k,!0)}),k)};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,d,e,c,l,m,t){this.file=b;this.id=d;this.content=e;this.modifiedDate=c;this.createdDate=l;this.isResolved=m;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,d,e,c,l){d()};DrawioComment.prototype.editComment=function(b,d,e){d()};DrawioComment.prototype.deleteComment=function(b,d){b()};DriveComment=function(b,d,e,c,l,m,t,y){DrawioComment.call(this,b,d,e,c,l,m,t);this.pCommentId=y};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,d,e,c,l){b={content:b.content};c?b.verb="resolve":l&&(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(m){d(m.replyId)}),e)};
-DriveComment.prototype.editComment=function(b,d,e){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"},d,e)};
-DriveComment.prototype.deleteComment=function(b,d){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,d)};function mxODPicker(b,d,e,c,l,m,t,y,C,A,B,J,f,g){function k(R,S){S=S||document;return S.querySelector(R)}function n(R,S,X){if(null==R["@microsoft.graph.downloadUrl"])if(null==R.parentReference)X();else{c(R.id,R.parentReference.driveId,function(ba){n(ba,S,X)},X);return}var Y=new XMLHttpRequest;Y.open("GET",R["@microsoft.graph.downloadUrl"]);var aa=R.file?"image/png"==R.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ba=Y.responseText;
-aa&&(ba="data:image/png;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPng(ba));var da=mxUtils.parseXml(ba),Z="mxlibrary"==da.documentElement.nodeName?da.documentElement:Editor.extractGraphModel(da.documentElement);if(null!=Z){S(Z.ownerDocument);return}}catch(ia){}X()}};aa&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function v(){J&&null!=N?K.exportToCanvas(function(R){R=EditorUi.prototype.createImageDataUri(R,null,"png");t(I,R);m(I)},400,
-null,null,function(R){console.log(R)},600,null,null,null,null,null,N):(t(I,void 0),m(I))}function x(R){function S(X){M.style.background="transparent";M.innerText="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,X);M.appendChild(Y);H.stop()}if(null!=M)if(M.style.background="transparent",M.innerText="",null==R||R.folder||/\.drawiolib$/.test(R.name))S(mxResources.get("noPreview"));else try{null!=R.remoteItem&&(R=R.remoteItem),W=R,H.spin(M),n(R,function(X){H.stop();
+GitLabFile.prototype.setDescriptorEtag=function(b,d){b.last_commit_id=d};GitLabLibrary=function(b,d,f){GitLabFile.call(this,b,d,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,d,f){this.saveFile(b,!1,d,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(d){GitHubClient.call(this,d,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate=
+function(d,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),d,f):null!=f&&f(c)}),f)};GitLabClient.prototype.authenticateStep2=function(d,f,c){if(null==window.onGitLabCallback){var l=mxUtils.bind(this,function(){var m=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+
+d),null,"GET")).send(mxUtils.bind(this,function(t){200<=t.getStatus()&&299>=t.getStatus()?(b=JSON.parse(t.getText()).access_token,this.setToken(b),this.setUser(null),f()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==t.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(t,y){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+
+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+d),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(C,A){m?(window.onGitLabCallback=null,m=!1,null==C?c({message:mxResources.get("accessDenied"),retry:l}):(null!=y&&y(),b=C.access_token,this.setToken(b),this.setUser(null),t&&this.setPersistentToken("remembered"),f(),null!=A&&A.close())):null!=A&&A.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),
+retry:l})}),mxUtils.bind(this,function(){m&&(window.onGitLabCallback=null,m=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(d,f,c,l){var m=mxUtils.bind(this,function(y){var C=!0,A=window.setTimeout(mxUtils.bind(this,function(){C=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),B=this.authToken+" "+b;d.setRequestHeaders=function(J,e){J.setRequestHeader("Authorization",
+B);J.setRequestHeader("PRIVATE_TOKEN",B);J.setRequestHeader("Content-Type","application/json")};d.send(mxUtils.bind(this,function(){window.clearTimeout(A);if(C)if(200<=d.getStatus()&&299>=d.getStatus()||l&&404==d.getStatus())f(d);else if(401===d.getStatus())y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){t(!0)},c)})}):this.authenticate(function(){m(!0)},c);else if(403===d.getStatus()){var J=!1;try{var e=JSON.parse(d.getText());null!=e&&
+null!=e.errors&&0<e.errors.length&&(J="too_large"==e.errors[0].code)}catch(g){}c({message:mxResources.get(J?"drawingTooLarge":"forbidden")})}else 404===d.getStatus()?c({message:this.getErrorMessage(d,mxResources.get("fileNotFound"))}):400===d.getStatus()?c({status:400}):c({status:d.getStatus(),message:this.getErrorMessage(d,mxResources.get("error")+" "+d.getStatus())})}),mxUtils.bind(this,function(J){window.clearTimeout(A);C&&c(J)}))}),t=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){t(!0)},
+c,y):m(y)});null==b?this.authenticate(function(){t(!0)},c):t(!1)};GitLabClient.prototype.getRefIndex=function(d,f,c,l,m,t){if(null!=m)c(d,m);else{var y=d.length-2,C=mxUtils.bind(this,function(){if(2>y)l({message:mxResources.get("fileNotFound")});else{var A=Math.max(y-1,0),B=d.slice(0,A).join("/");A=d[A];var J=d[y],e=d.slice(y+1,d.length).join("/");B=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+A)+"/repository/"+(f?t?"branches?per_page=1&page=1&ref="+J:"tree?path="+e+"&ref="+J:"files/"+encodeURIComponent(e)+
+"?ref="+J);var g=new mxXmlRequest(B,null,"HEAD");this.executeRequest(g,mxUtils.bind(this,function(){200==g.getStatus()?c(d,y):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==g.getStatus()?(y--,C()):l({message:mxResources.get("fileNotFound")})}))}});C()}};GitLabClient.prototype.getFile=function(d,f,c,l,m,t){l=null!=l?l:!1;this.getRefIndex(d.split("/"),!1,mxUtils.bind(this,function(y,C){var A=Math.max(C-1,0),B=y.slice(0,A).join("/"),J=y[A],e=y[C];d=y.slice(C+1,y.length).join("/");
+y=/\.png$/i.test(d);if(!m&&(/\.v(dx|sdx?)$/i.test(d)||/\.gliffy$/i.test(d)||/\.pdf$/i.test(d)||!this.ui.useCanvasForExport&&y))if(null!=b){A="&t="+(new Date).getTime();var g=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+J)+"/repository/files/"+encodeURIComponent(d)+"?ref="+e;y=d.split("/");this.ui.convertFile(g+A,0<y.length?y[y.length-1]:d,null,this.extension,f,c,mxUtils.bind(this,function(k,q,u){k=new mxXmlRequest(k,null,"GET");this.executeRequest(k,mxUtils.bind(this,function(x){try{q(this.getFileContent(JSON.parse(x.getText())))}catch(E){u(E)}}),
+u)}))}else c({message:mxResources.get("accessDenied")});else A="&t="+(new Date).getTime(),g=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+J)+"/repository/files/"+encodeURIComponent(d)+"?ref="+e,y=new mxXmlRequest(g+A,null,"GET"),this.executeRequest(y,mxUtils.bind(this,function(k){try{f(this.createGitLabFile(B,J,e,JSON.parse(k.getText()),l,C))}catch(q){c(q)}}),c)}),c,t)};GitLabClient.prototype.getFileContent=function(d){var f=d.file_name,c=d.content;"base64"===d.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)?(d=this.ui.extractGraphModelFromPng(c),c=null!=d&&0<d.length?d:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(d,f,c,l,m,t){var y=DRAWIO_GITLAB_URL+"/";d={org:d,repo:f,ref:c,name:l.file_name,path:l.file_path,html_url:y+d+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:y+d+"/"+f+"/raw/"+c+"/"+l.file_path+
+"?inline=false",last_commit_id:l.last_commit_id,refPos:t};l=this.getFileContent(l);return m?new GitLabLibrary(this.ui,l,d):new GitLabFile(this.ui,l,d)};GitLabClient.prototype.insertFile=function(d,f,c,l,m,t,y){m=null!=m?m:!1;t=t.split("/");this.getRefIndex(t,!0,mxUtils.bind(this,function(C,A){var B=Math.max(A-1,0),J=C.slice(0,B).join("/"),e=C[B],g=C[A];path=C.slice(A+1,C.length).join("/");0<path.length&&(path+="/");path+=d;this.checkExists(J+"/"+e+"/"+g+"/"+path,!0,mxUtils.bind(this,function(k,q){k?
+m?(y||(f=Base64.encode(f)),this.showCommitDialog(d,!0,mxUtils.bind(this,function(u){this.writeFile(J,e,g,path,u,f,q,mxUtils.bind(this,function(x){try{var E=JSON.parse(x.getText());c(this.createGitLabFile(J,e,g,null!=E.content?E.content:E,m,A))}catch(z){l(z)}}),l)}),l)):(k=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:J,repo:e,ref:g,name:d,path:path,html_url:k+J+"/"+e+"/blob/"+g+"/"+path,download_url:k+J+"/"+e+"/raw/"+g+"/"+path+"?inline=false",refPos:A,last_commit_id:q,isNew:!0}))):l()}))}),
+l,null,4>=t.length)};GitLabClient.prototype.checkExists=function(d,f,c){this.getFile(d,mxUtils.bind(this,function(l){if(f){var m=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[d]),function(){m();c(!0,l.getCurrentEtag())},function(){m();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(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(d,
+f,c,l,m,t,y,C,A){if(t.length>=this.maxFileSize)A({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(t.length)+" / 10 MB)"});else{var B="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:m,content:t,encoding:"base64"};null!=y&&(c.last_commit_id=y,B="PUT");d=this.baseUrl+"/projects/"+encodeURIComponent(d+"/"+f)+"/repository/files/"+encodeURIComponent(l);B=new mxXmlRequest(d,JSON.stringify(c),B);this.executeRequest(B,mxUtils.bind(this,function(J){C(J)}),
+A)}};GitLabClient.prototype.saveFile=function(d,f,c,l,m){var t=d.meta.org,y=d.meta.repo,C=d.meta.ref,A=d.meta.path,B=mxUtils.bind(this,function(e,g){this.writeFile(t,y,C,A,m,g,e,mxUtils.bind(this,function(k){delete d.meta.isNew;this.getFile(t+"/"+y+"/"+C+"/"+A,mxUtils.bind(this,function(q){q.getData()==d.getData()?f(q.getCurrentEtag()):f({content:d.getCurrentEtag()})}),c,null,null,d.meta.refPos)}),c)}),J=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(A)){var e=this.ui.getPngFileProperties(this.ui.fileNode);
+this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){B(d.meta.last_commit_id,g)}),c,this.ui.getCurrentFile()!=d?d.getData():null,e.scale,e.border)}else B(d.meta.last_commit_id,Base64.encode(d.getData()))});l?this.getFile(t+"/"+y+"/"+C+"/"+A,mxUtils.bind(this,function(e){d.meta.last_commit_id=e.meta.last_commit_id;J()}),c):J()};GitLabClient.prototype.pickFolder=function(d){this.showGitLabDialog(!1,d)};GitLabClient.prototype.pickFile=function(d){d=null!=d?d:mxUtils.bind(this,function(f){this.ui.loadFile("A"+
+encodeURIComponent(f))});this.showGitLabDialog(!0,d)};GitLabClient.prototype.showGitLabDialog=function(d,f){var c=null,l=null,m=null,t=null,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.overflow="hidden";y.style.height="304px";var C=document.createElement("h3");mxUtils.write(C,mxResources.get(d?"selectFile":"selectFolder"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";y.appendChild(C);var A=document.createElement("div");A.style.whiteSpace=
+"nowrap";A.style.border="1px solid lightgray";A.style.boxSizing="border-box";A.style.padding="4px";A.style.overflow="auto";A.style.lineHeight="1.2em";A.style.height="274px";y.appendChild(A);var B=document.createElement("div");B.style.textOverflow="ellipsis";B.style.boxSizing="border-box";B.style.overflow="hidden";B.style.padding="4px";B.style.width="100%";var J=new CustomDialog(this.ui,y,mxUtils.bind(this,function(){f(c+"/"+l+"/"+encodeURIComponent(m)+"/"+t)}));this.ui.showDialog(J.container,420,
+370,!0,!0);d&&J.okButton.parentNode.removeChild(J.okButton);var e=mxUtils.bind(this,function(G,F,U,p){var v=document.createElement("a");v.setAttribute("title",G);v.style.cursor="pointer";mxUtils.write(v,G);mxEvent.addListener(v,"click",F);p&&(v.style.textDecoration="underline");null!=U&&(G=B.cloneNode(),G.style.padding=U,G.appendChild(v),v=G);return v}),g=mxUtils.bind(this,function(G){var F=document.createElement("div");F.style.marginBottom="8px";F.appendChild(e(c+"/"+l,mxUtils.bind(this,function(){t=
+null;z()}),null,!0));G||(mxUtils.write(F," / "),F.appendChild(e(decodeURIComponent(m),mxUtils.bind(this,function(){t=null;E()}),null,!0)));if(null!=t&&0<t.length){var U=t.split("/");for(G=0;G<U.length;G++)(function(p){mxUtils.write(F," / ");F.appendChild(e(U[p],mxUtils.bind(this,function(){t=U.slice(0,p+1).join("/");x()}),null,!0))})(G)}A.appendChild(F)}),k=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(t=m=l=c=null,
+z()):this.ui.hideDialog()}))}),q=null,u=null,x=mxUtils.bind(this,function(G){null==G&&(A.innerText="",G=1);var F=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/tree?path="+t+"&ref="+m+"&per_page=100&page="+G,null,"GET");this.ui.spinner.spin(A,mxResources.get("loading"));J.okButton.removeAttribute("disabled");null!=u&&(mxEvent.removeListener(A,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display=
+"block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){x(G+1)});mxEvent.addListener(q,"click",U);this.executeRequest(F,mxUtils.bind(this,function(p){this.ui.spinner.stop();1==G&&(g(!m),A.appendChild(e("../ [Up]",mxUtils.bind(this,function(){if(""==t)t=null,z();else{var N=t.split("/");t=N.slice(0,N.length-1).join("/");x()}}),"4px")));var v=JSON.parse(p.getText());if(null==v||0==v.length)mxUtils.write(A,mxResources.get("noFiles"));else{var H=
+!0,K=0;p=mxUtils.bind(this,function(N){for(var I=0;I<v.length;I++)mxUtils.bind(this,function(L){if(N==("tree"==L.type)){var Q=B.cloneNode();Q.style.backgroundColor=H?Editor.isDarkMode()?"#000000":"#eeeeee":"";H=!H;var P=document.createElement("img");P.src=IMAGE_PATH+"/"+("tree"==L.type?"folder.png":"file.png");P.setAttribute("align","absmiddle");P.style.marginRight="4px";P.style.marginTop="-4px";P.width=20;Q.appendChild(P);Q.appendChild(e(L.name+("tree"==L.type?"/":""),mxUtils.bind(this,function(){"tree"==
+L.type?(t=L.path,x()):d&&"blob"==L.type&&(this.ui.hideDialog(),f(c+"/"+l+"/"+m+"/"+L.path))})));A.appendChild(Q);K++}})(v[I])});p(!0);d&&p(!1);100==K&&(A.appendChild(q),u=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&U()},mxEvent.addListener(A,"scroll",u))}}),k,!0)}),E=mxUtils.bind(this,function(G,F){null==G&&(A.innerText="",G=1);var U=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+l)+"/repository/branches?per_page=100&page="+G,null,"GET");J.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(A,mxResources.get("loading"));null!=u&&(mxEvent.removeListener(A,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var p=mxUtils.bind(this,function(){E(G+1)});mxEvent.addListener(q,"click",p);this.executeRequest(U,mxUtils.bind(this,function(v){this.ui.spinner.stop();1==G&&(g(!0),A.appendChild(e("../ [Up]",mxUtils.bind(this,
+function(){t=null;z()}),"4px")));v=JSON.parse(v.getText());if(null==v||0==v.length)mxUtils.write(A,mxResources.get("noFiles"));else if(1==v.length&&F)m=v[0].name,t="",x();else{for(var H=0;H<v.length;H++)mxUtils.bind(this,function(K,N){var I=B.cloneNode();I.style.backgroundColor=0==N%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";I.appendChild(e(K.name,mxUtils.bind(this,function(){m=encodeURIComponent(K.name);t="";x()})));A.appendChild(I)})(v[H],H);100==v.length&&(A.appendChild(q),u=function(){A.scrollTop>=
+A.scrollHeight-A.offsetHeight&&p()},mxEvent.addListener(A,"scroll",u))}}),k)});J.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(A,mxResources.get("loading"));var z=mxUtils.bind(this,function(G){var F=this.ui.spinner,U=0;this.ui.spinner.stop();var p=function(){F.spin(A,mxResources.get("loading"));U+=1},v=function(){--U;0===U&&F.stop()};null==G&&(A.innerText="",G=1);null!=u&&(mxEvent.removeListener(A,"scroll",u),u=null);null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q);q=document.createElement("a");
+q.style.display="block";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("more")+"...");var H=mxUtils.bind(this,function(){0===U&&z(G+1)});mxEvent.addListener(q,"click",H);var K=mxUtils.bind(this,function(I){p();var L=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(L,mxUtils.bind(this,function(Q){I(JSON.parse(Q.getText()));v()}),k)}),N=mxUtils.bind(this,function(I,L){p();var Q=new mxXmlRequest(this.baseUrl+"/groups/"+I.id+"/projects?per_page=100",null,
+"GET");this.executeRequest(Q,mxUtils.bind(this,function(P){L(I,JSON.parse(P.getText()));v()}),k)});K(mxUtils.bind(this,function(I){if(null==this.user)mxUtils.write(A,mxResources.get("loggedOut"));else{p();var L=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+G,null,"GET");this.executeRequest(L,mxUtils.bind(this,function(Q){Q=JSON.parse(Q.getText());if(null!=Q&&0!=Q.length||null!=I&&0!=I.length){1==G&&(A.appendChild(e(mxResources.get("enterValue")+"...",mxUtils.bind(this,
+function(){if(0===U){var W=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(n){null!=n&&(n=n.split("/"),1<n.length?(c=n[0],l=n[1],m=t=null,2<n.length?(m=encodeURIComponent(n.slice(2,n.length).join("/")),x()):E(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(A),mxUtils.br(A));for(var P=!0,V=0;V<Q.length;V++)mxUtils.bind(this,
+function(W){var n=B.cloneNode();n.style.backgroundColor=P?Editor.isDarkMode()?"#000000":"#eeeeee":"";P=!P;n.appendChild(e(W.name_with_namespace,mxUtils.bind(this,function(){0===U&&(c=W.owner.username,l=W.path,t="",E(null,!0))})));A.appendChild(n)})(Q[V]);for(V=0;V<I.length;V++)p(),N(I[V],mxUtils.bind(this,function(W,n){v();for(var D=0;D<n.length;D++){var M=B.cloneNode();M.style.backgroundColor=P?Editor.isDarkMode()?"#000000":"#eeeeee":"";P=!P;mxUtils.bind(this,function(T){M.appendChild(e(T.name_with_namespace,
+mxUtils.bind(this,function(){0===U&&(c=W.full_path,l=T.path,t="",E(null,!0))})));A.appendChild(M)})(n[D])}}));v()}else v(),mxUtils.write(A,mxResources.get("noFiles"));100==Q.length&&(A.appendChild(q),u=function(){A.scrollTop>=A.scrollHeight-A.offsetHeight&&H()},mxEvent.addListener(A,"scroll",u))}),k)}}))});b?this.user?z():this.updateUser(function(){z()},k,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){z()},k,!0)}),k)};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,d,f,c,l,m,t){this.file=b;this.id=d;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=m;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,d,f,c,l){d()};DrawioComment.prototype.editComment=function(b,d,f){d()};DrawioComment.prototype.deleteComment=function(b,d){b()};DriveComment=function(b,d,f,c,l,m,t,y){DrawioComment.call(this,b,d,f,c,l,m,t);this.pCommentId=y};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,d,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(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(m){d(m.replyId)}),f)};
+DriveComment.prototype.editComment=function(b,d,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"},d,f)};
+DriveComment.prototype.deleteComment=function(b,d){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,d)};function mxODPicker(b,d,f,c,l,m,t,y,C,A,B,J,e,g){function k(R,S){S=S||document;return S.querySelector(R)}function q(R,S,X){if(null==R["@microsoft.graph.downloadUrl"])if(null==R.parentReference)X();else{c(R.id,R.parentReference.driveId,function(ba){q(ba,S,X)},X);return}var Y=new XMLHttpRequest;Y.open("GET",R["@microsoft.graph.downloadUrl"]);var aa=R.file?"image/png"==R.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ba=Y.responseText;
+aa&&(ba="data:image/png;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPng(ba));var da=mxUtils.parseXml(ba),Z="mxlibrary"==da.documentElement.nodeName?da.documentElement:Editor.extractGraphModel(da.documentElement);if(null!=Z){S(Z.ownerDocument);return}}catch(ia){}X()}};aa&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function u(){J&&null!=N?K.exportToCanvas(function(R){R=EditorUi.prototype.createImageDataUri(R,null,"png");t(I,R);m(I)},400,
+null,null,function(R){console.log(R)},600,null,null,null,null,null,N):(t(I,void 0),m(I))}function x(R){function S(X){M.style.background="transparent";M.innerText="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,X);M.appendChild(Y);H.stop()}if(null!=M)if(M.style.background="transparent",M.innerText="",null==R||R.folder||/\.drawiolib$/.test(R.name))S(mxResources.get("noPreview"));else try{null!=R.remoteItem&&(R=R.remoteItem),W=R,H.spin(M),q(R,function(X){H.stop();
if(W==R)if("mxlibrary"==X.documentElement.nodeName)S(mxResources.get("noPreview"));else{var Y=X.getElementsByTagName("diagram");N=AspectDialog.prototype.createViewer(M,0==Y.length?X.documentElement:Y[0],null,"transparent")}},function(){I=null;S(mxResources.get("notADiagramFile"))})}catch(X){I=null,S(mxResources.get("notADiagramFile"))}}function E(){var R=k(".odFilesBreadcrumb");if(null!=R){R.innerText="";for(var S=0;S<P.length-1;S++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=
mxUtils.htmlEntities(P[S].name||mxResources.get("home"));R.appendChild(X);(function(aa,ba){X.addEventListener("click",function(){d(null);P=P.slice(0,ba);G(aa.driveId,aa.folderId,aa.siteId,aa.name)})})(P[S],S);var Y=document.createElement("span");Y.innerHTML=" &gt; ";R.appendChild(Y)}null!=P[P.length-1]&&(S=document.createElement("span"),S.innerHTML=mxUtils.htmlEntities(1==P.length?mxResources.get("officeSelDiag"):P[P.length-1].name||mxResources.get("home")),R.appendChild(S))}}function z(){if(null!=
-I&&!Q)if("sharepoint"==L)G("site",null,I.id,I.displayName);else if("site"==L)G("subsite",null,I.id,I.name);else{var R=I.folder;I=I.remoteItem?I.remoteItem:I;var S=(I.parentReference?I.parentReference.driveId:null)||L,X=I.id;R?G(S,X,null,I.name):v()}}function G(R,S,X,Y,aa){function ba(Ka){H.stop();var Ba=document.createElement("table");Ba.className="odFileListGrid";for(var Fa=null,na=0,Ja=0;null!=Ka&&Ja<Ka.length;Ja++){var ra=Ka[Ja];if(1!=ia||!ra.webUrl||0<ra.webUrl.indexOf("sharepoint.com/sites/")||
+I&&!Q)if("sharepoint"==L)G("site",null,I.id,I.displayName);else if("site"==L)G("subsite",null,I.id,I.name);else{var R=I.folder;I=I.remoteItem?I.remoteItem:I;var S=(I.parentReference?I.parentReference.driveId:null)||L,X=I.id;R?G(S,X,null,I.name):u()}}function G(R,S,X,Y,aa){function ba(Ka){H.stop();var Ba=document.createElement("table");Ba.className="odFileListGrid";for(var Fa=null,na=0,Ja=0;null!=Ka&&Ja<Ka.length;Ja++){var ra=Ka[Ja];if(1!=ia||!ra.webUrl||0<ra.webUrl.indexOf("sharepoint.com/sites/")||
0>ra.webUrl.indexOf("sharepoint.com/")){var ha=ra.displayName||ra.name,fa=mxUtils.htmlEntities(ra.description||ha);ia&&(ra.folder=2==ia?{isRoot:!0}:!0);var wa=null!=ra.folder;if(!C||wa){var ja=document.createElement("tr");ja.className=na++%2?"odOddRow":"odEvenRow";var ma=document.createElement("td");ma.style.width="36px";var sa=document.createElement("img");sa.src="/images/"+(wa?"folder.png":"file.png");sa.className="odFileImg";ma.appendChild(sa);ja.appendChild(ma);ma=document.createElement("td");
wa=document.createElement("div");wa.className="odFileTitle";wa.innerHTML=mxUtils.htmlEntities(ha);wa.setAttribute("title",fa);ma.appendChild(wa);ja.appendChild(ma);Ba.appendChild(ja);null==Fa&&(Fa=ja,Fa.className+=" odRowSelected",I=ra,L=R,g||d(I));(function(oa,pa){ja.addEventListener("dblclick",z);ja.addEventListener("click",function(){Fa!=pa&&(Fa.className=Fa.className.replace("odRowSelected",""),Fa=pa,Fa.className+=" odRowSelected",I=oa,L=R,g||d(I))})})(ra,ja)}}}0==na?(Ka=document.createElement("div"),
-Ka.className="odEmptyFolder",Ka.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),va.appendChild(Ka)):va.appendChild(Ba);E();Q=!1}function da(Ka){e(Ka?Ka:ca,function(Ba){if(Z){var Fa=Ba.value||[];if(g||ia)Array.prototype.push.apply(Na,Fa);else for(var na=0;na<Fa.length;na++){var Ja=Fa[na],ra=Ja.file?Ja.file.mimeType:null;(Ja.folder||"text/html"==ra||"text/xml"==ra||"application/xml"==ra||"image/png"==ra||/\.svg$/.test(Ja.name)||/\.html$/.test(Ja.name)||/\.xml$/.test(Ja.name)||
+Ka.className="odEmptyFolder",Ka.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),va.appendChild(Ka)):va.appendChild(Ba);E();Q=!1}function da(Ka){f(Ka?Ka:ca,function(Ba){if(Z){var Fa=Ba.value||[];if(g||ia)Array.prototype.push.apply(Na,Fa);else for(var na=0;na<Fa.length;na++){var Ja=Fa[na],ra=Ja.file?Ja.file.mimeType:null;(Ja.folder||"text/html"==ra||"text/xml"==ra||"application/xml"==ra||"image/png"==ra||/\.svg$/.test(Ja.name)||/\.html$/.test(Ja.name)||/\.xml$/.test(Ja.name)||
/\.png$/.test(Ja.name)||/\.drawio$/.test(Ja.name)||/\.drawiolib$/.test(Ja.name))&&Na.push(Ja)}Ba["@odata.nextLink"]&&1E3>Na.length?da(Ba["@odata.nextLink"]):(clearTimeout(ea),ba(Na))}},function(Ba){if(Z){clearTimeout(ea);var Fa=null;try{Fa=JSON.parse(Ba.responseText).error.message}catch(na){}y(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=Fa?" ("+Fa+")":""));Q=!1;H.stop()}},null!=Ka)}if(!Q){k(".odCatsList").style.display="block";k(".odFilesSec").style.display="block";
null!=M&&(M.innerText="",M.style.top="50%");var Z=Q=!0,ia=0;V=arguments;var ea=setTimeout(function(){Q=Z=!1;H.stop();y(mxResources.get("timeout"))},2E4),va=k(".odFilesList");va.innerText="";H.spin(va);switch(R){case "recent":P=[{name:mxResources.get("recent",null,"Recent"),driveId:R}];var za=l()||{},ya=[],ua;for(ua in za)ya.push(za[ua]);clearTimeout(ea);ba(ya);return;case "shared":var ca="/me/drive/sharedWithMe";P=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:R}];break;case "sharepoint":ca=
"/sites?search=";P=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:R}];ia=1;break;case "site":P.push({name:Y,driveId:R,folderId:S,siteId:X});ca="/sites/"+X+"/drives";ia=2;break;case "subsite":P.push({name:Y,driveId:R,folderId:S,siteId:X});ca="/drives/"+X+(S?"/items/"+S:"/root")+"/children";break;case "search":R=L;P=[{driveId:R,name:mxResources.get("back",null,"Back")}];aa=encodeURIComponent(aa.replace(/'/g,"\\'"));ca=R?"/drives/"+R+"/root/search(q='"+aa+"')":"/me/drive/root/search(q='"+
aa+"')";break;default:null==S?P=[{driveId:R}]:P.push({name:Y,driveId:R,folderId:S}),ca=(R?"/drives/"+R:"/me/drive")+(S?"/items/"+S:"/root")+"/children"}ia||(ca+=(0<ca.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");var Na=[];da()}}function F(R){T.className=T.className.replace("odCatSelected","");T=R;T.className+=" odCatSelected"}function U(R){Q||(O=null,G("search",null,null,null,
R))}var p="";null==d&&(d=x,p='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var R=null;try{R=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(S){}return R});null==m&&(m=function(R){if(null!=R){var S=l()||{};delete R["@microsoft.graph.downloadUrl"];S[R.id]=R;localStorage.setItem("mxODPickerRecentList",JSON.stringify(S))}});p='<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>'+p+(A?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(B?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(C?"save":"open"))+"</button>":"");var u=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();u=".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 {"+
-(u?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(u?"":"\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 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}),K=new Editor,N=null,I=null,L=null,Q=!1,P=[],V=null,W=null;this.getSelectedItem=function(){null!=I&&m(I);return I};if(null==k("#mxODPickerCss")){var q=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");q.appendChild(D);D.type="text/css";D.id="mxODPickerCss";D.appendChild(document.createTextNode(u))}b.innerHTML=
+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+p+(A?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(B?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(C?"save":"open"))+"</button>":"");var v=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();v=".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 {"+
+(v?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(v?"":"\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 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}),K=new Editor,N=null,I=null,L=null,Q=!1,P=[],V=null,W=null;this.getSelectedItem=function(){null!=I&&m(I);return I};if(null==k("#mxODPickerCss")){var n=document.head||document.getElementsByTagName("head")[0],D=document.createElement("style");n.appendChild(D);D.type="text/css";D.id="mxODPickerCss";D.appendChild(document.createTextNode(v))}b.innerHTML=
p;var M=k(".odPreview"),T=k("#odFiles");b=function(R,S){S=S||document;return S.querySelectorAll(R)}(".odCatListTitle");for(p=0;p<b.length;p++)b[p].addEventListener("click",function(){I=W=null;if(!Q)switch(F(this),this.id){case "odFiles":G();break;case "odRecent":G("recent");break;case "odShared":G("shared");break;case "odSharepoint":G("sharepoint")}});var O=null;k("#odSearchBox").addEventListener("keyup",function(R){var S=this;null!=O&&clearTimeout(O);13==R.keyCode?U(S.value):O=setTimeout(function(){U(S.value)},
-500)});k("#refreshOD").addEventListener("click",function(){null!=V&&(d(null),G.apply(this,V))});A&&k("#odBackBtn").addEventListener("click",A);B&&k("#odSubmitBtn").addEventListener("click",v);null!=f?(A=f.pop(),"sharepoint"==f[0].driveId&&F(k("#odSharepoint")),P=f,G(A.driveId,A.folderId,A.siteId,A.name)):G()};App=function(b,d,e){EditorUi.call(this,b,d,null!=e?e:"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 l={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!=
+500)});k("#refreshOD").addEventListener("click",function(){null!=V&&(d(null),G.apply(this,V))});A&&k("#odBackBtn").addEventListener("click",A);B&&k("#odSubmitBtn").addEventListener("click",u);null!=e?(A=e.pop(),"sharepoint"==e[0].driveId&&F(k("#odSharepoint")),P=e,G(A.driveId,A.folderId,A.siteId,A.name)):G()};App=function(b,d,f){EditorUi.call(this,b,d,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 l={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&&(l.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(l)}}));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=":
@@ -12397,22 +12410,22 @@ App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_U
App.GOOGLE_APIS="drive-share";App.startTime=new Date;
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",p1:"plugins/p1.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",voice:"plugins/voice.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",electron:"plugins/electron.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",
"import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",tickets:"plugins/tickets.js",flow:"plugins/flow.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex voice tips svgdata number sql props text anim update trees replay anon tickets flow webcola tags".split(" ");
-App.loadScripts=function(b,d){for(var e=b.length,c=0;c<b.length;c++)mxscript(b[c],function(){0==--e&&null!=d&&d()})};
-App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var d=document.cookie.split(";"),e=0;e<d.length;e++){var c=mxUtils.trim(d[e]);if("MODE="==c.substring(0,5)){b=c.substring(5);break}}null!=b&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie="MODE=; expires="+d.toUTCString(),localStorage.setItem(".mode",b))}return b};
+App.loadScripts=function(b,d){for(var f=b.length,c=0;c<b.length;c++)mxscript(b[c],function(){0==--f&&null!=d&&d()})};
+App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var d=document.cookie.split(";"),f=0;f<d.length;f++){var c=mxUtils.trim(d[f]);if("MODE="==c.substring(0,5)){b=c.substring(5);break}}null!=b&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie="MODE=; expires="+d.toUTCString(),localStorage.setItem(".mode",b))}return b};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
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,d){navigator.serviceWorker.getRegistrations().then(function(e){if(null!=e&&0<e.length){for(var c=0;c<e.length;c++)e[c].unregister();null!=b&&b()}})["catch"](function(){null!=d&&d()})};App.isSameDomain=function(b){var d=document.createElement("a");d.href=b;return d.protocol===window.location.protocol||d.host===window.location.host};App.isBuiltInPlugin=function(b){for(var d in App.pluginRegistry)if(App.pluginRegistry[d]==b)return!0;return!1};
-App.main=function(b,d){function e(A){mxUtils.getAll("1"!=urlParams.dev?[A]:[A,STYLE_PATH+"/default.xml"],function(B){function J(){var v=null!=d?d():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.clearServiceWorker=function(b,d){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!=d&&d()})};App.isSameDomain=function(b){var d=document.createElement("a");d.href=b;return d.protocol===window.location.protocol||d.host===window.location.host};App.isBuiltInPlugin=function(b){for(var d in App.pluginRegistry)if(App.pluginRegistry[d]==b)return!0;return!1};
+App.main=function(b,d){function f(A){mxUtils.getAll("1"!=urlParams.dev?[A]:[A,STYLE_PATH+"/default.xml"],function(B){function J(){var u=null!=d?d():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(v);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[v,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(B[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var f=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
-if(null!=f){EditorUi.debug("Setting configuration",JSON.stringify(f));if(null!=f.merge){var g=localStorage.getItem(Editor.configurationKey);if(null!=g)try{var k=JSON.parse(g),n;for(n in f.merge)k[n]=f.merge[n];f=k}catch(v){window.location.hash="",alert(v)}else f=f.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(f)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(v){window.location.hash=
-"",alert(v)}1<B.length&&(Graph.prototype.defaultThemes["default-style2"]=B[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=B[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?J():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],J))},function(B){B=document.getElementById("geStatus");null!=B&&(B.innerHTML="Error loading page. <a>Please try refreshing.</a>",B.getElementsByTagName("a")[0].onclick=
-function(){mxLanguage="en";e(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var A=parseInt(mxSettings.settings.autosaveDelay);!isNaN(A)&&0<A?(DrawioFile.prototype.autosaveDelay=A,EditorUi.debug("Setting autosaveDelay",
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(u);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[u,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(B[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var e=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
+if(null!=e){EditorUi.debug("Setting configuration",JSON.stringify(e));if(null!=e.merge){var g=localStorage.getItem(Editor.configurationKey);if(null!=g)try{var k=JSON.parse(g),q;for(q in e.merge)k[q]=e.merge[q];e=k}catch(u){window.location.hash="",alert(u)}else e=e.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(e)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(u){window.location.hash=
+"",alert(u)}1<B.length&&(Graph.prototype.defaultThemes["default-style2"]=B[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=B[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?J():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],J))},function(B){B=document.getElementById("geStatus");null!=B&&(B.innerHTML="Error loading page. <a>Please try refreshing.</a>",B.getElementsByTagName("a")[0].onclick=
+function(){mxLanguage="en";f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var A=parseInt(mxSettings.settings.autosaveDelay);!isNaN(A)&&0<A?(DrawioFile.prototype.autosaveDelay=A,EditorUi.debug("Setting autosaveDelay",
A)):EditorUi.debug("Invalid autosaveDelay",A)}null!=mxSettings.settings.defaultEdgeLength&&(A=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(A)&&0<A?(Graph.prototype.defaultEdgeLength=A,EditorUi.debug("Using defaultEdgeLength",A)):EditorUi.debug("Invalid defaultEdgeLength",A))}}catch(J){null!=window.console&&console.error(J)}if(null!=Menus.prototype.defaultFonts)for(A=0;A<Menus.prototype.defaultFonts.length;A++){var B=Menus.prototype.defaultFonts[A];"string"!==typeof B&&null!=B.fontFamily&&
-null!=B.fontUrl&&Graph.addFont(B.fontFamily,B.fontUrl)}mxResources.loadDefaultBundle=!1;e(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(A,B,J,f,g){EditorUi.logError("Global: "+(null!=A?A:""),B,J,f,g,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=
+null!=B.fontUrl&&Graph.addFont(B.fontFamily,B.fontUrl)}mxResources.loadDefaultBundle=!1;f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(A,B,J,e,g){EditorUi.logError("Global: "+(null!=A?A:""),B,J,e,g,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=
document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){l=document.getElementsByTagName("script");if(null!=l&&0<l.length){var m=mxUtils.getTextContent(l[0]);"1f536e2400baaa30261b8c3976d6fe06"!=
CryptoJS.MD5(m).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=l&&1<l.length&&(m=mxUtils.getTextContent(l[l.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(m).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(m).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||
/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(A){null!=window.console&&console.error(A)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=
@@ -12427,14 +12440,14 @@ App.prototype.chevronDownImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB
App.prototype.formatShowImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REY1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5RTA1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlERDU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlERTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlnMQ/8AAAAJUExURQAAAP///3FxcTfTiAsAAAACdFJOU/8A5bcwSgAAACFJREFUeNpiYEQDDEQJMMABTAAixcQ00ALoDiPRcwABBgB6DADly9Yx8wAAAABJRU5ErkJggg==";
App.prototype.formatHideImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=";
App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(b,d){EditorUi.debug("Loading plugins",b);for(var e=0;e<b.length;e++)if(null!=b[e]&&0<b[e].length)try{if(null!=App.pluginRegistry[b[e]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[e]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?d?mxinclude(c):mxscript(c):d?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[e])}catch(l){null!=window.console&&console.log("Error loading plugin:",
-b[e],l)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
+App.loadPlugins=function(b,d){EditorUi.debug("Loading plugins",b);for(var f=0;f<b.length;f++)if(null!=b[f]&&0<b[f].length)try{if(null!=App.pluginRegistry[b[f]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[f]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?d?mxinclude(c):mxscript(c):d?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[f])}catch(l){null!=window.console&&console.log("Error loading plugin:",
+b[f],l)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this);null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",
mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var d=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),
-this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(m){null!=window.console&&console.error(m)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var e=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var m=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));
-this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,m),window.DrawGapiClientCallback=null):m()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),
+this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(m){null!=window.console&&console.error(m)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var f=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var m=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));
+this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,m),window.DrawGapiClientCallback=null):m()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),
this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(m){null!=window.console&&console.error(m)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=c)});c()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility=
"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(m){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){m.prompt()})})),mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var m=this.getCurrentFile();m=null!=m?m.getMode():null;"1"==urlParams.extAuth||m!=App.MODE_DEVICE&&m!=App.MODE_BROWSER?"1"!=urlParams.embed&&this.getServiceName():this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||
@@ -12450,40 +12463,40 @@ this.mode&&b.isEditable()?"save":"saveAs").funct()}),null,null,360,120,null,mxUt
App.prototype.getPusher=function(){null==this.pusher&&"function"===typeof window.Pusher&&(this.pusher=new Pusher(App.PUSHER_KEY,{cluster:App.PUSHER_CLUSTER,encrypted:!0}));return this.pusher};App.prototype.showNameChangeBanner=function(){this.showBanner("DiagramsFooter","draw.io is now diagrams.net",mxUtils.bind(this,function(){this.openLink("https://www.diagrams.net/blog/move-diagrams-net")}))};
App.prototype.showNameConfBanner=function(){this.showBanner("ConfFooter","Try draw.io for Confluence",mxUtils.bind(this,function(){this.openLink("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence")}),!0)};App.prototype.showDownloadDesktopBanner=function(){this.showBanner("DesktopFooter",mxResources.get("downloadDesktop"),mxUtils.bind(this,function(){this.openLink("https://get.diagrams.net/")}))};
App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBannerratingFooter||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeratingFooter)){var b=document.createElement("div");b.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(b.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(b.style,
-"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(d);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var e=document.createElement("img");
-e.setAttribute("border","0");e.setAttribute("align","absmiddle");e.setAttribute("title","1 star");e.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(e);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(d);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var f=document.createElement("img");
+f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.setAttribute("title","1 star");f.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");f.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(f);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(c);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.setAttribute("title","3 star");l.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");l.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(l);var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.setAttribute("title","4 star");m.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");m.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(m);this.bannerShowing=!0;var t=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);t()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);t()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
+b.appendChild(m);this.bannerShowing=!0;var t=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);t()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);t()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
function(y){mxEvent.consume(y);t()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);t()}));mxEvent.addListener(m,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");t()}));d=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){t()}),1E3)});window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(d,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),d=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=d&&null!=b.id){var e=d.lastIndexOf("@"),c=0<=e?d.substring(e+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(l){try{if(200<=l.getStatus()&&299>=l.getStatus()){var m=l.getText();if(0<m.length){var t=JSON.parse(m);null!=t&&this.handleLicense(t,
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),d=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=d&&null!=b.id){var f=d.lastIndexOf("@"),c=0<=f?d.substring(f+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(l){try{if(200<=l.getStatus()&&299>=l.getStatus()){var m=l.getText();if(0<m.length){var t=JSON.parse(m);null!=t&&this.handleLicense(t,
c)}}}catch(y){}}))}};App.prototype.handleLicense=function(b,d){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
-App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var d=this.getRecent();if(null==d)d=[];else for(var e=0;e<d.length;e++)d[e].id==b.id&&d.splice(e,1);null!=d&&(d.unshift(b),d=d.slice(0,10),localStorage.setItem(".recent",JSON.stringify(d)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(d){}return null}};
+App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var d=this.getRecent();if(null==d)d=[];else for(var f=0;f<d.length;f++)d[f].id==b.id&&d.splice(f,1);null!=d&&(d.unshift(b),d=d.slice(0,10),localStorage.setItem(".recent",JSON.stringify(d)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(d){}return null}};
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(d){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,d=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=d&&(b=(null!=d.getTitle()?d.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,d){var e=!1;try{var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(null)}),this.timeout),m=mxUtils.bind(this,function(u){window.clearTimeout(l);c&&d(u)});null==this.thumbImageCache&&(this.thumbImageCache={});var t=this.editor.graph,y=t.backgroundImage,C=null!=t.themes&&"darkTheme"==t.defaultThemeName;if(null!=this.pages&&(C||this.currentPage!=this.pages[0])){var A=t.getGlobalVariable;t=this.createTemporaryGraph(t.getStylesheet());t.setBackgroundImage=
-this.editor.graph.setBackgroundImage;var B=this.pages[0];this.currentPage==B?t.setBackgroundImage(y):null!=B.viewState&&null!=B.viewState&&(y=B.viewState.backgroundImage,t.setBackgroundImage(y));t.getGlobalVariable=function(u){return"page"==u?B.getName():"pagenumber"==u?1:A.apply(this,arguments)};t.getGlobalVariable=A;document.body.appendChild(t.container);t.model.setRoot(B.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(u){try{t!=this.editor.graph&&
-null!=t.container.parentNode&&t.container.parentNode.removeChild(t.container)}catch(H){u=null}m(u)}),b,this.thumbImageCache,"#ffffff",function(){m()},null,null,null,null,null,null,t,null,null,null,null,"diagram",null),e=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var J=document.createElement("canvas"),f=t.getGraphBounds(),g=t.view.translate,k=t.view.scale;null!=y&&(f=mxRectangle.fromRectangle(f),f.add(new mxRectangle((g.x+y.x)*k,(g.y+y.y)*k,y.width*k,y.height*k)));var n=b/f.width;
-n=Math.min(1,Math.min(3*b/(4*f.height),n));var v=Math.floor(f.x),x=Math.floor(f.y);J.setAttribute("width",Math.ceil(n*(f.width+4)));J.setAttribute("height",Math.ceil(n*(f.height+4)));var E=J.getContext("2d");E.scale(n,n);E.translate(-v,-x);var z=t.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";E.save();E.fillStyle=z;E.fillRect(v,x,Math.ceil(f.width+4),Math.ceil(f.height+4));E.restore();if(null!=y){var G=new Image;G.src=y.src;E.drawImage(G,y.x*n,y.y*n,y.width*n,y.height*n)}var F=new mxJsCanvas(J),
-U=new mxAsyncCanvas(this.thumbImageCache);F.images=this.thumbImageCache.images;var p=new mxImageExport;p.drawShape=function(u,H){u.shape instanceof mxShape&&u.shape.checkBounds()&&(H.save(),H.translate(.5,.5),u.shape.paint(H),H.translate(-.5,-.5),H.restore())};p.drawText=function(u,H){};p.drawState(t.getView().getState(t.model.root),U);U.finish(mxUtils.bind(this,function(){try{p.drawState(t.getView().getState(t.model.root),F),t!=this.editor.graph&&null!=t.container.parentNode&&t.container.parentNode.removeChild(t.container)}catch(u){J=
-null}m(J)}));e=!0}}catch(u){e=!1,null!=t&&t!=this.editor.graph&&null!=t.container.parentNode&&t.container.parentNode.removeChild(t.container)}e||window.clearTimeout(l);return e};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(d,e){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();d=null!=c?c.getMode():d;d==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):d==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
-this.appIcon.style.cursor="pointer"):d==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=d==App.MODE_DEVICE?"pointer":"default")}if(e)try{if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var l=new Date;l.setYear(l.getFullYear()+1);document.cookie="MODE="+d+"; expires="+l.toUTCString()}}catch(m){}}})();
-App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var d=this.getCurrentFile(),e=null!=d?d.getMode():null;e==App.MODE_GOOGLE?null!=d&&null!=d.desc&&null!=d.desc.parents&&0<d.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+d.desc.parents[0].id):null!=d&&null!=d.getId()?this.openLink("https://drive.google.com/open?id="+d.getId()):this.openLink("https://drive.google.com/?authuser=0"):e==App.MODE_ONEDRIVE?null!=
-d&&null!=d.meta&&null!=d.meta.webUrl?(e=d.meta.webUrl,d=encodeURIComponent(d.meta.name),e.substring(e.length-d.length,e.length)==d&&(e=e.substring(0,e.length-d.length)),this.openLink(e)):this.openLink("https://onedrive.live.com/"):e==App.MODE_DROPBOX?null!=d&&null!=d.stat&&null!=d.stat.path_display?(e="https://www.dropbox.com/home/Apps/drawio"+d.stat.path_display,mxEvent.isShiftDown(b)||(e=e.substring(0,e.length-d.stat.name.length)),this.openLink(e)):this.openLink("https://www.dropbox.com/"):e==App.MODE_TRELLO?
-this.openLink("https://trello.com/"):e==App.MODE_GITHUB?null!=d&&d.constructor==GitHubFile?this.openLink(d.meta.html_url):this.openLink("https://github.com/"):e==App.MODE_GITLAB?null!=d&&d.constructor==GitLabFile?this.openLink(d.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):e==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(b)};
+App.prototype.getThumbnail=function(b,d){var f=!1;try{var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(null)}),this.timeout),m=mxUtils.bind(this,function(v){window.clearTimeout(l);c&&d(v)});null==this.thumbImageCache&&(this.thumbImageCache={});var t=this.editor.graph,y=t.backgroundImage,C=null!=t.themes&&"darkTheme"==t.defaultThemeName;if(null!=this.pages&&(C||this.currentPage!=this.pages[0])){var A=t.getGlobalVariable;t=this.createTemporaryGraph(t.getStylesheet());t.setBackgroundImage=
+this.editor.graph.setBackgroundImage;var B=this.pages[0];this.currentPage==B?t.setBackgroundImage(y):null!=B.viewState&&null!=B.viewState&&(y=B.viewState.backgroundImage,t.setBackgroundImage(y));t.getGlobalVariable=function(v){return"page"==v?B.getName():"pagenumber"==v?1:A.apply(this,arguments)};t.getGlobalVariable=A;document.body.appendChild(t.container);t.model.setRoot(B.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(v){try{t!=this.editor.graph&&
+null!=t.container.parentNode&&t.container.parentNode.removeChild(t.container)}catch(H){v=null}m(v)}),b,this.thumbImageCache,"#ffffff",function(){m()},null,null,null,null,null,null,t,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var J=document.createElement("canvas"),e=t.getGraphBounds(),g=t.view.translate,k=t.view.scale;null!=y&&(e=mxRectangle.fromRectangle(e),e.add(new mxRectangle((g.x+y.x)*k,(g.y+y.y)*k,y.width*k,y.height*k)));var q=b/e.width;
+q=Math.min(1,Math.min(3*b/(4*e.height),q));var u=Math.floor(e.x),x=Math.floor(e.y);J.setAttribute("width",Math.ceil(q*(e.width+4)));J.setAttribute("height",Math.ceil(q*(e.height+4)));var E=J.getContext("2d");E.scale(q,q);E.translate(-u,-x);var z=t.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";E.save();E.fillStyle=z;E.fillRect(u,x,Math.ceil(e.width+4),Math.ceil(e.height+4));E.restore();if(null!=y){var G=new Image;G.src=y.src;E.drawImage(G,y.x*q,y.y*q,y.width*q,y.height*q)}var F=new mxJsCanvas(J),
+U=new mxAsyncCanvas(this.thumbImageCache);F.images=this.thumbImageCache.images;var p=new mxImageExport;p.drawShape=function(v,H){v.shape instanceof mxShape&&v.shape.checkBounds()&&(H.save(),H.translate(.5,.5),v.shape.paint(H),H.translate(-.5,-.5),H.restore())};p.drawText=function(v,H){};p.drawState(t.getView().getState(t.model.root),U);U.finish(mxUtils.bind(this,function(){try{p.drawState(t.getView().getState(t.model.root),F),t!=this.editor.graph&&null!=t.container.parentNode&&t.container.parentNode.removeChild(t.container)}catch(v){J=
+null}m(J)}));f=!0}}catch(v){f=!1,null!=t&&t!=this.editor.graph&&null!=t.container.parentNode&&t.container.parentNode.removeChild(t.container)}f||window.clearTimeout(l);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(d,f){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();d=null!=c?c.getMode():d;d==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):d==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
+this.appIcon.style.cursor="pointer"):d==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=d==App.MODE_DEVICE?"pointer":"default")}if(f)try{if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var l=new Date;l.setYear(l.getFullYear()+1);document.cookie="MODE="+d+"; expires="+l.toUTCString()}}catch(m){}}})();
+App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var d=this.getCurrentFile(),f=null!=d?d.getMode():null;f==App.MODE_GOOGLE?null!=d&&null!=d.desc&&null!=d.desc.parents&&0<d.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+d.desc.parents[0].id):null!=d&&null!=d.getId()?this.openLink("https://drive.google.com/open?id="+d.getId()):this.openLink("https://drive.google.com/?authuser=0"):f==App.MODE_ONEDRIVE?null!=
+d&&null!=d.meta&&null!=d.meta.webUrl?(f=d.meta.webUrl,d=encodeURIComponent(d.meta.name),f.substring(f.length-d.length,f.length)==d&&(f=f.substring(0,f.length-d.length)),this.openLink(f)):this.openLink("https://onedrive.live.com/"):f==App.MODE_DROPBOX?null!=d&&null!=d.stat&&null!=d.stat.path_display?(f="https://www.dropbox.com/home/Apps/drawio"+d.stat.path_display,mxEvent.isShiftDown(b)||(f=f.substring(0,f.length-d.stat.name.length)),this.openLink(f)):this.openLink("https://www.dropbox.com/"):f==App.MODE_TRELLO?
+this.openLink("https://trello.com/"):f==App.MODE_GITHUB?null!=d&&d.constructor==GitHubFile?this.openLink(d.meta.html_url):this.openLink("https://github.com/"):f==App.MODE_GITLAB?null!=d&&d.constructor==GitLabFile?this.openLink(d.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):f==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(b)};
App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};App.prototype.getDiagramId=function(){var b=window.location.hash;null!=b&&0<b.length&&(b=b.substring(1));if(null!=b&&1<b.length&&"T"==b.charAt(0)){var d=b.indexOf("#");0<d&&(b=b.substring(0,d))}return b};
-App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var d=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(d.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(e,c,l){this.spinner.stop();null==c&&(c=urlParams.title,l=!0,c=null!=c?decodeURIComponent(c):this.defaultFilename);0<(this.useCanvasForExport?
--1:".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,e,c):new LocalFile(this,e,c,l))}))}}catch(e){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
+App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var d=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(d.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(f,c,l){this.spinner.stop();null==c&&(c=urlParams.title,l=!0,c=null!=c?decodeURIComponent(c):this.defaultFilename);0<(this.useCanvasForExport?
+-1:".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,f,c):new LocalFile(this,f,c,l))}))}}catch(f){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
-App.prototype.showRefreshDialog=function(b,d){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),d||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var e=this.getCurrentFile();null!=e&&e.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
+App.prototype.showRefreshDialog=function(b,d){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),d||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&f.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
(b=this.createRealtimeNotice(),b.style.left="0",b.style.right="0",b.style.borderRadius="0",b.style.borderLeftStyle="none",b.style.borderRightStyle="none",b.style.marginBottom="26px",b.style.padding="8px 0 8px 0",this.dialog.container.appendChild(b)))};
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var d=document.createElement("div");d.className="geAlert";d.style.zIndex=2E9;d.style.left="50%";d.style.top="-100%";d.style.maxWidth="80%";d.style.width="max-content";d.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");d.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
-b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");d.appendChild(b);mxEvent.addListener(b,"click",function(e){null!=d.parentNode&&(d.parentNode.removeChild(d),mxEvent.consume(e))});document.body.appendChild(d);window.setTimeout(function(){d.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(d.style,"transition","all 2s ease");d.style.opacity="0";window.setTimeout(function(){null!=d.parentNode&&d.parentNode.removeChild(d)},
+b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");d.appendChild(b);mxEvent.addListener(b,"click",function(f){null!=d.parentNode&&(d.parentNode.removeChild(d),mxEvent.consume(f))});document.body.appendChild(d);window.setTimeout(function(){d.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(d.style,"transition","all 2s ease");d.style.opacity="0";window.setTimeout(function(){null!=d.parentNode&&d.parentNode.removeChild(d)},
2E3)},15E3)}};
App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(m,t,y,C,A){"ResizeObserver loop limit exceeded"!=m&&(EditorUi.logError("Uncaught: "+(null!=m?m:""),t,y,C,A,null,!0),b.handleError({message:m},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
function(m){var t=this.getCurrentFile();EditorUi.debug("storage event",[m],[t]);null!=t&&".draft-alive-check"==m.key&&null!=m.newValue&&null!=t.draftId&&(this.draftAliveCheck=m.newValue,t.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(m){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(m){try{this.hideDialog();
@@ -12491,109 +12504,109 @@ var t=this.getDiagramId(),y=this.getCurrentFile();null!=y&&y.getHash()==t||this.
mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var d=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var m=mxUtils.bind(this,function(C){Editor.isPngDataUrl(C)&&(C=Editor.extractGraphModelFromPng(C));var A=urlParams.title;A=null!=A?decodeURIComponent(A):
this.defaultFilename;C=new LocalFile(this,C,A,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(C.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(C);this.getCurrentFile().setModified(!this.editor.chromeless)}),t=window.opener||window.parent;if(t!=window){var y=urlParams.create;null!=y?m(t[decodeURIComponent(y)]):(y=urlParams.data,null!=y?m(decodeURIComponent(y)):this.installMessageHandler(mxUtils.bind(this,function(C,A){A.source==t&&m(C)})))}}else if(null==
this.dialog)if("1"==urlParams.demo)y=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=y;else{y=!1;try{y=null!=window.opener&&null!=window.opener.openFile}catch(C){}y?this.spinner.spin(document.body,mxResources.get("loading")):(y=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=y&&0!=y.length||this.editor.isChromelessView()?null!=y&&0<y.length?this.loadFile(y,null,null,mxUtils.bind(this,
-function(){var C=decodeURIComponent(urlParams.viewbox||"");if(""!=C)try{var A=JSON.parse(C);this.editor.graph.fitWindow(A,A.border)}catch(B){console.error(B)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),e=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=e&&0<e.length&&this.spinner.spin(document.body,
+function(){var C=decodeURIComponent(urlParams.viewbox||"");if(""!=C)try{var A=JSON.parse(C);this.editor.graph.fitWindow(A,A.border)}catch(B){console.error(B)}})):"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"]))}),l=mxUtils.bind(this,function(m){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,m,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var t=urlParams.title;t=null!=t?decodeURIComponent(t):this.defaultFilename;m=this.getServiceCount(!0);isLocalStorage&&m++;var y=4>=
m?2:6<m?4:3;t=new CreateDialog(this,t,mxUtils.bind(this,function(C,A){if(null==A){this.hideDialog();var B=Editor.useLocalStorage;this.createFile(0<C.length?C:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=B}else this.pickFolder(A,mxUtils.bind(this,function(J){this.createFile(C,this.getFileData(!0),null,A,null,!0,J)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,y,null,null,null,this.editor.fileExtensions);this.showDialog(t.container,420,m>y?
-390:280,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&this.showSplash()}));t.init()}});e=decodeURIComponent(e);if("http://"!=e.substring(0,7)&&"https://"!=e.substring(0,8))try{null!=window.opener&&null!=window.opener[e]?l(window.opener[e]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}else this.loadTemplate(e,function(m){l(m)},mxUtils.bind(this,function(m){this.handleError(m,mxResources.get("errorLoadingFile"),
+390:280,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&this.showSplash()}));t.init()}});f=decodeURIComponent(f);if("http://"!=f.substring(0,7)&&"https://"!=f.substring(0,8))try{null!=window.opener&&null!=window.opener[f]?l(window.opener[f]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}else this.loadTemplate(f,function(m){l(m)},mxUtils.bind(this,function(m){this.handleError(m,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),
-d())}}catch(m){this.handleError(m)}};App.prototype.loadDraft=function(b,d){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var e=this.getCurrentFile();null!=e&&(e.fileChanged(),null!=d&&d())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,d,e){function c(){e(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(m){EditorUi.debug("App.filterDrafts",[this],"items",m);for(var t=0;t<m.length;t++)try{var y=m[t].key;if(null!=y&&".draft_"==y.substring(0,7)){var C=JSON.parse(m[t].data);null!=C&&"draft"==C.type&&C.aliveCheck!=d&&(null==b&&null==C.fileObject||null!=C.fileObject&&C.fileObject.path==b)&&(C.key=y,l.push(C))}}catch(A){}c()},c))}catch(m){c()}};
-App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(d){if(1==d.length)this.loadDraft(d[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[0].key)}));else if(1<d.length){var e=new Date(d[0].modified);e=new DraftDialog(this,1<d.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
-[e.toLocaleDateString()+" "+e.toLocaleTimeString()]),1<d.length?null:d[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c?c:0;this.loadDraft(d[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[c].key)}))}),mxUtils.bind(this,function(c,l){c=""!=c?c:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(d[c].key);null!=l&&l()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<d.length?d:null);this.showDialog(e.container,
-640,480,!0,!1,mxUtils.bind(this,function(c){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));e.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(d){}};
-App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var d=this.getServiceCount(!0),e=mxUtils.bind(this,function(){var l=new SplashDialog(this);this.showDialog(l.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(m){m&&!mxClient.IS_CHROMEAPP&&(m=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=m)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&e();else{b=4==d?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();e()}),b);this.showDialog(c.container,3>b?200:300,3<d?320:210,!0,!1)}}};
-App.prototype.addLanguageMenu=function(b,d,e){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor=
-"pointer",c.style.bottom="20px",c.style.right=null!=e?e:"22px",d&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=e?e:"24px",d=document.createElement("span"),d.style.display="inline-block",d.style.fontSize="12px",d.style.margin="2px 24px 0 0",d.style.userSelect="none",mxUtils.write(d,mxResources.get("language")),c.appendChild(d),d.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
+d())}}catch(m){this.handleError(m)}};App.prototype.loadDraft=function(b,d){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!=d&&d())}),0)}),null,null,!0)};
+App.prototype.filterDrafts=function(b,d,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(m){EditorUi.debug("App.filterDrafts",[this],"items",m);for(var t=0;t<m.length;t++)try{var y=m[t].key;if(null!=y&&".draft_"==y.substring(0,7)){var C=JSON.parse(m[t].data);null!=C&&"draft"==C.type&&C.aliveCheck!=d&&(null==b&&null==C.fileObject||null!=C.fileObject&&C.fileObject.path==b)&&(C.key=y,l.push(C))}}catch(A){}c()},c))}catch(m){c()}};
+App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(d){if(1==d.length)this.loadDraft(d[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[0].key)}));else if(1<d.length){var f=new Date(d[0].modified);f=new DraftDialog(this,1<d.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
+[f.toLocaleDateString()+" "+f.toLocaleTimeString()]),1<d.length?null:d[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c?c:0;this.loadDraft(d[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[c].key)}))}),mxUtils.bind(this,function(c,l){c=""!=c?c:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(d[c].key);null!=l&&l()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<d.length?d:null);this.showDialog(f.container,
+640,480,!0,!1,mxUtils.bind(this,function(c){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));f.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(d){}};
+App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var d=this.getServiceCount(!0),f=mxUtils.bind(this,function(){var l=new SplashDialog(this);this.showDialog(l.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(m){m&&!mxClient.IS_CHROMEAPP&&(m=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=m)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&f();else{b=4==d?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();f()}),b);this.showDialog(c.container,3>b?200:300,3<d?320:210,!0,!1)}}};
+App.prototype.addLanguageMenu=function(b,d,f){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor=
+"pointer",c.style.bottom="20px",c.style.right=null!=f?f:"22px",d&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=f?f:"24px",d=document.createElement("span"),d.style.display="inline-block",d.style.fontSize="12px",d.style.margin="2px 24px 0 0",d.style.userSelect="none",mxUtils.write(d,mxResources.get("language")),c.appendChild(d),d.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
var m=new mxPopupMenu(this.menus.get("language").funct);m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);m.destroy()});var t=mxUtils.getOffset(c);m.popup(t.x,t.y+c.offsetHeight,null,l);this.setCurrentMenu(m)})),b.appendChild(c));return c};
-App.prototype.loadFileSystemEntry=function(b,d,e){e=null!=e?e:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(m){try{if(null!=d){var t=m.target.result;"image/png"==c.type&&(t=this.extractGraphModelFromPng(t));d(new LocalFile(this,t,c.name,null,b,c))}else this.openFileHandle(m.target.result,c.name,c,!1,b)}catch(y){e(y)}});l.onerror=e;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||
-"image/svg"===c.type.substring(0,9)?l.readAsText(c):l.readAsDataURL(c)}),e)}catch(c){e(c)}};
-App.prototype.createFileSystemOptions=function(b){var d=[],e=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(e=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var l={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};l.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==e?d.splice(0,0,
-l):this.editor.diagramFileTypes[c].extension==e?d.splice(0,0,l):d.push(l)}return{types:d,fileName:b}};App.prototype.showSaveFilePicker=function(b,d,e){d=null!=d?d:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});e=null!=e?e:this.createFileSystemOptions();window.showSaveFilePicker(e).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(l){b(c,l)}),d)}),d)};
+App.prototype.loadFileSystemEntry=function(b,d,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(m){try{if(null!=d){var t=m.target.result;"image/png"==c.type&&(t=this.extractGraphModelFromPng(t));d(new LocalFile(this,t,c.name,null,b,c))}else this.openFileHandle(m.target.result,c.name,c,!1,b)}catch(y){f(y)}});l.onerror=f;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||
+"image/svg"===c.type.substring(0,9)?l.readAsText(c):l.readAsDataURL(c)}),f)}catch(c){f(c)}};
+App.prototype.createFileSystemOptions=function(b){var d=[],f=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(f=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var l={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};l.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==f?d.splice(0,0,
+l):this.editor.diagramFileTypes[c].extension==f?d.splice(0,0,l):d.push(l)}return{types:d,fileName:b}};App.prototype.showSaveFilePicker=function(b,d,f){d=null!=d?d:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});f=null!=f?f:this.createFileSystemOptions();window.showSaveFilePicker(f).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(l){b(c,l)}),d)}),d)};
App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var d=this.getPeerForMode(b);if(null!=d)d.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(t){null!=t&&0<t.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(t[0])}),
-mxUtils.bind(this,function(t){"AbortError"!=t.name&&this.handleError(t)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var e=document.createElement("input");e.setAttribute("type","file");mxEvent.addListener(e,"change",mxUtils.bind(this,function(){null!=e.files&&(this.openFiles(e.files),e.type="",e.type="file",e.value="")}));e.style.display="none";document.body.appendChild(e);this.openFileInputElt=e}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
+mxUtils.bind(this,function(t){"AbortError"!=t.name&&this.handleError(t)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.openFiles(f.files),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.openFileInputElt=f}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(t,y){StorageFile.listFiles(this,"F",t,y)});window.openBrowserFile=mxUtils.bind(this,function(t,y,C){StorageFile.getFileContent(this,t,y,C)});window.deleteBrowserFile=mxUtils.bind(this,function(t,y,C){StorageFile.deleteFile(this,t,y,C)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
function(t,y){var C=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=y.substring(y.length-4)||(y=y.substring(0,y.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,t,y):new LocalFile(this,t,y))}),A=this.getCurrentFile();null!=A&&A.isModified()?this.confirm(mxResources.get("allChangesLost"),null,C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()}));var l=this.dialog,m=l.close;this.dialog.close=mxUtils.bind(this,function(t){Editor.useLocalStorage=
c;m.apply(l,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(t){this.handleError(t)}};
App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var d=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=d&&d.pickLibrary(mxUtils.bind(this,function(l,m){if(null!=m)try{this.loadLibrary(m)}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&d.getLibrary(l,mxUtils.bind(this,function(t){this.spinner.stop();try{this.loadLibrary(t)}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(t){this.handleError(t,null!=t?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var e=document.createElement("input");e.setAttribute("type","file");mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if(null!=
-e.files){for(var l=0;l<e.files.length;l++)mxUtils.bind(this,function(m){var t=new FileReader;t.onload=mxUtils.bind(this,function(y){try{this.loadLibrary(new LocalLibrary(this,y.target.result,m.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}});t.readAsText(m)})(e.files[l]);e.type="";e.type="file";e.value=""}}));e.style.display="none";document.body.appendChild(e);this.libFileInputElt=e}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxResources.get("loading"))&&d.getLibrary(l,mxUtils.bind(this,function(t){this.spinner.stop();try{this.loadLibrary(t)}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(t){this.handleError(t,null!=t?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if(null!=
+f.files){for(var l=0;l<f.files.length;l++)mxUtils.bind(this,function(m){var t=new FileReader;t.onload=mxUtils.bind(this,function(y){try{this.loadLibrary(new LocalLibrary(this,y.target.result,m.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}});t.readAsText(m)})(f.files[l]);f.type="";f.type="file";f.value=""}}));f.style.display="none";document.body.appendChild(f);this.libFileInputElt=f}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
mxUtils.bind(this,function(l,m){StorageFile.listFiles(this,"L",l,m)});window.openBrowserFile=mxUtils.bind(this,function(l,m,t){StorageFile.getFileContent(this,l,m,t)});window.deleteBrowserFile=mxUtils.bind(this,function(l,m,t){StorageFile.deleteFile(this,l,m,t)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(l){this.hideDialog(l)}));window.openFile.setConsumer(mxUtils.bind(this,function(l,m){try{this.loadLibrary(b==
App.MODE_BROWSER?new StorageLibrary(this,l,m):new LocalLibrary(this,l,m))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=c;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,d,e,c,l,m,t){try{c=null!=c?c:this.mode;l=null!=l?l:!1;m=null!=m?m:!1;var y=this.createLibraryDataFromImages(d),C=mxUtils.bind(this,function(J){this.spinner.stop();null!=t&&t();this.handleError(J,null!=J?mxResources.get("errorSavingFile"):null)});null==e&&c==App.MODE_DEVICE&&(e=new LocalLibrary(this,y,b));if(null==e)this.pickFolder(c,mxUtils.bind(this,function(J){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,y,J,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,d)}),C,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,y,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,d)}),C,J):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-y,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,d)}),C,J):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,y,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,d)}),C,J):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,y,mxUtils.bind(this,function(f){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(f,d)}),C,J):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,y,mxUtils.bind(this,function(f){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(f,d)}),C,J):c==App.MODE_BROWSER?(J=mxUtils.bind(this,function(){var f=new StorageLibrary(this,y,b);f.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(f,d)}),C)}),null==localStorage.getItem(b)?
-J():this.confirm(mxResources.get("replaceIt",[b]),J)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){e.setData(y);var A=mxUtils.bind(this,function(){e.save(!0,mxUtils.bind(this,function(J){this.spinner.stop();this.hideDialog(!0);m||this.libraryLoaded(e,d);null!=t&&t()}),C)});if(b!=e.getTitle()){var B=e.getHash();e.rename(b,mxUtils.bind(this,function(J){e.constructor!=LocalLibrary&&B!=e.getHash()&&
-(mxSettings.removeCustomLibrary(B),mxSettings.addCustomLibrary(e.getHash()));this.removeLibrarySidebar(B);A()}),C)}else A()}}catch(J){this.handleError(J)}};
-App.prototype.saveFile=function(b,d){var e=this.getCurrentFile();if(null!=e){var c=mxUtils.bind(this,function(){EditorUi.enableDrafts&&e.removeDraft();this.getCurrentFile()==e||e.isModified()||(e.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=d&&d()});if(b||null==e.getTitle()||null!=e.invalidFileHandle||null==this.mode)if(null!=e&&e.constructor==LocalFile&&null!=e.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
-function(C,A){e.invalidFileHandle=null;e.fileHandle=C;e.title=A.name;e.desc=A;this.save(A.name,c)}),null,this.createFileSystemOptions(e.getTitle()));else{var l=null!=e.getTitle()?e.getTitle():this.defaultFilename,m=!mxClient.IS_IOS||!navigator.standalone,t=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var y=4>=b?2:6<b?4:3;l=new CreateDialog(this,l,mxUtils.bind(this,function(C,A,B){null!=C&&0<C.length&&(/(\.pdf)$/i.test(C)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
-function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){B.value=C.split(".").slice(0,-1).join(".");B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==t&&A==App.MODE_DEVICE?null!=e&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(J,f){e.fileHandle=J;e.mode=App.MODE_DEVICE;e.title=f.name;
-e.desc=f;this.setMode(App.MODE_DEVICE);this.save(f.name,c)}),mxUtils.bind(this,function(J){"AbortError"!=J.name&&this.handleError(J)}),this.createFileSystemOptions(C)):(this.setMode(App.MODE_DEVICE),this.save(C,c)):"download"==A?(new LocalFile(this,null,C)).save():"_blank"==A?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):t!=A?this.pickFolder(A,mxUtils.bind(this,function(J){this.createFile(C,
-this.getFileData(/(\.xml)$/i.test(C)||0>C.indexOf(".")||/(\.drawio)$/i.test(C),/(\.svg)$/i.test(C),/(\.html)$/i.test(C)),null,A,c,null==this.mode,J)})):null!=A&&this.save(C,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,m,null,!0,y,null,null,null,this.editor.fileExtensions,!1);this.showDialog(l.container,420,b>y?390:280,!0,!0);l.init()}else this.save(e.getTitle(),c)}};
-App.prototype.loadTemplate=function(b,d,e,c,l){var m=!1,t=b,y=null!=c?c:b,C=/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y);c=/\.png$/i.test(y)||/\.pdf$/i.test(y);this.editor.isCorsEnabledForUrl(t)||(m=c||C,t="t="+(new Date).getTime(),t=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+t+(m?"&base64=1":""));this.editor.loadUrl(t,mxUtils.bind(this,function(A){try{var B=m?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(A):atob(A):A;if(C||this.isVisioData(B))C||(y=l?this.isRemoteVisioData(B)?
-"raw.vss":"raw.vssx":this.isRemoteVisioData(B)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(J){d(J)},e,y);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(B,y))this.isExternalDataComms()?this.parseFileData(B,mxUtils.bind(this,function(J){4==J.readyState&&200<=J.status&&299>=J.status&&"<mxGraphModel"==J.responseText.substring(0,13)&&d(J.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,e);
-else if(this.isLucidChartData(B))this.convertLucidChart(B,mxUtils.bind(this,function(J){d(J)}),mxUtils.bind(this,function(J){e(J)}));else{if(/(\.png)($|\?)/i.test(y)||Editor.isPngData(B))B=Editor.extractGraphModelFromPng(A);d(B)}}catch(J){e(J)}}),e,/(\.png)($|\?)/i.test(y)||/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y),null,null,m)};
+App.prototype.saveLibrary=function(b,d,f,c,l,m,t){try{c=null!=c?c:this.mode;l=null!=l?l:!1;m=null!=m?m:!1;var y=this.createLibraryDataFromImages(d),C=mxUtils.bind(this,function(J){this.spinner.stop();null!=t&&t();this.handleError(J,null!=J?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,y,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(J){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,y,J,mxUtils.bind(this,function(e){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(e,d)}),C,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,y,mxUtils.bind(this,function(e){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(e,d)}),C,J):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+y,mxUtils.bind(this,function(e){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(e,d)}),C,J):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,y,mxUtils.bind(this,function(e){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(e,d)}),C,J):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,y,mxUtils.bind(this,function(e){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(e,d)}),C,J):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,y,mxUtils.bind(this,function(e){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(e,d)}),C,J):c==App.MODE_BROWSER?(J=mxUtils.bind(this,function(){var e=new StorageLibrary(this,y,b);e.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(e,d)}),C)}),null==localStorage.getItem(b)?
+J():this.confirm(mxResources.get("replaceIt",[b]),J)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(y);var A=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(J){this.spinner.stop();this.hideDialog(!0);m||this.libraryLoaded(f,d);null!=t&&t()}),C)});if(b!=f.getTitle()){var B=f.getHash();f.rename(b,mxUtils.bind(this,function(J){f.constructor!=LocalLibrary&&B!=f.getHash()&&
+(mxSettings.removeCustomLibrary(B),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(B);A()}),C)}else A()}}catch(J){this.handleError(J)}};
+App.prototype.saveFile=function(b,d){var f=this.getCurrentFile();if(null!=f){var c=mxUtils.bind(this,function(){EditorUi.enableDrafts&&f.removeDraft();this.getCurrentFile()==f||f.isModified()||(f.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=d&&d()});if(b||null==f.getTitle()||null!=f.invalidFileHandle||null==this.mode)if(null!=f&&f.constructor==LocalFile&&null!=f.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
+function(C,A){f.invalidFileHandle=null;f.fileHandle=C;f.title=A.name;f.desc=A;this.save(A.name,c)}),null,this.createFileSystemOptions(f.getTitle()));else{var l=null!=f.getTitle()?f.getTitle():this.defaultFilename,m=!mxClient.IS_IOS||!navigator.standalone,t=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var y=4>=b?2:6<b?4:3;l=new CreateDialog(this,l,mxUtils.bind(this,function(C,A,B){null!=C&&0<C.length&&(/(\.pdf)$/i.test(C)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
+function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){B.value=C.split(".").slice(0,-1).join(".");B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==t&&A==App.MODE_DEVICE?null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(J,e){f.fileHandle=J;f.mode=App.MODE_DEVICE;f.title=e.name;
+f.desc=e;this.setMode(App.MODE_DEVICE);this.save(e.name,c)}),mxUtils.bind(this,function(J){"AbortError"!=J.name&&this.handleError(J)}),this.createFileSystemOptions(C)):(this.setMode(App.MODE_DEVICE),this.save(C,c)):"download"==A?(new LocalFile(this,null,C)).save():"_blank"==A?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):t!=A?this.pickFolder(A,mxUtils.bind(this,function(J){this.createFile(C,
+this.getFileData(/(\.xml)$/i.test(C)||0>C.indexOf(".")||/(\.drawio)$/i.test(C),/(\.svg)$/i.test(C),/(\.html)$/i.test(C)),null,A,c,null==this.mode,J)})):null!=A&&this.save(C,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,m,null,!0,y,null,null,null,this.editor.fileExtensions,!1);this.showDialog(l.container,420,b>y?390:280,!0,!0);l.init()}else this.save(f.getTitle(),c)}};
+App.prototype.loadTemplate=function(b,d,f,c,l){var m=!1,t=b,y=null!=c?c:b,C=/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y);c=/\.png$/i.test(y)||/\.pdf$/i.test(y);this.editor.isCorsEnabledForUrl(t)||(m=c||C,t="t="+(new Date).getTime(),t=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+t+(m?"&base64=1":""));this.editor.loadUrl(t,mxUtils.bind(this,function(A){try{var B=m?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(A):atob(A):A;if(C||this.isVisioData(B))C||(y=l?this.isRemoteVisioData(B)?
+"raw.vss":"raw.vssx":this.isRemoteVisioData(B)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(J){d(J)},f,y);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(B,y))this.isExternalDataComms()?this.parseFileData(B,mxUtils.bind(this,function(J){4==J.readyState&&200<=J.status&&299>=J.status&&"<mxGraphModel"==J.responseText.substring(0,13)&&d(J.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f);
+else if(this.isLucidChartData(B))this.convertLucidChart(B,mxUtils.bind(this,function(J){d(J)}),mxUtils.bind(this,function(J){f(J)}));else{if(/(\.png)($|\?)/i.test(y)||Editor.isPngData(B))B=Editor.extractGraphModelFromPng(A);d(B)}}catch(J){f(J)}}),f,/(\.png)($|\?)/i.test(y)||/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y),null,null,m)};
App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(b,d,e,c,l,m,t,y,C){c=y?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var A=mxUtils.bind(this,function(){this.spinner.stop()}),B=mxUtils.bind(this,function(J){A();null==J&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=J&&this.handleError(J)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==t&&null!=this.stateArg&&null!=this.stateArg.folderId&&(t=this.stateArg.folderId),
-this.drive.insertFile(b,d,t,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,l,C)}),B)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,l,C)}),B,!1,t):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,l,C)}),B,!1,t):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,l,C)}),B,
-!1,t):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,l,C)}),B):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,l,C)}),B,!1,t):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,e,m,l,C)}),B):!y&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(A(),this.showSaveFilePicker(mxUtils.bind(this,
-function(J,f){var g=new LocalFile(this,d,f.name,null,J,f);g.saveFile(f.name,!1,mxUtils.bind(this,function(){this.fileCreated(g,e,m,l,C)}),B,!0)}),mxUtils.bind(this,function(J){"AbortError"!=J.name&&B(J)}),this.createFileSystemOptions(b))):(A(),this.fileCreated(new LocalFile(this,d,b,null==c),e,m,l,C))}catch(J){A(),this.handleError(J)}}};
-App.prototype.fileCreated=function(b,d,e,c,l){var m=window.location.pathname;null!=d&&0<d.length&&(m+="?libs="+d);null!=l&&0<l.length&&(m+="?clibs="+l);m=this.getUrl(m);b.getMode()!=App.MODE_DEVICE&&(m+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var t=b.getData();t=0<t.length?this.editor.extractGraphModel(mxUtils.parseXml(t).documentElement,!0):null;var y=window.location.protocol+"//"+window.location.hostname+m,C=t,A=null;null!=t&&/\.svg$/i.test(b.getTitle())&&
-(A=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(A.container),C=this.decodeNodeIntoGraph(C,A));b.setData(this.createFileData(t,A,b,y));null!=A&&A.container.parentNode.removeChild(A.container);var B=mxUtils.bind(this,function(){this.spinner.stop()}),J=mxUtils.bind(this,function(){B();var f=this.getCurrentFile();null==e&&null!=f&&(e=!f.isModified()&&null==f.getMode());var g=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);e&&b.addAllSavedStatus();
-null!=d&&this.sidebar.showEntries(d);if(null!=l){for(var n=[],v=l.split(";"),x=0;x<v.length;x++)n.push(decodeURIComponent(v[x]));this.loadLibraries(n)}}),k=mxUtils.bind(this,function(){e||null==f||!f.isModified()?g():this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==e||e?k():(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(m,null,k))});b.constructor==LocalFile?J():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){J()}),mxUtils.bind(this,function(f){B();null!=f&&"AbortError"==f.name||this.handleError(f)}))}};
-App.prototype.loadFile=function(b,d,e,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)d=!0;this.hideDialog();var m=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 C=mxUtils.bind(this,function(g){this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var k=this.getCurrentFile();
-window.location.hash=null!=k?k.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(g){null!=g?(this.fileLoaded(new StorageFile(this,g,b)),null!=c&&c()):C({message:mxResources.get("fileNotFound")})}),C)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}));else if(null!=e)this.spinner.stop(),
-this.fileLoaded(e),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 A=decodeURIComponent(b.substring(1));"<"!=A.charAt(0)&&(A=Graph.decompress(A));A=new LocalFile(this,A,null!=urlParams.title?decodeURIComponent(urlParams.title):
+App.prototype.createFile=function(b,d,f,c,l,m,t,y,C){c=y?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){d=null!=d?d:this.emptyDiagramXml;var A=mxUtils.bind(this,function(){this.spinner.stop()}),B=mxUtils.bind(this,function(J){A();null==J&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=J&&this.handleError(J)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==t&&null!=this.stateArg&&null!=this.stateArg.folderId&&(t=this.stateArg.folderId),
+this.drive.insertFile(b,d,t,mxUtils.bind(this,function(J){A();this.fileCreated(J,f,m,l,C)}),B)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,f,m,l,C)}),B,!1,t):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,f,m,l,C)}),B,!1,t):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,f,m,l,C)}),B,
+!1,t):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,f,m,l,C)}),B):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,f,m,l,C)}),B,!1,t):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,d,mxUtils.bind(this,function(J){A();this.fileCreated(J,f,m,l,C)}),B):!y&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(A(),this.showSaveFilePicker(mxUtils.bind(this,
+function(J,e){var g=new LocalFile(this,d,e.name,null,J,e);g.saveFile(e.name,!1,mxUtils.bind(this,function(){this.fileCreated(g,f,m,l,C)}),B,!0)}),mxUtils.bind(this,function(J){"AbortError"!=J.name&&B(J)}),this.createFileSystemOptions(b))):(A(),this.fileCreated(new LocalFile(this,d,b,null==c),f,m,l,C))}catch(J){A(),this.handleError(J)}}};
+App.prototype.fileCreated=function(b,d,f,c,l){var m=window.location.pathname;null!=d&&0<d.length&&(m+="?libs="+d);null!=l&&0<l.length&&(m+="?clibs="+l);m=this.getUrl(m);b.getMode()!=App.MODE_DEVICE&&(m+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var t=b.getData();t=0<t.length?this.editor.extractGraphModel(mxUtils.parseXml(t).documentElement,!0):null;var y=window.location.protocol+"//"+window.location.hostname+m,C=t,A=null;null!=t&&/\.svg$/i.test(b.getTitle())&&
+(A=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(A.container),C=this.decodeNodeIntoGraph(C,A));b.setData(this.createFileData(t,A,b,y));null!=A&&A.container.parentNode.removeChild(A.container);var B=mxUtils.bind(this,function(){this.spinner.stop()}),J=mxUtils.bind(this,function(){B();var e=this.getCurrentFile();null==f&&null!=e&&(f=!e.isModified()&&null==e.getMode());var g=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);f&&b.addAllSavedStatus();
+null!=d&&this.sidebar.showEntries(d);if(null!=l){for(var q=[],u=l.split(";"),x=0;x<u.length;x++)q.push(decodeURIComponent(u[x]));this.loadLibraries(q)}}),k=mxUtils.bind(this,function(){f||null==e||!e.isModified()?g():this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?k():(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(m,null,k))});b.constructor==LocalFile?J():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){J()}),mxUtils.bind(this,function(e){B();null!=e&&"AbortError"==e.name||this.handleError(e)}))}};
+App.prototype.loadFile=function(b,d,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)d=!0;this.hideDialog();var m=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 C=mxUtils.bind(this,function(g){this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var k=this.getCurrentFile();
+window.location.hash=null!=k?k.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(g){null!=g?(this.fileLoaded(new StorageFile(this,g,b)),null!=c&&c()):C({message:mxResources.get("fileNotFound")})}),C)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.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 A=decodeURIComponent(b.substring(1));"<"!=A.charAt(0)&&(A=Graph.decompress(A));A=new LocalFile(this,A,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);A.getHash=function(){return b};this.fileLoaded(A);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(g,k){this.spinner.stop();this.fileLoaded(new EmbedFile(this,g,k));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var B=decodeURIComponent(b.substring(1)),J=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=B.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var g=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var k=B.substring(31,B.lastIndexOf("&ex"));this.loadFile("G"+k,d,null,mxUtils.bind(this,function(){var n=this.getCurrentFile();null!=n&&this.editor.chromeless&&
-!this.editor.editable&&(n.getHash=function(){return"G"+k},window.location.hash="#"+n.getHash());null!=c&&c()}));return!0}return!1});!g()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",g);return!0});this.loadTemplate(B,mxUtils.bind(this,function(g){this.spinner.stop();if(null!=g&&0<g.length){var k=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var n=B,v=B.lastIndexOf("."),x=n.lastIndexOf("/");v>x&&0<x&&(n=n.substring(x+1,v),v=B.substring(v),
-this.useCanvasForExport||".png"!=v||(v=".drawio"),".svg"===v||".xml"===v||".html"===v||".png"===v||".drawio"===v)&&(k=n+v)}g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):k,!0);g.getHash=function(){return b};this.fileLoaded(g,!0)?null!=c&&c():J()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else J()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var B=decodeURIComponent(b.substring(1)),J=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=B.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var g=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var k=B.substring(31,B.lastIndexOf("&ex"));this.loadFile("G"+k,d,null,mxUtils.bind(this,function(){var q=this.getCurrentFile();null!=q&&this.editor.chromeless&&
+!this.editor.editable&&(q.getHash=function(){return"G"+k},window.location.hash="#"+q.getHash());null!=c&&c()}));return!0}return!1});!g()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",g);return!0});this.loadTemplate(B,mxUtils.bind(this,function(g){this.spinner.stop();if(null!=g&&0<g.length){var k=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var q=B,u=B.lastIndexOf("."),x=q.lastIndexOf("/");u>x&&0<x&&(q=q.substring(x+1,u),u=B.substring(u),
+this.useCanvasForExport||".png"!=u||(u=".drawio"),".svg"===u||".xml"===u||".html"===u||".png"===u||".drawio"===u)&&(k=q+u)}g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):k,!0);g.getHash=function(){return b};this.fileLoaded(g,!0)?null!=c&&c():J()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else J()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){J()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(A=null,"G"==b.charAt(0)?A=this.drive:"D"==b.charAt(0)?A=this.dropbox:"W"==b.charAt(0)?A=this.oneDrive:"H"==b.charAt(0)?A=this.gitHub:"A"==b.charAt(0)?A=this.gitLab:"T"==b.charAt(0)&&(A=this.trello),null==A)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}));else{var f=b.charAt(0);b=decodeURIComponent(b.substring(1));A.getFile(b,mxUtils.bind(this,function(g){this.spinner.stop();this.fileLoaded(g);var k=this.getCurrentFile();null==k?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(k.getHash=function(){return f+b},window.location.hash="#"+k.getHash()):g==k&&null==g.getMode()&&
-(g=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+g+'" class="geStatusAlert">'+g+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(g){null!=window.console&&null!=g&&console.log("error in loadFile:",b,g);var k=mxUtils.bind(this,function(){var n=this.getCurrentFile();null==n?(window.location.hash="",this.showSplash()):window.location.hash="#"+n.getHash()});null==g||"AbortError"!=g.name?this.handleError(g,null!=g?mxResources.get("errorLoadingFile"):null,k,null,null,"#"+f+b):k()}))}}),
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}));else{var e=b.charAt(0);b=decodeURIComponent(b.substring(1));A.getFile(b,mxUtils.bind(this,function(g){this.spinner.stop();this.fileLoaded(g);var k=this.getCurrentFile();null==k?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(k.getHash=function(){return e+b},window.location.hash="#"+k.getHash()):g==k&&null==g.getMode()&&
+(g=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+g+'" class="geStatusAlert">'+g+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(g){null!=window.console&&null!=g&&console.log("error in loadFile:",b,g);var k=mxUtils.bind(this,function(){var q=this.getCurrentFile();null==q?(window.location.hash="",this.showSplash()):window.location.hash="#"+q.getHash()});null==g||"AbortError"!=g.name?this.handleError(g,null!=g?mxResources.get("errorLoadingFile"):null,k,null,null,"#"+e+b):k()}))}}),
t=this.getCurrentFile(),y=mxUtils.bind(this,function(){l||null==t||!t.isModified()?m():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=t&&(window.location.hash=t.getHash())}),m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?y():null==t||d?y():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,y)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var d=b.getTitle();b.constructor!=LocalLibrary&&(d+="\n"+b.getHash());b.constructor==DriveLibrary?d+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?d+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?d+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?d+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?d+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?d+=" ("+
-mxResources.get("browser")+")":b.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d};App.prototype.restoreLibraries=function(){function b(e){for(var c=0;c<e.length;c++)""!=e[c]&&0>mxUtils.indexOf(d,e[c])&&d.push(e[c])}var d=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(d)};
-App.prototype.loadLibraries=function(b,d){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var e=mxUtils.bind(this,function(A,B){B||mxSettings.removeCustomLibrary(A);delete this.loadedLibraries[A]}),c=0,l=[],m=0<b.length&&"L.scratchpad"==b[0]?1:0,t=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var A=b.length-1;0<=A;A--)null!=l[A]&&this.loadLibrary(l[A],A<=m);null!=d&&d()}});if(null!=b)for(var y=0;y<b.length;y++){var C=encodeURIComponent(decodeURIComponent(b[y]));
-mxUtils.bind(this,function(A,B){if(null!=A&&0<A.length&&null==this.loadedLibraries[A]&&null==this.sidebar.palettes[A]){this.loadedLibraries[A]=!0;c++;var J=mxUtils.bind(this,function(x){l[B]=x;c--;t()}),f=mxUtils.bind(this,function(x){e(A,x);c--;t()}),g=A.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var x=decodeURIComponent(A.substring(1));StorageFile.getFileContent(this,x,mxUtils.bind(this,function(E){".scratchpad"==x&&null==
-E&&(E=this.emptyLibraryXml);null!=E?J(new StorageLibrary(this,E,x)):f()}),f)}catch(E){f()}}),0);else if("U"==g){var k=decodeURIComponent(A.substring(1));this.isOffline()||this.loadTemplate(k,mxUtils.bind(this,function(x){null!=x&&0<x.length?J(new UrlLibrary(this,x,k)):f()}),function(){f()},null,!0)}else if("R"==g){g=decodeURIComponent(A.substring(1));try{g=JSON.parse(g);var n={id:g[0],title:g[1],downloadUrl:g[2]};this.remoteInvoke("getFileContent",[n.downloadUrl],null,mxUtils.bind(this,function(x){try{J(new RemoteLibrary(this,
-x,n))}catch(E){f()}}),function(){f()})}catch(x){f()}}else if("S"==g&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(A.substring(1)),function(x){J(x)},f)}catch(x){f()}else{var v=null;"G"==g?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(v=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==g&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(A.substring(1)),mxUtils.bind(this,function(x){try{J(x)}catch(E){f()}}),function(x){f()}):f(!0)}}})(C,y)}t()}};
+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(d,f[c])&&d.push(f[c])}var d=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(d)};
+App.prototype.loadLibraries=function(b,d){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(A,B){B||mxSettings.removeCustomLibrary(A);delete this.loadedLibraries[A]}),c=0,l=[],m=0<b.length&&"L.scratchpad"==b[0]?1:0,t=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var A=b.length-1;0<=A;A--)null!=l[A]&&this.loadLibrary(l[A],A<=m);null!=d&&d()}});if(null!=b)for(var y=0;y<b.length;y++){var C=encodeURIComponent(decodeURIComponent(b[y]));
+mxUtils.bind(this,function(A,B){if(null!=A&&0<A.length&&null==this.loadedLibraries[A]&&null==this.sidebar.palettes[A]){this.loadedLibraries[A]=!0;c++;var J=mxUtils.bind(this,function(x){l[B]=x;c--;t()}),e=mxUtils.bind(this,function(x){f(A,x);c--;t()}),g=A.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var x=decodeURIComponent(A.substring(1));StorageFile.getFileContent(this,x,mxUtils.bind(this,function(E){".scratchpad"==x&&null==
+E&&(E=this.emptyLibraryXml);null!=E?J(new StorageLibrary(this,E,x)):e()}),e)}catch(E){e()}}),0);else if("U"==g){var k=decodeURIComponent(A.substring(1));this.isOffline()||this.loadTemplate(k,mxUtils.bind(this,function(x){null!=x&&0<x.length?J(new UrlLibrary(this,x,k)):e()}),function(){e()},null,!0)}else if("R"==g){g=decodeURIComponent(A.substring(1));try{g=JSON.parse(g);var q={id:g[0],title:g[1],downloadUrl:g[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,function(x){try{J(new RemoteLibrary(this,
+x,q))}catch(E){e()}}),function(){e()})}catch(x){e()}}else if("S"==g&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(A.substring(1)),function(x){J(x)},e)}catch(x){e()}else{var u=null;"G"==g?null!=this.drive&&null!=this.drive.user&&(u=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(u=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(u=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(u=this.dropbox):"W"==g&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(u=this.oneDrive);null!=u?u.getLibrary(decodeURIComponent(A.substring(1)),mxUtils.bind(this,function(x){try{J(x)}catch(E){e()}}),function(x){e()}):e(!0)}}})(C,y)}t()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&"simple"!=Editor.currentTheme&&("1"!=urlParams.sketch&&(this.buttonContainer.style.paddingRight="12px"),this.buttonContainer.style.paddingTop="6px");this.commentsSupported()&&"1"!=urlParams.sketch&&"simple"!=Editor.currentTheme?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className=
"geToolbarButton geAdaptiveAsset",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),"atlas"==uiTheme&&(this.commentButton.style.filter="invert(100%)")):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&
this.fetchAndShowNotification(urlParams.notif):(null!=b?(null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight=
"28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.className="geInverseAdaptiveAsset",b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),"atlas"!=uiTheme&&(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),
mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)),this.shareButton.style.display="simple"==Editor.currentTheme||"min"==Editor.currentTheme?"none":"inline-block"):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}};
-App.prototype.fetchAndShowNotification=function(b,d){if(!this.fetchingNotif){b=b||"online";var e=null,c=mxUtils.bind(this,function(l){l=l.filter(function(C){return!C.targets||-1<C.targets.indexOf(b)||null!=d&&-1<C.targets.indexOf(d)});for(var m=b+"NotifReadTS",t=isLocalStorage?parseInt(localStorage.getItem(m)):!0,y=0;y<l.length;y++)l[y].isNew=!t||l[y].timestamp>t;this.showNotification(l,m)});try{isLocalStorage&&(e=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==e||e.ts+864E5<Date.now()?
-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()&&(l=JSON.parse(l.getText()),l.sort(function(m,t){return t.timestamp-m.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:l})),this.fetchingNotif=!1,c(l))}))):c(e.notifs)}};
-App.prototype.showNotification=function(b,d){function e(A){var B=document.querySelector(".geNotification-count");null!=B&&(B.innerHTML=A,B.style.display=0==A?"none":"",B=document.querySelector(".geNotification-bell"),B.style.animation=0==A?"none":"",B.className="geNotification-bell"+(0==A?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==A?"none":"")}var c=b.length;if("min"==uiTheme)for(var l=c=0;l<b.length;l++)b[l].isNew&&c++;if(0==c)null!=this.notificationBtn&&
-(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var m=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var A=this.notificationWin.querySelectorAll(".circle.active"),B=0;B<A.length;B++)A[B].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(d,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme?
-(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);c=document.createElement("div");c.className="geNotification-bell";c.style.opacity="min"==uiTheme?"0.5":"";l=document.createElement("span");l.className="geBell-top";c.appendChild(l);l=document.createElement("span");l.className="geBell-middle";c.appendChild(l);
-l=document.createElement("span");l.className="geBell-bottom";c.appendChild(l);l=document.createElement("span");l.className="geBell-rad";c.appendChild(l);this.notificationBtn.appendChild(c);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);l=document.createElement("div");l.className=
-"header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");l.appendChild(c);c=document.createElement("span");c.className="closeBtn";c.textContent="x";l.appendChild(c);this.notificationWin.appendChild(l);l=document.createElement("div");l.className="notifications clearfix";var t=document.createElement("div");t.setAttribute("id","geNotifList");t.style.position="relative";l.appendChild(t);this.notificationWin.appendChild(l);mxEvent.addListener(this.notificationBtn,
-"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var A=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=A.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=A.right-this.notificationWin.clientWidth+"px";e(0)}else m()}));mxEvent.addListener(c,"click",m)}else this.notificationBtn.style.display="";var y=0,C=document.getElementById("geNotifList");
-if(null!=C){C.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(A,B){B.isNew&&y++;var J=document.createElement("div");J.className="notification";A=A.timeSince(new Date(B.timestamp));null==A&&(A=mxResources.get("lessThanAMinute"));J.innerHTML='<div class="circle'+(B.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[A],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(B.content)+"</p>";B.link&&mxEvent.addListener(J,"click",function(){window.open(B.link,
-"notifWin")});C.appendChild(J)})(this,b[l]);e(y)}}};
-App.prototype.save=function(b,d){var e=this.getCurrentFile();if(null!=e&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(){e.handleFileSuccess(!0);null!=d&&d()}),l=mxUtils.bind(this,function(m){e.isModified()&&Editor.addRetryToError(m,mxUtils.bind(this,function(){this.save(b,d)}));e.handleFileError(m,null==m||"AbortError"!=m.name)});try{b==e.getTitle()?e.save(!0,c,
-l):e.saveAs(b,c,l)}catch(m){l(m)}}};
-App.prototype.pickFolder=function(b,d,e,c,l){e=null!=e?e:!0;var m=this.spinner.pause();e&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(t){m();if(t.action==google.picker.Action.PICKED){var y=null;null!=t.docs&&0<t.docs.length&&"folder"==t.docs[0].type&&(y=t.docs[0].id);d(y)}}),l):e&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(t){m();null!=t&&null!=t.value&&0<t.value.length&&(t=OneDriveFile.prototype.getIdOf(t.value[0]),
-d(t))}),c):e&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(t){m();d(t)})):e&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(t){m();d(t)})):e&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(t){m();d(t)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,d,e,c,l,m){l==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(d,c?this.base64ToBlob(b,e):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)})):l==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(d,b,m,mxUtils.bind(this,function(t){this.spinner.stop()}),
-mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),e,c):l==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(d,c?this.base64ToBlob(b,e):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),!1,m):l==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(d,b,mxUtils.bind(this,
+App.prototype.fetchAndShowNotification=function(b,d){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(l){l=l.filter(function(C){return!C.targets||-1<C.targets.indexOf(b)||null!=d&&-1<C.targets.indexOf(d)});for(var m=b+"NotifReadTS",t=isLocalStorage?parseInt(localStorage.getItem(m)):!0,y=0;y<l.length;y++)l[y].isNew=!t||l[y].timestamp>t;this.showNotification(l,m)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==f||f.ts+864E5<Date.now()?
+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()&&(l=JSON.parse(l.getText()),l.sort(function(m,t){return t.timestamp-m.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:l})),this.fetchingNotif=!1,c(l))}))):c(f.notifs)}};
+App.prototype.showNotification=function(b,d){function f(A){var B=document.querySelector(".geNotification-count");null!=B&&(B.innerHTML=A,B.style.display=0==A?"none":"",B=document.querySelector(".geNotification-bell"),B.style.animation=0==A?"none":"",B.className="geNotification-bell"+(0==A?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==A?"none":"")}var c=b.length;if("min"==uiTheme)for(var l=c=0;l<b.length;l++)b[l].isNew&&c++;if(0==c)null!=this.notificationBtn&&
+(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var m=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var A=this.notificationWin.querySelectorAll(".circle.active"),B=0;B<A.length;B++)A[B].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(d,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";c=document.createElement("span");
+c.className="geNotification-count";this.notificationBtn.appendChild(c);if("simple"==Editor.currentTheme||"min"==Editor.currentTheme){if("min"!=Editor.currentTheme||"1"==urlParams.sketch)this.notificationBtn.style.width="30px",c.style.marginRight="-10px";this.notificationBtn.style.top="simple"==Editor.currentTheme||"1"==urlParams.sketch?"7px":"4px"}else"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");c=document.createElement("div");c.className="geNotification-bell";c.style.opacity="min"==
+uiTheme?"0.5":"";l=document.createElement("span");l.className="geBell-top";c.appendChild(l);l=document.createElement("span");l.className="geBell-middle";c.appendChild(l);l=document.createElement("span");l.className="geBell-bottom";c.appendChild(l);l=document.createElement("span");l.className="geBell-rad";c.appendChild(l);this.notificationBtn.appendChild(c);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className=
+"geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);l=document.createElement("div");l.className="header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");l.appendChild(c);c=document.createElement("span");c.className="closeBtn";c.textContent="x";l.appendChild(c);this.notificationWin.appendChild(l);l=document.createElement("div");l.className="notifications clearfix";var t=document.createElement("div");
+t.setAttribute("id","geNotifList");t.style.position="relative";l.appendChild(t);this.notificationWin.appendChild(l);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var A=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=A.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=A.right-this.notificationWin.clientWidth+
+"px";f(0)}else m()}));mxEvent.addListener(c,"click",m)}else this.notificationBtn.style.display="";var y=0,C=document.getElementById("geNotifList");if(null!=C){C.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(A,B){B.isNew&&y++;var J=document.createElement("div");J.className="notification";A=A.timeSince(new Date(B.timestamp));null==A&&(A=mxResources.get("lessThanAMinute"));J.innerHTML='<div class="circle'+(B.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",
+[A],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(B.content)+"</p>";B.link&&mxEvent.addListener(J,"click",function(){window.open(B.link,"notifWin")});C.appendChild(J)})(this,b[l]);f(y)}}};
+App.prototype.save=function(b,d){var f=this.getCurrentFile();if(null!=f&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(){f.handleFileSuccess(!0);null!=d&&d()}),l=mxUtils.bind(this,function(m){f.isModified()&&Editor.addRetryToError(m,mxUtils.bind(this,function(){this.save(b,d)}));f.handleFileError(m,null==m||"AbortError"!=m.name)});try{b==f.getTitle()?f.save(!0,c,
+l):f.saveAs(b,c,l)}catch(m){l(m)}}};
+App.prototype.pickFolder=function(b,d,f,c,l){f=null!=f?f:!0;var m=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(t){m();if(t.action==google.picker.Action.PICKED){var y=null;null!=t.docs&&0<t.docs.length&&"folder"==t.docs[0].type&&(y=t.docs[0].id);d(y)}}),l):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(t){m();null!=t&&null!=t.value&&0<t.value.length&&(t=OneDriveFile.prototype.getIdOf(t.value[0]),
+d(t))}),c):f&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(t){m();d(t)})):f&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(t){m();d(t)})):f&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(t){m();d(t)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,d,f,c,l,m){l==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(d,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)})):l==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(d,b,m,mxUtils.bind(this,function(t){this.spinner.stop()}),
+mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),f,c):l==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(d,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),!1,m):l==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(d,b,mxUtils.bind(this,
function(){this.spinner.stop()}),mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),!0,m,c):l==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(d,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),!0,m,c):l==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(d,c?this.base64ToBlob(b,
-e):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),!1,m):l==App.MODE_BROWSER&&(e=mxUtils.bind(this,function(){localStorage.setItem(d,b)}),null==localStorage.getItem(d)?e():this.confirm(mxResources.get("replaceIt",[d]),e))};
-App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var d=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,d);this.fname.setAttribute("title",d+" - "+mxResources.get("rename"))}d=this.editor.graph;var e=b.isEditable()&&!b.invalidChecksum;d.isEnabled()&&!e&&d.reset();d.setEnabled(e);null==urlParams.rev&&(this.updateDocumentTitle(),d=b.getHash(),0<d.length?
+f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),!1,m):l==App.MODE_BROWSER&&(f=mxUtils.bind(this,function(){localStorage.setItem(d,b)}),null==localStorage.getItem(d)?f():this.confirm(mxResources.get("replaceIt",[d]),f))};
+App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var d=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,d);this.fname.setAttribute("title",d+" - "+mxResources.get("rename"))}d=this.editor.graph;var f=b.isEditable()&&!b.invalidChecksum;d.isEnabled()&&!f&&d.reset();d.setEnabled(f);null==urlParams.rev&&(this.updateDocumentTitle(),d=b.getHash(),0<d.length?
window.location.hash=d:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
-App.prototype.showAuthDialog=function(b,d,e,c){var l=this.spinner.pause();this.showDialog((new AuthDialog(this,b,d,mxUtils.bind(this,function(m){try{null!=e&&e(m,mxUtils.bind(this,function(){this.hideDialog();l()}))}catch(t){this.editor.setStatus(mxUtils.htmlEntities(t.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(m){null!=c&&c(m);m&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,d,e,c,l,m,t,y){var C=d;/\.svg$/i.test(C)||(C=C.substring(0,d.lastIndexOf("."))+c);var A=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(A=!0);if(/\.v(dx|sdx?)$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var B=new XMLHttpRequest;B.open("GET",b,!0);A||(B.responseType="blob");if(y)for(var J in y)B.setRequestHeader(J,y[J]);B.onload=mxUtils.bind(this,function(){if(200<=
-B.status&&299>=B.status){var g=null;A?(g=JSON.parse(B.responseText),g=this.base64ToBlob(g.content,"application/octet-stream")):g=new Blob([B.response],{type:"application/octet-stream"});this.importVisio(g,mxUtils.bind(this,function(k){l(new LocalFile(this,k,C,!0))}),m,d)}else null!=m&&m({message:mxResources.get("errorLoadingFile")})});B.onerror=m;B.send()}else{var f=mxUtils.bind(this,function(g){try{if(/\.pdf$/i.test(d)){var k=Editor.extractGraphModelFromPdf(g);null!=k&&0<k.length&&l(new LocalFile(this,
-k,C,!0))}else/\.png$/i.test(d)?(k=this.extractGraphModelFromPng(g),null!=k?l(new LocalFile(this,k,C,!0)):l(new LocalFile(this,g,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,b)?this.parseFileData(g,mxUtils.bind(this,function(n){4==n.readyState&&(200<=n.status&&299>=n.status?l(new LocalFile(this,n.responseText,C,!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}),d):l(new LocalFile(this,g,C,!0))}catch(n){null!=m&&m(n)}});e=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||
-/\.pdf$/i.test(d)||null!=e&&"image/"==e.substring(0,6);A?mxUtils.get(b,mxUtils.bind(this,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){if(null!=l){g=JSON.parse(g.getText());var k=g.content;"base64"===g.encoding&&(k=/\.png$/i.test(d)?"data:image/png;base64,"+k:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+k:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):atob(k));f(k)}}else null!=m&&m({code:App.ERROR_UNKNOWN})}),function(){null!=m&&m({code:App.ERROR_UNKNOWN})},!1,this.timeout,
-function(){null!=m&&m({code:App.ERROR_TIMEOUT,retry:fn})},y):null!=t?t(b,f,m,e):this.editor.loadUrl(b,f,m,e,null,null,null,y)}};
+App.prototype.showAuthDialog=function(b,d,f,c){var l=this.spinner.pause();this.showDialog((new AuthDialog(this,b,d,mxUtils.bind(this,function(m){try{null!=f&&f(m,mxUtils.bind(this,function(){this.hideDialog();l()}))}catch(t){this.editor.setStatus(mxUtils.htmlEntities(t.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(m){null!=c&&c(m);m&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,d,f,c,l,m,t,y){var C=d;/\.svg$/i.test(C)||(C=C.substring(0,d.lastIndexOf("."))+c);var A=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(A=!0);if(/\.v(dx|sdx?)$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var B=new XMLHttpRequest;B.open("GET",b,!0);A||(B.responseType="blob");if(y)for(var J in y)B.setRequestHeader(J,y[J]);B.onload=mxUtils.bind(this,function(){if(200<=
+B.status&&299>=B.status){var g=null;A?(g=JSON.parse(B.responseText),g=this.base64ToBlob(g.content,"application/octet-stream")):g=new Blob([B.response],{type:"application/octet-stream"});this.importVisio(g,mxUtils.bind(this,function(k){l(new LocalFile(this,k,C,!0))}),m,d)}else null!=m&&m({message:mxResources.get("errorLoadingFile")})});B.onerror=m;B.send()}else{var e=mxUtils.bind(this,function(g){try{if(/\.pdf$/i.test(d)){var k=Editor.extractGraphModelFromPdf(g);null!=k&&0<k.length&&l(new LocalFile(this,
+k,C,!0))}else/\.png$/i.test(d)?(k=this.extractGraphModelFromPng(g),null!=k?l(new LocalFile(this,k,C,!0)):l(new LocalFile(this,g,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,b)?this.parseFileData(g,mxUtils.bind(this,function(q){4==q.readyState&&(200<=q.status&&299>=q.status?l(new LocalFile(this,q.responseText,C,!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}),d):l(new LocalFile(this,g,C,!0))}catch(q){null!=m&&m(q)}});f=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||
+/\.pdf$/i.test(d)||null!=f&&"image/"==f.substring(0,6);A?mxUtils.get(b,mxUtils.bind(this,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){if(null!=l){g=JSON.parse(g.getText());var k=g.content;"base64"===g.encoding&&(k=/\.png$/i.test(d)?"data:image/png;base64,"+k:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+k:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):atob(k));e(k)}}else null!=m&&m({code:App.ERROR_UNKNOWN})}),function(){null!=m&&m({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+function(){null!=m&&m({code:App.ERROR_TIMEOUT,retry:fn})},y):null!=t?t(b,e,m,f):this.editor.loadUrl(b,e,m,f,null,null,null,y)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize=
"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(l){this.appIconClicked(l)}));var d=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",d);d();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
mxUtils.bind(this,function(){var l=this.getCurrentFile();null!=l&&(l=l.getMode(),l==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):l==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):l==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize=
@@ -12603,9 +12616,9 @@ this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElemen
function(l){var m=this.getCurrentFile();null!=m&&m.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(l)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box",
this.menubar.container.style.top="34px");d="atlas"!=uiTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right=d+"px";this.toggleFormatElement.style.padding="2px";
this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);d+=20;mxEvent.addListener(this.toggleFormatElement,
-mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(l){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"format"});this.actions.get("format").funct();mxEvent.consume(l)}));var e=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",
-e);e();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=d+"px";this.toolbarContainer.appendChild(this.fullscreenElement);d+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(this.fullscreenElement,
-"click",mxUtils.bind(this,function(l){var m=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:m});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(m);m||(c=this.hsplitPosition);this.hsplitPosition=m?c:0;this.toggleFormatPanel(m);this.fullscreenMode=!m;mxEvent.consume(l)}));"1"!=urlParams["live-ui"]&&"atlas"!=uiTheme&&"1"!=urlParams.embed&&(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",
+mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(l){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"format"});this.actions.get("format").funct();mxEvent.consume(l)}));var f=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",
+f);f();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=d+"px";this.toolbarContainer.appendChild(this.fullscreenElement);d+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(this.fullscreenElement,
+"click",mxUtils.bind(this,function(l){var m=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:m});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(m);m||(c=this.hsplitPosition);this.hsplitPosition=m?c:0;this.toggleFormatPanel(m);this.fullscreenMode=!m;mxEvent.consume(l)}));Editor.enableSimpleTheme||"atlas"==uiTheme||"1"==urlParams.embed||(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",
mxResources.get("theme")),this.darkModeElement.style.right=d+"px",this.toolbarContainer.appendChild(this.darkModeElement),d+=20,d=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged",d),d(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()})),mxEvent.addListener(this.darkModeElement,
"click",mxUtils.bind(this,function(l){this.actions.get("toggleDarkMode").funct();mxEvent.consume(l)})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var c=this.hsplitPosition;"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display=
"inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="atlas"==uiTheme?"8px":"6px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat=
@@ -12619,306 +12632,306 @@ var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():n
560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="inline-block")):this.userElement.style.display="none"}else this.userElement.style.display="none";this.updateUserElementStyle();this.updateUserElementIcon()};
App.prototype.updateUserElementStyle=function(){var b=this.userElement;null!=b&&("simple"==Editor.currentTheme||"min"==Editor.currentTheme?(b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.userImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="100% 100%",b.style.position="relative",b.style.margin="0px",b.style.padding="0px",b.style.height="24px",b.style.width="24px",b.style.right="","min"==Editor.currentTheme&&(b.style.top=
"3px")):(b.className="geItem",b.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",b.style.backgroundPosition="100% 60%",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="",b.style.position="absolute",b.style.margin="4px",b.style.padding="2px",b.style.paddingRight="16px",b.style.width="",b.style.height="",b.style.right="atlas"==Editor.currentTheme||null!=this.darkModeElement?"12px":"26px",b.style.top="atlas"==Editor.currentTheme?"8px":"2px"))};
-App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var d=mxResources.get("changeUser");if("none"!=b.style.display){var e=this.getCurrentFile();if(null!=e&&e.isRealtimeEnabled()&&e.isRealtimeSupported()){var c=document.createElement("img");c.setAttribute("border","0");c.style.position="absolute";c.style.left="16px";c.style.top="2px";c.style.width="12px";c.style.height="12px";var l=e.getRealtimeError();e=e.getRealtimeState();d+=" (";1==e?(c.src=Editor.syncImage,d+=mxResources.get("online")):
+App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var d=mxResources.get("changeUser");if("none"!=b.style.display){var f=this.getCurrentFile();if(null!=f&&f.isRealtimeEnabled()&&f.isRealtimeSupported()){var c=document.createElement("img");c.setAttribute("border","0");c.style.position="absolute";c.style.left="16px";c.style.top="2px";c.style.width="12px";c.style.height="12px";var l=f.getRealtimeError();f=f.getRealtimeState();d+=" (";1==f?(c.src=Editor.syncImage,d+=mxResources.get("online")):
(c.src=Editor.syncProblemImage,d=null!=l&&null!=l.message?d+l.message:d+mxResources.get("disconnected"));d+=")";if("simple"==Editor.currentTheme||"min"==Editor.currentTheme)b.style.marginRight="4px",b.appendChild(c)}b.setAttribute("title",d)}}};
-App.prototype.createUserElement=function(){var b=document.createElement("a");mxUtils.setPrefixedStyle(b.style,"transition","none");b.style.display="inline-block";b.style.cursor="pointer";b.style.fontSize="8pt";mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){if(null==this.userPanel){var e=document.createElement("div");e.className="geDialog";e.style.position="absolute";
-e.style.top=b.clientTop+b.clientHeight+6+"px";e.style.zIndex=5;e.style.right="36px";e.style.padding="0px";e.style.cursor="default";e.style.minWidth="300px";this.userPanel=e}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var c=!1;this.userPanel.innerText="";e=document.createElement("img");e.setAttribute("src",Dialog.prototype.closeImage);e.setAttribute("title",mxResources.get("close"));e.className="geDialogClose";e.style.top="8px";e.style.right="8px";
-mxEvent.addListener(e,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(e);if(null!=this.drive){var l=this.drive.getUsersList();if(0<l.length){var m=mxUtils.bind(this,function(C,A){var B=this.getCurrentFile();null!=B&&B.constructor==DriveFile?(this.spinner.spin(document.body,A),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();C()}),2E3)):C()});e=mxUtils.bind(this,
+App.prototype.createUserElement=function(){var b=document.createElement("a");mxUtils.setPrefixedStyle(b.style,"transition","none");b.style.display="inline-block";b.style.cursor="pointer";b.style.fontSize="8pt";mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(d){d.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){if(null==this.userPanel){var f=document.createElement("div");f.className="geDialog";f.style.position="absolute";
+f.style.top=b.clientTop+b.clientHeight+6+"px";f.style.zIndex=5;f.style.right="36px";f.style.padding="0px";f.style.cursor="default";f.style.minWidth="300px";this.userPanel=f}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var c=!1;this.userPanel.innerText="";f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.className="geDialogClose";f.style.top="8px";f.style.right="8px";
+mxEvent.addListener(f,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(f);if(null!=this.drive){var l=this.drive.getUsersList();if(0<l.length){var m=mxUtils.bind(this,function(C,A){var B=this.getCurrentFile();null!=B&&B.constructor==DriveFile?(this.spinner.spin(document.body,A),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();C()}),2E3)):C()});f=mxUtils.bind(this,
function(C){var A=document.createElement("tr");A.setAttribute("title","User ID: "+C.id);var B=document.createElement("td");B.setAttribute("valig","middle");B.style.height="59px";B.style.width="66px";var J=document.createElement("img");J.setAttribute("width","50");J.setAttribute("height","50");J.setAttribute("border","0");J.setAttribute("src",null!=C.pictureUrl?C.pictureUrl:this.defaultUserPicture);J.style.borderRadius="50%";J.style.margin="4px 8px 0 8px";B.appendChild(J);A.appendChild(B);B=document.createElement("td");
-B.setAttribute("valign","middle");B.style.whiteSpace="nowrap";B.style.paddingTop="4px";B.style.maxWidth="0";B.style.overflow="hidden";B.style.textOverflow="ellipsis";mxUtils.write(B,C.displayName+(C.isCurrent&&1<l.length?" ("+mxResources.get("default")+")":""));null!=C.email&&(mxUtils.br(B),J=document.createElement("small"),J.style.color="gray",mxUtils.write(J,C.email),B.appendChild(J));J=document.createElement("div");J.style.marginTop="4px";var f=document.createElement("i");mxUtils.write(f,mxResources.get("googleDrive"));
-J.appendChild(f);B.appendChild(J);A.appendChild(B);C.isCurrent||(A.style.cursor="pointer",A.style.opacity="0.3",mxEvent.addListener(A,"click",mxUtils.bind(this,function(g){m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(C);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(g)})));return A});c=!0;var t=
-document.createElement("table");t.style.borderSpacing="0";t.style.fontSize="10pt";t.style.width="100%";t.style.padding="10px";for(var y=0;y<l.length;y++)t.appendChild(e(l[y]));this.userPanel.appendChild(t);e=document.createElement("div");e.style.textAlign="left";e.style.padding="10px";e.style.whiteSpace="nowrap";e.style.borderTop="1px solid rgb(224, 224, 224)";t=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){m(mxUtils.bind(this,
-function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));t.className="geBtn";t.style.float="right";e.appendChild(t);t=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var C=this.drive.createAuthWin();C.blur();window.focus();m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
-mxUtils.bind(this,function(A){this.handleError(A)}),!0,C)}),mxResources.get("closingFile")+"...")}));t.className="geBtn";t.style.margin="0px";e.appendChild(t);this.userPanel.appendChild(e)}}e=mxUtils.bind(this,function(C,A,B,J){if(null!=C){c&&this.userPanel.appendChild(document.createElement("hr"));c=!0;var f=document.createElement("table");f.style.borderSpacing="0";f.style.fontSize="10pt";f.style.width="100%";f.style.padding="10px";var g=document.createElement("tbody"),k=document.createElement("tr"),
-n=document.createElement("td");n.setAttribute("valig","top");n.style.width="40px";if(null!=A){var v=document.createElement("img");v.setAttribute("width","40");v.setAttribute("height","40");v.setAttribute("border","0");v.setAttribute("src",A);v.style.marginRight="6px";n.appendChild(v)}k.appendChild(n);n=document.createElement("td");n.setAttribute("valign","middle");n.style.whiteSpace="nowrap";n.style.maxWidth="0";n.style.overflow="hidden";n.style.textOverflow="ellipsis";mxUtils.write(n,C.displayName);
-null!=C.email&&(mxUtils.br(n),A=document.createElement("small"),A.style.color="gray",mxUtils.write(A,C.email),n.appendChild(A));null!=J&&(C=document.createElement("div"),C.style.marginTop="4px",A=document.createElement("i"),mxUtils.write(A,J),C.appendChild(A),n.appendChild(C));k.appendChild(n);g.appendChild(k);f.appendChild(g);this.userPanel.appendChild(f);C=document.createElement("div");C.style.textAlign="center";C.style.padding="10px";C.style.whiteSpace="nowrap";null!=B&&(B=mxUtils.button(mxResources.get("signOut"),
-B),B.className="geBtn",C.appendChild(B));this.userPanel.appendChild(C)}});null!=this.dropbox&&e(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==DropboxFile){var A=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.dropbox.logout()}),mxResources.get("dropbox"));
-null!=this.oneDrive&&e(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==OneDriveFile){var A=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&
-e(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitHubFile){var A=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&e(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,
-function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitLabFile){var A=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&e(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==
-TrelloFile){var A=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(t=this.getCurrentFile(),null!=t&&t.isRealtimeEnabled()&&t.isRealtimeSupported()&&(e=document.createElement("div"),e.style.padding="10px",e.style.whiteSpace="nowrap",e.style.borderTop="1px solid rgb(224, 224, 224)",
-e.style.marginTop="4px",e.style.textAlign="center",e.style.padding="10px",e.style.fontSize="9pt",y=t.getRealtimeError(),1!=t.getRealtimeState()&&(mxUtils.write(e,mxResources.get("realtimeCollaboration")+": "+(null!=y&&null!=y.message?y.message:mxResources.get("disconnected"))),this.userPanel.appendChild(e))));document.body.appendChild(this.userPanel)}mxEvent.consume(d)}));mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(d){mxEvent.isConsumed(d)||null==this.userPanel||null==this.userPanel.parentNode||
+B.setAttribute("valign","middle");B.style.whiteSpace="nowrap";B.style.paddingTop="4px";B.style.maxWidth="0";B.style.overflow="hidden";B.style.textOverflow="ellipsis";mxUtils.write(B,C.displayName+(C.isCurrent&&1<l.length?" ("+mxResources.get("default")+")":""));null!=C.email&&(mxUtils.br(B),J=document.createElement("small"),J.style.color="gray",mxUtils.write(J,C.email),B.appendChild(J));J=document.createElement("div");J.style.marginTop="4px";var e=document.createElement("i");mxUtils.write(e,mxResources.get("googleDrive"));
+J.appendChild(e);B.appendChild(J);A.appendChild(B);C.isCurrent||(A.style.cursor="pointer",A.style.opacity="0.3",mxEvent.addListener(A,"click",mxUtils.bind(this,function(g){m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(C);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(k){this.handleError(k)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(g)})));return A});c=!0;var t=
+document.createElement("table");t.style.borderSpacing="0";t.style.fontSize="10pt";t.style.width="100%";t.style.padding="10px";for(var y=0;y<l.length;y++)t.appendChild(f(l[y]));this.userPanel.appendChild(t);f=document.createElement("div");f.style.textAlign="left";f.style.padding="10px";f.style.whiteSpace="nowrap";f.style.borderTop="1px solid rgb(224, 224, 224)";t=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){m(mxUtils.bind(this,
+function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));t.className="geBtn";t.style.float="right";f.appendChild(t);t=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var C=this.drive.createAuthWin();C.blur();window.focus();m(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
+mxUtils.bind(this,function(A){this.handleError(A)}),!0,C)}),mxResources.get("closingFile")+"...")}));t.className="geBtn";t.style.margin="0px";f.appendChild(t);this.userPanel.appendChild(f)}}f=mxUtils.bind(this,function(C,A,B,J){if(null!=C){c&&this.userPanel.appendChild(document.createElement("hr"));c=!0;var e=document.createElement("table");e.style.borderSpacing="0";e.style.fontSize="10pt";e.style.width="100%";e.style.padding="10px";var g=document.createElement("tbody"),k=document.createElement("tr"),
+q=document.createElement("td");q.setAttribute("valig","top");q.style.width="40px";if(null!=A){var u=document.createElement("img");u.setAttribute("width","40");u.setAttribute("height","40");u.setAttribute("border","0");u.setAttribute("src",A);u.style.marginRight="6px";q.appendChild(u)}k.appendChild(q);q=document.createElement("td");q.setAttribute("valign","middle");q.style.whiteSpace="nowrap";q.style.maxWidth="0";q.style.overflow="hidden";q.style.textOverflow="ellipsis";mxUtils.write(q,C.displayName);
+null!=C.email&&(mxUtils.br(q),A=document.createElement("small"),A.style.color="gray",mxUtils.write(A,C.email),q.appendChild(A));null!=J&&(C=document.createElement("div"),C.style.marginTop="4px",A=document.createElement("i"),mxUtils.write(A,J),C.appendChild(A),q.appendChild(C));k.appendChild(q);g.appendChild(k);e.appendChild(g);this.userPanel.appendChild(e);C=document.createElement("div");C.style.textAlign="center";C.style.padding="10px";C.style.whiteSpace="nowrap";null!=B&&(B=mxUtils.button(mxResources.get("signOut"),
+B),B.className="geBtn",C.appendChild(B));this.userPanel.appendChild(C)}});null!=this.dropbox&&f(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==DropboxFile){var A=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.dropbox.logout()}),mxResources.get("dropbox"));
+null!=this.oneDrive&&f(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==OneDriveFile){var A=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&
+f(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitHubFile){var A=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&f(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,
+function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitLabFile){var A=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&f(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==
+TrelloFile){var A=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(t=this.getCurrentFile(),null!=t&&t.isRealtimeEnabled()&&t.isRealtimeSupported()&&(f=document.createElement("div"),f.style.padding="10px",f.style.whiteSpace="nowrap",f.style.borderTop="1px solid rgb(224, 224, 224)",
+f.style.marginTop="4px",f.style.textAlign="center",f.style.padding="10px",f.style.fontSize="9pt",y=t.getRealtimeError(),1!=t.getRealtimeState()&&(mxUtils.write(f,mxResources.get("realtimeCollaboration")+": "+(null!=y&&null!=y.message?y.message:mxResources.get("disconnected"))),this.userPanel.appendChild(f))));document.body.appendChild(this.userPanel)}mxEvent.consume(d)}));mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(d){mxEvent.isConsumed(d)||null==this.userPanel||null==this.userPanel.parentNode||
this.userPanel.parentNode.removeChild(this.userPanel)}));return b};App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
-Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(e){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
-var l=document.createElement("img");mxUtils.setOpacity(l,50);l.style.height="16px";l.style.width="16px";l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);c.appendChild(l);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(m){this.editorUi.hideCurrentMenu();this.editorUi.openLink(e);mxEvent.consume(m)}));return c};Menus.prototype.addLinkToItem=function(e,c){null!=e&&e.firstChild.nextSibling.appendChild(this.createHelpLink(c))};var d=Menus.prototype.init;
-Menus.prototype.init=function(){function e(p,u,H){this.ui=p;this.previousExtFonts=this.extFonts=u;this.prevCustomFonts=this.customFonts=H}d.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,m=mxUtils.bind(l,l.isEnabled),t=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),y=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(f){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
+var l=document.createElement("img");mxUtils.setOpacity(l,50);l.style.height="16px";l.style.width="16px";l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);c.appendChild(l);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(m){this.editorUi.hideCurrentMenu();this.editorUi.openLink(f);mxEvent.consume(m)}));return c};Menus.prototype.addLinkToItem=function(f,c){null!=f&&f.firstChild.nextSibling.appendChild(this.createHelpLink(c))};var d=Menus.prototype.init;
+Menus.prototype.init=function(){function f(p,v,H){this.ui=p;this.previousExtFonts=this.extFonts=v;this.prevCustomFonts=this.customFonts=H}d.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,m=mxUtils.bind(l,l.isEnabled),t=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),y=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
(null==document.documentMode||9<document.documentMode),C=("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),A="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(p){return"file"!=p}));c.actions.addAction("new...",function(){var p=c.isOffline();if(p||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var u=new NewDialog(c,p,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(u.container,p?350:620,p?70:460,!0,!0,function(K){c.sidebar.hideTooltip();K&&null==c.getCurrentFile()&&c.showSplash()});
-u.init()}else{var H=function(K){return{id:K.id,isExt:!0,url:K.downloadUrl,title:K.title,imgUrl:K.thumbnailLink,changedBy:K.lastModifyingUserName,lastModifiedOn:K.modifiedDate}};p=new TemplatesDialog(c,function(K,N,I){var L=I.libs,Q=I.clibs;c.pickFolder(c.mode,function(P){c.createFile(N,K,null!=L&&0<L.length?L:null,null,function(){c.hideDialog()},null,P,null,null!=Q&&0<Q.length?Q:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(K,N,I){var L=new Date;L.setDate(L.getDate()-
+c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(p){return"file"!=p}));c.actions.addAction("new...",function(){var p=c.isOffline();if(p||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var v=new NewDialog(c,p,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(v.container,p?350:620,p?70:460,!0,!0,function(K){c.sidebar.hideTooltip();K&&null==c.getCurrentFile()&&c.showSplash()});
+v.init()}else{var H=function(K){return{id:K.id,isExt:!0,url:K.downloadUrl,title:K.title,imgUrl:K.thumbnailLink,changedBy:K.lastModifyingUserName,lastModifiedOn:K.modifiedDate}};p=new TemplatesDialog(c,function(K,N,I){var L=I.libs,Q=I.clibs;c.pickFolder(c.mode,function(P){c.createFile(N,K,null!=L&&0<L.length?L:null,null,function(){c.hideDialog()},null,P,null,null!=Q&&0<Q.length?Q:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(K,N,I){var L=new Date;L.setDate(L.getDate()-
7);c.drive.listFiles(null,L,I?!0:!1,function(Q){for(var P=[],V=0;V<Q.items.length;V++)P.push(H(Q.items[V]));K(P)},N)},function(K,N,I,L){c.drive.listFiles(K,null,L?!0:!1,function(Q){for(var P=[],V=0;V<Q.items.length;V++)P.push(H(Q.items[V]));N(P)},I)},function(K,N,I){c.drive.getFile(K.id,function(L){N(L.data)},I)},null,null,!1,!1);c.showDialog(p.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(l.isEnabled()&&
-!l.isCellLocked(l.getDefaultParent())){var p=new NewDialog(c,null,!1,function(u){c.hideDialog();if(null!=u){var H=c.editor.graph.getFreeInsertPoint();l.setSelectionCells(c.importXml(u,Math.max(H.x,20),Math.max(H.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(p.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});p.init()}})).isEnabled=m;var B=c.actions.addAction("shareCursor",
+!l.isCellLocked(l.getDefaultParent())){var p=new NewDialog(c,null,!1,function(v){c.hideDialog();if(null!=v){var H=c.editor.graph.getFreeInsertPoint();l.setSelectionCells(c.importXml(v,Math.max(H.x,20),Math.max(H.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(p.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});p.init()}})).isEnabled=m;var B=c.actions.addAction("shareCursor",
function(){c.setShareCursorPosition(!c.isShareCursorPosition())});B.setToggleAction(!0);B.setSelectedCallback(function(){return c.isShareCursorPosition()});B=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});B.setToggleAction(!0);B.setSelectedCallback(function(){return c.isShowRemoteCursors()});B=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});B.setToggleAction(!0);B.setSelectedCallback(function(){return c.editor.graph.view.unit==
mxConstants.POINTS});B=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});B.setToggleAction(!0);B.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});B=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});B.setToggleAction(!0);B.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});B=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});
-B.setToggleAction(!0);B.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(p,u){this.addMenuItems(p,["points","inches","millimeters","meters"],u);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(p,["-","ruler","-","pageScale"],u)})));B=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):
+B.setToggleAction(!0);B.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(p,v){this.addMenuItems(p,["points","inches","millimeters","meters"],v);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(p,["-","ruler","-","pageScale"],v)})));B=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()});B.setEnabled(c.canvasSupported&&9!=document.documentMode);B.setToggleAction(!0);B.setSelectedCallback(function(){return null!=c.ruler});B=c.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?c.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});B.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&
null!=document.body.requestFullscreen;B.setToggleAction(!0);B.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});B=c.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(p){c.setDarkMode(!Editor.isDarkMode());mxSettings.settings.darkMode=Editor.isDarkMode();mxSettings.save();p=mxSettings.getUi();"atlas"!=p&&"min"!=p&&"sketch"!=p&&"simple"!=p&&c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));B.setToggleAction(!0);
B.setSelectedCallback(function(){return Editor.isDarkMode()});B=c.actions.put("toggleSimpleMode",new Action(mxResources.get("simple"),function(p){c.setCurrentTheme("simple"==Editor.currentTheme?Editor.isDarkMode()?"dark":"kennedy":"simple")}));B.setToggleAction(!0);B.setSelectedCallback(function(){return"simple"==Editor.currentTheme});B=c.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(p){c.setSketchMode(!Editor.sketchMode)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return Editor.sketchMode});
c.actions.addAction("properties...",function(){var p=new FilePropertiesDialog(c);c.showDialog(p.container,320,120,!0,!0);p.init()}).isEnabled=m;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(l.isEnabled()){if(null==c.freehandWindow){var p=!mxClient.IS_IE&&!mxClient.IS_IE11;c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,p?120:84,p)}l.freehand.isDrawing()?l.freehand.stopDrawing():l.freehand.startDrawing();c.freehandWindow.window.setVisible(l.freehand.isDrawing())}},
-null,null,"X")).isEnabled=function(){return m()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var p=document.createElement("div");p.style.whiteSpace="nowrap";var u=null==c.pages||1>=c.pages.length,H=document.createElement("h3");mxUtils.write(H,mxResources.get("formatXml"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(H);var K=c.addCheckbox(p,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),
-N=c.addCheckbox(p,mxResources.get("compressed"),!0),I=c.addCheckbox(p,mxResources.get("allPages"),!u,u);I.style.marginBottom="16px";mxEvent.addListener(K,"change",function(){K.checked?I.setAttribute("disabled","disabled"):I.removeAttribute("disabled")});p=new CustomDialog(c,p,mxUtils.bind(this,function(){c.downloadFile("xml",!N.checked,null,!K.checked,u||!I.checked)}),null,mxResources.get("export"));c.showDialog(p.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(p,u,H,K,N,I,L,Q,P){L=[];P&&L.push("tags=%7B%7D");p=new EmbedDialog(c,c.createLink(p,u,H,K,N,I,null,!0,L));c.showDialog(p.container,450,240,!0,!0);p.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(p){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),
-null,p,function(u,H,K,N,I,L,Q,P,V,W,q){c.createHtml(u,H,K,N,I,L,Q,P,V,W,q,mxUtils.bind(this,function(D,M){var T=c.getBaseFilename(Q);D='\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>'+D+"\n"+M+"\n</body>\n</html>";c.saveData(T+(".drawio"==T.substring(T.lenth-7)?"":".drawio")+".html","html",D,"text/html")}))})})}));c.actions.put("exportPdf",
-new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var p=null==c.pages||1>=c.pages.length,u=document.createElement("div");u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("formatPdf"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(H);var K=function(){Q!=this&&this.checked?(M.removeAttribute("disabled"),M.checked=!l.pageVisible):(M.setAttribute("disabled",
-"disabled"),M.checked=!1)};H=200;var N=1,I=null;if(c.pdfPageExport&&!p){var L=function(){q.value=Math.max(1,Math.min(N,Math.max(parseInt(q.value),parseInt(V.value))));V.value=Math.max(1,Math.min(N,Math.min(parseInt(q.value),parseInt(V.value))))},Q=c.addRadiobox(u,"pages",mxResources.get("allPages"),!0),P=c.addRadiobox(u,"pages",mxResources.get("pages")+":",!1,null,!0),V=document.createElement("input");V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","1");V.setAttribute("type","number");
-V.setAttribute("min","1");V.style.width="50px";u.appendChild(V);var W=document.createElement("span");mxUtils.write(W,mxResources.get("to"));u.appendChild(W);var q=V.cloneNode(!0);u.appendChild(q);mxEvent.addListener(V,"focus",function(){P.checked=!0});mxEvent.addListener(q,"focus",function(){P.checked=!0});mxEvent.addListener(V,"change",L);mxEvent.addListener(q,"change",L);if(null!=c.pages&&(N=c.pages.length,null!=c.currentPage))for(L=0;L<c.pages.length;L++)if(c.currentPage==c.pages[L]){I=L+1;V.value=
-I;q.value=I;break}V.setAttribute("max",N);q.setAttribute("max",N);mxUtils.br(u);var D=c.addRadiobox(u,"pages",mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),M=c.addCheckbox(u,mxResources.get("crop"),!1,!0),T=c.addCheckbox(u,mxResources.get("grid"),!1,!1);mxEvent.addListener(Q,"change",K);mxEvent.addListener(P,"change",K);mxEvent.addListener(D,"change",K);H+=64}else D=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),M=c.addCheckbox(u,mxResources.get("crop"),!l.pageVisible||
-!c.pdfPageExport,!c.pdfPageExport),T=c.addCheckbox(u,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(D,"change",K);K=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var O=null,R=null;if(EditorUi.isElectronApp||K)R=c.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),H+=30;K&&(O=c.addCheckbox(u,mxResources.get("transparentBackground"),!1),H+=30);u=new CustomDialog(c,u,mxUtils.bind(this,function(){var S=null;if(!p){S=
-parseInt(V.value);var X=parseInt(q.value);S=Q.checked||S==I&&X==I?null:{from:Math.max(0,Math.min(N-1,S-1)),to:Math.max(0,Math.min(N-1,X-1))}}c.downloadFile("pdf",null,null,!D.checked,p?!0:!Q.checked&&null==S,!M.checked,null!=O&&O.checked,null,null,T.checked,null!=R&&R.checked,S)}),null,mxResources.get("export"));c.showDialog(u.container,300,H,!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 p(){null!=u&&u.removeDraft();c.fileLoaded(null)}var u=c.getCurrentFile();null!=u&&u.isModified()?c.confirm(mxResources.get("allChangesLost"),null,p,mxResources.get("cancel"),mxResources.get("discardChanges")):p()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var p=l.getSelectionCell(),u=l.view.getState(p);null!=
-u&&null!=u.shape&&null!=u.shape.stencil&&(p=new EditShapeDialog(c,p,mxResources.get("editShape")+":",630,400),c.showDialog(p.container,640,480,!0,!1),p.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(p,u){c.spinner.stop();p=new RevisionDialog(c,p,u);c.showDialog(p.container,640,480,!0,!0);p.init()}),mxUtils.bind(this,function(p){c.handleError(p)})):c.showError(mxResources.get("error"),
+null,null,"X")).isEnabled=function(){return m()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var p=document.createElement("div");p.style.whiteSpace="nowrap";var v=null==c.pages||1>=c.pages.length,H=document.createElement("h3");mxUtils.write(H,mxResources.get("formatXml"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(H);var K=c.addCheckbox(p,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),
+N=c.addCheckbox(p,mxResources.get("compressed"),!0),I=c.addCheckbox(p,mxResources.get("allPages"),!v,v);I.style.marginBottom="16px";mxEvent.addListener(K,"change",function(){K.checked?I.setAttribute("disabled","disabled"):I.removeAttribute("disabled")});p=new CustomDialog(c,p,mxUtils.bind(this,function(){c.downloadFile("xml",!N.checked,null,!K.checked,v||!I.checked)}),null,mxResources.get("export"));c.showDialog(p.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(p,v,H,K,N,I,L,Q,P){L=[];P&&L.push("tags=%7B%7D");p=new EmbedDialog(c,c.createLink(p,v,H,K,N,I,null,!0,L));c.showDialog(p.container,450,240,!0,!0);p.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(p){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),
+null,p,function(v,H,K,N,I,L,Q,P,V,W,n){c.createHtml(v,H,K,N,I,L,Q,P,V,W,n,mxUtils.bind(this,function(D,M){var T=c.getBaseFilename(Q);D='\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>'+D+"\n"+M+"\n</body>\n</html>";c.saveData(T+(".drawio"==T.substring(T.lenth-7)?"":".drawio")+".html","html",D,"text/html")}))})})}));c.actions.put("exportPdf",
+new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var p=null==c.pages||1>=c.pages.length,v=document.createElement("div");v.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("formatPdf"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(H);var K=function(){Q!=this&&this.checked?(M.removeAttribute("disabled"),M.checked=!l.pageVisible):(M.setAttribute("disabled",
+"disabled"),M.checked=!1)};H=200;var N=1,I=null;if(c.pdfPageExport&&!p){var L=function(){n.value=Math.max(1,Math.min(N,Math.max(parseInt(n.value),parseInt(V.value))));V.value=Math.max(1,Math.min(N,Math.min(parseInt(n.value),parseInt(V.value))))},Q=c.addRadiobox(v,"pages",mxResources.get("allPages"),!0),P=c.addRadiobox(v,"pages",mxResources.get("pages")+":",!1,null,!0),V=document.createElement("input");V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","1");V.setAttribute("type","number");
+V.setAttribute("min","1");V.style.width="50px";v.appendChild(V);var W=document.createElement("span");mxUtils.write(W,mxResources.get("to"));v.appendChild(W);var n=V.cloneNode(!0);v.appendChild(n);mxEvent.addListener(V,"focus",function(){P.checked=!0});mxEvent.addListener(n,"focus",function(){P.checked=!0});mxEvent.addListener(V,"change",L);mxEvent.addListener(n,"change",L);if(null!=c.pages&&(N=c.pages.length,null!=c.currentPage))for(L=0;L<c.pages.length;L++)if(c.currentPage==c.pages[L]){I=L+1;V.value=
+I;n.value=I;break}V.setAttribute("max",N);n.setAttribute("max",N);mxUtils.br(v);var D=c.addRadiobox(v,"pages",mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),M=c.addCheckbox(v,mxResources.get("crop"),!1,!0),T=c.addCheckbox(v,mxResources.get("grid"),!1,!1);mxEvent.addListener(Q,"change",K);mxEvent.addListener(P,"change",K);mxEvent.addListener(D,"change",K);H+=64}else D=c.addCheckbox(v,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),M=c.addCheckbox(v,mxResources.get("crop"),!l.pageVisible||
+!c.pdfPageExport,!c.pdfPageExport),T=c.addCheckbox(v,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(D,"change",K);K=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var O=null,R=null;if(EditorUi.isElectronApp||K)R=c.addCheckbox(v,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),H+=30;K&&(O=c.addCheckbox(v,mxResources.get("transparentBackground"),!1),H+=30);v=new CustomDialog(c,v,mxUtils.bind(this,function(){var S=null;if(!p){S=
+parseInt(V.value);var X=parseInt(n.value);S=Q.checked||S==I&&X==I?null:{from:Math.max(0,Math.min(N-1,S-1)),to:Math.max(0,Math.min(N-1,X-1))}}c.downloadFile("pdf",null,null,!D.checked,p?!0:!Q.checked&&null==S,!M.checked,null!=O&&O.checked,null,null,T.checked,null!=R&&R.checked,S)}),null,mxResources.get("export"));c.showDialog(v.container,300,H,!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 p(){null!=v&&v.removeDraft();c.fileLoaded(null)}var v=c.getCurrentFile();null!=v&&v.isModified()?c.confirm(mxResources.get("allChangesLost"),null,p,mxResources.get("cancel"),mxResources.get("discardChanges")):p()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var p=l.getSelectionCell(),v=l.view.getState(p);null!=
+v&&null!=v.shape&&null!=v.shape.stencil&&(p=new EditShapeDialog(c,p,mxResources.get("editShape")+":",630,400),c.showDialog(p.container,640,480,!0,!1),p.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(p,v){c.spinner.stop();p=new RevisionDialog(c,p,v);c.showDialog(p.container,640,480,!0,!0);p.init()}),mxUtils.bind(this,function(p){c.handleError(p)})):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");B=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(B.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var p=c.getCurrentFile();null!=p&&(window.drawdata=c.getFileData(),p=null!=p.getTitle()?p.getTitle():c.defaultFilename,
c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(p),null,!0))});"undefined"!==typeof MathJax&&(B=c.actions.addAction("mathematicalTypesetting",function(){var p=new ChangePageSetup(c);p.ignoreColor=!0;p.ignoreImage=!0;p.mathEnabled=!c.isMathEnabled();l.model.execute(p)}),B.setToggleAction(!0),B.setSelectedCallback(function(){return c.isMathEnabled()}),B.isEnabled=m);isLocalStorage&&(B=c.actions.addAction("showStartScreen",
-function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),B.setToggleAction(!0),B.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var J=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});J.setToggleAction(!0);J.setSelectedCallback(function(){return J.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var p=l.getSelectionCells(),u=[],H=0;H<p.length;H++)l.getModel().isVertex(p[H])&&
-u.push(p[H]);0<u.length&&(p=new EditGeometryDialog(c,u),c.showDialog(p.container,200,270,!0,!0),p.init())},null,null,Editor.ctrlKey+"+Shift+M");var f=null;c.actions.addAction("copyStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&(f=l.copyStyle(l.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=f&&l.pasteStyle(f,l.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",
-new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var p=new BackgroundImageDialog(c,function(u){c.setBackgroundImage(u)});c.showDialog(p.container,400,170,!0,!0);p.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(p,u,H,K,N,I,L,Q,P,V,W,q,D,M,T){P=parseInt(p);!isNaN(P)&&0<
-P&&(T?c.downloadFile("remoteSvg",null,null,H,null,Q,u,p,L,null,N):c.exportSvg(P/100,u,H,K,N,I,L,!Q,!1,V,q,D,M))}),!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(p,u,H,K,N,I,L,Q,P,V,W,q,D){p=parseInt(p);!isNaN(p)&&0<p&&c.exportImage(p/100,u,H,K,N,L,!Q,!1,null,W,null,q,D)}),
-!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(p,u,H,K,N){c.downloadFile(u?"xmlpng":"png",null,null,p,null,null,H,K,N)}),!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(p,u,H,K,N,I,L,Q,P,V,W,q,D){p=parseInt(p);!isNaN(p)&&0<p&&c.exportImage(p/100,!1,H,K,!1,L,!Q,!1,"jpeg",W,null,q,D)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(p,u,H,K,N){c.downloadFile("jpeg",null,null,p,null,null,null,K,N)}),!0,!0)}));B=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var p=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),u=mxUtils.getXml(0==
-p.length?c.editor.getGraphXml():l.encodeCells(p));c.copyImage(p,u)}));B.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;B=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){l.setShadowVisible(!l.shadowVisible)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return l.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),B.setToggleAction(!0),B.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var J=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});J.setToggleAction(!0);J.setSelectedCallback(function(){return J.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var p=l.getSelectionCells(),v=[],H=0;H<p.length;H++)l.getModel().isVertex(p[H])&&
+v.push(p[H]);0<v.length&&(p=new EditGeometryDialog(c,v),c.showDialog(p.container,200,270,!0,!0),p.init())},null,null,Editor.ctrlKey+"+Shift+M");var e=null;c.actions.addAction("copyStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&(e=l.copyStyle(l.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=e&&l.pasteStyle(e,l.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",
+new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var p=new BackgroundImageDialog(c,function(v){c.setBackgroundImage(v)});c.showDialog(p.container,400,170,!0,!0);p.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(p,v,H,K,N,I,L,Q,P,V,W,n,D,M,T){P=parseInt(p);!isNaN(P)&&0<
+P&&(T?c.downloadFile("remoteSvg",null,null,H,null,Q,v,p,L,null,N):c.exportSvg(P/100,v,H,K,N,I,L,!Q,!1,V,n,D,M))}),!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(p,v,H,K,N,I,L,Q,P,V,W,n,D){p=parseInt(p);!isNaN(p)&&0<p&&c.exportImage(p/100,v,H,K,N,L,!Q,!1,null,W,null,n,D)}),
+!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(p,v,H,K,N){c.downloadFile(v?"xmlpng":"png",null,null,p,null,null,H,K,N)}),!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(p,v,H,K,N,I,L,Q,P,V,W,n,D){p=parseInt(p);!isNaN(p)&&0<p&&c.exportImage(p/100,!1,H,K,!1,L,!Q,!1,"jpeg",W,null,n,D)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(p,v,H,K,N){c.downloadFile("jpeg",null,null,p,null,null,null,K,N)}),!0,!0)}));B=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var p=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),v=mxUtils.getXml(0==
+p.length?c.editor.getGraphXml():l.encodeCells(p));c.copyImage(p,v)}));B.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;B=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){l.setShadowVisible(!l.shadowVisible)}));B.setToggleAction(!0);B.setSelectedCallback(function(){return l.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 p=new FeedbackDialog(c);c.showDialog(p.container,610,360,!0,!1);p.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});B=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?
(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,
-function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));B=c.actions.addAction("findReplace",mxUtils.bind(this,function(p,u){var H=(p=l.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))?"findReplace":"find";u=H+"Window";if(null==this[u]){var K=p?"min"==uiTheme?330:300:240;this[u]=new FindWindow(c,document.body.offsetWidth-(K+20),100,K,p?"min"==uiTheme?304:288:170,p);this[u].window.addListener("show",function(){c.fireEvent(new mxEventObject(H))});this[u].window.addListener("hide",
-function(){c.fireEvent(new mxEventObject(H))});this[u].window.setVisible(!0)}else this[u].window.setVisible(!this[u].window.isVisible())}),null,null,Editor.ctrlKey+"+F");B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){var p=l.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[p]&&this[p].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var p=null==c.pages||1>=c.pages.length;if(p)c.exportVisio();else{var u=
-document.createElement("div");u.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("formatVsdx"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(H);var K=c.addCheckbox(u,mxResources.get("allPages"),!p,p);K.style.marginBottom="16px";p=new CustomDialog(c,u,mxUtils.bind(this,function(){c.exportVisio(!K.checked)}),null,mxResources.get("export"));c.showDialog(p.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&
-"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.marginRight="4px";p.checked=mxSettings.getShowStartScreen();p.defaultChecked=p.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var u=document.createElement("span");u.style["float"]="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-4px";u.appendChild(p);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,
-"click",function(N){mxEvent.getSource(N)!=p&&(p.checked=!p.checked)});header=u}var H=localStorage.getItem(Editor.configurationKey);u=[[mxResources.get("reset"),function(N,I){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(N)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(L){c.handleError(L)}})},"Shift+Click to Reset Settings"]];
-var K=c.actions.get("plugins");null!=K&&"1"==urlParams.sketch&&u.push([mxResources.get("plugins"),K.funct]);EditorUi.isElectronApp||u.push([mxResources.get("share"),function(N,I){if(0<I.value.length)try{var L=JSON.parse(I.value),Q=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(L)),P=new EmbedDialog(c,Q);c.showDialog(P.container,450,240,!0);P.init()}catch(V){c.handleError(V)}else c.handleError({message:mxResources.get("invalidInput")})}]);
-u=new TextareaDialog(c,mxResources.get("configuration")+":",null!=H?JSON.stringify(JSON.parse(H),null,2):"",function(N){if(null!=N)try{if(null!=p.parentNode&&(mxSettings.setShowStartScreen(p.checked),mxSettings.save()),N==H)c.hideDialog();else{if(0<N.length){var I=JSON.parse(N);localStorage.setItem(Editor.configurationKey,JSON.stringify(I))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(L){c.handleError(L)}},null,null,
-null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",u,p.parentNode);c.showDialog(u.container,620,460,!0,!1);u.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(p,u){var H=mxUtils.bind(this,function(N){var I=""==N?mxResources.get("automatic"):mxLanguageMap[N],L=null;""!=I&&(L=p.addItem(I,null,mxUtils.bind(this,function(){mxSettings.setLanguage(N);mxSettings.save();mxClient.language=N;mxResources.loadDefaultBundle=
-!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),u),(N==mxLanguage||""==N&&null==mxLanguage)&&p.addCheckmark(L,Editor.checkmarkImage));return L});H("");p.addSeparator(u);for(var K in mxLanguageMap)H(K)})));var g=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(p){var u=g.apply(this,arguments);if(null!=u&&"1"!=urlParams.embed&&"atlas"!=uiTheme&&"1"==urlParams["live-ui"]){var H=this.get("appearance");if(null!=H){var K=u.addMenu("",H.funct);
-K.setAttribute("title",mxResources.get("theme"));K.className="geToolbarButton geAdaptiveAsset";K.style.backgroundPosition="center center";K.style.backgroundRepeat="no-repeat";K.style.backgroundSize="100% 100%";K.style.display="inline-block";K.style.verticalAlign="top";K.style.marginLeft="2px";K.style.cursor="pointer";K.style.zIndex="1";K.style.position="absolute";K.style.height="18px";K.style.width="18px";"atlas"==Editor.currentTheme?(K.style.filter="invert(100%)",K.style.right="11px",K.style.top=
-"10px"):(K.style.right="10px",K.style.top="5px");"1"==urlParams.winCtrls&&(K.style.right="95px",K.style.webkitAppRegion="no-drag",icon.style.webkitAppRegion="no-drag");document.body.appendChild(K);u.langIcon=K;H=mxUtils.bind(this,function(){K.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("darkModeChanged",H);H();this.editorUi.switchThemeElt=K}}return u}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",
-intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var p=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(u){if(0<u.length)try{var H=JSON.parse(u);c.executeLayouts(l.createLayouts(H));c.customLayoutConfig=H;c.hideDialog()}catch(K){c.handleError(K)}},null,null,null,null,function(u,H){var K=mxUtils.button(mxResources.get("copy"),function(){try{var N=H.value;H.value=JSON.stringify(JSON.parse(N));
-H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));H.value=N}catch(I){c.handleError(I)}});K.setAttribute("title","copy");K.className="geBtn";u.appendChild(K)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(p.container,620,460,!0,!0);p.init()});B=this.get("viewZoom");var k=B.funct;B.funct=mxUtils.bind(this,function(p,u){k.apply(this,
-arguments);"simple"!=Editor.currentTheme&&"1"!=urlParams.sketch&&"min"!=uiTheme||this.addMenuItems(p,["-","outline","fullscreen"],u)});B=this.get("layout");var n=B.funct;B.funct=function(p,u){n.apply(this,arguments);p.addItem(mxResources.get("orgChart"),null,function(){var H=null,K=20,N=20,I=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=H){var M=c.editor.graph,T=new mxOrgChartLayout(M,H,K,N),O=M.getDefaultParent();1<M.model.getChildCount(M.getSelectionCell())&&(O=M.getSelectionCell());
+function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));B=c.actions.addAction("findReplace",mxUtils.bind(this,function(p,v){var H=(p=l.isEnabled()&&(null==v||!mxEvent.isShiftDown(v)))?"findReplace":"find";v=H+"Window";if(null==this[v]){var K=p?"min"==uiTheme?330:300:240;this[v]=new FindWindow(c,document.body.offsetWidth-(K+20),100,K,p?"min"==uiTheme?304:288:170,p);this[v].window.addListener("show",function(){c.fireEvent(new mxEventObject(H))});this[v].window.addListener("hide",
+function(){c.fireEvent(new mxEventObject(H))});this[v].window.setVisible(!0)}else this[v].window.setVisible(!this[v].window.isVisible())}),null,null,Editor.ctrlKey+"+F");B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){var p=l.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[p]&&this[p].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var p=null==c.pages||1>=c.pages.length;if(p)c.exportVisio();else{var v=
+document.createElement("div");v.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("formatVsdx"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(H);var K=c.addCheckbox(v,mxResources.get("allPages"),!p,p);K.style.marginBottom="16px";p=new CustomDialog(c,v,mxUtils.bind(this,function(){c.exportVisio(!K.checked)}),null,mxResources.get("export"));c.showDialog(p.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&
+"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.marginRight="4px";p.checked=mxSettings.getShowStartScreen();p.defaultChecked=p.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var v=document.createElement("span");v.style["float"]="right";v.style.cursor="pointer";v.style.userSelect="none";v.style.marginTop="-4px";v.appendChild(p);mxUtils.write(v,mxResources.get("showStartScreen"));mxEvent.addListener(v,
+"click",function(N){mxEvent.getSource(N)!=p&&(p.checked=!p.checked)});header=v}var H=localStorage.getItem(Editor.configurationKey);v=[[mxResources.get("reset"),function(N,I){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(N)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(L){c.handleError(L)}})},"Shift+Click to Reset Settings"]];
+var K=c.actions.get("plugins");null!=K&&"1"==urlParams.sketch&&v.push([mxResources.get("plugins"),K.funct]);EditorUi.isElectronApp||v.push([mxResources.get("share"),function(N,I){if(0<I.value.length)try{var L=JSON.parse(I.value),Q=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(L)),P=new EmbedDialog(c,Q);c.showDialog(P.container,450,240,!0);P.init()}catch(V){c.handleError(V)}else c.handleError({message:mxResources.get("invalidInput")})}]);
+v=new TextareaDialog(c,mxResources.get("configuration")+":",null!=H?JSON.stringify(JSON.parse(H),null,2):"",function(N){if(null!=N)try{if(null!=p.parentNode&&(mxSettings.setShowStartScreen(p.checked),mxSettings.save()),N==H)c.hideDialog();else{if(0<N.length){var I=JSON.parse(N);localStorage.setItem(Editor.configurationKey,JSON.stringify(I))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(L){c.handleError(L)}},null,null,
+null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",v,p.parentNode);c.showDialog(v.container,620,460,!0,!1);v.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(p,v){var H=mxUtils.bind(this,function(N){var I=""==N?mxResources.get("automatic"):mxLanguageMap[N],L=null;""!=I&&(L=p.addItem(I,null,mxUtils.bind(this,function(){mxSettings.setLanguage(N);mxSettings.save();mxClient.language=N;mxResources.loadDefaultBundle=
+!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),v),(N==mxLanguage||""==N&&null==mxLanguage)&&p.addCheckmark(L,Editor.checkmarkImage));return L});H("");p.addSeparator(v);for(var K in mxLanguageMap)H(K)})));var g=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(p){var v=g.apply(this,arguments);if(null!=v&&Editor.enableSimpleTheme&&"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&"atlas"!=uiTheme){var H=this.get("appearance");if(null!=
+H){var K=v.addMenu("",H.funct);K.setAttribute("title",mxResources.get("theme"));K.className="geToolbarButton geAdaptiveAsset";K.style.backgroundPosition="center center";K.style.backgroundRepeat="no-repeat";K.style.backgroundSize="100% 100%";K.style.display="inline-block";K.style.marginLeft="2px";K.style.cursor="pointer";K.style.zIndex="1";K.style.position="absolute";K.style.height="18px";K.style.width="18px";"atlas"==Editor.currentTheme?(K.style.filter="invert(100%)",K.style.right="11px",K.style.top=
+"10px"):(K.style.right="10px",K.style.top="5px");"1"==urlParams.winCtrls&&(K.style.right="95px",K.style.webkitAppRegion="no-drag",icon.style.webkitAppRegion="no-drag");document.body.appendChild(K);v.langIcon=K;H=mxUtils.bind(this,function(){K.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("darkModeChanged",H);H();this.editorUi.switchThemeElt=K}}return v}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",
+intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var p=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(v){if(0<v.length)try{var H=JSON.parse(v);c.executeLayouts(l.createLayouts(H));c.customLayoutConfig=H;c.hideDialog()}catch(K){c.handleError(K)}},null,null,null,null,function(v,H){var K=mxUtils.button(mxResources.get("copy"),function(){try{var N=H.value;H.value=JSON.stringify(JSON.parse(N));
+H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));H.value=N}catch(I){c.handleError(I)}});K.setAttribute("title","copy");K.className="geBtn";v.appendChild(K)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(p.container,620,460,!0,!0);p.init()});B=this.get("viewZoom");var k=B.funct;B.funct=mxUtils.bind(this,function(p,v){k.apply(this,
+arguments);"simple"!=Editor.currentTheme&&"1"!=urlParams.sketch&&"min"!=uiTheme||this.addMenuItems(p,["-","outline","fullscreen"],v)});B=this.get("layout");var q=B.funct;B.funct=function(p,v){q.apply(this,arguments);p.addItem(mxResources.get("orgChart"),null,function(){var H=null,K=20,N=20,I=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=H){var M=c.editor.graph,T=new mxOrgChartLayout(M,H,K,N),O=M.getDefaultParent();1<M.model.getChildCount(M.getSelectionCell())&&(O=M.getSelectionCell());
T.execute(O)}},L=document.createElement("div"),Q=document.createElement("div");Q.style.marginTop="6px";Q.style.display="inline-block";Q.style.width="140px";mxUtils.write(Q,mxResources.get("orgChartType")+": ");L.appendChild(Q);var P=document.createElement("select");P.style.width="200px";P.style.boxSizing="border-box";Q=[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 V=0;V<Q.length;V++){var W=document.createElement("option");mxUtils.write(W,Q[V]);W.value=V;2==V&&W.setAttribute("selected","selected");P.appendChild(W)}mxEvent.addListener(P,"change",function(){H=P.value});L.appendChild(P);Q=document.createElement("div");Q.style.marginTop="6px";Q.style.display="inline-block";Q.style.width="140px";mxUtils.write(Q,mxResources.get("parentChildSpacing")+": ");L.appendChild(Q);var q=document.createElement("input");q.type="number";q.value=
-K;q.style.width="200px";q.style.boxSizing="border-box";L.appendChild(q);mxEvent.addListener(q,"change",function(){K=q.value});Q=document.createElement("div");Q.style.marginTop="6px";Q.style.display="inline-block";Q.style.width="140px";mxUtils.write(Q,mxResources.get("siblingSpacing")+": ");L.appendChild(Q);var D=document.createElement("input");D.type="number";D.value=N;D.style.width="200px";D.style.boxSizing="border-box";L.appendChild(D);mxEvent.addListener(D,"change",function(){N=D.value});L=new CustomDialog(c,
-L,function(){null==H&&(H=2);c.loadOrgChartLayouts(I)});c.showDialog(L.container,355,140,!0,!0)},u,null,m());p.addSeparator(u);p.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var H=new mxParallelEdgeLayout(l);H.checkOverlap=!0;c.prompt(mxResources.get("spacing"),H.spacing,mxUtils.bind(this,function(K){H.spacing=K;c.executeLayout(function(){H.execute(l.getDefaultParent(),l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}),u);p.addSeparator(u);c.menus.addMenuItem(p,"runLayout",
-u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(p,u){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(p,["about"],u);else{var H=p.addItem("Search:",null,null,u,null,null,!1);H.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";H.style.cursor="default";var K=document.createElement("input");K.setAttribute("type","text");K.setAttribute("size","25");K.style.marginLeft="8px";mxEvent.addListener(K,"keydown",mxUtils.bind(this,function(N){var I=
+mxResources.get("smart")];for(var V=0;V<Q.length;V++){var W=document.createElement("option");mxUtils.write(W,Q[V]);W.value=V;2==V&&W.setAttribute("selected","selected");P.appendChild(W)}mxEvent.addListener(P,"change",function(){H=P.value});L.appendChild(P);Q=document.createElement("div");Q.style.marginTop="6px";Q.style.display="inline-block";Q.style.width="140px";mxUtils.write(Q,mxResources.get("parentChildSpacing")+": ");L.appendChild(Q);var n=document.createElement("input");n.type="number";n.value=
+K;n.style.width="200px";n.style.boxSizing="border-box";L.appendChild(n);mxEvent.addListener(n,"change",function(){K=n.value});Q=document.createElement("div");Q.style.marginTop="6px";Q.style.display="inline-block";Q.style.width="140px";mxUtils.write(Q,mxResources.get("siblingSpacing")+": ");L.appendChild(Q);var D=document.createElement("input");D.type="number";D.value=N;D.style.width="200px";D.style.boxSizing="border-box";L.appendChild(D);mxEvent.addListener(D,"change",function(){N=D.value});L=new CustomDialog(c,
+L,function(){null==H&&(H=2);c.loadOrgChartLayouts(I)});c.showDialog(L.container,355,140,!0,!0)},v,null,m());p.addSeparator(v);p.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var H=new mxParallelEdgeLayout(l);H.checkOverlap=!0;c.prompt(mxResources.get("spacing"),H.spacing,mxUtils.bind(this,function(K){H.spacing=K;c.executeLayout(function(){H.execute(l.getDefaultParent(),l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}),v);p.addSeparator(v);c.menus.addMenuItem(p,"runLayout",
+v,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(p,v){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(p,["about"],v);else{var H=p.addItem("Search:",null,null,v,null,null,!1);H.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";H.style.cursor="default";var K=document.createElement("input");K.setAttribute("type","text");K.setAttribute("size","25");K.style.marginLeft="8px";mxEvent.addListener(K,"keydown",mxUtils.bind(this,function(N){var I=
mxUtils.trim(K.value);13==N.keyCode&&0<I.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(I)),K.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:I}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==N.keyCode&&(K.value="")}));H.firstChild.nextSibling.appendChild(K);mxEvent.addGestureListeners(K,function(N){document.activeElement!=
-K&&K.focus();mxEvent.consume(N)},function(N){mxEvent.consume(N)},function(N){mxEvent.consume(N)});window.setTimeout(function(){K.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),this.addMenuItems(p,"- keyboardShortcuts quickStart website support -".split(" "),u),"1"!=urlParams.disableUpdate&&this.addMenuItems(p,["check4Updates"],u),this.addMenuItems(p,["openDevTools",
-"-","about"],u)):this.addMenuItems(p,"- keyboardShortcuts quickStart support - about".split(" "),u)}"1"==urlParams.test&&(p.addSeparator(u),this.addSubmenu("testDevelop",p,u))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var p=prompt("Language Code",Graph.diagramLanguage||"");null!=p&&(Graph.diagramLanguage=0<p.length?p:null,l.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");
+K&&K.focus();mxEvent.consume(N)},function(N){mxEvent.consume(N)},function(N){mxEvent.consume(N)});window.setTimeout(function(){K.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),this.addMenuItems(p,"- keyboardShortcuts quickStart website support -".split(" "),v),"1"!=urlParams.disableUpdate&&this.addMenuItems(p,["check4Updates"],v),this.addMenuItems(p,["openDevTools",
+"-","about"],v)):this.addMenuItems(p,"- keyboardShortcuts quickStart support - about".split(" "),v)}"1"==urlParams.test&&(p.addSeparator(v),this.addSubmenu("testDevelop",p,v))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var p=prompt("Language Code",Graph.diagramLanguage||"");null!=p&&(Graph.diagramLanguage=0<p.length?p:null,l.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(!l.isSelectionEmpty()){var p=l.cloneCells(l.getSelectionCells()),u=l.getBoundingBoxFromGeometry(p);p=l.moveCells(p,-u.x,-u.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(p)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var p=l.getGraphBounds(),u=l.view.translate,H=l.view.scale;l.insertVertex(l.getDefaultParent(),null,"",p.x/H-u.x,p.y/H-
-u.y,p.width/H,p.height/H,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var p=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";p=new TextareaDialog(c,"Paste Data:",p,function(u){if(0<u.length)try{var H=function(Q){function P(X){if(null==S[X]){if(S[X]=!0,null!=q[X]){for(;0<q[X].length;){var Y=q[X].pop();P(Y)}delete q[X]}}else mxLog.debug(V+": Visited: "+X)}var V=Q.parentNode.id,W=Q.childNodes;Q={};
-for(var q={},D=null,M={},T=0;T<W.length;T++){var O=W[T];if(null!=O.id&&0<O.id.length)if(null==Q[O.id]){Q[O.id]=O.id;var R=O.getAttribute("parent");null==R?null!=D?mxLog.debug(V+": Multiple roots: "+O.id):D=O.id:(null==q[R]&&(q[R]=[]),q[R].push(O.id))}else M[O.id]=O.id}W=Object.keys(M);0<W.length?(W=V+": "+W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(V+": Checked");var S={};null==D?mxLog.debug(V+": No root"):(P(D),Object.keys(S).length!=Object.keys(Q).length&&
-(mxLog.debug(V+": Invalid tree: (see console)"),console.log(V+": Invalid tree",q)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var K=mxUtils.parseXml(u),N=c.getPagesForNode(K.documentElement,"mxGraphModel");if(null!=N&&0<N.length)try{var I=c.getHashValueForPages(N);mxLog.debug("Checksum: ",I)}catch(Q){mxLog.debug("Error: ",Q.message)}else mxLog.debug("No pages found for checksum");var L=K.getElementsByTagName("root");for(u=0;u<L.length;u++)H(L[u]);
-mxLog.show()}catch(Q){c.handleError(Q),null!=window.console&&console.error(Q)}});c.showDialog(p.container,620,460,!0,!0);p.init()}));var v=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var p=new TextareaDialog(c,"Diff/Sync:","",function(u){var H=c.getCurrentFile();if(0<u.length&&null!=H)try{var K=JSON.parse(u);H.patch([K],null,!0);c.hideDialog()}catch(N){c.handleError(N)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,H){v=c.getPagesForXml(c.getFileData(!0));
-p.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(v)}],["Diff",function(u,H){try{p.textarea.value=JSON.stringify(c.diffPages(v,c.pages),null,2)}catch(K){c.handleError(K)}}]]);null==v?(v=c.getPagesForXml(c.getFileData(!0)),p.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(v)):p.textarea.value=JSON.stringify(c.diffPages(v,c.pages),null,2);c.showDialog(p.container,620,460,!0,!0);p.init()}else c.alert("No pages")}));
-c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var p=c.getCurrentFile();console.log("editorUi",c,"file",p);if(null!=p&&p.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(p.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(p.theirPages));console.log("diff ownPages/theirPages",c.diffPages(p.ownPages,p.theirPages));var u=p.getShadowPages();null!=u&&(console.log("Checksum shadowPages",c.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",
-c.diffPages(u,p.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(p.ownPages,u)),console.log("diff theirPages/shadowPages",c.diffPages(p.theirPages,u)));null!=p.sync&&null!=p.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(p.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(p.ownPages,p.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(p.theirPages,p.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(p.sync.snapshot,
+function(){if(!l.isSelectionEmpty()){var p=l.cloneCells(l.getSelectionCells()),v=l.getBoundingBoxFromGeometry(p);p=l.moveCells(p,-v.x,-v.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+v.width+", "+v.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(p)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var p=l.getGraphBounds(),v=l.view.translate,H=l.view.scale;l.insertVertex(l.getDefaultParent(),null,"",p.x/H-v.x,p.y/H-
+v.y,p.width/H,p.height/H,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var p=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";p=new TextareaDialog(c,"Paste Data:",p,function(v){if(0<v.length)try{var H=function(Q){function P(X){if(null==S[X]){if(S[X]=!0,null!=n[X]){for(;0<n[X].length;){var Y=n[X].pop();P(Y)}delete n[X]}}else mxLog.debug(V+": Visited: "+X)}var V=Q.parentNode.id,W=Q.childNodes;Q={};
+for(var n={},D=null,M={},T=0;T<W.length;T++){var O=W[T];if(null!=O.id&&0<O.id.length)if(null==Q[O.id]){Q[O.id]=O.id;var R=O.getAttribute("parent");null==R?null!=D?mxLog.debug(V+": Multiple roots: "+O.id):D=O.id:(null==n[R]&&(n[R]=[]),n[R].push(O.id))}else M[O.id]=O.id}W=Object.keys(M);0<W.length?(W=V+": "+W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(V+": Checked");var S={};null==D?mxLog.debug(V+": No root"):(P(D),Object.keys(S).length!=Object.keys(Q).length&&
+(mxLog.debug(V+": Invalid tree: (see console)"),console.log(V+": Invalid tree",n)))};"<"!=v.charAt(0)&&(v=Graph.decompress(v),mxLog.debug("See console for uncompressed XML"),console.log("xml",v));var K=mxUtils.parseXml(v),N=c.getPagesForNode(K.documentElement,"mxGraphModel");if(null!=N&&0<N.length)try{var I=c.getHashValueForPages(N);mxLog.debug("Checksum: ",I)}catch(Q){mxLog.debug("Error: ",Q.message)}else mxLog.debug("No pages found for checksum");var L=K.getElementsByTagName("root");for(v=0;v<L.length;v++)H(L[v]);
+mxLog.show()}catch(Q){c.handleError(Q),null!=window.console&&console.error(Q)}});c.showDialog(p.container,620,460,!0,!0);p.init()}));var u=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var p=new TextareaDialog(c,"Diff/Sync:","",function(v){var H=c.getCurrentFile();if(0<v.length&&null!=H)try{var K=JSON.parse(v);H.patch([K],null,!0);c.hideDialog()}catch(N){c.handleError(N)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(v,H){u=c.getPagesForXml(c.getFileData(!0));
+p.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(u)}],["Diff",function(v,H){try{p.textarea.value=JSON.stringify(c.diffPages(u,c.pages),null,2)}catch(K){c.handleError(K)}}]]);null==u?(u=c.getPagesForXml(c.getFileData(!0)),p.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(u)):p.textarea.value=JSON.stringify(c.diffPages(u,c.pages),null,2);c.showDialog(p.container,620,460,!0,!0);p.init()}else c.alert("No pages")}));
+c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var p=c.getCurrentFile();console.log("editorUi",c,"file",p);if(null!=p&&p.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(p.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(p.theirPages));console.log("diff ownPages/theirPages",c.diffPages(p.ownPages,p.theirPages));var v=p.getShadowPages();null!=v&&(console.log("Checksum shadowPages",c.getHashValueForPages(v)),console.log("diff shadowPages/ownPages",
+c.diffPages(v,p.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(p.ownPages,v)),console.log("diff theirPages/shadowPages",c.diffPages(p.theirPages,v)));null!=p.sync&&null!=p.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(p.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(p.ownPages,p.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(p.theirPages,p.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(p.sync.snapshot,
c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(p.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(p.theirPages,c.pages)))}null!=p&&console.log("Shadow pages",[c.getXmlForPages(p.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 p=c.getCurrentFile();null!=p&&p.isRealtime()&&null!=p.shadowPages&&
-(console.log("patching actualPages to shadowPages",p.patch([c.diffPages(p.shadowPages,c.pages)])),p.ownPages=c.clonePages(c.pages),p.theirPages=c.clonePages(c.pages),p.shadowPages=c.clonePages(c.pages),null!=p.sync&&(p.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){l.model.beginUpdate();try{var p=l.model.cells,u=0,H=[],K=[],N;for(N in p){var I=p[N],L=l.getCurrentCellStyle(I)[mxConstants.STYLE_IMAGE];null!=L&&"data:"==L.substring(0,5)&&(null==
-H[L]&&(H[L]=(H[L]||0)+1,u++),K.push(I))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,K);console.log("Removed",u,"image(s) from",K.length,"cell(s): ",[K,H])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var p=new mxImageExport,u=l.getGraphBounds(),H=l.view.scale,K=mxUtils.createXmlDocument(),N=K.createElement("output");K.appendChild(N);K=new mxXmlCanvas2D(N);
-K.translate(Math.floor((1-u.x)/H),Math.floor((1-u.y)/H));K.scale(1/H);var I=0,L=K.save;K.save=function(){I++;L.apply(this,arguments)};var Q=K.restore;K.restore=function(){I--;Q.apply(this,arguments)};var P=p.drawShape;p.drawShape=function(V){mxLog.debug("entering shape",V,I);P.apply(this,arguments);mxLog.debug("leaving shape",V,I)};p.drawState(l.getView().getState(l.model.root),K);mxLog.show();mxLog.debug(mxUtils.getXml(N));mxLog.debug("stateCounter",I)}));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(p,u){this.addMenuItems(p,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),u)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?
+(console.log("patching actualPages to shadowPages",p.patch([c.diffPages(p.shadowPages,c.pages)])),p.ownPages=c.clonePages(c.pages),p.theirPages=c.clonePages(c.pages),p.shadowPages=c.clonePages(c.pages),null!=p.sync&&(p.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){l.model.beginUpdate();try{var p=l.model.cells,v=0,H=[],K=[],N;for(N in p){var I=p[N],L=l.getCurrentCellStyle(I)[mxConstants.STYLE_IMAGE];null!=L&&"data:"==L.substring(0,5)&&(null==
+H[L]&&(H[L]=(H[L]||0)+1,v++),K.push(I))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,K);console.log("Removed",v,"image(s) from",K.length,"cell(s): ",[K,H])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var p=new mxImageExport,v=l.getGraphBounds(),H=l.view.scale,K=mxUtils.createXmlDocument(),N=K.createElement("output");K.appendChild(N);K=new mxXmlCanvas2D(N);
+K.translate(Math.floor((1-v.x)/H),Math.floor((1-v.y)/H));K.scale(1/H);var I=0,L=K.save;K.save=function(){I++;L.apply(this,arguments)};var Q=K.restore;K.restore=function(){I--;Q.apply(this,arguments)};var P=p.drawShape;p.drawShape=function(V){mxLog.debug("entering shape",V,I);P.apply(this,arguments);mxLog.debug("leaving shape",V,I)};p.drawState(l.getView().getState(l.model.root),K);mxLog.show();mxLog.debug(mxUtils.getXml(N));mxLog.debug("stateCounter",I)}));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(p,v){this.addMenuItems(p,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),v)})))}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(p){l.isEnabled()&&(p=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),p.vertex=!0,p=new EditShapeDialog(c,p,mxResources.get("editShape")+":",630,400),c.showDialog(p.container,640,480,!0,!1),p.init())})).isEnabled=m;c.actions.put("embedHtml",new Action(mxResources.get("html")+
-"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(p){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",p,function(u,H,K,N,I,L,Q,P,V,W,q){c.createHtml(u,H,K,N,I,L,Q,P,V,W,q,mxUtils.bind(this,function(D,M){var T=new EmbedDialog(c,D+"\n"+M,null,null,function(){var O=window.open(),R=O.document;if(null!=R){"CSS1Compat"===document.compatMode&&R.writeln("<!DOCTYPE html>");R.writeln("<html>");
+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(p){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",p,function(v,H,K,N,I,L,Q,P,V,W,n){c.createHtml(v,H,K,N,I,L,Q,P,V,W,n,mxUtils.bind(this,function(D,M){var T=new EmbedDialog(c,D+"\n"+M,null,null,function(){var O=window.open(),R=O.document;if(null!=R){"CSS1Compat"===document.compatMode&&R.writeln("<!DOCTYPE html>");R.writeln("<html>");
R.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');R.writeln("<body>");R.writeln(D);var S=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;S&&R.writeln(M);R.writeln("</body>");R.writeln("</html>");R.close();if(!S){var X=O.document.createElement("div");X.marginLeft="26px";X.marginTop="26px";mxUtils.write(X,mxResources.get("updatingDocument"));S=O.document.createElement("img");S.setAttribute("src",window.location.protocol+"//"+
window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");S.style.marginLeft="6px";X.appendChild(S);O.document.body.insertBefore(X,O.document.body.firstChild);window.setTimeout(function(){var Y=document.createElement("script");Y.type="text/javascript";Y.src=/<script.*?src="(.*?)"/.exec(M)[1];R.body.appendChild(Y);X.parentNode.removeChild(X)},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 p=c.getCurrentFile();null!=p&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();null!=u?(u=new EmbedDialog(c,'<img src="'+(p.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+p.getId())+'"/>'),c.showDialog(u.container,450,240,!0,!0),u.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(p,
-u,H,K,N,I){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(p,u,H,K,N,I,function(L){c.spinner.stop();L=new EmbedDialog(c,L);c.showDialog(L.container,450,240,!0,!0);L.init()},function(L){c.spinner.stop();c.handleError(L)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(p,u,H,K,N,I){c.spinner.spin(document.body,mxResources.get("loading"))&&
-c.createEmbedSvg(p,u,H,K,N,I,function(L){c.spinner.stop();L=new EmbedDialog(c,L);c.showDialog(L.container,450,240,!0,!0);L.init()},function(L){c.spinner.stop();c.handleError(L)})},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 p=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(p.height/l.view.scale)+2,function(u,
-H,K,N,I,L,Q,P,V){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(W){c.spinner.stop();var q=[];V&&q.push("tags=%7B%7D");W=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+Q+";height:"+P+';" src="'+c.createLink(u,H,K,N,I,L,W,null,q)+'"></iframe>');c.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var p=document.createElement("div");p.style.position=
-"absolute";p.style.bottom="30px";p.style.textAlign="center";p.style.width="100%";p.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,mxResources.get("getNotionChromeExtension"));p.appendChild(u);mxEvent.addListener(u,"click",function(H){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(H)});c.showPublishLinkDialog(mxResources.get("notion"),
-null,null,null,function(H,K,N,I,L,Q,P,V,W){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(q){c.spinner.stop();var D=["border=0"];W&&D.push("tags=%7B%7D");q=new EmbedDialog(c,c.createLink(H,K,N,I,L,Q,q,null,D,!0));c.showDialog(q.container,450,240,!0,!0);q.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",p)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(p,
-u,H,K,N,I,L,Q,P){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(V){c.spinner.stop();var W=[];P&&W.push("tags=%7B%7D");V=new EmbedDialog(c,c.createLink(p,u,H,K,N,I,V,null,W));c.showDialog(V.container,450,240,!0,!0);V.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...",
+new Action("Live image...",function(){var p=c.getCurrentFile();null!=p&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(v){c.spinner.stop();null!=v?(v=new EmbedDialog(c,'<img src="'+(p.constructor!=DriveFile?v:"https://drive.google.com/uc?id="+p.getId())+'"/>'),c.showDialog(v.container,450,240,!0,!0),v.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(p,
+v,H,K,N,I){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(p,v,H,K,N,I,function(L){c.spinner.stop();L=new EmbedDialog(c,L);c.showDialog(L.container,450,240,!0,!0);L.init()},function(L){c.spinner.stop();c.handleError(L)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(p,v,H,K,N,I){c.spinner.spin(document.body,mxResources.get("loading"))&&
+c.createEmbedSvg(p,v,H,K,N,I,function(L){c.spinner.stop();L=new EmbedDialog(c,L);c.showDialog(L.container,450,240,!0,!0);L.init()},function(L){c.spinner.stop();c.handleError(L)})},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 p=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(p.height/l.view.scale)+2,function(v,
+H,K,N,I,L,Q,P,V){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(W){c.spinner.stop();var n=[];V&&n.push("tags=%7B%7D");W=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+Q+";height:"+P+';" src="'+c.createLink(v,H,K,N,I,L,W,null,n)+'"></iframe>');c.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var p=document.createElement("div");p.style.position=
+"absolute";p.style.bottom="30px";p.style.textAlign="center";p.style.width="100%";p.style.left="0px";var v=document.createElement("a");v.setAttribute("href","javascript:void(0);");v.setAttribute("target","_blank");v.style.cursor="pointer";mxUtils.write(v,mxResources.get("getNotionChromeExtension"));p.appendChild(v);mxEvent.addListener(v,"click",function(H){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(H)});c.showPublishLinkDialog(mxResources.get("notion"),
+null,null,null,function(H,K,N,I,L,Q,P,V,W){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(n){c.spinner.stop();var D=["border=0"];W&&D.push("tags=%7B%7D");n=new EmbedDialog(c,c.createLink(H,K,N,I,L,Q,n,null,D,!0));c.showDialog(n.container,450,240,!0,!0);n.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",p)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(p,
+v,H,K,N,I,L,Q,P){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(V){c.spinner.stop();var W=[];P&&W.push("tags=%7B%7D");V=new EmbedDialog(c,c.createLink(p,v,H,K,N,I,V,null,W));c.showDialog(V.container,450,240,!0,!0);V.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(p){c.spinner.stop();p=new GoogleSitesDialog(c,p);c.showDialog(p.container,420,256,!0,!0);p.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)B=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),
B.setToggleAction(!0),B.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});B=c.actions.addAction("search",function(){var p=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!p);isLocalStorage&&(mxSettings.settings.search=!p,mxSettings.save())});B.label=mxResources.get("searchShapes");B.setToggleAction(!0);B.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});
-"1"==urlParams.embed&&(c.actions.get("save").funct=function(p){l.isEditing()&&l.stopEditing();var u="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var H=c.createLoadMessage("save");H.xml=u;p&&(H.exit=!0);u=JSON.stringify(H)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));p=c.getCurrentFile();null==p||p.constructor==
-EmbedFile||p.constructor==LocalFile&&null==p.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 p=function(){c.editor.modified=!1;var u="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):
-"";(window.opener||window.parent).postMessage(u,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,p,mxResources.get("cancel"),mxResources.get("discardChanges")):p()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(p,u){c.isExportToCanvas()?(this.addMenuItems(p,["exportPng"],u),c.jpgSupported&&this.addMenuItems(p,["exportJpg"],u)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(p,["exportPng","exportJpg"],u);this.addMenuItems(p,["exportSvg",
-"-"],u);c.isOffline()||c.printPdfExport?this.addMenuItems(p,["exportPdf"],u):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(p,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(p,["exportVsdx"],u);this.addMenuItems(p,["-","exportHtml","exportXml","exportUrl"],u);c.isOffline()||(p.addSeparator(u),this.addMenuItem(p,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");if("simple"==Editor.currentTheme||
-"min"==Editor.currentTheme)mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.addMenuItems(p,["publishLink"],u),c.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(p.addSeparator(u),c.menus.addSubmenu("embed",p,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(p,u){function H(I){I.pickFile(function(L){c.spinner.spin(document.body,mxResources.get("loading"))&&I.getFile(L,function(Q){var P="data:image/"==Q.getData().substring(0,11)?N(Q.getTitle()):"text/xml";/\.svg$/i.test(Q.getTitle())&&
-!c.editor.isDataSvg(Q.getData())&&(Q.setData(Editor.createSvgDataUri(Q.getData())),P="image/svg+xml");K(Q.getData(),P,Q.getTitle())},function(Q){c.handleError(Q,null!=Q?mxResources.get("errorLoadingFile"):null)},I==c.drive)},!0)}var K=mxUtils.bind(this,function(I,L,Q){var P=l.view,V=l.getGraphBounds(),W=l.snap(Math.ceil(Math.max(0,V.x/P.scale-P.translate.x)+4*l.gridSize)),q=l.snap(Math.ceil(Math.max(0,(V.y+V.height)/P.scale-P.translate.y)+4*l.gridSize));"data:image/"==I.substring(0,11)?c.loadImage(I,
-mxUtils.bind(this,function(D){var M=!0,T=mxUtils.bind(this,function(){c.resizeImage(D,I,mxUtils.bind(this,function(O,R,S){O=M?Math.min(1,Math.min(c.maxImageSize/R,c.maxImageSize/S)):1;c.importFile(I,L,W,q,Math.round(R*O),Math.round(S*O),Q,function(X){c.spinner.stop();l.setSelectionCells(X);l.scrollCellToVisible(l.getSelectionCell())})}),M)});I.length>c.resampleThreshold?c.confirmImageResize(function(O){M=O;T()}):T()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):
-c.importFile(I,L,W,q,0,0,Q,function(D){c.spinner.stop();l.setSelectionCells(D);l.scrollCellToVisible(l.getSelectionCell())})}),N=mxUtils.bind(this,function(I){var L="text/xml";/\.png$/i.test(I)?L="image/png":/\.jpe?g$/i.test(I)?L="image/jpg":/\.gif$/i.test(I)?L="image/gif":/\.pdf$/i.test(I)&&(L="application/pdf");return L});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?p.addItem(mxResources.get("googleDrive")+"...",null,function(){H(c.drive)},u):t&&"function"===typeof window.DriveClient&&
-p.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=c.oneDrive?p.addItem(mxResources.get("oneDrive")+"...",null,function(){H(c.oneDrive)},u):C&&"function"===typeof window.OneDriveClient&&p.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?p.addItem(mxResources.get("dropbox")+"...",null,function(){H(c.dropbox)},u):y&&"function"===typeof window.DropboxClient&&p.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);p.addSeparator(u);null!=c.gitHub&&p.addItem(mxResources.get("github")+"...",null,function(){H(c.gitHub)},u);null!=c.gitLab&&p.addItem(mxResources.get("gitlab")+"...",null,function(){H(c.gitLab)},u);null!=c.trello?p.addItem(mxResources.get("trello")+"...",null,function(){H(c.trello)},u):A&&"function"===typeof window.TrelloClient&&p.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);
-p.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&p.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&p.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},u);c.isOffline()||(p.addSeparator(u),p.addItem(mxResources.get("url")+"...",null,function(){var I=new FilenameDialog(c,"",mxResources.get("import"),function(L){if(null!=L&&0<L.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var Q=/(\.png)($|\?)/i.test(L)?
-"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(L),function(P){K(P,Q,L)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==Q)}},mxResources.get("url"));c.showDialog(I.container,300,80,!0,!0);I.init()},u))}))).isEnabled=m;this.put("appearance",new Menu(mxUtils.bind(this,function(p,u){(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(p,["toggleDarkMode"],u);this.addMenuItems(p,["toggleSimpleMode",
-"toggleSketchMode"],u)})));this.put("theme",new Menu(mxUtils.bind(this,function(p,u){var H="1"==urlParams.sketch?"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(p,["toggleDarkMode"],u);p.addSeparator(u);var K=p.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},u);"kennedy"!=H&&"atlas"!=H&&"dark"!=H&&"simple"!=H&&"sketch"!=H&&"min"!=H&&p.addCheckmark(K,Editor.checkmarkImage);K=p.addItem(mxResources.get("default"),
-null,function(){c.setCurrentTheme("kennedy")},u);"kennedy"!=H&&"dark"!=H&&"simple"!=H||p.addCheckmark(K,Editor.checkmarkImage);K=p.addItem(mxResources.get("sketch"),null,function(){c.setCurrentTheme("sketch")},u);"sketch"==H&&p.addCheckmark(K,Editor.checkmarkImage);K=p.addItem(mxResources.get("minimal"),null,function(){c.setCurrentTheme("min")},u);"min"==H&&p.addCheckmark(K,Editor.checkmarkImage);K=p.addItem(mxResources.get("atlas"),null,function(){c.setCurrentTheme("atlas")},u);"atlas"==H&&p.addCheckmark(K,
-Editor.checkmarkImage)})));B=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var p=this.editorUi.getCurrentFile();if(null!=p)if(p.constructor==LocalFile&&null!=p.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(H,K){p.invalidFileHandle=null;p.fileHandle=H;p.title=K.name;p.desc=K;c.save(K.name)}),null,c.createFileSystemOptions(p.getTitle()));else{var u=null!=p.getTitle()?p.getTitle():this.editorUi.defaultFilename;u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),
+"1"==urlParams.embed&&(c.actions.get("save").funct=function(p){l.isEditing()&&l.stopEditing();var v="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var H=c.createLoadMessage("save");H.xml=v;p&&(H.exit=!0);v=JSON.stringify(H)}(window.opener||window.parent).postMessage(v,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));p=c.getCurrentFile();null==p||p.constructor==
+EmbedFile||p.constructor==LocalFile&&null==p.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 p=function(){c.editor.modified=!1;var v="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):
+"";(window.opener||window.parent).postMessage(v,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,p,mxResources.get("cancel"),mxResources.get("discardChanges")):p()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(p,v){c.isExportToCanvas()?(this.addMenuItems(p,["exportPng"],v),c.jpgSupported&&this.addMenuItems(p,["exportJpg"],v)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(p,["exportPng","exportJpg"],v);this.addMenuItems(p,["exportSvg",
+"-"],v);c.isOffline()||c.printPdfExport?this.addMenuItems(p,["exportPdf"],v):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(p,["exportPdf"],v);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(p,["exportVsdx"],v);this.addMenuItems(p,["-","exportHtml","exportXml","exportUrl"],v);c.isOffline()||(p.addSeparator(v),this.addMenuItem(p,"export",v).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");if("simple"==Editor.currentTheme||
+"min"==Editor.currentTheme)mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.addMenuItems(p,["publishLink"],v),c.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(p.addSeparator(v),c.menus.addSubmenu("embed",p,v))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(p,v){function H(I){I.pickFile(function(L){c.spinner.spin(document.body,mxResources.get("loading"))&&I.getFile(L,function(Q){var P="data:image/"==Q.getData().substring(0,11)?N(Q.getTitle()):"text/xml";/\.svg$/i.test(Q.getTitle())&&
+!c.editor.isDataSvg(Q.getData())&&(Q.setData(Editor.createSvgDataUri(Q.getData())),P="image/svg+xml");K(Q.getData(),P,Q.getTitle())},function(Q){c.handleError(Q,null!=Q?mxResources.get("errorLoadingFile"):null)},I==c.drive)},!0)}var K=mxUtils.bind(this,function(I,L,Q){var P=l.view,V=l.getGraphBounds(),W=l.snap(Math.ceil(Math.max(0,V.x/P.scale-P.translate.x)+4*l.gridSize)),n=l.snap(Math.ceil(Math.max(0,(V.y+V.height)/P.scale-P.translate.y)+4*l.gridSize));"data:image/"==I.substring(0,11)?c.loadImage(I,
+mxUtils.bind(this,function(D){var M=!0,T=mxUtils.bind(this,function(){c.resizeImage(D,I,mxUtils.bind(this,function(O,R,S){O=M?Math.min(1,Math.min(c.maxImageSize/R,c.maxImageSize/S)):1;c.importFile(I,L,W,n,Math.round(R*O),Math.round(S*O),Q,function(X){c.spinner.stop();l.setSelectionCells(X);l.scrollCellToVisible(l.getSelectionCell())})}),M)});I.length>c.resampleThreshold?c.confirmImageResize(function(O){M=O;T()}):T()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):
+c.importFile(I,L,W,n,0,0,Q,function(D){c.spinner.stop();l.setSelectionCells(D);l.scrollCellToVisible(l.getSelectionCell())})}),N=mxUtils.bind(this,function(I){var L="text/xml";/\.png$/i.test(I)?L="image/png":/\.jpe?g$/i.test(I)?L="image/jpg":/\.gif$/i.test(I)?L="image/gif":/\.pdf$/i.test(I)&&(L="application/pdf");return L});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?p.addItem(mxResources.get("googleDrive")+"...",null,function(){H(c.drive)},v):t&&"function"===typeof window.DriveClient&&
+p.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=c.oneDrive?p.addItem(mxResources.get("oneDrive")+"...",null,function(){H(c.oneDrive)},v):C&&"function"===typeof window.OneDriveClient&&p.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=c.dropbox?p.addItem(mxResources.get("dropbox")+"...",null,function(){H(c.dropbox)},v):y&&"function"===typeof window.DropboxClient&&p.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);p.addSeparator(v);null!=c.gitHub&&p.addItem(mxResources.get("github")+"...",null,function(){H(c.gitHub)},v);null!=c.gitLab&&p.addItem(mxResources.get("gitlab")+"...",null,function(){H(c.gitLab)},v);null!=c.trello?p.addItem(mxResources.get("trello")+"...",null,function(){H(c.trello)},v):A&&"function"===typeof window.TrelloClient&&p.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);
+p.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&p.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},v);"1"!=urlParams.noDevice&&p.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},v);c.isOffline()||(p.addSeparator(v),p.addItem(mxResources.get("url")+"...",null,function(){var I=new FilenameDialog(c,"",mxResources.get("import"),function(L){if(null!=L&&0<L.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var Q=/(\.png)($|\?)/i.test(L)?
+"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(L),function(P){K(P,Q,L)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==Q)}},mxResources.get("url"));c.showDialog(I.container,300,80,!0,!0);I.init()},v))}))).isEnabled=m;this.put("appearance",new Menu(mxUtils.bind(this,function(p,v){(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(p,["toggleDarkMode"],v);this.addMenuItems(p,["toggleSimpleMode"],
+v)})));this.put("theme",new Menu(mxUtils.bind(this,function(p,v){var H="1"==urlParams.sketch?"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(p,["toggleDarkMode"],v);p.addSeparator(v);var K=p.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},v);"kennedy"!=H&&"atlas"!=H&&"dark"!=H&&"simple"!=H&&"sketch"!=H&&"min"!=H&&p.addCheckmark(K,Editor.checkmarkImage);K=p.addItem(mxResources.get("default"),
+null,function(){c.setCurrentTheme("kennedy")},v);"kennedy"!=H&&"dark"!=H&&"simple"!=H||p.addCheckmark(K,Editor.checkmarkImage);K=p.addItem(mxResources.get("sketch"),null,function(){c.setCurrentTheme("sketch")},v);"sketch"==H&&p.addCheckmark(K,Editor.checkmarkImage);K=p.addItem(mxResources.get("minimal"),null,function(){c.setCurrentTheme("min")},v);"min"==H&&p.addCheckmark(K,Editor.checkmarkImage);K=p.addItem(mxResources.get("atlas"),null,function(){c.setCurrentTheme("atlas")},v);"atlas"==H&&p.addCheckmark(K,
+Editor.checkmarkImage)})));B=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var p=this.editorUi.getCurrentFile();if(null!=p)if(p.constructor==LocalFile&&null!=p.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(H,K){p.invalidFileHandle=null;p.fileHandle=H;p.title=K.name;p.desc=K;c.save(K.name)}),null,c.createFileSystemOptions(p.getTitle()));else{var v=null!=p.getTitle()?p.getTitle():this.editorUi.defaultFilename;v=new FilenameDialog(this.editorUi,v,mxResources.get("rename"),
mxUtils.bind(this,function(H){null!=H&&0<H.length&&null!=p&&H!=p.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&p.rename(H,mxUtils.bind(this,function(K){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(K){this.editorUi.handleError(K,null!=K?mxResources.get("errorRenamingFile"):null)}))}),p.constructor==DriveFile||p.constructor==StorageFile?mxResources.get("diagramName"):null,function(H){if(null!=H&&0<H.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(u.container,340,96,!0,!0);u.init()}}));B.isEnabled=function(){return this.enabled&&m.apply(this,arguments)};B.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var p=c.getCurrentFile();if(null!=p){var u=c.getCopyFilename(p);p.constructor==DriveFile?(u=new CreateDialog(c,u,mxUtils.bind(this,function(H,K){"_blank"==K?c.editor.editAsNew(c.getFileData(),
+mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(v.container,340,96,!0,!0);v.init()}}));B.isEnabled=function(){return this.enabled&&m.apply(this,arguments)};B.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var p=c.getCurrentFile();if(null!=p){var v=c.getCopyFilename(p);p.constructor==DriveFile?(v=new CreateDialog(c,v,mxUtils.bind(this,function(H,K){"_blank"==K?c.editor.editAsNew(c.getFileData(),
H):("download"==K&&(K=App.MODE_GOOGLE),null!=H&&0<H.length&&(K==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&p.saveAs(H,mxUtils.bind(this,function(N){p.desc=N;p.save(!1,mxUtils.bind(this,function(){c.spinner.stop();p.setModified(!1);p.addAllSavedStatus()}),mxUtils.bind(this,function(I){c.handleError(I)}))}),mxUtils.bind(this,function(N){c.handleError(N)})):c.createFile(H,c.getFileData(!0),null,K)))}),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(u.container,420,380,!0,!0),u.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),u)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(p,u){c.appIconClicked(u)}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var p=c.getCurrentFile();if(p.getMode()==App.MODE_GOOGLE||p.getMode()==App.MODE_ONEDRIVE){var u=!1;if(p.getMode()==
-App.MODE_GOOGLE&&null!=p.desc.parents)for(var H=0;H<p.desc.parents.length;H++)if(p.desc.parents[H].isRoot){u=!0;break}c.pickFolder(p.getMode(),mxUtils.bind(this,function(K){c.spinner.spin(document.body,mxResources.get("moving"))&&p.move(K,mxUtils.bind(this,function(N){c.spinner.stop()}),mxUtils.bind(this,function(N){c.handleError(N)}))}),null,!0,u)}}));this.put("publish",new Menu(mxUtils.bind(this,function(p,u){this.addMenuItems(p,["publishLink"],u)})));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 p=c.getCurrentFile();null!=p&&p.share()}catch(u){c.handleError(u)}}));this.put("embed",new Menu(mxUtils.bind(this,function(p,u){var H=c.getCurrentFile();null==H||H.getMode()!=App.MODE_GOOGLE&&H.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(H.getTitle())||this.addMenuItems(p,["liveImage","-"],u);this.addMenuItems(p,["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||
-c.isOffline()||this.addMenuItems(p,["embedIframe"],u);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(p,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),u)})));c.addInsertItem=function(p,u,H,K){("plantUml"!=K||EditorUi.enablePlantUml&&!c.isOffline())&&p.addItem(H,null,mxUtils.bind(this,function(){if("fromText"==K||"formatSql"==K||"plantUml"==K||"mermaid"==K){var N=new ParseDialog(c,H,K);c.showDialog(N.container,620,420,!0,!1);c.dialog.container.style.overflow=
-"auto"}else N=new CreateGraphDialog(c,H,K),c.showDialog(N.container,620,420,!0,!1);N.init()}),u,null,m())};var x=function(p){l.getModel().beginUpdate();try{p=l.addCell(p),l.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{l.getModel().endUpdate()}l.scrollCellToVisible(p);l.setSelectionCell(p);l.container.focus();l.editAfterInsert&&l.startEditing(p);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(l.view.getState(p))},0);return p},E=function(p,u,H,K,N){p=new mxCell(p,
-new mxGeometry(0,0,u,H),K);p.vertex=!0;null==N&&(N=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([p],!0)));p.geometry.x=N.x;p.geometry.y=N.y;return x(p)};c.actions.put("insertText",new Action(mxResources.get("text"),function(p){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&l.startEditingAtCell(E("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)?
-null:l.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=m;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(p){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&E("",120,60,"whiteSpace=wrap;html=1;",null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)?null:l.getInsertPoint())},null,null,"D")).isEnabled=m;c.actions.put("insertNote",new Action(mxResources.get("note"),function(p){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&E("",140,
-160,"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;",null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)?null:l.getInsertPoint())},null,null,"S")).isEnabled=m;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(p){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&E("",80,80,"ellipse;whiteSpace=wrap;html=1;",
-null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)?null:l.getInsertPoint())},null,null,"F")).isEnabled=m;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(p){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&E("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)?null:l.getInsertPoint())})).isEnabled=m;c.actions.put("insertEdge",new Action(mxResources.get("line"),function(p){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var u=
-l.defaultEdgeLength;p=null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)?null:l.getInsertPoint();null==p&&(p=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([H],!0)));var H=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");H.geometry.setTerminalPoint(p,!0);H.geometry.setTerminalPoint(new mxPoint(p.x+H.geometry.width,p.y),!1);H.geometry.points=[];H.geometry.relative=!0;H.edge=!0;x(H)}},null,null,"C")).isEnabled=m;B=c.actions.put("toggleShapes",
-new Action(mxResources.get("shapes"),function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):(c.hsplitPosition=0==c.hsplitPosition?EditorUi.prototype.hsplitPosition:0,c.refresh())},null,null,Editor.ctrlKey+"+Shift+K"));B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&c.sidebarWindow.window.isVisible()}));c.addInsertMenuItems=mxUtils.bind(this,function(p,u,H){for(var K=0;K<H.length;K++)"-"==H[K]?p.addSeparator(u):
-c.addInsertItem(p,u,mxResources.get(H[K])+"...",H[K])});this.put("insert",new Menu(mxUtils.bind(this,function(p,u){"simple"==Editor.currentTheme||"1"==urlParams.sketch?(c.menus.addMenuItems(p,["toggleShapes"],u),c.menus.addSubmenu("table",p,u),p.addSeparator(u),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(p,["insertTemplate"],u),c.menus.addMenuItems(p,["insertImage","insertLink","-"],u),c.menus.addSubmenu("insertAdvanced",p,u,mxResources.get("advanced")),c.menus.addSubmenu("layout",
-p,u)):(this.addMenuItems(p,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),u),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(p,["insertTemplate"],u),p.addSeparator(u),this.addSubmenu("insertLayout",p,u,mxResources.get("layout")),this.addSubmenu("insertAdvanced",p,u,mxResources.get("advanced")),"min"==uiTheme&&this.addSubmenu("table",p,u))})));this.put("table",new Menu(mxUtils.bind(this,
-function(p,u){c.menus.addInsertTableCellItem(p,u)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(p,u){c.addInsertMenuItems(p,u,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(p,u){c.addInsertMenuItems(p,u,["fromText","plantUml","mermaid","-","formatSql"]);p.addItem(mxResources.get("csv")+"...",null,function(){l.popupMenuHandler.hideMenu();c.showImportCsvDialog()},
-u,null,m());"min"==uiTheme&&this.addMenuItems(p,["-","createShape","editDiagram"],u)})));this.put("openRecent",new Menu(function(p,u){var H=c.getRecent();if(null!=H){for(var K=0;K<H.length;K++)(function(N){var I=N.mode;I==App.MODE_GOOGLE?I="googleDrive":I==App.MODE_ONEDRIVE&&(I="oneDrive");p.addItem(N.title+" ("+mxResources.get(I)+")",null,function(){c.loadFile(N.id)},u)})(H[K]);p.addSeparator(u)}p.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},u)}));this.put("openFrom",new Menu(function(p,
-u){null!=c.drive?p.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},u):t&&"function"===typeof window.DriveClient&&p.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.oneDrive?p.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},u):C&&"function"===typeof window.OneDriveClient&&p.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,
-function(){},u,null,!1);null!=c.dropbox?p.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},u):y&&"function"===typeof window.DropboxClient&&p.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);p.addSeparator(u);null!=c.gitHub&&p.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},u);null!=c.gitLab&&p.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},
-u);null!=c.trello?p.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},u):A&&"function"===typeof window.TrelloClient&&p.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);p.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&p.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&p.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},
-u);c.isOffline()||(p.addSeparator(u),p.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(c,"",mxResources.get("open"),function(K){null!=K&&0<K.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(K):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(K)))},mxResources.get("url"));c.showDialog(H.container,300,80,!0,!0);H.init()},u))}));Editor.enableCustomLibraries&&
-(this.put("newLibrary",new Menu(function(p,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?p.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},u):t&&"function"===typeof window.DriveClient&&p.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=c.oneDrive?p.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,
-null,null,null,App.MODE_ONEDRIVE)},u):C&&"function"===typeof window.OneDriveClient&&p.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?p.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},u):y&&"function"===typeof window.DropboxClient&&p.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);p.addSeparator(u);null!=
-c.gitHub&&p.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},u);null!=c.gitLab&&p.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},u);null!=c.trello?p.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},u):A&&"function"===typeof window.TrelloClient&&p.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},u,null,!1);p.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&p.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&p.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},u)})),this.put("openLibraryFrom",new Menu(function(p,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?p.addItem(mxResources.get("googleDrive")+
-"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},u):t&&"function"===typeof window.DriveClient&&p.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=c.oneDrive?p.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},u):C&&"function"===typeof window.OneDriveClient&&p.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=c.dropbox?p.addItem(mxResources.get("dropbox")+
-"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},u):y&&"function"===typeof window.DropboxClient&&p.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);p.addSeparator(u);null!=c.gitHub&&p.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},u);null!=c.gitLab&&p.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},u);null!=c.trello?p.addItem(mxResources.get("trello")+"...",
-null,function(){c.pickLibrary(App.MODE_TRELLO)},u):A&&"function"===typeof window.TrelloClient&&p.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);p.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&p.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&p.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},u);c.isOffline()||(p.addSeparator(u),
-p.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(c,"",mxResources.get("open"),function(K){if(null!=K&&0<K.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var N=K;c.editor.isCorsEnabledForUrl(K)||(N=PROXY_URL+"?url="+encodeURIComponent(K));mxUtils.get(N,function(I){if(200<=I.getStatus()&&299>=I.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,I.getText(),K))}catch(L){c.handleError(L,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(H.container,300,80,!0,!0);H.init()},u));"1"==urlParams.confLib&&(p.addSeparator(u),p.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},u))})));this.put("edit",new Menu(mxUtils.bind(this,function(p,u){this.addMenuItems(p,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-B=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 p=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(p);this.commentsWindow.refreshCommentsTime();p&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));B.setToggleAction(!0);B.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)}));B=this.get("viewPanels");var z=B.funct;B.funct=
-function(p,u){z.apply(this,arguments);c.menus.addMenuItems(p,["tags"],u);c.commentsSupported()&&c.menus.addMenuItems(p,["comments"],u)};this.put("view",new Menu(mxUtils.bind(this,function(p,u){this.addMenuItems(p,(null!=this.editorUi.format?["format"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(p,["-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP){var H=this.addMenuItem(p,"scratchpad",u);(!c.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(p,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",p,u);this.addMenuItems(p,"- scrollbars tooltips ruler - grid guides".split(" "),u);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(p,"shadowVisible",u);this.addMenuItems(p,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),u);"1"!=urlParams.sketch&&this.addMenuItems(p,
-["-","fullscreen"],u)})));if(EditorUi.isElectronApp){var G="1"==urlParams.enableSpellCheck;B=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();G=!G;c.alert(mxResources.get("restartForChangeRequired"))});B.setToggleAction(!0);B.setSelectedCallback(function(){return G});var F="1"==urlParams.enableStoreBkp;B=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();F=!F});B.setToggleAction(!0);B.setSelectedCallback(function(){return F});c.actions.addAction("openDevTools",function(){c.openDevTools()});
-c.actions.addAction("drafts...",function(){var p=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);c.showDialog(p.container,320,80,!0,!0);p.init()})}var U=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(p,u){var H="simple"==
-Editor.currentTheme||"1"==urlParams.sketch;if(H||"min"==uiTheme){null==U||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",p,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",p,u);c.menus.addSubmenu("units",p,u);p.addSeparator(u);H||c.menus.addMenuItems(p,["scrollbars","-","tooltips","copyConnect","collapseExpand"],u);"1"==urlParams.embedInline||H||"1"==urlParams.embed||!isLocalStorage&&!mxClient.IS_CHROMEAPP||c.mode==App.MODE_ATLAS||
-c.menus.addMenuItems(p,["-","showStartScreen","search","scratchpad"],u);p.addSeparator(u);H&&c.menus.addMenuItems(p,["copyConnect","collapseExpand","tooltips","-"],u);EditorUi.isElectronApp&&c.menus.addMenuItems(p,["-","spellCheck","autoBkp","drafts","-"],u);var K=c.getCurrentFile();null!=K&&K.isRealtimeEnabled()&&K.isRealtimeSupported()&&this.addMenuItems(p,["-","showRemoteCursors","shareCursor","-"],u);Graph.translateDiagram&&c.menus.addMenuItems(p,["diagramLanguage"],u);c.mode!=App.MODE_ATLAS&&
-c.menus.addMenuItem(p,"configuration",u);H||!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(p,"plugins",u);p.addSeparator(u)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",p,u),"1"!=urlParams.embed&&this.addSubmenu("theme",p,u),p.addSeparator(u),"undefined"!==typeof MathJax&&(H=this.addMenuItem(p,"mathematicalTypesetting",u),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/math-typesetting")),
-EditorUi.isElectronApp&&this.addMenuItems(p,["spellCheck","autoBkp","drafts"],u),this.addMenuItems(p,["copyConnect","collapseExpand","-"],u),"1"!=urlParams.embed&&(K=c.getCurrentFile(),null!=K&&K.isRealtimeEnabled()&&K.isRealtimeSupported()&&this.addMenuItems(p,["showRemoteCursors","shareCursor"],u),this.addMenuItems(p,["autosave"],u)),p.addSeparator(u),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(p,"plugins",u),this.addMenuItems(p,["-","editDiagram"],u),Graph.translateDiagram&&this.addMenuItems(p,
-["diagramLanguage"]),p.addSeparator(u),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(p,["showStartScreen"],u),this.addMenuItems(p,["configuration"],u),p.addSeparator(u),"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function N(L){return{id:L.id,isExt:!0,url:L.downloadUrl,title:L.title,imgUrl:L.thumbnailLink,changedBy:L.lastModifyingUserName,lastModifiedOn:L.modifiedDate}}var I=new TemplatesDialog(c,function(L){console.log(arguments)},null,
-null,null,"user",function(L,Q,P){var V=new Date;V.setDate(V.getDate()-7);c.drive.listFiles(null,V,P?!0:!1,function(W){for(var q=[],D=0;D<W.items.length;D++)q.push(N(W.items[D]));L(q)},Q)},function(L,Q,P,V){c.drive.listFiles(L,null,V?!0:!1,function(W){for(var q=[],D=0;D<W.items.length;D++)q.push(N(W.items[D]));Q(q)},P)},function(L,Q,P){c.drive.getFile(L.id,function(V){Q(V.data)},P)},null,function(L){L({Test:[]},1)},!0,!1);c.showDialog(I.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,
-!0)}),this.addMenuItem(p,"templates",u))})));this.put("diagram",new Menu(mxUtils.bind(this,function(p,u){var H=c.getCurrentFile();c.menus.addSubmenu("extras",p,u,mxResources.get("preferences"));p.addSeparator(u);var K="simple"==Editor.currentTheme||"1"==urlParams.sketch;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(p,"new open - synchronize - save saveAs -".split(" "),u);else if("1"==urlParams.embed||c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&
-c.menus.addMenuItems(p,["-","save"],u);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(p,["saveAndExit"],u),null!=H&&H.isRevisionHistorySupported()&&c.menus.addMenuItems(p,["revisionHistory"],u);p.addSeparator(u)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(p,["save","synchronize","-"],u):"1"!=urlParams.noFileMenu&&(K?c.menus.addSubmenu("file",p,u):(c.menus.addMenuItems(p,["new"],u),c.menus.addSubmenu("openFrom",
-p,u),isLocalStorage&&this.addSubmenu("openRecent",p,u),p.addSeparator(u),null!=H&&(H.constructor==DriveFile&&c.menus.addMenuItems(p,["share"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||H.constructor==LocalFile||c.menus.addMenuItems(p,["synchronize"],u)),p.addSeparator(u),c.menus.addSubmenu("save",p,u)));c.menus.addSubmenu("exportAs",p,u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(p,["import"],u):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",p,u);c.menus.addMenuItems(p,
-["-","findReplace"],u);c.commentsSupported()&&c.menus.addMenuItems(p,["comments","-"],u);c.menus.addMenuItems(p,["format","layers","tags","-","pageSetup"],u);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(p,["print"],u);K||null==H||null==c.fileNode||"1"==urlParams.embedInline||(H=null!=H.getTitle()?H.getTitle():c.defaultFilename,/(\.html)$/i.test(H)||/(\.svg)$/i.test(H)||this.addMenuItems(p,["-","properties"]));p.addSeparator(u);c.menus.addSubmenu("help",p,
-u);"1"==urlParams.embed||c.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||c.mode==App.MODE_ATLAS)&&c.menus.addMenuItems(p,["-","exit"],u):"1"!=urlParams.noFileMenu&&c.menus.addMenuItems(p,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(p,u){var H=c.getCurrentFile();null!=H&&H.constructor==DriveFile?c.menus.addMenuItems(p,["save","makeCopy","-","rename","moveToFolder"],u):(c.menus.addMenuItems(p,["save","saveAs","-","rename"],u),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
-"1"!=urlParams.lockdown&&this.addMenuItems(p,["upload"],u):c.menus.addMenuItems(p,["makeCopy"],u));c.menus.addMenuItems(p,["-","autosave"],u);null!=H&&H.isRevisionHistorySupported()&&c.menus.addMenuItems(p,["-","revisionHistory"],u)})));this.put("file",new Menu(mxUtils.bind(this,function(p,u){var H="simple"==Editor.currentTheme||"min"==uiTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",p,u),this.addSubmenu("exportAs",p,u),this.addSubmenu("embed",p,u),"1"==urlParams.libraries&&
-(this.addMenuItems(p,["-"],u),this.addSubmenu("newLibrary",p,u),this.addSubmenu("openLibraryFrom",p,u)),c.isRevisionHistorySupported()&&this.addMenuItems(p,["-","revisionHistory"],u),this.addMenuItems(p,["-","pageSetup","print","-","rename"],u),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(p,["saveAndExit"],u):(this.addMenuItems(p,["save"],u),"1"==urlParams.saveAndExit&&this.addMenuItems(p,["saveAndExit"],u))),"1"!=urlParams.noExitBtn&&this.addMenuItems(p,
-["exit"],u);else if(H){H=c.getCurrentFile();c.menus.addMenuItems(p,["new"],u);c.menus.addSubmenu("openFrom",p,u);isLocalStorage&&this.addSubmenu("openRecent",p,u);p.addSeparator(u);c.menus.addMenuItems(p,["-","save"],u);null!=H&&H.constructor==DriveFile||c.menus.addMenuItems(p,["saveAs"],u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==H||H.constructor==LocalFile&&null==H.fileHandle||c.menus.addMenuItems(p,["synchronize"],u);null!=H&&H.constructor==DriveFile?c.menus.addMenuItems(p,"- rename makeCopy - moveToFolder openFolder".split(" "),
-u):(c.menus.addMenuItems(p,["-","rename"],u),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(p,["upload"],u):c.menus.addMenuItems(p,["makeCopy"],u));null!=H&&H.isRevisionHistorySupported()&&c.menus.addMenuItems(p,["-","revisionHistory"],u);if(null!=H){if(null!=c.fileNode&&"1"!=urlParams.embedInline){var K=null!=H.getTitle()?H.getTitle():c.defaultFilename;(H.constructor==DriveFile&&null!=H.sync&&H.sync.isConnected()||!/(\.html)$/i.test(K)&&!/(\.svg)$/i.test(K))&&
-this.addMenuItems(p,["properties"],u)}H.constructor==DriveFile&&c.menus.addMenuItems(p,["share"],u)}c.menus.addMenuItems(p,["-","autosave"],u)}else H=this.editorUi.getCurrentFile(),null!=H&&H.constructor==DriveFile?(H.isRestricted()&&this.addMenuItems(p,["exportOptionsDisabled"],u),this.addMenuItems(p,["save","-","share"],u),K=this.addMenuItem(p,"synchronize",u),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/synchronize"),p.addSeparator(u)):
-this.addMenuItems(p,["new"],u),this.addSubmenu("openFrom",p,u),isLocalStorage&&this.addSubmenu("openRecent",p,u),null!=H&&H.constructor==DriveFile?this.addMenuItems(p,"new - rename makeCopy openFolder moveToFolder".split(" "),u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==H||H.constructor==LocalFile&&null==H.fileHandle||(p.addSeparator(u),K=this.addMenuItem(p,"synchronize",u),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/synchronize")),
-this.addMenuItems(p,["-","save","saveAs","-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==H||this.addMenuItems(p,["share","-"],u),this.addMenuItems(p,["rename"],u),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(p,["upload"],u):(this.addMenuItems(p,["makeCopy"],u),null!=H&&H.constructor==OneDriveFile&&this.addMenuItems(p,["moveToFolder"],u))),p.addSeparator(u),this.addSubmenu("importFrom",
-p,u),this.addSubmenu("exportAs",p,u),p.addSeparator(u),this.addSubmenu("embed",p,u),this.addSubmenu("publish",p,u),p.addSeparator(u),this.addSubmenu("newLibrary",p,u),this.addSubmenu("openLibraryFrom",p,u),c.isRevisionHistorySupported()&&this.addMenuItems(p,["-","revisionHistory"],u),null!=H&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(K=null!=H.getTitle()?H.getTitle():c.defaultFilename,(H.constructor==DriveFile&&null!=H.sync&&H.sync.isConnected()||!/(\.html)$/i.test(K)&&!/(\.svg)$/i.test(K))&&
-this.addMenuItems(p,["-","properties"])),this.addMenuItems(p,["-","pageSetup"],u),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(p,["print"],u),this.addMenuItems(p,["-","close"])})));e.prototype.execute=function(){var p=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 u=p.extFonts,H=0;null!=u&&H<u.length;H++){var K=
-document.getElementById("extFont_"+u[H].name);null!=K&&K.parentNode.removeChild(K)}p.extFonts=[];for(H=0;null!=this.previousExtFonts&&H<this.previousExtFonts.length;H++)this.ui.editor.graph.addExtFont(this.previousExtFonts[H].name,this.previousExtFonts[H].url);this.previousExtFonts=u};this.put("fontFamily",new Menu(mxUtils.bind(this,function(p,u){for(var H=mxUtils.bind(this,function(q,D,M,T,O){var R=c.editor.graph;T=this.styleChange(p,T||q,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,
-"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[q,null!=D?encodeURIComponent(D):null,null]:[q],null,u,function(){"1"!=urlParams["ext-fonts"]?R.setFont(q,D):(document.execCommand("fontname",!1,q),R.addExtFont(q,D));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[q,null!=D?encodeURIComponent(D):null,null]:[q],"cells",
-[R.cellEditor.getEditingCell()]))},function(){R.updateLabelElements(R.getSelectionCells(),function(S){S.removeAttribute("face");S.style.fontFamily=null;"PRE"==S.nodeName&&R.replaceElement(S,"div")});"1"==urlParams["ext-fonts"]&&R.addExtFont(q,D)});M&&(M=document.createElement("span"),M.className="geSprite geSprite-delete",M.style.cursor="pointer",M.style.display="inline-block",T.firstChild.nextSibling.nextSibling.appendChild(M),mxEvent.addListener(M,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,
-function(S){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[q.toLowerCase()];for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==q&&this.customFonts[X].url==D){this.customFonts.splice(X,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var Y=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=Y&&0<Y.length)for(X=0;X<Y.length;X++)if(Y[X].name==q){Y.splice(X,1);break}var aa=mxUtils.clone(this.customFonts);for(X=0;X<aa.length;X++)if(aa[X].name==
-q){aa.splice(X,1);break}X=new e(this.editorUi,Y,aa);this.editorUi.editor.graph.model.execute(X)}this.editorUi.hideCurrentMenu();mxEvent.consume(S)})));Graph.addFont(q,D);T.firstChild.nextSibling.style.fontFamily=q;null!=O&&T.setAttribute("title",O)}),K={},N=0;N<this.defaultFonts.length;N++){var I=this.defaultFonts[N];"string"===typeof I?H(I):null!=I.fontFamily&&null!=I.fontUrl&&(K[encodeURIComponent(I.fontFamily)+"@"+encodeURIComponent(I.fontUrl)]=!0,H(I.fontFamily,I.fontUrl))}p.addSeparator(u);if("1"!=
-urlParams["ext-fonts"]){I=function(q){var D=encodeURIComponent(q.name)+(null==q.url?"":"@"+encodeURIComponent(q.url));if(!K[D]){for(var M=q.name,T=0;null!=Q[M.toLowerCase()];)M=q.name+" ("+ ++T+")";null==L[D]&&(P.push({name:q.name,url:q.url,label:M,title:q.url}),Q[M.toLowerCase()]=q,L[D]=q)}};var L={},Q={},P=[];for(N=0;N<this.customFonts.length;N++)I(this.customFonts[N]);for(var V in Graph.recentCustomFonts)I(Graph.recentCustomFonts[V]);P.sort(function(q,D){return q.label<D.label?-1:q.label>D.label?
-1:0});if(0<P.length){for(N=0;N<P.length;N++)H(P[N].name,P[N].url,!0,P[N].label,P[N].url);p.addSeparator(u)}p.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),u);p.addSeparator(u)}else{V=this.editorUi.editor.graph.extFonts;if(null!=V&&0<V.length){I={};var W=!1;for(N=0;N<this.customFonts.length;N++)I[this.customFonts[N].name]=!0;for(N=0;N<V.length;N++)I[V[N].name]||(this.customFonts.push(V[N]),
-W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(N=0;N<this.customFonts.length;N++)V=this.customFonts[N].name,I=this.customFonts[N].url,H(V,I,!0),this.editorUi.editor.graph.addExtFont(V,I,!0);p.addSeparator(u);p.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var q=new e(this.editorUi,[],[]);c.editor.graph.model.execute(q)}),u);p.addSeparator(u)}}p.addItem(mxResources.get("custom")+"...",null,
-mxUtils.bind(this,function(){var q=this.editorUi.editor.graph,D=q.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],M="s",T=null;if("1"!=urlParams["ext-fonts"]&&q.isEditing()){var O=q.getSelectedEditingElement();null!=O&&(O=mxUtils.getCurrentStyle(O),null!=O&&(D=Graph.stripQuotes(O.fontFamily),T=Graph.getFontUrl(D,null),null!=T&&(Graph.isGoogleFontUrl(T)?(T=null,M="g"):M="w")))}else O=q.getView().getState(q.getSelectionCell()),null!=O&&(D=O.style[mxConstants.STYLE_FONTFAMILY]||
-D,"1"!=urlParams["ext-fonts"]?(O=O.style.fontSource,null!=O&&(O=decodeURIComponent(O),Graph.isGoogleFontUrl(O)?M="g":(M="w",T=O))):(M=O.style.FType||M,"w"==M&&(T=this.editorUi.editor.graph.extFonts,O=null,null!=T&&(O=T.find(function(S){return S.name==D})),T=null!=O?O.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 R=null;document.activeElement==q.cellEditor.textarea&&(R=
-q.cellEditor.saveSelection());M=new FontDialog(this.editorUi,D,T,M,mxUtils.bind(this,function(S,X,Y){null!=R&&(q.cellEditor.restoreSelection(R),R=null);if(null!=S&&0<S.length)if("1"!=urlParams["ext-fonts"]&&q.isEditing())q.setFont(S,X);else{q.getModel().beginUpdate();try{q.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(q.setCellStyles(mxConstants.STYLE_FONTFAMILY,S),q.setCellStyles("fontSource",null!=X?encodeURIComponent(X):null),q.setCellStyles("FType",null)):(q.setCellStyles(mxConstants.STYLE_FONTFAMILY,
-S),"s"!=Y&&(q.setCellStyles("FType",Y),0==X.indexOf("http://")&&(X=PROXY_URL+"?url="+encodeURIComponent(X)),this.editorUi.editor.graph.addExtFont(S,X)));Y=!0;for(var aa=0;aa<this.customFonts.length;aa++)if(this.customFonts[aa].name==S){Y=!1;break}Y&&(this.customFonts.push({name:S,url:X}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{q.getModel().endUpdate()}}}));this.editorUi.showDialog(M.container,380,Editor.enableWebFonts?250:180,!0,!0);
-M.init()}),u,null,!0)})))}})();function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):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,d,e){this.ui=b;this.page=d;this.previous=this.name=e}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(b,d,e){this.ui=b;this.oldIndex=d;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(b,d,e){this.ui=b;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=e&&(d.viewState=e,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var d=this.ui.editor,e=d.graph,c=Graph.compressNode(d.getGraphXml(!0));mxUtils.setTextContent(b.node,c);b.viewState=e.getViewState();b.root=e.model.root;null!=b.model&&b.model.rootChanged(b.root);e.view.clear(b.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;e.model.prefix=Editor.guid()+"-";e.model.rootChanged(b.root);
-e.setViewState(b.viewState);e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();e.view.validate();e.blockMathRender=!0;e.sizeDidChange();e.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,d,e,c,l){SelectPage.call(this,b,e);this.relatedPage=d;this.index=c;this.previousIndex=null;this.noSelect=l}mxUtils.extend(ChangePage,SelectPage);
+mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(v.container,420,380,!0,!0),v.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),v)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(p,v){c.appIconClicked(v)}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var p=c.getCurrentFile();if(p.getMode()==App.MODE_GOOGLE||p.getMode()==App.MODE_ONEDRIVE){var v=!1;if(p.getMode()==
+App.MODE_GOOGLE&&null!=p.desc.parents)for(var H=0;H<p.desc.parents.length;H++)if(p.desc.parents[H].isRoot){v=!0;break}c.pickFolder(p.getMode(),mxUtils.bind(this,function(K){c.spinner.spin(document.body,mxResources.get("moving"))&&p.move(K,mxUtils.bind(this,function(N){c.spinner.stop()}),mxUtils.bind(this,function(N){c.handleError(N)}))}),null,!0,v)}}));this.put("publish",new Menu(mxUtils.bind(this,function(p,v){this.addMenuItems(p,["publishLink"],v)})));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 p=c.getCurrentFile();null!=p&&p.share()}catch(v){c.handleError(v)}}));this.put("embed",new Menu(mxUtils.bind(this,function(p,v){var H=c.getCurrentFile();null==H||H.getMode()!=App.MODE_GOOGLE&&H.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(H.getTitle())||this.addMenuItems(p,["liveImage","-"],v);this.addMenuItems(p,["embedImage","embedSvg","-","embedHtml"],v);navigator.standalone||
+c.isOffline()||this.addMenuItems(p,["embedIframe"],v);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(p,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),v)})));c.addInsertItem=function(p,v,H,K){("plantUml"!=K||EditorUi.enablePlantUml&&!c.isOffline())&&p.addItem(H,null,mxUtils.bind(this,function(){if("fromText"==K||"formatSql"==K||"plantUml"==K||"mermaid"==K){var N=new ParseDialog(c,H,K);c.showDialog(N.container,620,420,!0,!1);c.dialog.container.style.overflow=
+"auto"}else N=new CreateGraphDialog(c,H,K),c.showDialog(N.container,620,420,!0,!1);N.init()}),v,null,m())};var x=function(p){l.getModel().beginUpdate();try{p=l.addCell(p),l.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{l.getModel().endUpdate()}l.scrollCellToVisible(p);l.setSelectionCell(p);l.container.focus();l.editAfterInsert&&l.startEditing(p);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(l.view.getState(p))},0);return p},E=function(p,v,H,K,N){p=new mxCell(p,
+new mxGeometry(0,0,v,H),K);p.vertex=!0;null==N&&(N=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([p],!0)));p.geometry.x=N.x;p.geometry.y=N.y;return x(p)};c.actions.put("insertText",new Action(mxResources.get("text"),function(p){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&l.startEditingAtCell(E("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)||
+!l.isMouseInsertPoint()?null:l.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=m;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(p){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&E("",120,60,"whiteSpace=wrap;html=1;",null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"D")).isEnabled=m;c.actions.put("insertNote",new Action(mxResources.get("note"),function(p){l.isEnabled()&&
+!l.isCellLocked(l.getDefaultParent())&&E("",140,160,"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;",null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"S")).isEnabled=m;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(p){l.isEnabled()&&
+!l.isCellLocked(l.getDefaultParent())&&E("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"F")).isEnabled=m;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(p){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&E("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)||!l.isMouseInsertPoint()?null:l.getInsertPoint())})).isEnabled=
+m;c.actions.put("insertEdge",new Action(mxResources.get("line"),function(p){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var v=l.defaultEdgeLength;p=null==p||mxEvent.isControlDown(p)||mxEvent.isMetaDown(p)||!l.isMouseInsertPoint()?null:l.getInsertPoint();null==p&&(p=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([H],!0)));var H=new mxCell("",new mxGeometry(0,0,v,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");H.geometry.setTerminalPoint(p,!0);H.geometry.setTerminalPoint(new mxPoint(p.x+
+H.geometry.width,p.y),!1);H.geometry.points=[];H.geometry.relative=!0;H.edge=!0;x(H)}},null,null,"C")).isEnabled=m;B=c.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):(c.hsplitPosition=0==c.hsplitPosition?EditorUi.prototype.hsplitPosition:0,c.refresh())},null,null,Editor.ctrlKey+"+Shift+K"));B.setToggleAction(!0);B.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&
+c.sidebarWindow.window.isVisible()}));c.addInsertMenuItems=mxUtils.bind(this,function(p,v,H){for(var K=0;K<H.length;K++)"-"==H[K]?p.addSeparator(v):c.addInsertItem(p,v,mxResources.get(H[K])+"...",H[K])});this.put("insert",new Menu(mxUtils.bind(this,function(p,v){"simple"==Editor.currentTheme||"1"==urlParams.sketch?(c.menus.addMenuItems(p,["toggleShapes"],v),c.menus.addSubmenu("table",p,v),p.addSeparator(v),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(p,["insertTemplate"],v),c.menus.addMenuItems(p,
+["insertImage","insertLink","-"],v),c.menus.addSubmenu("insertAdvanced",p,v,mxResources.get("advanced")),c.menus.addSubmenu("layout",p,v)):(this.addMenuItems(p,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),v),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(p,["insertTemplate"],v),p.addSeparator(v),this.addSubmenu("insertLayout",p,v,mxResources.get("layout")),this.addSubmenu("insertAdvanced",
+p,v,mxResources.get("advanced")),"min"==uiTheme&&this.addSubmenu("table",p,v))})));this.put("table",new Menu(mxUtils.bind(this,function(p,v){c.menus.addInsertTableCellItem(p,v)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(p,v){c.addInsertMenuItems(p,v,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(p,v){c.addInsertMenuItems(p,v,["fromText","plantUml","mermaid","-",
+"formatSql"]);p.addItem(mxResources.get("csv")+"...",null,function(){l.popupMenuHandler.hideMenu();c.showImportCsvDialog()},v,null,m());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(p,["-","createShape","editDiagram"],v)})));this.put("openRecent",new Menu(function(p,v){var H=c.getRecent();if(null!=H){for(var K=0;K<H.length;K++)(function(N){var I=N.mode;I==App.MODE_GOOGLE?I="googleDrive":I==App.MODE_ONEDRIVE&&(I="oneDrive");p.addItem(N.title+" ("+mxResources.get(I)+")",
+null,function(){c.loadFile(N.id)},v)})(H[K]);p.addSeparator(v)}p.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},v)}));this.put("openFrom",new Menu(function(p,v){null!=c.drive?p.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},v):t&&"function"===typeof window.DriveClient&&p.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=c.oneDrive?p.addItem(mxResources.get("oneDrive")+"...",
+null,function(){c.pickFile(App.MODE_ONEDRIVE)},v):C&&"function"===typeof window.OneDriveClient&&p.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=c.dropbox?p.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},v):y&&"function"===typeof window.DropboxClient&&p.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);p.addSeparator(v);null!=c.gitHub&&p.addItem(mxResources.get("github")+
+"...",null,function(){c.pickFile(App.MODE_GITHUB)},v);null!=c.gitLab&&p.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},v);null!=c.trello?p.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},v):A&&"function"===typeof window.TrelloClient&&p.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);p.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&p.addItem(mxResources.get("browser")+
+"...",null,function(){c.pickFile(App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&p.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},v);c.isOffline()||(p.addSeparator(v),p.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(c,"",mxResources.get("open"),function(K){null!=K&&0<K.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(K):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+
+"/")+window.location.search+"#U"+encodeURIComponent(K)))},mxResources.get("url"));c.showDialog(H.container,300,80,!0,!0);H.init()},v))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(p,v){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?p.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},v):t&&"function"===typeof window.DriveClient&&p.addItem(mxResources.get("googleDrive")+" ("+
+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=c.oneDrive?p.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},v):C&&"function"===typeof window.OneDriveClient&&p.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=c.dropbox?p.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},v):y&&"function"===
+typeof window.DropboxClient&&p.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);p.addSeparator(v);null!=c.gitHub&&p.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},v);null!=c.gitLab&&p.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},v);null!=c.trello?p.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,
+null,null,null,App.MODE_TRELLO)},v):A&&"function"===typeof window.TrelloClient&&p.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);p.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&p.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},v);"1"!=urlParams.noDevice&&p.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},
+v)})),this.put("openLibraryFrom",new Menu(function(p,v){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?p.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},v):t&&"function"===typeof window.DriveClient&&p.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1));null!=c.oneDrive?p.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},v):C&&
+"function"===typeof window.OneDriveClient&&p.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);null!=c.dropbox?p.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},v):y&&"function"===typeof window.DropboxClient&&p.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);p.addSeparator(v);null!=c.gitHub&&p.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},
+v);null!=c.gitLab&&p.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},v);null!=c.trello?p.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},v):A&&"function"===typeof window.TrelloClient&&p.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},v,null,!1);p.addSeparator(v);isLocalStorage&&"0"!=urlParams.browser&&p.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},
+v);"1"!=urlParams.noDevice&&p.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},v);c.isOffline()||(p.addSeparator(v),p.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(c,"",mxResources.get("open"),function(K){if(null!=K&&0<K.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var N=K;c.editor.isCorsEnabledForUrl(K)||(N=PROXY_URL+"?url="+encodeURIComponent(K));mxUtils.get(N,function(I){if(200<=I.getStatus()&&299>=I.getStatus()){c.spinner.stop();
+try{c.loadLibrary(new UrlLibrary(this,I.getText(),K))}catch(L){c.handleError(L,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(H.container,300,80,!0,!0);H.init()},v));"1"==urlParams.confLib&&(p.addSeparator(v),p.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},
+v))})));this.put("edit",new Menu(mxUtils.bind(this,function(p,v){this.addMenuItems(p,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));B=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 p=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(p);this.commentsWindow.refreshCommentsTime();p&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));B.setToggleAction(!0);B.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)}));B=this.get("viewPanels");var z=B.funct;B.funct=function(p,v){z.apply(this,arguments);c.menus.addMenuItems(p,["tags"],v);c.commentsSupported()&&c.menus.addMenuItems(p,["comments"],v)};this.put("view",new Menu(mxUtils.bind(this,function(p,v){this.addMenuItems(p,(null!=
+this.editorUi.format?["format"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(p,["-","search"],v);if(isLocalStorage||mxClient.IS_CHROMEAPP){var H=this.addMenuItem(p,"scratchpad",v);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(p,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",p,v);this.addMenuItems(p,"- scrollbars tooltips ruler - grid guides".split(" "),
+v);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(p,"shadowVisible",v);this.addMenuItems(p,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),v);"1"!=urlParams.sketch&&this.addMenuItems(p,["-","fullscreen"],v)})));if(EditorUi.isElectronApp){var G="1"==urlParams.enableSpellCheck;B=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();G=!G;c.alert(mxResources.get("restartForChangeRequired"))});B.setToggleAction(!0);B.setSelectedCallback(function(){return G});
+var F="1"==urlParams.enableStoreBkp;B=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();F=!F});B.setToggleAction(!0);B.setSelectedCallback(function(){return F});c.actions.addAction("openDevTools",function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var p=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(v){v=parseInt(v);0<=v&&(EditorUi.draftSaveDelay=1E3*v,EditorUi.enableDrafts=0<v,mxSettings.setDraftSaveDelay(v),
+mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);c.showDialog(p.container,320,80,!0,!0);p.init()})}var U=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(p,v){var H="simple"==Editor.currentTheme||"1"==urlParams.sketch;if(H||"min"==uiTheme){null==U||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",p,v);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",p,v);c.menus.addSubmenu("units",
+p,v);p.addSeparator(v);H||c.menus.addMenuItems(p,["scrollbars","-","tooltips","copyConnect","collapseExpand"],v);"1"==urlParams.embedInline||H||"1"==urlParams.embed||!isLocalStorage&&!mxClient.IS_CHROMEAPP||c.mode==App.MODE_ATLAS||c.menus.addMenuItems(p,["-","showStartScreen","search","scratchpad"],v);p.addSeparator(v);H&&c.menus.addMenuItems(p,["copyConnect","collapseExpand","tooltips","-"],v);EditorUi.isElectronApp&&c.menus.addMenuItems(p,["-","spellCheck","autoBkp","drafts","-"],v);var K=c.getCurrentFile();
+null!=K&&K.isRealtimeEnabled()&&K.isRealtimeSupported()&&this.addMenuItems(p,["-","showRemoteCursors","shareCursor","-"],v);Graph.translateDiagram&&c.menus.addMenuItems(p,["diagramLanguage"],v);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(p,"configuration",v);H||!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(p,"plugins",v);p.addSeparator(v)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",p,v),"1"!=urlParams.embed&&this.addSubmenu("theme",p,
+v),p.addSeparator(v),"undefined"!==typeof MathJax&&(H=this.addMenuItem(p,"mathematicalTypesetting",v),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(H,"https://www.diagrams.net/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(p,["spellCheck","autoBkp","drafts"],v),this.addMenuItems(p,["copyConnect","collapseExpand","-"],v),"1"!=urlParams.embed&&(K=c.getCurrentFile(),null!=K&&K.isRealtimeEnabled()&&K.isRealtimeSupported()&&this.addMenuItems(p,
+["showRemoteCursors","shareCursor"],v),this.addMenuItems(p,["autosave"],v)),p.addSeparator(v),!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(p,"plugins",v),this.addMenuItems(p,["-","editDiagram"],v),Graph.translateDiagram&&this.addMenuItems(p,["diagramLanguage"]),p.addSeparator(v),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(p,["showStartScreen"],v),this.addMenuItems(p,["configuration"],v),p.addSeparator(v),"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",
+function(){function N(L){return{id:L.id,isExt:!0,url:L.downloadUrl,title:L.title,imgUrl:L.thumbnailLink,changedBy:L.lastModifyingUserName,lastModifiedOn:L.modifiedDate}}var I=new TemplatesDialog(c,function(L){console.log(arguments)},null,null,null,"user",function(L,Q,P){var V=new Date;V.setDate(V.getDate()-7);c.drive.listFiles(null,V,P?!0:!1,function(W){for(var n=[],D=0;D<W.items.length;D++)n.push(N(W.items[D]));L(n)},Q)},function(L,Q,P,V){c.drive.listFiles(L,null,V?!0:!1,function(W){for(var n=[],
+D=0;D<W.items.length;D++)n.push(N(W.items[D]));Q(n)},P)},function(L,Q,P){c.drive.getFile(L.id,function(V){Q(V.data)},P)},null,function(L){L({Test:[]},1)},!0,!1);c.showDialog(I.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(p,"templates",v))})));this.put("diagram",new Menu(mxUtils.bind(this,function(p,v){var H=c.getCurrentFile();c.menus.addSubmenu("extras",p,v,mxResources.get("preferences"));p.addSeparator(v);var K="simple"==Editor.currentTheme||"1"==urlParams.sketch;
+if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)c.menus.addMenuItems(p,"new open - synchronize - save saveAs -".split(" "),v);else if("1"==urlParams.embed||c.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(p,["-","save"],v);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||c.mode==App.MODE_ATLAS)c.menus.addMenuItems(p,["saveAndExit"],v),null!=H&&H.isRevisionHistorySupported()&&c.menus.addMenuItems(p,["revisionHistory"],
+v);p.addSeparator(v)}else c.mode==App.MODE_ATLAS?c.menus.addMenuItems(p,["save","synchronize","-"],v):"1"!=urlParams.noFileMenu&&(K?c.menus.addSubmenu("file",p,v):(c.menus.addMenuItems(p,["new"],v),c.menus.addSubmenu("openFrom",p,v),isLocalStorage&&this.addSubmenu("openRecent",p,v),p.addSeparator(v),null!=H&&(H.constructor==DriveFile&&c.menus.addMenuItems(p,["share"],v),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||H.constructor==LocalFile||c.menus.addMenuItems(p,["synchronize"],v)),p.addSeparator(v),
+c.menus.addSubmenu("save",p,v)));c.menus.addSubmenu("exportAs",p,v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(p,["import"],v):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",p,v);c.menus.addMenuItems(p,["-","findReplace"],v);c.commentsSupported()&&c.menus.addMenuItems(p,["comments","-"],v);c.menus.addMenuItems(p,["format","layers","tags","-","pageSetup"],v);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(p,["print"],v);K||
+null==H||null==c.fileNode||"1"==urlParams.embedInline||(H=null!=H.getTitle()?H.getTitle():c.defaultFilename,/(\.html)$/i.test(H)||/(\.svg)$/i.test(H)||this.addMenuItems(p,["-","properties"]));p.addSeparator(v);c.menus.addSubmenu("help",p,v);"1"==urlParams.embed||c.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||c.mode==App.MODE_ATLAS)&&c.menus.addMenuItems(p,["-","exit"],v):"1"!=urlParams.noFileMenu&&c.menus.addMenuItems(p,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(p,v){var H=
+c.getCurrentFile();null!=H&&H.constructor==DriveFile?c.menus.addMenuItems(p,["save","makeCopy","-","rename","moveToFolder"],v):(c.menus.addMenuItems(p,["save","saveAs","-","rename"],v),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(p,["upload"],v):c.menus.addMenuItems(p,["makeCopy"],v));c.menus.addMenuItems(p,["-","autosave"],v);null!=H&&H.isRevisionHistorySupported()&&c.menus.addMenuItems(p,["-","revisionHistory"],v)})));this.put("file",new Menu(mxUtils.bind(this,
+function(p,v){var H="simple"==Editor.currentTheme||"min"==uiTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",p,v),this.addSubmenu("exportAs",p,v),this.addSubmenu("embed",p,v),"1"==urlParams.libraries&&(this.addMenuItems(p,["-"],v),this.addSubmenu("newLibrary",p,v),this.addSubmenu("openLibraryFrom",p,v)),c.isRevisionHistorySupported()&&this.addMenuItems(p,["-","revisionHistory"],v),this.addMenuItems(p,["-","pageSetup","print","-","rename"],v),"1"!=urlParams.embedInline&&
+("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(p,["saveAndExit"],v):(this.addMenuItems(p,["save"],v),"1"==urlParams.saveAndExit&&this.addMenuItems(p,["saveAndExit"],v))),"1"!=urlParams.noExitBtn&&this.addMenuItems(p,["exit"],v);else if(H){H=c.getCurrentFile();c.menus.addMenuItems(p,["new"],v);c.menus.addSubmenu("openFrom",p,v);isLocalStorage&&this.addSubmenu("openRecent",p,v);p.addSeparator(v);c.menus.addMenuItems(p,["-","save"],v);null!=H&&H.constructor==DriveFile||c.menus.addMenuItems(p,
+["saveAs"],v);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==H||H.constructor==LocalFile&&null==H.fileHandle||c.menus.addMenuItems(p,["synchronize"],v);null!=H&&H.constructor==DriveFile?c.menus.addMenuItems(p,"- rename makeCopy - moveToFolder openFolder".split(" "),v):(c.menus.addMenuItems(p,["-","rename"],v),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(p,["upload"],v):c.menus.addMenuItems(p,["makeCopy"],v));null!=H&&H.isRevisionHistorySupported()&&
+c.menus.addMenuItems(p,["-","revisionHistory"],v);if(null!=H){if(null!=c.fileNode&&"1"!=urlParams.embedInline){var K=null!=H.getTitle()?H.getTitle():c.defaultFilename;(H.constructor==DriveFile&&null!=H.sync&&H.sync.isConnected()||!/(\.html)$/i.test(K)&&!/(\.svg)$/i.test(K))&&this.addMenuItems(p,["properties"],v)}H.constructor==DriveFile&&c.menus.addMenuItems(p,["share"],v)}c.menus.addMenuItems(p,["-","autosave"],v)}else H=this.editorUi.getCurrentFile(),null!=H&&H.constructor==DriveFile?(H.isRestricted()&&
+this.addMenuItems(p,["exportOptionsDisabled"],v),this.addMenuItems(p,["save","-","share"],v),K=this.addMenuItem(p,"synchronize",v),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/synchronize"),p.addSeparator(v)):this.addMenuItems(p,["new"],v),this.addSubmenu("openFrom",p,v),isLocalStorage&&this.addSubmenu("openRecent",p,v),null!=H&&H.constructor==DriveFile?this.addMenuItems(p,"new - rename makeCopy openFolder moveToFolder".split(" "),
+v):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==H||H.constructor==LocalFile&&null==H.fileHandle||(p.addSeparator(v),K=this.addMenuItem(p,"synchronize",v),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(K,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(p,["-","save","saveAs","-"],v),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==H||this.addMenuItems(p,["share","-"],v),this.addMenuItems(p,
+["rename"],v),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(p,["upload"],v):(this.addMenuItems(p,["makeCopy"],v),null!=H&&H.constructor==OneDriveFile&&this.addMenuItems(p,["moveToFolder"],v))),p.addSeparator(v),this.addSubmenu("importFrom",p,v),this.addSubmenu("exportAs",p,v),p.addSeparator(v),this.addSubmenu("embed",p,v),this.addSubmenu("publish",p,v),p.addSeparator(v),this.addSubmenu("newLibrary",p,v),this.addSubmenu("openLibraryFrom",p,v),
+c.isRevisionHistorySupported()&&this.addMenuItems(p,["-","revisionHistory"],v),null!=H&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(K=null!=H.getTitle()?H.getTitle():c.defaultFilename,(H.constructor==DriveFile&&null!=H.sync&&H.sync.isConnected()||!/(\.html)$/i.test(K)&&!/(\.svg)$/i.test(K))&&this.addMenuItems(p,["-","properties"])),this.addMenuItems(p,["-","pageSetup"],v),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(p,["print"],v),this.addMenuItems(p,["-","close"])})));f.prototype.execute=
+function(){var p=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 v=p.extFonts,H=0;null!=v&&H<v.length;H++){var K=document.getElementById("extFont_"+v[H].name);null!=K&&K.parentNode.removeChild(K)}p.extFonts=[];for(H=0;null!=this.previousExtFonts&&H<this.previousExtFonts.length;H++)this.ui.editor.graph.addExtFont(this.previousExtFonts[H].name,
+this.previousExtFonts[H].url);this.previousExtFonts=v};this.put("fontFamily",new Menu(mxUtils.bind(this,function(p,v){for(var H=mxUtils.bind(this,function(n,D,M,T,O){var R=c.editor.graph;T=this.styleChange(p,T||n,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[n,null!=D?encodeURIComponent(D):null,null]:[n],null,v,function(){"1"!=urlParams["ext-fonts"]?R.setFont(n,D):(document.execCommand("fontname",!1,n),R.addExtFont(n,
+D));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[n,null!=D?encodeURIComponent(D):null,null]:[n],"cells",[R.cellEditor.getEditingCell()]))},function(){R.updateLabelElements(R.getSelectionCells(),function(S){S.removeAttribute("face");S.style.fontFamily=null;"PRE"==S.nodeName&&R.replaceElement(S,"div")});"1"==urlParams["ext-fonts"]&&R.addExtFont(n,
+D)});M&&(M=document.createElement("span"),M.className="geSprite geSprite-delete",M.style.cursor="pointer",M.style.display="inline-block",T.firstChild.nextSibling.nextSibling.appendChild(M),mxEvent.addListener(M,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(S){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[n.toLowerCase()];for(var X=0;X<this.customFonts.length;X++)if(this.customFonts[X].name==n&&this.customFonts[X].url==D){this.customFonts.splice(X,1);c.fireEvent(new mxEventObject("customFontsChanged"));
+break}}else{var Y=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=Y&&0<Y.length)for(X=0;X<Y.length;X++)if(Y[X].name==n){Y.splice(X,1);break}var aa=mxUtils.clone(this.customFonts);for(X=0;X<aa.length;X++)if(aa[X].name==n){aa.splice(X,1);break}X=new f(this.editorUi,Y,aa);this.editorUi.editor.graph.model.execute(X)}this.editorUi.hideCurrentMenu();mxEvent.consume(S)})));Graph.addFont(n,D);T.firstChild.nextSibling.style.fontFamily=n;null!=O&&T.setAttribute("title",O)}),K={},N=0;N<this.defaultFonts.length;N++){var I=
+this.defaultFonts[N];"string"===typeof I?H(I):null!=I.fontFamily&&null!=I.fontUrl&&(K[encodeURIComponent(I.fontFamily)+"@"+encodeURIComponent(I.fontUrl)]=!0,H(I.fontFamily,I.fontUrl))}p.addSeparator(v);if("1"!=urlParams["ext-fonts"]){I=function(n){var D=encodeURIComponent(n.name)+(null==n.url?"":"@"+encodeURIComponent(n.url));if(!K[D]){for(var M=n.name,T=0;null!=Q[M.toLowerCase()];)M=n.name+" ("+ ++T+")";null==L[D]&&(P.push({name:n.name,url:n.url,label:M,title:n.url}),Q[M.toLowerCase()]=n,L[D]=n)}};
+var L={},Q={},P=[];for(N=0;N<this.customFonts.length;N++)I(this.customFonts[N]);for(var V in Graph.recentCustomFonts)I(Graph.recentCustomFonts[V]);P.sort(function(n,D){return n.label<D.label?-1:n.label>D.label?1:0});if(0<P.length){for(N=0;N<P.length;N++)H(P[N].name,P[N].url,!0,P[N].label,P[N].url);p.addSeparator(v)}p.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),v);p.addSeparator(v)}else{V=
+this.editorUi.editor.graph.extFonts;if(null!=V&&0<V.length){I={};var W=!1;for(N=0;N<this.customFonts.length;N++)I[this.customFonts[N].name]=!0;for(N=0;N<V.length;N++)I[V[N].name]||(this.customFonts.push(V[N]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(N=0;N<this.customFonts.length;N++)V=this.customFonts[N].name,I=this.customFonts[N].url,H(V,I,!0),this.editorUi.editor.graph.addExtFont(V,I,!0);p.addSeparator(v);
+p.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var n=new f(this.editorUi,[],[]);c.editor.graph.model.execute(n)}),v);p.addSeparator(v)}}p.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var n=this.editorUi.editor.graph,D=n.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],M="s",T=null;if("1"!=urlParams["ext-fonts"]&&n.isEditing()){var O=n.getSelectedEditingElement();null!=O&&(O=mxUtils.getCurrentStyle(O),null!=O&&(D=Graph.stripQuotes(O.fontFamily),
+T=Graph.getFontUrl(D,null),null!=T&&(Graph.isGoogleFontUrl(T)?(T=null,M="g"):M="w")))}else O=n.getView().getState(n.getSelectionCell()),null!=O&&(D=O.style[mxConstants.STYLE_FONTFAMILY]||D,"1"!=urlParams["ext-fonts"]?(O=O.style.fontSource,null!=O&&(O=decodeURIComponent(O),Graph.isGoogleFontUrl(O)?M="g":(M="w",T=O))):(M=O.style.FType||M,"w"==M&&(T=this.editorUi.editor.graph.extFonts,O=null,null!=T&&(O=T.find(function(S){return S.name==D})),T=null!=O?O.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 R=null;document.activeElement==n.cellEditor.textarea&&(R=n.cellEditor.saveSelection());M=new FontDialog(this.editorUi,D,T,M,mxUtils.bind(this,function(S,X,Y){null!=R&&(n.cellEditor.restoreSelection(R),R=null);if(null!=S&&0<S.length)if("1"!=urlParams["ext-fonts"]&&n.isEditing())n.setFont(S,X);else{n.getModel().beginUpdate();try{n.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(n.setCellStyles(mxConstants.STYLE_FONTFAMILY,
+S),n.setCellStyles("fontSource",null!=X?encodeURIComponent(X):null),n.setCellStyles("FType",null)):(n.setCellStyles(mxConstants.STYLE_FONTFAMILY,S),"s"!=Y&&(n.setCellStyles("FType",Y),0==X.indexOf("http://")&&(X=PROXY_URL+"?url="+encodeURIComponent(X)),this.editorUi.editor.graph.addExtFont(S,X)));Y=!0;for(var aa=0;aa<this.customFonts.length;aa++)if(this.customFonts[aa].name==S){Y=!1;break}Y&&(this.customFonts.push({name:S,url:X}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",
+this.customFonts)))}finally{n.getModel().endUpdate()}}}));this.editorUi.showDialog(M.container,380,Editor.enableWebFonts?250:180,!0,!0);M.init()}),v,null,!0)})))}})();function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):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,d,f){this.ui=b;this.page=d;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,d,f){this.ui=b;this.oldIndex=d;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,d,f){this.ui=b;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=f&&(d.viewState=f,this.neverShown=!1))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var d=this.ui.editor,f=d.graph,c=Graph.compressNode(d.getGraphXml(!0));mxUtils.setTextContent(b.node,c);b.viewState=f.getViewState();b.root=f.model.root;null!=b.model&&b.model.rootChanged(b.root);f.view.clear(b.root,!0);f.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;f.model.prefix=Editor.guid()+"-";f.model.rootChanged(b.root);
+f.setViewState(b.viewState);f.gridEnabled=f.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();f.view.validate();f.blockMathRender=!0;f.sizeDidChange();f.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,f.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(b,d,f,c,l){SelectPage.call(this,b,f);this.relatedPage=d;this.index=c;this.previousIndex=null;this.noSelect=l}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var d=null;if(null!=this.pages&&null!=b)for(var e=0;e<this.pages.length;e++)if(this.pages[e]==b){d=e;break}return d};EditorUi.prototype.getPageById=function(b,d){d=null!=d?d:this.pages;if(null!=d)for(var e=0;e<d.length;e++)if(d[e].getId()==b)return d[e];return null};
-EditorUi.prototype.createImageForPageLink=function(b,d,e){var c=b.indexOf(","),l=null;0<c&&(c=this.getPageById(b.substring(c+1)),null!=c&&c!=d&&(l=this.getImageForPage(c,d,e),l.originalSrc=b));null==l&&(l={originalSrc:b});return l};
-EditorUi.prototype.getImageForPage=function(b,d,e){e=null!=e?e:this.editor.graph;var c=e.getGlobalVariable,l=this.createTemporaryGraph(e.getStylesheet());l.defaultPageBackgroundColor=e.defaultPageBackgroundColor;l.shapeBackgroundColor=e.shapeBackgroundColor;l.shapeForegroundColor=e.shapeForegroundColor;var m=this.getPageIndex(null!=d?d:this.currentPage);l.getGlobalVariable=function(y){return"pagenumber"==y?m+1:"page"==y&&null!=d?d.getName():c.apply(this,arguments)};document.body.appendChild(l.container);
-this.updatePageRoot(b);l.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";e=l.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var t=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(e)),t.width,t.height,t.x,t.y)};
+EditorUi.prototype.getPageIndex=function(b){var d=null;if(null!=this.pages&&null!=b)for(var f=0;f<this.pages.length;f++)if(this.pages[f]==b){d=f;break}return d};EditorUi.prototype.getPageById=function(b,d){d=null!=d?d:this.pages;if(null!=d)for(var f=0;f<d.length;f++)if(d[f].getId()==b)return d[f];return null};
+EditorUi.prototype.createImageForPageLink=function(b,d,f){var c=b.indexOf(","),l=null;0<c&&(c=this.getPageById(b.substring(c+1)),null!=c&&c!=d&&(l=this.getImageForPage(c,d,f),l.originalSrc=b));null==l&&(l={originalSrc:b});return l};
+EditorUi.prototype.getImageForPage=function(b,d,f){f=null!=f?f:this.editor.graph;var c=f.getGlobalVariable,l=this.createTemporaryGraph(f.getStylesheet());l.defaultPageBackgroundColor=f.defaultPageBackgroundColor;l.shapeBackgroundColor=f.shapeBackgroundColor;l.shapeForegroundColor=f.shapeForegroundColor;var m=this.getPageIndex(null!=d?d:this.currentPage);l.getGlobalVariable=function(y){return"pagenumber"==y?m+1:"page"==y&&null!=d?d.getName():c.apply(this,arguments)};document.body.appendChild(l.container);
+this.updatePageRoot(b);l.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";f=l.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var t=l.getGraphBounds();document.body.removeChild(l.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(f)),t.width,t.height,t.x,t.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,d=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var l=
-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";l!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(b.view,arguments)});var e=null,c=mxUtils.bind(this,function(){this.updateTabContainer();var l=this.currentPage;null!=l&&l!=e&&(null==l.viewState||null==l.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
-(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+l.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+l.viewState.scrollTop),e=l);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(l,
+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";l!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(b.view,arguments)});var f=null,c=mxUtils.bind(this,function(){this.updateTabContainer();var l=this.currentPage;null!=l&&l!=f&&(null==l.viewState||null==l.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+l.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+l.viewState.scrollTop),f=l);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(l,
m){l=m.getProperty("edit").changes;for(m=0;m<l.length;m++)if(l[m]instanceof SelectPage||l[m]instanceof RenamePage||l[m]instanceof MovePage||l[m]instanceof mxRootChange){c();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(b,d,e){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,d):(c.setViewState(d),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+d.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+d.scrollTop,c.restoreSelection(e))};
-Graph.prototype.createViewState=function(b){var d=b.getAttribute("page"),e=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),m=b.getAttribute("background"),t=this.parseBackgroundImage(b.getAttribute("backgroundImage")),y=b.getAttribute("extFonts");if(y)try{y=y.split("|").map(function(C){C=C.split("^");return{name:C[0],url:C[1]}})}catch(C){console.log("ExtFonts format error: "+C.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:t,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(c)||isNaN(l)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+EditorUi.prototype.restoreViewState=function(b,d,f){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,d):(c.setViewState(d),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+d.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+d.scrollTop,c.restoreSelection(f))};
+Graph.prototype.createViewState=function(b){var d=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),m=b.getAttribute("background"),t=this.parseBackgroundImage(b.getAttribute("backgroundImage")),y=b.getAttribute("extFonts");if(y)try{y=y.split("|").map(function(C){C=C.split("^");return{name:C[0],url:C[1]}})}catch(C){console.log("ExtFonts format error: "+C.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:t,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(c)||isNaN(l)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,c,l),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:y||[]}};
-Graph.prototype.saveViewState=function(b,d,e,c){e||(d.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),d.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),d.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),d.setAttribute("connect",null==b||b.connect?"1":"0"),d.setAttribute("arrows",null==b||b.arrows?"1":"0"),d.setAttribute("fold",
-null==b||b.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);e=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(d.setAttribute("pageWidth",e.width),d.setAttribute("pageHeight",e.height));null!=b&&(null!=b.background&&d.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,c),null!=c&&d.setAttribute("backgroundImage",
+Graph.prototype.saveViewState=function(b,d,f,c){f||(d.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),d.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),d.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),d.setAttribute("connect",null==b||b.connect?"1":"0"),d.setAttribute("arrows",null==b||b.arrows?"1":"0"),d.setAttribute("fold",
+null==b||b.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);f=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=f&&(d.setAttribute("pageWidth",f.width),d.setAttribute("pageHeight",f.height));null!=b&&(null!=b.background&&d.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,c),null!=c&&d.setAttribute("backgroundImage",
JSON.stringify(c)));d.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");d.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&d.setAttribute("extFonts",b.extFonts.map(function(l){return l.name+"^"+l.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(b,d){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var e=this.extFonts;this.extFonts=b.extFonts||[];if(d&&null!=e)for(d=0;d<e.length;d++){var c=document.getElementById("extFont_"+e[d].name);null!=c&&c.parentNode.removeChild(c)}for(d=0;d<this.extFonts.length;d++)this.addExtFont(this.extFonts[d].name,this.extFonts[d].url,
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var f=this.extFonts;this.extFonts=b.extFonts||[];if(d&&null!=f)for(d=0;d<f.length;d++){var c=document.getElementById("extFont_"+f[d].name);null!=c&&c.parentNode.removeChild(c)}for(d=0;d<this.extFonts.length;d++)this.addExtFont(this.extFonts[d].name,this.extFonts[d].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled=
!0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,d,e){if(b&&d){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:d});var c="extFont_"+b;if(null==document.getElementById(c))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,c);else{document.getElementsByTagName("head");var l=document.createElement("style");l.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+d+'");\n}'));l.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(l)}if(!e){null==
-this.extFonts&&(this.extFonts=[]);e=this.extFonts;c=!0;for(l=0;l<e.length;l++)if(e[l].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:d})}}};
-EditorUi.prototype.updatePageRoot=function(b,d){if(null==b.root){d=this.editor.extractGraphModel(b.node,null,d);var e=Editor.extractParserError(d);if(e)throw Error(e);null!=d?(b.graphModelNode=d,b.viewState=this.editor.graph.createViewState(d),e=new mxCodec(d.ownerDocument),b.root=e.decode(d).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){d=this.editor.extractGraphModel(b.node);if(e=Editor.extractParserError(d))throw Error(e);null!=d&&(b.graphModelNode=
+Graph.prototype.addExtFont=function(b,d,f){if(b&&d){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:d});var c="extFont_"+b;if(null==document.getElementById(c))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,c);else{document.getElementsByTagName("head");var l=document.createElement("style");l.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+d+'");\n}'));l.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(l)}if(!f){null==
+this.extFonts&&(this.extFonts=[]);f=this.extFonts;c=!0;for(l=0;l<f.length;l++)if(f[l].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:d})}}};
+EditorUi.prototype.updatePageRoot=function(b,d){if(null==b.root){d=this.editor.extractGraphModel(b.node,null,d);var f=Editor.extractParserError(d);if(f)throw Error(f);null!=d?(b.graphModelNode=d,b.viewState=this.editor.graph.createViewState(d),f=new mxCodec(d.ownerDocument),b.root=f.decode(d).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){d=this.editor.extractGraphModel(b.node);if(f=Editor.extractParserError(d))throw Error(f);null!=d&&(b.graphModelNode=
d)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,d,e){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var c=this.editor.graph.model.createUndoableEdit();c.ignoreEdit=!0;var l=new SelectPage(this,b,e);l.execute();c.add(l);c.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c))}}catch(m){this.handleError(m)}};
+EditorUi.prototype.selectPage=function(b,d,f){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var c=this.editor.graph.model.createUndoableEdit();c.ignoreEdit=!0;var l=new SelectPage(this,b,f);l.execute();c.add(l);c.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c))}}catch(m){this.handleError(m)}};
EditorUi.prototype.selectNextPage=function(b){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),b?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(b,d){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),d=null!=d?d:this.pages.length,d=new ChangePage(this,b,b,d),this.editor.graph.model.execute(d));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,d){d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),d);d.setName(null!=b?b:this.createPageName());this.initDiagramNode(d);return d};EditorUi.prototype.createPageName=function(){for(var b={},d=0;d<this.pages.length;d++){var e=this.pages[d].getName();null!=e&&0<e.length&&(b[e]=e)}d=this.pages.length;do e=mxResources.get("pageWithNumber",[++d]);while(null!=b[e]);return e};
-EditorUi.prototype.removePage=function(b){try{var d=this.editor.graph,e=mxUtils.indexOf(this.pages,b);if(d.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(e==this.pages.length-1?e--:e++,c=this.pages[e]):1>=this.pages.length&&(c=this.insertPage(),d.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,b,c))}finally{d.model.endUpdate()}}}catch(l){this.handleError(l)}return b};
-EditorUi.prototype.duplicatePage=function(b,d){var e=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var l=b.node.cloneNode(!1);l.removeAttribute("id");var m={},t=c.createCellLookup([c.model.root]);e=new DiagramPage(l);e.root=c.cloneCell(c.model.root,null,m);var y=new mxGraphModel;y.prefix=Editor.guid()+"-";y.setRoot(e.root);c.updateCustomLinks(c.createCellMapping(m,t),[e.root]);e.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(e);
-e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(d);e=this.insertPage(e,mxUtils.indexOf(this.pages,b)+1)}}catch(C){this.handleError(C)}return e};EditorUi.prototype.initDiagramNode=function(b){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,d);mxUtils.setTextContent(b.node,Graph.compressNode(d))};
-EditorUi.prototype.clonePages=function(b){for(var d=[],e=0;e<b.length;e++)d.push(this.clonePage(b[e]));return d};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var d=new DiagramPage(b.node.cloneNode(!0)),e=b==this.currentPage?this.editor.graph.getViewState():b.viewState;d.viewState=mxUtils.clone(e,EditorUi.transientViewStateProperties);d.root=this.editor.graph.model.cloneCell(b.root,null,!0);return d};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(e){null!=e&&0<e.length&&this.editor.graph.model.execute(new RenamePage(this,b,e))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return b};EditorUi.prototype.movePage=function(b,d){this.editor.graph.model.execute(new MovePage(this,b,d))};
+EditorUi.prototype.createPage=function(b,d){d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),d);d.setName(null!=b?b:this.createPageName());this.initDiagramNode(d);return d};EditorUi.prototype.createPageName=function(){for(var b={},d=0;d<this.pages.length;d++){var f=this.pages[d].getName();null!=f&&0<f.length&&(b[f]=f)}d=this.pages.length;do f=mxResources.get("pageWithNumber",[++d]);while(null!=b[f]);return f};
+EditorUi.prototype.removePage=function(b){try{var d=this.editor.graph,f=mxUtils.indexOf(this.pages,b);if(d.isEnabled()&&0<=f){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(f==this.pages.length-1?f--:f++,c=this.pages[f]):1>=this.pages.length&&(c=this.insertPage(),d.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,b,c))}finally{d.model.endUpdate()}}}catch(l){this.handleError(l)}return b};
+EditorUi.prototype.duplicatePage=function(b,d){var f=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var l=b.node.cloneNode(!1);l.removeAttribute("id");var m={},t=c.createCellLookup([c.model.root]);f=new DiagramPage(l);f.root=c.cloneCell(c.model.root,null,m);var y=new mxGraphModel;y.prefix=Editor.guid()+"-";y.setRoot(f.root);c.updateCustomLinks(c.createCellMapping(m,t),[f.root]);f.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(f);
+f.viewState.scale=1;f.viewState.scrollLeft=null;f.viewState.scrollTop=null;f.viewState.currentRoot=null;f.viewState.defaultParent=null;f.setName(d);f=this.insertPage(f,mxUtils.indexOf(this.pages,b)+1)}}catch(C){this.handleError(C)}return f};EditorUi.prototype.initDiagramNode=function(b){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,d);mxUtils.setTextContent(b.node,Graph.compressNode(d))};
+EditorUi.prototype.clonePages=function(b){for(var d=[],f=0;f<b.length;f++)d.push(this.clonePage(b[f]));return d};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var d=new DiagramPage(b.node.cloneNode(!0)),f=b==this.currentPage?this.editor.graph.getViewState():b.viewState;d.viewState=mxUtils.clone(f,EditorUi.transientViewStateProperties);d.root=this.editor.graph.model.cloneCell(b.root,null,!0);return d};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(f){null!=f&&0<f.length&&this.editor.graph.model.execute(new RenamePage(this,b,f))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return b};EditorUi.prototype.movePage=function(b,d){this.editor.graph.model.execute(new MovePage(this,b,d))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display="inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="13px";d.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-e)/this.pages.length)+
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display="inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="13px";d.style.marginLeft="30px";for(var f=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-f)/this.pages.length)+
1),l=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(A,B){this.pages[A]==this.currentPage?(B.className="geActivePage",B.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):B.className="geInactivePage";B.setAttribute("draggable","true");mxEvent.addListener(B,"dragstart",mxUtils.bind(this,function(J){b.isEnabled()?(mxClient.IS_FF&&J.dataTransfer.setData("Text","<diagram/>"),l=A):mxEvent.consume(J)}));mxEvent.addListener(B,"dragend",mxUtils.bind(this,function(J){l=null;J.stopPropagation();
J.preventDefault()}));mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(J){null!=l&&(J.dataTransfer.dropEffect="move");J.stopPropagation();J.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,function(J){null!=l&&A!=l&&this.movePage(l,A);J.stopPropagation();J.preventDefault()}));d.appendChild(B)})(m,this.createTabForPage(this.pages[m],c,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerText="";this.tabContainer.appendChild(d);c=this.createPageMenuTab();this.tabContainer.appendChild(c);
-c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(d.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",d.style.marginRight="30px");var t=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");t.style.position="absolute";t.style.right=this.editor.chromeless?"29px":"55px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var y=this.createControlTab(4,"&nbsp;&#10095;");y.style.position="absolute";
+c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(d.clientWidth>this.tabContainer.clientWidth-f){null!=c&&(c.style.position="absolute",c.style.right="0px",d.style.marginRight="30px");var t=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");t.style.position="absolute";t.style.right=this.editor.chromeless?"29px":"55px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var y=this.createControlTab(4,"&nbsp;&#10095;");y.style.position="absolute";
y.style.right=this.editor.chromeless?"0px":"29px";y.style.fontSize="13pt";this.tabContainer.appendChild(y);var C=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=C+"px";mxEvent.addListener(t,"click",mxUtils.bind(this,function(A){d.scrollLeft-=Math.max(20,C-20);mxUtils.setOpacity(t,0<d.scrollLeft?100:50);mxUtils.setOpacity(y,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(A)}));mxUtils.setOpacity(t,0<d.scrollLeft?100:50);mxUtils.setOpacity(y,
d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(y,"click",mxUtils.bind(this,function(A){d.scrollLeft+=Math.max(20,C-20);mxUtils.setOpacity(t,0<d.scrollLeft?100:50);mxUtils.setOpacity(y,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(A)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var d=document.createElement("div");d.style.display="inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.textAlign="center";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="12px 4px 8px 4px";d.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";d.style.borderTopStyle="none";d.style.borderBottomStyle="none";d.style.backgroundColor=
-this.tabContainer.style.backgroundColor;d.style.cursor="move";d.style.color="gray";b&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(e){this.editor.graph.isMouseDown||(d.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(e))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(e){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(e)})));return d};
-EditorUi.prototype.createControlTab=function(b,d,e){e=this.createTab(null!=e?e:!0);e.style.lineHeight=this.tabContainerHeight+"px";e.style.paddingTop=b+"px";e.style.cursor="pointer";e.style.width="30px";e.innerHTML=d;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
-EditorUi.prototype.createPageMenuTab=function(b,d){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.marginTop="5px";e.style.width="21px";e.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.editor.graph.popupMenuHandler.hideMenu();
-var l=new mxPopupMenu(mxUtils.bind(this,function(y,C){var A=mxUtils.bind(this,function(){for(var g=0;g<this.pages.length;g++)mxUtils.bind(this,function(k){var n=y.addItem(this.getShortPageName(this.pages[k]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[k])}),C),v=this.pages[k].getId();n.setAttribute("title",this.pages[k].getName()+" ("+(k+1)+"/"+this.pages.length+")"+(null!=v?" ["+v+"]":""));this.pages[k]==this.currentPage&&y.addCheckmark(n,Editor.checkmarkImage)})(g)}),B=mxUtils.bind(this,
-function(){y.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),C)});d||A();if(this.editor.graph.isEnabled()){d||(y.addSeparator(C),B());var J=this.currentPage;if(null!=J){y.addSeparator(C);var f=this.getShortPageName(J);y.addItem(mxResources.get("removeIt",[f]),null,mxUtils.bind(this,function(){this.removePage(J)}),C);y.addItem(mxResources.get("renameIt",[f]),null,mxUtils.bind(this,function(){this.renamePage(J,J.getName())}),C);d||y.addSeparator(C);y.addItem(mxResources.get("duplicateIt",
-[f]),null,mxUtils.bind(this,function(){this.duplicatePage(J,mxResources.get("copyOf",[J.getName()]))}),C)}}d&&(y.addSeparator(C),B(),y.addSeparator(C),A())}));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);l.destroy()});var m=mxEvent.getClientX(c),t=mxEvent.getClientY(c);l.popup(m,t,null,c);this.setCurrentMenu(l);mxEvent.consume(c)}));return b};
-EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){this.insertPage();mxEvent.consume(e)}));var d=b.getElementsByTagName("div")[0];d.style.display="inline-block";d.style.width="21px";d.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,d,e,c){e=this.createTab(e);var l=b.getName()||mxResources.get("untitled"),m=b.getId();e.setAttribute("title",l+(null!=m?" ("+m+")":"")+" ["+c+"]");mxUtils.write(e,l);e.style.maxWidth=d+"px";e.style.width=d+"px";this.addTabListeners(b,e);42<d&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(b,d){mxEvent.disableContextMenu(d);var e=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(m){this.renamePage(b);mxEvent.consume(m)}));var c=!1,l=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(m){c=null!=this.currentMenu;l=b==this.currentPage;e.isMouseDown||l||this.selectPage(b)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&l||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu();
+this.tabContainer.style.backgroundColor;d.style.cursor="move";d.style.color="gray";b&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(f){this.editor.graph.isMouseDown||(d.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(f))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(f){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(f)})));return d};
+EditorUi.prototype.createControlTab=function(b,d,f){f=this.createTab(null!=f?f:!0);f.style.lineHeight=this.tabContainerHeight+"px";f.style.paddingTop=b+"px";f.style.cursor="pointer";f.style.width="30px";f.innerHTML=d;null!=f.firstChild&&null!=f.firstChild.style&&mxUtils.setOpacity(f.firstChild,40);return f};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
+EditorUi.prototype.createPageMenuTab=function(b,d){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.marginTop="5px";f.style.width="21px";f.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){this.editor.graph.popupMenuHandler.hideMenu();
+var l=new mxPopupMenu(mxUtils.bind(this,function(y,C){var A=mxUtils.bind(this,function(){for(var g=0;g<this.pages.length;g++)mxUtils.bind(this,function(k){var q=y.addItem(this.getShortPageName(this.pages[k]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[k])}),C),u=this.pages[k].getId();q.setAttribute("title",this.pages[k].getName()+" ("+(k+1)+"/"+this.pages.length+")"+(null!=u?" ["+u+"]":""));this.pages[k]==this.currentPage&&y.addCheckmark(q,Editor.checkmarkImage)})(g)}),B=mxUtils.bind(this,
+function(){y.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),C)});d||A();if(this.editor.graph.isEnabled()){d||(y.addSeparator(C),B());var J=this.currentPage;if(null!=J){y.addSeparator(C);var e=this.getShortPageName(J);y.addItem(mxResources.get("removeIt",[e]),null,mxUtils.bind(this,function(){this.removePage(J)}),C);y.addItem(mxResources.get("renameIt",[e]),null,mxUtils.bind(this,function(){this.renamePage(J,J.getName())}),C);d||y.addSeparator(C);y.addItem(mxResources.get("duplicateIt",
+[e]),null,mxUtils.bind(this,function(){this.duplicatePage(J,mxResources.get("copyOf",[J.getName()]))}),C)}}d&&(y.addSeparator(C),B(),y.addSeparator(C),A())}));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);l.destroy()});var m=mxEvent.getClientX(c),t=mxEvent.getClientY(c);l.popup(m,t,null,c);this.setCurrentMenu(l);mxEvent.consume(c)}));return b};
+EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){this.insertPage();mxEvent.consume(f)}));var d=b.getElementsByTagName("div")[0];d.style.display="inline-block";d.style.width="21px";d.style.height="21px";return b};
+EditorUi.prototype.createTabForPage=function(b,d,f,c){f=this.createTab(f);var l=b.getName()||mxResources.get("untitled"),m=b.getId();f.setAttribute("title",l+(null!=m?" ("+m+")":"")+" ["+c+"]");mxUtils.write(f,l);f.style.maxWidth=d+"px";f.style.width=d+"px";this.addTabListeners(b,f);42<d&&(f.style.textOverflow="ellipsis");return f};
+EditorUi.prototype.addTabListeners=function(b,d){mxEvent.disableContextMenu(d);var f=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(m){this.renamePage(b);mxEvent.consume(m)}));var c=!1,l=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(m){c=null!=this.currentMenu;l=b==this.currentPage;f.isMouseDown||l||this.selectPage(b)}),null,mxUtils.bind(this,function(m){if(f.isEnabled()&&!f.isMouseDown&&(mxEvent.isTouchEvent(m)&&l||mxEvent.isPopupTrigger(m))){f.popupMenuHandler.hideMenu();
this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){var t=new mxPopupMenu(this.createPageMenu(b));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);this.resetCurrentMenu();t.destroy()});var y=mxEvent.getClientX(m),C=mxEvent.getClientY(m);t.popup(y,C,null,m);this.setCurrentMenu(t,d)}mxEvent.consume(m)}}))};
-EditorUi.prototype.getLinkForPage=function(b,d,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=this.getCurrentFile();if(null!=c&&c.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var l=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));l+=(0==l.length?"?":"&")+"page-id="+b.getId();null!=d&&(l+="&"+d.join("&"));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.prototype.getLinkForPage=function(b,d,f){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=this.getCurrentFile();if(null!=c&&c.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var l=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));l+=(0==l.length?"?":"&")+"page-id="+b.getId();null!=d&&(l+="&"+d.join("&"));return(f&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+l+"#"+c.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,d){return mxUtils.bind(this,function(e,c){var l=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),c);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,d)}),c);null!=this.getLinkForPage(b)&&(e.addSeparator(c),e.addItem(mxResources.get("link"),
+EditorUi.prototype.createPageMenu=function(b,d){return mxUtils.bind(this,function(f,c){var l=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,d)}),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(m,t,y,C,A,B){m=this.createUrlParameters(m,t,y,C,A,B);y||m.push("hide-pages=1");l.isSelectionEmpty()||(y=l.getBoundingBox(l.getSelectionCells()),t=l.view.translate,A=l.view.scale,y.width/=A,y.height/=A,y.x=y.x/A-t.x,y.y=y.y/A-t.y,m.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(y.x),y:Math.round(y.y),width:Math.round(y.width),height:Math.round(y.height),border:100}))));
-C=new EmbedDialog(this,this.getLinkForPage(b,m,C));this.showDialog(C.container,450,240,!0,!0);C.init()}))})));e.addSeparator(c);e.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()||(e.addSeparator(c),e.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(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(d,e,c){c.ui=d.ui;return e};b.afterDecode=function(d,e,c){d=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=d;return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(d,e,c){c.ui=d.ui;return e};b.afterDecode=function(d,e,c){d=c.previous;c.previous=c.name;c.name=d;return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(d,e,c){c.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(c.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.viewState&&c.setAttribute("viewState",JSON.stringify(e.relatedPage.viewState,function(l,m){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,l)?m:void 0})),null!=e.relatedPage.root&&d.encodeCell(e.relatedPage.root,
-c));return c};b.beforeDecode=function(d,e,c){c.ui=d.ui;c.relatedPage=c.ui.getPageById(e.getAttribute("relatedPage"));if(null==c.relatedPage){var l=e.ownerDocument.createElement("diagram");l.setAttribute("id",e.getAttribute("relatedPage"));l.setAttribute("name",e.getAttribute("name"));c.relatedPage=new DiagramPage(l);l=e.getAttribute("viewState");null!=l&&(c.relatedPage.viewState=JSON.parse(l),e.removeAttribute("viewState"));e=e.cloneNode(!0);l=e.firstChild;if(null!=l)for(c.relatedPage.root=d.decodeCell(l,
-!1),c=l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var m=l.getAttribute("id");null==d.lookup(m)&&d.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return e};b.afterDecode=function(d,e,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,l,m,t,y){l=null!=l?l:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var C=m.slice(),A=0;A<m.length;A++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[A]),"treeFolding","0")&&this.foldTreeCell(c,m[A]);m=C;m=b.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell=
+C=new EmbedDialog(this,this.getLinkForPage(b,m,C));this.showDialog(C.container,450,240,!0,!0);C.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(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(d,f,c){c.ui=d.ui;return f};b.afterDecode=function(d,f,c){d=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=d;return c};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(d,f,c){c.ui=d.ui;return f};b.afterDecode=function(d,f,c){d=c.previous;c.previous=c.name;c.name=d;return c};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(d,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(l,m){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,l)?m:void 0})),null!=f.relatedPage.root&&d.encodeCell(f.relatedPage.root,
+c));return c};b.beforeDecode=function(d,f,c){c.ui=d.ui;c.relatedPage=c.ui.getPageById(f.getAttribute("relatedPage"));if(null==c.relatedPage){var l=f.ownerDocument.createElement("diagram");l.setAttribute("id",f.getAttribute("relatedPage"));l.setAttribute("name",f.getAttribute("name"));c.relatedPage=new DiagramPage(l);l=f.getAttribute("viewState");null!=l&&(c.relatedPage.viewState=JSON.parse(l),f.removeAttribute("viewState"));f=f.cloneNode(!0);l=f.firstChild;if(null!=l)for(c.relatedPage.root=d.decodeCell(l,
+!1),c=l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var m=l.getAttribute("id");null==d.lookup(m)&&d.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(d,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,l,m,t,y){l=null!=l?l:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var C=m.slice(),A=0;A<m.length;A++)"1"==mxUtils.getValue(this.getCurrentCellStyle(m[A]),"treeFolding","0")&&this.foldTreeCell(c,m[A]);m=C;m=b.apply(this,arguments)}finally{this.model.endUpdate()}return m};Graph.prototype.foldTreeCell=
function(c,l){this.model.beginUpdate();try{var m=[];this.traverse(l,!0,mxUtils.bind(this,function(y,C){var A=null!=C&&this.isTreeEdge(C);A&&m.push(C);y==l||null!=C&&!A||m.push(y);return(null==C||A)&&(y==l||!this.model.isCollapsed(y))}));this.model.setCollapsed(l,c);for(var t=0;t<m.length;t++)this.model.setVisible(m[t],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,m,t,y,C){return this.model.filterCells(this.getEdges(c,
-l,m,t,y,C),mxUtils.bind(this,function(A){return this.isTreeEdge(A)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(I){return n.isVertex(I)&&m(I)}function l(I){var L=
-!1;null!=I&&(L="1"==k.getCurrentCellStyle(I).treeMoving);return L}function m(I){var L=!1;null!=I&&(I=n.getParent(I),L=k.view.getState(I),L="tree"==(null!=L?L.style:k.getCellStyle(I)).containerType);return L}function t(I){var L=!1;null!=I&&(I=n.getParent(I),L=k.view.getState(I),k.view.getState(I),L=null!=(null!=L?L.style:k.getCellStyle(I)).childLayout);return L}function y(I){I=k.view.getState(I);if(null!=I){var L=k.getIncomingTreeEdges(I.cell);if(0<L.length&&(L=k.view.getState(L[0]),null!=L&&(L=L.absolutePoints,
+l,m,t,y,C),mxUtils.bind(this,function(A){return this.isTreeEdge(A)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(I){return q.isVertex(I)&&m(I)}function l(I){var L=
+!1;null!=I&&(L="1"==k.getCurrentCellStyle(I).treeMoving);return L}function m(I){var L=!1;null!=I&&(I=q.getParent(I),L=k.view.getState(I),L="tree"==(null!=L?L.style:k.getCellStyle(I)).containerType);return L}function t(I){var L=!1;null!=I&&(I=q.getParent(I),L=k.view.getState(I),k.view.getState(I),L=null!=(null!=L?L.style:k.getCellStyle(I)).childLayout);return L}function y(I){I=k.view.getState(I);if(null!=I){var L=k.getIncomingTreeEdges(I.cell);if(0<L.length&&(L=k.view.getState(L[0]),null!=L&&(L=L.absolutePoints,
null!=L&&0<L.length&&(L=L[L.length-1],null!=L)))){if(L.y==I.y&&Math.abs(L.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_SOUTH;if(L.y==I.y+I.height&&Math.abs(L.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_NORTH;if(L.x>I.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function C(I,L){L=null!=L?L:!0;k.model.beginUpdate();try{var Q=k.model.getParent(I),P=k.getIncomingTreeEdges(I),V=k.cloneCells([P[0],I]);k.model.setTerminal(V[0],k.model.getTerminal(P[0],
-!0),!0);var W=y(I),q=Q.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=L?I.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=L?I.geometry.height+10:-V[1].geometry.height-10;k.view.currentRoot!=Q&&(V[1].geometry.x-=q.x,V[1].geometry.y-=q.y);var D=k.view.getState(I),M=k.view.scale;if(null!=D){var T=mxRectangle.fromRectangle(D);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?T.x+=(L?I.geometry.width+10:-V[1].geometry.width-10)*M:T.y+=(L?
-I.geometry.height+10:-V[1].geometry.height-10)*M;var O=k.getOutgoingTreeEdges(k.model.getTerminal(P[0],!0));if(null!=O){for(var R=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,S=q=P=0;S<O.length;S++){var X=k.model.getTerminal(O[S],!1);if(W==y(X)){var Y=k.view.getState(X);X!=I&&null!=Y&&(R&&L!=Y.getCenterX()<D.getCenterX()||!R&&L!=Y.getCenterY()<D.getCenterY())&&mxUtils.intersects(T,Y)&&(P=10+Math.max(P,(Math.min(T.x+T.width,Y.x+Y.width)-Math.max(T.x,Y.x))/M),q=10+Math.max(q,(Math.min(T.y+
-T.height,Y.y+Y.height)-Math.max(T.y,Y.y))/M))}}R?q=0:P=0;for(S=0;S<O.length;S++)if(X=k.model.getTerminal(O[S],!1),W==y(X)&&(Y=k.view.getState(X),X!=I&&null!=Y&&(R&&L!=Y.getCenterX()<D.getCenterX()||!R&&L!=Y.getCenterY()<D.getCenterY()))){var aa=[];k.traverse(Y.cell,!0,function(ba,da){var Z=null!=da&&k.isTreeEdge(da);Z&&aa.push(da);(null==da||Z)&&aa.push(ba);return null==da||Z});k.moveCells(aa,(L?1:-1)*P,(L?1:-1)*q)}}}return k.addCells(V,Q)}finally{k.model.endUpdate()}}function A(I){k.model.beginUpdate();
-try{var L=y(I),Q=k.getIncomingTreeEdges(I),P=k.cloneCells([Q[0],I]);k.model.setTerminal(Q[0],P[1],!1);k.model.setTerminal(P[0],P[1],!0);k.model.setTerminal(P[0],I,!1);var V=k.model.getParent(I),W=V.geometry,q=[];k.view.currentRoot!=V&&(P[1].geometry.x-=W.x,P[1].geometry.y-=W.y);k.traverse(I,!0,function(T,O){var R=null!=O&&k.isTreeEdge(O);R&&q.push(O);(null==O||R)&&q.push(T);return null==O||R});var D=I.geometry.width+40,M=I.geometry.height+40;L==mxConstants.DIRECTION_SOUTH?D=0:L==mxConstants.DIRECTION_NORTH?
-(D=0,M=-M):L==mxConstants.DIRECTION_WEST?(D=-D,M=0):L==mxConstants.DIRECTION_EAST&&(M=0);k.moveCells(q,D,M);return k.addCells(P,V)}finally{k.model.endUpdate()}}function B(I,L){k.model.beginUpdate();try{var Q=k.model.getParent(I),P=k.getIncomingTreeEdges(I),V=y(I);0==P.length&&(P=[k.createEdge(Q,null,"",null,null,k.createCurrentEdgeStyle())],V=L);var W=k.cloneCells([P[0],I]);k.model.setTerminal(W[0],I,!0);if(null==k.model.getTerminal(W[0],!1)){k.model.setTerminal(W[0],W[1],!1);var q=k.getCellStyle(W[1]).newEdgeStyle;
-if(null!=q)try{var D=JSON.parse(q),M;for(M in D)k.setCellStyles(M,D[M],[W[0]]),"edgeStyle"==M&&"elbowEdgeStyle"==D[M]&&k.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(Y){}}P=k.getOutgoingTreeEdges(I);var T=Q.geometry;L=[];k.view.currentRoot==Q&&(T=new mxRectangle);for(q=0;q<P.length;q++){var O=k.model.getTerminal(P[q],!1);null!=O&&L.push(O)}var R=k.view.getBounds(L),S=k.view.translate,X=k.view.scale;V==mxConstants.DIRECTION_SOUTH?
+!0),!0);var W=y(I),n=Q.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=L?I.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=L?I.geometry.height+10:-V[1].geometry.height-10;k.view.currentRoot!=Q&&(V[1].geometry.x-=n.x,V[1].geometry.y-=n.y);var D=k.view.getState(I),M=k.view.scale;if(null!=D){var T=mxRectangle.fromRectangle(D);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?T.x+=(L?I.geometry.width+10:-V[1].geometry.width-10)*M:T.y+=(L?
+I.geometry.height+10:-V[1].geometry.height-10)*M;var O=k.getOutgoingTreeEdges(k.model.getTerminal(P[0],!0));if(null!=O){for(var R=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,S=n=P=0;S<O.length;S++){var X=k.model.getTerminal(O[S],!1);if(W==y(X)){var Y=k.view.getState(X);X!=I&&null!=Y&&(R&&L!=Y.getCenterX()<D.getCenterX()||!R&&L!=Y.getCenterY()<D.getCenterY())&&mxUtils.intersects(T,Y)&&(P=10+Math.max(P,(Math.min(T.x+T.width,Y.x+Y.width)-Math.max(T.x,Y.x))/M),n=10+Math.max(n,(Math.min(T.y+
+T.height,Y.y+Y.height)-Math.max(T.y,Y.y))/M))}}R?n=0:P=0;for(S=0;S<O.length;S++)if(X=k.model.getTerminal(O[S],!1),W==y(X)&&(Y=k.view.getState(X),X!=I&&null!=Y&&(R&&L!=Y.getCenterX()<D.getCenterX()||!R&&L!=Y.getCenterY()<D.getCenterY()))){var aa=[];k.traverse(Y.cell,!0,function(ba,da){var Z=null!=da&&k.isTreeEdge(da);Z&&aa.push(da);(null==da||Z)&&aa.push(ba);return null==da||Z});k.moveCells(aa,(L?1:-1)*P,(L?1:-1)*n)}}}return k.addCells(V,Q)}finally{k.model.endUpdate()}}function A(I){k.model.beginUpdate();
+try{var L=y(I),Q=k.getIncomingTreeEdges(I),P=k.cloneCells([Q[0],I]);k.model.setTerminal(Q[0],P[1],!1);k.model.setTerminal(P[0],P[1],!0);k.model.setTerminal(P[0],I,!1);var V=k.model.getParent(I),W=V.geometry,n=[];k.view.currentRoot!=V&&(P[1].geometry.x-=W.x,P[1].geometry.y-=W.y);k.traverse(I,!0,function(T,O){var R=null!=O&&k.isTreeEdge(O);R&&n.push(O);(null==O||R)&&n.push(T);return null==O||R});var D=I.geometry.width+40,M=I.geometry.height+40;L==mxConstants.DIRECTION_SOUTH?D=0:L==mxConstants.DIRECTION_NORTH?
+(D=0,M=-M):L==mxConstants.DIRECTION_WEST?(D=-D,M=0):L==mxConstants.DIRECTION_EAST&&(M=0);k.moveCells(n,D,M);return k.addCells(P,V)}finally{k.model.endUpdate()}}function B(I,L){k.model.beginUpdate();try{var Q=k.model.getParent(I),P=k.getIncomingTreeEdges(I),V=y(I);0==P.length&&(P=[k.createEdge(Q,null,"",null,null,k.createCurrentEdgeStyle())],V=L);var W=k.cloneCells([P[0],I]);k.model.setTerminal(W[0],I,!0);if(null==k.model.getTerminal(W[0],!1)){k.model.setTerminal(W[0],W[1],!1);var n=k.getCellStyle(W[1]).newEdgeStyle;
+if(null!=n)try{var D=JSON.parse(n),M;for(M in D)k.setCellStyles(M,D[M],[W[0]]),"edgeStyle"==M&&"elbowEdgeStyle"==D[M]&&k.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(Y){}}P=k.getOutgoingTreeEdges(I);var T=Q.geometry;L=[];k.view.currentRoot==Q&&(T=new mxRectangle);for(n=0;n<P.length;n++){var O=k.model.getTerminal(P[n],!1);null!=O&&L.push(O)}var R=k.view.getBounds(L),S=k.view.translate,X=k.view.scale;V==mxConstants.DIRECTION_SOUTH?
(W[1].geometry.x=null==R?I.geometry.x+(I.geometry.width-W[1].geometry.width)/2:(R.x+R.width)/X-S.x-T.x+10,W[1].geometry.y+=W[1].geometry.height-T.y+40):V==mxConstants.DIRECTION_NORTH?(W[1].geometry.x=null==R?I.geometry.x+(I.geometry.width-W[1].geometry.width)/2:(R.x+R.width)/X-S.x+-T.x+10,W[1].geometry.y-=W[1].geometry.height+T.y+40):(W[1].geometry.x=V==mxConstants.DIRECTION_WEST?W[1].geometry.x-(W[1].geometry.width+T.x+40):W[1].geometry.x+(W[1].geometry.width-T.x+40),W[1].geometry.y=null==R?I.geometry.y+
-(I.geometry.height-W[1].geometry.height)/2:(R.y+R.height)/X-S.y+-T.y+10);return k.addCells(W,Q)}finally{k.model.endUpdate()}}function J(I,L,Q){I=k.getOutgoingTreeEdges(I);Q=k.view.getState(Q);var P=[];if(null!=Q&&null!=I){for(var V=0;V<I.length;V++){var W=k.view.getState(k.model.getTerminal(I[V],!1));null!=W&&(!L&&Math.min(W.x+W.width,Q.x+Q.width)>=Math.max(W.x,Q.x)||L&&Math.min(W.y+W.height,Q.y+Q.height)>=Math.max(W.y,Q.y))&&P.push(W)}P.sort(function(q,D){return L?q.x+q.width-D.x-D.width:q.y+q.height-
-D.y-D.height})}return P}function f(I,L){var Q=y(I),P=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST;(Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST)==P&&Q!=L?g.actions.get("selectParent").funct():Q==L?(L=k.getOutgoingTreeEdges(I),null!=L&&0<L.length&&k.setSelectionCell(k.model.getTerminal(L[0],!1))):(Q=k.getIncomingTreeEdges(I),null!=Q&&0<Q.length&&(P=J(k.model.getTerminal(Q[0],!0),P,I),I=k.view.getState(I),null!=I&&(I=mxUtils.indexOf(P,I),0<=I&&(I+=L==mxConstants.DIRECTION_NORTH||
-L==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=P.length-1&&k.setSelectionCell(P[I].cell)))))}var g=this,k=g.editor.graph,n=k.getModel(),v=g.menus.createPopupMenu;g.menus.createPopupMenu=function(I,L,Q){v.apply(this,arguments);if(1==k.getSelectionCount()){L=k.getSelectionCell();var P=k.getOutgoingTreeEdges(L);I.addSeparator();0<P.length&&(c(k.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],null,Q),this.addMenuItems(I,["selectDescendants"],null,Q));c(k.getSelectionCell())?(I.addSeparator(),
+(I.geometry.height-W[1].geometry.height)/2:(R.y+R.height)/X-S.y+-T.y+10);return k.addCells(W,Q)}finally{k.model.endUpdate()}}function J(I,L,Q){I=k.getOutgoingTreeEdges(I);Q=k.view.getState(Q);var P=[];if(null!=Q&&null!=I){for(var V=0;V<I.length;V++){var W=k.view.getState(k.model.getTerminal(I[V],!1));null!=W&&(!L&&Math.min(W.x+W.width,Q.x+Q.width)>=Math.max(W.x,Q.x)||L&&Math.min(W.y+W.height,Q.y+Q.height)>=Math.max(W.y,Q.y))&&P.push(W)}P.sort(function(n,D){return L?n.x+n.width-D.x-D.width:n.y+n.height-
+D.y-D.height})}return P}function e(I,L){var Q=y(I),P=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST;(Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST)==P&&Q!=L?g.actions.get("selectParent").funct():Q==L?(L=k.getOutgoingTreeEdges(I),null!=L&&0<L.length&&k.setSelectionCell(k.model.getTerminal(L[0],!1))):(Q=k.getIncomingTreeEdges(I),null!=Q&&0<Q.length&&(P=J(k.model.getTerminal(Q[0],!0),P,I),I=k.view.getState(I),null!=I&&(I=mxUtils.indexOf(P,I),0<=I&&(I+=L==mxConstants.DIRECTION_NORTH||
+L==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=P.length-1&&k.setSelectionCell(P[I].cell)))))}var g=this,k=g.editor.graph,q=k.getModel(),u=g.menus.createPopupMenu;g.menus.createPopupMenu=function(I,L,Q){u.apply(this,arguments);if(1==k.getSelectionCount()){L=k.getSelectionCell();var P=k.getOutgoingTreeEdges(L);I.addSeparator();0<P.length&&(c(k.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],null,Q),this.addMenuItems(I,["selectDescendants"],null,Q));c(k.getSelectionCell())?(I.addSeparator(),
0<k.getIncomingTreeEdges(L).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,Q)):0<k.model.getEdgeCount(L)&&this.addMenuItems(I,["selectConnections"],null,Q)}};g.actions.addAction("selectChildren",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var I=k.getSelectionCell();I=k.getOutgoingTreeEdges(I);if(null!=I){for(var L=[],Q=0;Q<I.length;Q++)L.push(k.model.getTerminal(I[Q],!1));k.setSelectionCells(L)}}},null,null,"Alt+Shift+X");g.actions.addAction("selectSiblings",function(){if(k.isEnabled()&&
1==k.getSelectionCount()){var I=k.getSelectionCell();I=k.getIncomingTreeEdges(I);if(null!=I&&0<I.length&&(I=k.getOutgoingTreeEdges(k.model.getTerminal(I[0],!0)),null!=I)){for(var L=[],Q=0;Q<I.length;Q++)L.push(k.model.getTerminal(I[Q],!1));k.setSelectionCells(L)}}},null,null,"Alt+Shift+S");g.actions.addAction("selectParent",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var I=k.getSelectionCell();I=k.getIncomingTreeEdges(I);null!=I&&0<I.length&&k.setSelectionCell(k.model.getTerminal(I[0],
!0))}},null,null,"Alt+Shift+P");g.actions.addAction("selectDescendants",function(I,L){I=k.getSelectionCell();if(k.isEnabled()&&k.model.isVertex(I)){if(null!=L&&mxEvent.isAltDown(L))k.setSelectionCells(k.model.getTreeEdges(I,null==L||!mxEvent.isShiftDown(L),null==L||!mxEvent.isControlDown(L)));else{var Q=[];k.traverse(I,!0,function(P,V){var W=null!=V&&k.isTreeEdge(V);W&&Q.push(V);null!=V&&!W||null!=L&&mxEvent.isShiftDown(L)||Q.push(P);return null==V||W})}k.setSelectionCells(Q)}},null,null,"Alt+Shift+D");
-var x=k.removeCells;k.removeCells=function(I,L){L=null!=L?L:!0;null==I&&(I=this.getDeletableCells(this.getSelectionCells()));L&&(I=this.getDeletableCells(this.addAllEdges(I)));for(var Q=[],P=0;P<I.length;P++){var V=I[P];n.isEdge(V)&&m(V)&&(Q.push(V),V=n.getTerminal(V,!1));if(c(V)){var W=[];k.traverse(V,!0,function(q,D){var M=null!=D&&k.isTreeEdge(D);M&&W.push(D);(null==D||M)&&W.push(q);return null==D||M});0<W.length&&(Q=Q.concat(W),V=k.getIncomingTreeEdges(I[P]),I=I.concat(V))}else null!=V&&Q.push(I[P])}I=
-Q;return x.apply(this,arguments)};g.hoverIcons.getStateAt=function(I,L,Q){return c(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(L,Q))};var E=k.duplicateCells;k.duplicateCells=function(I,L){I=null!=I?I:this.getSelectionCells();for(var Q=I.slice(0),P=0;P<Q.length;P++){var V=k.view.getState(Q[P]);if(null!=V&&c(V.cell)){var W=k.getIncomingTreeEdges(V.cell);for(V=0;V<W.length;V++)mxUtils.remove(W[V],I)}}this.model.beginUpdate();try{var q=E.call(this,I,L);if(q.length==I.length)for(P=0;P<I.length;P++)if(c(I[P])){var D=
-k.getIncomingTreeEdges(q[P]);W=k.getIncomingTreeEdges(I[P]);if(0==D.length&&0<W.length){var M=this.cloneCell(W[0]);this.addEdge(M,k.getDefaultParent(),this.model.getTerminal(W[0],!0),q[P])}}}finally{this.model.endUpdate()}return q};var z=k.moveCells;k.moveCells=function(I,L,Q,P,V,W,q){var D=null;this.model.beginUpdate();try{var M=V,T=this.getCurrentCellStyle(V);if(null!=I&&c(V)&&"1"==mxUtils.getValue(T,"treeFolding","0")){for(var O=0;O<I.length;O++)if(c(I[O])||k.model.isEdge(I[O])&&null==k.model.getTerminal(I[O],
+var x=k.removeCells;k.removeCells=function(I,L){L=null!=L?L:!0;null==I&&(I=this.getDeletableCells(this.getSelectionCells()));L&&(I=this.getDeletableCells(this.addAllEdges(I)));for(var Q=[],P=0;P<I.length;P++){var V=I[P];q.isEdge(V)&&m(V)&&(Q.push(V),V=q.getTerminal(V,!1));if(c(V)){var W=[];k.traverse(V,!0,function(n,D){var M=null!=D&&k.isTreeEdge(D);M&&W.push(D);(null==D||M)&&W.push(n);return null==D||M});0<W.length&&(Q=Q.concat(W),V=k.getIncomingTreeEdges(I[P]),I=I.concat(V))}else null!=V&&Q.push(I[P])}I=
+Q;return x.apply(this,arguments)};g.hoverIcons.getStateAt=function(I,L,Q){return c(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(L,Q))};var E=k.duplicateCells;k.duplicateCells=function(I,L){I=null!=I?I:this.getSelectionCells();for(var Q=I.slice(0),P=0;P<Q.length;P++){var V=k.view.getState(Q[P]);if(null!=V&&c(V.cell)){var W=k.getIncomingTreeEdges(V.cell);for(V=0;V<W.length;V++)mxUtils.remove(W[V],I)}}this.model.beginUpdate();try{var n=E.call(this,I,L);if(n.length==I.length)for(P=0;P<I.length;P++)if(c(I[P])){var D=
+k.getIncomingTreeEdges(n[P]);W=k.getIncomingTreeEdges(I[P]);if(0==D.length&&0<W.length){var M=this.cloneCell(W[0]);this.addEdge(M,k.getDefaultParent(),this.model.getTerminal(W[0],!0),n[P])}}}finally{this.model.endUpdate()}return n};var z=k.moveCells;k.moveCells=function(I,L,Q,P,V,W,n){var D=null;this.model.beginUpdate();try{var M=V,T=this.getCurrentCellStyle(V);if(null!=I&&c(V)&&"1"==mxUtils.getValue(T,"treeFolding","0")){for(var O=0;O<I.length;O++)if(c(I[O])||k.model.isEdge(I[O])&&null==k.model.getTerminal(I[O],
!0)){V=k.model.getParent(I[O]);break}if(null!=M&&V!=M&&null!=this.view.getState(I[0])){var R=k.getIncomingTreeEdges(I[0]);if(0<R.length){var S=k.view.getState(k.model.getTerminal(R[0],!0));if(null!=S){var X=k.view.getState(M);null!=X&&(L=(X.getCenterX()-S.getCenterX())/k.view.scale,Q=(X.getCenterY()-S.getCenterY())/k.view.scale)}}}}D=z.apply(this,arguments);if(null!=D&&null!=I&&D.length==I.length)for(O=0;O<D.length;O++)if(this.model.isEdge(D[O]))c(M)&&0>mxUtils.indexOf(D,this.model.getTerminal(D[O],
!0))&&this.model.setTerminal(D[O],M,!0);else if(c(I[O])&&(R=k.getIncomingTreeEdges(I[O]),0<R.length))if(!P)c(M)&&0>mxUtils.indexOf(I,this.model.getTerminal(R[0],!0))&&this.model.setTerminal(R[0],M,!0);else if(0==k.getIncomingTreeEdges(D[O]).length){T=M;if(null==T||T==k.model.getParent(I[O]))T=k.model.getTerminal(R[0],!0);P=this.cloneCell(R[0]);this.addEdge(P,k.getDefaultParent(),T,D[O])}}finally{this.model.endUpdate()}return D};if(null!=g.sidebar){var G=g.sidebar.dropAndConnect;g.sidebar.dropAndConnect=
-function(I,L,Q,P){var V=k.model,W=null;V.beginUpdate();try{if(W=G.apply(this,arguments),c(I))for(var q=0;q<W.length;q++)if(V.isEdge(W[q])&&null==V.getTerminal(W[q],!0)){V.setTerminal(W[q],I,!0);var D=k.getCellGeometry(W[q]);D.points=null;null!=D.getTerminalPoint(!0)&&D.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return W}}var F={88:g.actions.get("selectChildren"),84:g.actions.get("selectSubtree"),80:g.actions.get("selectParent"),83:g.actions.get("selectSiblings")},U=g.onKeyDown;g.onKeyDown=function(I){try{if(k.isEnabled()&&
+function(I,L,Q,P){var V=k.model,W=null;V.beginUpdate();try{if(W=G.apply(this,arguments),c(I))for(var n=0;n<W.length;n++)if(V.isEdge(W[n])&&null==V.getTerminal(W[n],!0)){V.setTerminal(W[n],I,!0);var D=k.getCellGeometry(W[n]);D.points=null;null!=D.getTerminalPoint(!0)&&D.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return W}}var F={88:g.actions.get("selectChildren"),84:g.actions.get("selectSubtree"),80:g.actions.get("selectParent"),83:g.actions.get("selectSiblings")},U=g.onKeyDown;g.onKeyDown=function(I){try{if(k.isEnabled()&&
!k.isEditing()&&c(k.getSelectionCell())&&1==k.getSelectionCount()){var L=null;0<k.getIncomingTreeEdges(k.getSelectionCell()).length&&(9==I.which?L=mxEvent.isShiftDown(I)?A(k.getSelectionCell()):B(k.getSelectionCell()):13==I.which&&(L=C(k.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=L&&0<L.length)1==L.length&&k.model.isEdge(L[0])?k.setSelectionCell(k.model.getTerminal(L[0],!1)):k.setSelectionCell(L[L.length-1]),null!=g.hoverIcons&&g.hoverIcons.update(k.view.getState(k.getSelectionCell())),
-k.startEditingAtCell(k.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var Q=F[I.keyCode];null!=Q&&(Q.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(f(k.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(f(k.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(I)):39==I.keyCode?(f(k.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(f(k.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(I))}}catch(P){g.handleError(P)}mxEvent.isConsumed(I)||U.apply(this,arguments)};var p=k.connectVertex;k.connectVertex=function(I,L,Q,P,V,W,q){var D=k.getIncomingTreeEdges(I);if(c(I)){var M=y(I),T=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST,O=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST;return M==L||0==D.length?B(I,L):T==O?A(I):C(I,L!=mxConstants.DIRECTION_NORTH&&L!=mxConstants.DIRECTION_WEST)}return p.apply(this,arguments)};k.getSubtree=function(I){var L=
-[I];!l(I)&&!c(I)||t(I)||k.traverse(I,!0,function(Q,P){var V=null!=P&&k.isTreeEdge(P);V&&0>mxUtils.indexOf(L,P)&&L.push(P);(null==P||V)&&0>mxUtils.indexOf(L,Q)&&L.push(Q);return null==P||V});return L};var u=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){u.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+k.startEditingAtCell(k.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var Q=F[I.keyCode];null!=Q&&(Q.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(I)):39==I.keyCode?(e(k.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(e(k.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(I))}}catch(P){g.handleError(P)}mxEvent.isConsumed(I)||U.apply(this,arguments)};var p=k.connectVertex;k.connectVertex=function(I,L,Q,P,V,W,n){var D=k.getIncomingTreeEdges(I);if(c(I)){var M=y(I),T=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST,O=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST;return M==L||0==D.length?B(I,L):T==O?A(I):C(I,L!=mxConstants.DIRECTION_NORTH&&L!=mxConstants.DIRECTION_WEST)}return p.apply(this,arguments)};k.getSubtree=function(I){var L=
+[I];!l(I)&&!c(I)||t(I)||k.traverse(I,!0,function(Q,P){var V=null!=P&&k.isTreeEdge(P);V&&0>mxUtils.indexOf(L,P)&&L.push(P);(null==P||V)&&0>mxUtils.indexOf(L,Q)&&L.push(Q);return null==P||V});return L};var v=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){v.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(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;g.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 K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(I){K.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=I?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(I,L){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=e.apply(this,arguments),l=this.graph;return c.concat([this.addEntry("tree container",
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=I?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(I,L){N.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),l=this.graph;return c.concat([this.addEntry("tree container",
function(){var m=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");m.vertex=!0;var t=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.vertex=!0;var y=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
y.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");C.geometry.relative=!0;C.edge=!0;t.insertEdge(C,!0);y.insertEdge(C,!1);m.insert(C);m.insert(t);m.insert(y);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var m=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
m.vertex=!0;var t=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};');t.vertex=!0;var y=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};');
y.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;t.insertEdge(C,!0);y.insertEdge(C,!1);var A=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
A.vertex=!0;var B=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");B.geometry.relative=!0;B.edge=!0;t.insertEdge(B,!0);A.insertEdge(B,!1);var J=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-J.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;t.insertEdge(f,!0);J.insertEdge(f,!1);var g=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;t.insertEdge(k,!0);g.insertEdge(k,!1);m.insert(C);m.insert(B);m.insert(f);m.insert(k);m.insert(t);m.insert(y);m.insert(A);m.insert(J);m.insert(g);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var m=new mxCell("Central Idea",
+J.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;t.insertEdge(e,!0);J.insertEdge(e,!1);var g=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;t.insertEdge(k,!0);g.insertEdge(k,!1);m.insert(C);m.insert(B);m.insert(e);m.insert(k);m.insert(t);m.insert(y);m.insert(A);m.insert(J);m.insert(g);return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var m=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');m.vertex=!0;return sb.createVertexTemplateFromCells([m],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var m=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
m.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.setTerminalPoint(new mxPoint(-40,40),!0);t.geometry.relative=!0;t.edge=!0;m.insertEdge(t,!1);return sb.createVertexTemplateFromCells([m,t],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var m=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
m.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.setTerminalPoint(new mxPoint(-40,40),!0);t.geometry.relative=!0;t.edge=!0;m.insertEdge(t,!1);return sb.createVertexTemplateFromCells([m,t],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree orgchart organization division",function(){var m=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -12929,47 +12942,47 @@ B.geometry.relative=!0;B.edge=!0;t.insertEdge(B,!0);A.insertEdge(B,!1);m.insert(
t.geometry.setTerminalPoint(new mxPoint(0,0),!0);t.geometry.relative=!0;t.edge=!0;m.insertEdge(t,!1);return sb.createVertexTemplateFromCells([m,t],m.geometry.width,m.geometry.height,m.value)}),this.addEntry("tree sub sections",function(){var m=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");m.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
t.geometry.setTerminalPoint(new mxPoint(110,-40),!0);t.geometry.relative=!0;t.edge=!0;m.insertEdge(t,!1);var y=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");y.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");C.geometry.setTerminalPoint(new mxPoint(110,-40),!0);C.geometry.relative=
!0;C.edge=!0;y.insertEdge(C,!1);return sb.createVertexTemplateFromCells([t,C,m,y],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(k,n){if(EditorUi.windowed){var v=k.editor.graph;v.popupMenuHandler.hideMenu();if(null==k.formatWindow){n="1"==urlParams.sketch?Math.max(10,k.diagramContainer.clientWidth-244):Math.max(10,k.diagramContainer.clientWidth-248);var x="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;v="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,v.container.clientHeight-10);k.formatWindow=new WrapperWindow(k,mxResources.get("format"),n,x,240,v,
-function(E){k.createFormat(E).init()});k.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){k.formatWindow.window.fit()}));k.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else k.formatWindow.window.setVisible(null!=n?n:!k.formatWindow.window.isVisible())}else null==k.formatElt&&(k.formatElt=k.createSidebarContainer(),k.createFormat(k.formatElt).init(),k.formatElt.style.border="none",k.formatElt.style.width="240px",k.formatElt.style.borderLeft="1px solid gray",
-k.formatElt.style.right="0px"),v=k.diagramContainer.parentNode,null!=k.formatElt.parentNode?(k.formatElt.parentNode.removeChild(k.formatElt),v.style.right="0px"):(v.parentNode.appendChild(k.formatElt),v.style.right=k.formatElt.style.width)}function d(k,n){function v(G,F){var U=k.menus.get(G);G=z.addMenu(F,mxUtils.bind(this,function(){U.funct.apply(this,arguments)}));G.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;";
-G.className="geTitle";n.appendChild(G);return G}var x=document.createElement("div");x.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;";x.className="geTitle";var E=document.createElement("span");E.style.fontSize="18px";E.style.marginRight="5px";E.innerHTML="+";x.appendChild(E);mxUtils.write(x,mxResources.get("moreShapes"));n.appendChild(x);mxEvent.addListener(x,"click",function(){k.actions.get("shapes").funct()});
-var z=new Menubar(k,n);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?x.style.bottom="0":null!=k.actions.get("newLibrary")?(x=document.createElement("div"),x.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",x.className="geTitle",E=document.createElement("span"),E.style.cssText="position:relative;top:6px;",mxUtils.write(E,mxResources.get("newLibrary")),x.appendChild(E),
-n.appendChild(x),mxEvent.addListener(x,"click",k.actions.get("newLibrary").funct),x=document.createElement("div"),x.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;",x.className="geTitle",E=document.createElement("span"),E.style.cssText="position:relative;top:6px;",mxUtils.write(E,mxResources.get("openLibrary")),x.appendChild(E),n.appendChild(x),mxEvent.addListener(x,
-"click",k.actions.get("openLibrary").funct)):(x=v("newLibrary",mxResources.get("newLibrary")),x.style.boxSizing="border-box",x.style.paddingRight="6px",x.style.paddingLeft="6px",x.style.height="32px",x.style.left="0",x=v("openLibraryFrom",mxResources.get("openLibraryFrom")),x.style.borderLeft="1px solid lightgray",x.style.boxSizing="border-box",x.style.paddingRight="6px",x.style.paddingLeft="6px",x.style.height="32px",x.style.left="50%");n.appendChild(k.sidebar.container);n.style.overflow="hidden"}
-function e(k,n){if(EditorUi.windowed){var v=k.editor.graph;v.popupMenuHandler.hideMenu();if(null==k.sidebarWindow){n=Math.min(v.container.clientWidth-10,218);var x="1"==urlParams.embedInline?650:Math.min(v.container.clientHeight-40,650);k.sidebarWindow=new WrapperWindow(k,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(v.container.clientHeight-x)/2):56,n-6,x-6,function(E){d(k,E)});k.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){k.sidebarWindow.window.fit()}));k.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);k.sidebarWindow.window.setVisible(!0);isLocalStorage&&k.getLocalData("sidebar",function(E){k.sidebar.showEntries(E,null,!0)});k.restoreLibraries()}else k.sidebarWindow.window.setVisible(null!=n?n:!k.sidebarWindow.window.isVisible())}else null==k.sidebarElt&&(k.sidebarElt=k.createSidebarContainer(),d(k,k.sidebarElt),k.sidebarElt.style.border="none",k.sidebarElt.style.width="210px",
-k.sidebarElt.style.borderRight="1px solid gray"),v=k.diagramContainer.parentNode,null!=k.sidebarElt.parentNode?(k.sidebarElt.parentNode.removeChild(k.sidebarElt),v.style.left="0px"):(v.parentNode.appendChild(k.sidebarElt),v.style.left=k.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(k){}Menus.prototype.autoPopup=
+EditorUi.initMinimalTheme=function(){function b(k,q){if(EditorUi.windowed){var u=k.editor.graph;u.popupMenuHandler.hideMenu();if(null==k.formatWindow){q="1"==urlParams.sketch?Math.max(10,k.diagramContainer.clientWidth-244):Math.max(10,k.diagramContainer.clientWidth-248);var x="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;u="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,u.container.clientHeight-10);k.formatWindow=new WrapperWindow(k,mxResources.get("format"),q,x,240,u,
+function(E){k.createFormat(E).init()});k.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){k.formatWindow.window.fit()}));k.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else k.formatWindow.window.setVisible(null!=q?q:!k.formatWindow.window.isVisible())}else null==k.formatElt&&(k.formatElt=k.createSidebarContainer(),k.createFormat(k.formatElt).init(),k.formatElt.style.border="none",k.formatElt.style.width="240px",k.formatElt.style.borderLeft="1px solid gray",
+k.formatElt.style.right="0px"),u=k.diagramContainer.parentNode,null!=k.formatElt.parentNode?(k.formatElt.parentNode.removeChild(k.formatElt),u.style.right="0px"):(u.parentNode.appendChild(k.formatElt),u.style.right=k.formatElt.style.width)}function d(k,q){function u(G,F){var U=k.menus.get(G);G=z.addMenu(F,mxUtils.bind(this,function(){U.funct.apply(this,arguments)}));G.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;";
+G.className="geTitle";q.appendChild(G);return G}var x=document.createElement("div");x.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;";x.className="geTitle";var E=document.createElement("span");E.style.fontSize="18px";E.style.marginRight="5px";E.innerHTML="+";x.appendChild(E);mxUtils.write(x,mxResources.get("moreShapes"));q.appendChild(x);mxEvent.addListener(x,"click",function(){k.actions.get("shapes").funct()});
+var z=new Menubar(k,q);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?x.style.bottom="0":null!=k.actions.get("newLibrary")?(x=document.createElement("div"),x.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",x.className="geTitle",E=document.createElement("span"),E.style.cssText="position:relative;top:6px;",mxUtils.write(E,mxResources.get("newLibrary")),x.appendChild(E),
+q.appendChild(x),mxEvent.addListener(x,"click",k.actions.get("newLibrary").funct),x=document.createElement("div"),x.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;",x.className="geTitle",E=document.createElement("span"),E.style.cssText="position:relative;top:6px;",mxUtils.write(E,mxResources.get("openLibrary")),x.appendChild(E),q.appendChild(x),mxEvent.addListener(x,
+"click",k.actions.get("openLibrary").funct)):(x=u("newLibrary",mxResources.get("newLibrary")),x.style.boxSizing="border-box",x.style.paddingRight="6px",x.style.paddingLeft="6px",x.style.height="32px",x.style.left="0",x=u("openLibraryFrom",mxResources.get("openLibraryFrom")),x.style.borderLeft="1px solid lightgray",x.style.boxSizing="border-box",x.style.paddingRight="6px",x.style.paddingLeft="6px",x.style.height="32px",x.style.left="50%");q.appendChild(k.sidebar.container);q.style.overflow="hidden"}
+function f(k,q){if(EditorUi.windowed){var u=k.editor.graph;u.popupMenuHandler.hideMenu();if(null==k.sidebarWindow){q=Math.min(u.container.clientWidth-10,218);var x="1"==urlParams.embedInline?650:Math.min(u.container.clientHeight-40,650);k.sidebarWindow=new WrapperWindow(k,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(u.container.clientHeight-x)/2):56,q-6,x-6,function(E){d(k,E)});k.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){k.sidebarWindow.window.fit()}));k.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);k.sidebarWindow.window.setVisible(!0);isLocalStorage&&k.getLocalData("sidebar",function(E){k.sidebar.showEntries(E,null,!0)});k.restoreLibraries()}else k.sidebarWindow.window.setVisible(null!=q?q:!k.sidebarWindow.window.isVisible())}else null==k.sidebarElt&&(k.sidebarElt=k.createSidebarContainer(),d(k,k.sidebarElt),k.sidebarElt.style.border="none",k.sidebarElt.style.width="210px",
+k.sidebarElt.style.borderRight="1px solid gray"),u=k.diagramContainer.parentNode,null!=k.sidebarElt.parentNode?(k.sidebarElt.parentNode.removeChild(k.sidebarElt),u.style.left="0px"):(u.parentNode.appendChild(k.sidebarElt),u.style.left=k.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(k){}Menus.prototype.autoPopup=
!1;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;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var l=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");l.apply(this,arguments)};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var t=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(k,n){null!=n.shortcut&&900>c&&!mxClient.IS_IOS?k.firstChild.nextSibling.setAttribute("title",n.shortcut):t.apply(this,arguments)};var y=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(k,n,v){var x=this.editorUi.editor.graph;k.smartSeparators=!0;y.apply(this,arguments);"1"==urlParams.sketch?x.isEnabled()&&(k.addSeparator(),1==x.getSelectionCount()&&this.addMenuItems(k,
-["-","lockUnlock"],null,v)):1==x.getSelectionCount()?(x.isCellFoldable(x.getSelectionCell())&&this.addMenuItems(k,x.isCellCollapsed(n)?["expand"]:["collapse"],null,v),this.addMenuItems(k,["collapsible","-","lockUnlock","enterGroup"],null,v),k.addSeparator(),this.addSubmenu("layout",k)):x.isSelectionEmpty()&&x.isEnabled()?(k.addSeparator(),this.addMenuItems(k,["editData"],null,v),k.addSeparator(),this.addSubmenu("layout",k),this.addSubmenu("insert",k),this.addMenuItems(k,["-","exitGroup"],null,v)):
-x.isEnabled()&&this.addMenuItems(k,["-","lockUnlock"],null,v)};var C=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(k,n,v){C.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(k,["copyAsImage"],null,v)};EditorUi.prototype.toggleFormatPanel=function(k){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=k?k:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=
-this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var A=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();A.apply(this,arguments)};var B=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(k){B.apply(this,arguments);if(k){var n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=n&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&
-this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=n||"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 J=Menus.prototype.init;Menus.prototype.init=function(){J.apply(this,arguments);var k=this.editorUi,n=k.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),
-function(z){k.setPagesVisible(!Editor.pagesVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return Editor.pagesVisible});k.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){e(k)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!k.isOffline()&&k.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var z=new ParseDialog(k,mxResources.get("plantUml")+"...","plantUml");k.showDialog(z.container,620,420,!0,!1);z.init()}));
-k.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var z=new ParseDialog(k,mxResources.get("mermaid")+"...","mermaid");k.showDialog(z.container,620,420,!0,!1);z.init()}));var v=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(z,G){var F=this.editorUi.editor.graph,U=F.getSelectionCell();v.call(this,z,U,null,G);this.addMenuItems(z,["editTooltip"],G);F.model.isVertex(U)&&this.addMenuItems(z,["editGeometry"],G);this.addMenuItems(z,["-",
+this.getCurrentFile()||"1"==urlParams.embed)};var t=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(k,q){null!=q.shortcut&&900>c&&!mxClient.IS_IOS?k.firstChild.nextSibling.setAttribute("title",q.shortcut):t.apply(this,arguments)};var y=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(k,q,u){var x=this.editorUi.editor.graph;k.smartSeparators=!0;y.apply(this,arguments);"1"==urlParams.sketch?x.isEnabled()&&(k.addSeparator(),1==x.getSelectionCount()&&this.addMenuItems(k,
+["-","lockUnlock"],null,u)):1==x.getSelectionCount()?(x.isCellFoldable(x.getSelectionCell())&&this.addMenuItems(k,x.isCellCollapsed(q)?["expand"]:["collapse"],null,u),this.addMenuItems(k,["collapsible","-","lockUnlock","enterGroup"],null,u),k.addSeparator(),this.addSubmenu("layout",k)):x.isSelectionEmpty()&&x.isEnabled()?(k.addSeparator(),this.addMenuItems(k,["editData"],null,u),k.addSeparator(),this.addSubmenu("layout",k),this.addSubmenu("insert",k),this.addMenuItems(k,["-","exitGroup"],null,u)):
+x.isEnabled()&&this.addMenuItems(k,["-","lockUnlock"],null,u)};var C=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(k,q,u){C.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(k,["copyAsImage"],null,u)};EditorUi.prototype.toggleFormatPanel=function(k){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=k?k:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=
+this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var A=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();A.apply(this,arguments)};var B=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(k){B.apply(this,arguments);if(k){var q=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=q&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&
+this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=q||"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 J=Menus.prototype.init;Menus.prototype.init=function(){J.apply(this,arguments);var k=this.editorUi,q=k.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),
+function(z){k.setPagesVisible(!Editor.pagesVisible)}));q.setToggleAction(!0);q.setSelectedCallback(function(){return Editor.pagesVisible});k.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){f(k)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!k.isOffline()&&k.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var z=new ParseDialog(k,mxResources.get("plantUml")+"...","plantUml");k.showDialog(z.container,620,420,!0,!1);z.init()}));
+k.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var z=new ParseDialog(k,mxResources.get("mermaid")+"...","mermaid");k.showDialog(z.container,620,420,!0,!1);z.init()}));var u=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(z,G){var F=this.editorUi.editor.graph,U=F.getSelectionCell();u.call(this,z,U,null,G);this.addMenuItems(z,["editTooltip"],G);F.model.isVertex(U)&&this.addMenuItems(z,["editGeometry"],G);this.addMenuItems(z,["-",
"edit"],G)})));this.addPopupMenuCellEditItems=function(z,G,F,U){z.addSeparator();this.addSubmenu("editCell",z,U,mxResources.get("edit"))};var x="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),E=function(z,G,F,U){z.addItem(F,null,mxUtils.bind(this,function(){var p=new CreateGraphDialog(k,F,U);k.showDialog(p.container,620,420,!0,!1);p.init()}),G)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(z,G){for(var F=0;F<x.length;F++)"-"==x[F]?
-z.addSeparator(G):E(z,G,mxResources.get(x[F])+"...",x[F])})))};EditorUi.prototype.installFormatToolbar=function(k){var n=this.editor.graph,v=document.createElement("div");v.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%;";n.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(x,E){0<n.getSelectionCount()?(k.appendChild(v),v.innerHTML=
-"Selected: "+n.getSelectionCount()):null!=v.parentNode&&v.parentNode.removeChild(v)}))};var f=!1;EditorUi.prototype.initFormatWindow=function(){if(!f&&null!=this.formatWindow){f=!0;var k=this.formatWindow.window.toggleMinimized,n=240;this.formatWindow.window.toggleMinimized=function(){k.apply(this,arguments);this.minimized?(n=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+n-140+"px"):(this.div.style.width=
-n+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-n+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(v){mxEvent.getSource(v)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){function k(ha,fa,wa){var ja=z.menus.get(ha),ma=p.addMenu(mxResources.get(ha),mxUtils.bind(this,function(){ja.funct.apply(this,
+z.addSeparator(G):E(z,G,mxResources.get(x[F])+"...",x[F])})))};EditorUi.prototype.installFormatToolbar=function(k){var q=this.editor.graph,u=document.createElement("div");u.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%;";q.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(x,E){0<q.getSelectionCount()?(k.appendChild(u),u.innerHTML=
+"Selected: "+q.getSelectionCount()):null!=u.parentNode&&u.parentNode.removeChild(u)}))};var e=!1;EditorUi.prototype.initFormatWindow=function(){if(!e&&null!=this.formatWindow){e=!0;var k=this.formatWindow.window.toggleMinimized,q=240;this.formatWindow.window.toggleMinimized=function(){k.apply(this,arguments);this.minimized?(q=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+q-140+"px"):(this.div.style.width=
+q+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-q+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(u){mxEvent.getSource(u)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){function k(ha,fa,wa){var ja=z.menus.get(ha),ma=p.addMenu(mxResources.get(ha),mxUtils.bind(this,function(){ja.funct.apply(this,
arguments)}),U);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(ha));z.menus.menuCreated(ja,ma,"geMenuItem");null!=wa?(ma.style.backgroundImage="url("+wa+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",
-ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerText=""):fa||(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 n(ha,fa,wa,ja,ma,sa){var oa=document.createElement("a");oa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing="border-box";oa.style.height="30px";oa.style.padding=
+ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerText=""):fa||(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 q(ha,fa,wa,ja,ma,sa){var oa=document.createElement("a");oa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing="border-box";oa.style.height="30px";oa.style.padding=
"6px";oa.style.position="relative";oa.style.verticalAlign="top";oa.style.top="0px";"1"==urlParams.sketch&&(oa.style.borderStyle="none",oa.style.boxShadow="none",oa.style.padding="6px",oa.style.margin="0px");null!=z.statusContainer?F.insertBefore(oa,z.statusContainer):F.appendChild(oa);null!=sa?(oa.style.backgroundImage="url("+sa+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat="no-repeat",oa.style.backgroundSize="24px 24px",oa.style.width="34px"):mxUtils.write(oa,ha);mxEvent.addListener(oa,
mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(pa){pa.preventDefault()}));mxEvent.addListener(oa,"click",function(pa){"disabled"!=oa.getAttribute("disabled")&&fa(pa);mxEvent.consume(pa)});null==wa&&(oa.style.marginRight="4px");null!=ja&&oa.setAttribute("title",ja);null!=ma&&(ha=function(){ma.isEnabled()?(oa.removeAttribute("disabled"),oa.style.cursor="pointer"):(oa.setAttribute("disabled","disabled"),oa.style.cursor="default")},ma.addListener("stateChanged",ha),G.addListener("enabledChanged",
-ha),ha());return oa}function v(ha,fa,wa){wa=document.createElement("div");wa.className="geMenuItem";wa.style.display="inline-block";wa.style.verticalAlign="top";wa.style.marginRight="6px";wa.style.padding="0 4px 0 4px";wa.style.height="30px";wa.style.position="relative";wa.style.top="0px";"1"==urlParams.sketch&&(wa.style.boxShadow="none");for(var ja=0;ja<ha.length;ja++)null!=ha[ja]&&("1"==urlParams.sketch&&(ha[ja].style.padding="10px 8px",ha[ja].style.width="30px"),ha[ja].style.margin="0px",ha[ja].style.boxShadow=
+ha),ha());return oa}function u(ha,fa,wa){wa=document.createElement("div");wa.className="geMenuItem";wa.style.display="inline-block";wa.style.verticalAlign="top";wa.style.marginRight="6px";wa.style.padding="0 4px 0 4px";wa.style.height="30px";wa.style.position="relative";wa.style.top="0px";"1"==urlParams.sketch&&(wa.style.boxShadow="none");for(var ja=0;ja<ha.length;ja++)null!=ha[ja]&&("1"==urlParams.sketch&&(ha[ja].style.padding="10px 8px",ha[ja].style.width="30px"),ha[ja].style.margin="0px",ha[ja].style.boxShadow=
"none",wa.appendChild(ha[ja]));null!=fa&&mxUtils.setOpacity(wa,fa);null!=z.statusContainer&&"1"!=urlParams.sketch?F.insertBefore(wa,z.statusContainer):F.appendChild(wa);return wa}function x(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(P.style.left=58>Q.offsetTop-Q.offsetHeight/2?"70px":"10px");else{for(var ha=F.firstChild;null!=ha;){var fa=ha.nextSibling;"geMenuItem"!=ha.className&&"geItem"!=ha.className||ha.parentNode.removeChild(ha);ha=fa}U=F.firstChild;c=window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth;ha=1E3>c||"1"==urlParams.sketch;var wa=null;ha||(wa=k("diagram"));fa=ha?k("diagram",null,Editor.menuImage):null;null!=fa&&(wa=fa);v([wa,n(mxResources.get("shapes"),z.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),z.actions.get("image"),ha?Editor.shapesImage:null),n(mxResources.get("format"),z.actions.get("format").funct,null,mxResources.get("format")+" ("+z.actions.get("format").shortcut+")",z.actions.get("image"),ha?Editor.formatImage:null)],ha?60:null);
-fa=k("insert",!0,ha?I:null);v([fa,n(mxResources.get("delete"),z.actions.get("delete").funct,null,mxResources.get("delete"),z.actions.get("delete"),ha?Editor.trashImage:null)],ha?60:null);411<=c&&(v([Z,ia],60),520<=c&&v([Na,640<=c?n("",X.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",X,Editor.zoomInImage):null,640<=c?n("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Y,Editor.zoomOutImage):null],60))}null!=wa&&(mxEvent.disableContextMenu(wa),mxEvent.addGestureListeners(wa,
+document.body.clientWidth;ha=1E3>c||"1"==urlParams.sketch;var wa=null;ha||(wa=k("diagram"));fa=ha?k("diagram",null,Editor.menuImage):null;null!=fa&&(wa=fa);u([wa,q(mxResources.get("shapes"),z.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),z.actions.get("image"),ha?Editor.shapesImage:null),q(mxResources.get("format"),z.actions.get("format").funct,null,mxResources.get("format")+" ("+z.actions.get("format").shortcut+")",z.actions.get("image"),ha?Editor.formatImage:null)],ha?60:null);
+fa=k("insert",!0,ha?I:null);u([fa,q(mxResources.get("delete"),z.actions.get("delete").funct,null,mxResources.get("delete"),z.actions.get("delete"),ha?Editor.trashImage:null)],ha?60:null);411<=c&&(u([Z,ia],60),520<=c&&u([Na,640<=c?q("",X.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",X,Editor.zoomInImage):null,640<=c?q("",Y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Y,Editor.zoomOutImage):null],60))}null!=wa&&(mxEvent.disableContextMenu(wa),mxEvent.addGestureListeners(wa,
mxUtils.bind(this,function(ja){(mxEvent.isShiftDown(ja)||mxEvent.isAltDown(ja)||mxEvent.isMetaDown(ja)||mxEvent.isControlDown(ja)||mxEvent.isPopupTrigger(ja))&&z.appIconClicked(ja)}),null,null));fa=z.menus.get("language");null!=fa&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==Ba&&(fa=p.addMenu("",fa.funct),fa.setAttribute("title","language"),fa.className="geToolbarButton",fa.style.backgroundImage="url("+Editor.globeImage+")",fa.style.backgroundPosition=
"center center",fa.style.backgroundRepeat="no-repeat",fa.style.backgroundSize="22px 22px",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="12px",F.appendChild(fa),Ba=fa),z.buttonContainer.style.paddingRight="34px"):(z.buttonContainer.style.paddingRight="0px",null!=Ba&&(Ba.parentNode.removeChild(Ba),Ba=null))}g.apply(this,arguments);var E=document.createElement("div");E.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
-E.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(E);"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"])e(this,
+E.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(E);"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 z=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==z.embedViewport)mxUtils.fit(this.div);else{var ha=parseInt(this.div.offsetLeft),fa=parseInt(this.div.offsetWidth),wa=z.embedViewport.x+z.embedViewport.width,ja=parseInt(this.div.offsetTop),ma=parseInt(this.div.offsetHeight),sa=z.embedViewport.y+
z.embedViewport.height;this.div.style.left=Math.max(z.embedViewport.x,Math.min(ha,wa-fa))+"px";this.div.style.top=Math.max(z.embedViewport.y,Math.min(ja,sa-ma))+"px";this.div.style.height=Math.min(z.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(z.embedViewport.width,parseInt(this.div.style.width))+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),E=window.innerHeight||
document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>E)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));z=this;var G=z.editor.graph;z.toolbar=this.createToolbar(z.createDiv("geToolbar"));z.defaultLibraryName=mxResources.get("untitledLibrary");var F=document.createElement("div");F.className="geMenubarContainer";var U=null,p=new Menubar(z,F);z.statusContainer=z.createStatusContainer();
-z.statusContainer.style.position="relative";z.statusContainer.style.maxWidth="";z.statusContainer.style.color="gray";z.statusContainer.style.cursor="default";var u=z.hideCurrentMenu;z.hideCurrentMenu=function(){u.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var H=z.descriptorChanged;z.descriptorChanged=function(){H.apply(this,arguments);var ha=z.getCurrentFile();if(null!=ha&&null!=ha.getTitle()){var fa=ha.getMode();"google"==fa?fa="googleDrive":"github"==fa?fa="gitHub":"gitlab"==
+z.statusContainer.style.position="relative";z.statusContainer.style.maxWidth="";z.statusContainer.style.color="gray";z.statusContainer.style.cursor="default";var v=z.hideCurrentMenu;z.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var H=z.descriptorChanged;z.descriptorChanged=function(){H.apply(this,arguments);var ha=z.getCurrentFile();if(null!=ha&&null!=ha.getTitle()){var fa=ha.getMode();"google"==fa?fa="googleDrive":"github"==fa?fa="gitHub":"gitlab"==
fa?fa="gitLab":"onedrive"==fa&&(fa="oneDrive");fa=mxResources.get(fa);F.setAttribute("title",ha.getTitle()+(null!=fa?" ("+fa+")":""))}else F.removeAttribute("title")};z.setStatusText(z.editor.getStatus());F.appendChild(z.statusContainer);z.buttonContainer=document.createElement("div");z.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";F.appendChild(z.buttonContainer);z.menubarContainer=z.buttonContainer;
z.tabContainer=document.createElement("div");z.tabContainer.className="geTabContainer";z.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";E=z.diagramContainer.parentNode;var K=document.createElement("div");K.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";z.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){K.style.top=
"20px";z.titlebar=document.createElement("div");z.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var N=document.createElement("div");N.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;";z.titlebar.appendChild(N);E.appendChild(z.titlebar)}var I="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,
@@ -12977,8 +12990,8 @@ L="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sket
" "+z.diagramContainer.style.height),z.diagramContainer.style.top="0px",z.diagramContainer.style.left="0px",z.diagramContainer.style.bottom="0px",z.diagramContainer.style.right="0px",z.diagramContainer.style.width="",z.diagramContainer.style.height="";else{var ha=z.diagramContainer.getAttribute("data-bounds");if(null!=ha){z.diagramContainer.style.background="transparent";z.diagramContainer.removeAttribute("data-bounds");var fa=G.getGraphBounds();ha=ha.split(" ");z.diagramContainer.style.top=ha[0];
z.diagramContainer.style.left=ha[1];z.diagramContainer.style.width=fa.width+50+"px";z.diagramContainer.style.height=fa.height+46+"px";z.diagramContainer.style.bottom="";z.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:z.diagramContainer.getBoundingClientRect()}),"*");z.refresh()}P.style.left=z.diagramContainer.offsetLeft+"px";P.style.top=z.diagramContainer.offsetTop-P.offsetHeight-4+"px";Q.style.display="";Q.style.left=z.diagramContainer.offsetLeft-
Q.offsetWidth-4+"px";Q.style.top=z.diagramContainer.offsetTop+"px";L.style.left=z.diagramContainer.offsetLeft+z.diagramContainer.offsetWidth-L.offsetWidth+"px";L.style.top=P.style.top;L.style.right="";z.bottomResizer.style.left=z.diagramContainer.offsetLeft+(z.diagramContainer.offsetWidth-z.bottomResizer.offsetWidth)/2+"px";z.bottomResizer.style.top=z.diagramContainer.offsetTop+z.diagramContainer.offsetHeight-z.bottomResizer.offsetHeight/2-1+"px";z.rightResizer.style.left=z.diagramContainer.offsetLeft+
-z.diagramContainer.offsetWidth-z.rightResizer.offsetWidth/2-1+"px";z.rightResizer.style.top=z.diagramContainer.offsetTop+(z.diagramContainer.offsetHeight-z.bottomResizer.offsetHeight)/2+"px"}z.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";z.rightResizer.style.visibility=z.bottomResizer.style.visibility;F.style.display="none";P.style.visibility="";L.style.visibility=""});N=z.actions.get("fullscreen");var W=n("",N.funct,null,mxResources.get(""),N,Editor.fullscreenImage),q=mxUtils.bind(this,
-function(){W.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";V()});N=mxUtils.bind(this,function(){b(z,!0);z.initFormatWindow();var ha=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ha.x+ha.width+4,ha.y);q()});z.addListener("inlineFullscreenChanged",q);z.addListener("editInlineStart",
+z.diagramContainer.offsetWidth-z.rightResizer.offsetWidth/2-1+"px";z.rightResizer.style.top=z.diagramContainer.offsetTop+(z.diagramContainer.offsetHeight-z.bottomResizer.offsetHeight)/2+"px"}z.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";z.rightResizer.style.visibility=z.bottomResizer.style.visibility;F.style.display="none";P.style.visibility="";L.style.visibility=""});N=z.actions.get("fullscreen");var W=q("",N.funct,null,mxResources.get(""),N,Editor.fullscreenImage),n=mxUtils.bind(this,
+function(){W.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";V()});N=mxUtils.bind(this,function(){b(z,!0);z.initFormatWindow();var ha=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ha.x+ha.width+4,ha.y);n()});z.addListener("inlineFullscreenChanged",n);z.addListener("editInlineStart",
N);"1"==urlParams.embedInline&&z.addListener("darkModeChanged",N);z.addListener("editInlineStop",mxUtils.bind(this,function(ha){z.diagramContainer.style.width="10px";z.diagramContainer.style.height="10px";z.diagramContainer.style.border="";z.bottomResizer.style.visibility="hidden";z.rightResizer.style.visibility="hidden";P.style.visibility="hidden";L.style.visibility="hidden";Q.style.display="none"}));if(null!=z.hoverIcons){var D=z.hoverIcons.update;z.hoverIcons.update=function(){G.freehand.isDrawing()||
D.apply(this,arguments)}}if(null!=G.freehand){var M=G.freehand.createStyle;G.freehand.createStyle=function(ha){return M.apply(this,arguments)+"sketch=0;"}}z.editor.addListener("statusChanged",mxUtils.bind(this,function(){z.setStatusText(z.editor.getStatus())}));z.setStatusText(z.editor.getStatus());if("1"==urlParams.sketch){Q.className="geToolbarContainer";L.className="geToolbarContainer";P.className="geToolbarContainer";F.className="geToolbarContainer";z.picker=Q;z.sketchPickerMenuElt=Q;"1"!=urlParams.embed&&
"atlassian"!=this.getServiceName()&&z.installStatusMinimizer();ca=k("diagram",null,Editor.menuImage);ca.style.boxShadow="none";ca.style.padding="6px";ca.style.margin="0px";P.appendChild(ca);mxEvent.disableContextMenu(ca);mxEvent.addGestureListeners(ca,mxUtils.bind(this,function(ha){(mxEvent.isShiftDown(ha)||mxEvent.isAltDown(ha)||mxEvent.isMetaDown(ha)||mxEvent.isControlDown(ha)||mxEvent.isPopupTrigger(ha))&&this.appIconClicked(ha)}),null,null);z.statusContainer.style.position="";z.statusContainer.style.display=
@@ -12988,17 +13001,17 @@ wa);fa.style.cursor=null!=ja?ja:"default";fa.style.margin="2px 0px";Q.appendChil
mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ha(z.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")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ha(z.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ha(z.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var fa=new mxCell("",new mxGeometry(0,0,G.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");fa.geometry.setTerminalPoint(new mxPoint(0,0),!0);fa.geometry.setTerminalPoint(new mxPoint(fa.geometry.width,
0),!1);fa.geometry.points=[];fa.geometry.relative=!0;fa.edge=!0;ha(z.sidebar.createEdgeTemplateFromCells([fa],fa.geometry.width,fa.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");fa=fa.clone();fa.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";fa.geometry.width=G.defaultEdgeLength+20;fa.geometry.setTerminalPoint(new mxPoint(0,20),!0);fa.geometry.setTerminalPoint(new mxPoint(fa.geometry.width,
-20),!1);ha(z.sidebar.createEdgeTemplateFromCells([fa],fa.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(fa,wa,ja,ma){fa=n("",fa.funct,null,wa,fa,ja);fa.style.width="40px";fa.style.height="34px";fa.style.opacity="0.7";return ha(fa,null,"pointer",ma)})(z.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");ca=k("insert",null,Editor.plusImage);ca.style.boxShadow="none";ca.style.opacity="0.7";ca.style.padding="6px";
+20),!1);ha(z.sidebar.createEdgeTemplateFromCells([fa],fa.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(fa,wa,ja,ma){fa=q("",fa.funct,null,wa,fa,ja);fa.style.width="40px";fa.style.height="34px";fa.style.opacity="0.7";return ha(fa,null,"pointer",ma)})(z.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");ca=k("insert",null,Editor.plusImage);ca.style.boxShadow="none";ca.style.opacity="0.7";ca.style.padding="6px";
ca.style.margin="0px";ca.style.height="34px";ca.style.width="37px";ha(ca,null,"pointer")}"1"!=urlParams.embedInline&&Q.appendChild(T)});mxEvent.addListener(T,"click",mxUtils.bind(this,function(){O?(mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, -50%)"),Q.style.padding="8px 6px 4px",Q.style.top="50%",Q.style.bottom="",Q.style.height="",T.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",T.style.width="40px",T.style.height="12px",T.setAttribute("title","Minimize"),O=!1,
R()):(Q.innerText="",Q.appendChild(T),mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, 0)"),Q.style.top="",Q.style.bottom="12px",Q.style.padding="0px",Q.style.height="24px",T.style.height="24px",T.style.backgroundImage="url("+Editor.plusImage+")",T.setAttribute("title",mxResources.get("insert")),T.style.width="24px",O=!0)}));R();z.addListener("darkModeChanged",R);z.addListener("sketchModeChanged",R)}N=z.menus.get("viewZoom");if(null!=N){var S=function(ha){if(mxEvent.isAltDown(ha))z.hideCurrentMenu(),
-z.actions.get("customZoom").funct(),mxEvent.consume(ha);else if("geItem"!=mxEvent.getSource(ha).className||mxEvent.isShiftDown(ha))z.hideCurrentMenu(),z.actions.get("smartFit").funct(),mxEvent.consume(ha)},X=z.actions.get("zoomIn"),Y=z.actions.get("zoomOut"),aa=z.actions.get("resetView"),ba=z.actions.get("undo"),da=z.actions.get("redo"),Z=n("",ba.funct,null,mxResources.get("undo")+" ("+ba.shortcut+")",ba,Editor.undoImage),ia=n("",da.funct,null,mxResources.get("redo")+" ("+da.shortcut+")",da,Editor.redoImage);
-if(null!=L){aa=function(){ua.style.display=null!=z.pages&&("0"!=urlParams.pages||1<z.pages.length||Editor.pagesVisible)?"inline-block":"none"};var ea=function(){ua.innerText="";if(null!=z.currentPage){mxUtils.write(ua,z.currentPage.getName());var ha=null!=z.pages?z.pages.length:1,fa=z.getPageIndex(z.currentPage);fa=null!=fa?fa+1:1;var wa=z.currentPage.getId();ua.setAttribute("title",z.currentPage.getName()+" ("+fa+"/"+ha+")"+(null!=wa?" ["+wa+"]":""))}},va=z.actions.get("delete"),za=n("",va.funct,
+z.actions.get("customZoom").funct(),mxEvent.consume(ha);else if("geItem"!=mxEvent.getSource(ha).className||mxEvent.isShiftDown(ha))z.hideCurrentMenu(),z.actions.get("smartFit").funct(),mxEvent.consume(ha)},X=z.actions.get("zoomIn"),Y=z.actions.get("zoomOut"),aa=z.actions.get("resetView"),ba=z.actions.get("undo"),da=z.actions.get("redo"),Z=q("",ba.funct,null,mxResources.get("undo")+" ("+ba.shortcut+")",ba,Editor.undoImage),ia=q("",da.funct,null,mxResources.get("redo")+" ("+da.shortcut+")",da,Editor.redoImage);
+if(null!=L){aa=function(){ua.style.display=null!=z.pages&&("0"!=urlParams.pages||1<z.pages.length||Editor.pagesVisible)?"inline-block":"none"};var ea=function(){ua.innerText="";if(null!=z.currentPage){mxUtils.write(ua,z.currentPage.getName());var ha=null!=z.pages?z.pages.length:1,fa=z.getPageIndex(z.currentPage);fa=null!=fa?fa+1:1;var wa=z.currentPage.getId();ua.setAttribute("title",z.currentPage.getName()+" ("+fa+"/"+ha+")"+(null!=wa?" ["+wa+"]":""))}},va=z.actions.get("delete"),za=q("",va.funct,
null,mxResources.get("delete"),va,Editor.trashImage);za.style.opacity="0.3";P.appendChild(za);va.addListener("stateChanged",function(){za.style.opacity=va.enabled?"":"0.3"});var ya=function(){Z.style.display=0<z.editor.undoManager.history.length||G.isEditing()?"inline-block":"none";ia.style.display=Z.style.display;Z.style.opacity=ba.enabled?"":"0.3";ia.style.opacity=da.enabled?"":"0.3"};P.appendChild(Z);P.appendChild(ia);ba.addListener("stateChanged",ya);da.addListener("stateChanged",ya);ya();var ua=
-this.createPageMenuTab(!1,!0);ua.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";L.appendChild(ua);z.editor.addListener("pagesPatched",ea);z.editor.addListener("pageSelected",ea);z.editor.addListener("pageRenamed",ea);z.editor.addListener("fileLoaded",ea);ea();z.addListener("fileDescriptorChanged",aa);z.addListener("pagesVisibleChanged",aa);z.editor.addListener("pagesPatched",aa);aa();aa=n("",Y.funct,!0,mxResources.get("zoomOut")+
+this.createPageMenuTab(!1,!0);ua.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";L.appendChild(ua);z.editor.addListener("pagesPatched",ea);z.editor.addListener("pageSelected",ea);z.editor.addListener("pageRenamed",ea);z.editor.addListener("fileLoaded",ea);ea();z.addListener("fileDescriptorChanged",aa);z.addListener("pagesVisibleChanged",aa);z.editor.addListener("pagesPatched",aa);aa();aa=q("",Y.funct,!0,mxResources.get("zoomOut")+
" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Y,Editor.zoomOutImage);L.appendChild(aa);var ca=p.addMenu("100%",N.funct);ca.setAttribute("title",mxResources.get("zoom"));ca.innerHTML="100%";ca.style.display="inline-block";ca.style.color="inherit";ca.style.cursor="pointer";ca.style.textAlign="center";ca.style.whiteSpace="nowrap";ca.style.paddingRight="10px";ca.style.textDecoration="none";ca.style.verticalAlign="top";ca.style.padding="6px 0";ca.style.fontSize="14px";ca.style.width="40px";L.appendChild(ca);
-N=n("",X.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",X,Editor.zoomInImage);L.appendChild(N);"1"==urlParams.embedInline?(L.appendChild(W),N=z.actions.get("exit"),L.appendChild(n("",N.funct,null,mxResources.get("exit"),N,Editor.closeImage))):W.parentNode.removeChild(W);z.tabContainer.style.visibility="hidden";F.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+N=q("",X.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",X,Editor.zoomInImage);L.appendChild(N);"1"==urlParams.embedInline?(L.appendChild(W),N=z.actions.get("exit"),L.appendChild(q("",N.funct,null,mxResources.get("exit"),N,Editor.closeImage))):W.parentNode.removeChild(W);z.tabContainer.style.visibility="hidden";F.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
P.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;";L.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";K.appendChild(P);K.appendChild(L);Q.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&&(Q.style.touchAction="none");K.appendChild(Q);window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(K)}else{var Na=n("",S,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",aa,Editor.zoomFitImage);F.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";ca=p.addMenu("100%",
+mxClient.IS_POINTER&&(Q.style.touchAction="none");K.appendChild(Q);window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(K)}else{var Na=q("",S,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",aa,Editor.zoomFitImage);F.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";ca=p.addMenu("100%",
N.funct);ca.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ca.style.whiteSpace="nowrap";ca.style.paddingRight="10px";ca.style.textDecoration="none";ca.style.textDecoration="none";ca.style.overflow="hidden";ca.style.visibility="hidden";ca.style.textAlign="center";ca.style.cursor="pointer";ca.style.height=parseInt(z.tabContainerHeight)-1+"px";ca.style.lineHeight=parseInt(z.tabContainerHeight)+1+"px";ca.style.position="absolute";ca.style.display="block";ca.style.fontSize="12px";ca.style.width=
"59px";ca.style.right="0px";ca.style.bottom="0px";ca.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ca.style.backgroundPosition="right 6px center";ca.style.backgroundRepeat="no-repeat";K.appendChild(ca)}(function(ha){mxEvent.addListener(ha,"click",S);var fa=mxUtils.bind(this,function(){ha.innerText="";mxUtils.write(ha,Math.round(100*z.editor.graph.view.scale)+"%")});z.editor.graph.view.addListener(mxEvent.EVENT_SCALE,fa);z.editor.addListener("resetGraphView",fa);z.editor.addListener("pageSelected",
fa)})(ca);var Ka=z.setGraphEnabled;z.setGraphEnabled=function(){Ka.apply(this,arguments);null!=this.tabContainer&&(ca.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==L?this.tabContainerHeight+"px":"0px")}}K.appendChild(F);K.appendChild(z.diagramContainer);E.appendChild(K);z.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==L&&K.appendChild(z.tabContainer);
@@ -13007,61 +13020,61 @@ urlParams.embedInline){document.body.style.cursor="text";Q.style.transform="";mx
"row-resize";z.diagramContainer.parentNode.appendChild(E);z.bottomResizer=E;var Fa=null,na=null,Ja=null,ra=null;mxEvent.addGestureListeners(E,function(ha){ra=parseInt(z.diagramContainer.style.height);na=mxEvent.getClientY(ha);G.popupMenuHandler.hideMenu();mxEvent.consume(ha)});E=E.cloneNode(!1);E.style.cursor="col-resize";z.diagramContainer.parentNode.appendChild(E);z.rightResizer=E;mxEvent.addGestureListeners(E,function(ha){Ja=parseInt(z.diagramContainer.style.width);Fa=mxEvent.getClientX(ha);G.popupMenuHandler.hideMenu();
mxEvent.consume(ha)});mxEvent.addGestureListeners(document.body,null,function(ha){var fa=!1;null!=Fa&&(z.diagramContainer.style.width=Math.max(20,Ja+mxEvent.getClientX(ha)-Fa)+"px",fa=!0);null!=na&&(z.diagramContainer.style.height=Math.max(20,ra+mxEvent.getClientY(ha)-na)+"px",fa=!0);fa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:z.diagramContainer.getBoundingClientRect()}),"*"),V(),z.refresh())},function(ha){null==Fa&&null==
na||mxEvent.consume(ha);na=Fa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";z.bottomResizer.style.visibility="hidden";z.rightResizer.style.visibility="hidden";P.style.visibility="hidden";L.style.visibility="hidden";Q.style.display="none"}"1"==urlParams.prefetchFonts&&z.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,m,t){var y=l.y,C=l.x,A=!1,B=!1;if(null!=this.states&&null!=c&&null!=l){var J=this,f=new mxCellState,g=this.graph.getView().scale,k=Math.max(2,this.getGuideTolerance()/2);f.x=c.x+C;f.y=c.y+y;f.width=c.width;f.height=c.height;for(var n=[],v=[],x=0;x<this.states.length;x++){var E=this.states[x];E instanceof mxCellState&&(t||!this.graph.isCellSelected(E.cell))&&((f.x>=E.x&&f.x<=E.x+E.width||E.x>=f.x&&E.x<=f.x+f.width)&&(f.y>
-E.y+E.height+4||f.y+f.height+4<E.y)?n.push(E):(f.y>=E.y&&f.y<=E.y+E.height||E.y>=f.y&&E.y<=f.y+f.height)&&(f.x>E.x+E.width+4||f.x+f.width+4<E.x)&&v.push(E))}var z=0,G=0,F=E=0,U=0,p=0,u=0,H=0,K=5*g;if(1<n.length){n.push(f);n.sort(function(Q,P){return Q.y-P.y});var N=!1;x=f==n[0];g=f==n[n.length-1];if(!x&&!g)for(x=1;x<n.length-1;x++)if(f==n[x]){g=n[x-1];x=n[x+1];E=G=F=(x.y-g.y-g.height-f.height)/2;break}for(x=0;x<n.length-1;x++){g=n[x];var I=n[x+1],L=f==g||f==I;I=I.y-g.y-g.height;N|=f==g;if(0==G&&0==
-z)G=I,z=1;else if(Math.abs(G-I)<=(L||1==x&&N?k:0))z+=1;else if(1<z&&N){n=n.slice(0,x+1);break}else if(3<=n.length-x&&!N)z=0,E=G=0!=F?F:0,n.splice(0,0==x?1:x),x=-1;else break;0!=E||L||(G=E=I)}3==n.length&&n[1]==f&&(E=0)}if(1<v.length){v.push(f);v.sort(function(Q,P){return Q.x-P.x});N=!1;x=f==v[0];g=f==v[v.length-1];if(!x&&!g)for(x=1;x<v.length-1;x++)if(f==v[x]){g=v[x-1];x=v[x+1];u=p=H=(x.x-g.x-g.width-f.width)/2;break}for(x=0;x<v.length-1;x++){g=v[x];I=v[x+1];L=f==g||f==I;I=I.x-g.x-g.width;N|=f==g;
-if(0==p&&0==U)p=I,U=1;else if(Math.abs(p-I)<=(L||1==x&&N?k:0))U+=1;else if(1<U&&N){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!N)U=0,u=p=0!=H?H:0,v.splice(0,0==x?1:x),x=-1;else break;0!=u||L||(p=u=I)}3==v.length&&v[1]==f&&(u=0)}k=function(Q,P,V,W){var q=[];if(W){W=K;var D=0}else W=0,D=K;q.push(new mxPoint(Q.x-W,Q.y-D));q.push(new mxPoint(Q.x+W,Q.y+D));q.push(Q);q.push(P);q.push(new mxPoint(P.x-W,P.y-D));q.push(new mxPoint(P.x+W,P.y+D));if(null!=V)return V.points=q,V;Q=new mxPolyline(q,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);Q.dialect=mxConstants.DIALECT_SVG;Q.pointerEvents=!1;Q.init(J.graph.getView().getOverlayPane());return Q};p=function(Q,P){if(Q&&null!=J.guidesArrHor)for(Q=0;Q<J.guidesArrHor.length;Q++)J.guidesArrHor[Q].node.style.visibility="hidden";if(P&&null!=J.guidesArrVer)for(Q=0;Q<J.guidesArrVer.length;Q++)J.guidesArrVer[Q].node.style.visibility="hidden"};if(1<U&&U==v.length-1){U=[];H=J.guidesArrHor;A=[];C=0;x=v[0]==f?1:0;N=v[x].y+v[x].height;if(0<u)for(x=0;x<v.length-1;x++)g=
-v[x],I=v[x+1],f==g?(C=I.x-g.width-u,A.push(new mxPoint(C+g.width+K,N)),A.push(new mxPoint(I.x-K,N))):f==I?(A.push(new mxPoint(g.x+g.width+K,N)),C=g.x+g.width+u,A.push(new mxPoint(C-K,N))):(A.push(new mxPoint(g.x+g.width+K,N)),A.push(new mxPoint(I.x-K,N)));else g=v[0],x=v[2],C=g.x+g.width+(x.x-g.x-g.width-f.width)/2,A.push(new mxPoint(g.x+g.width+K,N)),A.push(new mxPoint(C-K,N)),A.push(new mxPoint(C+f.width+K,N)),A.push(new mxPoint(x.x-K,N));for(x=0;x<A.length;x+=2)v=A[x],u=A[x+1],v=k(v,u,null!=H?
-H[x/2]:null),v.node.style.visibility="visible",v.redraw(),U.push(v);for(x=A.length/2;null!=H&&x<H.length;x++)H[x].destroy();J.guidesArrHor=U;C-=c.x;A=!0}else p(!0);if(1<z&&z==n.length-1){U=[];H=J.guidesArrVer;B=[];y=0;x=n[0]==f?1:0;z=n[x].x+n[x].width;if(0<E)for(x=0;x<n.length-1;x++)g=n[x],I=n[x+1],f==g?(y=I.y-g.height-E,B.push(new mxPoint(z,y+g.height+K)),B.push(new mxPoint(z,I.y-K))):f==I?(B.push(new mxPoint(z,g.y+g.height+K)),y=g.y+g.height+E,B.push(new mxPoint(z,y-K))):(B.push(new mxPoint(z,g.y+
-g.height+K)),B.push(new mxPoint(z,I.y-K)));else g=n[0],x=n[2],y=g.y+g.height+(x.y-g.y-g.height-f.height)/2,B.push(new mxPoint(z,g.y+g.height+K)),B.push(new mxPoint(z,y-K)),B.push(new mxPoint(z,y+f.height+K)),B.push(new mxPoint(z,x.y-K));for(x=0;x<B.length;x+=2)v=B[x],u=B[x+1],v=k(v,u,null!=H?H[x/2]:null,!0),v.node.style.visibility="visible",v.redraw(),U.push(v);for(x=B.length/2;null!=H&&x<H.length;x++)H[x].destroy();J.guidesArrVer=U;y-=c.y;B=!0}else p(!1,!0)}if(A||B)return f=new mxPoint(C,y),n=b.call(this,
-c,f,m,t),A&&!B?f.y=n.y:B&&!A&&(f.x=n.x),n.y!=f.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),n.x!=f.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),f;p(!0,!0);return b.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){d.call(this,c);var l=this.guidesArrVer,m=this.guidesArrHor;if(null!=l)for(var t=0;t<l.length;t++)l[t].node.style.visibility=c?"visible":"hidden";if(null!=
-m)for(t=0;t<m.length;t++)m[t].node.style.visibility=c?"visible":"hidden"};var e=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){e.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var m=0;m<c.length;m++)c[m].destroy();this.guidesArrVer=null}if(null!=l){for(m=0;m<l.length;m++)l[m].destroy();this.guidesArrHor=null}}})();function mxRuler(b,d,e,c){function l(){var z=b.diagramContainer;J.style.top=z.offsetTop-C+"px";J.style.left=z.offsetLeft-C+"px";J.style.width=(e?0:z.offsetWidth)+C+"px";J.style.height=(e?z.offsetHeight:0)+C+"px"}function m(z,G,F){if(null!=t)return z;var U;return function(){var p=this,u=arguments,H=F&&!U;clearTimeout(U);U=setTimeout(function(){U=null;F||z.apply(p,u)},G);H&&z.apply(p,u)}}var t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,m,t){var y=l.y,C=l.x,A=!1,B=!1;if(null!=this.states&&null!=c&&null!=l){var J=this,e=new mxCellState,g=this.graph.getView().scale,k=Math.max(2,this.getGuideTolerance()/2);e.x=c.x+C;e.y=c.y+y;e.width=c.width;e.height=c.height;for(var q=[],u=[],x=0;x<this.states.length;x++){var E=this.states[x];E instanceof mxCellState&&(t||!this.graph.isCellSelected(E.cell))&&((e.x>=E.x&&e.x<=E.x+E.width||E.x>=e.x&&E.x<=e.x+e.width)&&(e.y>
+E.y+E.height+4||e.y+e.height+4<E.y)?q.push(E):(e.y>=E.y&&e.y<=E.y+E.height||E.y>=e.y&&E.y<=e.y+e.height)&&(e.x>E.x+E.width+4||e.x+e.width+4<E.x)&&u.push(E))}var z=0,G=0,F=E=0,U=0,p=0,v=0,H=0,K=5*g;if(1<q.length){q.push(e);q.sort(function(Q,P){return Q.y-P.y});var N=!1;x=e==q[0];g=e==q[q.length-1];if(!x&&!g)for(x=1;x<q.length-1;x++)if(e==q[x]){g=q[x-1];x=q[x+1];E=G=F=(x.y-g.y-g.height-e.height)/2;break}for(x=0;x<q.length-1;x++){g=q[x];var I=q[x+1],L=e==g||e==I;I=I.y-g.y-g.height;N|=e==g;if(0==G&&0==
+z)G=I,z=1;else if(Math.abs(G-I)<=(L||1==x&&N?k:0))z+=1;else if(1<z&&N){q=q.slice(0,x+1);break}else if(3<=q.length-x&&!N)z=0,E=G=0!=F?F:0,q.splice(0,0==x?1:x),x=-1;else break;0!=E||L||(G=E=I)}3==q.length&&q[1]==e&&(E=0)}if(1<u.length){u.push(e);u.sort(function(Q,P){return Q.x-P.x});N=!1;x=e==u[0];g=e==u[u.length-1];if(!x&&!g)for(x=1;x<u.length-1;x++)if(e==u[x]){g=u[x-1];x=u[x+1];v=p=H=(x.x-g.x-g.width-e.width)/2;break}for(x=0;x<u.length-1;x++){g=u[x];I=u[x+1];L=e==g||e==I;I=I.x-g.x-g.width;N|=e==g;
+if(0==p&&0==U)p=I,U=1;else if(Math.abs(p-I)<=(L||1==x&&N?k:0))U+=1;else if(1<U&&N){u=u.slice(0,x+1);break}else if(3<=u.length-x&&!N)U=0,v=p=0!=H?H:0,u.splice(0,0==x?1:x),x=-1;else break;0!=v||L||(p=v=I)}3==u.length&&u[1]==e&&(v=0)}k=function(Q,P,V,W){var n=[];if(W){W=K;var D=0}else W=0,D=K;n.push(new mxPoint(Q.x-W,Q.y-D));n.push(new mxPoint(Q.x+W,Q.y+D));n.push(Q);n.push(P);n.push(new mxPoint(P.x-W,P.y-D));n.push(new mxPoint(P.x+W,P.y+D));if(null!=V)return V.points=n,V;Q=new mxPolyline(n,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);Q.dialect=mxConstants.DIALECT_SVG;Q.pointerEvents=!1;Q.init(J.graph.getView().getOverlayPane());return Q};p=function(Q,P){if(Q&&null!=J.guidesArrHor)for(Q=0;Q<J.guidesArrHor.length;Q++)J.guidesArrHor[Q].node.style.visibility="hidden";if(P&&null!=J.guidesArrVer)for(Q=0;Q<J.guidesArrVer.length;Q++)J.guidesArrVer[Q].node.style.visibility="hidden"};if(1<U&&U==u.length-1){U=[];H=J.guidesArrHor;A=[];C=0;x=u[0]==e?1:0;N=u[x].y+u[x].height;if(0<v)for(x=0;x<u.length-1;x++)g=
+u[x],I=u[x+1],e==g?(C=I.x-g.width-v,A.push(new mxPoint(C+g.width+K,N)),A.push(new mxPoint(I.x-K,N))):e==I?(A.push(new mxPoint(g.x+g.width+K,N)),C=g.x+g.width+v,A.push(new mxPoint(C-K,N))):(A.push(new mxPoint(g.x+g.width+K,N)),A.push(new mxPoint(I.x-K,N)));else g=u[0],x=u[2],C=g.x+g.width+(x.x-g.x-g.width-e.width)/2,A.push(new mxPoint(g.x+g.width+K,N)),A.push(new mxPoint(C-K,N)),A.push(new mxPoint(C+e.width+K,N)),A.push(new mxPoint(x.x-K,N));for(x=0;x<A.length;x+=2)u=A[x],v=A[x+1],u=k(u,v,null!=H?
+H[x/2]:null),u.node.style.visibility="visible",u.redraw(),U.push(u);for(x=A.length/2;null!=H&&x<H.length;x++)H[x].destroy();J.guidesArrHor=U;C-=c.x;A=!0}else p(!0);if(1<z&&z==q.length-1){U=[];H=J.guidesArrVer;B=[];y=0;x=q[0]==e?1:0;z=q[x].x+q[x].width;if(0<E)for(x=0;x<q.length-1;x++)g=q[x],I=q[x+1],e==g?(y=I.y-g.height-E,B.push(new mxPoint(z,y+g.height+K)),B.push(new mxPoint(z,I.y-K))):e==I?(B.push(new mxPoint(z,g.y+g.height+K)),y=g.y+g.height+E,B.push(new mxPoint(z,y-K))):(B.push(new mxPoint(z,g.y+
+g.height+K)),B.push(new mxPoint(z,I.y-K)));else g=q[0],x=q[2],y=g.y+g.height+(x.y-g.y-g.height-e.height)/2,B.push(new mxPoint(z,g.y+g.height+K)),B.push(new mxPoint(z,y-K)),B.push(new mxPoint(z,y+e.height+K)),B.push(new mxPoint(z,x.y-K));for(x=0;x<B.length;x+=2)u=B[x],v=B[x+1],u=k(u,v,null!=H?H[x/2]:null,!0),u.node.style.visibility="visible",u.redraw(),U.push(u);for(x=B.length/2;null!=H&&x<H.length;x++)H[x].destroy();J.guidesArrVer=U;y-=c.y;B=!0}else p(!1,!0)}if(A||B)return e=new mxPoint(C,y),q=b.call(this,
+c,e,m,t),A&&!B?e.y=q.y:B&&!A&&(e.x=q.x),q.y!=e.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),q.x!=e.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),e;p(!0,!0);return b.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){d.call(this,c);var l=this.guidesArrVer,m=this.guidesArrHor;if(null!=l)for(var t=0;t<l.length;t++)l[t].node.style.visibility=c?"visible":"hidden";if(null!=
+m)for(t=0;t<m.length;t++)m[t].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var m=0;m<c.length;m++)c[m].destroy();this.guidesArrVer=null}if(null!=l){for(m=0;m<l.length;m++)l[m].destroy();this.guidesArrHor=null}}})();function mxRuler(b,d,f,c){function l(){var z=b.diagramContainer;J.style.top=z.offsetTop-C+"px";J.style.left=z.offsetLeft-C+"px";J.style.width=(f?0:z.offsetWidth)+C+"px";J.style.height=(f?z.offsetHeight:0)+C+"px"}function m(z,G,F){if(null!=t)return z;var U;return function(){var p=this,v=arguments,H=F&&!U;clearTimeout(U);U=setTimeout(function(){U=null;F||z.apply(p,v)},G);H&&z.apply(p,v)}}var t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
y=window.cancelAnimationFrame||window.mozCancelAnimationFrame,C=this.RULER_THICKNESS,A=this;this.unit=d;var B=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"},J=document.createElement("div");J.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){B=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"};J.style.background=B.bkgClr;J.style[e?"borderRight":"borderBottom"]="0.5px solid "+B.strokeClr;J.style.borderLeft="0.5px solid "+B.strokeClr});this.updateStyle();document.body.appendChild(J);mxEvent.disableContextMenu(J);this.editorUiRefresh=b.refresh;b.refresh=
-function(z){A.editorUiRefresh.apply(b,arguments);l()};l();var f=document.createElement("canvas");f.width=J.offsetWidth;f.height=J.offsetHeight;J.style.overflow="hidden";f.style.position="relative";J.appendChild(f);var g=f.getContext("2d");this.ui=b;var k=b.editor.graph;this.graph=k;this.container=J;this.canvas=f;var n=function(z,G,F,U,p){z=Math.round(z);G=Math.round(G);F=Math.round(F);U=Math.round(U);g.beginPath();g.moveTo(z+.5,G+.5);g.lineTo(F+.5,U+.5);g.stroke();p&&(e?(g.save(),g.translate(z,G),
-g.rotate(-Math.PI/2),g.fillText(p,0,0),g.restore()):g.fillText(p,z,G))},v=function(){g.clearRect(0,0,f.width,f.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=B.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var z=k.view.scale,G=k.view.getBackgroundPageBounds(),F=k.view.translate,U=k.pageVisible;F=U?C+(e?G.y-k.container.scrollTop:G.x-k.container.scrollLeft):C+(e?F.y*z-k.container.scrollTop:F.x*z-k.container.scrollLeft);var p=0;U&&(p=k.getPageLayout(),p=e?p.y*k.pageFormat.height:
-p.x*k.pageFormat.width);var u;switch(A.unit){case mxConstants.POINTS:var H=u=10;var K=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:u=10;H=mxConstants.PIXELS_PER_MM;K=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:u=20;H=mxConstants.PIXELS_PER_MM;K=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:u=.5>=z||4<=z?8:16,H=mxConstants.PIXELS_PER_INCH/u,K=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var N=H;2<=z?N=H/(2*Math.floor(z/2)):.5>=z&&(N=H*Math.floor(1/z/2)*(A.unit==
-mxConstants.MILLIMETERS?2:1));H=null;G=U?Math.min(F+(e?G.height:G.width),e?f.height:f.width):e?f.height:f.width;if(U)if(g.fillStyle=B.outBkgClr,e){var I=F-C;0<I&&g.fillRect(0,C,C,I);G<f.height&&g.fillRect(0,G,C,f.height)}else I=F-C,0<I&&g.fillRect(C,0,I,C),G<f.width&&g.fillRect(G,0,f.width,C);g.fillStyle=B.fontClr;for(U=U?F:F%(N*z);U<=G;U+=N*z)if(I=Math.round((U-F)/z/N),!(U<C||I==H)){H=I;var L=null;0==I%u&&(L=A.formatText(p+I*N)+"");e?n(C-K[Math.abs(I)%u],U,C,U,L):n(U,C-K[Math.abs(I)%u],U,C,L)}g.lineWidth=
-1;n(e?0:C,e?C:0,C,C);g.fillStyle=B.cornerClr;g.fillRect(0,0,C,C)},x=-1,E=function(){null!=t?(null!=y&&y(x),x=t(v)):v()};this.drawRuler=E;this.sizeListener=d=m(function(){var z=k.container;e?(z=z.offsetHeight+C,f.height!=z&&(f.height=z,J.style.height=z+"px",E())):(z=z.offsetWidth+C,f.width!=z&&(f.width=z,J.style.width=z+"px",E()))},10);this.pageListener=function(){E()};this.scrollListener=c=m(function(){var z=e?k.container.scrollTop:k.container.scrollLeft;A.lastScroll!=z&&(A.lastScroll=z,E())},10);
-this.unitListener=function(z,G){A.setUnit(G.getProperty("unit"))};k.addListener(mxEvent.SIZE,d);k.container.addEventListener("scroll",c);k.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(z){B=z;J.style.background=B.bkgClr;v()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(z,G,F,U){if(e&&4<z.height||
-!e&&4<z.width){if(null!=A.guidePart)try{g.putImageData(A.guidePart.imgData1,A.guidePart.x1,A.guidePart.y1),g.putImageData(A.guidePart.imgData2,A.guidePart.x2,A.guidePart.y2),g.putImageData(A.guidePart.imgData3,A.guidePart.x3,A.guidePart.y3)}catch(W){}var p=A.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=B.guideClr;g.setLineDash([2]);if(e){var u=z.y+p.y+C-this.graph.container.scrollTop;var H=0;var K=u+z.height/2;var N=C/2;var I=u+z.height;var L=0;var Q=g.getImageData(H,u-1,C,
-3);n(H,u,C,u);u--;var P=g.getImageData(N,K-1,C,3);n(N,K,C,K);K--;var V=g.getImageData(L,I-1,C,3);n(L,I,C,I);I--}else u=0,H=z.x+p.x+C-this.graph.container.scrollLeft,K=C/2,N=H+z.width/2,I=0,L=H+z.width,Q=g.getImageData(H-1,u,3,C),n(H,u,H,C),H--,P=g.getImageData(N-1,K,3,C),n(N,K,N,C),N--,V=g.getImageData(L-1,I,3,C),n(L,I,L,C),L--;if(null==A.guidePart||A.guidePart.x1!=H||A.guidePart.y1!=u)A.guidePart={imgData1:Q,x1:H,y1:u,imgData2:P,x2:N,y2:K,imgData3:V,x3:L,y3:I}}catch(W){}}else p=A.origGuideMove.apply(this,
+{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"};J.style.background=B.bkgClr;J.style[f?"borderRight":"borderBottom"]="0.5px solid "+B.strokeClr;J.style.borderLeft="0.5px solid "+B.strokeClr});this.updateStyle();document.body.appendChild(J);mxEvent.disableContextMenu(J);this.editorUiRefresh=b.refresh;b.refresh=
+function(z){A.editorUiRefresh.apply(b,arguments);l()};l();var e=document.createElement("canvas");e.width=J.offsetWidth;e.height=J.offsetHeight;J.style.overflow="hidden";e.style.position="relative";J.appendChild(e);var g=e.getContext("2d");this.ui=b;var k=b.editor.graph;this.graph=k;this.container=J;this.canvas=e;var q=function(z,G,F,U,p){z=Math.round(z);G=Math.round(G);F=Math.round(F);U=Math.round(U);g.beginPath();g.moveTo(z+.5,G+.5);g.lineTo(F+.5,U+.5);g.stroke();p&&(f?(g.save(),g.translate(z,G),
+g.rotate(-Math.PI/2),g.fillText(p,0,0),g.restore()):g.fillText(p,z,G))},u=function(){g.clearRect(0,0,e.width,e.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=B.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var z=k.view.scale,G=k.view.getBackgroundPageBounds(),F=k.view.translate,U=k.pageVisible;F=U?C+(f?G.y-k.container.scrollTop:G.x-k.container.scrollLeft):C+(f?F.y*z-k.container.scrollTop:F.x*z-k.container.scrollLeft);var p=0;U&&(p=k.getPageLayout(),p=f?p.y*k.pageFormat.height:
+p.x*k.pageFormat.width);var v;switch(A.unit){case mxConstants.POINTS:var H=v=10;var K=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:v=10;H=mxConstants.PIXELS_PER_MM;K=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:v=20;H=mxConstants.PIXELS_PER_MM;K=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:v=.5>=z||4<=z?8:16,H=mxConstants.PIXELS_PER_INCH/v,K=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var N=H;2<=z?N=H/(2*Math.floor(z/2)):.5>=z&&(N=H*Math.floor(1/z/2)*(A.unit==
+mxConstants.MILLIMETERS?2:1));H=null;G=U?Math.min(F+(f?G.height:G.width),f?e.height:e.width):f?e.height:e.width;if(U)if(g.fillStyle=B.outBkgClr,f){var I=F-C;0<I&&g.fillRect(0,C,C,I);G<e.height&&g.fillRect(0,G,C,e.height)}else I=F-C,0<I&&g.fillRect(C,0,I,C),G<e.width&&g.fillRect(G,0,e.width,C);g.fillStyle=B.fontClr;for(U=U?F:F%(N*z);U<=G;U+=N*z)if(I=Math.round((U-F)/z/N),!(U<C||I==H)){H=I;var L=null;0==I%v&&(L=A.formatText(p+I*N)+"");f?q(C-K[Math.abs(I)%v],U,C,U,L):q(U,C-K[Math.abs(I)%v],U,C,L)}g.lineWidth=
+1;q(f?0:C,f?C:0,C,C);g.fillStyle=B.cornerClr;g.fillRect(0,0,C,C)},x=-1,E=function(){null!=t?(null!=y&&y(x),x=t(u)):u()};this.drawRuler=E;this.sizeListener=d=m(function(){var z=k.container;f?(z=z.offsetHeight+C,e.height!=z&&(e.height=z,J.style.height=z+"px",E())):(z=z.offsetWidth+C,e.width!=z&&(e.width=z,J.style.width=z+"px",E()))},10);this.pageListener=function(){E()};this.scrollListener=c=m(function(){var z=f?k.container.scrollTop:k.container.scrollLeft;A.lastScroll!=z&&(A.lastScroll=z,E())},10);
+this.unitListener=function(z,G){A.setUnit(G.getProperty("unit"))};k.addListener(mxEvent.SIZE,d);k.container.addEventListener("scroll",c);k.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(z){B=z;J.style.background=B.bkgClr;u()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(z,G,F,U){if(f&&4<z.height||
+!f&&4<z.width){if(null!=A.guidePart)try{g.putImageData(A.guidePart.imgData1,A.guidePart.x1,A.guidePart.y1),g.putImageData(A.guidePart.imgData2,A.guidePart.x2,A.guidePart.y2),g.putImageData(A.guidePart.imgData3,A.guidePart.x3,A.guidePart.y3)}catch(W){}var p=A.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=B.guideClr;g.setLineDash([2]);if(f){var v=z.y+p.y+C-this.graph.container.scrollTop;var H=0;var K=v+z.height/2;var N=C/2;var I=v+z.height;var L=0;var Q=g.getImageData(H,v-1,C,
+3);q(H,v,C,v);v--;var P=g.getImageData(N,K-1,C,3);q(N,K,C,K);K--;var V=g.getImageData(L,I-1,C,3);q(L,I,C,I);I--}else v=0,H=z.x+p.x+C-this.graph.container.scrollLeft,K=C/2,N=H+z.width/2,I=0,L=H+z.width,Q=g.getImageData(H-1,v,3,C),q(H,v,H,C),H--,P=g.getImageData(N-1,K,3,C),q(N,K,N,C),N--,V=g.getImageData(L-1,I,3,C),q(L,I,L,C),L--;if(null==A.guidePart||A.guidePart.x1!=H||A.guidePart.y1!=v)A.guidePart={imgData1:Q,x1:H,y1:v,imgData2:P,x2:N,y2:K,imgData3:V,x3:L,y3:I}}catch(W){}}else p=A.origGuideMove.apply(this,
arguments);return p};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var z=A.origGuideDestroy.apply(this,arguments);if(null!=A.guidePart)try{g.putImageData(A.guidePart.imgData1,A.guidePart.x1,A.guidePart.y1),g.putImageData(A.guidePart.imgData2,A.guidePart.x2,A.guidePart.y2),g.putImageData(A.guidePart.imgData3,A.guidePart.x3,A.guidePart.y3),A.guidePart=null}catch(G){}return z}}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,d){var e=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return e};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,d,!0);this.hRuler=new mxRuler(b,d,!1,!0);d=mxUtils.bind(this,function(c){var l=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
+function mxDualRuler(b,d){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,d,!0);this.hRuler=new mxRuler(b,d,!1,!0);d=mxUtils.bind(this,function(c){var l=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
function(m){l=null!=b.currentMenu;mxEvent.consume(m)}),null,mxUtils.bind(this,function(m){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(m)||mxEvent.isPopupTrigger(m))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!l){var t=new mxPopupMenu(mxUtils.bind(this,function(A,B){b.menus.addMenuItems(A,["points","inches","millimeters","meters"],B)}));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=
!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);b.resetCurrentMenu();t.destroy()});var y=mxEvent.getClientX(m),C=mxEvent.getClientY(m);t.popup(y,C,null,m);b.setCurrentMenu(t,c)}mxEvent.consume(m)}}))});d(this.hRuler.container);d(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 d=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=d){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var e=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,l=[],m,t=[],y,C=!1,A=!0,B=!0,J=!0,f=!0,g=[],k=!1,n=!1,v=!1,x={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},E=!0;this.setClosedPath=function(K){C=K};this.setAutoClose=function(K){A=K};this.setAutoInsert=
-function(K){B=K};this.setAutoScroll=function(K){J=K};this.setOpenFill=function(K){f=K};this.setStopClickEnabled=function(K){n=K};this.setSelectInserted=function(K){v=K};this.setSmoothing=function(K){e=K};this.setPerfectFreehandMode=function(K){E=K};this.isPerfectFreehandMode=function(){return E};this.setBrushSize=function(K){x.size=K};this.getBrushSize=function(){return x.size};var z=function(K){k=K;b.getRubberband().setEnabled(!K);b.graphHandler.setSelectEnabled(!K);b.graphHandler.setMoveEnabled(!K);
-b.container.style.cursor=K?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){z(!0)};this.isDrawing=function(){return k};var G=mxUtils.bind(this,function(K){if(c){var N=y.length,I=n&&0<t.length&&null!=y&&2>y.length;I||t.push.apply(t,y);y=[];t.push(null);l.push(c);c=null;(I||B)&&this.stopDrawing();B&&(!I||2<=N)&&this.startDrawing();mxEvent.consume(K)}}),F=new mxCell;F.edge=!0;var U=function(){var K=b.getCurrentCellStyle(F);K=mxUtils.getValue(b.currentVertexStyle,
+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 d=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=d){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,l=[],m,t=[],y,C=!1,A=!0,B=!0,J=!0,e=!0,g=[],k=!1,q=!1,u=!1,x={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},E=!0;this.setClosedPath=function(K){C=K};this.setAutoClose=function(K){A=K};this.setAutoInsert=
+function(K){B=K};this.setAutoScroll=function(K){J=K};this.setOpenFill=function(K){e=K};this.setStopClickEnabled=function(K){q=K};this.setSelectInserted=function(K){u=K};this.setSmoothing=function(K){f=K};this.setPerfectFreehandMode=function(K){E=K};this.isPerfectFreehandMode=function(){return E};this.setBrushSize=function(K){x.size=K};this.getBrushSize=function(){return x.size};var z=function(K){k=K;b.getRubberband().setEnabled(!K);b.graphHandler.setSelectEnabled(!K);b.graphHandler.setMoveEnabled(!K);
+b.container.style.cursor=K?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){z(!0)};this.isDrawing=function(){return k};var G=mxUtils.bind(this,function(K){if(c){var N=y.length,I=q&&0<t.length&&null!=y&&2>y.length;I||t.push.apply(t,y);y=[];t.push(null);l.push(c);c=null;(I||B)&&this.stopDrawing();B&&(!I||2<=N)&&this.startDrawing();mxEvent.consume(K)}}),F=new mxCell;F.edge=!0;var U=function(){var K=b.getCurrentCellStyle(F);K=mxUtils.getValue(b.currentVertexStyle,
mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==K&&(K=b.shapeForegroundColor);return K};this.createStyle=function(K){var N=";fillColor=none;";E&&(N=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+K+N};this.stopDrawing=function(){if(0<l.length){if(E){for(var K=[],N=0;N<t.length;N++)null!=t[N]&&K.push([t[N].x,t[N].y]);K=PerfectFreehand.getStroke(K,x);t=[];for(N=0;N<K.length;N++)t.push({x:K[N][0],y:K[N][1]});t.push(null)}K=t[0].x;var I=t[0].x,L=
-t[0].y,Q=t[0].y;for(N=1;N<t.length;N++)null!=t[N]&&(K=Math.max(K,t[N].x),I=Math.min(I,t[N].x),L=Math.max(L,t[N].y),Q=Math.min(Q,t[N].y));K-=I;L-=Q;if(0<K&&0<L){var P=100/K,V=100/L;t.map(function(T){if(null==T)return T;T.x=(T.x-I)*P;T.y=(T.y-Q)*V;return T});var W='<shape strokewidth="inherit"><foreground>',q=0;for(N=0;N<t.length;N++){var D=t[N];if(null==D){D=!1;q=t[q];var M=t[N-1];!C&&A&&(D=q.x-M.x,M=q.y-M.y,D=Math.sqrt(D*D+M*M)<=b.tolerance);if(C||D)W+='<line x="'+q.x.toFixed(2)+'" y="'+q.y.toFixed(2)+
-'"/>';W+="</path>"+(f||C||D?"<fillstroke/>":"<stroke/>");q=N+1}else W=N==q?W+('<path><move x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>'):W+('<line x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){N=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;q=b.view.translate;N=new mxCell("",new mxGeometry(I/W-q.x,Q/W-q.y,K/W,L/W),N);N.vertex=1;b.model.beginUpdate();try{N=b.addCell(N),b.fireEvent(new mxEventObject("cellsInserted",
-"cells",[N])),b.fireEvent(new mxEventObject("freehandInserted","cell",N))}finally{b.model.endUpdate()}v&&b.setSelectionCells([N])}}for(N=0;N<l.length;N++)l[N].parentNode.removeChild(l[N]);c=null;l=[];t=[]}z(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,N){K=N.getProperty("eventName");N=N.getProperty("event");K==mxEvent.MOUSE_MOVE&&k&&(null!=N.sourceState&&N.sourceState.setCursor("crosshair"),N.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(K,N){if(b.isEnabled()&&
+t[0].y,Q=t[0].y;for(N=1;N<t.length;N++)null!=t[N]&&(K=Math.max(K,t[N].x),I=Math.min(I,t[N].x),L=Math.max(L,t[N].y),Q=Math.min(Q,t[N].y));K-=I;L-=Q;if(0<K&&0<L){var P=100/K,V=100/L;t.map(function(T){if(null==T)return T;T.x=(T.x-I)*P;T.y=(T.y-Q)*V;return T});var W='<shape strokewidth="inherit"><foreground>',n=0;for(N=0;N<t.length;N++){var D=t[N];if(null==D){D=!1;n=t[n];var M=t[N-1];!C&&A&&(D=n.x-M.x,M=n.y-M.y,D=Math.sqrt(D*D+M*M)<=b.tolerance);if(C||D)W+='<line x="'+n.x.toFixed(2)+'" y="'+n.y.toFixed(2)+
+'"/>';W+="</path>"+(e||C||D?"<fillstroke/>":"<stroke/>");n=N+1}else W=N==n?W+('<path><move x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>'):W+('<line x="'+D.x.toFixed(2)+'" y="'+D.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){N=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;n=b.view.translate;N=new mxCell("",new mxGeometry(I/W-n.x,Q/W-n.y,K/W,L/W),N);N.vertex=1;b.model.beginUpdate();try{N=b.addCell(N),b.fireEvent(new mxEventObject("cellsInserted",
+"cells",[N])),b.fireEvent(new mxEventObject("freehandInserted","cell",N))}finally{b.model.endUpdate()}u&&b.setSelectionCells([N])}}for(N=0;N<l.length;N++)l[N].parentNode.removeChild(l[N]);c=null;l=[];t=[]}z(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,N){K=N.getProperty("eventName");N=N.getProperty("event");K==mxEvent.MOUSE_MOVE&&k&&(null!=N.sourceState&&N.sourceState.setCursor("crosshair"),N.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(K,N){if(b.isEnabled()&&
!b.isCellLocked(b.getDefaultParent())&&(K=N.getEvent(),k&&!mxEvent.isPopupTrigger(K)&&!mxEvent.isMultiTouchEvent(K))){var I=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);I=Math.max(1,I*b.view.scale);var L=U();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",E?L:"none");c.setAttribute("stroke",L);c.setAttribute("stroke-width",I);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(L=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
-L=L.split(" ").map(function(Q){return parseFloat(Q)*I}).join(" "),c.setAttribute("stroke-dasharray",L));g=[];K=p(K);u(K);m="M"+K.x+" "+K.y;t.push(K);y=[];c.setAttribute("d",E?PerfectFreehand.getSvgPathFromStroke([[K.x,K.y]],x):m);d.appendChild(c);N.consume()}}),mouseMove:mxUtils.bind(this,function(K,N){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=N.getEvent();K=p(K);u(K);var I=H(0);if(I)if(t.push(I),E){var L=[];for(I=0;I<t.length;I++)L.push([t[I].x,t[I].y]);y=[];for(var Q=2;Q<g.length;Q+=
+L=L.split(" ").map(function(Q){return parseFloat(Q)*I}).join(" "),c.setAttribute("stroke-dasharray",L));g=[];K=p(K);v(K);m="M"+K.x+" "+K.y;t.push(K);y=[];c.setAttribute("d",E?PerfectFreehand.getSvgPathFromStroke([[K.x,K.y]],x):m);d.appendChild(c);N.consume()}}),mouseMove:mxUtils.bind(this,function(K,N){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){K=N.getEvent();K=p(K);v(K);var I=H(0);if(I)if(t.push(I),E){var L=[];for(I=0;I<t.length;I++)L.push([t[I].x,t[I].y]);y=[];for(var Q=2;Q<g.length;Q+=
2)I=H(Q),L.push([I.x,I.y]),y.push(I);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(L,x))}else{m+=" L"+I.x+" "+I.y;L="";y=[];for(Q=2;Q<g.length;Q+=2)I=H(Q),L+=" L"+I.x+" "+I.y,y.push(I);c.setAttribute("d",m+L)}J&&(I=b.view.translate,b.scrollRectToVisible((new mxRectangle(K.x-I.x,K.y-I.y)).grow(20)));N.consume()}}),mouseUp:mxUtils.bind(this,function(K,N){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(G(N.getEvent()),N.consume())})});var p=function(K){return mxUtils.convertPoint(b.container,
-mxEvent.getClientX(K),mxEvent.getClientY(K))},u=function(K){for(g.push(K);g.length>e;)g.shift()},H=function(K){var N=g.length;if(1===N%2||N>=e){var I=0,L=0,Q,P=0;for(Q=K;Q<N;Q++)P++,K=g[Q],I+=K.x,L+=K.y;return{x:I/P,y:L/P}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,d,e){function c(P,V){try{if(!H){var W=d.file.getCurrentUser();if(u&&null!=W&&null!=W.displayName){var q={from:G,id:n,type:P,sessionId:d.clientId,userId:W.id,username:W.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};q={bytes:d.objectToString(q),data:"aes"};q=JSON.stringify(q);K&&"cursor"!=P&&EditorUi.debug("P2PCollab: sending to socket server",[q]);n++;P=!K&&("cursor"==P||"selectionChange"==P);p&&!P&&Q("message",q);if(P)for(p2pId in U)U[p2pId].send(q)}}}catch(D){null!=
-window.console&&console.log("Error:",D)}}function l(P){if(b.shareCursorPosition&&!B.isMouseDown){var V=mxUtils.getOffset(B.container),W=B.view.translate,q=B.view.scale,D=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:D,x:Math.round((P.getX()-V.x+B.container.scrollLeft)/q-W.x),y:Math.round((P.getY()-V.y+B.container.scrollTop)/q-W.y)})}}function m(P,V){var W=null!=b.currentPage?b.currentPage.getId():null;if(null!=P&&null!=P.cursor&&null!=P.lastCursor)if(null!=P.lastCursor.hide||!b.isShowRemoteCursors()||
-null!=P.lastCursor.pageId&&P.lastCursor.pageId!=W)P.cursor.style.display="none";else{W=function(){var R=Math.max(B.container.scrollLeft,Math.min(B.container.scrollLeft+B.container.clientWidth-P.cursor.clientWidth,M)),S=Math.max(B.container.scrollTop-22,Math.min(B.container.scrollTop+B.container.clientHeight-P.cursor.clientHeight,T));O.style.opacity=R!=M||S!=T?0:1;P.cursor.style.left=R+"px";P.cursor.style.top=S+"px";P.cursor.style.display=""};var q=B.view.translate,D=B.view.scale,M=(q.x+P.lastCursor.x)*
-D+8,T=(q.y+P.lastCursor.y)*D-12,O=P.cursor.getElementsByTagName("img")[0];V?(mxUtils.setPrefixedStyle(P.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(O.style,"transition","all 900ms ease-out"),window.setTimeout(W,0)):(mxUtils.setPrefixedStyle(P.cursor.style,"transition",null),mxUtils.setPrefixedStyle(O.style,"transition",null),W())}}function t(P,V){try{var W=function(){if(null==k[D]){var aa=z[D];null==aa&&(aa=J%g.length,z[D]=aa,J++);var ba=g[aa];aa=11<aa?"black":"white";
+mxEvent.getClientX(K),mxEvent.getClientY(K))},v=function(K){for(g.push(K);g.length>f;)g.shift()},H=function(K){var N=g.length;if(1===N%2||N>=f){var I=0,L=0,Q,P=0;for(Q=K;Q<N;Q++)P++,K=g[Q],I+=K.x,L+=K.y;return{x:I/P,y:L/P}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,d,f){function c(P,V){try{if(!H){var W=d.file.getCurrentUser();if(v&&null!=W&&null!=W.displayName){var n={from:G,id:q,type:P,sessionId:d.clientId,userId:W.id,username:W.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};n={bytes:d.objectToString(n),data:"aes"};n=JSON.stringify(n);K&&"cursor"!=P&&EditorUi.debug("P2PCollab: sending to socket server",[n]);q++;P=!K&&("cursor"==P||"selectionChange"==P);p&&!P&&Q("message",n);if(P)for(p2pId in U)U[p2pId].send(n)}}}catch(D){null!=
+window.console&&console.log("Error:",D)}}function l(P){if(b.shareCursorPosition&&!B.isMouseDown){var V=mxUtils.getOffset(B.container),W=B.view.translate,n=B.view.scale,D=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:D,x:Math.round((P.getX()-V.x+B.container.scrollLeft)/n-W.x),y:Math.round((P.getY()-V.y+B.container.scrollTop)/n-W.y)})}}function m(P,V){var W=null!=b.currentPage?b.currentPage.getId():null;if(null!=P&&null!=P.cursor&&null!=P.lastCursor)if(null!=P.lastCursor.hide||!b.isShowRemoteCursors()||
+null!=P.lastCursor.pageId&&P.lastCursor.pageId!=W)P.cursor.style.display="none";else{W=function(){var R=Math.max(B.container.scrollLeft,Math.min(B.container.scrollLeft+B.container.clientWidth-P.cursor.clientWidth,M)),S=Math.max(B.container.scrollTop-22,Math.min(B.container.scrollTop+B.container.clientHeight-P.cursor.clientHeight,T));O.style.opacity=R!=M||S!=T?0:1;P.cursor.style.left=R+"px";P.cursor.style.top=S+"px";P.cursor.style.display=""};var n=B.view.translate,D=B.view.scale,M=(n.x+P.lastCursor.x)*
+D+8,T=(n.y+P.lastCursor.y)*D-12,O=P.cursor.getElementsByTagName("img")[0];V?(mxUtils.setPrefixedStyle(P.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(O.style,"transition","all 900ms ease-out"),window.setTimeout(W,0)):(mxUtils.setPrefixedStyle(P.cursor.style,"transition",null),mxUtils.setPrefixedStyle(O.style,"transition",null),W())}}function t(P,V){try{var W=function(){if(null==k[D]){var aa=z[D];null==aa&&(aa=J%g.length,z[D]=aa,J++);var ba=g[aa];aa=11<aa?"black":"white";
k[D]={cursor:document.createElement("div"),color:ba,selection:{}};x[V]=D;M=k[D].cursor;M.style.pointerEvents="none";M.style.position="absolute";M.style.display="none";M.style.opacity="0.9";var da=document.createElement("img");mxUtils.setPrefixedStyle(da.style,"transform","rotate(-45deg)translateX(-14px)");da.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);da.style.width="10px";M.appendChild(da);da=document.createElement("div");
-da.style.backgroundColor=ba;da.style.color=aa;da.style.fontSize="9pt";da.style.padding="3px 7px";da.style.marginTop="8px";da.style.borderRadius="10px";da.style.maxWidth="100px";da.style.overflow="hidden";da.style.textOverflow="ellipsis";da.style.whiteSpace="nowrap";mxUtils.write(da,q);M.appendChild(da);b.diagramContainer.appendChild(M)}else M=k[D].cursor;T=k[D].selection};if(!H){P=JSON.parse(P);null!=P.bytes&&(P=d.stringToObject(P.bytes));K&&"cursor"!=P.type&&EditorUi.debug("P2PCollab: msg received",
-[P]);if(null!=V){if(P.from==G||v[P.from]>=P.id){EditorUi.debug("P2PCollab: Dropped Message",P,G,v[P.from]);return}v[P.from]=P.id}var q=P.username?P.username:"Anonymous",D=P.sessionId,M,T;null!=k[D]&&(clearTimeout(k[D].inactiveTO),k[D].inactiveTO=setTimeout(function(){C(null,D)},12E4));var O=P.data;switch(P.type){case "cursor":W();k[D].lastCursor=O;m(k[D],!0);break;case "diff":try{P=null!=O.patch?d.stringToObject(decodeURIComponent(O.patch)):O.diff,d.receiveRemoteChanges(P.d)}catch(aa){EditorUi.debug("P2PCollab: Diff msg error",
+da.style.backgroundColor=ba;da.style.color=aa;da.style.fontSize="9pt";da.style.padding="3px 7px";da.style.marginTop="8px";da.style.borderRadius="10px";da.style.maxWidth="100px";da.style.overflow="hidden";da.style.textOverflow="ellipsis";da.style.whiteSpace="nowrap";mxUtils.write(da,n);M.appendChild(da);b.diagramContainer.appendChild(M)}else M=k[D].cursor;T=k[D].selection};if(!H){P=JSON.parse(P);null!=P.bytes&&(P=d.stringToObject(P.bytes));K&&"cursor"!=P.type&&EditorUi.debug("P2PCollab: msg received",
+[P]);if(null!=V){if(P.from==G||u[P.from]>=P.id){EditorUi.debug("P2PCollab: Dropped Message",P,G,u[P.from]);return}u[P.from]=P.id}var n=P.username?P.username:"Anonymous",D=P.sessionId,M,T;null!=k[D]&&(clearTimeout(k[D].inactiveTO),k[D].inactiveTO=setTimeout(function(){C(null,D)},12E4));var O=P.data;switch(P.type){case "cursor":W();k[D].lastCursor=O;m(k[D],!0);break;case "diff":try{P=null!=O.patch?d.stringToObject(decodeURIComponent(O.patch)):O.diff,d.receiveRemoteChanges(P.d)}catch(aa){EditorUi.debug("P2PCollab: Diff msg error",
aa)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var R=null!=b.currentPage?b.currentPage.getId():null;if(null==R||null!=O.pageId&&O.pageId==R){W();for(W=0;W<O.removed.length;W++){var S=O.removed[W];if(null!=S){var X=T[S];delete T[S];null!=X&&X.destroy()}}for(W=0;W<O.added.length;W++)if(S=O.added[W],null!=S){var Y=B.model.getCell(S);null!=Y&&(T[S]=B.highlightCell(Y,k[D].color,6E4,70,3))}}}}d.file.fireEvent(new mxEventObject("realtimeMessage","message",P))}}catch(aa){null!=window.console&&
-console.log("Error:",aa)}}function y(P,V){if(!K&&SimplePeer.WEBRTC_SUPPORT){var W=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});W.on("signal",function(q){Q("sendSignal",{to:P,from:G,signal:q})});W.on("error",function(q){delete F[P];EditorUi.debug("P2PCollab: p2p socket error",q);!H&&V&&W.destroyed&&E[P]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",P),y(P,!0))});W.on("connect",function(){delete F[P];null==U[P]||U[P].destroyed?(U[P]=W,E[P]=!0,EditorUi.debug("P2PCollab: p2p socket connected",
-P)):(W.noP2PMapDel=!0,W.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",P))});W.on("close",function(){W.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",P),A(x[P]),delete U[P])});W.on("data",t);return F[P]=W}}function C(P,V){A(V||x[P]);null!=P&&(delete x[P],E[P]=!1)}function A(P){var V=k[P];if(null!=V){var W=V.selection,q;for(q in W)null!=W[q]&&W[q].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete k[P]}}
-var B=b.editor.graph,J=0,f=null,g="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),k={},n=1,v={},x={},E={},z={},G,F={},U={},p=!0,u=!1,H=!1,K="0"!=urlParams["no-p2p"],N=!1,I=0,L=null,Q=mxUtils.bind(this,function(P,V){if(!H)try{null!=f?(f.send(JSON.stringify({action:P,msg:V})),K||EditorUi.debug("P2PCollab: sending to socket server",[P],[V])):this.joinFile(!0)}catch(W){L=W,d.file.fireEvent(new mxEventObject("realtimeStateChanged")),
-EditorUi.debug("P2PCollab:","sendReply error",arguments,W)}});this.sendMessage=c;this.sendDiff=function(P){this.sendMessage("diff",{diff:P})};this.getState=function(){return null!=f?f.readyState:3};this.getLastError=function(){return L};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,V){},mouseMove:function(P,V){var W,q=-1;return function(){clearTimeout(W);var D=this,M=arguments,T=function(){W=null;q=Date.now();P.apply(D,M)};Date.now()-q>V?T():W=setTimeout(T,V)}}(function(P,
-V){l(V)},300),mouseUp:function(P,V){l(V)}};B.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(P,V){P=function(D){return null!=D?D.id:null};var W=null!=b.currentPage?b.currentPage.getId():null,q=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:W,removed:q?q.map(P):[],added:V?
+console.log("Error:",aa)}}function y(P,V){if(!K&&SimplePeer.WEBRTC_SUPPORT){var W=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});W.on("signal",function(n){Q("sendSignal",{to:P,from:G,signal:n})});W.on("error",function(n){delete F[P];EditorUi.debug("P2PCollab: p2p socket error",n);!H&&V&&W.destroyed&&E[P]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",P),y(P,!0))});W.on("connect",function(){delete F[P];null==U[P]||U[P].destroyed?(U[P]=W,E[P]=!0,EditorUi.debug("P2PCollab: p2p socket connected",
+P)):(W.noP2PMapDel=!0,W.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",P))});W.on("close",function(){W.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",P),A(x[P]),delete U[P])});W.on("data",t);return F[P]=W}}function C(P,V){A(V||x[P]);null!=P&&(delete x[P],E[P]=!1)}function A(P){var V=k[P];if(null!=V){var W=V.selection,n;for(n in W)null!=W[n]&&W[n].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete k[P]}}
+var B=b.editor.graph,J=0,e=null,g="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),k={},q=1,u={},x={},E={},z={},G,F={},U={},p=!0,v=!1,H=!1,K="0"!=urlParams["no-p2p"],N=!1,I=0,L=null,Q=mxUtils.bind(this,function(P,V){if(!H)try{null!=e?(e.send(JSON.stringify({action:P,msg:V})),K||EditorUi.debug("P2PCollab: sending to socket server",[P],[V])):this.joinFile(!0)}catch(W){L=W,d.file.fireEvent(new mxEventObject("realtimeStateChanged")),
+EditorUi.debug("P2PCollab:","sendReply error",arguments,W)}});this.sendMessage=c;this.sendDiff=function(P){this.sendMessage("diff",{diff:P})};this.getState=function(){return null!=e?e.readyState:3};this.getLastError=function(){return L};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,V){},mouseMove:function(P,V){var W,n=-1;return function(){clearTimeout(W);var D=this,M=arguments,T=function(){W=null;n=Date.now();P.apply(D,M)};Date.now()-n>V?T():W=setTimeout(T,V)}}(function(P,
+V){l(V)},300),mouseUp:function(P,V){l(V)}};B.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(P,V){P=function(D){return null!=D?D.id:null};var W=null!=b.currentPage?b.currentPage.getId():null,n=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:W,removed:n?n.map(P):[],added:V?
V.map(P):[]})};B.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var P in k)m(k[P])});mxEvent.addListener(B.container,"scroll",this.cursorHandler);B.getView().addListener(mxEvent.SCALE,this.cursorHandler);B.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);B.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",
-this.cursorHandler);this.joinFile=function(P){if(!H)try{N&&(EditorUi.debug("P2PCollab: joinInProgress on",N),L="busy");N=++I;try{null!=f&&(EditorUi.debug("P2PCollab: force closing socket on",f.joinId),f.close(1E3),f=null)}catch(q){EditorUi.debug("P2PCollab: closing socket error",q)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+e);V.addEventListener("open",function(q){f=V;f.joinId=N;N=!1;d.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",f.joinId);
-P&&d.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(q){K||EditorUi.debug("P2PCollab: msg received",[q]);var D=JSON.parse(q.data);K&&"message"!=D.action&&EditorUi.debug("P2PCollab: msg received",[q]);switch(D.action){case "message":t(D.msg,D.from);break;case "clientsList":q=D.msg;G=q.cId;u=!0;for(D=0;D<q.list.length;D++)y(q.list[D],!0);break;case "signal":q=D.msg;K||(F[q.from]?D=F[q.from]:(D=y(q.from,!1),p=!0),D.signal(q.signal));break;case "newClient":p=!0;break;case "clientLeft":C(D.msg);
-break;case "sendSignalFailed":q=D.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",q),delete F[q.to],E[q.to]=!1}}));var W=!1;V.addEventListener("close",mxUtils.bind(this,function(q){EditorUi.debug("P2PCollab: WebSocket closed",V.joinId,"reconnecting",q.code,q.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);H||1E3==q.code||I!=V.joinId||(N==I&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),N=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",
-V.joinId),W=!0,this.joinFile(!0)));d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(q){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",q);EditorUi.debug("P2PCollab: error socket on",V.joinId);H||I!=V.joinId||(N==I&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),N=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),W=!0,this.joinFile(!0)));d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));
-d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(q){L=q,d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!H){EditorUi.debug("P2PCollab: destroyed");H=!0;for(sessionId in k)A(sessionId);null!=this.mouseListeners&&B.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&B.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);
-null!=this.cursorHandler&&(mxEvent.removeListener(B.container,"scroll",this.cursorHandler),B.getView().removeListener(mxEvent.SCALE,this.cursorHandler),B.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),B.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=f&&(f.close(1E3),f=null);for(var P in U)null!=U[P]&&U[P].destroy();d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
+this.cursorHandler);this.joinFile=function(P){if(!H)try{N&&(EditorUi.debug("P2PCollab: joinInProgress on",N),L="busy");N=++I;try{null!=e&&(EditorUi.debug("P2PCollab: force closing socket on",e.joinId),e.close(1E3),e=null)}catch(n){EditorUi.debug("P2PCollab: closing socket error",n)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(n){e=V;e.joinId=N;N=!1;d.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",e.joinId);
+P&&d.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(n){K||EditorUi.debug("P2PCollab: msg received",[n]);var D=JSON.parse(n.data);K&&"message"!=D.action&&EditorUi.debug("P2PCollab: msg received",[n]);switch(D.action){case "message":t(D.msg,D.from);break;case "clientsList":n=D.msg;G=n.cId;v=!0;for(D=0;D<n.list.length;D++)y(n.list[D],!0);break;case "signal":n=D.msg;K||(F[n.from]?D=F[n.from]:(D=y(n.from,!1),p=!0),D.signal(n.signal));break;case "newClient":p=!0;break;case "clientLeft":C(D.msg);
+break;case "sendSignalFailed":n=D.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",n),delete F[n.to],E[n.to]=!1}}));var W=!1;V.addEventListener("close",mxUtils.bind(this,function(n){EditorUi.debug("P2PCollab: WebSocket closed",V.joinId,"reconnecting",n.code,n.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);H||1E3==n.code||I!=V.joinId||(N==I&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),N=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",
+V.joinId),W=!0,this.joinFile(!0)));d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(n){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",n);EditorUi.debug("P2PCollab: error socket on",V.joinId);H||I!=V.joinId||(N==I&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),N=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),W=!0,this.joinFile(!0)));d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));
+d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(n){L=n,d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!H){EditorUi.debug("P2PCollab: destroyed");H=!0;for(sessionId in k)A(sessionId);null!=this.mouseListeners&&B.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&B.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);
+null!=this.cursorHandler&&(mxEvent.removeListener(B.container,"scroll",this.cursorHandler),B.getView().removeListener(mxEvent.SCALE,this.cursorHandler),B.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),B.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=e&&(e.close(1E3),e=null);for(var P in U)null!=U[P]&&U[P].destroy();d.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
;
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index e01acf09..356f16ed 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -5855,6 +5855,9 @@ App.prototype.updateButtonContainer = function()
}
};
+/**
+ * For testing use notifs = [{timestamp: Date.now(), content: 'Test'}]
+ */
App.prototype.fetchAndShowNotification = function(target, subtarget)
{
if (this.fetchingNotif)
@@ -5991,21 +5994,36 @@ App.prototype.showNotification = function(notifs, lsReadFlag)
{
this.notificationBtn = document.createElement('div');
this.notificationBtn.className = 'geNotification-box';
-
- if (uiTheme == 'min')
+
+ var notifCount = document.createElement('span');
+ notifCount.className = 'geNotification-count';
+ this.notificationBtn.appendChild(notifCount);
+
+ if (Editor.currentTheme == 'simple' ||
+ Editor.currentTheme == 'min')
{
- this.notificationBtn.style.width = '30px';
- this.notificationBtn.style.top = '4px';
+ if (Editor.currentTheme != 'min' ||
+ urlParams['sketch'] == '1')
+ {
+ this.notificationBtn.style.width = '30px';
+ notifCount.style.marginRight = '-10px';
+ }
+
+ if (Editor.currentTheme == 'simple' ||
+ urlParams['sketch'] == '1')
+ {
+ this.notificationBtn.style.top = '7px';
+ }
+ else
+ {
+ this.notificationBtn.style.top = '4px';
+ }
}
else if (urlParams['atlas'] == '1')
{
this.notificationBtn.style.top = '2px';
}
- var notifCount = document.createElement('span');
- notifCount.className = 'geNotification-count';
- this.notificationBtn.appendChild(notifCount);
-
var notifBell = document.createElement('div');
notifBell.className = 'geNotification-bell';
notifBell.style.opacity = uiTheme == 'min'? '0.5' : '';
@@ -6927,7 +6945,7 @@ App.prototype.updateHeader = function()
mxEvent.consume(evt);
}));
- if (urlParams['live-ui'] != '1' && uiTheme != 'atlas' && urlParams['embed'] != '1')
+ if (!Editor.enableSimpleTheme && uiTheme != 'atlas' && urlParams['embed'] != '1')
{
this.darkModeElement = this.toggleFormatElement.cloneNode(true);
this.darkModeElement.setAttribute('title', mxResources.get('theme'));
diff --git a/src/main/webapp/js/diagramly/Devel.js b/src/main/webapp/js/diagramly/Devel.js
index ea638227..f9bfc798 100644
--- a/src/main/webapp/js/diagramly/Devel.js
+++ b/src/main/webapp/js/diagramly/Devel.js
@@ -32,8 +32,8 @@ if (!mxIsElectron && location.protocol !== 'http:')
'; ';
var styleHashes = '\'sha256-pVoUz0B9cDvBP/6KP+5uOMqPh1c14hF0KFqSELqeyNQ=\' ' + // index.html
- '\'sha256-cR/4glxXXRQGG5dXHk8/3xDJi1TSbDRy/iDCenCAUtI=\' ' + // Minimal.js/Light
- '\'sha256-F2GX+Xo20+2dLG42hJFsFOmMgHcYXVoslaChl+VtVnM=\' ' + // Minimal.js/Dark
+ '\'sha256-fz76QL1MJQS5qXbiXMmitTofZw/gTcjkFzzC/oUlp4c=\' ' + // Minimal.js/Light
+ '\'sha256-8pjr3H3fIwNWNcaaqjCv/GeVTzj2XsEz9vqCQrX/5aE=\' ' + // Minimal.js/Dark
'\'sha256-7kY8ozVqKLIIBwZ24dhdmZkM26PsOlZmEi72RhmZKoM=\' ' + // mxTooltipHandler.js
'\'sha256-kuk5TvxZ/Kwuobo4g6uasb1xRQwr1+nfa1A3YGePO7U=\' ' + // MathJax
'\'sha256-ByOXYIXIkfNC3flUR/HoxR4Ak0pjOEF1q8XmtuIa6po=\' ' + // purify.min.js
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 54afbb5c..0a11f0bb 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -5751,7 +5751,7 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
var container = document.createElement('div');
container.style.position = 'absolute';
container.style.border = '1px solid lightGray';
- container.style.left = '199px';
+ container.style.left = '200px';
container.style.width = '470px';
container.style.height = '376px';
container.style.overflow = 'hidden';
@@ -5854,78 +5854,50 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
var currentRev = null;
var currentDoc = null;
var currentXml = null;
-
- var zoomInBtn = mxUtils.button('', function()
+
+ var zoomInBtn = editorUi.createToolbarButton(Editor.zoomInImage, mxResources.get('zoomIn'), function()
{
if (currentDoc != null)
{
graph.zoomIn();
}
- });
- zoomInBtn.className = 'geSprite geSprite-zoomin';
- zoomInBtn.setAttribute('title', mxResources.get('zoomIn'));
- zoomInBtn.style.outline = 'none';
- zoomInBtn.style.border = 'none';
- zoomInBtn.style.margin = '2px';
+ }, 20);
+
zoomInBtn.setAttribute('disabled', 'disabled');
- mxUtils.setOpacity(zoomInBtn, 20);
-
- var zoomOutBtn = mxUtils.button('', function()
+
+ var zoomOutBtn = editorUi.createToolbarButton(Editor.zoomOutImage, mxResources.get('zoomOut'), function()
{
if (currentDoc != null)
{
graph.zoomOut();
}
- });
- zoomOutBtn.className = 'geSprite geSprite-zoomout';
- zoomOutBtn.setAttribute('title', mxResources.get('zoomOut'));
- zoomOutBtn.style.outline = 'none';
- zoomOutBtn.style.border = 'none';
- zoomOutBtn.style.margin = '2px';
+ }, 20);
+
zoomOutBtn.setAttribute('disabled', 'disabled');
- mxUtils.setOpacity(zoomOutBtn, 20);
- var zoomFitBtn = mxUtils.button('', function()
+ var zoomFitBtn = editorUi.createToolbarButton(Editor.zoomFitImage, mxResources.get('fit'), function()
{
if (currentDoc != null)
{
- graph.maxFitScale = 8;
- graph.fit(8);
+ if (graph.view.scale == 1)
+ {
+ graph.maxFitScale = 8;
+ graph.fit(8);
+ }
+ else
+ {
+ graph.zoomActual();
+ }
+
graph.center();
}
- });
- zoomFitBtn.className = 'geSprite geSprite-fit';
- zoomFitBtn.setAttribute('title', mxResources.get('fit'));
- zoomFitBtn.style.outline = 'none';
- zoomFitBtn.style.border = 'none';
- zoomFitBtn.style.margin = '2px';
+ }, 20);
+
zoomFitBtn.setAttribute('disabled', 'disabled');
- mxUtils.setOpacity(zoomFitBtn, 20);
-
- var zoomActualBtn = mxUtils.button('', function()
- {
- if (currentDoc != null)
- {
- graph.zoomActual();
- graph.center();
- }
- });
- zoomActualBtn.className = 'geSprite geSprite-actualsize';
- zoomActualBtn.setAttribute('title', mxResources.get('actualSize'));
- zoomActualBtn.style.outline = 'none';
- zoomActualBtn.style.border = 'none';
- zoomActualBtn.style.margin = '2px';
- zoomActualBtn.setAttribute('disabled', 'disabled');
- mxUtils.setOpacity(zoomActualBtn, 20);
// Gesture listener added below to handle pressed state
- var compareBtn = mxUtils.button('', function() { });
- compareBtn.className = 'geSprite geSprite-middle';
- compareBtn.setAttribute('title', mxResources.get('compare'));
- compareBtn.style.outline = 'none';
- compareBtn.style.border = 'none';
- compareBtn.style.margin = '2px';
- mxUtils.setOpacity(compareBtn, 60);
+ var compareBtn = editorUi.createToolbarButton(Editor.compareImage, mxResources.get('zoomOut'), null, 20);
+ compareBtn.setAttribute('disabled', 'disabled');
var cmpContainer = container.cloneNode(false);
cmpContainer.style.pointerEvent = 'none';
@@ -5941,6 +5913,19 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
cmpGraph.maxFitScale = null;
cmpGraph.centerZoom = true;
+ var fileInfo = document.createElement('div');
+ fileInfo.style.position = 'absolute';
+ fileInfo.style.textAlign = 'left';
+ fileInfo.style.color = 'gray';
+ fileInfo.style.marginTop = '8px';
+ fileInfo.style.backgroundColor = 'transparent';
+ fileInfo.style.top = '440px';
+ fileInfo.style.left = '32px';
+ fileInfo.style.maxWidth = '380px';
+ fileInfo.style.cursor = 'default';
+
+ var prevFileInfo = null;
+
mxEvent.addGestureListeners(compareBtn, function(e)
{
// Gets current state of page with given ID
@@ -5954,7 +5939,8 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
}
else
{
- fileInfo.style.display = 'none';
+ prevFileInfo = fileInfo.innerHTML;
+ fileInfo.innerHTML = mxResources.get('current');
container.style.display = 'none';
cmpContainer.style.display = '';
cmpContainer.style.backgroundColor = container.style.backgroundColor;
@@ -5972,23 +5958,12 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
if (container.style.display == 'none')
{
- fileInfo.style.display = '';
container.style.display = '';
+ fileInfo.innerHTML = prevFileInfo;
cmpContainer.style.display = 'none';
}
});
- var fileInfo = document.createElement('div');
- fileInfo.style.position = 'absolute';
- fileInfo.style.textAlign = 'right';
- fileInfo.style.color = 'gray';
- fileInfo.style.marginTop = '10px';
- fileInfo.style.backgroundColor = 'transparent';
- fileInfo.style.top = '440px';
- fileInfo.style.right = '32px';
- fileInfo.style.maxWidth = '380px';
- fileInfo.style.cursor = 'default';
-
var downloadBtn = mxUtils.button(mxResources.get('download'), function()
{
if (currentDoc != null)
@@ -6088,11 +6063,12 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
var pageSelect = document.createElement('select');
pageSelect.setAttribute('disabled', 'disabled');
- pageSelect.style.maxWidth = '80px';
+ pageSelect.style.userSelect = 'none';
+ pageSelect.style.maxWidth = '100px';
pageSelect.style.position = 'relative';
pageSelect.style.top = '-2px';
pageSelect.style.verticalAlign = 'bottom';
- pageSelect.style.marginRight = '6px';
+ pageSelect.style.marginLeft = '10px';
pageSelect.style.display = 'none';
var pageSelectFunction = null;
@@ -6146,7 +6122,8 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
var buttons = document.createElement('div');
buttons.style.position = 'absolute';
buttons.style.top = '482px';
- buttons.style.width = '640px';
+ buttons.style.right = '28px';
+ buttons.style.left = '32px';
buttons.style.textAlign = 'right';
var tb = document.createElement('div');
@@ -6154,8 +6131,8 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
tb.style.backgroundColor = 'transparent';
tb.style.padding = '2px';
tb.style.border = 'none';
- tb.style.left = '199px';
tb.style.top = '442px';
+ tb.style.right = '28px';
var currentElt = null;
@@ -6343,7 +6320,6 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
zoomInBtn.removeAttribute('disabled');
zoomOutBtn.removeAttribute('disabled');
zoomFitBtn.removeAttribute('disabled');
- zoomActualBtn.removeAttribute('disabled');
compareBtn.removeAttribute('disabled');
if (file == null || !file.isRestricted())
@@ -6361,7 +6337,6 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
mxUtils.setOpacity(zoomInBtn, 60);
mxUtils.setOpacity(zoomOutBtn, 60);
mxUtils.setOpacity(zoomFitBtn, 60);
- mxUtils.setOpacity(zoomActualBtn, 60);
mxUtils.setOpacity(compareBtn, 60);
}
else
@@ -6369,6 +6344,7 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
pageSelect.style.display = 'none';
pageSelect.innerText = '';
fileInfo.innerText = '';
+ errorNode.innerText = '';
mxUtils.write(fileInfo, mxResources.get('errorLoadingFile'));
mxUtils.write(errorNode, mxResources.get('errorLoadingFile'));
}
@@ -6401,7 +6377,6 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
downloadBtn.setAttribute('disabled', 'disabled');
zoomInBtn.setAttribute('disabled', 'disabled');
zoomOutBtn.setAttribute('disabled', 'disabled');
- zoomActualBtn.setAttribute('disabled', 'disabled');
zoomFitBtn.setAttribute('disabled', 'disabled');
compareBtn.setAttribute('disabled', 'disabled');
@@ -6412,7 +6387,6 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
mxUtils.setOpacity(zoomInBtn, 20);
mxUtils.setOpacity(zoomOutBtn, 20);
mxUtils.setOpacity(zoomFitBtn, 20);
- mxUtils.setOpacity(zoomActualBtn, 20);
mxUtils.setOpacity(compareBtn, 20);
spinner.spin(container);
@@ -6505,12 +6479,11 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
});
closeBtn.className = 'geBtn';
- tb.appendChild(pageSelect);
- tb.appendChild(zoomInBtn);
+ tb.appendChild(compareBtn);
tb.appendChild(zoomOutBtn);
- tb.appendChild(zoomActualBtn);
tb.appendChild(zoomFitBtn);
- tb.appendChild(compareBtn);
+ tb.appendChild(zoomInBtn);
+ tb.appendChild(pageSelect);
if (editorUi.editor.cancelFirst)
{
@@ -8009,7 +7982,7 @@ var MoreShapesDialog = function(editorUi, expanded, entries)
}
else if (entry.image != null)
{
- preview.innerHTML += '<img border="0" src="' + entry.image + '"/>';
+ preview.innerHTML += '<img border="0" style="max-width:100%;" src="' + entry.image + '"/>';
}
else if (entry.desc == null)
{
diff --git a/src/main/webapp/js/diagramly/DrawioFile.js b/src/main/webapp/js/diagramly/DrawioFile.js
index a5b5b605..b77b5936 100644
--- a/src/main/webapp/js/diagramly/DrawioFile.js
+++ b/src/main/webapp/js/diagramly/DrawioFile.js
@@ -1687,19 +1687,8 @@ DrawioFile.prototype.addAllSavedStatus = function(status)
if (this.ui.statusContainer != null && this.ui.getCurrentFile() == this)
{
status = (status != null) ? status : mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));
- this.ui.editor.setStatus('<div title="'+ status + '">' + status + '</div>');
- var links = this.ui.statusContainer.getElementsByTagName('div');
-
- if (links.length > 0 && this.isRevisionHistorySupported())
- {
- links[0].style.cursor = 'pointer';
- links[0].style.textDecoration = 'underline';
-
- mxEvent.addListener(links[0], 'click', mxUtils.bind(this, function()
- {
- this.ui.actions.get('revisionHistory').funct();
- }));
- }
+ var rev = (this.isRevisionHistorySupported()) ? 'data-action="revisionHistory" ' : '';
+ this.ui.editor.setStatus('<div ' + rev + 'title="'+ status + '">' + status + '</div>');
}
};
@@ -1775,22 +1764,11 @@ DrawioFile.prototype.addUnsavedStatus = function(err)
if (err instanceof Error && err.message != null && err.message != '')
{
var status = mxUtils.htmlEntities(mxResources.get('unsavedChanges'));
-
- this.ui.editor.setStatus('<div title="'+ status + '" class="geStatusAlert">' +
- status + ' (' + mxUtils.htmlEntities(err.message) + ')</div>');
-
- // Installs click handler for error message
- var links = this.ui.statusContainer.getElementsByTagName('div');
-
- if (links != null && links.length > 0)
- {
- links[0].style.cursor = 'pointer';
-
- mxEvent.addListener(links[0], 'click', mxUtils.bind(this, function()
- {
- this.ui.showError(mxResources.get('unsavedChanges'), mxUtils.htmlEntities(err.message));
- }));
- }
+ this.ui.editor.setStatus('<div title="'+ status + '" data-title="' +
+ mxUtils.htmlEntities(mxResources.get('unsavedChanges')) +
+ '" data-message="' + mxUtils.htmlEntities(err.message) +
+ '" class="geStatusAlert">' + status + ' (' +
+ mxUtils.htmlEntities(err.message) + ')</div>');
}
else
{
@@ -1814,30 +1792,12 @@ DrawioFile.prototype.addUnsavedStatus = function(err)
var status = mxUtils.htmlEntities(mxResources.get('unsavedChangesClickHereToSave')) +
((msg != null && msg != '') ? ' (' + mxUtils.htmlEntities(msg) + ')' : '');
- this.ui.editor.setStatus('<div title="'+ status + '" class="geStatusAlertOrange">' + status +
+ var action = 'data-action="' + ((this.ui.mode == null || !this.isEditable()) ?
+ 'saveAs' : 'save') + '"';
+ this.ui.editor.setStatus('<div ' + action + ' title="' +
+ status + '" class="geStatusAlertOrange">' + status +
' <img src="' + Editor.saveImage + '"/></div>');
- // Installs click handler for saving
- var links = this.ui.statusContainer.getElementsByTagName('div');
-
- if (links != null && links.length > 0)
- {
- links[0].style.cursor = 'pointer';
-
- mxEvent.addListener(links[0], 'click', mxUtils.bind(this, function()
- {
- this.ui.actions.get((this.ui.mode == null || !this.isEditable()) ?
- 'saveAs' : 'save').funct();
- }));
- }
- else
- {
- var status = mxUtils.htmlEntities(mxResources.get('unsavedChanges'));
-
- this.ui.editor.setStatus('<div title="'+ status + '" class="geStatusAlert">' + status +
- ' (' + mxUtils.htmlEntities(err.message) + ')</div>');
- }
-
if (EditorUi.enableDrafts && (this.getMode() == null || EditorUi.isElectronApp))
{
this.lastDraftSave = this.lastDraftSave || Date.now();
@@ -1870,7 +1830,7 @@ DrawioFile.prototype.addUnsavedStatus = function(err)
* Halts all timers and shows a conflict status message. The optional error
* handler is invoked first.
*/
-DrawioFile.prototype.addConflictStatus = function(fn, message)
+DrawioFile.prototype.addConflictStatus = function(message, fn)
{
if (this.invalidChecksum && message == null)
{
@@ -1878,39 +1838,22 @@ DrawioFile.prototype.addConflictStatus = function(fn, message)
}
this.setConflictStatus(mxUtils.htmlEntities(mxResources.get('fileChangedSync')) +
- ((message != null && message != '') ? ' (' + mxUtils.htmlEntities(message) + ')' : ''));
+ ((message != null && message != '') ? ' (' +
+ mxUtils.htmlEntities(message) + ')' : ''), fn);
this.ui.spinner.stop();
this.clearAutosave();
-
- var links = (this.ui.statusContainer != null) ? this.ui.statusContainer.getElementsByTagName('div') : null;
-
- if (links != null && links.length > 0)
- {
- links[0].style.cursor = 'pointer';
-
- mxEvent.addListener(links[0], 'click', mxUtils.bind(this, function(evt)
- {
- if (mxEvent.getSource(evt).nodeName != 'IMG')
- {
- fn();
- }
- }));
- }
- else
- {
- this.ui.alert(mxUtils.htmlEntities(mxResources.get('fileChangedSync')), fn);
- }
};
/**
* Halts all timers and shows a conflict status message. The optional error
* handler is invoked first.
*/
-DrawioFile.prototype.setConflictStatus = function(message)
+DrawioFile.prototype.setConflictStatus = function(message, fn)
{
- this.ui.editor.setStatus('<div title="'+ message + '" class="geStatusAlert">' + message +
- ' <a href="https://www.diagrams.net/doc/faq/synchronize" title="' + mxResources.get('help') +
- '" target="_blank">' + '<img src="' + Editor.helpImage + '"/></a></div>');
+ this.ui.editor.setStatus('<div title="'+ message + '" ' + ((fn != null) ?
+ 'data-action="statusFunction"' : '') + ' class="geStatusAlert">' + message +
+ '<img data-link="https://www.diagrams.net/doc/faq/synchronize" src="' +
+ Editor.helpImage + '" style="cursor:help;"/></div>', fn);
};
/**
@@ -1933,10 +1876,10 @@ DrawioFile.prototype.showRefreshDialog = function(success, error, message)
else
{
// Allows for escape key to be pressed while dialog is showing
- this.addConflictStatus(mxUtils.bind(this, function()
+ this.addConflictStatus(message, mxUtils.bind(this, function()
{
this.showRefreshDialog(success, error);
- }), message);
+ }));
this.ui.showError(mxResources.get('warning') + ' (' + message + ')',
mxResources.get('fileChangedSyncDialog'),
@@ -2210,12 +2153,12 @@ DrawioFile.prototype.handleConflictError = function(err, manual)
}
else
{
- this.addConflictStatus(mxUtils.bind(this, function()
+ this.addConflictStatus(this.getErrorMessage(err), mxUtils.bind(this, function()
{
this.ui.editor.setStatus(mxUtils.htmlEntities(
mxResources.get('updatingDocument')));
this.synchronizeFile(success, error);
- }), this.getErrorMessage(err));
+ }));
}
};
@@ -2437,54 +2380,64 @@ DrawioFile.prototype.autosave = function(delay, maxDelay, success, error)
// Starts new timer or executes immediately if not unsaved for maxDelay
var thread = window.setTimeout(mxUtils.bind(this, function()
{
- this.lastAutosave = null;
-
- if (this.autosaveThread == thread)
- {
- this.autosaveThread = null;
- }
-
- EditorUi.debug('DrawioFile.autosave', [this], 'thread', thread,
- 'modified', this.isModified(), 'now', this.isAutosaveNow(),
- 'saving', this.savingFile);
-
- // Workaround for duplicate save if UI is blocking
- // after save while pending autosave triggers
- if (this.isModified() && this.isAutosaveNow())
+ try
{
- var rev = this.isAutosaveRevision();
+ this.lastAutosave = null;
- if (rev)
+ if (this.autosaveThread == thread)
{
- this.lastAutosaveRevision = new Date().getTime();
+ this.autosaveThread = null;
}
+
+ EditorUi.debug('DrawioFile.autosave', [this], 'thread', thread,
+ 'modified', this.isModified(), 'now', this.isAutosaveNow(),
+ 'saving', this.savingFile);
- this.save(rev, mxUtils.bind(this, function(resp)
+ // Workaround for duplicate save if UI is blocking
+ // after save while pending autosave triggers
+ if (this.isModified() && this.isAutosaveNow())
{
- this.autosaveCompleted();
+ var rev = this.isAutosaveRevision();
- if (success != null)
+ if (rev)
{
- success(resp);
+ this.lastAutosaveRevision = new Date().getTime();
}
- }), mxUtils.bind(this, function(resp)
+
+ this.save(rev, mxUtils.bind(this, function(resp)
+ {
+ this.autosaveCompleted();
+
+ if (success != null)
+ {
+ success(resp);
+ }
+ }), mxUtils.bind(this, function(resp)
+ {
+ if (error != null)
+ {
+ error(resp);
+ }
+ }));
+ }
+ else
{
- if (error != null)
+ if (!this.isModified())
{
- error(resp);
+ this.ui.editor.setStatus('');
}
- }));
+
+ if (success != null)
+ {
+ success(null);
+ }
+ }
}
- else
+ catch (e)
{
- if (!this.isModified())
- {
- this.ui.editor.setStatus('');
- }
-
- if (success != null)
+ if (error != null)
{
- success(null);
+ error(e);
}
}
}), tmp);
diff --git a/src/main/webapp/js/diagramly/DrawioFileSync.js b/src/main/webapp/js/diagramly/DrawioFileSync.js
index 206f72bf..de1e7df1 100644
--- a/src/main/webapp/js/diagramly/DrawioFileSync.js
+++ b/src/main/webapp/js/diagramly/DrawioFileSync.js
@@ -234,12 +234,7 @@ DrawioFileSync.prototype.syncChangeCounter = 0;
/**
* Specifies if notifications should be sent and received for changes.
*/
-DrawioFileSync.prototype.enabled = true;
-
-/**
- * True if a change event is fired for a remote change.
- */
-DrawioFileSync.prototype.updateStatusInterval = 10000;
+ DrawioFileSync.prototype.enabled = true;
/**
* Holds the channel ID for sending and receiving change notifications.
@@ -627,9 +622,7 @@ DrawioFileSync.prototype.updateStatus = function()
str = mxResources.get('lessThanAMinute');
}
- var history = this.file.isRevisionHistorySupported();
-
- // Consumed and displays last message
+ // Consumes and displays last message
var msg = this.lastMessage;
this.lastMessage = null;
@@ -639,55 +632,12 @@ DrawioFileSync.prototype.updateStatus = function()
}
var label = mxResources.get('lastChange', [str]);
-
- this.ui.editor.setStatus('<div title="'+ mxUtils.htmlEntities(label) + '">' + mxUtils.htmlEntities(label) + '</div>' +
+ var rev = (this.file.isRevisionHistorySupported()) ? 'data-action="revisionHistory" ' : '';
+ this.ui.editor.setStatus('<div ' + rev + 'title="'+ mxUtils.htmlEntities(label) + '">' + mxUtils.htmlEntities(label) + '</div>' +
(this.file.isEditable() ? '' : '<div class="geStatusAlert">' + mxUtils.htmlEntities(mxResources.get('readOnly')) + '</div>') +
(this.isConnected() ? '' : '<div class="geStatusAlert">' + mxUtils.htmlEntities(mxResources.get('disconnected')) + '</div>') +
- ((msg != null) ? ' <span title="' + mxUtils.htmlEntities(msg) + '">(' + mxUtils.htmlEntities(msg) + ')</span>' : ''));
- var links = this.ui.statusContainer.getElementsByTagName('div');
-
- if (links.length > 0 && history)
- {
- links[0].style.display = 'inline-block';
+ ((msg != null) ? ' <div data-effect="fade" title="' + mxUtils.htmlEntities(msg) + '">(' + mxUtils.htmlEntities(msg) + ')</div>' : ''));
- if (history)
- {
- links[0].style.cursor = 'pointer';
- links[0].style.textDecoration = 'underline';
-
- mxEvent.addListener(links[0], 'click', mxUtils.bind(this, function()
- {
- this.ui.actions.get('revisionHistory').funct();
- }));
- }
- }
-
- // Fades in/out last message
- var spans = this.ui.statusContainer.getElementsByTagName('span');
-
- if (spans.length > 0)
- {
- var temp = spans[0];
- temp.style.opacity = '0';
- mxUtils.setPrefixedStyle(temp.style, 'transition', 'all 0.2s ease');
-
- window.setTimeout(mxUtils.bind(this, function()
- {
- mxUtils.setOpacity(temp, 100);
- mxUtils.setPrefixedStyle(temp.style, 'transition', 'all 1s ease');
-
- window.setTimeout(mxUtils.bind(this, function()
- {
- mxUtils.setOpacity(temp, 0);
-
- window.setTimeout(mxUtils.bind(this, function()
- {
- this.updateStatus();
- }), 1000);
- }), this.updateStatusInterval / 2);
- }), 0);
- }
-
this.resetUpdateStatusThread();
}
else
@@ -712,7 +662,7 @@ DrawioFileSync.prototype.resetUpdateStatusThread = function()
this.updateStatusThread = window.setInterval(mxUtils.bind(this, function()
{
this.updateStatus();
- }), this.updateStatusInterval);
+ }), Editor.updateStatusInterval);
}
};
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index 0deb37ba..60ab0a47 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -19,34 +19,6 @@
}
/**
- * Specifies the app name. Default is document.title.
- */
- Editor.prototype.appName = 'diagrams.net';
-
- /**
- * Known file types.
- */
- 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'}];
-
- /**
- * Known file types.
- */
- Editor.prototype.libraryFileTypes = [{description: 'Library (.drawiolib, .xml)', extensions: ['drawiolib', 'xml']}];
-
- /**
- * Additional help text for special file extensions.
- */
- Editor.prototype.fileExtensions = [
- {ext: 'html', title: 'filetypeHtml'},
- {ext: 'png', title: 'filetypePng'},
- {ext: 'svg', title: 'filetypeSvg'}];
-
- /**
* Definitions for sketch font styles.
*/
Editor.sketchFontFamily = 'Architects Daughter';
@@ -142,10 +114,6 @@
/**
* Error image for not found images
*/
-
- /**
- * Error image for not found images
- */
Editor.configurationKey = '.configuration';
/**
@@ -167,6 +135,12 @@
* Specifies if custom properties should be enabled.
*/
Editor.enableCustomProperties = true;
+
+ /**
+ * Specifies if the simple theme should be enabled. This theme can be used
+ * at runtime in the kennedy theme.
+ */
+ Editor.enableSimpleTheme = urlParams['live-ui'] == '1';
/**
* Sets the default value for including a copy of the diagram.
@@ -2105,6 +2079,39 @@
};
/**
+ * Interval for updating the file status.
+ */
+ Editor.updateStatusInterval = 10000;
+
+ /**
+ * Specifies the app name. Default is document.title.
+ */
+ Editor.prototype.appName = 'diagrams.net';
+
+ /**
+ * Known file types.
+ */
+ 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'}];
+
+ /**
+ * Known file types.
+ */
+ Editor.prototype.libraryFileTypes = [{description: 'Library (.drawiolib, .xml)', extensions: ['drawiolib', 'xml']}];
+
+ /**
+ * Additional help text for special file extensions.
+ */
+ Editor.prototype.fileExtensions = [
+ {ext: 'html', title: 'filetypeHtml'},
+ {ext: 'png', title: 'filetypePng'},
+ {ext: 'svg', title: 'filetypeSvg'}];
+
+ /**
* General timeout is 25 seconds.
*/
Editor.prototype.timeout = 25000;
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 28d904c2..6d15e8e0 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -8614,6 +8614,8 @@
else if (done != null)
{
done(null);
+ this.showError(mxResources.get('error'), xhr.status == 413? mxResources.get('diagramTooLarge') :
+ mxResources.get('unknownError'));
}
}
});
@@ -10671,7 +10673,6 @@
window.setTimeout(mxUtils.bind(this, function()
{
this.fireEvent(new mxEventObject('currentThemeChanged'));
- this.editor.fireEvent(new mxEventObject('statusChanged'));
// Restores scroll position
this.editor.graph.refresh();
@@ -10830,7 +10831,7 @@
this.createShapesWindow();
this.sidebarContainer.style.left = '0px';
this.sidebarContainer.style.top = '0px';
- this.sidebarContainer.style.bottom = '0px';
+ this.sidebarContainer.style.bottom = '63px';
this.sidebarContainer.style.width = '100%';
}
@@ -11146,8 +11147,8 @@
this.sketchPickerMenuElt = document.createElement('div');
this.sketchPickerMenuElt.className = 'geToolbarContainer';
this.sketchPickerMenuElt.style.cssText = 'position:absolute;left:10px;border-radius:4px;' +
- 'padding:0px 4px 4px;white-space:nowrap;' +
- 'z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;';
+ 'padding:0px 4px 4px;white-space:nowrap;max-height:100%;width:48px;z-index:1;' +
+ 'box-sizing:border-box;transform:translate(0, -50%);top:50%;user-select:none;';
var picker = this.sketchPickerMenuElt;
mxUtils.setPrefixedStyle(picker.style, 'transition', 'transform .3s ease-out');
@@ -11278,12 +11279,13 @@
{
mxUtils.setPrefixedStyle(picker.style, 'transform', 'translate(0, -50%)');
picker.style.padding = '8px 6px 4px';
- picker.style.width = '40px';
+ picker.style.width = '48px';
picker.style.top = '50%';
picker.style.bottom = '';
picker.style.height = '';
foldImg.style.backgroundImage = 'url(' + mxWindow.prototype.normalizeImage + ')';
foldImg.setAttribute('title', 'Minimize'/*TODO:mxResources.get('minimize')*/);
+ foldImg.style.width = '100%';
foldImg.style.height = '14px';
collapsed = false;
initPicker();
@@ -11293,13 +11295,13 @@
picker.innerText = '';
picker.appendChild(foldImg);
mxUtils.setPrefixedStyle(picker.style, 'transform', 'translate(0, 0)');
+ picker.style.width = 'auto';
picker.style.bottom = '12px';
picker.style.padding = '0px';
- picker.style.height = '24px';
- picker.style.width = '24px';
picker.style.top = '';
foldImg.style.backgroundImage = 'url(' + Editor.plusImage + ')';
foldImg.setAttribute('title', mxResources.get('insert'));
+ foldImg.style.width = '24px';
foldImg.style.height = '24px';
collapsed = true;
}
@@ -11331,16 +11333,24 @@
'min-width:40px;justify-content:flex-end;align-items:center;';
this.sketchWrapperElt.appendChild(this.sketchMenubarElt);
- if (urlParams['embed'] != '1' && this.getServiceName() != 'atlassian')
+ // Moves menu away if picker overlaps
+ var refreshMenu = mxUtils.bind(this, function()
{
- this.installStatusMinimizer(this.sketchMenubarElt);
- }
+ var overflow = (this.sketchPickerMenuElt.offsetTop -
+ this.sketchPickerMenuElt.offsetHeight / 2 < 58);
+ this.sketchMainMenuElt.style.left = (overflow) ? '70px' : '10px';
+ this.sketchMenubarElt.style.maxWidth = (overflow) ?
+ 'calc(100% - 230px)' : 'calc(100% - 170px)';
+
+ });
+
+ refreshMenu();
+ mxEvent.addListener(window, 'resize', refreshMenu);
}
if (this.statusContainer != null)
{
this.statusContainer.style.flexShrink = '1';
- this.statusContainer.style.overflow = 'hidden';
this.sketchMenubarElt.appendChild(this.statusContainer);
}
@@ -11406,17 +11416,18 @@
/**
* Overrides image dialog to add image search and Google+.
*/
- EditorUi.prototype.createMenu = function(key, img)
+ EditorUi.prototype.createMenu = function(key, img, className)
{
+ className = (className != null) ? className : 'geToolbarButton';
var menu = this.menus.get(key);
var elt = this.menubar.addMenu(mxResources.get(key), menu.funct);
- elt.className = 'geToolbarButton';
+ elt.className = className;
elt.style.display = 'inline-block';
elt.style.cursor = 'pointer';
elt.style.height = '24px';
elt.setAttribute('title', mxResources.get(key));
- this.menus.menuCreated(menu, elt, 'geToolbarButton');
+ this.menus.menuCreated(menu, elt, className);
if (img != null)
{
@@ -11432,13 +11443,14 @@
};
/**
- * Overrides image dialog to add image search and Google+.
+ * Create toolbar button.
*/
- EditorUi.prototype.createMenuItem = function(key, img, ignoreState)
+ EditorUi.prototype.createToolbarButton = function(img, title, fn, size)
{
+ size = (size != null) ? size : 24;
var btn = document.createElement('a');
- btn.className = 'geToolbarButton';
- btn.setAttribute('title', mxResources.get(key));
+ btn.className = 'geToolbarButton geAdaptiveAsset';
+ btn.setAttribute('title', title);
btn.style.backgroundImage = 'url(' + img + ')';
btn.style.backgroundPosition = 'center center';
btn.style.backgroundRepeat = 'no-repeat';
@@ -11446,12 +11458,10 @@
btn.style.display = 'inline-block';
btn.style.cursor = 'pointer';
btn.style.marginLeft = '6px';
- btn.style.width = '24px';
- btn.style.height = '24px';
-
- var action = this.actions.get(key);
+ btn.style.width = size + 'px';
+ btn.style.height = size + 'px';
- if (action != null)
+ if (fn != null)
{
// Prevents focus
mxEvent.addListener(btn, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',
@@ -11464,12 +11474,27 @@
{
if (btn.getAttribute('disabled') != 'disabled')
{
- action.funct(evt);
+ fn(evt);
}
mxEvent.consume(evt);
});
-
+ }
+
+ return btn;
+ };
+
+ /**
+ * Overrides image dialog to add image search and Google+.
+ */
+ EditorUi.prototype.createMenuItem = function(key, img, ignoreState)
+ {
+ var action = this.actions.get(key);
+ var fn = (action != null) ? action.funct : null;
+ var btn = this.createToolbarButton(img, mxResources.get(key), fn);
+
+ if (action != null)
+ {
if (!ignoreState)
{
function updateState()
@@ -11594,6 +11619,96 @@
};
/**
+ *
+ */
+ EditorUi.prototype.createShapesPanel = function(container)
+ {
+ var div = document.createElement('div');
+ div.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;';
+ div.className = 'geTitle';
+ var span = document.createElement('span');
+ span.style.fontSize = '18px';
+ span.style.marginRight = '5px';
+ span.innerHTML = '+';
+ div.appendChild(span);
+ mxUtils.write(div, mxResources.get('moreShapes'));
+ container.appendChild(div);
+
+ mxEvent.addListener(div, 'click', mxUtils.bind(this, function()
+ {
+ this.actions.get('shapes').funct();
+ }));
+
+ // var menuObj = new Menubar(this, container);
+
+ var addMenu = mxUtils.bind(this, function(id, label)
+ {
+ var elt = this.createMenu(id, null, 'geTitle');
+
+ elt.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;';
+ container.appendChild(elt);
+
+ return elt;
+ });
+
+ if (Editor.enableCustomLibraries && (urlParams['embed'] != '1' || urlParams['libraries'] == '1'))
+ {
+ // Defined in native apps together with openLibrary
+ if (this.actions.get('newLibrary') != null)
+ {
+ var div = document.createElement('div');
+ div.style.cssText = 'position:absolute;left:0px;width:50%;border-top:1px solid lightgray;' +
+ 'height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;';
+ div.className = 'geTitle';
+ var span = document.createElement('span');
+ span.style.cssText = 'position:relative;top:6px;';
+ mxUtils.write(span, mxResources.get('newLibrary'));
+ div.appendChild(span);
+ container.appendChild(div);
+
+ mxEvent.addListener(div, 'click', this.actions.get('newLibrary').funct);
+
+ var div = div.cloneNode(false);
+ div.style.left = '50%';
+ div.style.borderLeft = '1px solid lightgray';
+ var span = span.cloneNode(false);
+ mxUtils.write(span, mxResources.get('openLibrary'));
+ div.appendChild(span);
+ container.appendChild(div);
+
+ mxEvent.addListener(div, 'click', this.actions.get('openLibrary').funct);
+ }
+ else
+ {
+ var elt = addMenu('newLibrary', mxResources.get('newLibrary'));
+ elt.style.boxSizing = 'border-box';
+ elt.style.paddingRight = '6px';
+ elt.style.paddingLeft = '6px';
+ elt.style.height = '32px';
+ elt.style.left = '0';
+
+ var elt = addMenu('openLibraryFrom', mxResources.get('openLibraryFrom'));
+ elt.style.borderLeft = '1px solid lightgray';
+ elt.style.boxSizing = 'border-box';
+ elt.style.paddingRight = '6px';
+ elt.style.paddingLeft = '6px';
+ elt.style.height = '32px';
+ elt.style.left = '50%';
+ }
+ }
+ else
+ {
+ div.style.bottom = '0';
+ }
+
+ container.appendChild(this.sidebarContainer);
+ container.style.overflow = 'hidden';
+ };
+
+ /**
* Overrides image dialog to add image search and Google+.
*/
EditorUi.prototype.createShapesWindow = function()
@@ -11610,7 +11725,7 @@
Math.max(30, (this.diagramContainer.parentNode.clientHeight - h) / 2) : 56,
w - 6, h - 6, mxUtils.bind(this, function(container)
{
- container.appendChild(this.sidebarContainer);
+ this.createShapesPanel(container);
}));
this.sidebarWindow.window.addListener(mxEvent.SHOW, mxUtils.bind(this, function()
@@ -11673,6 +11788,7 @@
'html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }'
) +
// End of custom styles
+ 'html body .geStatus > *:not([class]) { vertical-align:top; }' +
'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }' +
'html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }' +
'html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }' +
@@ -12756,6 +12872,11 @@
{
this.openLocalFile(req.getText(), null, true);
}
+ else
+ {
+ this.showError(mxResources.get('error'), req.getStatus() == 413? mxResources.get('diagramTooLarge') :
+ mxResources.get('unknownError'));
+ }
}));
}
}
@@ -14401,10 +14522,18 @@
// Asynchronous parsing via server
this.parseFileData(data, mxUtils.bind(this, function(xhr)
{
- if (xhr.readyState == 4 && xhr.status >= 200 && xhr.status <= 299 &&
- xhr.responseText.substring(0, 13) == '<mxGraphModel')
+ if (xhr.readyState == 4)
{
- doLoad(xhr.responseText, evt);
+ if (xhr.status >= 200 && xhr.status <= 299 &&
+ xhr.responseText.substring(0, 13) == '<mxGraphModel')
+ {
+ doLoad(xhr.responseText, evt);
+ }
+ else
+ {
+ this.handleError({message: xhr.status == 413? mxResources.get('diagramTooLarge') :
+ mxResources.get('unknownError')});
+ }
}
}), '');
}
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index bc0b6368..e86c4cff 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -1268,8 +1268,10 @@
{
var menubar = menusCreateMenuBar.apply(this, arguments);
- if (menubar != null && urlParams['embed'] != '1' &&
- uiTheme != 'atlas' && urlParams['live-ui'] == '1')
+ if (menubar != null && Editor.enableSimpleTheme &&
+ editorUi.getServiceName() != 'atlassian' &&
+ urlParams['embed'] != '1' &&
+ uiTheme != 'atlas')
{
var themeMenu = this.get('appearance');
@@ -1282,7 +1284,6 @@
elt.style.backgroundRepeat = 'no-repeat';
elt.style.backgroundSize = '100% 100%';
elt.style.display = 'inline-block';
- elt.style.verticalAlign = 'top';
elt.style.marginLeft = '2px';
elt.style.cursor = 'pointer';
elt.style.zIndex = '1';
@@ -2923,7 +2924,7 @@
this.addMenuItems(menu, ['toggleDarkMode'], parent);
}
- this.addMenuItems(menu, ['toggleSimpleMode', 'toggleSketchMode'], parent);
+ this.addMenuItems(menu, ['toggleSimpleMode'], parent);
})));
this.put('theme', new Menu(mxUtils.bind(this, function(menu, parent)
@@ -3316,8 +3317,8 @@
{
graph.startEditingAtCell(insertVertex('Text', 40, 20, 'text;html=1;resizable=0;autosize=1;' +
'align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;',
- (evt != null && !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt)) ?
- graph.getInsertPoint() : null));
+ (evt != null && !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt) &&
+ graph.isMouseInsertPoint()) ? graph.getInsertPoint() : null));
}
}, null, null, Editor.ctrlKey + '+Shift+X/A')).isEnabled = isGraphEnabled;
@@ -3326,8 +3327,8 @@
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
{
insertVertex('', 120, 60, 'whiteSpace=wrap;html=1;', (evt != null &&
- !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt)) ?
- graph.getInsertPoint() : null);
+ !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt) &&
+ graph.isMouseInsertPoint()) ? graph.getInsertPoint() : null);
}
}, null, null, 'D')).isEnabled = isGraphEnabled;
@@ -3338,8 +3339,8 @@
insertVertex('', 140, 160, '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;',
- (evt != null && !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt)) ?
- graph.getInsertPoint() : null);
+ (evt != null && !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt) &&
+ graph.isMouseInsertPoint()) ? graph.getInsertPoint() : null);
}
}, null, null, 'S')).isEnabled = isGraphEnabled;
@@ -3348,8 +3349,8 @@
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
{
insertVertex('', 80, 80, 'ellipse;whiteSpace=wrap;html=1;', (evt != null &&
- !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt)) ?
- graph.getInsertPoint() : null);
+ !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt) &&
+ graph.isMouseInsertPoint()) ? graph.getInsertPoint() : null);
}
}, null, null, 'F')).isEnabled = isGraphEnabled;
@@ -3358,8 +3359,8 @@
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
{
insertVertex('', 80, 80, 'rhombus;whiteSpace=wrap;html=1;', (evt != null &&
- !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt)) ?
- graph.getInsertPoint() : null);
+ !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt) &&
+ graph.isMouseInsertPoint()) ? graph.getInsertPoint() : null);
}
})).isEnabled = isGraphEnabled;
@@ -3368,8 +3369,8 @@
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
{
insertEdge('', graph.defaultEdgeLength, 'edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;',
- (evt != null && !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt)) ?
- graph.getInsertPoint() : null);
+ (evt != null && !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt) &&
+ graph.isMouseInsertPoint()) ? graph.getInsertPoint() : null);
}
}, null, null, 'C')).isEnabled = isGraphEnabled;
@@ -3474,7 +3475,7 @@
editorUi.showImportCsvDialog();
}, parent, null, isGraphEnabled());
- if (uiTheme == 'min')
+ if (Editor.currentTheme == 'simple' || Editor.currentTheme == 'min')
{
this.addMenuItems(menu, ['-', 'createShape',
'editDiagram'], parent);
diff --git a/src/main/webapp/js/diagramly/Settings.js b/src/main/webapp/js/diagramly/Settings.js
index 4f1f7aee..cb1cac30 100644
--- a/src/main/webapp/js/diagramly/Settings.js
+++ b/src/main/webapp/js/diagramly/Settings.js
@@ -264,7 +264,7 @@ var mxSettings =
recentColors: [],
formatWidth: mxSettings.defaultFormatWidth,
createTarget: urlParams['sketch'] == '1' ||
- urlParams['live-ui'] == '1',
+ Editor.enableSimpleTheme,
pageFormat: mxGraph.prototype.pageFormat,
search: true,
showStartScreen: true,
diff --git a/src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js b/src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js
index d327499e..a501e005 100644
--- a/src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js
+++ b/src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js
@@ -14,7 +14,7 @@
this.addEntry(dt + 'person', function()
{
var bg = new mxCell('',
- new mxGeometry(0, 0, w * 2, h * 1.8), 'html=1;fontSize=11;dashed=0;whitespace=wrap;fillColor=#083F75;strokeColor=#06315C;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;');
+ new mxGeometry(0, 0, w * 2, h * 1.8), 'html=1;fontSize=11;dashed=0;whiteSpace=wrap;fillColor=#083F75;strokeColor=#06315C;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;');
bg.vertex = true;
bg.setValue(mxUtils.createXmlDocument().createElement('object'));
bg.setAttribute('placeholders', '1');
@@ -28,7 +28,7 @@
this.addEntry(dt + 'external person', function()
{
var bg = new mxCell('',
- new mxGeometry(0, 0, w * 2, h * 1.8), 'html=1;fontSize=11;dashed=0;whitespace=wrap;fillColor=#6C6477;strokeColor=#4D4D4D;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;');
+ new mxGeometry(0, 0, w * 2, h * 1.8), 'html=1;fontSize=11;dashed=0;whiteSpace=wrap;fillColor=#6C6477;strokeColor=#4D4D4D;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;');
bg.vertex = true;
bg.setValue(mxUtils.createXmlDocument().createElement('object'));
bg.setAttribute('placeholders', '1');
@@ -90,10 +90,10 @@
bg.setValue(mxUtils.createXmlDocument().createElement('object'));
bg.setAttribute('placeholders', '1');
bg.setAttribute('c4Type', 'Container name');
- bg.setAttribute('c4Container', 'Container ');
+ bg.setAttribute('c4Container', 'Container');
bg.setAttribute('c4Technology', 'e.g. Oracle Database 12');
bg.setAttribute('c4Description', 'Description of storage type container role/responsibility.');
- bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
+ bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Data Container');
}),
@@ -105,10 +105,10 @@
bg.setValue(mxUtils.createXmlDocument().createElement('object'));
bg.setAttribute('placeholders', '1');
bg.setAttribute('c4Type', 'Container name');
- bg.setAttribute('c4Container', 'Container ');
+ bg.setAttribute('c4Container', 'Container');
bg.setAttribute('c4Technology', 'e.g. Micronaut, etc.');
bg.setAttribute('c4Description', 'Description of microservice type container role/responsibility.');
- bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
+ bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Microservice Container');
}),
@@ -120,10 +120,10 @@
bg.setValue(mxUtils.createXmlDocument().createElement('object'));
bg.setAttribute('placeholders', '1');
bg.setAttribute('c4Type', 'Container name');
- bg.setAttribute('c4Container', 'Container ');
+ bg.setAttribute('c4Container', 'Container');
bg.setAttribute('c4Technology', 'e.g. Apache Kafka, etc.');
bg.setAttribute('c4Description', 'Description of message bus type container role/responsibility.');
- bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
+ bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Message Bus Container');
}),
@@ -135,10 +135,10 @@
bg.setValue(mxUtils.createXmlDocument().createElement('object'));
bg.setAttribute('placeholders', '1');
bg.setAttribute('c4Type', 'Container name');
- bg.setAttribute('c4Container', 'Container ');
+ bg.setAttribute('c4Container', 'Container');
bg.setAttribute('c4Technology', 'e.g. JavaScript, Angular etc.');
bg.setAttribute('c4Description', 'Description of web browser container role/responsibility.');
- bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
+ bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Web Browser Container');
}),
diff --git a/src/main/webapp/js/diagramly/sidebar/Sidebar-Rack.js b/src/main/webapp/js/diagramly/sidebar/Sidebar-Rack.js
index 72edb1a3..b05a6a49 100644
--- a/src/main/webapp/js/diagramly/sidebar/Sidebar-Rack.js
+++ b/src/main/webapp/js/diagramly/sidebar/Sidebar-Rack.js
@@ -55,12 +55,8 @@
this.addPaletteFunctions('rackGeneral', 'Rack / General', false,
[
- this.createVertexTemplateEntry(s + 'shape=mxgraph.rackGeneral.container;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=9;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=off;', 180, 228.6, '', 'Rack Cabinet', null, null, dt + 'cabinet'),
- this.createVertexTemplateEntry(s + 'shape=mxgraph.rackGeneral.container;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=33;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=ascend;', 210, 228.6, '', 'Numbered Rack Cabinet', null, null, dt + 'cabinet numbered'),
- this.createVertexTemplateEntry(s + 'shape=mxgraph.rackGeneral.container;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=9;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=off;', 180, 228.6, '', 'Rack Cabinet', null, null, dt + 'cabinet'),
- this.createVertexTemplateEntry(s + 'shape=mxgraph.rackGeneral.container;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=33;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=ascend;', 210, 228.6, '', 'Numbered Rack Cabinet', null, null, dt + 'cabinet numbered'),
-// this.createVertexTemplateEntry(s + 'shape=mxgraph.rackGeneral.rackCabinet;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=9;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=off;', 180, 219, '', 'Rack Cabinet', null, null, dt + 'cabinet'),
-// this.createVertexTemplateEntry(s + 'shape=mxgraph.rackGeneral.rackCabinet;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=33;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=ascend;', 204, 219, '', 'Numbered Rack Cabinet', null, null, dt + 'cabinet numbered'),
+ this.createVertexTemplateEntry(s + 'shape=mxgraph.rackGeneral.rackCabinet2;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=9;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=off;', 180, 219, '', 'Rack Cabinet', null, null, dt + 'cabinet'),
+ this.createVertexTemplateEntry(s + 'shape=mxgraph.rackGeneral.rackCabinet2;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=33;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=ascend;', 204, 219, '', 'Numbered Rack Cabinet', null, null, dt + 'cabinet numbered'),
this.createVertexTemplateEntry(sr + 'text;', 160, 15, '', 'Spacing', null, null, dt + 'spacing'),
this.createVertexTemplateEntry(sr + 'shape=mxgraph.rackGeneral.plate;fillColor=#e8e8e8;', 160, 15, '', 'Cover Plate', null, null, dt + 'cover plate'),
this.createVertexTemplateEntry(sr + 'shape=mxgraph.rack.general.1u_rack_server;', 160, 15, '', 'Server', null, null, dt + 'server'),
diff --git a/src/main/webapp/js/diagramly/sidebar/Sidebar-Sysml.js b/src/main/webapp/js/diagramly/sidebar/Sidebar-Sysml.js
index 32ddc693..a3a81e9e 100644
--- a/src/main/webapp/js/diagramly/sidebar/Sidebar-Sysml.js
+++ b/src/main/webapp/js/diagramly/sidebar/Sidebar-Sysml.js
@@ -127,7 +127,11 @@
this.createEdgeTemplateEntry('edgeStyle=none;html=1;endSize=12;endArrow=block;endFill=0;dashed=1;',
160, 0, '', 'Realization', null, this.getTagsForStencil(gn, '', dt + 'realization').join(' ')),
this.createEdgeTemplateEntry('edgeStyle=none;html=1;endArrow=open;endSize=12;dashed=1;verticalAlign=bottom;',
- 160, 0, '&lt;&lt;refine&gt;&gt;', 'Refine', null, this.getTagsForStencil(gn, '', dt + 'refine').join(' '))
+ 160, 0, '&lt;&lt;refine&gt;&gt;', 'Refine', null, this.getTagsForStencil(gn, '', dt + 'refine').join(' ')),
+ this.createVertexTemplateEntry('shape=triangle;fillColor=strokeColor;',
+ 10, 10, '', 'Flow Direction', null, null, this.getTagsForStencil(gn, '', dt + 'flow direction').join(' ')),
+ this.createVertexTemplateEntry('shape=triangle;fillColor=strokeColor;direction=south;',
+ 10, 10, '', 'Flow Direction', null, null, this.getTagsForStencil(gn, '', dt + 'flow direction').join(' '))
];
this.addPalette('sysmlModel Elements', 'SysML / Model Elements', expand || false, mxUtils.bind(this, function(content)
@@ -399,7 +403,6 @@
'3VXLbsIwEPwaXyoVmaQU9Uh4nSpVoj9g4iWx6nijjaHA19chJoGmqRCiEuohkne8s17P2DELx9l2TiJPX1GCZuGUhWNCtNUo245BaxZwJVk4YUHA3ceCWcds/zDLc0Fg7CWEoCJshF5DhYiiwFgJq9D4aoXdaT+5AbIqFnqkVWIctERrMWNhlNrM9T7puyEYOSLCTxcaNFAiMoGFL4JkU0zQCD1t0KiwguxM6bIGP8YLtS8Z/eAIHMtKJTI08j1VroeoarJco1ODA+QFmANmYGnnUgi02+fmnCeKKkzqvJr6hspVbFIKXFMMHj0V+Zi49SIP+Hltt5kEbIvoBif9NdDBs5/9C1v+tU0jKNReLA8hP/dKeB81rJxU0Xd7LeYO1WIJOhLxR0K4NnKMGqkxd4WmdspvM0ZjILZ+yfoM8rI8bDtdCn52yRMeee+l4lxs25muv4j41BIxJ8xds7vghmLWd+Xf6zlo6cmGEZIEAsmGLua813u4RlpSSXrvB/XvdH3uPKdXXfouMe/soN5MTxc2D2v1rz19d78A'),
this.addDataEntry(dt + 'multibranch part association', 250, 50, 'Multibranch Part Association',
'7VfBbtswDP0aX3YoHCtptmOdNt1lwIDuBxSbsYXKoiEraZyvH23JTlzHqNO0azfsYEAkRYoiHx9kjy2y3b3mefoDY5Aeu/PYQiMau8p2C5DSC3wRe+zWCwKfPi9YDlgntdXPuQZlxjgE1mHL5QashhcFRoIbgcpFK0wpnXEL2oiIyxspEkWqFRqDmcfC1GSU++2ElnSAyAtyCNdCygVK1GQpjMZHcFK4RmWWPBOyJNN3kFuowjrDg9hXx00mTm5CxLDmG0nXCl3SlAzsBi9eq9yt7wEzMLqkLY1DwKzLk4hNanVTq0lBJKnpqHhhxaSNc6gpLVxZT5eY9Uqca8wp97JfX4gTeHAiyBU+3R0U3RqTjdYparGnEnEyhNw1Rdv0w8FmgYpvtK4DKFRVaI0bFUOVsE+S5CuQIY8ek1rf1N/tvbB3heG63TatFCnPKyFCpSAyNT5sYapqdNpb4EZH0EHuGR23DhokgXvbDXyqvy7QTxQUv40SzOxA+WUnjSYAXS4B43yeYaRNaRRspj3Y+FdXX3qI0VCIPV/Vot8FyUt4MJiPanbTrAuhcQoKR5xAl2GMLZeMPWOO52PvcOLu3DLcS3TA3hQcY4d/Njj8wcXD3/Tz/+h/zOhP56Nmn+rNy6NtebWhGD5m8u3kMQfA2YCv5ZXrT8krn5k5Zh/CHPNB5mDvwRwS1mOJIxY8QxX/SoXq8QdtWwrZnqfipsnBu5PL38ElZz0bzqWO61Nvk7cijq89QPbfryNYYwBo/xppzP8EaZB4+FW0LT3+k/wN'),
-//<mxlibrary>[{"xml":"7VdRj5swDP41vOzhREm77vXoHbeXSZNufyAFF6ILMQppr/TXz5BAy1F0nLpu3bQHpNiOHcf+/Cl4bJXvnzQvsm+YgPTYo8dWGtHYVb5fgZRe4IvEYw9eEPj0eUE0Yp01Vr/gGpSZ4hBYhx2XW7AaXpYYC24EKhetNJV0xh1oI2Iu76VIFanWaAzmHgszk1PuDzNa0gGiKMkh3AgpVyhRk6U0Gl/ASeEGlYl4LmRFpq8gd1CHdYZncaiPm82c3IZIYMO3kq4VuqQpGdiPXrxRuVs/AeZgdEVbWoeAWZdXkZjM6uZWk4FIM9NT8dKKaRfnWFNauLKeLzEblLjQWFDu1bC+kKTw7ESQa3x9PCr6NSYbrTPU4kAl4mQIuWuKtumHo80Cldxr3QRQqOrQGrcqgTphnyTJ1yBDHr+kjb6tv9t7Ye9Kw3W3bd4oTpBBRWCMRRFjtSXjRb0tRqUgNg1ybMnqOvUaX+JWx9DD9AewYB00SIL9rh/4XOddoO8oKH4XJVjYUfOrXhptALp2Csb5vEFPl9IkQM0HgPLv7j4NsKShFAe+bkS/D5/3kGKwmASDto0XguYcSMYwccopbwnB4cTdueO+94iC/VJwTKWFxSgtBBfTQtvP/6Rwa6QwX16LFT7fJCvc8twv/sjcL0fnnl1j7iVspo59IniOKvmRCTWYftoWCdmdp5K2ycH1qeEvZ4JrPwe+DAA1fFdOmPoRoPxrQ7/8HUNP4vEXzrb09A/vJw==","w":250,"h":47,"aspect":"fixed"}]</mxlibrary> this.addDataEntry(dt + 'multibranch shared association', 250, 50, 'Multibranch Shared Association',
this.addDataEntry(dt + 'multibranch shared association', 250, 50, 'Multibranch Shared Association',
'7VbLbtswEPwaXXoIZNKu22PkPE4FCqQ/QEtriQjFFUjasfz1XYmUbUUWojRNmwI9GODucofrGQ7EiK/K/b0RVfENM1ARv434yiA6vyr3K1AqYrHMIn4TMRbTL2J3I9VZW40rYUC7KQ3MN+yE2oLPCGsxlcJJ1AHNulqF4g6Mk6lQ10rmmlJrdA7LiCeFK2n2mxkt6QBZWWpINlKpFSo0VLHO4COEKAmnEhrsRydvU2Hse8ASnKlpS9fAuG95kpkrfG7uMwXIvHC9lLA+zI84J1JoEXi5zBEfcFQZrGj2ekgQZDk8hBDUGp9uT4k+SVSjdYFGHlA7QYVEBFaNHz8ZZRt0dm1MC6BRN9AGtzqDZuCYIiXWoBKRPuZtvtMg7PVDN5P2qLe4NSn0rsUr1PANBhTdnF0f+BL3Aeg7SsI/orCFv61x3RujA3DC5OBCzzP9jiNNknQ+kDS+uvo0UNOAlQexbsP4gkBngj7XymH1ohAbEv5BHhr02VTZUtQaUheGOvr7JS/x36reVOcsRp3D3uycjvD/vhn6Zr6cZBziQtRn26pmgx0/Zvb14jGny+ABf9WUnz+gKd/iucVf8dxy1HP8PTynYDPVcpkUJersRyH1wHm07U42/6mLOgnYv2jL9/58fRloPHyJjNkkCPZhXLL8Ey6h8PSm9oSfP7l/Ag=='),
@@ -987,7 +990,67 @@
cardCell.insertEdge(assoc2, true);
return sb.createVertexTemplateFromCells([cardCell, assoc1, assoc2], 250, 60, 'Provided Interface');
- })
+ }),
+
+ this.createVertexTemplateEntry(s + 'port;sysMLPortType=flowN;',
+ 20, 20, '', 'Port, Flow North', null, null, this.getTagsForStencil(gn, '', dt + 'item flow north').join(' ')),
+ this.createVertexTemplateEntry(s + 'port;sysMLPortType=doubleH;',
+ 20, 20, '', 'Port, Double Flow, Horizontal', null, null, this.getTagsForStencil(gn, '', dt + 'item double flow horizontal').join(' ')),
+
+ this.addEntry(dt + 'ports', function()
+ {
+ var mainShape = new mxCell('', new mxGeometry(0, 0, 200, 140), 'whiteSpace=wrap;align=center;');
+ mainShape.vertex = true;
+ var port1 = new mxCell('port1', new mxGeometry(0, 0, 20, 20), s + 'port;html=1;resizable=0;sysMLPortType=flowS;labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;');
+ port1.geometry.relative = true;
+ port1.vertex = true;
+ port1.geometry.offset = new mxPoint(50, -10);
+ mainShape.insert(port1);
+
+ var port2 = new mxCell('port2', new mxGeometry(1, 0, 20, 20), s + 'port;html=1;resizable=0;sysMLPortType=empty;labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;');
+ port2.geometry.relative = true;
+ port2.vertex = true;
+ port2.geometry.offset = new mxPoint(-70, -10);
+ mainShape.insert(port2);
+
+ var port3 = new mxCell('port3', new mxGeometry(0, 0, 20, 20), s + 'port;html=1;resizable=0;sysMLPortType=flowE;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;');
+ port3.geometry.relative = true;
+ port3.vertex = true;
+ port3.geometry.offset = new mxPoint(-10, 30);
+ mainShape.insert(port3);
+
+ var port4 = new mxCell('port4', new mxGeometry(0, 1, 20, 20), s + 'port;html=1;resizable=0;sysMLPortType=doubleH;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;');
+ port4.geometry.relative = true;
+ port4.vertex = true;
+ port4.geometry.offset = new mxPoint(-10, -50);
+ mainShape.insert(port4);
+
+ var port5 = new mxCell('port5', new mxGeometry(1, 0, 20, 20), s + 'port;html=1;resizable=0;sysMLPortType=flowE;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;');
+ port5.geometry.relative = true;
+ port5.vertex = true;
+ port5.geometry.offset = new mxPoint(-10, 30);
+ mainShape.insert(port5);
+
+ var port6 = new mxCell('port6', new mxGeometry(1, 1, 20, 20), s + 'port;html=1;resizable=0;sysMLPortType=doubleH;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;');
+ port6.geometry.relative = true;
+ port6.vertex = true;
+ port6.geometry.offset = new mxPoint(-10, -50);
+ mainShape.insert(port6);
+
+ var port7 = new mxCell('port7', new mxGeometry(0, 1, 20, 20), s + 'port;html=1;resizable=0;sysMLPortType=flowN;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;');
+ port7.geometry.relative = true;
+ port7.vertex = true;
+ port7.geometry.offset = new mxPoint(50, -10);
+ mainShape.insert(port7);
+
+ var port8 = new mxCell('port8', new mxGeometry(1, 1, 20, 20), s + 'port;html=1;resizable=0;sysMLPortType=doubleV;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;');
+ port8.geometry.relative = true;
+ port8.vertex = true;
+ port8.geometry.offset = new mxPoint(-70, -10);
+ mainShape.insert(port8);
+
+ return sb.createVertexTemplateFromCells([mainShape], 220, 160, 'Ports');
+ })
];
this.addPalette('sysmlPorts and Flows', 'SysML / Ports and Flows', expand || false, mxUtils.bind(this, function(content)
diff --git a/src/main/webapp/js/grapheditor/Editor.js b/src/main/webapp/js/grapheditor/Editor.js
index 9ad33f7c..011e7dee 100644
--- a/src/main/webapp/js/grapheditor/Editor.js
+++ b/src/main/webapp/js/grapheditor/Editor.js
@@ -25,9 +25,10 @@ Editor = function(chromeless, themes, model, graph, editable)
};
// Sets the status and fires a statusChanged event
- this.setStatus = function(value)
+ this.setStatus = function(value, fn)
{
this.status = value;
+ this.statusFunction = fn;
this.fireEvent(new mxEventObject('statusChanged'));
};
@@ -144,6 +145,7 @@ Editor.undoImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My
Editor.redoImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==';
Editor.outlineImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==';
Editor.saveImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=';
+Editor.compareImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE1Ljg1IDQwLTIuMS0yLjEgNi4wNS02LjA1SDR2LTNoMTUuOGwtNi4wNS02LjA1IDIuMS0yLjEgOS42NSA5LjY1Wm0xNi4zLTEyLjctOS42NS05LjY1TDMyLjE1IDhsMi4xIDIuMS02LjA1IDYuMDVINDR2M0gyOC4ybDYuMDUgNi4wNVoiLz48L3N2Zz4=';
Editor.helpImage = Editor.lightHelpImage;
Editor.checkmarkImage = Editor.lightCheckmarkImage;
diff --git a/src/main/webapp/js/grapheditor/EditorUi.js b/src/main/webapp/js/grapheditor/EditorUi.js
index 0fe8b21e..1b0deea7 100644
--- a/src/main/webapp/js/grapheditor/EditorUi.js
+++ b/src/main/webapp/js/grapheditor/EditorUi.js
@@ -4590,6 +4590,49 @@ EditorUi.prototype.createStatusContainer = function()
var container = document.createElement('a');
container.className = 'geItem geStatus';
+ // Handles data-action attribute
+ mxEvent.addListener(container, 'click', mxUtils.bind(this, function(evt)
+ {
+ var elt = mxEvent.getSource(evt);
+ var name = elt.getAttribute('data-action');
+
+ // Make generic
+ if (name == 'statusFunction' && this.editor.statusFunction != null)
+ {
+ this.editor.statusFunction();
+ }
+ else if (name != null)
+ {
+ var action = this.actions.get(name);
+
+ if (action != null)
+ {
+ action.funct();
+ }
+ }
+ else
+ {
+ var title = elt.getAttribute('data-title');
+ var msg = elt.getAttribute('data-message');
+
+ if (title != null && msg != null)
+ {
+ this.showError(title, msg);
+ }
+ else
+ {
+ var link = elt.getAttribute('data-link');
+
+ if (link != null)
+ {
+ this.editor.graph.openLink(link);
+ }
+ }
+ }
+
+ mxEvent.consume(evt);
+ }));
+
return container;
};
@@ -4601,12 +4644,50 @@ EditorUi.prototype.setStatusText = function(value)
this.statusContainer.innerHTML = value;
// Wraps simple status messages in a div for styling
- if (this.statusContainer.getElementsByTagName('div').length == 0)
+ if (this.statusContainer.getElementsByTagName('div').length == 0 &&
+ value != null && value.length > 0)
{
this.statusContainer.innerText = '';
var div = this.createStatusDiv(value);
this.statusContainer.appendChild(div);
}
+
+ // Handles data-effect attribute
+ var spans = this.statusContainer.querySelectorAll('[data-effect="fade"]');
+
+ if (spans != null)
+ {
+ for (var i = 0; i < spans.length; i++)
+ {
+ (function(temp)
+ {
+ mxUtils.setOpacity(temp, 0);
+ mxUtils.setPrefixedStyle(temp.style, 'transform', 'scaleX(0)');
+ mxUtils.setPrefixedStyle(temp.style, 'transition', 'all 0.2s ease');
+
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ mxUtils.setOpacity(temp, 100);
+ mxUtils.setPrefixedStyle(temp.style, 'transform', 'scaleX(1)');
+ mxUtils.setPrefixedStyle(temp.style, 'transition', 'all 1s ease');
+
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ mxUtils.setPrefixedStyle(temp.style, 'transform', 'scaleX(0)');
+ mxUtils.setOpacity(temp, 0);
+
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ if (temp.parentNode != null)
+ {
+ temp.parentNode.removeChild(temp);
+ }
+ }), 1000);
+ }), Editor.updateStatusInterval / 2);
+ }), 0);
+ })(spans[i]);
+ }
+ }
};
/**
diff --git a/src/main/webapp/js/grapheditor/Format.js b/src/main/webapp/js/grapheditor/Format.js
index b1a393d6..7426fbd3 100644
--- a/src/main/webapp/js/grapheditor/Format.js
+++ b/src/main/webapp/js/grapheditor/Format.js
@@ -1274,6 +1274,53 @@ BaseFormatPanel.prototype.addUnitInput = function(container, unit, right, width,
/**
*
*/
+BaseFormatPanel.prototype.addGenericInput = function(container, unit, left, width, readFn, writeFn)
+{
+ var graph = this.editorUi.editor.graph;
+
+ var update = function()
+ {
+ writeFn(input.value);
+ };
+
+ var input = this.addUnitInput(container, unit, left, width, update);
+
+ var listener = mxUtils.bind(this, function(sender, evt, force)
+ {
+ if (force || input != document.activeElement)
+ {
+ input.value = readFn() + unit;
+ }
+ });
+
+ mxEvent.addListener(input, 'keydown', function(e)
+ {
+ if (e.keyCode == 13)
+ {
+ graph.container.focus();
+ mxEvent.consume(e);
+ }
+ else if (e.keyCode == 27)
+ {
+ listener(null, null, true);
+ graph.container.focus();
+ mxEvent.consume(e);
+ }
+ });
+
+ graph.getModel().addListener(mxEvent.CHANGE, listener);
+ this.listeners.push({destroy: function() { graph.getModel().removeListener(listener); }});
+ listener();
+
+ mxEvent.addListener(input, 'blur', update);
+ mxEvent.addListener(input, 'change', update);
+
+ return input;
+};
+
+/**
+ *
+ */
BaseFormatPanel.prototype.createRelativeOption = function(label, key, width, handler, init)
{
width = (width != null) ? width : 52;
@@ -1378,6 +1425,8 @@ BaseFormatPanel.prototype.addLabel = function(div, title, right, width)
label.style.marginTop = '6px';
label.style.textAlign = 'center';
div.appendChild(label);
+
+ return label;
};
/**
@@ -2286,7 +2335,7 @@ ArrangePanel.prototype.addGeometry = function(container)
span.style.fontWeight = 'bold';
mxUtils.write(span, mxResources.get('position'));
div2.appendChild(span);
-
+
var left = this.addUnitInput(div2, this.getUnit(), 87, 52, function()
{
leftUpdate.apply(this, arguments);
@@ -2298,8 +2347,77 @@ ArrangePanel.prototype.addGeometry = function(container)
mxUtils.br(div2);
- this.addLabel(div2, mxResources.get('left'), 87);
- this.addLabel(div2, mxResources.get('top'), 16);
+ if (rect.movable)
+ {
+ if (rect.edges.length == 0 && rect.vertices.length == 1)
+ {
+ var geo = graph.getCellGeometry(rect.vertices[0]);
+
+ if (geo != null && geo.relative)
+ {
+ mxUtils.br(div2);
+
+ var span = document.createElement('div');
+ span.style.position = 'absolute';
+ span.style.width = '70px';
+ span.style.marginTop = '0px';
+ mxUtils.write(span, mxResources.get('relative'));
+ div2.appendChild(span);
+
+ this.addGenericInput(div2, '%', 87, 52, function()
+ {
+ return (Math.round(geo.x * 1000) / 10);
+ }, function(value)
+ {
+ value = parseFloat(value);
+
+ if (!isNaN(value))
+ {
+ model.beginUpdate();
+ try
+ {
+ geo = geo.clone();
+ geo.x = parseFloat(value) / 100;
+ model.setGeometry(rect.vertices[0], geo);
+ }
+ finally
+ {
+ model.endUpdate();
+ }
+ }
+ });
+
+ this.addGenericInput(div2, '%', 16, 52, function()
+ {
+ return (Math.round(geo.y * 1000) / 10);
+ }, function(value)
+ {
+ value = parseFloat(value);
+
+ if (!isNaN(value))
+ {
+ model.beginUpdate();
+ try
+ {
+ geo = geo.clone();
+ geo.y = parseFloat(value) / 100;
+ model.setGeometry(rect.vertices[0], geo);
+ }
+ finally
+ {
+ model.endUpdate();
+ }
+ }
+ });
+
+ mxUtils.br(div2);
+ }
+ }
+ container.appendChild(div2);
+ }
+
+ this.addLabel(div2, mxResources.get('left'), 87).style.marginTop = '8px';
+ this.addLabel(div2, mxResources.get('top'), 16).style.marginTop = '8px';
var listener = mxUtils.bind(this, function(sender, evt, force)
{
@@ -2407,7 +2525,8 @@ ArrangePanel.prototype.addGeometry = function(container)
}));
btn.setAttribute('title', mxResources.get('center'));
- btn.style.width = '210px';
+ btn.style.width = '134px';
+ btn.style.left = '89px';
btn.style.position = 'absolute';
mxUtils.br(div2);
mxUtils.br(div2);
@@ -4431,7 +4550,8 @@ StyleFormatPanel.prototype.addEditOps = function(div)
this.editorUi.actions.get('editStyle').funct();
}));
- btn.setAttribute('title', mxResources.get('editStyle') + ' (' + this.editorUi.actions.get('editStyle').shortcut + ')');
+ btn.setAttribute('title', mxResources.get('editStyle') + ' (' +
+ this.editorUi.actions.get('editStyle').shortcut + ')');
btn.style.width = '210px';
btn.style.marginBottom = '2px';
@@ -4514,7 +4634,8 @@ StyleFormatPanel.prototype.addFill = function(container)
}, function(color)
{
graph.updateCellStyles({'gradientColor': color}, graph.getSelectionCells());
- }, graph.getDefaultColor(ss.style, mxConstants.STYLE_GRADIENTCOLOR, graph.shapeForegroundColor, graph.shapeBackgroundColor));
+ }, graph.getDefaultColor(ss.style, mxConstants.STYLE_GRADIENTCOLOR,
+ graph.shapeForegroundColor, graph.shapeBackgroundColor));
var fillKey = (ss.style.shape == 'image') ? mxConstants.STYLE_IMAGE_BACKGROUND : mxConstants.STYLE_FILLCOLOR;
@@ -4522,7 +4643,8 @@ StyleFormatPanel.prototype.addFill = function(container)
fillKey, 'default', null, mxUtils.bind(this, function(color)
{
graph.setCellStyles(fillKey, color, ss.cells);
- }), graph.getDefaultColor(ss.style, fillKey, graph.shapeBackgroundColor, graph.shapeForegroundColor));
+ }), graph.getDefaultColor(ss.style, fillKey, graph.shapeBackgroundColor,
+ graph.shapeForegroundColor));
fillPanel.style.fontWeight = 'bold';
var tmpColor = mxUtils.getValue(ss.style, fillKey, null);
@@ -4581,7 +4703,8 @@ StyleFormatPanel.prototype.addFill = function(container)
var listener = mxUtils.bind(this, function()
{
ss = ui.getSelectionState();
- var value = mxUtils.getValue(ss.style, mxConstants.STYLE_GRADIENT_DIRECTION, mxConstants.DIRECTION_SOUTH);
+ var value = mxUtils.getValue(ss.style, mxConstants.STYLE_GRADIENT_DIRECTION,
+ mxConstants.DIRECTION_SOUTH);
var fillStyle = mxUtils.getValue(ss.style, 'fillStyle', 'auto');
// Handles empty string which is not allowed as a value
@@ -4595,7 +4718,8 @@ StyleFormatPanel.prototype.addFill = function(container)
var fillColor = mxUtils.getValue(ss.style, fillKey, null);
- if (!ss.fill || fillColor == null || fillColor == mxConstants.NONE || ss.style.shape == 'filledEdge')
+ if (!ss.fill || fillColor == null || fillColor == mxConstants.NONE ||
+ ss.style.shape == 'filledEdge')
{
fillStyleSelect.style.display = 'none';
gradientPanel.style.display = 'none';
@@ -4623,7 +4747,8 @@ StyleFormatPanel.prototype.addFill = function(container)
fillStyleSelect.value = fillStyle;
}
- fillStyleSelect.style.display = ss.style.sketch == '1' || gradientSelect.style.display == 'none'? '' : 'none';
+ fillStyleSelect.style.display = ss.style.sketch == '1' ||
+ gradientSelect.style.display == 'none'? '' : 'none';
gradientPanel.style.display = (!ss.containsImage && (ss.style.sketch != '1' ||
fillStyle == 'solid' || fillStyle == 'auto')) ? '' : 'none';
}
@@ -4657,7 +4782,8 @@ StyleFormatPanel.prototype.addFill = function(container)
for (var i = 0; i < custom.length; i++)
{
- container.appendChild(this.createCellColorOption(custom[i].title, custom[i].key, custom[i].defaultValue));
+ container.appendChild(this.createCellColorOption(custom[i].title,
+ custom[i].key, custom[i].defaultValue));
}
return container;
diff --git a/src/main/webapp/js/grapheditor/Menus.js b/src/main/webapp/js/grapheditor/Menus.js
index 4bdfaf09..c0bda74a 100644
--- a/src/main/webapp/js/grapheditor/Menus.js
+++ b/src/main/webapp/js/grapheditor/Menus.js
@@ -1797,8 +1797,8 @@ Menubar.prototype.addMenuHandler = function(elt, funct)
mxEvent.addListener(elt, (mxClient.IS_POINTER) ? 'pointerdown' : 'mousedown',
mxUtils.bind(this, function(evt)
{
- if (!this.editorUi.menusautoPopup && this.editorUi.currentMenu != null &&
- this.editorUi.currentMenuElt != elt)
+ if (!this.editorUi.menus.autoPopup && this.editorUi.currentMenu != null &&
+ this.editorUi.currentMenuElt != elt && mxEvent.isMouseEvent(evt))
{
this.editorUi.hideCurrentMenu();
}
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index 75c16354..f4eb9ea1 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -145,7 +145,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.4.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.4.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/"),
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]"!==
@@ -462,7 +462,7 @@ mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGrad
mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement(e==mxConstants.DIRECTION_RADIAL?"radialGradient":"linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");
e=this.createElement("stop");e.setAttribute("offset","0%");e.style.stopColor=a;e.style.stopOpacity=c;f.appendChild(e);e=this.createElement("stop");e.setAttribute("offset","100%");e.style.stopColor=b;e.style.stopOpacity=d;f.appendChild(e);return f};mxSvgCanvas2D.prototype.createFillPatternId=function(a,b,c){c=mxUtils.rgba2hex(c);"#"==c.charAt(0)&&(c=c.substring(1));return("mx-pattern-"+a+"-"+b+"-"+c).toLowerCase()};
mxSvgCanvas2D.prototype.getFillPattern=function(a,b,c,d){var e=this.createFillPatternId(a,b,c),f=this.fillPatterns[e];if(null==f){var g=this.root.ownerSVGElement,k=0,l=e+"-"+k;if(null!=g)for(f=g.ownerDocument.getElementById(l);null!=f&&f.ownerSVGElement!=g;)l=e+"-"+k++,f=g.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;if(null==f){switch(a){case "hatch":f=this.createHatchPattern(b,c,d);break;case "dots":f=this.createDotsPattern(b,c,d);break;case "cross-hatch":f=this.createCrossHatchPattern(b,
-c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return"ERROR"}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
+c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return null}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
mxSvgCanvas2D.prototype.createHatchPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1","0");e.setAttribute("x2","0");e.setAttribute("y2",c);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
a);d.appendChild(e);return d};
mxSvgCanvas2D.prototype.createDashedPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1",c/4);e.setAttribute("x2","0");e.setAttribute("y2",3*c/4);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
@@ -476,7 +476,7 @@ mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(nu
c.setAttribute("transform",d.transform);this.pointerEvents?c.setAttribute("pointer-events",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute("pointer-events","none");d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&(!a||null==d.fillColor)&&this.addTolerance(c);("rect"!=c.nodeName&&"path"!=c.nodeName&&"ellipse"!=c.nodeName||"none"!=c.getAttribute("fill")&&"transparent"!=c.getAttribute("fill")||"none"!=c.getAttribute("stroke")||"none"!=
c.getAttribute("pointer-events"))&&this.root.appendChild(c);this.node=null}};mxSvgCanvas2D.prototype.addTolerance=function(a){this.root.appendChild(this.createTolerance(a))};
mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);var b=!1;if(null!=a.fillColor)if(null!=a.gradientColor&&a.gradientColor!=mxConstants.NONE){b=!0;var c=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection);if(this.root.ownerDocument==document&&this.useAbsoluteIds){var d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");d="url("+d+"#"+c+
-")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();b||null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?this.node.setAttribute("fill",d):(a=this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale),this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")"))};
+")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();a=null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?null:this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale);b||null==a?this.node.setAttribute("fill",d):this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")")};
mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};
mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",String(a.strokeColor).toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);var b=this.getCurrentStrokeWidth();1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern((a.fixDash?1:a.strokeWidth)*a.scale))};
mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null==a.miterLimit||this.styleEnabled&&10==a.miterLimit||this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
@@ -1986,8 +1986,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,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;
+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,h){this.status=e;this.statusFunction=h;this.fireEvent(new mxEventObject("statusChanged"))};
+this.getStatus=function(){return this.status};this.graphChangeListener=function(e,h){e=null!=h?h.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;
(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="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=";Editor.lightCheckmarkImage="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=";
Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";
@@ -2014,17 +2014,17 @@ Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My
Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==";
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==";
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
-Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;
-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.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.compareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE1Ljg1IDQwLTIuMS0yLjEgNi4wNS02LjA1SDR2LTNoMTUuOGwtNi4wNS02LjA1IDIuMS0yLjEgOS42NSA5LjY1Wm0xNi4zLTEyLjctOS42NS05LjY1TDMyLjE1IDhsMi4xIDIuMS02LjA1IDYuMDVINDR2M0gyOC4ybDYuMDUgNi4wNVoiLz48L3N2Zz4=";
+Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;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.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{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.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(a){return Editor.darkMode};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),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};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.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,h){g=d.substring(g+8,g+8+h);"zTXt"==e?(h=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,h)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(h+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};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,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.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.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=
@@ -2036,223 +2036,223 @@ 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(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()};
+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(h){return!(h 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()};
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,e,g,d,k,n,u,m,r){var x=u?57:0,B=f,D=e,F=u?0:64,I=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var C=I.height,N=Math.max(1,Math.round((I.width-f-F)/2)),R=Math.max(1,Math.round((C-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,C-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=C+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";N+=I.x;R+=I.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-R+=a.embedViewport.y,N+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var S=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(N,R,f,e);N=g.x;R=g.y;S.style.width=f+"px";S.style.height=e+"px";S.style.left=N+"px";S.style.top=R+"px";S.style.zIndex=this.zIndex;S.appendChild(b);document.body.appendChild(S);!n&&b.clientHeight>S.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=R+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 Q=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(aa){Q=!0}),null,mxUtils.bind(this,function(aa){Q&&(a.hideDialog(!0),Q=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var aa=m();
-null!=aa&&(B=f=aa.w,D=e=aa.h)}aa=mxUtils.getDocumentSize();C=aa.height;this.bg.style.height=C+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");N=Math.max(1,Math.round((aa.width-f-F)/2));R=Math.max(1,Math.round((C-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(D,C-F);aa=this.getPosition(N,R,f,e);N=aa.x;R=aa.y;S.style.left=N+"px";S.style.top=R+"px";S.style.width=f+"px";S.style.height=e+
-"px";!n&&b.clientHeight>S.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=R+14+"px",this.dialogImg.style.left=N+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=S;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(a,b,f,d,g,e,h,n,u,m,r){var x=u?57:0,B=f,D=d,F=u?0:64,H=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(H.height=window.innerHeight);var C=H.height,N=Math.max(1,Math.round((H.width-f-F)/2)),Q=Math.max(1,Math.round((C-d-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;d=Math.min(d,C-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=C+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));H=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=H.x+"px";this.bg.style.top=H.y+"px";N+=H.x;Q+=H.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 T=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(N,Q,f,d);N=g.x;Q=g.y;T.style.width=f+"px";T.style.height=d+"px";T.style.left=N+"px";T.style.top=Q+"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(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 R=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(ba){R=!0}),null,mxUtils.bind(this,function(ba){R&&(a.hideDialog(!0),R=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var ba=m();
+null!=ba&&(B=f=ba.w,D=d=ba.h)}ba=mxUtils.getDocumentSize();C=ba.height;this.bg.style.height=C+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");N=Math.max(1,Math.round((ba.width-f-F)/2));Q=Math.max(1,Math.round((C-d-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;d=Math.min(D,C-F);ba=this.getPosition(N,Q,f,d);N=ba.x;Q=ba.y;T.style.left=N+"px";T.style.top=Q+"px";T.style.width=f+"px";T.style.height=d+
+"px";!n&&b.clientHeight>T.clientHeight-F&&(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=h;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,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 D=mxUtils.button(e,function(){u&&a.hideDialog();null!=g&&g()});
-D.className="geBtn";f.appendChild(D);null!=k&&(e=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),e.className="geBtn gePrimaryBtn",f.appendChild(e));this.init=function(){D.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(D){var F=k.checked||m.checked,I=parseInt(x.value)/100;isNaN(I)&&(I=1,x.value="100%");I*=.75;var C=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/f.pageScale;if(F){var R=k.checked?1:parseInt(r.value);isNaN(R)||(N=mxUtils.getScaleForPageCount(R,f,C))}f.getGraphBounds();var S=R=0;C=mxRectangle.fromRectangle(C);C.width=Math.ceil(C.width*I);C.height=Math.ceil(C.height*I);N*=I;!F&&f.pageVisible?(I=f.getPageLayout(),R-=I.x*C.width,S-=I.y*C.height):
-F=!0;F=PrintDialog.createPrintPreview(f,N,C,0,R,S,F);F.open();D&&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(D){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(D)});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(D){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(D)});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;
+var ErrorDialog=function(a,b,f,d,g,e,h,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 D=mxUtils.button(d,function(){u&&a.hideDialog();null!=g&&g()});
+D.className="geBtn";f.appendChild(D);null!=h&&(d=mxUtils.button(h,function(){u&&a.hideDialog();null!=n&&n()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){D.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(D){var F=h.checked||m.checked,H=parseInt(x.value)/100;isNaN(H)&&(H=1,x.value="100%");H*=.75;var C=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/f.pageScale;if(F){var Q=h.checked?1:parseInt(r.value);isNaN(Q)||(N=mxUtils.getScaleForPageCount(Q,f,C))}f.getGraphBounds();var T=Q=0;C=mxRectangle.fromRectangle(C);C.width=Math.ceil(C.width*H);C.height=Math.ceil(C.height*H);N*=H;!F&&f.pageVisible?(H=f.getPageLayout(),Q-=H.x*C.width,T-=H.y*C.height):
+F=!0;F=PrintDialog.createPrintPreview(f,N,C,0,Q,T,F);F.open();D&&PrintDialog.printPreview(F)}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 h=document.createElement("input");h.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(h);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+n.appendChild(u);mxEvent.addListener(u,"click",function(D){h.checked=!h.checked;m.checked=!h.checked;mxEvent.consume(D)});mxEvent.addListener(h,"change",function(){m.checked=!h.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(D){m.checked=!m.checked;h.checked=!m.checked;mxEvent.consume(D)});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");h.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;
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);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};
+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,h){b=new mxPrintPreview(a,b,f,d,g,e);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=h;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 C=F;null!=C&&Graph.isPageLink(C.src)&&(C=a.createImageForPageLink(C.src,null));null!=C&&null!=C.src?(D.setAttribute("src",C.src),D.style.display=""):(D.removeAttribute("src"),D.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(C){a.pickColor(r||"none",function(N){r=N;b()});mxEvent.consume(C)});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 C=parseInt(x.value);x.value=Math.max(1,isNaN(C)?e.getGridSize():C)});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 D=document.createElement("img");D.setAttribute("valign","middle");D.style.verticalAlign="middle";D.style.border="1px solid lightGray";D.style.borderRadius="4px";D.style.marginRight="14px";D.style.maxWidth="100px";D.style.cursor="pointer";D.style.height=
-"60px";D.style.padding="4px";var F=e.backgroundImage,I=function(C){a.showBackgroundImageDialog(function(N,R){R||(F=N,f())},F);mxEvent.consume(C)};mxEvent.addListener(B,"click",I);mxEvent.addListener(D,"click",I);f();n.appendChild(D);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);I=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var C=parseInt(x.value);isNaN(C)||e.gridSize===C||e.setGridSize(C);C=new ChangePageSetup(a,r,F,u.get());C.ignoreColor=e.background==r;C.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=F?F.src:null);e.pageFormat.width==C.previousFormat.width&&e.pageFormat.height==C.previousFormat.height&&C.ignoreColor&&C.ignoreImage||e.model.execute(C)});I.className="geBtn gePrimaryBtn";
-n.appendChild(I);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(aa,U,P){if(P||x!=document.activeElement&&B!=document.activeElement){aa=!1;for(U=0;U<F.length;U++)P=F[U],R?"custom"==P.key&&(n.value=P.key,R=!1):null!=P.format&&("a4"==P.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==P.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==P.format.width&&
-f.height==P.format.height?(n.value=P.key,d.setAttribute("checked","checked"),d.defaultChecked=!0,d.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,aa=!0):f.width==P.format.height&&f.height==P.format.width&&(n.value=P.key,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,aa=k.checked=!0));aa?(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 D={},F=PageSetupDialog.getFormats(),I=0;I<F.length;I++){var C=F[I];D[C.key]=C;var N=document.createElement("option");N.setAttribute("value",
-C.key);mxUtils.write(N,C.title);n.appendChild(N)}var R=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var S=f,Q=function(aa,U){aa=D[n.value];null!=aa.format?(x.value=aa.format.width/100,B.value=aa.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");aa=parseFloat(x.value);if(isNaN(aa)||0>=aa)x.value=f.width/100;aa=parseFloat(B.value);if(isNaN(aa)||0>=aa)B.value=f.height/100;aa=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)),
-Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&k.checked&&(aa=new mxRectangle(0,0,aa.height,aa.width));U&&R||aa.width==S.width&&aa.height==S.height||(S=aa,null!=e&&e(S))};mxEvent.addListener(b,"click",function(aa){d.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(m,"click",function(aa){k.checked=!0;Q(aa);mxEvent.consume(aa)});mxEvent.addListener(x,"blur",Q);mxEvent.addListener(x,"click",Q);mxEvent.addListener(B,"blur",Q);mxEvent.addListener(B,"click",Q);mxEvent.addListener(k,"change",
-Q);mxEvent.addListener(d,"change",Q);mxEvent.addListener(n,"change",function(aa){R="custom"==n.value;Q(aa,!0)});Q();return{set:function(aa){f=aa;g(null,null,!0)},get:function(){return S},widthInput:x,heightInput:B}};
+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 C=F;null!=C&&Graph.isPageLink(C.src)&&(C=a.createImageForPageLink(C.src,null));null!=C&&null!=C.src?(D.setAttribute("src",C.src),D.style.display=""):(D.removeAttribute("src"),D.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 h=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");h.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);h.appendChild(n);e.appendChild(h);h=document.createElement("tr");n=document.createElement("td");
+mxUtils.write(n,mxResources.get("background")+":");h.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(C){a.pickColor(r||"none",function(N){r=N;b()});mxEvent.consume(C)});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 C=parseInt(x.value);x.value=Math.max(1,isNaN(C)?d.getGridSize():C)});h.appendChild(n);e.appendChild(h);h=document.createElement("tr");
+n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");h.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 D=document.createElement("img");D.setAttribute("valign","middle");D.style.verticalAlign="middle";D.style.border="1px solid lightGray";D.style.borderRadius="4px";D.style.marginRight="14px";D.style.maxWidth="100px";D.style.cursor="pointer";D.style.height=
+"60px";D.style.padding="4px";var F=d.backgroundImage,H=function(C){a.showBackgroundImageDialog(function(N,Q){Q||(F=N,f())},F);mxEvent.consume(C)};mxEvent.addListener(B,"click",H);mxEvent.addListener(D,"click",H);f();n.appendChild(D);n.appendChild(B);h.appendChild(n);e.appendChild(h);h=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);H=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var C=parseInt(x.value);isNaN(C)||d.gridSize===C||d.setGridSize(C);C=new ChangePageSetup(a,r,F,u.get());C.ignoreColor=d.background==r;C.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=F?F.src:null);d.pageFormat.width==C.previousFormat.width&&d.pageFormat.height==C.previousFormat.height&&C.ignoreColor&&C.ignoreImage||d.model.execute(C)});H.className="geBtn gePrimaryBtn";
+n.appendChild(H);a.editor.cancelFirst||n.appendChild(B);h.appendChild(n);e.appendChild(h);g.appendChild(e);this.container=g};
+PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function g(ba,S,P){if(P||x!=document.activeElement&&B!=document.activeElement){ba=!1;for(S=0;S<F.length;S++)P=F[S],Q?"custom"==P.key&&(n.value=P.key,Q=!1):null!=P.format&&("a4"==P.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==P.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==P.format.width&&
+f.height==P.format.height?(n.value=P.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,ba=!0):f.width==P.format.height&&f.height==P.format.width&&(n.value=P.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,ba=h.checked=!0));ba?(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 h=document.createElement("input");h.setAttribute("name",b);h.setAttribute("type","radio");h.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);h.style.marginLeft="10px";h.style.marginRight="6px";u.appendChild(h);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 D={},F=PageSetupDialog.getFormats(),H=0;H<F.length;H++){var C=F[H];D[C.key]=C;var N=document.createElement("option");N.setAttribute("value",
+C.key);mxUtils.write(N,C.title);n.appendChild(N)}var Q=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var T=f,R=function(ba,S){ba=D[n.value];null!=ba.format?(x.value=ba.format.width/100,B.value=ba.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");ba=parseFloat(x.value);if(isNaN(ba)||0>=ba)x.value=f.width/100;ba=parseFloat(B.value);if(isNaN(ba)||0>=ba)B.value=f.height/100;ba=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)),
+Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&h.checked&&(ba=new mxRectangle(0,0,ba.height,ba.width));S&&Q||ba.width==T.width&&ba.height==T.height||(T=ba,null!=d&&d(T))};mxEvent.addListener(b,"click",function(ba){e.checked=!0;R(ba);mxEvent.consume(ba)});mxEvent.addListener(m,"click",function(ba){h.checked=!0;R(ba);mxEvent.consume(ba)});mxEvent.addListener(x,"blur",R);mxEvent.addListener(x,"click",R);mxEvent.addListener(B,"blur",R);mxEvent.addListener(B,"click",R);mxEvent.addListener(h,"change",
+R);mxEvent.addListener(e,"change",R);mxEvent.addListener(n,"change",function(ba){Q="custom"==n.value;R(ba,!0)});R();return{set:function(ba){f=ba;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,e,g,d,k,n,u,m,r,x,B){u=null!=u?u:!0;var D=document.createElement("table"),F=document.createElement("tbody");D.style.position="absolute";D.style.top="30px";D.style.left="20px";var I=document.createElement("tr");var C=document.createElement("td");C.style.textOverflow="ellipsis";C.style.textAlign="right";C.style.maxWidth=(B?B+15:100)+"px";C.style.fontSize="10pt";C.style.width=(B?B:84)+"px";mxUtils.write(C,(g||mxResources.get("filename"))+":");I.appendChild(C);var N=
-document.createElement("input");N.setAttribute("value",b||"");N.style.marginLeft="4px";N.style.width=null!=x?x+"px":"180px";var R=mxUtils.button(f,function(){if(null==d||d(N.value))u&&a.hideDialog(),e(N.value)});R.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 S=D.parentNode;if(null!=S){var Q=null;mxEvent.addListener(S,"dragleave",
-function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);aa.stopPropagation();aa.preventDefault()});mxEvent.addListener(S,"dragover",mxUtils.bind(this,function(aa){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=N,Q.style.backgroundColor="#ebf2f9");aa.stopPropagation();aa.preventDefault()}));mxEvent.addListener(S,"drop",mxUtils.bind(this,function(aa){null!=Q&&(Q.style.backgroundColor="",Q=null);0<=mxUtils.indexOf(aa.dataTransfer.types,"text/uri-list")&&(N.value=decodeURIComponent(aa.dataTransfer.getData("text/uri-list")),
-R.click());aa.stopPropagation();aa.preventDefault()}))}}};C=document.createElement("td");C.style.whiteSpace="nowrap";C.appendChild(N);I.appendChild(C);if(null!=g||null==k)F.appendChild(I),null!=r&&(C.appendChild(FilenameDialog.createTypeHint(a,N,r)),null!=a.editor.diagramFileTypes&&(I=document.createElement("tr"),C=document.createElement("td"),C.style.textOverflow="ellipsis",C.style.textAlign="right",C.style.maxWidth="100px",C.style.fontSize="10pt",C.style.width="84px",mxUtils.write(C,mxResources.get("type")+
-":"),I.appendChild(C),C=document.createElement("td"),C.style.whiteSpace="nowrap",I.appendChild(C),b=FilenameDialog.createFileTypes(a,N,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",C.appendChild(b),N.style.width=null!=x?x-40+"px":"190px",I.appendChild(C),F.appendChild(I)));null!=k&&(I=document.createElement("tr"),C=document.createElement("td"),C.colSpan=2,C.appendChild(k),I.appendChild(C),F.appendChild(I));I=document.createElement("tr");C=document.createElement("td");C.colSpan=
-2;C.style.paddingTop=null!=r?"12px":"20px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&C.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",C.appendChild(x));mxEvent.addListener(N,"keypress",function(S){13==S.keyCode&&R.click()});C.appendChild(R);a.editor.cancelFirst||C.appendChild(r);
-I.appendChild(C);F.appendChild(I);D.appendChild(F);this.container=D};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};
-var WrapperWindow=function(a,b,f,e,g,d,k){var n=a.createSidebarContainer();k(n);this.window=new mxWindow(b,n,f,e,g,d,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(u){null==u&&(u=window.event);return null!=u&&a.isSelectionAllowed(u)}))};
-(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()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var k=this.graph,n=null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background,u=null!=n&&this.gridColor!=n.toLowerCase()?this.gridColor:"#ffffff",m="none",r="";if(k.isGridEnabled()||k.gridVisible){r=10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(u))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",r=k.gridSize*this.scale*this.gridSteps):m="url("+this.gridImage+
-")";var x=u=0;null!=k.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),u=1+x.x,x=1+x.y);r=-Math.round(r-mxUtils.mod(this.translate.x*this.scale-u,r))+"px "+-Math.round(r-mxUtils.mod(this.translate.y*this.scale-x,r))+"px"}u=k.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=r,k.view.backgroundPageShape.node.style.backgroundImage=m,k.view.backgroundPageShape.node.style.backgroundColor=n,k.view.backgroundPageShape.node.style.borderColor=
-k.defaultPageBorderColor,k.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor="",Editor.isDarkMode()||"simple"!=Editor.currentTheme?k.container.style.backgroundColor="":k.container.style.backgroundColor=k.simpleBackgroundColor):(k.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundImage=m,null!=k.background&&k.background!=mxConstants.NONE||Editor.isDarkMode()||"simple"!=Editor.currentTheme?u.style.backgroundColor=
-n:(u.style.backgroundColor=k.simpleBackgroundColor,k.container.style.backgroundColor=""))};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,D=this.view.getBackgroundPageBounds();n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),I=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=k?Math.ceil(n/F.width)-1:0,N=D.x+n,
-R=D.y+u;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(S){if(null!=S){for(var Q=S==this.horizontalPageBreaks?I:C,aa=0;aa<=Q;aa++){var U=S==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x),Math.round(D.y+(aa+1)*F.height)),new mxPoint(Math.round(N),Math.round(D.y+(aa+1)*F.height))]:[new mxPoint(Math.round(D.x+(aa+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(aa+1)*F.width),
-Math.round(R))];null!=S[aa]?(S[aa].points=U,S[aa].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(),S[aa]=U)}for(aa=Q;aa<S.length;aa++)S[aa].destroy();S.splice(Q,S.length-Q)}});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 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(D){mxEvent.consume(D)});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 O=g.apply(this,arguments),T=this.backgroundImage;if(null!=T&&null!=T.width&&null!=T.height){var J=this.view.translate,ba=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((J.x+T.x)*ba,(J.y+T.y)*ba,T.width*ba,T.height*ba))}return O};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(O,T){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(O){return!mxEvent.isPopupTrigger(O.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 strokeColor strokeWidth".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(O){try{e.getModel().isEdge(O)?m=!1:u=!1;var T=e.getCellStyle(O,!1),J=[],ba=[],ia;for(ia in T)J.push(T[ia]),ba.push(ia);e.getModel().isEdge(O)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",J,"cells",[O]));e.getModel().isEdge(O)?m=!0:u=!0}catch(na){this.handleError(na)}};
-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"],["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 D=function(O,T,J,ba,ia,na,W){ba=null!=ba?ba:e.currentVertexStyle;ia=null!=ia?ia:e.currentEdgeStyle;na=null!=na?na:!0;J=null!=J?J:e.getModel();if(W){W=[];for(var da=0;da<O.length;da++)W=W.concat(J.getDescendants(O[da]));O=W}J.beginUpdate();
-try{for(da=0;da<O.length;da++){var sa=O[da];if(T)var ta=["fontSize","fontFamily","fontColor"];else{var Ja=J.getStyle(sa),Ia=null!=Ja?Ja.split(";"):[];ta=d.slice();for(var ua=0;ua<Ia.length;ua++){var Ba=Ia[ua],qa=Ba.indexOf("=");if(0<=qa){var Ea=Ba.substring(0,qa),Ua=mxUtils.indexOf(ta,Ea);0<=Ua&&ta.splice(Ua,1);for(W=0;W<B.length;W++){var db=B[W];if(0<=mxUtils.indexOf(db,Ea))for(var Ta=0;Ta<db.length;Ta++){var ab=mxUtils.indexOf(ta,db[Ta]);0<=ab&&ta.splice(ab,1)}}}}}var Ya=J.isEdge(sa);W=Ya?ia:ba;
-var Va=J.getStyle(sa);for(ua=0;ua<ta.length;ua++){Ea=ta[ua];var Za=W[Ea];null!=Za&&"edgeStyle"!=Ea&&("shape"!=Ea||Ya)&&(!Ya||na||0>mxUtils.indexOf(n,Ea))&&(Va=mxUtils.setStyle(Va,Ea,Za))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));J.setStyle(sa,Va)}}finally{J.endUpdate()}return O};e.addListener("cellsInserted",function(O,T){D(T.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(O,T){D(T.getProperty("cells"),!0)});
-this.insertHandler=D;this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(O){null==O&&(O=window.event);return e.isEditing()||null!=O&&this.isSelectionAllowed(O)});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(O){if(null!=O){var T=mxEvent.getSource(O);if("A"==T.nodeName)for(;null!=T;){if("geHint"==T.className)return!0;T=T.parentNode}}return F(O)},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 I=e.graphHandler.start;e.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
-function(O){var T=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(O)-T.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(O)-T.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,N=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(O,T){return C||N.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(O){32!=O.which||e.isEditing()?
-mxEvent.isConsumed(O)||27!=O.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(O)!=e.container||mxEvent.consume(O))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(O){e.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var R=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(O){return R.apply(this,
-arguments)||C||mxEvent.isMouseEvent(O.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(O.getEvent()))&&(!mxEvent.isControlDown(O.getEvent())&&mxEvent.isRightMouseButton(O.getEvent())||mxEvent.isMiddleMouseButton(O.getEvent()))};var S=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(O){return S.apply(this,arguments)||13==O.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O)||mxClient.IS_SF&&mxEvent.isShiftDown(O))};var Q=e.isZoomWheelEvent;
-e.isZoomWheelEvent=function(){return C||Q.apply(this,arguments)};var aa=!1,U=null,P=null,X=null,ja=mxUtils.bind(this,function(){if(null!=this.toolbar&&aa!=e.cellEditor.isContentEditing()){for(var O=this.toolbar.container.firstChild,T=[];null!=O;){var J=O.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,O)&&(O.parentNode.removeChild(O),T.push(O));O=J}O=this.toolbar.fontMenu;J=this.toolbar.sizeMenu;if(null==X)this.toolbar.createTextToolbar();else{for(var ba=0;ba<X.length;ba++)this.toolbar.container.appendChild(X[ba]);
-this.toolbar.fontMenu=U;this.toolbar.sizeMenu=P}aa=e.cellEditor.isContentEditing();U=O;P=J;X=T}}),fa=this,ra=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){ra.apply(this,arguments);ja();if(e.cellEditor.isContentEditing()){var O=!1,T=function(){O||(O=!0,window.setTimeout(function(){var J=e.getSelectedEditingElement();null!=J&&(J=mxUtils.getCurrentStyle(J),null!=J&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(J.fontFamily)),fa.toolbar.setFontSize(parseInt(J.fontSize))));
-O=!1},0))};mxEvent.addListener(e.cellEditor.textarea,"input",T);mxEvent.addListener(e.cellEditor.textarea,"touchend",T);mxEvent.addListener(e.cellEditor.textarea,"mouseup",T);mxEvent.addListener(e.cellEditor.textarea,"keyup",T);T()}};var K=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(O,T){try{K.apply(this,arguments),ja()}catch(J){fa.handleError(J)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(O){}var V=
-e.fireMouseEvent;e.fireMouseEvent=function(O,T,J){O==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(O,T,J){this.menus.createPopupMenu(O,T,J)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(O){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT,
-function(O,T){var J=[T.getProperty("cell")];T.getProperty("terminalInserted")&&(J.push(T.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(e.view.getState(J[J.length-1]))},0));D(J)});this.addListener("styleChanged",mxUtils.bind(this,function(O,T){var J=T.getProperty("cells"),ba=O=!1;if(0<J.length)for(var ia=0;ia<J.length&&(O=e.getModel().isVertex(J[ia])||O,!(ba=e.getModel().isEdge(J[ia])||ba)||!O);ia++);else ba=O=!0;O=O&&!u;ba=ba&&!m;J=T.getProperty("keys");
-T=T.getProperty("values");for(ia=0;ia<J.length;ia++){var na=0<=mxUtils.indexOf(r,J[ia]);if("strokeColor"!=J[ia]||null!=T[ia]&&"none"!=T[ia])if(0<=mxUtils.indexOf(k,J[ia]))ba||0<=mxUtils.indexOf(x,J[ia])?null==T[ia]?delete e.currentEdgeStyle[J[ia]]:e.currentEdgeStyle[J[ia]]=T[ia]:O&&0<=mxUtils.indexOf(d,J[ia])&&(null==T[ia]?delete e.currentVertexStyle[J[ia]]:e.currentVertexStyle[J[ia]]=T[ia]);else if(0<=mxUtils.indexOf(d,J[ia])){if(O||na)null==T[ia]?delete e.currentVertexStyle[J[ia]]:e.currentVertexStyle[J[ia]]=
-T[ia];if(ba||na||0<=mxUtils.indexOf(x,J[ia]))null==T[ia]?delete e.currentEdgeStyle[J[ia]]:e.currentEdgeStyle[J[ia]]=T[ia]}}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 O=e.currentVertexStyle.fontFamily||"Helvetica",
-T=String(e.currentVertexStyle.fontSize||"12"),J=e.getView().getState(e.getSelectionCell());null!=J&&(O=J.style[mxConstants.STYLE_FONTFAMILY]||O,T=J.style[mxConstants.STYLE_FONTSIZE]||T,10<O.length&&(O=O.substring(0,8)+"..."));this.toolbar.setFontName(O);this.toolbar.setFontSize(T)}),e.getSelectionModel().addListener(mxEvent.CHANGE,a),e.getModel().addListener(mxEvent.CHANGE,a));e.addListener(mxEvent.CELLS_ADDED,function(O,T){O=T.getProperty("cells");T=T.getProperty("parent");null!=T&&e.getModel().isLayer(T)&&
-!e.isCellVisible(T)&&null!=O&&0<O.length&&e.getModel().setVisible(T,!0)});this.gestureHandler=mxUtils.bind(this,function(O){null!=this.currentMenu&&mxEvent.getSource(O)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
-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);
+var FilenameDialog=function(a,b,f,d,g,e,h,n,u,m,r,x,B){u=null!=u?u:!0;var D=document.createElement("table"),F=document.createElement("tbody");D.style.position="absolute";D.style.top="30px";D.style.left="20px";var H=document.createElement("tr");var C=document.createElement("td");C.style.textOverflow="ellipsis";C.style.textAlign="right";C.style.maxWidth=(B?B+15:100)+"px";C.style.fontSize="10pt";C.style.width=(B?B:84)+"px";mxUtils.write(C,(g||mxResources.get("filename"))+":");H.appendChild(C);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==h)if(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var T=D.parentNode;if(null!=T){var R=null;mxEvent.addListener(T,"dragleave",
+function(ba){null!=R&&(R.style.backgroundColor="",R=null);ba.stopPropagation();ba.preventDefault()});mxEvent.addListener(T,"dragover",mxUtils.bind(this,function(ba){null==R&&(!mxClient.IS_IE||10<document.documentMode)&&(R=N,R.style.backgroundColor="#ebf2f9");ba.stopPropagation();ba.preventDefault()}));mxEvent.addListener(T,"drop",mxUtils.bind(this,function(ba){null!=R&&(R.style.backgroundColor="",R=null);0<=mxUtils.indexOf(ba.dataTransfer.types,"text/uri-list")&&(N.value=decodeURIComponent(ba.dataTransfer.getData("text/uri-list")),
+Q.click());ba.stopPropagation();ba.preventDefault()}))}}};C=document.createElement("td");C.style.whiteSpace="nowrap";C.appendChild(N);H.appendChild(C);if(null!=g||null==h)F.appendChild(H),null!=r&&(C.appendChild(FilenameDialog.createTypeHint(a,N,r)),null!=a.editor.diagramFileTypes&&(H=document.createElement("tr"),C=document.createElement("td"),C.style.textOverflow="ellipsis",C.style.textAlign="right",C.style.maxWidth="100px",C.style.fontSize="10pt",C.style.width="84px",mxUtils.write(C,mxResources.get("type")+
+":"),H.appendChild(C),C=document.createElement("td"),C.style.whiteSpace="nowrap",H.appendChild(C),b=FilenameDialog.createFileTypes(a,N,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",C.appendChild(b),N.style.width=null!=x?x-40+"px":"190px",H.appendChild(C),F.appendChild(H)));null!=h&&(H=document.createElement("tr"),C=document.createElement("td"),C.colSpan=2,C.appendChild(h),H.appendChild(C),F.appendChild(H));H=document.createElement("tr");C=document.createElement("td");C.colSpan=
+2;C.style.paddingTop=null!=r?"12px":"20px";C.style.whiteSpace="nowrap";C.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&C.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",C.appendChild(x));mxEvent.addListener(N,"keypress",function(T){13==T.keyCode&&Q.click()});C.appendChild(Q);a.editor.cancelFirst||C.appendChild(r);
+H.appendChild(C);F.appendChild(H);D.appendChild(F);this.container=D};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 h=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=h&&a.showError(null,h,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 h=b.value.lastIndexOf(".drawio.");h=0<h?h:b.value.lastIndexOf(".");"drawio"!=e&&(e="drawio."+e);b.value=0<h?b.value.substring(0,h+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 h=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){h=n;break}}d.value=h};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d};
+var WrapperWindow=function(a,b,f,d,g,e,h){var n=a.createSidebarContainer();h(n);this.window=new mxWindow(b,n,f,d,g,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(u){null==u&&(u=window.event);return null!=u&&a.isSelectionAllowed(u)}))};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var h=this.graph;if(null!=h.container&&!h.transparentBackground){if(h.pageVisible){var n=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var u=h.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(h.container),u.style.position="absolute",h.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){h.dblClick(m)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(m){h.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){null!=
+h.tooltipHandler&&h.tooltipHandler.isHideOnHover()&&h.tooltipHandler.hide();h.isMouseDown&&!mxEvent.isConsumed(m)&&h.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){h.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()}};
+mxGraphView.prototype.validateBackgroundStyles=function(){var h=this.graph,n=null==h.background||h.background==mxConstants.NONE?h.defaultPageBackgroundColor:h.background,u=null!=n&&this.gridColor!=n.toLowerCase()?this.gridColor:"#ffffff",m="none",r="";if(h.isGridEnabled()||h.gridVisible){r=10;mxClient.IS_SVG?(m=unescape(encodeURIComponent(this.createSvgGrid(u))),m=window.btoa?btoa(m):Base64.encode(m,!0),m="url(data:image/svg+xml;base64,"+m+")",r=h.gridSize*this.scale*this.gridSteps):m="url("+this.gridImage+
+")";var x=u=0;null!=h.view.backgroundPageShape&&(x=this.getBackgroundPageBounds(),u=1+x.x,x=1+x.y);r=-Math.round(r-mxUtils.mod(this.translate.x*this.scale-u,r))+"px "+-Math.round(r-mxUtils.mod(this.translate.y*this.scale-x,r))+"px"}u=h.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);null!=h.view.backgroundPageShape?(h.view.backgroundPageShape.node.style.backgroundPosition=r,h.view.backgroundPageShape.node.style.backgroundImage=m,h.view.backgroundPageShape.node.style.backgroundColor=n,h.view.backgroundPageShape.node.style.borderColor=
+h.defaultPageBorderColor,h.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor="",Editor.isDarkMode()||"simple"!=Editor.currentTheme?h.container.style.backgroundColor="":h.container.style.backgroundColor=h.simpleBackgroundColor):(h.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundImage=m,null!=h.background&&h.background!=mxConstants.NONE||Editor.isDarkMode()||"simple"!=Editor.currentTheme?u.style.backgroundColor=
+n:(u.style.backgroundColor=h.simpleBackgroundColor,h.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(h){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="'+h+'" opacity="0.2" stroke-width="1"/><path d="M '+u+" 0 L 0 0 0 "+u+'" fill="none" stroke="'+h+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,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+h,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(h,n,u){var m=this.view.scale,r=this.view.translate,x=this.pageFormat,B=m*this.pageScale,D=this.view.getBackgroundPageBounds();n=D.width;u=D.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),H=(h=h&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,C=h?Math.ceil(n/F.width)-1:0,N=D.x+n,
+Q=D.y+u;null==this.horizontalPageBreaks&&0<H&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<C&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(T){if(null!=T){for(var R=T==this.horizontalPageBreaks?H:C,ba=0;ba<=R;ba++){var S=T==this.horizontalPageBreaks?[new mxPoint(Math.round(D.x),Math.round(D.y+(ba+1)*F.height)),new mxPoint(Math.round(N),Math.round(D.y+(ba+1)*F.height))]:[new mxPoint(Math.round(D.x+(ba+1)*F.width),Math.round(D.y)),new mxPoint(Math.round(D.x+(ba+1)*F.width),
+Math.round(Q))];null!=T[ba]?(T[ba].points=S,T[ba].redraw()):(S=new mxPolyline(S,this.pageBreakColor),S.dialect=this.dialect,S.isDashed=this.pageBreakDashed,S.pointerEvents=!1,S.init(this.view.backgroundPane),S.redraw(),T[ba]=S)}for(ba=R;ba<T.length;ba++)T[ba].destroy();T.splice(R,T.length-R)}});h(this.horizontalPageBreaks);h(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(h,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 h=f.apply(this,arguments);h.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(h,arguments)});return h};mxGraphView.prototype.createBackgroundPageShape=
+function(h){return new mxRectangleShape(h,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var h=this.getGraphBounds(),n=0<h.width?h.x/this.scale-this.translate.x:0,u=0<h.height?h.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+h.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+h.height/this.scale)/m)-B)*m)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,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=h+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;
+mxPopupMenu.prototype.addItem=function(h,n,u,m,r,x){var B=g.apply(this,arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(D){mxEvent.consume(D)});return B};var e=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(h,n,u){var m=this.graph.model.getParent(h);if(n){var r=this.graph.model.isEdge(h)?null:this.graph.getCellGeometry(h);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(h)&&(null!=r&&r.relative||!this.graph.isContainer(m)||
+this.graph.isPart(h))}else if(r=e.apply(this,arguments),this.graph.isTableCell(h)||this.graph.isTableRow(h))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(h)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(h)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(h){h=h.getCell();
+for(var n=this.graph.getModel(),u=n.getParent(h),m=this.graph.view.getState(u),r=this.graph.isCellSelected(h);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(h)||this.graph.isTableRow(h)))h=u;u=n.getParent(u)}return h}})();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 O=g.apply(this,arguments),U=this.backgroundImage;if(null!=U&&null!=U.width&&null!=U.height){var J=this.view.translate,aa=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((J.x+U.x)*aa,(J.y+U.y)*aa,U.width*aa,U.height*aa))}return O};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(O,U){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(O){return!mxEvent.isPopupTrigger(O.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 strokeColor strokeWidth".split(" "),h="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(O){try{d.getModel().isEdge(O)?m=!1:u=!1;var U=d.getCellStyle(O,!1),J=[],aa=[],ia;for(ia in U)J.push(U[ia]),aa.push(ia);d.getModel().isEdge(O)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",aa,"values",J,"cells",[O]));d.getModel().isEdge(O)?m=!0:u=!0}catch(na){this.handleError(na)}};
+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"],["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<h.length;b++)0>mxUtils.indexOf(e,h[b])&&e.push(h[b]);var D=function(O,U,J,aa,ia,na,W){aa=null!=aa?aa:d.currentVertexStyle;ia=null!=ia?ia:d.currentEdgeStyle;na=null!=na?na:!0;J=null!=J?J:d.getModel();if(W){W=[];for(var da=0;da<O.length;da++)W=W.concat(J.getDescendants(O[da]));O=W}J.beginUpdate();
+try{for(da=0;da<O.length;da++){var sa=O[da];if(U)var ta=["fontSize","fontFamily","fontColor"];else{var Ja=J.getStyle(sa),Ia=null!=Ja?Ja.split(";"):[];ta=e.slice();for(var ua=0;ua<Ia.length;ua++){var Ba=Ia[ua],qa=Ba.indexOf("=");if(0<=qa){var Ea=Ba.substring(0,qa),Ua=mxUtils.indexOf(ta,Ea);0<=Ua&&ta.splice(Ua,1);for(W=0;W<B.length;W++){var db=B[W];if(0<=mxUtils.indexOf(db,Ea))for(var Ta=0;Ta<db.length;Ta++){var ab=mxUtils.indexOf(ta,db[Ta]);0<=ab&&ta.splice(ab,1)}}}}}var Ya=J.isEdge(sa);W=Ya?ia:aa;
+var Va=J.getStyle(sa);for(ua=0;ua<ta.length;ua++){Ea=ta[ua];var Za=W[Ea];null!=Za&&"edgeStyle"!=Ea&&("shape"!=Ea||Ya)&&(!Ya||na||0>mxUtils.indexOf(n,Ea))&&(Va=mxUtils.setStyle(Va,Ea,Za))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));J.setStyle(sa,Va)}}finally{J.endUpdate()}return O};d.addListener("cellsInserted",function(O,U){D(U.getProperty("cells"),null,null,null,null,!0,!0)});d.addListener("textInserted",function(O,U){D(U.getProperty("cells"),!0)});
+this.insertHandler=D;this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(O){null==O&&(O=window.event);return d.isEditing()||null!=O&&this.isSelectionAllowed(O)});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(O){if(null!=O){var U=mxEvent.getSource(O);if("A"==U.nodeName)for(;null!=U;){if("geHint"==U.className)return!0;U=U.parentNode}}return F(O)},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 H=d.graphHandler.start;d.graphHandler.start=function(){null!=fa.hoverIcons&&fa.hoverIcons.reset();H.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
+function(O){var U=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(O)-U.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(O)-U.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,N=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(O,U){return C||N.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(O){32!=O.which||d.isEditing()?
+mxEvent.isConsumed(O)||27!=O.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(O)!=d.container||mxEvent.consume(O))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(O){d.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var Q=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(O){return Q.apply(this,
+arguments)||C||mxEvent.isMouseEvent(O.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(O.getEvent()))&&(!mxEvent.isControlDown(O.getEvent())&&mxEvent.isRightMouseButton(O.getEvent())||mxEvent.isMiddleMouseButton(O.getEvent()))};var T=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(O){return T.apply(this,arguments)||13==O.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O)||mxClient.IS_SF&&mxEvent.isShiftDown(O))};var R=d.isZoomWheelEvent;
+d.isZoomWheelEvent=function(){return C||R.apply(this,arguments)};var ba=!1,S=null,P=null,X=null,ja=mxUtils.bind(this,function(){if(null!=this.toolbar&&ba!=d.cellEditor.isContentEditing()){for(var O=this.toolbar.container.firstChild,U=[];null!=O;){var J=O.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,O)&&(O.parentNode.removeChild(O),U.push(O));O=J}O=this.toolbar.fontMenu;J=this.toolbar.sizeMenu;if(null==X)this.toolbar.createTextToolbar();else{for(var aa=0;aa<X.length;aa++)this.toolbar.container.appendChild(X[aa]);
+this.toolbar.fontMenu=S;this.toolbar.sizeMenu=P}ba=d.cellEditor.isContentEditing();S=O;P=J;X=U}}),fa=this,ra=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){ra.apply(this,arguments);ja();if(d.cellEditor.isContentEditing()){var O=!1,U=function(){O||(O=!0,window.setTimeout(function(){var J=d.getSelectedEditingElement();null!=J&&(J=mxUtils.getCurrentStyle(J),null!=J&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(J.fontFamily)),fa.toolbar.setFontSize(parseInt(J.fontSize))));
+O=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",U);mxEvent.addListener(d.cellEditor.textarea,"touchend",U);mxEvent.addListener(d.cellEditor.textarea,"mouseup",U);mxEvent.addListener(d.cellEditor.textarea,"keyup",U);U()}};var K=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(O,U){try{K.apply(this,arguments),ja()}catch(J){fa.handleError(J)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(O){}var V=
+d.fireMouseEvent;d.fireMouseEvent=function(O,U,J){O==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(O,U,J){this.menus.createPopupMenu(O,U,J)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(O){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};d.connectionHandler.addListener(mxEvent.CONNECT,
+function(O,U){var J=[U.getProperty("cell")];U.getProperty("terminalInserted")&&(J.push(U.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(d.view.getState(J[J.length-1]))},0));D(J)});this.addListener("styleChanged",mxUtils.bind(this,function(O,U){var J=U.getProperty("cells"),aa=O=!1;if(0<J.length)for(var ia=0;ia<J.length&&(O=d.getModel().isVertex(J[ia])||O,!(aa=d.getModel().isEdge(J[ia])||aa)||!O);ia++);else aa=O=!0;O=O&&!u;aa=aa&&!m;J=U.getProperty("keys");
+U=U.getProperty("values");for(ia=0;ia<J.length;ia++){var na=0<=mxUtils.indexOf(r,J[ia]);if("strokeColor"!=J[ia]||null!=U[ia]&&"none"!=U[ia])if(0<=mxUtils.indexOf(h,J[ia]))aa||0<=mxUtils.indexOf(x,J[ia])?null==U[ia]?delete d.currentEdgeStyle[J[ia]]:d.currentEdgeStyle[J[ia]]=U[ia]:O&&0<=mxUtils.indexOf(e,J[ia])&&(null==U[ia]?delete d.currentVertexStyle[J[ia]]:d.currentVertexStyle[J[ia]]=U[ia]);else if(0<=mxUtils.indexOf(e,J[ia])){if(O||na)null==U[ia]?delete d.currentVertexStyle[J[ia]]:d.currentVertexStyle[J[ia]]=
+U[ia];if(aa||na||0<=mxUtils.indexOf(x,J[ia]))null==U[ia]?delete d.currentEdgeStyle[J[ia]]:d.currentEdgeStyle[J[ia]]=U[ia]}}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 O=d.currentVertexStyle.fontFamily||"Helvetica",
+U=String(d.currentVertexStyle.fontSize||"12"),J=d.getView().getState(d.getSelectionCell());null!=J&&(O=J.style[mxConstants.STYLE_FONTFAMILY]||O,U=J.style[mxConstants.STYLE_FONTSIZE]||U,10<O.length&&(O=O.substring(0,8)+"..."));this.toolbar.setFontName(O);this.toolbar.setFontSize(U)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(O,U){O=U.getProperty("cells");U=U.getProperty("parent");null!=U&&d.getModel().isLayer(U)&&
+!d.isCellVisible(U)&&null!=O&&0<O.length&&d.getModel().setVisible(U,!0)});this.gestureHandler=mxUtils.bind(this,function(O){null!=this.currentMenu&&mxEvent.getSource(O)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
+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 h=d(a,4);if(null!=b&&b(e-8,h,f))break;value=d(a,f);d(a,4);if("IEND"==h)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 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,
+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,
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(),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.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.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,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 D=this.editor.graph.view.getState(B);
-if(B==f.getChildAt(e,d+u)&&null!=D&&1==mxUtils.getValue(D.style,"colspan",1)&&1==mxUtils.getValue(D.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,D,F){var I=a.getCompositeParent(u.cell);B=a.getCellGeometry(I);for(r.consume();null!=I&&a.model.isVertex(I)&&null!=B&&B.relative;)cell=
-I,I=a.model.getParent(cell),B=a.getCellGeometry(I);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),I,mxUtils.bind(this,function(C){F(C);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(C))}),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 D=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-D.x;D=a.container.scrollTop+r.y-D.y;var I=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),C=b.showShapePicker(F,D,I,mxUtils.bind(this,function(N){null!=N&&a.connectVertex(I,x,a.defaultEdgeLength,B,!0,!0,function(R,S,Q){Q(N);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(N))},
-function(R){a.selectCellsForConnectVertex(R)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(C,r,F,D,x);mxUtils.setOpacity(C,30);mxEvent.addListener(C,"mouseenter",function(){mxUtils.setOpacity(C,100)});mxEvent.addListener(C,"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: "+
+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]),h=g.getIndex(d),n=null,u=1,m=1,r=0,x=h<g.getChildCount()-1?f.getChildAt(f.getChildAt(g,h+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=h+m<g.getChildCount()?f.getChildAt(f.getChildAt(g,h+m),e):null);var D=this.editor.graph.view.getState(B);
+if(B==f.getChildAt(d,e+u)&&null!=D&&1==mxUtils.getValue(D.style,"colspan",1)&&1==mxUtils.getValue(D.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 h=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?h.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,D,F){var H=a.getCompositeParent(u.cell);B=a.getCellGeometry(H);for(r.consume();null!=H&&a.model.isVertex(H)&&null!=B&&B.relative;)cell=
+H,H=a.model.getParent(cell),B=a.getCellGeometry(H);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),H,mxUtils.bind(this,function(C){F(C);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(C))}),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 D=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-D.x;D=a.container.scrollTop+r.y-D.y;var H=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),C=b.showShapePicker(F,D,H,mxUtils.bind(this,function(N){null!=N&&a.connectVertex(H,x,a.defaultEdgeLength,B,!0,!0,function(Q,T,R){R(N);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(N))},
+function(Q){a.selectCellsForConnectVertex(Q)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(C,r,F,D,x);mxUtils.setOpacity(C,30);mxEvent.addListener(C,"mouseenter",function(){mxUtils.setOpacity(C,100)});mxEvent.addListener(C,"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,h,n){var u=null;if(null!=h&&0<h.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>h.length?35*h.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 D=document.createElement("a");D.className="geItem";D.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";u.appendChild(D);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,D,null,!0,!1,B.geometry.width,B.geometry.height);mxEvent.addListener(D,"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;"),
+this.sidebar.graph.pasteStyle(x,[B]):m.insertHandler([B],""!=B.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([B],25,25,D,null,!0,!1,B.geometry.width,B.geometry.height);mxEvent.addListener(D,"click",function(){var F=r.cloneCell(B);if(null!=d)d(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!=e&&e()})});for(g=0;g<(n?Math.min(h.length,4):h.length);g++)f(h[g]);h=u.offsetTop+u.clientHeight-(r.container.scrollTop+r.container.offsetHeight);0<h&&(u.style.top=Math.max(r.container.scrollTop+22,b-h)+"px");h=u.offsetLeft+u.clientWidth-(r.container.scrollLeft+r.container.offsetWidth);0<h&&(u.style.left=Math.max(r.container.scrollLeft+22,a-h)+"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;"),
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 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.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.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,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.className="geAdaptiveAsset",e.style.position="absolute",e.style.marginTop="0.5px",e.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(e.style,
-"transform","scaleX(-1)"),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.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.className="geAdaptiveAsset",d.style.position="absolute",d.style.marginTop="0.5px",d.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(d.style,
+"transform","scaleX(-1)"),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.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(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 D=d.view.getState(k[B]);if(null!=D){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=D.x/D.view.scale-D.view.translate.x,F.y=D.y/D.view.scale-D.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.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 h=null;if(e.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{h=h||e.getSelectionCells();h=e.getExportableCells(e.model.getTopmostCells(h));for(var n={},u=e.createCellLookup(h),m=e.cloneCells(h,null,n),r=new mxGraphModel,x=r.getChildAt(r.getRoot(),
+0),B=0;B<m.length;B++){r.add(x,m[B]);var D=e.view.getState(h[B]);if(null!=D){var F=e.getCellGeometry(m[B]);null!=F&&F.relative&&!r.isEdge(h[B])&&null==u[mxObjectIdentity.get(r.getParent(h[B]))]&&(F.offset=null,F.relative=!1,F.x=D.x/D.view.scale-D.view.translate.x,F.y=D.y/D.view.scale-D.view.translate.y)}}e.updateCustomLinks(e.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return h};var f=mxClipboard.paste;mxClipboard.paste=function(e){var h=
+null;e.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):h=f.apply(this,arguments);a.updatePasteActionStates();return h};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,h){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 J=this.graph.getPageLayout(),ba=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+J.x*ba.width),this.scale*(this.translate.y+J.y*ba.height),this.scale*J.width*ba.width,
-this.scale*J.height*ba.height)};a.getPreferredPageSize=function(J,ba,ia){J=this.getPageLayout();ba=this.getPageSize();return new mxRectangle(0,0,J.width*ba.width,J.height*ba.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(J,ba,ia,na){if(null!=a.container&&!a.isViewer()){ia=null!=ia?ia:0;na=null!=na?na:0;var W=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),da=mxUtils.hasScrollbars(a.container),sa=a.view.translate,ta=
-a.view.scale,Ja=mxRectangle.fromRectangle(W);Ja.x=Ja.x/ta-sa.x;Ja.y=Ja.y/ta-sa.y;Ja.width/=ta;Ja.height/=ta;sa=a.container.scrollTop;var Ia=a.container.scrollLeft,ua=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ua+=3;var Ba=a.container.offsetWidth-ua;ua=a.container.offsetHeight-ua;J=J?Math.max(.3,Math.min(ba||1,Ba/Ja.width)):ta;ba=(Ba-J*Ja.width)/2/J;var qa=0==this.lightboxVerticalDivider?0:(ua-J*Ja.height)/this.lightboxVerticalDivider/J;da&&(ba=Math.max(ba,
-0),qa=Math.max(qa,0));if(da||W.width<Ba||W.height<ua)a.view.scaleAndTranslate(J,Math.floor(ba-Ja.x),Math.floor(qa-Ja.y)),a.container.scrollTop=sa*J/ta,a.container.scrollLeft=Ia*J/ta;else if(0!=ia||0!=na)W=a.view.translate,a.view.setTranslate(Math.floor(W.x+ia/ta),Math.floor(W.y+na/ta))}});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(J){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(J){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 J=this.graph.getPageLayout(),aa=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+J.x*aa.width),this.scale*(this.translate.y+J.y*aa.height),this.scale*J.width*aa.width,
+this.scale*J.height*aa.height)};a.getPreferredPageSize=function(J,aa,ia){J=this.getPageLayout();aa=this.getPageSize();return new mxRectangle(0,0,J.width*aa.width,J.height*aa.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(J,aa,ia,na){if(null!=a.container&&!a.isViewer()){ia=null!=ia?ia:0;na=null!=na?na:0;var W=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),da=mxUtils.hasScrollbars(a.container),sa=a.view.translate,ta=
+a.view.scale,Ja=mxRectangle.fromRectangle(W);Ja.x=Ja.x/ta-sa.x;Ja.y=Ja.y/ta-sa.y;Ja.width/=ta;Ja.height/=ta;sa=a.container.scrollTop;var Ia=a.container.scrollLeft,ua=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ua+=3;var Ba=a.container.offsetWidth-ua;ua=a.container.offsetHeight-ua;J=J?Math.max(.3,Math.min(aa||1,Ba/Ja.width)):ta;aa=(Ba-J*Ja.width)/2/J;var qa=0==this.lightboxVerticalDivider?0:(ua-J*Ja.height)/this.lightboxVerticalDivider/J;da&&(aa=Math.max(aa,
+0),qa=Math.max(qa,0));if(da||W.width<Ba||W.height<ua)a.view.scaleAndTranslate(J,Math.floor(aa-Ja.x),Math.floor(qa-Ja.y)),a.container.scrollTop=sa*J/ta,a.container.scrollLeft=Ia*J/ta;else if(0!=ia||0!=na)W=a.view.translate,a.view.setTranslate(Math.floor(W.x+ia/ta),Math.floor(W.y+na/ta))}});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(J){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(J){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 d=mxUtils.bind(this,function(){var J=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=J?parseInt(J["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(J,ba,ia){k++;
-var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",J);null!=ia&&na.setAttribute("title",ia);J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("src",ba);J.style.width="36px";J.style.filter="invert(100%)";na.appendChild(J);this.chromelessToolbar.appendChild(na);return na});if(null!=g.backBtn){var n=Graph.sanitizeLink(g.backBtn.url);null!=n&&d(mxUtils.bind(this,function(J){window.location.href=
-n;mxEvent.consume(J)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var u=d(mxUtils.bind(this,function(J){this.actions.get("previousPage").funct();mxEvent.consume(J)}),Editor.previousImage,mxResources.get("previousPage")),m=document.createElement("div");m.style.fontFamily=Editor.defaultHtmlFont;m.style.display="inline-block";m.style.verticalAlign="top";m.style.fontWeight="bold";m.style.marginTop="8px";m.style.fontSize="14px";m.style.color=mxClient.IS_IE||mxClient.IS_IE11?
-"#000000":"#ffffff";this.chromelessToolbar.appendChild(m);var r=d(mxUtils.bind(this,function(J){this.actions.get("nextPage").funct();mxEvent.consume(J)}),Editor.nextImage,mxResources.get("nextPage")),x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(m.innerText="",mxUtils.write(m,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";r.style.paddingLeft="4px";r.style.paddingRight=
-"0px";var B=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(r.style.display="",u.style.display="",m.style.display="inline-block"):(r.style.display="none",u.style.display="none",m.style.display="none");x()});this.editor.addListener("resetGraphView",B);this.editor.addListener("pageSelected",x)}d(mxUtils.bind(this,function(J){this.actions.get("zoomOut").funct();mxEvent.consume(J)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,
-function(J){this.actions.get("zoomIn").funct();mxEvent.consume(J)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(J){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(J)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,F=null,I=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);D=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),J||200)}),C=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,J||30)});if("1"==urlParams.layers){this.layersDialog=null;var N=d(mxUtils.bind(this,function(J){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 ba=N.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=ba.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));ba=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=ba.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(J)}),Editor.layersImage,mxResources.get("layers")),R=a.getModel();R.addListener(mxEvent.CHANGE,function(){N.style.display=1<R.getChildCount(R.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(J){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(J)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(B=0;B<this.lightboxToolbarActions.length;B++){var S=this.lightboxToolbarActions[B];S.elem=d(S.fn,S.icon,S.tooltip)}if(null!=g.refreshBtn){var Q=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);
-d(mxUtils.bind(this,function(J){null!=Q?window.location.href=Q:window.location.reload();mxEvent.consume(J)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(J){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(J)}),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(J){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(J))}),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(J){mxEvent.isTouchEvent(J)||(mxEvent.isShiftDown(J)||C(30),I())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(J){mxEvent.consume(J)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(J){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(J)?I():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(J){mxEvent.isShiftDown(J)?I():C(100);
-mxEvent.consume(J)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(J){mxEvent.isTouchEvent(J)||C(30)}));var aa=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,ba){this.startX=ba.getGraphX();this.startY=ba.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(J,ba){},mouseUp:function(J,ba){mxEvent.isTouchEvent(ba.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<
-aa&&Math.abs(this.scrollTop-a.container.scrollTop)<aa&&Math.abs(this.startX-ba.getGraphX())<aa&&Math.abs(this.startY-ba.getGraphY())<aa&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?I():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var U=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var J=this.graph.getPagePadding(),ba=this.graph.getPageSize();this.translate.x=J.x-(this.x0||
-0)*ba.width;this.translate.y=J.y-(this.y0||0)*ba.height}U.apply(this,arguments)};if(!a.isViewer()){var P=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var J=this.getPageLayout(),ba=this.getPagePadding(),ia=this.getPageSize(),na=Math.ceil(2*ba.x+J.width*ia.width),W=Math.ceil(2*ba.y+J.height*ia.height),da=a.minimumGraphSize;if(null==da||da.width!=na||da.height!=W)a.minimumGraphSize=new mxRectangle(0,0,na,W);na=ba.x-J.x*ia.width;ba=ba.y-J.y*
-ia.height;this.autoTranslate||this.view.translate.x==na&&this.view.translate.y==ba?P.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=J.x,this.view.y0=J.y,J=a.view.translate.x,ia=a.view.translate.y,a.view.setTranslate(na,ba),a.container.scrollLeft+=Math.round((na-J)*a.view.scale),a.container.scrollTop+=Math.round((ba-ia)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var X=a.view.getBackgroundPane(),ja=a.view.getDrawPane();
-a.cumulativeZoomFactor=1;var fa=null,ra=null,K=null,V=null,O=null,T=function(J){null!=fa&&window.clearTimeout(fa);0<=J&&window.setTimeout(function(){if(!a.isMouseDown||V)fa=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)),ja.style.transformOrigin=
-"",X.style.transformOrigin="",mxClient.IS_SF?(ja.style.transform="scale(1)",X.style.transform="scale(1)",window.setTimeout(function(){ja.style.transform="";X.style.transform=""},0)):(ja.style.transform="",X.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var ba=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ia=mxUtils.getOffset(a.container),na=a.view.scale,W=0,da=0;null!=ra&&(W=a.container.offsetWidth/2-ra.x+ia.x,da=a.container.offsetHeight/
-2-ra.y+ia.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=na&&(null!=K&&(W+=ba.x-K.x,da+=ba.y-K.y),null!=b&&f.chromelessResize(!1,null,W*(a.cumulativeZoomFactor-1),da*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==W&&0==da||(a.container.scrollLeft-=W*(a.cumulativeZoomFactor-1),a.container.scrollTop-=da*(a.cumulativeZoomFactor-1)));null!=O&&ja.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=V=ra=K=fa=null}),null!=J?J:a.isFastZoomEnabled()?
-f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(J,ba,ia,na){na=null!=na?na:this.zoomFactor;(ba=ba||!a.scrollbars)&&(ra=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));J?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var e=mxUtils.bind(this,function(){var J=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=J?parseInt(J["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",e);e();var h=0;e=mxUtils.bind(this,function(J,aa,ia){h++;
+var na=document.createElement("span");na.style.paddingLeft="8px";na.style.paddingRight="8px";na.style.cursor="pointer";mxEvent.addListener(na,"click",J);null!=ia&&na.setAttribute("title",ia);J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("src",aa);J.style.width="36px";J.style.filter="invert(100%)";na.appendChild(J);this.chromelessToolbar.appendChild(na);return na});if(null!=g.backBtn){var n=Graph.sanitizeLink(g.backBtn.url);null!=n&&e(mxUtils.bind(this,function(J){window.location.href=
+n;mxEvent.consume(J)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var u=e(mxUtils.bind(this,function(J){this.actions.get("previousPage").funct();mxEvent.consume(J)}),Editor.previousImage,mxResources.get("previousPage")),m=document.createElement("div");m.style.fontFamily=Editor.defaultHtmlFont;m.style.display="inline-block";m.style.verticalAlign="top";m.style.fontWeight="bold";m.style.marginTop="8px";m.style.fontSize="14px";m.style.color=mxClient.IS_IE||mxClient.IS_IE11?
+"#000000":"#ffffff";this.chromelessToolbar.appendChild(m);var r=e(mxUtils.bind(this,function(J){this.actions.get("nextPage").funct();mxEvent.consume(J)}),Editor.nextImage,mxResources.get("nextPage")),x=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(m.innerText="",mxUtils.write(m,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";r.style.paddingLeft="4px";r.style.paddingRight=
+"0px";var B=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(r.style.display="",u.style.display="",m.style.display="inline-block"):(r.style.display="none",u.style.display="none",m.style.display="none");x()});this.editor.addListener("resetGraphView",B);this.editor.addListener("pageSelected",x)}e(mxUtils.bind(this,function(J){this.actions.get("zoomOut").funct();mxEvent.consume(J)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");e(mxUtils.bind(this,
+function(J){this.actions.get("zoomIn").funct();mxEvent.consume(J)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(J){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(J)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,F=null,H=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);D=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),J||200)}),C=mxUtils.bind(this,function(J){null!=D&&(window.clearTimeout(D),D=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,J||30)});if("1"==urlParams.layers){this.layersDialog=null;var N=e(mxUtils.bind(this,function(J){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 aa=N.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=aa.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));aa=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=aa.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(J)}),Editor.layersImage,mxResources.get("layers")),Q=a.getModel();Q.addListener(mxEvent.CHANGE,function(){N.style.display=1<Q.getChildCount(Q.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(e);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||e(mxUtils.bind(this,function(J){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(J)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(B=0;B<this.lightboxToolbarActions.length;B++){var T=this.lightboxToolbarActions[B];T.elem=e(T.fn,T.icon,T.tooltip)}if(null!=g.refreshBtn){var R=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);
+e(mxUtils.bind(this,function(J){null!=R?window.location.href=R:window.location.reload();mxEvent.consume(J)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&e(mxUtils.bind(this,function(J){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(J)}),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(J){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(J))}),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(J){mxEvent.isTouchEvent(J)||(mxEvent.isShiftDown(J)||C(30),H())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(J){mxEvent.consume(J)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(J){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(J)?H():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(J){mxEvent.isShiftDown(J)?H():C(100);
+mxEvent.consume(J)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(J){mxEvent.isTouchEvent(J)||C(30)}));var ba=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,aa){this.startX=aa.getGraphX();this.startY=aa.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(J,aa){},mouseUp:function(J,aa){mxEvent.isTouchEvent(aa.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<
+ba&&Math.abs(this.scrollTop-a.container.scrollTop)<ba&&Math.abs(this.startX-aa.getGraphX())<ba&&Math.abs(this.startY-aa.getGraphY())<ba&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?H():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var S=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var J=this.graph.getPagePadding(),aa=this.graph.getPageSize();this.translate.x=J.x-(this.x0||
+0)*aa.width;this.translate.y=J.y-(this.y0||0)*aa.height}S.apply(this,arguments)};if(!a.isViewer()){var P=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var J=this.getPageLayout(),aa=this.getPagePadding(),ia=this.getPageSize(),na=Math.ceil(2*aa.x+J.width*ia.width),W=Math.ceil(2*aa.y+J.height*ia.height),da=a.minimumGraphSize;if(null==da||da.width!=na||da.height!=W)a.minimumGraphSize=new mxRectangle(0,0,na,W);na=aa.x-J.x*ia.width;aa=aa.y-J.y*
+ia.height;this.autoTranslate||this.view.translate.x==na&&this.view.translate.y==aa?P.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=J.x,this.view.y0=J.y,J=a.view.translate.x,ia=a.view.translate.y,a.view.setTranslate(na,aa),a.container.scrollLeft+=Math.round((na-J)*a.view.scale),a.container.scrollTop+=Math.round((aa-ia)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var X=a.view.getBackgroundPane(),ja=a.view.getDrawPane();
+a.cumulativeZoomFactor=1;var fa=null,ra=null,K=null,V=null,O=null,U=function(J){null!=fa&&window.clearTimeout(fa);0<=J&&window.setTimeout(function(){if(!a.isMouseDown||V)fa=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)),ja.style.transformOrigin=
+"",X.style.transformOrigin="",mxClient.IS_SF?(ja.style.transform="scale(1)",X.style.transform="scale(1)",window.setTimeout(function(){ja.style.transform="";X.style.transform=""},0)):(ja.style.transform="",X.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var aa=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ia=mxUtils.getOffset(a.container),na=a.view.scale,W=0,da=0;null!=ra&&(W=a.container.offsetWidth/2-ra.x+ia.x,da=a.container.offsetHeight/
+2-ra.y+ia.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=na&&(null!=K&&(W+=aa.x-K.x,da+=aa.y-K.y),null!=b&&f.chromelessResize(!1,null,W*(a.cumulativeZoomFactor-1),da*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==W&&0==da||(a.container.scrollLeft-=W*(a.cumulativeZoomFactor-1),a.container.scrollTop-=da*(a.cumulativeZoomFactor-1)));null!=O&&ja.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=V=ra=K=fa=null}),null!=J?J:a.isFastZoomEnabled()?
+f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(J,aa,ia,na){na=null!=na?na:this.zoomFactor;(aa=aa||!a.scrollbars)&&(ra=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));J?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=na,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/=na,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&&""!=ja.getAttribute("filter")&&(O=ja.getAttribute("filter"),ja.removeAttribute("filter")),K=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
-J=ba||null==ra?a.container.scrollLeft+a.container.clientWidth/2:ra.x+a.container.scrollLeft-a.container.offsetLeft,na=ba||null==ra?a.container.scrollTop+a.container.clientHeight/2:ra.y+a.container.scrollTop-a.container.offsetTop,ja.style.transformOrigin=J+"px "+na+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",X.style.transformOrigin=J+"px "+na+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(J=
-a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(J.style,"transform-origin",(ba||null==ra?a.container.clientWidth/2+a.container.scrollLeft-J.offsetLeft+"px":ra.x+a.container.scrollLeft-J.offsetLeft-a.container.offsetLeft+"px")+" "+(ba||null==ra?a.container.clientHeight/2+a.container.scrollTop-J.offsetTop+"px":ra.y+a.container.scrollTop-J.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(J.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity=
-"0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&f.hoverIcons.reset());T(a.isFastZoomEnabled()?ia:0)};mxEvent.addGestureListeners(a.container,function(J){null!=fa&&window.clearTimeout(fa)},null,function(J){1!=a.cumulativeZoomFactor&&T(0)});mxEvent.addListener(a.container,"scroll",function(J){null==fa||a.isMouseDown||1==a.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(J,ba,ia,na,W){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||
-0==this.dialogs.length)if(!a.scrollbars&&!ia&&a.isScrollWheelEvent(J))ia=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(J)?a.view.setTranslate(ia.x+(ba?-na:na),ia.y):a.view.setTranslate(ia.x,ia.y+(ba?na:-na));else if(ia||a.isZoomWheelEvent(J))for(var da=mxEvent.getSource(J);null!=da;){if(da==a.container)return a.tooltipHandler.hideTooltip(),ra=null!=na&&null!=W?new mxPoint(na,W):new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),V=ia,ia=a.zoomFactor,na=null,J.ctrlKey&&null!=J.deltaY&&
-40>Math.abs(J.deltaY)&&Math.round(J.deltaY)!=J.deltaY?ia=1+Math.abs(J.deltaY)/20*(ia-1):null!=J.movementY&&"pointermove"==J.type&&(ia=1+Math.max(1,Math.abs(J.movementY))/20*(ia-1),na=-1),a.lazyZoom(ba,null,na,ia),mxEvent.consume(J),!1;da=da.parentNode}}),a.container);a.panningHandler.zoomGraph=function(J){a.cumulativeZoomFactor=J.scale;a.lazyZoom(0<J.scale,!0);mxEvent.consume(J)}};
+J=aa||null==ra?a.container.scrollLeft+a.container.clientWidth/2:ra.x+a.container.scrollLeft-a.container.offsetLeft,na=aa||null==ra?a.container.scrollTop+a.container.clientHeight/2:ra.y+a.container.scrollTop-a.container.offsetTop,ja.style.transformOrigin=J+"px "+na+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",X.style.transformOrigin=J+"px "+na+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(J=
+a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(J.style,"transform-origin",(aa||null==ra?a.container.clientWidth/2+a.container.scrollLeft-J.offsetLeft+"px":ra.x+a.container.scrollLeft-J.offsetLeft-a.container.offsetLeft+"px")+" "+(aa||null==ra?a.container.clientHeight/2+a.container.scrollTop-J.offsetTop+"px":ra.y+a.container.scrollTop-J.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(J.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity=
+"0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&f.hoverIcons.reset());U(a.isFastZoomEnabled()?ia:0)};mxEvent.addGestureListeners(a.container,function(J){null!=fa&&window.clearTimeout(fa)},null,function(J){1!=a.cumulativeZoomFactor&&U(0)});mxEvent.addListener(a.container,"scroll",function(J){null==fa||a.isMouseDown||1==a.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(J,aa,ia,na,W){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||
+0==this.dialogs.length)if(!a.scrollbars&&!ia&&a.isScrollWheelEvent(J))ia=a.view.getTranslate(),na=40/a.view.scale,mxEvent.isShiftDown(J)?a.view.setTranslate(ia.x+(aa?-na:na),ia.y):a.view.setTranslate(ia.x,ia.y+(aa?na:-na));else if(ia||a.isZoomWheelEvent(J))for(var da=mxEvent.getSource(J);null!=da;){if(da==a.container)return a.tooltipHandler.hideTooltip(),ra=null!=na&&null!=W?new mxPoint(na,W):new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),V=ia,ia=a.zoomFactor,na=null,J.ctrlKey&&null!=J.deltaY&&
+40>Math.abs(J.deltaY)&&Math.round(J.deltaY)!=J.deltaY?ia=1+Math.abs(J.deltaY)/20*(ia-1):null!=J.movementY&&"pointermove"==J.type&&(ia=1+Math.max(1,Math.abs(J.movementY))/20*(ia-1),na=-1),a.lazyZoom(aa,null,na,ia),mxEvent.consume(J),!1;da=da.parentNode}}),a.container);a.panningHandler.zoomGraph=function(J){a.cumulativeZoomFactor=J.scale;a.lazyZoom(0<J.scale,!0);mxEvent.consume(J)}};
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.isFormatPanelVisible=function(){return 0<this.formatWidth};
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(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.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.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a;this.hideShapePicker()};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 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*
+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"))};
-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}
+EditorUi.prototype.installResizeHandler=function(a,b,f){b&&(a.window.setSize=function(g,e){if(!this.minimized){var h=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;g=Math.min(g,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());e=Math.min(e,h-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});a.window.setLocation=function(g,e){var h=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,h-u));e=Math.max(0,Math.min(e,n-m));this.getX()==g&&this.getY()==e||mxWindow.prototype.setLocation.apply(this,arguments);b&&!this.minimized&&this.setSize(u,m)};var d=mxUtils.bind(this,function(){var g=a.window.getX(),e=a.window.getY();a.window.setLocation(g,e)});mxEvent.addListener(window,"resize",d);a.destroy=function(){mxEvent.removeListener(window,
+"resize",d);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,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}
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,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)})();
+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)})();
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,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);
+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(h,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);
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(0<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);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&&
+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&&
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 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.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 h=this.footerHeight+d;e=Math.max(0,Math.min(f-b-h,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
+e+"px";this.sidebarFooterContainer.style.bottom=h+"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";h=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=f+"px",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+h.x+"px",this.diagramContainer.style.top=b+h.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.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()};
@@ -2260,22 +2260,26 @@ EditorUi.prototype.createSidebarContainer=function(){var a=document.createElemen
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var a=this.editor.chromeless?null:this.createFooter();null!=a&&(this.footerContainer.appendChild(a),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
-!0,0,mxUtils.bind(this,function(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))};
+!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";mxEvent.addListener(a,"click",mxUtils.bind(this,function(b){var f=mxEvent.getSource(b),d=f.getAttribute("data-action");if("statusFunction"==d&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=d)f=this.actions.get(d),null!=f&&f.funct();else{d=f.getAttribute("data-title");var g=f.getAttribute("data-message");null!=d&&null!=g?this.showError(d,g):(f=f.getAttribute("data-link"),
+null!=f&&this.editor.graph.openLink(f))}mxEvent.consume(b)}));return a};
+EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a;0==this.statusContainer.getElementsByTagName("div").length&&null!=a&&0<a.length&&(this.statusContainer.innerText="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a));a=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=a)for(var b=0;b<a.length;b++)(function(f){mxUtils.setOpacity(f,0);mxUtils.setPrefixedStyle(f.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(f.style,"transition","all 0.2s ease");
+window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(f,100);mxUtils.setPrefixedStyle(f.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","scaleX(0)");mxUtils.setOpacity(f,0);window.setTimeout(mxUtils.bind(this,function(){null!=f.parentNode&&f.parentNode.removeChild(f)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(a[b])};
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,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.addSplitHandler=function(a,b,f,d){function g(x){if(null!=h){var B=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));d(Math.max(0,n+(b?B.x-h.x:h.y-B.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function e(x){g(x);h=n=null}var h=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){h=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,h,n,u,m,r,x,B){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),d,g,e,h,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,h,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,h,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,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()};
+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(h){this.handleError(h)}};
+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()};
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 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)});
+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),h="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var n=h.lastIndexOf("%3E");
+0<=n&&n<h.length-3&&(h=h.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(h);this.isCompatibleString(m)&&(h=m)}catch(r){}}catch(r){}a(this.isCompatibleString(h)?h: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)});
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"),
@@ -2284,24 +2288,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),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;e.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&e.isEnabled()?(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.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;d.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&d.isEnabled()?(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 h=new Image;h.onload=function(){f(e,h.width,h.height)};h.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};h.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.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(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.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.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,D){if(!e.isSelectionEmpty()&&e.isEnabled()){B=null!=B?B:1;var F=e.getCompositeParents(e.getSelectionCells()),I=0<F.length?F[0]:null;if(null!=I)if(D){e.getModel().beginUpdate();try{for(I=0;I<F.length;I++)if(e.getModel().isVertex(F[I])&&e.isCellResizable(F[I])){var C=e.getCellGeometry(F[I]);null!=C&&(C=C.clone(),37==x?C.width=Math.max(0,C.width-B):38==x?C.height=Math.max(0,C.height-B):39==x?C.width+=B:40==x&&(C.height+=B),e.getModel().setGeometry(F[I],
-C))}}finally{e.getModel().endUpdate()}}else{C=e.model.getParent(I);var N=e.getView().scale;D=null;1==e.getSelectionCount()&&e.model.isVertex(I)&&null!=e.layoutManager&&!e.isCellLocked(I)&&(D=e.layoutManager.getLayout(C));if(null!=D&&D.constructor==mxStackLayout)B=C.getIndex(I),37==x||38==x?e.model.add(C,I,Math.max(0,B-1)):(39==x||40==x)&&e.model.add(C,I,Math.min(e.model.getChildCount(C),B+1));else{var R=e.graphHandler;null!=R&&(null==R.first&&R.start(I,0,0,F),null!=R.first&&(I=F=0,37==x?F=-B:38==
-x?I=-B:39==x?F=B:40==x&&(I=B),R.currentDx+=F*N,R.currentDy+=I*N,R.checkPreview(),R.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=R.first){var S=R.roundLength(R.currentDx/N),Q=R.roundLength(R.currentDy/N);R.moveCells(R.cells,S,Q);R.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 D=e.connectVertex(e.getSelectionCell(),n[x.keyCode],
-e.defaultEdgeLength,x,!0);null!=D&&0<D.length&&(1==D.length&&e.model.isEdge(D[0])?e.setSelectionCell(e.model.getTerminal(D[0],!1)):e.setSelectionCell(D[D.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,D,F){var I=this.actions.get(D);null!=I&&(D=function(){I.isEnabled()&&I.funct.apply(this,arguments)},B?F?g.bindControlShiftKey(x,D):g.bindControlKey(x,D):F?g.bindShiftKey(x,D):g.bindKey(x,D))});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",
+EditorUi.prototype.createKeyHandler=function(a){function b(x,B,D){if(!d.isSelectionEmpty()&&d.isEnabled()){B=null!=B?B:1;var F=d.getCompositeParents(d.getSelectionCells()),H=0<F.length?F[0]:null;if(null!=H)if(D){d.getModel().beginUpdate();try{for(H=0;H<F.length;H++)if(d.getModel().isVertex(F[H])&&d.isCellResizable(F[H])){var C=d.getCellGeometry(F[H]);null!=C&&(C=C.clone(),37==x?C.width=Math.max(0,C.width-B):38==x?C.height=Math.max(0,C.height-B):39==x?C.width+=B:40==x&&(C.height+=B),d.getModel().setGeometry(F[H],
+C))}}finally{d.getModel().endUpdate()}}else{C=d.model.getParent(H);var N=d.getView().scale;D=null;1==d.getSelectionCount()&&d.model.isVertex(H)&&null!=d.layoutManager&&!d.isCellLocked(H)&&(D=d.layoutManager.getLayout(C));if(null!=D&&D.constructor==mxStackLayout)B=C.getIndex(H),37==x||38==x?d.model.add(C,H,Math.max(0,B-1)):(39==x||40==x)&&d.model.add(C,H,Math.min(d.model.getChildCount(C),B+1));else{var Q=d.graphHandler;null!=Q&&(null==Q.first&&Q.start(H,0,0,F),null!=Q.first&&(H=F=0,37==x?F=-B:38==
+x?H=-B:39==x?F=B:40==x&&(H=B),Q.currentDx+=F*N,Q.currentDy+=H*N,Q.checkPreview(),Q.updatePreview()),null!=h&&window.clearTimeout(h),h=window.setTimeout(function(){if(null!=Q.first){var T=Q.roundLength(Q.currentDx/N),R=Q.roundLength(Q.currentDy/N);Q.moveCells(Q.cells,T,R);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 h=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 D=d.connectVertex(d.getSelectionCell(),n[x.keyCode],
+d.defaultEdgeLength,x,!0);null!=D&&0<D.length&&(1==D.length&&d.model.isEdge(D[0])?d.setSelectionCell(d.model.getTerminal(D[0],!1)):d.setSelectionCell(D[D.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,D,F){var H=this.actions.get(D);null!=H&&(D=function(){H.isEnabled()&&H.funct.apply(this,arguments)},B?F?g.bindControlShiftKey(x,D):g.bindControlKey(x,D):F?g.bindShiftKey(x,D):g.bindKey(x,D))});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,!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,"format",!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(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
+!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};
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),
@@ -2321,34 +2325,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,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()),
+Sidebar.prototype.createTooltip=function(a,b,f,d,g,e,h,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||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"),
+"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"),
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,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,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};
+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);h=null!=h?h:this.getTooltipOffset(a,r);a=h.x;h=h.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=h+"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 h=mxUtils.bind(this,function(){this.createTooltip(a,b,f,d,g,e)});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=window.setTimeout(h,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.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,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(){I()});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={},D=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var C=f.firstChild;null!=C;){var N=C.nextSibling;C!=e&&C!=k&&C.parentNode.removeChild(C);C=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 I=mxUtils.bind(this,
-function(){D=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 C={};this.currentSearch=C;this.searchEntries(u,D,x,mxUtils.bind(this,function(N,R,S,Q){if(this.currentSearch==C){N=null!=N?N:[];m=!1;x++;this.insertSearchHint(f,u,D,x,N,R,S,Q);
-0==N.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(R=0;R<N.length;R++)mxUtils.bind(this,function(aa){try{var U=aa();null==B[U.innerHTML]?(B[U.innerHTML]=null!=aa.parentLibraries?aa.parentLibraries.slice():[],f.appendChild(U)):null!=aa.parentLibraries&&(B[U.innerHTML]=B[U.innerHTML].concat(aa.parentLibraries));mxEvent.addGestureListeners(U,null,null,mxUtils.bind(this,function(P){var X=B[U.innerHTML];mxEvent.isPopupTrigger(P)&&this.showPopupMenuForEntry(U,X,P)}));mxEvent.disableContextMenu(U)}catch(P){}})(N[R]);
-S?(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(C){g.value=C;I()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(C){13==C.keyCode&&(I(),mxEvent.consume(C))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(C){""==
-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(C){C.stopPropagation&&C.stopPropagation();C.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(C){C.stopPropagation&&
+Sidebar.prototype.searchEntries=function(a,b,f,d,g){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");g=new mxDictionary;var h=(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==h)){d(a.slice(f*b,h),h,!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 h=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){H()});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";h.style.paddingTop="4px";h.style.paddingBottom=
+"4px";h.appendChild(n);f.appendChild(h);var u="",m=!1,r=!1,x=0,B={},D=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var C=f.firstChild;null!=C;){var N=C.nextSibling;C!=d&&C!=h&&C.parentNode.removeChild(C);C=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="",F());g.focus()});var H=mxUtils.bind(this,
+function(){D=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=h.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 C={};this.currentSearch=C;this.searchEntries(u,D,x,mxUtils.bind(this,function(N,Q,T,R){if(this.currentSearch==C){N=null!=N?N:[];m=!1;x++;this.insertSearchHint(f,u,D,x,N,Q,T,R);
+0==N.length&&1==x&&(u="");null!=h.parentNode&&h.parentNode.removeChild(h);for(Q=0;Q<N.length;Q++)mxUtils.bind(this,function(ba){try{var S=ba();null==B[S.innerHTML]?(B[S.innerHTML]=null!=ba.parentLibraries?ba.parentLibraries.slice():[],f.appendChild(S)):null!=ba.parentLibraries&&(B[S.innerHTML]=B[S.innerHTML].concat(ba.parentLibraries));mxEvent.addGestureListeners(S,null,null,mxUtils.bind(this,function(P){var X=B[S.innerHTML];mxEvent.isPopupTrigger(P)&&this.showPopupMenuForEntry(S,X,P)}));mxEvent.disableContextMenu(S)}catch(P){}})(N[Q]);
+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(h)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else F(),u=g.value="",B={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(C){g.value=C;H()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(C){13==C.keyCode&&(H(),mxEvent.consume(C))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(C){""==
+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(C){C.stopPropagation&&C.stopPropagation();C.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(C){C.stopPropagation&&
C.stopPropagation();C.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,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;",
+Sidebar.prototype.insertSearchHint=function(a,b,f,d,g,e,h,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;",
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;",
@@ -2357,16 +2361,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(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.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.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 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()};
+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()};
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="),
@@ -2376,10 +2380,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 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;",
+"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;",
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;",
@@ -2387,7 +2391,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 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,
+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,
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()};
@@ -2414,147 +2418,147 @@ 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 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;strokeColor=inherit;");
-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"),
+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;strokeColor=inherit;");
+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 h=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");h.vertex=!0;h.geometry.relative=!0;h.geometry.offset=new mxPoint(-27,7);e.insert(h);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 h=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");h.vertex=!0;h.geometry.relative=!0;h.geometry.offset=new mxPoint(-24,4);e.insert(h);
+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"),
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 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;",
+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;",
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 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;",
+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 h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+h.geometry.setTerminalPoint(new mxPoint(15,90),!1);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,!0);return b.createVertexTemplateFromCells([e,h],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 h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+h.geometry.setTerminalPoint(new mxPoint(60,100),!1);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,!0);return b.createVertexTemplateFromCells([e,h],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 h=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;");h.vertex=!0;e.insert(h);h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");h.geometry.setTerminalPoint(new mxPoint(80,120),!1);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,
+!0);return b.createVertexTemplateFromCells([e,h],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 h=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");h.geometry.setTerminalPoint(new mxPoint(180,20),!1);h.geometry.relative=
+!0;h.geometry.x=-1;h.edge=!0;e.insertEdge(h,!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,h,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 h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");h.geometry.setTerminalPoint(new mxPoint(100,80),!1);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,!0);return b.createVertexTemplateFromCells([e,h],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 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==",
+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 h=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");h.geometry.setTerminalPoint(new mxPoint(-60,0),!0);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,!1);return b.createVertexTemplateFromCells([e,h],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 h=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");h.geometry.setTerminalPoint(new mxPoint(-70,0),!0);h.geometry.relative=!0;h.edge=!0;e.insertEdge(h,!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,
+h,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 h=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;");h.geometry.setTerminalPoint(new mxPoint(0,0),!0);h.geometry.points=[new mxPoint(30,0)];h.geometry.relative=
+!0;h.edge=!0;e.insertEdge(h,!1);return b.createVertexTemplateFromCells([e,h],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 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,
+"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 h=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;e.insert(h);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 h=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;e.insert(h);h=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;e.insert(h);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 h=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;e.insert(h);h=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;e.insert(h);return b.createEdgeTemplateFromCells([e],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,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.createThumb=function(a,b,f,d,g,e,h){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!=h&&(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.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,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));
+Sidebar.prototype.createItem=function(a,b,f,d,g,e,h,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,h,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,h,r),this.createDragPreview(g,e),a,r),this.addClickHandler(u,d,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,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,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,D=(n+B.x)*x,F=(u+B.y)*x,I=g.cloneCells(a);g.splitEdge(k,I,null,n-e.width/2,u-e.height/2,D,F);r=I}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var C=g.layoutManager.getLayout(k);if(null!=C)for(x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,k=0;k<r.length;k++)C.moveCell(r[k],D,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.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),h="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],
+[u]));for(r=0;r<h.length;r++){var x=m[h[r]];null!=x&&f.setCellStyles(h[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,h,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==h||mxEvent.isAltDown(e)?!1:g.isValidDropTarget(h,a,e);var r=null;null==h||m||(h=null);if(!g.isCellLocked(h||
+g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(h,a,e)){var x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,H=g.cloneCells(a);g.splitEdge(h,H,null,n-d.width/2,u-d.height/2,D,F);r=H}else 0<a.length&&(r=g.importCells(a,n,u,h));if(null!=g.layoutManager){var C=g.layoutManager.getLayout(h);if(null!=C)for(x=g.view.scale,B=g.view.translate,D=(n+B.x)*x,F=(u+B.y)*x,h=0;h<r.length;h++)C.moveCell(r[h],D,F)}!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.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,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 D=n.layoutManager.getLayout(x);null!=D&&D.constructor==mxStackLayout&&(B=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=D=0;if(null!=k){var I=k.origin;D=I.x;F=I.y;var C=d.getTerminalPoint(!1);null!=
-C&&(C.x+=I.x,C.y+=I.y)}var N=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),R=n.getCellAt((d.x+D+n.view.translate.x)*n.view.scale,(d.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(aa,U,P){return!n.isContainer(aa.cell)});if(null!=R&&R!=x)k=n.view.getState(R),null!=k&&(I=k.origin,x=R,N=!0,n.model.isEdge(a)||(d.x-=I.x-D,d.y-=I.y-F));else if(!B||n.isTableRow(a)||n.isTableCell(a))d.x+=D,d.y+=F;D=r.x;F=r.y;n.model.isEdge(b[e])&&(F=D=0);k=b=n.importCells(b,
-d.x-(N?D: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 S=n.getCellGeometry(b[e]);S.points=null;if(null!=S.getTerminalPoint(!1))S.setTerminalPoint(d.getTerminalPoint(!1),!1);else if(N&&n.model.isVertex(x)){var Q=n.view.getState(x);I=Q.cell!=n.view.currentRoot?Q.origin:new mxPoint(0,0);n.cellsMoved(b,I.x,I.y,null,null,!0)}}else r=n.getCellGeometry(b[e]),D=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,D,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(aa){this.editorUi.handleError(aa)}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.dropAndConnect=function(a,b,f,d,g){var e=this.getDropAndConnectGeometry(a,b[d],f,b),h=[];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 D=n.layoutManager.getLayout(x);null!=D&&D.constructor==mxStackLayout&&(B=!1)}h=n.model.isEdge(a)?null:n.view.getState(x);var F=D=0;if(null!=h){var H=h.origin;D=H.x;F=H.y;var C=e.getTerminalPoint(!1);null!=
+C&&(C.x+=H.x,C.y+=H.y)}var N=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),Q=n.getCellAt((e.x+D+n.view.translate.x)*n.view.scale,(e.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(ba,S,P){return!n.isContainer(ba.cell)});if(null!=Q&&Q!=x)h=n.view.getState(Q),null!=h&&(H=h.origin,x=Q,N=!0,n.model.isEdge(a)||(e.x-=H.x-D,e.y-=H.y-F));else if(!B||n.isTableRow(a)||n.isTableCell(a))e.x+=D,e.y+=F;D=r.x;F=r.y;n.model.isEdge(b[d])&&(F=D=0);h=b=n.importCells(b,
+e.x-(N?D:0),e.y-(N?F: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 T=n.getCellGeometry(b[d]);T.points=null;if(null!=T.getTerminalPoint(!1))T.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(N&&n.model.isVertex(x)){var R=n.view.getState(x);H=R.cell!=n.view.currentRoot?R.origin:new mxPoint(0,0);n.cellsMoved(b,H.x,H.y,null,null,!0)}}else r=n.getCellGeometry(b[d]),D=e.x-Math.round(r.x),F=
+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,D,F,null,null,!0),h=b.slice(),u=1==h.length?h[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(ba){this.editorUi.handleError(ba)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return h};
+Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,d){var g=this.editorUi.editor.graph,e=g.view,h=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))):(!h&&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.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,e,g){function d(da,sa){var ta=mxUtils.createImage(da.src);ta.style.width=da.width+"px";ta.style.height=da.height+"px";null!=sa&&ta.setAttribute("title",sa);mxUtils.setOpacity(ta,da==this.refreshTarget?30:20);ta.style.position="absolute";ta.style.cursor="crosshair";return ta}function k(da,sa,ta,Ja){null!=Ja.parentNode&&(mxUtils.contains(ta,da,sa)?(mxUtils.setOpacity(Ja,100),V=Ja):mxUtils.setOpacity(Ja,Ja==X?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 D=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(da,sa,ta,Ja,Ia){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=R&&V==X){var ua=da.isCellSelected(R.cell)?da.getSelectionCells():[R.cell];ua=this.updateShapes(da.model.isEdge(R.cell)?e[0]:e[r],
-ua);da.setSelectionCells(ua)}else null!=e&&null!=V&&null!=C&&V!=X?(ua=da.model.isEdge(C.cell)||null==m?r:m,da.setSelectionCells(this.dropAndConnect(C.cell,e,K,ua,sa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(da.view.getState(da.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(da,sa){F.isActive()&&F.reset()});var I=F.mouseDown;F.mouseDown=function(da){mxEvent.isPopupTrigger(da)||mxEvent.isMultiTouchEvent(da)||u.isCellLocked(u.getDefaultParent())||
-(u.stopEditing(),I.apply(this,arguments))};var C=null,N=null,R=null,S=!1,Q=d(this.triangleUp,mxResources.get("connect")),aa=d(this.triangleRight,mxResources.get("connect")),U=d(this.triangleDown,mxResources.get("connect")),P=d(this.triangleLeft,mxResources.get("connect")),X=d(this.refreshTarget,mxResources.get("replace")),ja=null,fa=d(this.roundDrop),ra=d(this.roundDrop),K=mxConstants.DIRECTION_NORTH,V=null,O=F.createPreviewElement;F.createPreviewElement=function(da){var sa=O.apply(this,arguments);
-mxClient.IS_SVG&&(sa.style.pointerEvents="none");this.previewElementWidth=sa.style.width;this.previewElementHeight=sa.style.height;return sa};var T=F.dragEnter;F.dragEnter=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");T.apply(this,arguments)};var J=F.dragExit;F.dragExit=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");J.apply(this,arguments)};F.dragOver=function(da,sa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide();
-if(null!=this.previewElement){var ta=da.view;if(null!=R&&V==X)this.previewElement.style.display=da.model.isEdge(R.cell)?"none":"",this.previewElement.style.left=R.x+"px",this.previewElement.style.top=R.y+"px",this.previewElement.style.width=R.width+"px",this.previewElement.style.height=R.height+"px";else if(null!=C&&null!=V){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=da.model.isEdge(C.cell)||null==m?r:m,Ia=x.getDropAndConnectGeometry(C.cell,e[Ja],K,
-e),ua=da.model.isEdge(C.cell)?null:da.getCellGeometry(C.cell),Ba=da.getCellGeometry(e[Ja]),qa=da.model.getParent(C.cell),Ea=ta.translate.x*ta.scale,Ua=ta.translate.y*ta.scale;null!=ua&&!ua.relative&&da.model.isVertex(qa)&&qa!=ta.currentRoot&&(Ua=ta.getState(qa),Ea=Ua.x,Ua=Ua.y);ua=Ba.x;Ba=Ba.y;da.model.isEdge(e[Ja])&&(Ba=ua=0);this.previewElement.style.left=(Ia.x-ua)*ta.scale+Ea+"px";this.previewElement.style.top=(Ia.y-Ba)*ta.scale+Ua+"px";1==e.length&&(this.previewElement.style.width=Ia.width*ta.scale+
+Sidebar.prototype.createDragSource=function(a,b,f,d,g){function e(da,sa){var ta=mxUtils.createImage(da.src);ta.style.width=da.width+"px";ta.style.height=da.height+"px";null!=sa&&ta.setAttribute("title",sa);mxUtils.setOpacity(ta,da==this.refreshTarget?30:20);ta.style.position="absolute";ta.style.cursor="crosshair";return ta}function h(da,sa,ta,Ja){null!=Ja.parentNode&&(mxUtils.contains(ta,da,sa)?(mxUtils.setOpacity(Ja,100),V=Ja):mxUtils.setOpacity(Ja,Ja==X?30:20));return ta}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 D=this.isDropStyleEnabled(d,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(da,sa,ta,Ja,Ia){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=Q&&V==X){var ua=da.isCellSelected(Q.cell)?da.getSelectionCells():[Q.cell];ua=this.updateShapes(da.model.isEdge(Q.cell)?d[0]:d[r],
+ua);da.setSelectionCells(ua)}else null!=d&&null!=V&&null!=C&&V!=X?(ua=da.model.isEdge(C.cell)||null==m?r:m,da.setSelectionCells(this.dropAndConnect(C.cell,d,K,ua,sa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(da.view.getState(da.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(da,sa){F.isActive()&&F.reset()});var H=F.mouseDown;F.mouseDown=function(da){mxEvent.isPopupTrigger(da)||mxEvent.isMultiTouchEvent(da)||u.isCellLocked(u.getDefaultParent())||
+(u.stopEditing(),H.apply(this,arguments))};var C=null,N=null,Q=null,T=!1,R=e(this.triangleUp,mxResources.get("connect")),ba=e(this.triangleRight,mxResources.get("connect")),S=e(this.triangleDown,mxResources.get("connect")),P=e(this.triangleLeft,mxResources.get("connect")),X=e(this.refreshTarget,mxResources.get("replace")),ja=null,fa=e(this.roundDrop),ra=e(this.roundDrop),K=mxConstants.DIRECTION_NORTH,V=null,O=F.createPreviewElement;F.createPreviewElement=function(da){var sa=O.apply(this,arguments);
+mxClient.IS_SVG&&(sa.style.pointerEvents="none");this.previewElementWidth=sa.style.width;this.previewElementHeight=sa.style.height;return sa};var U=F.dragEnter;F.dragEnter=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");U.apply(this,arguments)};var J=F.dragExit;F.dragExit=function(da,sa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");J.apply(this,arguments)};F.dragOver=function(da,sa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=V&&this.currentGuide.hide();
+if(null!=this.previewElement){var ta=da.view;if(null!=Q&&V==X)this.previewElement.style.display=da.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!=C&&null!=V){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ja=da.model.isEdge(C.cell)||null==m?r:m,Ia=x.getDropAndConnectGeometry(C.cell,d[Ja],K,
+d),ua=da.model.isEdge(C.cell)?null:da.getCellGeometry(C.cell),Ba=da.getCellGeometry(d[Ja]),qa=da.model.getParent(C.cell),Ea=ta.translate.x*ta.scale,Ua=ta.translate.y*ta.scale;null!=ua&&!ua.relative&&da.model.isVertex(qa)&&qa!=ta.currentRoot&&(Ua=ta.getState(qa),Ea=Ua.x,Ua=Ua.y);ua=Ba.x;Ba=Ba.y;da.model.isEdge(d[Ja])&&(Ba=ua=0);this.previewElement.style.left=(Ia.x-ua)*ta.scale+Ea+"px";this.previewElement.style.top=(Ia.y-Ba)*ta.scale+Ua+"px";1==d.length&&(this.previewElement.style.width=Ia.width*ta.scale+
"px",this.previewElement.style.height=Ia.height*ta.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&da.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(),ia=0,na=null,W=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(da,sa,ta,Ja){var Ia=mxEvent.isAltDown(Ja)||null==e?null:da.getCellAt(sa,ta,null,null,null,function(Ua,db,Ta){return da.isContainer(Ua.cell)});if(null!=Ia&&!this.graph.isCellConnectable(Ia)&&!this.graph.model.isEdge(Ia)){var ua=this.graph.getModel().getParent(Ia);this.graph.getModel().isVertex(ua)&&this.graph.isCellConnectable(ua)&&
-(Ia=ua)}da.isCellLocked(Ia)&&(Ia=null);var Ba=da.view.getState(Ia);ua=V=null;na!=Ba?(ba=(new Date).getTime(),ia=0,na=Ba,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Ba&&(this.updateThread=window.setTimeout(function(){null==V&&(na=Ba,F.getDropTarget(da,sa,ta,Ja))},this.dropTargetDelay+10))):ia=(new Date).getTime()-ba;if(D&&2500>ia&&null!=Ba&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(Ba.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ba.style,
-mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ba.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ba.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<ia||da.model.isEdge(Ba.cell))&&ia>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ba)&&(da.model.isVertex(Ba.cell)&&null!=r||da.model.isEdge(Ba.cell)&&da.model.isEdge(e[0]))){if(da.isCellEditable(Ba.cell)){R=
-Ba;var qa=da.model.isEdge(Ba.cell)?da.view.getPoint(Ba):new mxPoint(Ba.getCenterX(),Ba.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);X.style.left=Math.floor(qa.x)+"px";X.style.top=Math.floor(qa.y)+"px";null==ja&&(da.container.appendChild(X),ja=X.parentNode);k(sa,ta,qa,X)}}else null==R||!mxUtils.contains(R,sa,ta)||1500<ia&&!mxEvent.isShiftDown(Ja)?(R=null,null!=ja&&(X.parentNode.removeChild(X),ja=
-null)):null!=R&&null!=ja&&(qa=da.model.isEdge(R.cell)?da.view.getPoint(R):new mxPoint(R.getCenterX(),R.getCenterY()),qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(sa,ta,qa,X));if(S&&null!=C&&!mxEvent.isAltDown(Ja)&&null==V){ua=mxRectangle.fromRectangle(C);if(da.model.isEdge(C.cell)){var Ea=C.absolutePoints;null!=fa.parentNode&&(qa=Ea[0],ua.add(k(sa,ta,new mxRectangle(qa.x-this.roundDrop.width/2,qa.y-this.roundDrop.height/
-2,this.roundDrop.width,this.roundDrop.height),fa)));null!=ra.parentNode&&(Ea=Ea[Ea.length-1],ua.add(k(sa,ta,new mxRectangle(Ea.x-this.roundDrop.width/2,Ea.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ra)))}else qa=mxRectangle.fromRectangle(C),null!=C.shape&&null!=C.shape.boundingBox&&(qa=mxRectangle.fromRectangle(C.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Ea=this.graph.selectionCellsHandler.getHandler(C.cell),null!=Ea&&(qa.x-=
-Ea.horizontalOffset/2,qa.y-=Ea.verticalOffset/2,qa.width+=Ea.horizontalOffset,qa.height+=Ea.verticalOffset,null!=Ea.rotationShape&&null!=Ea.rotationShape.node&&"hidden"!=Ea.rotationShape.node.style.visibility&&"none"!=Ea.rotationShape.node.style.display&&null!=Ea.rotationShape.boundingBox&&qa.add(Ea.rotationShape.boundingBox)),ua.add(k(sa,ta,new mxRectangle(C.getCenterX()-this.triangleUp.width/2,qa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Q)),ua.add(k(sa,ta,new mxRectangle(qa.x+
-qa.width,C.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),aa)),ua.add(k(sa,ta,new mxRectangle(C.getCenterX()-this.triangleDown.width/2,qa.y+qa.height,this.triangleDown.width,this.triangleDown.height),U)),ua.add(k(sa,ta,new mxRectangle(qa.x-this.triangleLeft.width,C.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),P));null!=ua&&ua.grow(10)}K=mxConstants.DIRECTION_NORTH;V==aa?K=mxConstants.DIRECTION_EAST:V==U||V==
-ra?K=mxConstants.DIRECTION_SOUTH:V==P&&(K=mxConstants.DIRECTION_WEST);null!=R&&V==X&&(Ba=R);qa=(null==r||da.isCellConnectable(e[r]))&&(da.model.isEdge(Ia)&&null!=r||da.model.isVertex(Ia)&&da.isCellConnectable(Ia));if(null!=C&&5E3<=ia||C!=Ba&&(null==ua||!mxUtils.contains(ua,sa,ta)||500<ia&&null==V&&qa))if(S=!1,C=5E3>ia&&ia>this.dropTargetDelay||da.model.isEdge(Ia)?Ba:null,null!=C&&qa){ua=[fa,ra,Q,aa,U,P];for(qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);da.model.isEdge(Ia)?
+this.previewElement.style.display="")}};var aa=(new Date).getTime(),ia=0,na=null,W=this.editorUi.editor.graph.getCellStyle(d[0]);F.getDropTarget=mxUtils.bind(this,function(da,sa,ta,Ja){var Ia=mxEvent.isAltDown(Ja)||null==d?null:da.getCellAt(sa,ta,null,null,null,function(Ua,db,Ta){return da.isContainer(Ua.cell)});if(null!=Ia&&!this.graph.isCellConnectable(Ia)&&!this.graph.model.isEdge(Ia)){var ua=this.graph.getModel().getParent(Ia);this.graph.getModel().isVertex(ua)&&this.graph.isCellConnectable(ua)&&
+(Ia=ua)}da.isCellLocked(Ia)&&(Ia=null);var Ba=da.view.getState(Ia);ua=V=null;na!=Ba?(aa=(new Date).getTime(),ia=0,na=Ba,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Ba&&(this.updateThread=window.setTimeout(function(){null==V&&(na=Ba,F.getDropTarget(da,sa,ta,Ja))},this.dropTargetDelay+10))):ia=(new Date).getTime()-aa;if(D&&2500>ia&&null!=Ba&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(Ba.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ba.style,
+mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ba.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ba.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<ia||da.model.isEdge(Ba.cell))&&ia>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ba)&&(da.model.isVertex(Ba.cell)&&null!=r||da.model.isEdge(Ba.cell)&&da.model.isEdge(d[0]))){if(da.isCellEditable(Ba.cell)){Q=
+Ba;var qa=da.model.isEdge(Ba.cell)?da.view.getPoint(Ba):new mxPoint(Ba.getCenterX(),Ba.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);X.style.left=Math.floor(qa.x)+"px";X.style.top=Math.floor(qa.y)+"px";null==ja&&(da.container.appendChild(X),ja=X.parentNode);h(sa,ta,qa,X)}}else null==Q||!mxUtils.contains(Q,sa,ta)||1500<ia&&!mxEvent.isShiftDown(Ja)?(Q=null,null!=ja&&(X.parentNode.removeChild(X),ja=
+null)):null!=Q&&null!=ja&&(qa=da.model.isEdge(Q.cell)?da.view.getPoint(Q):new mxPoint(Q.getCenterX(),Q.getCenterY()),qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(sa,ta,qa,X));if(T&&null!=C&&!mxEvent.isAltDown(Ja)&&null==V){ua=mxRectangle.fromRectangle(C);if(da.model.isEdge(C.cell)){var Ea=C.absolutePoints;null!=fa.parentNode&&(qa=Ea[0],ua.add(h(sa,ta,new mxRectangle(qa.x-this.roundDrop.width/2,qa.y-this.roundDrop.height/
+2,this.roundDrop.width,this.roundDrop.height),fa)));null!=ra.parentNode&&(Ea=Ea[Ea.length-1],ua.add(h(sa,ta,new mxRectangle(Ea.x-this.roundDrop.width/2,Ea.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ra)))}else qa=mxRectangle.fromRectangle(C),null!=C.shape&&null!=C.shape.boundingBox&&(qa=mxRectangle.fromRectangle(C.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Ea=this.graph.selectionCellsHandler.getHandler(C.cell),null!=Ea&&(qa.x-=
+Ea.horizontalOffset/2,qa.y-=Ea.verticalOffset/2,qa.width+=Ea.horizontalOffset,qa.height+=Ea.verticalOffset,null!=Ea.rotationShape&&null!=Ea.rotationShape.node&&"hidden"!=Ea.rotationShape.node.style.visibility&&"none"!=Ea.rotationShape.node.style.display&&null!=Ea.rotationShape.boundingBox&&qa.add(Ea.rotationShape.boundingBox)),ua.add(h(sa,ta,new mxRectangle(C.getCenterX()-this.triangleUp.width/2,qa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),R)),ua.add(h(sa,ta,new mxRectangle(qa.x+
+qa.width,C.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),ba)),ua.add(h(sa,ta,new mxRectangle(C.getCenterX()-this.triangleDown.width/2,qa.y+qa.height,this.triangleDown.width,this.triangleDown.height),S)),ua.add(h(sa,ta,new mxRectangle(qa.x-this.triangleLeft.width,C.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),P));null!=ua&&ua.grow(10)}K=mxConstants.DIRECTION_NORTH;V==ba?K=mxConstants.DIRECTION_EAST:V==S||V==
+ra?K=mxConstants.DIRECTION_SOUTH:V==P&&(K=mxConstants.DIRECTION_WEST);null!=Q&&V==X&&(Ba=Q);qa=(null==r||da.isCellConnectable(d[r]))&&(da.model.isEdge(Ia)&&null!=r||da.model.isVertex(Ia)&&da.isCellConnectable(Ia));if(null!=C&&5E3<=ia||C!=Ba&&(null==ua||!mxUtils.contains(ua,sa,ta)||500<ia&&null==V&&qa))if(T=!1,C=5E3>ia&&ia>this.dropTargetDelay||da.model.isEdge(Ia)?Ba:null,null!=C&&qa){ua=[fa,ra,R,ba,S,P];for(qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);da.model.isEdge(Ia)?
(Ea=Ba.absolutePoints,null!=Ea&&(qa=Ea[0],Ea=Ea[Ea.length-1],ua=da.tolerance,new mxRectangle(sa-ua,ta-ua,2*ua,2*ua),fa.style.left=Math.floor(qa.x-this.roundDrop.width/2)+"px",fa.style.top=Math.floor(qa.y-this.roundDrop.height/2)+"px",ra.style.left=Math.floor(Ea.x-this.roundDrop.width/2)+"px",ra.style.top=Math.floor(Ea.y-this.roundDrop.height/2)+"px",null==da.model.getTerminal(Ia,!0)&&da.container.appendChild(fa),null==da.model.getTerminal(Ia,!1)&&da.container.appendChild(ra))):(qa=mxRectangle.fromRectangle(Ba),
null!=Ba.shape&&null!=Ba.shape.boundingBox&&(qa=mxRectangle.fromRectangle(Ba.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Ea=this.graph.selectionCellsHandler.getHandler(Ba.cell),null!=Ea&&(qa.x-=Ea.horizontalOffset/2,qa.y-=Ea.verticalOffset/2,qa.width+=Ea.horizontalOffset,qa.height+=Ea.verticalOffset,null!=Ea.rotationShape&&null!=Ea.rotationShape.node&&"hidden"!=Ea.rotationShape.node.style.visibility&&"none"!=Ea.rotationShape.node.style.display&&null!=
-Ea.rotationShape.boundingBox&&qa.add(Ea.rotationShape.boundingBox)),Q.style.left=Math.floor(Ba.getCenterX()-this.triangleUp.width/2)+"px",Q.style.top=Math.floor(qa.y-this.triangleUp.height)+"px",aa.style.left=Math.floor(qa.x+qa.width)+"px",aa.style.top=Math.floor(Ba.getCenterY()-this.triangleRight.height/2)+"px",U.style.left=Q.style.left,U.style.top=Math.floor(qa.y+qa.height)+"px",P.style.left=Math.floor(qa.x-this.triangleLeft.width)+"px",P.style.top=aa.style.top,"eastwest"!=Ba.style.portConstraint&&
-(da.container.appendChild(Q),da.container.appendChild(U)),da.container.appendChild(aa),da.container.appendChild(P));null!=Ba&&(N=da.selectionCellsHandler.getHandler(Ba.cell),null!=N&&null!=N.setHandlesVisible&&N.setHandlesVisible(!1));S=!0}else for(ua=[fa,ra,Q,aa,U,P],qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);S||null==N||N.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=R&&V==X?null:mxDragSource.prototype.getDropTarget.apply(this,
-arguments);ua=da.getModel();if(null!=Ia&&(null!=V||!da.isSplitTarget(Ia,e,Ja))){for(;null!=Ia&&!da.isValidDropTarget(Ia,e,Ja)&&ua.isVertex(ua.getParent(Ia));)Ia=ua.getParent(Ia);null!=Ia&&(da.view.currentRoot==Ia||!da.isValidRoot(Ia)&&0==da.getModel().getChildCount(Ia)||da.isCellLocked(Ia)||ua.isEdge(Ia)||!da.isValidDropTarget(Ia,e,Ja))&&(Ia=null)}da.isCellLocked(Ia)&&(Ia=null);return Ia});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var da=[fa,ra,X,Q,aa,U,P],sa=
-0;sa<da.length;sa++)null!=da[sa].parentNode&&da[sa].parentNode.removeChild(da[sa]);null!=C&&null!=N&&N.reset();V=ja=R=C=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()}))};
+Ea.rotationShape.boundingBox&&qa.add(Ea.rotationShape.boundingBox)),R.style.left=Math.floor(Ba.getCenterX()-this.triangleUp.width/2)+"px",R.style.top=Math.floor(qa.y-this.triangleUp.height)+"px",ba.style.left=Math.floor(qa.x+qa.width)+"px",ba.style.top=Math.floor(Ba.getCenterY()-this.triangleRight.height/2)+"px",S.style.left=R.style.left,S.style.top=Math.floor(qa.y+qa.height)+"px",P.style.left=Math.floor(qa.x-this.triangleLeft.width)+"px",P.style.top=ba.style.top,"eastwest"!=Ba.style.portConstraint&&
+(da.container.appendChild(R),da.container.appendChild(S)),da.container.appendChild(ba),da.container.appendChild(P));null!=Ba&&(N=da.selectionCellsHandler.getHandler(Ba.cell),null!=N&&null!=N.setHandlesVisible&&N.setHandlesVisible(!1));T=!0}else for(ua=[fa,ra,R,ba,S,P],qa=0;qa<ua.length;qa++)null!=ua[qa].parentNode&&ua[qa].parentNode.removeChild(ua[qa]);T||null==N||N.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=Q&&V==X?null:mxDragSource.prototype.getDropTarget.apply(this,
+arguments);ua=da.getModel();if(null!=Ia&&(null!=V||!da.isSplitTarget(Ia,d,Ja))){for(;null!=Ia&&!da.isValidDropTarget(Ia,d,Ja)&&ua.isVertex(ua.getParent(Ia));)Ia=ua.getParent(Ia);null!=Ia&&(da.view.currentRoot==Ia||!da.isValidRoot(Ia)&&0==da.getModel().getChildCount(Ia)||da.isCellLocked(Ia)||ua.isEdge(Ia)||!da.isValidDropTarget(Ia,d,Ja))&&(Ia=null)}da.isCellLocked(Ia)&&(Ia=null);return Ia});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var da=[fa,ra,X,R,ba,S,P],sa=
+0;sa<da.length;sa++)null!=da[sa].parentNode&&da[sa].parentNode.removeChild(da[sa]);null!=C&&null!=N&&N.reset();V=ja=Q=C=N=null};return F};
+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,h=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))>h||Math.abs(n.y-mxEvent.getClientY(m))>
+h)&&(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,h,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,h)}))};Sidebar.prototype.createVertexTemplate=function(a,b,f,d,g,e,h,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,h,n,u)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,b,f,d,g,e,h,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,h,n)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,f,d,g,e,h,n){return this.createItem(a,d,g,e,b,f,h,n)};
+Sidebar.prototype.createEdgeTemplateEntry=function(a,b,f,d,g,e,h,n,u){h=null!=h&&0<h.length?h:g.toLowerCase();return this.addEntry(h,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,h,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,h,n)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,f,d,g,e,h,n){return this.createItem(a,d,g,null!=n?n:!0,b,f,e,h)};
+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 h=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;f(b,a);mxClient.NO_FO=h},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,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,D,F,I){if(null==g||0>mxUtils.indexOf(g,B)){D=this.getTagsForStencil(x,B);var C=null!=n?n[B]:null;null!=C&&D.push(C);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+e,Math.round(F*k),Math.round(I*k),"",B.replace(/_/g," "),null,null,this.filterTags(D.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(D,F,I,C,N){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+D+F.toLowerCase()+e,Math.round(C*k),Math.round(N*k),"",F.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addImagePalette=function(a,b,f,d,g,e,h){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!=h?h[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,h,n,u,m){h=null!=h?h: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,D,F,H){if(null==g||0>mxUtils.indexOf(g,B)){D=this.getTagsForStencil(x,B);var C=null!=n?n[B]:null;null!=C&&D.push(C);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+d,Math.round(F*h),Math.round(H*h),"",B.replace(/_/g," "),null,null,this.filterTags(D.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(D,F,H,C,N){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+D+F.toLowerCase()+d,Math.round(C*h),Math.round(N*h),"",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 e=0;e<a.length;e++)f=f.replace(new RegExp("&"+a[e][0]+";","g"),"&#"+a[e][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 d=0;d<a.length;d++)f=f.replace(new RegExp("&"+a[d][0]+";","g"),"&#"+a[d][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(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";
+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,h;if("undefined"!==typeof e){if(!b(e))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(h=
+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 h?e(r,m):e.call(h,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,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(K){K=this.getCurrentCellStyle(K);
-return null!=K?"1"==K.html||"wrap"==K[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(K,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){K=V.getProperty("event");var O=K.getState();V=this.view.scale;if(!mxEvent.isAltDown(K.getEvent())&&null!=O)if(this.model.isEdge(O.cell))if(k=new mxPoint(K.getGraphX(),K.getGraphY()),r=this.isCellSelected(O.cell),u=O,n=K,null!=O.text&&null!=
-O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,K.getGraphX(),K.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var T=this.selectionCellsHandler.getHandler(O.cell);null!=T&&null!=T.bends&&0<T.bends.length&&(m=T.getHandleForEvent(K))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(K.getEvent())&&(T=this.selectionCellsHandler.getHandler(O.cell),null==T||null==T.getHandleForEvent(K))){var J=new mxRectangle(K.getGraphX()-1,K.getGraphY()-1),ba=mxEvent.isTouchEvent(K.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+2)/2;T=ba+2;J.grow(ba);if(this.isTableCell(O.cell)&&!this.isCellSelected(O.cell)&&!(mxUtils.contains(O,K.getGraphX()-T,K.getGraphY()-T)&&mxUtils.contains(O,K.getGraphX()-T,K.getGraphY()+T)&&mxUtils.contains(O,K.getGraphX()+T,K.getGraphY()+T)&&mxUtils.contains(O,K.getGraphX()+T,K.getGraphY()-T))){var ia=this.model.getParent(O.cell);T=this.model.getParent(ia);if(!this.isCellSelected(T)){ba*=V;var na=2*ba;if(this.model.getChildAt(T,0)!=ia&&mxUtils.intersects(J,
-new mxRectangle(O.x,O.y-ba,O.width,na))||this.model.getChildAt(ia,0)!=O.cell&&mxUtils.intersects(J,new mxRectangle(O.x-ba,O.y,na,O.height))||mxUtils.intersects(J,new mxRectangle(O.x,O.y+O.height-ba,O.width,na))||mxUtils.intersects(J,new mxRectangle(O.x+O.width-ba,O.y,na,O.height)))ia=this.selectionCellsHandler.isHandled(T),this.selectCellForEvent(T,K.getEvent()),T=this.selectionCellsHandler.getHandler(T),null!=T&&(ba=T.getHandleForEvent(K),null!=ba&&(T.start(K.getGraphX(),K.getGraphY(),ba),T.blockDelayedSelection=
-!ia,K.consume()))}}for(;!K.isConsumed()&&null!=O&&(this.isTableCell(O.cell)||this.isTableRow(O.cell)||this.isTable(O.cell));)this.isSwimlane(O.cell)&&(T=this.getActualStartSize(O.cell),(0<T.x||0<T.width)&&mxUtils.intersects(J,new mxRectangle(O.x+(T.x-T.width-1)*V+(0==T.x?O.width:0),O.y,1,O.height))||(0<T.y||0<T.height)&&mxUtils.intersects(J,new mxRectangle(O.x,O.y+(T.y-T.height-1)*V+(0==T.y?O.height:0),O.width,1)))&&(this.selectCellForEvent(O.cell,K.getEvent()),T=this.selectionCellsHandler.getHandler(O.cell),
-null!=T&&(ba=mxEvent.CUSTOM_HANDLE-T.customHandles.length+1,T.start(K.getGraphX(),K.getGraphY(),ba),K.consume())),O=this.view.getState(this.model.getParent(O.cell))}}}));this.addMouseListener({mouseDown:function(K,V){},mouseMove:mxUtils.bind(this,function(K,V){K=this.selectionCellsHandler.handlers.map;for(var O in K)if(null!=K[O].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var T=this.tolerance;if(null!=k&&null!=u&&null!=n){if(O=u,Math.abs(k.x-
-V.getGraphX())>T||Math.abs(k.y-V.getGraphY())>T){var J=this.selectionCellsHandler.getHandler(O.cell);null==J&&this.model.isEdge(O.cell)&&(J=this.createHandler(O));if(null!=J&&null!=J.bends&&0<J.bends.length){K=J.getHandleForEvent(n);var ba=this.view.getEdgeStyle(O);T=ba==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(K=m);if(T&&0!=K&&K!=J.bends.length-1&&K!=mxEvent.LABEL_HANDLE)!T||null==O.visibleSourceState&&null==O.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(K==
-mxEvent.LABEL_HANDLE||0==K||null!=O.visibleSourceState||K==J.bends.length-1||null!=O.visibleTargetState)T||K==mxEvent.LABEL_HANDLE||(T=O.absolutePoints,null!=T&&(null==ba&&null==K||ba==mxEdgeStyle.OrthConnector)&&(K=m,null==K&&(K=new mxRectangle(k.x,k.y),K.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(K,T[0].x,T[0].y)?K=0:mxUtils.contains(K,T[T.length-1].x,T[T.length-1].y)?K=J.bends.length-1:null!=ba&&(2==T.length||3==T.length&&(0==Math.round(T[0].x-T[1].x)&&0==Math.round(T[1].x-
-T[2].x)||0==Math.round(T[0].y-T[1].y)&&0==Math.round(T[1].y-T[2].y)))?K=2:(K=mxUtils.findNearestSegment(O,k.x,k.y),K=null==ba?mxEvent.VIRTUAL_HANDLE-K:K+1))),null==K&&(K=mxEvent.VIRTUAL_HANDLE)),J.start(V.getGraphX(),V.getGraphX(),K),V.consume(),this.graphHandler.reset()}null!=J&&(this.selectionCellsHandler.isHandlerActive(J)?this.isCellSelected(O.cell)||(this.selectionCellsHandler.handlers.put(O.cell,J),this.selectCellForEvent(O.cell,V.getEvent())):this.isCellSelected(O.cell)||J.destroy());r=!1;
-k=n=u=m=null}}else if(O=V.getState(),null!=O&&this.isCellEditable(O.cell)){J=null;if(this.model.isEdge(O.cell)){if(K=new mxRectangle(V.getGraphX(),V.getGraphY()),K.grow(mxEdgeHandler.prototype.handleImage.width/2),T=O.absolutePoints,null!=T)if(null!=O.text&&null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,V.getGraphX(),V.getGraphY()))J="move";else if(mxUtils.contains(K,T[0].x,T[0].y)||mxUtils.contains(K,T[T.length-1].x,T[T.length-1].y))J="pointer";else if(null!=O.visibleSourceState||
-null!=O.visibleTargetState)K=this.view.getEdgeStyle(O),J="crosshair",K!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(O)&&(V=mxUtils.findNearestSegment(O,V.getGraphX(),V.getGraphY()),V<T.length-1&&0<=V&&(J=0==Math.round(T[V].x-T[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){T=mxShape.prototype.svgStrokeTolerance/2;K=new mxRectangle(V.getGraphX(),V.getGraphY());K.grow(T);if(this.isTableCell(O.cell)&&(V=this.model.getParent(O.cell),T=this.model.getParent(V),!this.isCellSelected(T)))if(mxUtils.intersects(K,
-new mxRectangle(O.x,O.y-2,O.width,4))&&this.model.getChildAt(T,0)!=V||mxUtils.intersects(K,new mxRectangle(O.x,O.y+O.height-2,O.width,4)))J="row-resize";else if(mxUtils.intersects(K,new mxRectangle(O.x-2,O.y,4,O.height))&&this.model.getChildAt(V,0)!=O.cell||mxUtils.intersects(K,new mxRectangle(O.x+O.width-2,O.y,4,O.height)))J="col-resize";for(V=O;null==J&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(T=this.getActualStartSize(V.cell),
-ba=this.view.scale,(0<T.x||0<T.width)&&mxUtils.intersects(K,new mxRectangle(V.x+(T.x-T.width-1)*ba+(0==T.x?V.width*ba:0),V.y,1,V.height))?J="col-resize":(0<T.y||0<T.height)&&mxUtils.intersects(K,new mxRectangle(V.x,V.y+(T.y-T.height-1)*ba+(0==T.y?V.height:0),V.width,1))&&(J="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=J&&O.setCursor(J)}}}),mouseUp:mxUtils.bind(this,function(K,V){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(K){var V=
+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(K){K=this.getCurrentCellStyle(K);
+return null!=K?"1"==K.html||"wrap"==K[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var h=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){K=V.getProperty("event");var O=K.getState();V=this.view.scale;if(!mxEvent.isAltDown(K.getEvent())&&null!=O)if(this.model.isEdge(O.cell))if(h=new mxPoint(K.getGraphX(),K.getGraphY()),r=this.isCellSelected(O.cell),u=O,n=K,null!=O.text&&null!=
+O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,K.getGraphX(),K.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var U=this.selectionCellsHandler.getHandler(O.cell);null!=U&&null!=U.bends&&0<U.bends.length&&(m=U.getHandleForEvent(K))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(K.getEvent())&&(U=this.selectionCellsHandler.getHandler(O.cell),null==U||null==U.getHandleForEvent(K))){var J=new mxRectangle(K.getGraphX()-1,K.getGraphY()-1),aa=mxEvent.isTouchEvent(K.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+2)/2;U=aa+2;J.grow(aa);if(this.isTableCell(O.cell)&&!this.isCellSelected(O.cell)&&!(mxUtils.contains(O,K.getGraphX()-U,K.getGraphY()-U)&&mxUtils.contains(O,K.getGraphX()-U,K.getGraphY()+U)&&mxUtils.contains(O,K.getGraphX()+U,K.getGraphY()+U)&&mxUtils.contains(O,K.getGraphX()+U,K.getGraphY()-U))){var ia=this.model.getParent(O.cell);U=this.model.getParent(ia);if(!this.isCellSelected(U)){aa*=V;var na=2*aa;if(this.model.getChildAt(U,0)!=ia&&mxUtils.intersects(J,
+new mxRectangle(O.x,O.y-aa,O.width,na))||this.model.getChildAt(ia,0)!=O.cell&&mxUtils.intersects(J,new mxRectangle(O.x-aa,O.y,na,O.height))||mxUtils.intersects(J,new mxRectangle(O.x,O.y+O.height-aa,O.width,na))||mxUtils.intersects(J,new mxRectangle(O.x+O.width-aa,O.y,na,O.height)))ia=this.selectionCellsHandler.isHandled(U),this.selectCellForEvent(U,K.getEvent()),U=this.selectionCellsHandler.getHandler(U),null!=U&&(aa=U.getHandleForEvent(K),null!=aa&&(U.start(K.getGraphX(),K.getGraphY(),aa),U.blockDelayedSelection=
+!ia,K.consume()))}}for(;!K.isConsumed()&&null!=O&&(this.isTableCell(O.cell)||this.isTableRow(O.cell)||this.isTable(O.cell));)this.isSwimlane(O.cell)&&(U=this.getActualStartSize(O.cell),(0<U.x||0<U.width)&&mxUtils.intersects(J,new mxRectangle(O.x+(U.x-U.width-1)*V+(0==U.x?O.width:0),O.y,1,O.height))||(0<U.y||0<U.height)&&mxUtils.intersects(J,new mxRectangle(O.x,O.y+(U.y-U.height-1)*V+(0==U.y?O.height:0),O.width,1)))&&(this.selectCellForEvent(O.cell,K.getEvent()),U=this.selectionCellsHandler.getHandler(O.cell),
+null!=U&&(aa=mxEvent.CUSTOM_HANDLE-U.customHandles.length+1,U.start(K.getGraphX(),K.getGraphY(),aa),K.consume())),O=this.view.getState(this.model.getParent(O.cell))}}}));this.addMouseListener({mouseDown:function(K,V){},mouseMove:mxUtils.bind(this,function(K,V){K=this.selectionCellsHandler.handlers.map;for(var O in K)if(null!=K[O].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var U=this.tolerance;if(null!=h&&null!=u&&null!=n){if(O=u,Math.abs(h.x-
+V.getGraphX())>U||Math.abs(h.y-V.getGraphY())>U){var J=this.selectionCellsHandler.getHandler(O.cell);null==J&&this.model.isEdge(O.cell)&&(J=this.createHandler(O));if(null!=J&&null!=J.bends&&0<J.bends.length){K=J.getHandleForEvent(n);var aa=this.view.getEdgeStyle(O);U=aa==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(K=m);if(U&&0!=K&&K!=J.bends.length-1&&K!=mxEvent.LABEL_HANDLE)!U||null==O.visibleSourceState&&null==O.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(K==
+mxEvent.LABEL_HANDLE||0==K||null!=O.visibleSourceState||K==J.bends.length-1||null!=O.visibleTargetState)U||K==mxEvent.LABEL_HANDLE||(U=O.absolutePoints,null!=U&&(null==aa&&null==K||aa==mxEdgeStyle.OrthConnector)&&(K=m,null==K&&(K=new mxRectangle(h.x,h.y),K.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(K,U[0].x,U[0].y)?K=0:mxUtils.contains(K,U[U.length-1].x,U[U.length-1].y)?K=J.bends.length-1:null!=aa&&(2==U.length||3==U.length&&(0==Math.round(U[0].x-U[1].x)&&0==Math.round(U[1].x-
+U[2].x)||0==Math.round(U[0].y-U[1].y)&&0==Math.round(U[1].y-U[2].y)))?K=2:(K=mxUtils.findNearestSegment(O,h.x,h.y),K=null==aa?mxEvent.VIRTUAL_HANDLE-K:K+1))),null==K&&(K=mxEvent.VIRTUAL_HANDLE)),J.start(V.getGraphX(),V.getGraphX(),K),V.consume(),this.graphHandler.reset()}null!=J&&(this.selectionCellsHandler.isHandlerActive(J)?this.isCellSelected(O.cell)||(this.selectionCellsHandler.handlers.put(O.cell,J),this.selectCellForEvent(O.cell,V.getEvent())):this.isCellSelected(O.cell)||J.destroy());r=!1;
+h=n=u=m=null}}else if(O=V.getState(),null!=O&&this.isCellEditable(O.cell)){J=null;if(this.model.isEdge(O.cell)){if(K=new mxRectangle(V.getGraphX(),V.getGraphY()),K.grow(mxEdgeHandler.prototype.handleImage.width/2),U=O.absolutePoints,null!=U)if(null!=O.text&&null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,V.getGraphX(),V.getGraphY()))J="move";else if(mxUtils.contains(K,U[0].x,U[0].y)||mxUtils.contains(K,U[U.length-1].x,U[U.length-1].y))J="pointer";else if(null!=O.visibleSourceState||
+null!=O.visibleTargetState)K=this.view.getEdgeStyle(O),J="crosshair",K!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(O)&&(V=mxUtils.findNearestSegment(O,V.getGraphX(),V.getGraphY()),V<U.length-1&&0<=V&&(J=0==Math.round(U[V].x-U[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){U=mxShape.prototype.svgStrokeTolerance/2;K=new mxRectangle(V.getGraphX(),V.getGraphY());K.grow(U);if(this.isTableCell(O.cell)&&(V=this.model.getParent(O.cell),U=this.model.getParent(V),!this.isCellSelected(U)))if(mxUtils.intersects(K,
+new mxRectangle(O.x,O.y-2,O.width,4))&&this.model.getChildAt(U,0)!=V||mxUtils.intersects(K,new mxRectangle(O.x,O.y+O.height-2,O.width,4)))J="row-resize";else if(mxUtils.intersects(K,new mxRectangle(O.x-2,O.y,4,O.height))&&this.model.getChildAt(V,0)!=O.cell||mxUtils.intersects(K,new mxRectangle(O.x+O.width-2,O.y,4,O.height)))J="col-resize";for(V=O;null==J&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(U=this.getActualStartSize(V.cell),
+aa=this.view.scale,(0<U.x||0<U.width)&&mxUtils.intersects(K,new mxRectangle(V.x+(U.x-U.width-1)*aa+(0==U.x?V.width*aa:0),V.y,1,V.height))?J="col-resize":(0<U.y||0<U.height)&&mxUtils.intersects(K,new mxRectangle(V.x,V.y+(U.y-U.height-1)*aa+(0==U.y?V.height:0),V.width,1))&&(J="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=J&&O.setCursor(J)}}}),mouseUp:mxUtils.bind(this,function(K,V){m=h=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(K){var V=
mxCellRenderer.prototype.getLabelValue.apply(this,arguments);K.view.graph.isHtmlLabel(K.cell)&&(V=1!=K.style.html?mxUtils.htmlEntities(V,!1):K.view.graph.sanitizeHtml(V));return V};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(K,V){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var K=x.apply(this,arguments);if(this.graph.pageVisible){var V=[],O=this.graph.pageFormat,T=this.graph.pageScale,J=O.width*T;O=O.height*T;T=this.graph.view.translate;for(var ba=this.graph.view.scale,ia=
-this.graph.getPageLayout(),na=0;na<ia.width;na++)V.push(new mxRectangle(((ia.x+na)*J+T.x)*ba,(ia.y*O+T.y)*ba,J*ba,O*ba));for(na=1;na<ia.height;na++)V.push(new mxRectangle((ia.x*J+T.x)*ba,((ia.y+na)*O+T.y)*ba,J*ba,O*ba));K=V.concat(K)}return K};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(K,V){return null==K.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(K){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(K){for(var V=B.apply(this,arguments),O=new mxDictionary,T=[],J=0;J<V.length;J++){var ba=this.graph.isTableCell(K)&&this.graph.isTableCell(V[J])&&this.graph.isCellSelected(V[J])?this.graph.model.getParent(V[J]):this.graph.isTableRow(K)&&this.graph.isTableRow(V[J])&&this.graph.isCellSelected(V[J])?V[J]:this.graph.getCompositeParent(V[J]);
-null==ba||O.get(ba)||(O.put(ba,!0),T.push(ba))}return T};var D=this.graphHandler.start;this.graphHandler.start=function(K,V,O,T){var J=!1;this.graph.isTableCell(K)&&(this.graph.isCellSelected(K)?J=!0:K=this.graph.model.getParent(K));J||this.graph.isTableRow(K)&&this.graph.isCellSelected(K)||(K=this.graph.getCompositeParent(K));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(K,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
-arguments)};var F=new mxRubberband(this);this.getRubberband=function(){return F};var I=(new Date).getTime(),C=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var K=this.currentState;N.apply(this,arguments);K!=this.currentState?(I=(new Date).getTime(),C=0):C=(new Date).getTime()-I};var R=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(K){return mxEvent.isShiftDown(K.getEvent())&&mxEvent.isAltDown(K.getEvent())?!1:null!=
-this.currentState&&K.getState()==this.currentState&&2E3<C||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&R.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(K){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K)};var Q=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(K){return Q.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
-mxClient.IS_FF&&mxClient.IS_WIN&&null==K.getState()&&mxEvent.isTouchEvent(K.getEvent())};var aa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(aa=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=aa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(K){return mxEvent.isMouseEvent(K.getEvent())};
-var U=this.click;this.click=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);if(this.isEnabled()&&!V||K.isConsumed())return U.apply(this,arguments);var O=V?K.sourceState.cell:K.getCell();null!=O&&(O=this.getClickableLinkForCell(O),null!=O&&(this.isCustomLink(O)?this.customLinkClicked(O):this.openLink(O)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};var P=this.tooltipHandler.show;this.tooltipHandler.show=
+!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(K,V){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var K=x.apply(this,arguments);if(this.graph.pageVisible){var V=[],O=this.graph.pageFormat,U=this.graph.pageScale,J=O.width*U;O=O.height*U;U=this.graph.view.translate;for(var aa=this.graph.view.scale,ia=
+this.graph.getPageLayout(),na=0;na<ia.width;na++)V.push(new mxRectangle(((ia.x+na)*J+U.x)*aa,(ia.y*O+U.y)*aa,J*aa,O*aa));for(na=1;na<ia.height;na++)V.push(new mxRectangle((ia.x*J+U.x)*aa,((ia.y+na)*O+U.y)*aa,J*aa,O*aa));K=V.concat(K)}return K};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(K,V){return null==K.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(K){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(K){for(var V=B.apply(this,arguments),O=new mxDictionary,U=[],J=0;J<V.length;J++){var aa=this.graph.isTableCell(K)&&this.graph.isTableCell(V[J])&&this.graph.isCellSelected(V[J])?this.graph.model.getParent(V[J]):this.graph.isTableRow(K)&&this.graph.isTableRow(V[J])&&this.graph.isCellSelected(V[J])?V[J]:this.graph.getCompositeParent(V[J]);
+null==aa||O.get(aa)||(O.put(aa,!0),U.push(aa))}return U};var D=this.graphHandler.start;this.graphHandler.start=function(K,V,O,U){var J=!1;this.graph.isTableCell(K)&&(this.graph.isCellSelected(K)?J=!0:K=this.graph.model.getParent(K));J||this.graph.isTableRow(K)&&this.graph.isCellSelected(K)||(K=this.graph.getCompositeParent(K));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(K,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
+arguments)};var F=new mxRubberband(this);this.getRubberband=function(){return F};var H=(new Date).getTime(),C=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var K=this.currentState;N.apply(this,arguments);K!=this.currentState?(H=(new Date).getTime(),C=0):C=(new Date).getTime()-H};var Q=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(K){return mxEvent.isShiftDown(K.getEvent())&&mxEvent.isAltDown(K.getEvent())?!1:null!=
+this.currentState&&K.getState()==this.currentState&&2E3<C||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&Q.apply(this,arguments)};var T=this.isToggleEvent;this.isToggleEvent=function(K){return T.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K)};var R=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(K){return R.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
+mxClient.IS_FF&&mxClient.IS_WIN&&null==K.getState()&&mxEvent.isTouchEvent(K.getEvent())};var ba=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ba=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=ba)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(K){return mxEvent.isMouseEvent(K.getEvent())};
+var S=this.click;this.click=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);if(this.isEnabled()&&!V||K.isConsumed())return S.apply(this,arguments);var O=V?K.sourceState.cell:K.getCell();null!=O&&(O=this.getClickableLinkForCell(O),null!=O&&(this.isCustomLink(O)?this.customLinkClicked(O):this.openLink(O)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};var P=this.tooltipHandler.show;this.tooltipHandler.show=
function(){P.apply(this,arguments);if(null!=this.div)for(var K=this.div.getElementsByTagName("a"),V=0;V<K.length;V++)null!=K[V].getAttribute("href")&&null==K[V].getAttribute("target")&&K[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(K){return K.sourceState};this.getCursorForMouseEvent=function(K){var V=null==K.state&&null!=K.sourceState&&this.isCellLocked(K.sourceState.cell);return this.getCursorForCell(V?K.sourceState.cell:K.getCell())};var X=this.getCursorForCell;
-this.getCursorForCell=function(K){if(!this.isEnabled()||this.isCellLocked(K)){if(null!=this.getClickableLinkForCell(K))return"pointer";if(this.isCellLocked(K))return"default"}return X.apply(this,arguments)};this.selectRegion=function(K,V){var O=mxEvent.isAltDown(V)?K:null;K=this.getCells(K.x,K.y,K.width,K.height,null,null,O,function(T){return"1"==mxUtils.getValue(T.style,"locked","0")},!0);if(this.isToggleEvent(V))for(O=0;O<K.length;O++)this.selectCellForEvent(K[O],V);else this.selectCellsForEvent(K,
+this.getCursorForCell=function(K){if(!this.isEnabled()||this.isCellLocked(K)){if(null!=this.getClickableLinkForCell(K))return"pointer";if(this.isCellLocked(K))return"default"}return X.apply(this,arguments)};this.selectRegion=function(K,V){var O=mxEvent.isAltDown(V)?K:null;K=this.getCells(K.x,K.y,K.width,K.height,null,null,O,function(U){return"1"==mxUtils.getValue(U.style,"locked","0")},!0);if(this.isToggleEvent(V))for(O=0;O<K.length;O++)this.selectCellForEvent(K[O],V);else this.selectCellsForEvent(K,
V);return K};var ja=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(K,V,O){return this.graph.isCellSelected(K)?!1:ja.apply(this,arguments)};this.isCellLocked=function(K){for(;null!=K;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(K),"locked","0"))return!0;K=this.model.getParent(K)}return!1};var fa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(K,V){"mouseDown"==V.getProperty("eventName")&&(K=V.getProperty("event").getState(),
fa=null==K||this.isSelectionEmpty()||this.isCellSelected(K.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(K,V){if(!mxEvent.isMultiTouchEvent(V)){K=V.getProperty("event");var O=V.getProperty("cell");null==O?(K=mxUtils.convertPoint(this.container,mxEvent.getClientX(K),mxEvent.getClientY(K)),F.start(K.x,K.y)):null!=fa?this.addSelectionCells(fa):1<this.getSelectionCount()&&this.isCellSelected(O)&&this.removeSelectionCell(O);fa=null;V.consume()}}));
this.connectionHandler.selectCells=function(K,V){this.graph.setSelectionCell(V||K)};this.connectionHandler.constraintHandler.isStateIgnored=function(K,V){var O=K.view.graph;return V&&(O.isCellSelected(K.cell)||O.isTableRow(K.cell)&&O.selectionCellsHandler.isHandled(O.model.getParent(K.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var K=this.connectionHandler.constraintHandler;null!=K.currentFocus&&K.isStateIgnored(K.currentFocus,!0)&&(K.currentFocus=null,K.constraints=
@@ -2563,114 +2567,114 @@ Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileL
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,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.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(),h=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"svg"):e.createElement("svg");null!=g&&(null!=h.style?h.style.backgroundColor=g:h.setAttribute("style","background-color:"+g));null==e.createElementNS?(h.setAttribute("xmlns",mxConstants.NS_SVG),h.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);h.setAttribute("version","1.1");
+h.setAttribute("width",f+"px");h.setAttribute("height",d+"px");h.setAttribute("viewBox",a+" "+b+" "+f+" "+d);e.appendChild(h);return h};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.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,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.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.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,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.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.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){if(null==a)return null;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&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(a,b){"svg"==a.nodeName&&"content"==b.attrName&&(b.forceKeepAttr=!0);return a});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 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.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 h=e[0].getAttribute("width"),n=e[0].getAttribute("height");h=null!=h&&"%"!=h.charAt(h.length-1)?parseFloat(h):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=e[0].getAttribute("viewBox");if(null!=u&&!isNaN(h)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/h,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.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.simpleBackgroundColor="#f0f0f0";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,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)||"mxgraph.arrows2.wedgeArrow"==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=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null);return"label"==k||"image"==k};Graph.prototype.isShadowState=function(k){return"image"!=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(k,n){k=null!=k?k:!0;n=null!=n?n:!0;var u=this.model;return u.filterDescendants(function(m){return k&&u.isVertex(m)||n&&u.isEdge(m)},u.getRoot())};Graph.prototype.getCommonStyle=
-function(k){for(var n={},u=0;u<k.length;u++){var m=this.view.getState(k[u]);this.mergeStyle(m.style,n,0==u)}return n};Graph.prototype.mergeStyle=function(k,n,u){if(null!=k){var m={},r;for(r in k){var x=k[r];null!=x&&(m[r]=!0,null==n[r]&&u?n[r]=x:n[r]!=x&&delete n[r])}for(r in n)m[r]||delete n[r]}};Graph.prototype.getStartEditingCell=function(k,n){n=this.getCellStyle(k);n=parseInt(mxUtils.getValue(n,mxConstants.STYLE_STARTSIZE,0));this.isTable(k)&&(!this.isSwimlane(k)||0==n)&&""==this.getLabel(k)&&
-0<this.model.getChildCount(k)&&(k=this.model.getChildAt(k,0),n=this.getCellStyle(k),n=parseInt(mxUtils.getValue(n,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 D=this.model.getChildAt(u,B),F=this.getScaledCellAt(k,n,D,m,r,x);if(null!=F)return F;if(this.isCellVisible(D)&&(r&&this.model.isEdge(D)||m&&this.model.isVertex(D))&&(F=this.view.getState(D),null!=F&&(null==x||!x(F,k,n))&&this.intersects(F,k,n)))return D}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 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 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){var e=b.getAttribute("href");e!=Graph.sanitizeLink(e)&&Graph.sanitizeNode(b);if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),a);mxEvent.consume(f)}};
-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.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,h=null,n=mxUtils.bind(this,function(r){e=!0;h=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){e=e&&null!=h&&Math.abs(h.x-mxEvent.getClientX(r))<g&&Math.abs(h.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()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(h){return!this.isSpecialColor(h.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(h.style,"lineShape",null)&&(this.model.isVertex(h.cell)||"arrow"==mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,
+null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(h){return!this.isSpecialColor(h.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(h){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],h)};Graph.prototype.isGlassState=function(h){h=mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null);return"label"==h||"rectangle"==h||
+"internalStorage"==h||"ext"==h||"umlLifeline"==h||"swimlane"==h||"process"==h};Graph.prototype.isRoundedState=function(h){return null!=h.shape?h.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(h){var n=mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,!1)&&("connector"==n||"filledEdge"==n)};Graph.prototype.isAutoSizeState=function(h){return"1"==
+mxUtils.getValue(h.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(h){h=mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null);return"label"==h||"image"==h};Graph.prototype.isShadowState=function(h){return"image"!=mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(h,n){h=null!=h?h:!0;n=null!=n?n:!0;var u=this.model;return u.filterDescendants(function(m){return h&&u.isVertex(m)||n&&u.isEdge(m)},u.getRoot())};Graph.prototype.getCommonStyle=
+function(h){for(var n={},u=0;u<h.length;u++){var m=this.view.getState(h[u]);this.mergeStyle(m.style,n,0==u)}return n};Graph.prototype.mergeStyle=function(h,n,u){if(null!=h){var m={},r;for(r in h){var x=h[r];null!=x&&(m[r]=!0,null==n[r]&&u?n[r]=x:n[r]!=x&&delete n[r])}for(r in n)m[r]||delete n[r]}};Graph.prototype.getStartEditingCell=function(h,n){n=this.getCellStyle(h);n=parseInt(mxUtils.getValue(n,mxConstants.STYLE_STARTSIZE,0));this.isTable(h)&&(!this.isSwimlane(h)||0==n)&&""==this.getLabel(h)&&
+0<this.model.getChildCount(h)&&(h=this.model.getChildAt(h,0),n=this.getCellStyle(h),n=parseInt(mxUtils.getValue(n,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(h)&&(!this.isSwimlane(h)||0==n)&&""==this.getLabel(h)&&0<this.model.getChildCount(h))for(n=0;n<this.model.getChildCount(h);n++){var u=this.model.getChildAt(h,n);if(this.isCellEditable(u)){h=u;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,n,u){u=null!=u?u:Graph.pasteStyles;
+Graph.removeKeys(h,function(m){return 0>mxUtils.indexOf(u,m)});this.updateCellStyles(h,n)};Graph.prototype.updateCellStyles=function(h,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 h){var x=h[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(h,n,u,m,r,x){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,n=n/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,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 D=this.model.getChildAt(u,B),F=this.getScaledCellAt(h,n,D,m,r,x);if(null!=F)return F;if(this.isCellVisible(D)&&(r&&this.model.isEdge(D)||m&&this.model.isVertex(D))&&(F=this.view.getState(D),null!=F&&(null==x||!x(F,h,n))&&this.intersects(F,h,n)))return D}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&
+!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(h){for(var n=this.getCellGeometry(h);null!=n&&n.relative;)h=this.getModel().getParent(h),n=this.getCellGeometry(h);return h};Graph.prototype.isPart=function(h){return"1"==mxUtils.getValue(this.getCurrentCellStyle(h),"part","0")||this.isTableCell(h)||this.isTableRow(h)};Graph.prototype.getCompositeParents=function(h){for(var n=
+new mxDictionary,u=[],m=0;m<h.length;m++){var r=this.getCompositeParent(h[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(h){for(;this.isPart(h);){var n=this.model.getParent(h);if(!this.model.isVertex(n))break;h=n}return h};Graph.prototype.filterSelectionCells=function(h){var n=this.getSelectionCells();if(null!=h){for(var u=[],m=0;m<n.length;m++)h(n[m])||
+u.push(n[m]);n=u}return n};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(h){if(this.useCssTransforms){var n=this.currentScale,u=this.currentTranslate;h=new mxRectangle((h.x+2*u.x)*n-u.x,(h.y+2*u.y)*n-u.y,h.width*n,h.height*n)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(h){h=this.strokeWidth;this.graph.useCssTransforms&&(h/=this.graph.currentScale);return h};mxGraphView.prototype.getGraphBounds=function(){var h=this.graphBounds;
+if(this.graph.useCssTransforms){var n=this.graph.currentTranslate,u=this.graph.currentScale;h=new mxRectangle((h.x+n.x)*u,(h.y+n.y)*u,h.width*u,h.height*u)}return h};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(h){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(h){h=f.apply(this,arguments);for(var n=[],u=0;u<h.length;u++)this.isTableRow(h[u])||this.isTableCell(h[u])||n.push(h[u]);return n};var d=
+mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(h){h=d.apply(this,arguments);for(var n=[],u=0;u<h.length;u++)this.isTable(h[u])||this.isTableRow(h[u])||this.isTableCell(h[u])||n.push(h[u]);return n};Graph.prototype.updateCssTransform=function(){var h=this.view.getDrawPane();if(null!=h)if(h=h.parentNode,this.useCssTransforms){var n=h.getAttribute("transform");h.setAttribute("transformOrigin","0 0");var u=Math.round(100*this.currentScale)/100;h.setAttribute("transform",
+"scale("+u+","+u+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");n!=h.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",h.getAttribute("transform"))}else h.removeAttribute("transformOrigin"),h.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var h=this.graph.useCssTransforms,n=this.scale,u=this.translate;
+h&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);h&&(this.scale=n,this.translate=u)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(h,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};Graph.prototype.labelLinkClicked=function(a,b,f){var d=b.getAttribute("href");d!=Graph.sanitizeLink(d)&&Graph.sanitizeNode(b);if(null!=d&&!this.isCustomLink(d)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(d)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(d),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.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(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!=
+"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(h,n){if(null!=a.shape){var u=[f[0]];n=h/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==h&&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(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.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,h=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(h,d);h()};
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),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.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.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 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,R){N=String(N);for(R=R||2;N.length<R;)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"](),D=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var I=f?0:a.getTimezoneOffset(),C={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:D,MM:k(D),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<I?"-":"+")+k(100*Math.floor(Math.abs(I)/60)+Math.abs(I)%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 C?C[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 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,h=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"](),D=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var H=f?0:a.getTimezoneOffset(),C={d:u,dd:h(u),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:r+1,mm:h(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:h(B%12||12),H:B,HH:h(B),M:D,MM:h(D),s:F,ss:h(F),l:h(n,3),L:h(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<H?"-":"+")+h(100*Math.floor(Math.abs(H)/60)+Math.abs(H)%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 C?C[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 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.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(h){function n(){d.isVisible(h)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(h)||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(h)?"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(h,!d.isVisible(h));n();null!=a&&a(h)});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 h=null;if(match.index>g&&"%"==b.charAt(match.index-1))h=e.substring(1);else{var n=e.substring(1,e.length-1);if("id"==n)h=a.id;else if(0>n.indexOf("{"))for(var u=a;null==h&&null!=u;)null!=u.value&&"object"==typeof u.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(h=u.getAttribute(n+"_"+Graph.diagramLanguage)),
+null==h&&(h=u.hasAttribute(n)?null!=u.getAttribute(n)?u.getAttribute(n):"":null)),u=this.model.getParent(u);null==h&&(h=this.getGlobalVariable(n));null==h&&null!=f&&(h=f[n])}d.push(b.substring(g,match.index)+(null!=h?h: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.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 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 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,
+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 h=e.getIndex(b),n=g.getIndex(e);e=Math.max(d,n);b=Math.min(a,h);a=Math.max(a,h);h=[];for(d=Math.min(d,n);d<=e;d++){n=this.model.getChildAt(g,d);for(var u=b;u<=a;u++)h.push(this.model.getChildAt(n,u))}0<h.length&&(1<h.length||1<this.getSelectionCount()||
+!this.isCellSelected(h[0]))&&(this.setSelectionCells(h),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,
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,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 D=null,F=null;if(null!=d){d=d.reverse();for(var I=0;I<d.length;I++)if(!this.isCellLocked(d[I])&&!this.model.isEdge(d[I])&&d[I]!=a)if(!this.model.isAncestor(a,d[I])&&this.isContainer(d[I])&&(null==D||d[I]==this.model.getParent(a)))D=d[I];else if(null==F&&this.isCellConnectable(d[I])&&!this.model.isAncestor(d[I],a)&&!this.isSwimlane(d[I])){var C=this.view.getState(d[I]);null==x||null==C||mxUtils.intersects(x,C)||(F=d[I])}}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 R=[],S=F;F=D;g=mxUtils.bind(this,function(Q){if(null==k||null!=Q||null==F&&u){this.model.beginUpdate();try{if(null==S&&N){var aa=this.getAbsoluteParent(null!=Q?Q:a);aa=u?a:this.getCompositeParent(aa);S=null!=Q?Q:this.duplicateCells([aa],
-!1)[0];null!=Q&&this.addCells([S],this.model.getParent(a),null,null,null,!0);var U=this.getCellGeometry(S);null!=U&&(null!=Q&&"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!=D?(this.addCells([S],D,null,null,null,!0),F=null):N&&!u&&this.addCells([S],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(e)&&
-mxEvent.isShiftDown(e)&&N||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,S,this.createCurrentEdgeStyle());if(null!=P&&this.connectionHandler.insertBeforeSource){var X=null;for(Q=a;null!=Q.parent&&null!=Q.geometry&&Q.geometry.relative&&Q.parent!=P.parent;)Q=this.model.getParent(Q);null!=Q&&null!=Q.parent&&Q.parent==P.parent&&(X=Q.parent.getIndex(Q),this.model.add(Q.parent,P,X))}null==F&&null!=S&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(X=a.parent.getIndex(a),this.model.add(a.parent,
-S,X));null!=P&&R.push(P);null==F&&null!=S&&R.push(S);null==S&&null!=P&&P.geometry.setTerminalPoint(r,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{this.model.endUpdate()}}if(null!=n)n(R);else return R});if(null==k||null!=S||!N||null==F&&u)return g(S);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=Graph.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)),
+Graph.prototype.connectVertex=function(a,b,f,d,g,e,h,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 D=null,F=null;if(null!=e){e=e.reverse();for(var H=0;H<e.length;H++)if(!this.isCellLocked(e[H])&&!this.model.isEdge(e[H])&&e[H]!=a)if(!this.model.isAncestor(a,e[H])&&this.isContainer(e[H])&&(null==D||e[H]==this.model.getParent(a)))D=e[H];else if(null==F&&this.isCellConnectable(e[H])&&!this.model.isAncestor(e[H],a)&&!this.isSwimlane(e[H])){var C=this.view.getState(e[H]);null==x||null==C||mxUtils.intersects(x,C)||(F=e[H])}}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=[],T=F;F=D;g=mxUtils.bind(this,function(R){if(null==h||null!=R||null==F&&u){this.model.beginUpdate();try{if(null==T&&N){var ba=this.getAbsoluteParent(null!=R?R:a);ba=u?a:this.getCompositeParent(ba);T=null!=R?R:this.duplicateCells([ba],
+!1)[0];null!=R&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var S=this.getCellGeometry(T);null!=S&&(null!=R&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=S.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=S.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-S.width/2:r.x+S.width/2),S.x=r.x-S.width/2,S.y=r.y-S.height/2);null!=D?(this.addCells([T],D,null,null,null,!0),F=null):N&&!u&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(d)&&
+mxEvent.isShiftDown(d)&&N||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());if(null!=P&&this.connectionHandler.insertBeforeSource){var X=null;for(R=a;null!=R.parent&&null!=R.geometry&&R.geometry.relative&&R.parent!=P.parent;)R=this.model.getParent(R);null!=R&&null!=R.parent&&R.parent==P.parent&&(X=R.parent.getIndex(R),this.model.add(R.parent,P,X))}null==F&&null!=T&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(X=a.parent.getIndex(a),this.model.add(a.parent,
+T,X));null!=P&&Q.push(P);null==F&&null!=T&&Q.push(T);null==T&&null!=P&&P.geometry.setTerminalPoint(r,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{this.model.endUpdate()}}if(null!=n)n(Q);else return Q});if(null==h||null!=T||!N||null==F&&u)return g(T);h(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=Graph.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)),
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,a);this.replaceDefaultColor(b,mxConstants.STYLE_FILLCOLOR,a,f);this.replaceDefaultColor(b,mxConstants.STYLE_GRADIENTCOLOR,f,a);this.replaceDefaultColor(b,mxConstants.STYLE_STROKECOLOR,f,a);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BORDER,f,a);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BACKGROUND,
-a,f);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BORDERCOLOR,f,a);this.replaceDefaultColor(b,mxConstants.STYLE_SWIMLANE_FILLCOLOR,a,f);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,a,f)}return b};Graph.prototype.replaceDefaultColor=function(a,b,f,e){null!=a&&"default"==a[b]&&null!=f&&(a[b]=this.getDefaultColor(a,b,f,e))};Graph.prototype.getDefaultColor=function(a,b,f,e){b="default"+b.charAt(0).toUpperCase()+b.substring(1);"invert"==a[b]&&(f=e);return f};
-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,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)};
+a,f);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BORDERCOLOR,f,a);this.replaceDefaultColor(b,mxConstants.STYLE_SWIMLANE_FILLCOLOR,a,f);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,a,f)}return b};Graph.prototype.replaceDefaultColor=function(a,b,f,d){null!=a&&"default"==a[b]&&null!=f&&(a[b]=this.getDefaultColor(a,b,f,d))};Graph.prototype.getDefaultColor=function(a,b,f,d){b="default"+b.charAt(0).toUpperCase()+b.substring(1);"invert"==a[b]&&(f=d);return 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 h=this.view.getState(f[e]),n=this.getCellGeometry(f[e]);if(null!=h&&null!=n){var u=Math.round(n.width-h.width/this.view.scale),m=Math.round(n.height-h.height/this.view.scale);if(0!=m||0!=u){var r=this.model.getParent(f[e]),x=this.layoutManager.getLayout(r);
+null==x?null!=g&&this.isMoveCellsEvent(g,h)&&this.moveSiblings(h,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]),h=this.getCellGeometry(g[b]);null!=e&&null!=h&&(h=h.clone(),h.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],h))}}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),h=this.view.getState(a);null!=h&&null!=e&&(e=e.clone(),b.horizontal?e.width+=f+Math.min(0,h.width/this.view.scale-e.width):e.height+=d+Math.min(0,h.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.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 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.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.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,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=Graph.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++)(Graph.translateDiagram&&
-"label"==a[g].nodeName||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;">'+
+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=Graph.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++)(Graph.translateDiagram&&
+"label"==a[g].nodeName||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,h){return e.name<h.name?-1:e.name>h.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.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;
@@ -2683,81 +2687,81 @@ 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,
-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)};
+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)};
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 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.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.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 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")),
+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),h=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"});h(b,this.arrowRight);h(d,this.arrowLeft);h(g,this.arrowUp);h(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!=this.graph.freehand&&this.graph.freehand.isDrawing()||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!=
+HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||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,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,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)};
+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 h=this.cloneCell(b),n=this.getCellGeometry(h);null!=n&&(n.x+=e*d,n.y+=e*g);a.insert(h)}return a};
+Graph.prototype.createTable=function(a,b,f,d,g,e,h,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!=h?h:"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),h=0;h<e.length;h++)null!=b[g][h]&&(e[h].value=b[g][h]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,f,d,g,e,h,n,u){f=null!=f?f:120;d=null!=d?d:120;h=null!=h?h:"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;h=this.createVertex(null,
+null,"",0,e,b*f+e,d,h);g.insert(this.createParent(h,this.createVertex(null,null,"",e,0,f,d,n),b,f,0));return 1<a?(h.geometry.y=d+e,this.createParent(g,this.createParent(h,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),h=this.model.getChildCells(d[g],!0),n=this.getCellStyle(d[g],!0),u=null,m=[],r=0;r<h.length;r++){var x=this.getCellGeometry(h[r]),B={cell:h[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(h[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,h.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,h,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<h-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)};
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 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 D=this.graph.getCellGeometry(r[r.length-1]);null!=D&&(D=D.clone(),D.height=u-B+D.height,k.setGeometry(r[r.length-1],D))}var F=d?null:this.getRowLayout(r[0],m),I=[],C=b.y;for(x=0;x<r.length;x++)D=this.graph.getCellGeometry(r[x]),null!=D&&(D=D.clone(),D.x=b.x,D.width=m,D.y=Math.round(C),C=g||e?C+D.height:C+D.height/B*u,D.height=Math.round(C)-D.y,k.setGeometry(r[x],D)),n=Math.max(n,this.layoutRow(r[x],F,D.height,m,I));e&&u<B&&(f=f.clone(),f.height=C+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 R=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo;N.actual.geo.width+=R.width}N.actual.col==N.col&&(R=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo,N.actual.geo.height+=R.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x],
-!1)}finally{k.endUpdate()}}};
+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),h=d.getChildCells(e,!0);if(!f){var n=mxUtils.indexOf(h,a);if(n<h.length-1){var u=h[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==h[h.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),h=d.getChildCells(g,!0);a=mxUtils.indexOf(h,a);var n=a==h.length-1;d.beginUpdate();try{for(var u=d.getChildCells(e,!0),m=0;m<u.length;m++){g=u[m];h=d.getChildCells(g,!0);var r=h[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<h.length-1&&(r=h[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 h=this.graph.getCellGeometry(f[e]);null!=h&&(d+=(null!=h.alternateBounds?h.alternateBounds.width:h.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 h=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=h,h+=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 h=this.graph.getModel(),n=0;h.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=h.getChildCells(a,!0),x=0;x<r.length;x++)h.setVisible(r[x],!0);var B=this.getSize(r,!1);if(0<u&&0<m&&0<
+r.length&&0<B){if(g){var D=this.graph.getCellGeometry(r[r.length-1]);null!=D&&(D=D.clone(),D.height=u-B+D.height,h.setGeometry(r[r.length-1],D))}var F=e?null:this.getRowLayout(r[0],m),H=[],C=b.y;for(x=0;x<r.length;x++)D=this.graph.getCellGeometry(r[x]),null!=D&&(D=D.clone(),D.x=b.x,D.width=m,D.y=Math.round(C),C=g||d?C+D.height:C+D.height/B*u,D.height=Math.round(C)-D.y,h.setGeometry(r[x],D)),n=Math.max(n,this.layoutRow(r[x],F,D.height,m,H));d&&u<B&&(f=f.clone(),f.height=C+b.height,h.setGeometry(a,
+f));e&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,h.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(N){h.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++)h.setVisible(r[x],
+!1)}finally{h.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 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=
+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,D=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var F=function(fa,ra,K){var V=new mxPoint(ra,K);V.type=fa;D.push(V);V=null!=r.routedPoints?r.routedPoints[D.length-1]:null;return null==V||V.type!=
-fa||V.x!=ra||V.y!=K},I=.5*this.scale;B=!1;D=[];for(var C=0;C<x.length-1;C++){for(var N=x[C+1],R=x[C],S=[],Q=x[C+2];C<x.length-2&&mxUtils.ptSegDistSq(R.x,R.y,Q.x,Q.y,N.x,N.y)<1*this.scale*this.scale;)N=Q,C++,Q=x[C+2];B=F(0,R.x,R.y)||B;for(var aa=0;aa<this.validEdges.length;aa++){var U=this.validEdges[aa],P=U.absolutePoints;if(null!=P&&mxUtils.intersects(r,U)&&"1"!=U.style.noJump)for(U=0;U<P.length-1;U++){var X=P[U+1],ja=P[U];for(Q=P[U+2];U<P.length-2&&mxUtils.ptSegDistSq(ja.x,ja.y,Q.x,Q.y,X.x,X.y)<
-1*this.scale*this.scale;)X=Q,U++,Q=P[U+2];Q=mxUtils.intersection(R.x,R.y,N.x,N.y,ja.x,ja.y,X.x,X.y);if(null!=Q&&(Math.abs(Q.x-R.x)>I||Math.abs(Q.y-R.y)>I)&&(Math.abs(Q.x-N.x)>I||Math.abs(Q.y-N.y)>I)&&(Math.abs(Q.x-ja.x)>I||Math.abs(Q.y-ja.y)>I)&&(Math.abs(Q.x-X.x)>I||Math.abs(Q.y-X.y)>I)){X=Q.x-R.x;ja=Q.y-R.y;Q={distSq:X*X+ja*ja,x:Q.x,y:Q.y};for(X=0;X<S.length;X++)if(S[X].distSq>Q.distSq){S.splice(X,0,Q);Q=null;break}null==Q||0!=S.length&&S[S.length-1].x===Q.x&&S[S.length-1].y===Q.y||S.push(Q)}}}for(U=
-0;U<S.length;U++)B=F(1,S[U].x,S[U].y)||B}Q=x[x.length-1];B=F(0,Q.x,Q.y)||B}r.routedPoints=D;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 D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,F=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,N=null,R=null,S=[],Q=null;r.begin();for(var aa=0;aa<this.state.routedPoints.length;aa++){var U=this.state.routedPoints[aa],P=new mxPoint(U.x/this.scale,U.y/this.scale);0==aa?P=x[0]:aa==this.state.routedPoints.length-1&&(P=x[x.length-1]);var X=!1;if(null!=N&&1==U.type){var ja=this.state.routedPoints[aa+1];U=ja.x/this.scale-P.x;ja=ja.y/this.scale-P.y;U=U*U+ja*ja;null==Q&&(Q=new mxPoint(P.x-
-N.x,P.y-N.y),R=Math.sqrt(Q.x*Q.x+Q.y*Q.y),0<R?(Q.x=Q.x*F/R,Q.y=Q.y*F/R):Q=null);U>F*F&&0<R&&(U=N.x-P.x,ja=N.y-P.y,U=U*U+ja*ja,U>F*F&&(X=new mxPoint(P.x-Q.x,P.y-Q.y),U=new mxPoint(P.x+Q.x,P.y+Q.y),S.push(X),this.addPoints(r,S,B,D,!1,null,C),S=0>Math.round(Q.x)||0==Math.round(Q.x)&&0>=Math.round(Q.y)?1:-1,C=!1,"sharp"==I?(r.lineTo(X.x-Q.y*S,X.y+Q.x*S),r.lineTo(U.x-Q.y*S,U.y+Q.x*S),r.lineTo(U.x,U.y)):"line"==I?(r.moveTo(X.x+Q.y*S,X.y-Q.x*S),r.lineTo(X.x-Q.y*S,X.y+Q.x*S),r.moveTo(U.x-Q.y*S,U.y+Q.x*S),
-r.lineTo(U.x+Q.y*S,U.y-Q.x*S),r.moveTo(U.x,U.y)):"arc"==I?(S*=1.3,r.curveTo(X.x-Q.y*S,X.y+Q.x*S,U.x-Q.y*S,U.y+Q.x*S,U.x,U.y)):(r.moveTo(U.x,U.y),C=!0),S=[U],X=!0))}else Q=null;X||(S.push(P),N=P)}this.addPoints(r,S,B,D,!1,null,C);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,D){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,D){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,D);var F=this.getNextPoint(r,B,D),I=this.graph.isOrthogonal(r),C=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),N=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=C){var R=Math.cos(-C),S=Math.sin(-C);F=mxUtils.getRotatedPoint(F,R,S,N)}R=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);R+=parseFloat(r.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==C&&I,R);0!=C&&(R=Math.cos(C),S=Math.sin(C),F=mxUtils.getRotatedPoint(F,R,S,N));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,D,F){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=r)for(var I=0;I<r.length;I++){var C=this.graph.getConnectionPoint(x,
-r[I]);if(null!=C){var N=(C.x-F.x)*(C.x-F.x)+(C.y-F.y)*(C.y-F.y);if(null==D||N<D)B=C,D=N}}null!=B&&(F=B)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var D=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(D=B.state.view.graph.replacePlaceholders(B.state.cell,D));return D};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(r){if(null!=r.style&&"undefined"!==typeof pako){var x=
+fa||V.x!=ra||V.y!=K},H=.5*this.scale;B=!1;D=[];for(var C=0;C<x.length-1;C++){for(var N=x[C+1],Q=x[C],T=[],R=x[C+2];C<x.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,R.x,R.y,N.x,N.y)<1*this.scale*this.scale;)N=R,C++,R=x[C+2];B=F(0,Q.x,Q.y)||B;for(var ba=0;ba<this.validEdges.length;ba++){var S=this.validEdges[ba],P=S.absolutePoints;if(null!=P&&mxUtils.intersects(r,S)&&"1"!=S.style.noJump)for(S=0;S<P.length-1;S++){var X=P[S+1],ja=P[S];for(R=P[S+2];S<P.length-2&&mxUtils.ptSegDistSq(ja.x,ja.y,R.x,R.y,X.x,X.y)<
+1*this.scale*this.scale;)X=R,S++,R=P[S+2];R=mxUtils.intersection(Q.x,Q.y,N.x,N.y,ja.x,ja.y,X.x,X.y);if(null!=R&&(Math.abs(R.x-Q.x)>H||Math.abs(R.y-Q.y)>H)&&(Math.abs(R.x-N.x)>H||Math.abs(R.y-N.y)>H)&&(Math.abs(R.x-ja.x)>H||Math.abs(R.y-ja.y)>H)&&(Math.abs(R.x-X.x)>H||Math.abs(R.y-X.y)>H)){X=R.x-Q.x;ja=R.y-Q.y;R={distSq:X*X+ja*ja,x:R.x,y:R.y};for(X=0;X<T.length;X++)if(T[X].distSq>R.distSq){T.splice(X,0,R);R=null;break}null==R||0!=T.length&&T[T.length-1].x===R.x&&T[T.length-1].y===R.y||T.push(R)}}}for(S=
+0;S<T.length;S++)B=F(1,T[S].x,T[S].y)||B}R=x[x.length-1];B=F(0,R.x,R.y)||B}r.routedPoints=D;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 D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,F=(parseInt(mxUtils.getValue(this.style,
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,N=null,Q=null,T=[],R=null;r.begin();for(var ba=0;ba<this.state.routedPoints.length;ba++){var S=this.state.routedPoints[ba],P=new mxPoint(S.x/this.scale,S.y/this.scale);0==ba?P=x[0]:ba==this.state.routedPoints.length-1&&(P=x[x.length-1]);var X=!1;if(null!=N&&1==S.type){var ja=this.state.routedPoints[ba+1];S=ja.x/this.scale-P.x;ja=ja.y/this.scale-P.y;S=S*S+ja*ja;null==R&&(R=new mxPoint(P.x-
+N.x,P.y-N.y),Q=Math.sqrt(R.x*R.x+R.y*R.y),0<Q?(R.x=R.x*F/Q,R.y=R.y*F/Q):R=null);S>F*F&&0<Q&&(S=N.x-P.x,ja=N.y-P.y,S=S*S+ja*ja,S>F*F&&(X=new mxPoint(P.x-R.x,P.y-R.y),S=new mxPoint(P.x+R.x,P.y+R.y),T.push(X),this.addPoints(r,T,B,D,!1,null,C),T=0>Math.round(R.x)||0==Math.round(R.x)&&0>=Math.round(R.y)?1:-1,C=!1,"sharp"==H?(r.lineTo(X.x-R.y*T,X.y+R.x*T),r.lineTo(S.x-R.y*T,S.y+R.x*T),r.lineTo(S.x,S.y)):"line"==H?(r.moveTo(X.x+R.y*T,X.y-R.x*T),r.lineTo(X.x-R.y*T,X.y+R.x*T),r.moveTo(S.x-R.y*T,S.y+R.x*T),
+r.lineTo(S.x+R.y*T,S.y-R.x*T),r.moveTo(S.x,S.y)):"arc"==H?(T*=1.3,r.curveTo(X.x-R.y*T,X.y+R.x*T,S.x-R.y*T,S.y+R.x*T,S.x,S.y)):(r.moveTo(S.x,S.y),C=!0),T=[S],X=!0))}else R=null;X||(T.push(P),N=P)}this.addPoints(r,T,B,D,!1,null,C);r.stroke()}};var h=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,D){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),x.getCenterY()):h.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(r,x,B,D){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,D);var F=this.getNextPoint(r,B,D),H=this.graph.isOrthogonal(r),C=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),N=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=C){var Q=Math.cos(-C),T=Math.sin(-C);F=mxUtils.getRotatedPoint(F,Q,T,N)}Q=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);Q+=parseFloat(r.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==C&&H,Q);0!=C&&(Q=Math.cos(C),T=Math.sin(C),F=mxUtils.getRotatedPoint(F,Q,T,N));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,D,F),D)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,D,F){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);D=B=null;if(null!=r)for(var H=0;H<r.length;H++){var C=this.graph.getConnectionPoint(x,
+r[H]);if(null!=C){var N=(C.x-F.x)*(C.x-F.x)+(C.y-F.y)*(C.y-F.y);if(null==D||N<D)B=C,D=N}}null!=B&&(F=B)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var D=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(D=B.state.view.graph.replacePlaceholders(B.state.cell,D));return D};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),D=mxUtils.parseXml(Graph.decompress(B));return new mxShape(new mxStencil(D.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 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.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(h){null!=window.console&&console.log("error in getStencil:",a,f,b,g,h)}}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,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}}};
+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(h){null!=h&&null!=h.documentElement&&(mxStencilRegistry.packages[a]=h,e=!0,mxStencilRegistry.parseStencilSet(h.documentElement,b,e))}));return}g=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=g;e=!0}catch(h){null!=window.console&&console.log("error in loadStencilSet:",a,h)}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 h=d.getAttribute("w"),
+n=d.getAttribute("h");h=null==h?80:parseInt(h,10);n=null==n?80:parseInt(n,10);b(g,e,a,h,n)}}d=d.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 e=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return e.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 d=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return d.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 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(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];
+return t};mxConnectionHandler.prototype.updatePreview=function(t){};var h=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var t=h.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 G=this.model.getChildCount(E),
@@ -2846,7 +2850,7 @@ function(){if(!this.isEditing()){var ka=mxUtils.getScrollOrigin();this.popupMenu
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(G){A||window.getSelection().containsNode(G,!0)?(G.removeAttribute("align"),G.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 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 I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(t,z){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};
+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 H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(t,z){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};
mxCellEditor.prototype.escapeCancelsEditing=!1;var C=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(t,z){t=this.graph.getStartEditingCell(t,z);C.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(G,L){L.originalNode=G;G=G.firstChild;for(var Y=L.firstChild;null!=G&&null!=Y;)z(G,Y),G=G.nextSibling,Y=Y.nextSibling;return L}function A(G,L){if(null!=G)if(L.originalNode!=G)E(G);else for(G=
G.firstChild,L=L.firstChild;null!=G;){var Y=G.nextSibling;null==L?E(G):(A(G,L),L=L.nextSibling);G=Y}}function E(G){for(var L=G.firstChild;null!=L;){var Y=L.nextSibling;E(L);L=Y}1==G.nodeType&&("BR"===G.nodeName||null!=G.firstChild)||3==G.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(G)).length?(3==G.nodeType&&mxUtils.setTextContent(G,mxUtils.getTextContent(G).replace(/\n|\r/g,"")),1==G.nodeType&&(G.removeAttribute("style"),G.removeAttribute("class"),G.removeAttribute("width"),G.removeAttribute("cellpadding"),
@@ -2856,19 +2860,19 @@ ea=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTS
0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&Y.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&Y.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=Y.join(" ");this.textarea.style.fontWeight=G?"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 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!=ha&&(this.textarea.innerHTML=ha);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var R=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(t,
+"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 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=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="",R.apply(this,arguments)};mxCellEditorGetInitialValue=
+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"==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 S=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};
-var Q=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate();try{Q.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||
+"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 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 R=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate();try{R.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 aa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){aa.apply(this,arguments);var A=this.graph.getCellStyle(t);
-if(null==A.childLayout){var E=this.graph.model.getParent(t),G=null!=E?this.graph.getCellGeometry(E):null;if(null!=G&&(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 Y=this.graph.getActualStartSize(E);G=G.clone();A?G.height=z.height+Y.y+Y.height+2*L:G.width=z.width+Y.x+Y.width+2*L;this.graph.model.setGeometry(E,G)}}};var U=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
-mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ha){A.get(ha)||(A.put(ha,!0),G.push(ha))}for(var z=U.apply(this,arguments),A=new mxDictionary,E=this.graph.model,G=[],L=0;L<z.length;L++){var Y=z[L];this.graph.isTableCell(Y)?t(E.getParent(E.getParent(Y))):this.graph.isTableRow(Y)&&t(E.getParent(Y));t(Y)}return G};var P=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=P.apply(this,arguments);z.stroke=
+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 ba=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){ba.apply(this,arguments);var A=this.graph.getCellStyle(t);
+if(null==A.childLayout){var E=this.graph.model.getParent(t),G=null!=E?this.graph.getCellGeometry(E):null;if(null!=G&&(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 Y=this.graph.getActualStartSize(E);G=G.clone();A?G.height=z.height+Y.y+Y.height+2*L:G.width=z.width+Y.x+Y.width+2*L;this.graph.model.setGeometry(E,G)}}};var S=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
+mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ha){A.get(ha)||(A.put(ha,!0),G.push(ha))}for(var z=S.apply(this,arguments),A=new mxDictionary,E=this.graph.model,G=[],L=0;L<z.length;L++){var Y=z[L];this.graph.isTableCell(Y)?t(E.getParent(E.getParent(Y))):this.graph.isTableRow(Y)&&t(E.getParent(Y));t(Y)}return G};var P=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=P.apply(this,arguments);z.stroke=
"#C0C0C0";z.strokewidth=1;return z};var X=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(t){var z=X.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 ja=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ja.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 fa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return fa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ra=mxVertexHandler.prototype.isCustomHandleVisible;
@@ -2880,7 +2884,7 @@ ka=this.state.origin.y+E.view.translate.y;null==t&&(t=[]);var wa=E.view.getCellS
E.getCellAt(Na.getGraphX(),Na.getGraphY())||Y.cell;E.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ha.reset=function(){Oa=0};t.push(Ha)})(G);for(G=0;G<za.length;G++)mxUtils.bind(this,function(Ma){var Ha=E.view.getState(za[Ma]),Fa=E.getCellGeometry(za[Ma]),Ga=null!=Fa.alternateBounds?Fa.alternateBounds:Fa;null==Ha&&(Ha=new mxCellState(E.view,za[Ma],E.getCellStyle(za[Ma])),Ha.x=Y.x+Fa.x*L,Ha.y=Y.y+Fa.y*L,Ha.width=Ga.width*L,Ha.height=Ga.height*L,Ha.updateCachedBounds());Fa=Ma<za.length-1?za[Ma+1]:null;
Fa=null!=Fa?E.getCellGeometry(Fa):null;var Oa=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Da[Ma]?new V(Da[Ma],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Fa.isDashed=ha.isDashed;Fa.svgStrokeTolerance++;Ha=new mxHandle(Ha,"col-resize",null,Fa);Ha.tableHandle=!0;var Pa=0;Ha.shape.node.parentNode.insertBefore(Ha.shape.node,Ha.shape.node.parentNode.firstChild);Ha.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==
V)this.shape.line=z(Da[Ma],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=E.getActualStartSize(Y.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ga.width+Pa)*L;this.shape.bounds.y=Y.y+(Ma==za.length-1?0:Sa.y*L);this.shape.bounds.height=Y.height-(Ma==za.length-1?0:(Sa.height+Sa.y)*L)}this.shape.redraw()}};var Na=!1;Ha.setPosition=function(Sa,eb,bb){Pa=Math.max(Graph.minTableColumnWidth-Ga.width,eb.x-Sa.x-Ga.width);Na=mxEvent.isShiftDown(bb.getEvent());null==Oa||Na||(Pa=Math.min(Pa,
-Oa.width-Graph.minTableColumnWidth))};Ha.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())||Y.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ha.positionChanged=function(){};Ha.reset=function(){Pa=0};t.push(Ha)})(G)}}return null!=t?t.reverse():null};var T=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){T.apply(this,arguments);if(null!=
+Oa.width-Graph.minTableColumnWidth))};Ha.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())||Y.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ha.positionChanged=function(){};Ha.reset=function(){Pa=0};t.push(Ha)})(G)}}return null!=t?t.reverse():null};var U=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){U.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(G){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(G)&&this.graph.isCellSelected(A.cell)||this.graph.selectCellForEvent(A.cell,
G);mxEvent.isPopupTrigger(G)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(G),mxEvent.getClientY(G),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(G),this.graph.isMouseDown=!0);mxEvent.consume(G)}),null,mxUtils.bind(this,function(G){mxEvent.isPopupTrigger(G)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(G),mxEvent.getClientY(G),A.cell,G),mxEvent.consume(G))}));this.moveHandles.push(E);this.graph.container.appendChild(E)}})(this.graph.view.getState(t.getChildAt(this.state.cell,
@@ -2888,7 +2892,7 @@ z)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){
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 G=this.customHandles[E].shape.bounds,L=G.getCenterX(),Y=G.getCenterY();if(Math.abs(this.state.x-L)<G.width/2||Math.abs(this.state.y-Y)<G.height/2||Math.abs(this.state.x+this.state.width-L)<G.width/2||Math.abs(this.state.y+this.state.height-Y)<G.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=J.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 ia=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
+mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var aa=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(t,z){aa.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 ia=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
function(t,z){ia.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,G=this.roundLength(z.x/E-A.x);A=this.roundLength(z.y/E-A.y);E=this.graph.view.unit;this.hint.innerHTML=b(G,E)+", "+b(A,E);this.hint.style.visibility="visible";if(this.isSource||
this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(G=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*G.x)+"%, "+Math.round(100*G.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(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"/>');
@@ -2953,185 +2957,189 @@ 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&&(f[0].className="geIcon geAdaptiveAsset",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.rounded=!1;Format.prototype.curved=!1;
-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",
+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",
this.update);a.addListener("darkModeChanged",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 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(D){D.preventDefault()}));var g=a.getSelectionState(),d=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(D,F,I,C){var N=mxUtils.bind(this,function(R){k!=D&&(d?this.labelIndex=I:b.isSelectionEmpty()?this.diagramIndex=I:this.currentIndex=I,null!=k&&(k.style.backgroundColor=
-Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=D,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(D,"click",N);mxEvent.addListener(D,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(C&&null==k||I==(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("format").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=
+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(D){D.preventDefault()}));var g=a.getSelectionState(),e=g.containsLabel,h=null,n=null,u=mxUtils.bind(this,function(D,F,H,C){var N=mxUtils.bind(this,function(Q){h!=D&&(e?this.labelIndex=H:b.isSelectionEmpty()?this.diagramIndex=H:this.currentIndex=H,null!=h&&(h.style.backgroundColor=
+Format.inactiveTabBackgroundColor,h.style.borderBottomWidth="1px"),h=D,h.style.backgroundColor="",h.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(D,"click",N);mxEvent.addListener(D,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Q){Q.preventDefault()}));(C&&null==h||H==(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("format").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=
"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,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(D){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 I=u.getSelectionState().cells;m.setCellStyles(b,F,I);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(I,function(N){N.style.fontSize=F+"px";N.removeAttribute("size")});for(var C=0;C<I.length;C++)0==m.model.getChildCount(I[C])&&m.autoSizeCell(I[C],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",I))}finally{m.getModel().endUpdate()}}a.value=
-F+d;mxEvent.consume(D)});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,d,g,e,h,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(D){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(d,isNaN(F)?f:F));if(m.cellEditor.isContentEditing()&&h)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),h(F),a.value=F+e,
+x=!1);else if(F!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var H=u.getSelectionState().cells;m.setCellStyles(b,F,H);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(H,function(N){N.style.fontSize=F+"px";N.removeAttribute("size")});for(var C=0;C<H.length;C++)0==m.model.getChildCount(H[C])&&m.autoSizeCell(H[C],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",H))}finally{m.getModel().endUpdate()}}a.value=
+F+e;mxEvent.consume(D)});h&&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(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 D=k?parseFloat(a.value):parseInt(a.value);isNaN(D)||(a.value=D-(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 D=k?parseFloat(a.value):parseInt(a.value);isNaN(D)||(a.value=D+(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(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 h=this.addAction(a,b[e]);null!=h&&(g++,0==mxUtils.mod(g,2)&&(d.style.marginRight="2px",d.style.width="104px",h.style.width="104px",f.parentNode.removeChild(f)),f=mxUtils.br(a),d=h)}return g};
+BaseFormatPanel.prototype.createStepper=function(a,b,f,d,g,e,h){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 D=h?parseFloat(a.value):parseInt(a.value);isNaN(D)||(a.value=D-(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 D=h?parseFloat(a.value):parseInt(a.value);isNaN(D)||(a.value=D+(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(D){}x=null;mxEvent.consume(B)}})}else mxEvent.addListener(u,"click",function(B){mxEvent.consume(B)});return u};
-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 D=null!=u?u:m.getSelectionState().cells;B=B?e:g;r.setCellStyles(b,B,D);null!=d&&d(D,B);m.fireEvent(new mxEventObject("styleChanged",
+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 h=document.createElement("input");h.setAttribute("type","checkbox");h.style.margin="1px 6px 0px 0px";h.style.verticalAlign="top";e.appendChild(h);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?(h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0):(h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1),m!=x&&(m=x,b()!=m&&f(m,B)),u=!1)};mxEvent.addListener(e,"click",function(x){if("disabled"!=h.getAttribute("disabled")){var B=mxEvent.getSource(x);if(B==e||B==n)h.checked=!h.checked;r(h.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,h,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!=h)h.funct();else{r.getModel().beginUpdate();try{var D=null!=u?u:m.getSelectionState().cells;B=B?d:g;r.setCellStyles(b,B,D);null!=e&&e(D,B);m.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[B],"cells",D))}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,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,D=null,F=function(C,N,R){if(!B){var S="null"==e?null:e;B=!0;C=/(^#?[a-zA-Z0-9]*$)/.test(C)?C:S;S=null!=C&&C!=mxConstants.NONE?C:S;var Q=document.createElement("div");Q.style.width="36px";Q.style.height="12px";Q.style.margin="3px";Q.style.border="1px solid black";Q.style.backgroundColor="default"==S?n:S;D.innerText="";D.appendChild(Q);null!=C&&C!=mxConstants.NONE&&1<C.length&&"string"===typeof C&&(S="#"==C.charAt(0)?C.substring(1).toUpperCase():C,S=ColorDialog.prototype.colorNames[S],D.setAttribute("title",
-null!=S?S+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=C&&C!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);D.style.display=m.checked||k?"":"none";null!=d&&d("null"==C?null:C);x=C;N||(R||k||b()!=x)&&f("null"==x?null:x,x);B=!1}},I=document.createElement("input");I.setAttribute("type","color");I.style.visibility="hidden";I.style.width="0px";I.style.height="0px";I.style.border=
-"none";u.appendChild(I);D=mxUtils.button("",mxUtils.bind(this,function(C){var N=x;"default"==N&&(N=n);!mxEvent.isShiftDown(C)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(N,function(R){F(R,null,!0)},n):(I.value=N,I.click(),mxEvent.addListener(I,"input",function(){F(I.value,null,!0)}));mxEvent.consume(C)}));D.style.position="absolute";D.style.marginTop="-3px";D.style.left="178px";D.style.height="22px";D.className="geColorBtn";D.style.display=m.checked||k?"":"none";u.appendChild(D);a=null!=
-x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];D.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(C){C=mxEvent.getSource(C);if(C==m||"INPUT"!=C.nodeName)C!=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,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.createColorOption=function(a,b,f,d,g,e,h,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";h||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(),
+B=!1,D=null,F=function(C,N,Q){if(!B){var T="null"==d?null:d;B=!0;C=/(^#?[a-zA-Z0-9]*$)/.test(C)?C:T;T=null!=C&&C!=mxConstants.NONE?C:T;var R=document.createElement("div");R.style.width="36px";R.style.height="12px";R.style.margin="3px";R.style.border="1px solid black";R.style.backgroundColor="default"==T?n:T;D.innerText="";D.appendChild(R);null!=C&&C!=mxConstants.NONE&&1<C.length&&"string"===typeof C&&(T="#"==C.charAt(0)?C.substring(1).toUpperCase():C,T=ColorDialog.prototype.colorNames[T],D.setAttribute("title",
+null!=T?T+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=C&&C!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);D.style.display=m.checked||h?"":"none";null!=e&&e("null"==C?null:C);x=C;N||(Q||h||b()!=x)&&f("null"==x?null:x,x);B=!1}},H=document.createElement("input");H.setAttribute("type","color");H.style.visibility="hidden";H.style.width="0px";H.style.height="0px";H.style.border=
+"none";u.appendChild(H);D=mxUtils.button("",mxUtils.bind(this,function(C){var N=x;"default"==N&&(N=n);!mxEvent.isShiftDown(C)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(N,function(Q){F(Q,null,!0)},n):(H.value=N,H.click(),mxEvent.addListener(H,"input",function(){F(H.value,null,!0)}));mxEvent.consume(C)}));D.style.position="absolute";D.style.marginTop="-3px";D.style.left="178px";D.style.height="22px";D.className="geColorBtn";D.style.display=m.checked||h?"":"none";u.appendChild(D);a=null!=
+x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];D.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(C){C=mxEvent.getSource(C);if(C==m||"INPUT"!=C.nodeName)C!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||d==mxConstants.NONE||(d=x),F(m.checked?d:mxConstants.NONE)});F(x,!0);null!=g&&(g.install(F),this.listeners.push(g));return u};
+BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,d,g,e){var h=this.editorUi,n=h.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(h.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=h.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);h.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(h.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,h,n,u){h=null!=h?h: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=h-2+"px";d.style.left=228-f+"px";a.appendChild(d);return b};
+BaseFormatPanel.prototype.addGenericInput=function(a,b,f,d,g,e){var h=this.editorUi.editor.graph,n=function(){e(u.value)},u=this.addUnitInput(a,b,f,d,n),m=mxUtils.bind(this,function(r,x,B){if(B||u!=document.activeElement)u.value=g()+b});mxEvent.addListener(u,"keydown",function(r){13==r.keyCode?(h.container.focus(),mxEvent.consume(r)):27==r.keyCode&&(m(null,null,!0),h.container.focus(),mxEvent.consume(r))});h.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){h.getModel().removeListener(m)}});
+m();mxEvent.addListener(u,"blur",n);mxEvent.addListener(u,"change",n);return u};
+BaseFormatPanel.prototype.createRelativeOption=function(a,b,f,d,g){f=null!=f?f:52;var e=this.editorUi,h=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=h.view.getState(e.getSelectionState().cells[0]);null!=B&&x!=mxUtils.getValue(B.style,b,100)&&(100==x&&(x=null),B=e.getSelectionState().cells,
+h.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?(h.container.focus(),mxEvent.consume(r)):
+27==r.keyCode&&(m(null,null,!0),h.container.focus(),mxEvent.consume(r))});h.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){h.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);return 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,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=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","spacingCheckbox");f.style.margin="1px 6px 6px 0px";f.style.verticalAlign="top";a.appendChild(f);var e=document.createElement("label");e.style.verticalAlign="top";e.setAttribute("for","spacingCheckbox");e.style.userSelect=
-"none";mxUtils.write(e,mxResources.get("spacing"));a.appendChild(e);mxUtils.br(a);e=mxUtils.button(mxResources.get("horizontal"),function(g){b.distributeCells(!0,null,f.checked)});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.distributeCells(!1,null,f.checked)});e.setAttribute("title",mxResources.get("vertical"));e.style.width="104px";a.appendChild(e);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};
+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 h=d.table||d.row||d.cell,n=f.isStack(e)||f.isStackChild(e),u=h;n&&(h="0"==(f.isStack(e)?d.style:f.getCellStyle(f.model.getParent(e))).horizontalStack,u=!h);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)]));h&&(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 h=null;null!=b.copiedValue&&
+0<d.cells.length&&(h=mxUtils.button(mxResources.get("pasteData"),function(n){b.actions.get("pasteData").funct(n)}),h.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),h.style.marginBottom="2px",h.style.width="210px",a.appendChild(h),g++,null!=e&&(e.style.width="104px",h.style.width="104px",h.style.marginBottom="2px",e.style.marginBottom="2px",e.style.marginRight="2px"));null==e&&null==h||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),h=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,h,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=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","spacingCheckbox");f.style.margin="1px 6px 6px 0px";f.style.verticalAlign="top";a.appendChild(f);var d=document.createElement("label");d.style.verticalAlign="top";d.setAttribute("for","spacingCheckbox");d.style.userSelect=
+"none";mxUtils.write(d,mxResources.get("spacing"));a.appendChild(d);mxUtils.br(a);d=mxUtils.button(mxResources.get("horizontal"),function(g){b.distributeCells(!0,null,f.checked)});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.distributeCells(!1,null,f.checked)});d.setAttribute("title",mxResources.get("vertical"));d.style.width="104px";a.appendChild(d);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,h=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(){h.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+"°"});h=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};
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,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(){D.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,R);this.addKeyHandler(m,R);var D=this.addGeometryHandler(u,function(U,P,X){if(e.isTableCell(X))return e.setTableColumnWidth(X,P-U.width,!0),!0;0<U.width&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(U.height=Math.round(U.height*P*100/U.width)/100),U.width=P)});var F=this.addGeometryHandler(m,function(U,
-P,X){e.isTableCell(X)&&(X=e.model.getParent(X));if(e.isTableRow(X))return e.setTableRowHeight(X,P-U.height),!0;0<U.height&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(U.width=Math.round(U.width*P*100/U.height)/100),U.height=P)});(d.resizable||d.row||d.cell)&&a.appendChild(k);var I=this.createPanel();I.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"));
-I.appendChild(n);var C=this.addUnitInput(I,this.getUnit(),87,52,function(){S.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),N=this.addUnitInput(I,this.getUnit(),16,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(I);this.addLabel(I,mxResources.get("left"),87);this.addLabel(I,mxResources.get("top"),16);var R=mxUtils.bind(this,function(U,P,X){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(X||document.activeElement!=u)u.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(X||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){I.style.display="";if(X||document.activeElement!=C)C.value=this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(X||document.activeElement!=N)N.value=this.inUnit(d.y)+
-(""==d.y?"":" "+this.getUnit())}else I.style.display="none"});this.addKeyHandler(C,R);this.addKeyHandler(N,R);g.addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){g.removeListener(R)}});R();var S=this.addGeometryHandler(C,function(U,P){P=b.fromUnit(P);U.relative?U.offset.x=P:U.x=P});var Q=this.addGeometryHandler(N,function(U,P){P=b.fromUnit(P);U.relative?U.offset.y=P:U.y=P});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))){var aa=e.getCellGeometry(d.vertices[0]);
-null!=aa&&aa.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(U){g.beginUpdate();try{aa=aa.clone(),aa.x=0,aa.y=0,aa.offset=new mxPoint,g.setGeometry(d.vertices[0],aa)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(I),mxUtils.br(I),I.appendChild(n))}a.appendChild(I)}};
-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(S){var Q=parseInt(k.value);Q=Math.min(999,
-Math.max(1,isNaN(Q)?1:Q));if(Q!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var aa=b.getSelectionState().cells;f.setCellStyles("width",Q,aa);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[Q],"cells",aa))}k.value=Q+" pt";mxEvent.consume(S)});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(){I.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){C.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)}),D=this.addUnitInput(x,"pt",16,52,function(){R.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(D,F);var F=mxUtils.bind(this,function(S,Q,aa){e=b.getSelectionState();
-S=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(g.style.display="",aa||document.activeElement!=k)aa=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=aa+" pt"}else g.style.display="none";1==e.cells.length&&f.model.isEdge(S)?(aa=f.model.getGeometry(S),null!=aa.sourcePoint&&null==f.model.getTerminal(S,!0)?(m.value=aa.sourcePoint.x,r.value=aa.sourcePoint.y):u.style.display="none",null!=aa.targetPoint&&null==f.model.getTerminal(S,
-!1)?(B.value=aa.targetPoint.x,D.value=aa.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var I=this.addEdgeGeometryHandler(m,function(S,Q){S.sourcePoint.x=Q});var C=this.addEdgeGeometryHandler(r,function(S,Q){S.sourcePoint.y=Q});var N=this.addEdgeGeometryHandler(B,function(S,Q){S.targetPoint.x=Q});var R=this.addEdgeGeometryHandler(D,function(S,Q){S.targetPoint.y=Q});f.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){f.getModel().removeListener(F)}});
+ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,d=f.editor.graph,g=d.getModel(),e=f.getSelectionState(),h=this.createPanel();h.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"));h.appendChild(n);var u=this.addUnitInput(h,this.getUnit(),87,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
+m=this.addUnitInput(h,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()});h.appendChild(r);e.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(h,mxResources.get("width"),87);this.addLabel(h,mxResources.get("height"),16);mxUtils.br(h);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":h.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(u,T);this.addKeyHandler(m,T);var D=this.addGeometryHandler(u,function(S,P,X){if(d.isTableCell(X))return d.setTableColumnWidth(X,P-S.width,!0),!0;0<S.width&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(S.height=Math.round(S.height*P*100/S.width)/100),S.width=P)});var F=this.addGeometryHandler(m,function(S,
+P,X){d.isTableCell(X)&&(X=d.model.getParent(X));if(d.isTableRow(X))return d.setTableRowHeight(X,P-S.height),!0;0<S.height&&(P=Math.max(1,b.fromUnit(P)),B.checked&&(S.width=Math.round(S.width*P*100/S.height)/100),S.height=P)});(e.resizable||e.row||e.cell)&&a.appendChild(h);var H=this.createPanel();H.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"));
+H.appendChild(n);var C=this.addUnitInput(H,this.getUnit(),87,52,function(){R.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),N=this.addUnitInput(H,this.getUnit(),16,52,function(){ba.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(H);if(e.movable){if(0==e.edges.length&&1==e.vertices.length){var Q=d.getCellGeometry(e.vertices[0]);null!=Q&&Q.relative&&(mxUtils.br(H),n=document.createElement("div"),n.style.position="absolute",n.style.width="70px",
+n.style.marginTop="0px",mxUtils.write(n,mxResources.get("relative")),H.appendChild(n),this.addGenericInput(H,"%",87,52,function(){return Math.round(1E3*Q.x)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{Q=Q.clone(),Q.x=parseFloat(S)/100,g.setGeometry(e.vertices[0],Q)}finally{g.endUpdate()}}}),this.addGenericInput(H,"%",16,52,function(){return Math.round(1E3*Q.y)/10},function(S){S=parseFloat(S);if(!isNaN(S)){g.beginUpdate();try{Q=Q.clone(),Q.y=parseFloat(S)/100,g.setGeometry(e.vertices[0],
+Q)}finally{g.endUpdate()}}}),mxUtils.br(H))}a.appendChild(H)}this.addLabel(H,mxResources.get("left"),87).style.marginTop="8px";this.addLabel(H,mxResources.get("top"),16).style.marginTop="8px";var T=mxUtils.bind(this,function(S,P,X){e=f.getSelectionState();if(e.containsLabel||e.vertices.length!=d.getSelectionCount()||null==e.width||null==e.height)h.style.display="none";else{h.style.display="";if(X||document.activeElement!=u)u.value=this.inUnit(e.width)+(""==e.width?"":" "+this.getUnit());if(X||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){H.style.display="";if(X||document.activeElement!=C)C.value=this.inUnit(e.x)+(""==e.x?"":" "+this.getUnit());if(X||document.activeElement!=N)N.value=this.inUnit(e.y)+(""==e.y?"":" "+this.getUnit())}else H.style.display="none"});this.addKeyHandler(C,T);this.addKeyHandler(N,T);g.addListener(mxEvent.CHANGE,T);this.listeners.push({destroy:function(){g.removeListener(T)}});
+T();var R=this.addGeometryHandler(C,function(S,P){P=b.fromUnit(P);S.relative?S.offset.x=P:S.x=P});var ba=this.addGeometryHandler(N,function(S,P){P=b.fromUnit(P);S.relative?S.offset.y=P:S.y=P});e.movable&&(0==e.edges.length&&1==e.vertices.length&&g.isEdge(g.getParent(e.vertices[0]))&&(Q=d.getCellGeometry(e.vertices[0]),null!=Q&&Q.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(S){g.beginUpdate();try{Q=Q.clone(),Q.x=0,Q.y=0,Q.offset=new mxPoint,g.setGeometry(e.vertices[0],
+Q)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="134px",n.style.left="89px",n.style.position="absolute",mxUtils.br(H),mxUtils.br(H),H.appendChild(n))),a.appendChild(H))};
+ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=e+" "+h.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+" "+h.getUnit()}}mxEvent.consume(n)}var d=this.editorUi,g=d.editor.graph,e=null,h=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(h){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(h)}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 h=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(h,F);var n=mxUtils.bind(this,function(T){var R=parseInt(h.value);R=Math.min(999,
+Math.max(1,isNaN(R)?1:R));if(R!=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var ba=b.getSelectionState().cells;f.setCellStyles("width",R,ba);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[R],"cells",ba))}h.value=R+" pt";mxEvent.consume(T)});mxEvent.addListener(h,"blur",n);mxEvent.addListener(h,"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(){H.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){C.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";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)}),D=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,F);this.addKeyHandler(D,F);var F=mxUtils.bind(this,function(T,R,ba){d=b.getSelectionState();
+T=d.cells[0];if("link"==d.style.shape||"flexArrow"==d.style.shape){if(g.style.display="",ba||document.activeElement!=h)ba=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),h.value=ba+" pt"}else g.style.display="none";1==d.cells.length&&f.model.isEdge(T)?(ba=f.model.getGeometry(T),null!=ba.sourcePoint&&null==f.model.getTerminal(T,!0)?(m.value=ba.sourcePoint.x,r.value=ba.sourcePoint.y):u.style.display="none",null!=ba.targetPoint&&null==f.model.getTerminal(T,
+!1)?(B.value=ba.targetPoint.x,D.value=ba.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var H=this.addEdgeGeometryHandler(m,function(T,R){T.sourcePoint.x=R});var C=this.addEdgeGeometryHandler(r,function(T,R){T.sourcePoint.y=R});var N=this.addEdgeGeometryHandler(B,function(T,R){T.targetPoint.x=R});var Q=this.addEdgeGeometryHandler(D,function(T,R){T.targetPoint.y=R});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(ca,t){ca.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(ca){return function(){return ca()}},D=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,ca);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(ca){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);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),I=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
-ca);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([D,F,I]);if(e.cellEditor.isContentEditing()){var C=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([C]);C.firstChild.style.background=
+TextFormatPanel.prototype.addFont=function(a){function b(ca,t){ca.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 h=e.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",h,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(h)}a.appendChild(e);
+h=this.createPanel();h.style.marginTop="8px";h.style.borderTop="1px solid #c0c0c0";h.style.paddingTop="6px";h.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(ca){return function(){return ca()}},D=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,ca);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"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);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),H=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
+ca);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([D,F,H]);if(d.cellEditor.isContentEditing()){var C=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([C]);C.firstChild.style.background=
"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
-C.firstChild.style.backgroundPosition="2px 2px";C.firstChild.style.backgroundSize="18px 18px";this.styleButtons([C])}var N=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),R=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),S=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,R,S]);a.appendChild(x);var Q,aa,U,P,X;if(e.cellEditor.isContentEditing()){N.style.display="none";R.style.display="none";S.style.display="none";r.style.display="none";var ja=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ja.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ja.style.marginRight=
-"9px";ja.style.opacity=1;this.styleButtons([ja,Q=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),aa=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);Q.style.marginLeft="10px";B=x.cloneNode(!1);B.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
+C.firstChild.style.backgroundPosition="2px 2px";C.firstChild.style.backgroundSize="18px 18px";this.styleButtons([C])}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),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,Q,T]);a.appendChild(x);var R,ba,S,P,X;if(d.cellEditor.isContentEditing()){N.style.display="none";Q.style.display="none";T.style.display="none";r.style.display="none";var ja=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ja.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ja.style.marginRight=
+"9px";ja.style.opacity=1;this.styleButtons([ja,R=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),ba=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);R.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(){e.cellEditor.toggleViewMode()},B)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(B)}else m[2].style.marginRight="12px",I.style.marginRight="12px";x=d.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom=
+!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",H.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 fa=document.createElement("select");fa.style.position="absolute";fa.style.left="126px";fa.style.width="98px";fa.style.border="1px solid rgb(160, 160, 160)";fa.style.borderRadius="4px";fa.style.marginTop="-2px";C="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var ra={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<C.length;B++){var K=document.createElement("option");K.setAttribute("value",C[B]);mxUtils.write(K,mxResources.get(C[B]));fa.appendChild(K)}x.appendChild(fa);C=d.cloneNode(!1);C.style.marginLeft="0px";C.style.paddingTop=
-"4px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("writingDirection"));var V=document.createElement("select");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.left="126px";V.style.width="98px";V.style.borderRadius="4px";V.style.marginTop="-2px";K=["automatic","leftToRight","rightToLeft"];var O={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<K.length;B++){var T=
-document.createElement("option");T.setAttribute("value",K[B]);mxUtils.write(T,mxResources.get(K[B]));V.appendChild(T)}C.appendChild(V);e.isEditing()||(a.appendChild(x),mxEvent.addListener(fa,"change",function(ca){e.getModel().beginUpdate();try{var t=ra[fa.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(ca)}),a.appendChild(C),mxEvent.addListener(V,"change",function(ca){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,O[V.value],g.cells);mxEvent.consume(ca)}));var J=document.createElement("input");J.style.position="absolute";J.style.border="1px solid rgb(160, 160, 160)";J.style.textAlign="right";J.style.marginTop="4px";J.style.left="161px";J.style.width="53px";J.style.borderRadius="4px";J.style.height="23px";J.style.boxSizing="border-box";
-n.appendChild(J);var ba=null;x=this.installInputHandler(J,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(G,L){null!=e.cellEditor.textarea&&G!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(G)&&(L||z.containsNode(G,!0))&&("FONT"==G.nodeName?(G.removeAttribute("size"),G.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(G).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(G.parentNode).fontSize!=
-ca+"px"?G.style.fontSize=ca+"px":G.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"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])}J.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(G,L){for(;null!=L;){if(L===G)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=ca,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(){J.value=ba+" pt";ba=null},0);break}},!0);x=this.createStepper(J,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=J.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var ia=null,na=e.shapeBackgroundColor,W=null,da=e.shapeForegroundColor,sa=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
-function(){return na},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},e.shapeBackgroundColor,{install:function(ca){ia=ca},destroy:function(){ia=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){e.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
-null})},e.shapeBackgroundColor);sa.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 da},function(ca){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,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells));ca=e.cellEditor.textarea.getElementsByTagName("font");for(A=0;A<ca.length;A++)if(A>=z.length||ca[A]!=z[A].node||ca[A]==z[A].node&&ca[A].getAttribute("color")!=z[A].color){z=ca[A].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
-null!=z.firstChild){ca[A].parentNode.insertBefore(z,ca[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;ca[A].appendChild(t);t=E}z.appendChild(ca[A])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:e.shapeForegroundColor,{install:function(ca){W=ca},destroy:function(){W=null}},
-null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){sa.style.display=ca==mxConstants.NONE?"none":"";ta.style.display=sa.style.display},function(ca){ca==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,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(sa);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(ca){var t=e.view.getState(ca);return null==t||e.isAutoSizeState(t)||e.getModel().isEdge(ca)||!e.isTableRow(ca)&&!e.isTableCell(ca)&&!e.isCellResizable(ca)}));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"));
+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<C.length;B++){var K=document.createElement("option");K.setAttribute("value",C[B]);mxUtils.write(K,mxResources.get(C[B]));fa.appendChild(K)}x.appendChild(fa);C=e.cloneNode(!1);C.style.marginLeft="0px";C.style.paddingTop=
+"4px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("writingDirection"));var V=document.createElement("select");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.left="126px";V.style.width="98px";V.style.borderRadius="4px";V.style.marginTop="-2px";K=["automatic","leftToRight","rightToLeft"];var O={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<K.length;B++){var U=
+document.createElement("option");U.setAttribute("value",K[B]);mxUtils.write(U,mxResources.get(K[B]));V.appendChild(U)}C.appendChild(V);d.isEditing()||(a.appendChild(x),mxEvent.addListener(fa,"change",function(ca){d.getModel().beginUpdate();try{var t=ra[fa.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(ca)}),a.appendChild(C),mxEvent.addListener(V,"change",function(ca){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,O[V.value],g.cells);mxEvent.consume(ca)}));var J=document.createElement("input");J.style.position="absolute";J.style.border="1px solid rgb(160, 160, 160)";J.style.textAlign="right";J.style.marginTop="4px";J.style.left="161px";J.style.width="53px";J.style.borderRadius="4px";J.style.height="23px";J.style.boxSizing="border-box";
+n.appendChild(J);var aa=null;x=this.installInputHandler(J,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(G,L){null!=d.cellEditor.textarea&&G!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(G)&&(L||z.containsNode(G,!0))&&("FONT"==G.nodeName?(G.removeAttribute("size"),G.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(G).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(G.parentNode).fontSize!=
+ca+"px"?G.style.fontSize=ca+"px":G.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"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])}J.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(G,L){for(;null!=L;){if(L===G)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(d.cellEditor.textarea,E))for(aa=ca,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=aa+"px";window.setTimeout(function(){J.value=aa+" pt";aa=null},0);break}},!0);x=this.createStepper(J,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=J.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var ia=null,na=d.shapeBackgroundColor,W=null,da=d.shapeForegroundColor,sa=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
+function(){return na},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},d.shapeBackgroundColor,{install:function(ca){ia=ca},destroy:function(){ia=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){d.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
+null})},d.shapeBackgroundColor);sa.style.fontWeight="bold";var ta=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);ta.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 da},function(ca){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,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells));ca=d.cellEditor.textarea.getElementsByTagName("font");for(A=0;A<ca.length;A++)if(A>=z.length||ca[A]!=z[A].node||ca[A]==z[A].node&&ca[A].getAttribute("color")!=z[A].color){z=ca[A].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
+null!=z.firstChild){ca[A].parentNode.insertBefore(z,ca[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;ca[A].appendChild(t);t=E}z.appendChild(ca[A])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor,{install:function(ca){W=ca},destroy:function(){W=null}},
+null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){sa.style.display=ca==mxConstants.NONE?"none":"";ta.style.display=sa.style.display},function(ca){ca==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,g.cells);d.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},d.shapeForegroundColor);
+n.style.fontWeight="bold";h.appendChild(n);h.appendChild(sa);d.cellEditor.isContentEditing()||h.appendChild(ta);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";n=d.filterSelectionCells(mxUtils.bind(this,function(ca){var t=d.view.getState(ca);return null==t||d.isAutoSizeState(t)||d.getModel().isEdge(ca)||!d.isTableRow(ca)&&!d.isTableCell(ca)&&!d.isCellResizable(ca)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap",
+"null",null,null,!0,n);x.style.fontWeight="bold";0<n.length&&h.appendChild(x);n=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,f.actions.get("formattedText"));n.style.fontWeight="bold";h.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 Ja=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),Ia=this.addUnitInput(n,"pt",16,52,function(){ab.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(){kb.apply(this,arguments)}),Ba=this.addUnitInput(n,"pt",87,52,function(){Za.apply(this,arguments)}),qa=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 Ea=null,Ua=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Ea&&(e.cellEditor.restoreSelection(Ea),Ea=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);ca.value=t+" %"},function(ca){Ua=ca;mxEvent.addListener(ca,"mousedown",function(){document.activeElement==e.cellEditor.textarea&&
-(Ea=e.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Ea=e.cellEditor.saveSelection())});ca.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(ca){this.editorUi.menus.addInsertTableItem(ca,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!=P?P.cellIndex:0)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=U&&e.insertColumn(U,null!=P?P.cellIndex+1:-1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=U&&null!=P&&e.deleteColumn(U,P.cellIndex)}catch(ca){this.editorUi.handleError(ca)}}),
-n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=U&&null!=X&&e.insertRow(U,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=U&&null!=X&&e.insertRow(U,X.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
-mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=U&&null!=X&&e.deleteRow(U,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),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(ca){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,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?U:P;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(ca){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,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,
-function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?U:P;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 ca=U.getAttribute("cellPadding")||0;ca=new FilenameDialog(f,ca,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(ca.container,300,80,!0,!0);ca.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(ca){mxEvent.addListener(m[ca],"click",function(){b(m[ca],""==m[ca].style.backgroundImage)})})(B);var Ta=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(m[1],(ca&mxConstants.FONT_ITALIC)==
+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 Ea=null,Ua=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(ca){var t=""==ca.value?120:parseInt(ca.value);t=Math.max(0,isNaN(t)?120:t);null!=Ea&&(d.cellEditor.restoreSelection(Ea),Ea=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);ca.value=t+" %"},function(ca){Ua=ca;mxEvent.addListener(ca,"mousedown",function(){document.activeElement==d.cellEditor.textarea&&
+(Ea=d.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(Ea=d.cellEditor.saveSelection())});ca.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],h,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,
+"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(ca){this.editorUi.menus.addInsertTableItem(ca,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(h);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!=S&&d.insertColumn(S,null!=P?P.cellIndex:0)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=S&&d.insertColumn(S,null!=P?P.cellIndex+1:-1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=S&&null!=P&&d.deleteColumn(S,P.cellIndex)}catch(ca){this.editorUi.handleError(ca)}}),
+n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&d.insertRow(S,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&d.insertRow(S,X.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
+mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=S&&null!=X&&d.deleteRow(S,X.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(n);e=e.cloneNode(!1);e.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,
+function(ca){if(null!=S){var t=S.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?S:P;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(ca){if(null!=S){var t=S.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,G){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(t,
+function(z){var A=null==P||null!=ca&&mxEvent.isShiftDown(ca)?S:P;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!=S){var ca=S.getAttribute("cellPadding")||0;ca=new FilenameDialog(f,ca,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?S.setAttribute("cellPadding",t):S.removeAttribute("cellPadding")}),mxResources.get("spacing"));
+f.showDialog(ca.container,300,80,!0,!0);ca.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=S&&S.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=S&&S.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=S&&S.setAttribute("align","right")},e)];this.styleButtons(x);x[2].style.marginRight="10px";h.appendChild(e);
+a.appendChild(h);var db=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);for(B=0;3>B;B++)(function(ca){mxEvent.addListener(m[ca],"click",function(){b(m[ca],""==m[ca].style.backgroundImage)})})(B);var Ta=mxUtils.bind(this,function(ca,t,z){g=f.getSelectionState();ca=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(m[1],(ca&mxConstants.FONT_ITALIC)==
mxConstants.FONT_ITALIC);b(m[2],(ca&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!=J)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),J.value=isNaN(ca)?"":ca+" pt";ca=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-b(D,ca==mxConstants.ALIGN_LEFT);b(F,ca==mxConstants.ALIGN_CENTER);b(I,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(N,ca==mxConstants.ALIGN_TOP);b(R,ca==mxConstants.ALIGN_MIDDLE);b(S,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);fa.value=ca==mxConstants.ALIGN_LEFT&&
+b(D,ca==mxConstants.ALIGN_LEFT);b(F,ca==mxConstants.ALIGN_CENTER);b(H,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(N,ca==mxConstants.ALIGN_TOP);b(Q,ca==mxConstants.ALIGN_MIDDLE);b(T,ca==mxConstants.ALIGN_BOTTOM);ca=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);fa.value=ca==mxConstants.ALIGN_LEFT&&
t==mxConstants.ALIGN_TOP?"topLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_TOP?"top":ca==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_TOP?"topRight":ca==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_BOTTOM?"bottomLeft":ca==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_BOTTOM?"bottom":ca==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_BOTTOM?"bottomRight":ca==mxConstants.ALIGN_LEFT?"left":ca==mxConstants.ALIGN_RIGHT?"right":"center";ca=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,
mxConstants.DEFAULT_TEXT_DIRECTION);ca==mxConstants.TEXT_DIRECTION_RTL?V.value="rightToLeft":ca==mxConstants.TEXT_DIRECTION_LTR?V.value="leftToRight":ca==mxConstants.TEXT_DIRECTION_AUTO&&(V.value="automatic");if(z||document.activeElement!=Ia)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ia.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ja)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ja.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=
qa)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),qa.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=Ba)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ba.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=ua)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ua.value=isNaN(ca)?"":ca+" pt"});var ab=this.installInputHandler(Ia,mxConstants.STYLE_SPACING,2,-999,999," pt");var Ya=this.installInputHandler(Ja,
-mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(qa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Za=this.installInputHandler(Ba,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var kb=this.installInputHandler(ua,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(J,Ta);this.addKeyHandler(Ia,Ta);this.addKeyHandler(Ja,Ta);this.addKeyHandler(qa,Ta);this.addKeyHandler(Ba,Ta);this.addKeyHandler(ua,Ta);e.getModel().addListener(mxEvent.CHANGE,Ta);
-this.listeners.push({destroy:function(){e.getModel().removeListener(Ta)}});Ta();if(e.cellEditor.isContentEditing()){var cb=!1;d=function(){cb||(cb=!0,window.setTimeout(function(){var ca=e.getSelectedEditingElement();if(null!=ca){var t=function(za,Da){if(null!=za&&null!=Da){if(za==Da)return!0;if(za.length>Da.length+1)return za.substring(za.length-Da.length-1,za.length)=="-"+Da}return!1},z=function(za){if(null!=e.getParentByName(ca,za,e.cellEditor.textarea))return!0;for(var Da=ca;null!=Da&&1==Da.childNodes.length;)if(Da=
+mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(qa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Za=this.installInputHandler(Ba,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var kb=this.installInputHandler(ua,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(J,Ta);this.addKeyHandler(Ia,Ta);this.addKeyHandler(Ja,Ta);this.addKeyHandler(qa,Ta);this.addKeyHandler(Ba,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 cb=!1;e=function(){cb||(cb=!0,window.setTimeout(function(){var ca=d.getSelectedEditingElement();if(null!=ca){var t=function(za,Da){if(null!=za&&null!=Da){if(za==Da)return!0;if(za.length>Da.length+1)return za.substring(za.length-Da.length-1,za.length)=="-"+Da}return!1},z=function(za){if(null!=d.getParentByName(ca,za,d.cellEditor.textarea))return!0;for(var Da=ca;null!=Da&&1==Da.childNodes.length;)if(Da=
Da.childNodes[0],Da.nodeName==za)return!0;return!1},A=function(za){za=null!=za?za.fontSize:null;return null!=za&&"px"==za.substring(za.length-2)?parseFloat(za):mxConstants.DEFAULT_FONTSIZE},E=function(za,Da,La){return null!=La.style&&null!=Da?(Da=Da.lineHeight,null!=La.style.lineHeight&&"%"==La.style.lineHeight.substring(La.style.lineHeight.length-1)?parseInt(La.style.lineHeight)/100:"px"==Da.substring(Da.length-2)?parseFloat(Da)/za:parseInt(Da)):""},G=mxUtils.getCurrentStyle(ca),L=A(G),Y=E(L,G,ca),
-ha=ca.getElementsByTagName("*");if(0<ha.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var ea=window.getSelection(),ka=0;ka<ha.length;ka++)if(ea.containsNode(ha[ka],!0)){temp=mxUtils.getCurrentStyle(ha[ka]);L=Math.max(A(temp),L);var wa=E(L,temp,ha[ka]);if(wa!=Y||isNaN(wa))Y=""}null!=G&&(b(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==G.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(aa,z("SUP")),b(Q,z("SUB")),e.cellEditor.isTableSelected()?(b(ja,
-t(G.textAlign,"justify")),b(D,t(G.textAlign,"left")),b(F,t(G.textAlign,"center")),b(I,t(G.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(b(ja,t(G.textAlign,"justify")),b(D,!1),b(F,!1),b(I,!1)):(b(ja,!1),b(D,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(I,z==mxConstants.ALIGN_RIGHT))),U=e.getParentByName(ca,"TABLE",e.cellEditor.textarea),X=null==U?null:e.getParentByName(ca,"TR",U),P=null==
-U?null:e.getParentByNames(ca,["TD","TH"],U),db.style.display=null!=U?"":"none",document.activeElement!=J&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&null!=ba?(ca.removeAttribute("size"),ca.style.fontSize=ba+" pt",ba=null):J.value=isNaN(L)?"":L+" pt",wa=parseFloat(Y),isNaN(wa)?Ua.value="100 %":Ua.value=Math.round(100*wa)+" %"),null!=W&&(da="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(da,!0)),null!=ia&&(na="rgba(0, 0, 0, 0)"==G.backgroundColor||
-"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ia(na,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}cb=!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";
+ha=ca.getElementsByTagName("*");if(0<ha.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var ea=window.getSelection(),ka=0;ka<ha.length;ka++)if(ea.containsNode(ha[ka],!0)){temp=mxUtils.getCurrentStyle(ha[ka]);L=Math.max(A(temp),L);var wa=E(L,temp,ha[ka]);if(wa!=Y||isNaN(wa))Y=""}null!=G&&(b(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==G.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(ba,z("SUP")),b(R,z("SUB")),d.cellEditor.isTableSelected()?(b(ja,
+t(G.textAlign,"justify")),b(D,t(G.textAlign,"left")),b(F,t(G.textAlign,"center")),b(H,t(G.textAlign,"right"))):(z=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(b(ja,t(G.textAlign,"justify")),b(D,!1),b(F,!1),b(H,!1)):(b(ja,!1),b(D,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(H,z==mxConstants.ALIGN_RIGHT))),S=d.getParentByName(ca,"TABLE",d.cellEditor.textarea),X=null==S?null:d.getParentByName(ca,"TR",S),P=null==
+S?null:d.getParentByNames(ca,["TD","TH"],S),db.style.display=null!=S?"":"none",document.activeElement!=J&&("FONT"==ca.nodeName&&"4"==ca.getAttribute("size")&&null!=aa?(ca.removeAttribute("size"),ca.style.fontSize=aa+" pt",aa=null):J.value=isNaN(L)?"":L+" pt",wa=parseFloat(Y),isNaN(wa)?Ua.value="100 %":Ua.value=Math.round(100*wa)+" %"),null!=W&&(da="rgba(0, 0, 0, 0)"==G.color||"transparent"==G.color?mxConstants.NONE:mxUtils.rgba2hex(G.color),W(da,!0)),null!=ia&&(na="rgba(0, 0, 0, 0)"==G.backgroundColor||
+"transparent"==G.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(G.backgroundColor),ia(na,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(G.fontFamily)))}cb=!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";
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 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 D=B;return(D=D.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===D.length?"#"+("0"+parseInt(D[1],10).toString(16)).slice(-2)+("0"+parseInt(D[2],10).toString(16)).slice(-2)+("0"+parseInt(D[3],
-10).toString(16)).slice(-2):""},mxUtils.bind(this,function(D){g[d].style[r]=D;D="";for(var F=0;F<g.length;F++)D+=g[F].cssText+" ";e.textContent=D;D=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(D):Base64.encode(D,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(D){},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 d=new RegExp(f),g=b.style.image.substring(b.style.image.indexOf(",")+1),e=window.atob?atob(g):Base64.decode(g,!0),h=mxUtils.parseXml(e);if(null!=h){var n=h.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],h,n[b],u,f,d)}}}}catch(m){}return a};
+StyleFormatPanel.prototype.addSvgRule=function(a,b,f,d,g,e,h){var n=this.editorUi,u=n.editor.graph;h.test(b.selectorText)&&(h=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 D=B;return(D=D.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===D.length?"#"+("0"+parseInt(D[1],10).toString(16)).slice(-2)+("0"+parseInt(D[2],10).toString(16)).slice(-2)+("0"+parseInt(D[3],
+10).toString(16)).slice(-2):""},mxUtils.bind(this,function(D){g[e].style[r]=D;D="";for(var F=0;F<g.length;F++)D+=g[F].cssText+" ";d.textContent=D;D=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(D):Base64.encode(D,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(D){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),h(b,"fill",mxResources.get("fill")),h(b,"stroke",mxResources.get("line")),h(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(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){function b(){k.innerHTML="";D=1;for(var I=0;I<Editor.fillStyles.length;I++){var C=document.createElement("option");C.setAttribute("value",Editor.fillStyles[I].val);mxUtils.write(C,Editor.fillStyles[I].dispName);k.appendChild(C)}}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var d=document.createElement("select");d.style.position="absolute";d.style.left="104px";d.style.width="70px";d.style.height=
-"22px";d.style.padding="0px";d.style.marginTop="-3px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.boxSizing="border-box";var k=d.cloneNode(!1);mxEvent.addListener(d,"click",function(I){mxEvent.consume(I)});mxEvent.addListener(k,"click",function(I){mxEvent.consume(I)});var n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(I){d.style.display=null==I||I==mxConstants.NONE?"none":""},function(I){e.updateCellStyles({gradientColor:I},
-e.getSelectionCells())},e.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,e.shapeForegroundColor,e.shapeBackgroundColor)),u="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,m=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(I){e.setCellStyles(u,I,g.cells)}),e.getDefaultColor(g.style,u,e.shapeBackgroundColor,e.shapeForegroundColor));m.style.fontWeight="bold";var r=mxUtils.getValue(g.style,u,null);n.style.display=
-null!=r&&r!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var x=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(r=0;r<x.length;r++){var B=document.createElement("option");B.setAttribute("value",x[r]);mxUtils.write(B,mxResources.get(x[r]));d.appendChild(B)}n.appendChild(d);var D;b();m.appendChild(k);var F=mxUtils.bind(this,function(){g=f.getSelectionState();var I=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,
-mxConstants.DIRECTION_SOUTH),C=mxUtils.getValue(g.style,"fillStyle","auto");""==I&&(I=mxConstants.DIRECTION_SOUTH);d.value=I;a.style.display=g.fill?"":"none";I=mxUtils.getValue(g.style,u,null);if(g.fill&&null!=I&&I!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=D){k.innerHTML="";D=2;for(I=0;I<Editor.roughFillStyles.length;I++){var N=document.createElement("option");N.setAttribute("value",Editor.roughFillStyles[I].val);mxUtils.write(N,Editor.roughFillStyles[I].dispName);
-k.appendChild(N)}k.value="auto"}}else 1!=D&&b();k.value=C;k.value||(C="auto",k.value=C);k.style.display="1"==g.style.sketch||"none"==d.style.display?"":"none";n.style.display=g.containsImage||"1"==g.style.sketch&&"solid"!=C&&"auto"!=C?"none":""}else k.style.display="none",n.style.display="none"});e.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){e.getModel().removeListener(F)}});F();mxEvent.addListener(d,"change",function(I){e.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,
-d.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",g.cells));mxEvent.consume(I)});mxEvent.addListener(k,"change",function(I){e.setCellStyles("fillStyle",k.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[k.value],"cells",g.cells));mxEvent.consume(I)});a.appendChild(m);a.appendChild(n);m=this.getCustomColors();for(r=0;r<m.length;r++)a.appendChild(this.createCellColorOption(m[r].title,
+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){function b(){h.innerHTML="";D=1;for(var H=0;H<Editor.fillStyles.length;H++){var C=document.createElement("option");C.setAttribute("value",Editor.fillStyles[H].val);mxUtils.write(C,Editor.fillStyles[H].dispName);h.appendChild(C)}}var f=this.editorUi,d=f.editor.graph,g=f.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var e=document.createElement("select");e.style.position="absolute";e.style.left="104px";e.style.width="70px";e.style.height=
+"22px";e.style.padding="0px";e.style.marginTop="-3px";e.style.borderRadius="4px";e.style.border="1px solid rgb(160, 160, 160)";e.style.boxSizing="border-box";var h=e.cloneNode(!1);mxEvent.addListener(e,"click",function(H){mxEvent.consume(H)});mxEvent.addListener(h,"click",function(H){mxEvent.consume(H)});var n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(H){e.style.display=null==H||H==mxConstants.NONE?"none":""},function(H){d.updateCellStyles({gradientColor:H},
+d.getSelectionCells())},d.getDefaultColor(g.style,mxConstants.STYLE_GRADIENTCOLOR,d.shapeForegroundColor,d.shapeBackgroundColor)),u="image"==g.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,m=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(H){d.setCellStyles(u,H,g.cells)}),d.getDefaultColor(g.style,u,d.shapeBackgroundColor,d.shapeForegroundColor));m.style.fontWeight="bold";var r=mxUtils.getValue(g.style,u,null);n.style.display=
+null!=r&&r!=mxConstants.NONE&&g.fill&&"image"!=g.style.shape?"":"none";var x=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(r=0;r<x.length;r++){var B=document.createElement("option");B.setAttribute("value",x[r]);mxUtils.write(B,mxResources.get(x[r]));e.appendChild(B)}n.appendChild(e);var D;b();m.appendChild(h);var F=mxUtils.bind(this,function(){g=f.getSelectionState();var H=mxUtils.getValue(g.style,mxConstants.STYLE_GRADIENT_DIRECTION,
+mxConstants.DIRECTION_SOUTH),C=mxUtils.getValue(g.style,"fillStyle","auto");""==H&&(H=mxConstants.DIRECTION_SOUTH);e.value=H;a.style.display=g.fill?"":"none";H=mxUtils.getValue(g.style,u,null);if(g.fill&&null!=H&&H!=mxConstants.NONE&&"filledEdge"!=g.style.shape){if("1"==g.style.sketch){if(2!=D){h.innerHTML="";D=2;for(H=0;H<Editor.roughFillStyles.length;H++){var N=document.createElement("option");N.setAttribute("value",Editor.roughFillStyles[H].val);mxUtils.write(N,Editor.roughFillStyles[H].dispName);
+h.appendChild(N)}h.value="auto"}}else 1!=D&&b();h.value=C;h.value||(C="auto",h.value=C);h.style.display="1"==g.style.sketch||"none"==e.style.display?"":"none";n.style.display=g.containsImage||"1"==g.style.sketch&&"solid"!=C&&"auto"!=C?"none":""}else h.style.display="none",n.style.display="none"});d.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){d.getModel().removeListener(F)}});F();mxEvent.addListener(e,"change",function(H){d.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,
+e.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[e.value],"cells",g.cells));mxEvent.consume(H)});mxEvent.addListener(h,"change",function(H){d.setCellStyles("fillStyle",h.value,g.cells);f.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(H)});a.appendChild(m);a.appendChild(n);m=this.getCustomColors();for(r=0;r<m.length;r++)a.appendChild(this.createCellColorOption(m[r].title,
m[r].key,m[r].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 da=parseFloat(C.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));C.value=da+" pt";mxEvent.consume(W)}function f(W){var da=parseFloat(N.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(d.style,
-mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",d.cells)));N.value=da+" pt";mxEvent.consume(W)}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");
+StyleFormatPanel.prototype.addStroke=function(a){function b(W){var da=parseFloat(C.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",e.cells)));C.value=da+" pt";mxEvent.consume(W)}function f(W){var da=parseFloat(N.value);da=Math.min(999,Math.max(0,isNaN(da)?1:da));da!=mxUtils.getValue(e.style,
+mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,da,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[da],"cells",e.cells)));N.value=da+" 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 h=document.createElement("div");h.style.fontWeight="bold";e.stroke||(h.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 da=
-[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],sa=["0",null];"rounded"==n.value?sa=["1",null]:"curved"==n.value&&(sa=[null,"1"]);for(var ta=0;ta<da.length;ta++)g.setCellStyles(da[ta],sa[ta],d.cells);e.fireEvent(new mxEventObject("styleChanged","keys",da,"values",sa,"cells",d.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(W)});mxEvent.addListener(n,"click",function(W){mxEvent.consume(W)});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(W){g.setCellStyles(x,W,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 D=
+[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],sa=["0",null];"rounded"==n.value?sa=["1",null]:"curved"==n.value&&(sa=[null,"1"]);for(var ta=0;ta<da.length;ta++)g.setCellStyles(da[ta],sa[ta],e.cells);d.fireEvent(new mxEventObject("styleChanged","keys",da,"values",sa,"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);h.appendChild(u);var B=h.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 D=
mxUtils.bind(this,function(W,da,sa,ta,Ja){W=this.editorUi.menus.styleChange(W,"",ta,Ja,"geIcon",null);ta=document.createElement("div");ta.style.width=da+"px";ta.style.height="1px";ta.style.borderBottom="1px "+sa+" "+this.defaultStrokeColor;ta.style.paddingTop="6px";W.firstChild.firstChild.style.padding="0px 4px 0px 4px";W.firstChild.firstChild.style.width=da+"px";W.firstChild.firstChild.appendChild(ta);return W});m=this.editorUi.toolbar.addMenuFunctionInContainer(B,"geSprite-orthogonal",mxResources.get("pattern"),
!1,mxUtils.bind(this,function(W){D(W,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(W,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=B.cloneNode(!1),I=this.editorUi.toolbar.addMenuFunctionInContainer(F,"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,
+["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=B.cloneNode(!1),H=this.editorUi.toolbar.addMenuFunctionInContainer(F,"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(F,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(W){D(W,33,"solid",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(W,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+
" (2)");D(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=B.cloneNode(!1);var C=document.createElement("input");C.style.position="absolute";C.style.textAlign="right";C.style.marginTop="2px";C.style.width="52px";C.style.height="21px";C.style.left="146px";C.style.border="1px solid rgb(160, 160, 160)";C.style.borderRadius="4px";C.style.boxSizing="border-box";C.setAttribute("title",mxResources.get("linewidth"));
-B.appendChild(C);var N=C.cloneNode(!0);F.appendChild(N);var R=this.createStepper(C,b,1,9);R.style.display=C.style.display;R.style.marginTop="2px";R.style.left="198px";B.appendChild(R);R=this.createStepper(N,f,1,9);R.style.display=N.style.display;R.style.marginTop="2px";N.style.position="absolute";R.style.left="198px";F.appendChild(R);mxEvent.addListener(C,"blur",b);mxEvent.addListener(C,"change",b);mxEvent.addListener(N,"blur",f);mxEvent.addListener(N,"change",f);var S=this.editorUi.toolbar.addMenuFunctionInContainer(u,
-"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(W){"arrow"!=d.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",
+B.appendChild(C);var N=C.cloneNode(!0);F.appendChild(N);var Q=this.createStepper(C,b,1,9);Q.style.display=C.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";F.appendChild(Q);mxEvent.addListener(C,"blur",b);mxEvent.addListener(C,"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(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"==d.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")))})),Q=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"connector"==d.style.shape||"filledEdge"==d.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_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")))})),R=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 da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"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"],
@@ -3143,8 +3151,8 @@ null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.edit
"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)}})),aa=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1,
-mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
+"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)}})),ba=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 da=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);da.setAttribute("title",mxResources.get("none"));var sa=document.createElement("font");sa.style.fontSize="10px";mxUtils.write(sa,mxResources.get("none"));da.firstChild.firstChild.appendChild(sa);"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,
@@ -3157,300 +3165,300 @@ mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.styl
"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)}}));R=this.addArrow(I,8);R.nextSibling.style.position="relative";R.nextSibling.style.top="-2px";R=this.addArrow(S,
-10);R.nextSibling.style.position="relative";R.nextSibling.style.top="-3px";S.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(Q,null,!0);this.addArrow(aa,null,!0);R=this.addArrow(m,9);R.className="geIcon";R.style.width="auto";var U=this.addArrow(r,9);U.className="geIcon";U.style.width="22px";var P=document.createElement("div");P.style.width="84px";P.style.height="1px";P.style.borderBottom="1px solid "+this.defaultStrokeColor;P.style.marginBottom="7px";R.appendChild(P);var X=document.createElement("div");
-X.style.width="23px";X.style.height="1px";X.style.borderBottom="1px solid "+this.defaultStrokeColor;X.style.marginBottom="7px";U.appendChild(X);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";I.style.marginLeft="10px";I.style.height="15px";S.style.marginLeft="10px";S.style.height="17px";Q.style.marginLeft="3px";Q.style.height="17px";aa.style.marginLeft="3px";aa.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 ja=this.addUnitInput(m,"pt",98,52,function(){ia.apply(this,arguments)}),fa=this.addUnitInput(m,"pt",30,52,function(){ba.apply(this,arguments)});mxUtils.br(m);R=document.createElement("div");R.style.height=
-"8px";m.appendChild(R);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var ra=this.addUnitInput(m,"pt",98,52,function(){J.apply(this,arguments)}),K=this.addUnitInput(m,"pt",30,52,function(){T.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 V=this.addUnitInput(k,"pt",30,52,function(){na.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 O=mxUtils.bind(this,function(W,da,sa){function ta(Ja,Ia,ua,Ba){ua=ua.getElementsByTagName("div")[0];null!=ua&&e.updateCssForMarker(ua,Ba,d.style.shape,Ja,Ia);return ua}d=e.getSelectionState();if(sa||document.activeElement!=C)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),C.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=N)W=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(W)?"":W+" 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)?P.style.borderBottom="1px dashed "+this.defaultStrokeColor:P.style.borderBottom="1px dotted "+this.defaultStrokeColor:P.style.borderBottom="1px solid "+this.defaultStrokeColor;
-X.style.borderBottom=P.style.borderBottom;W=S.getElementsByTagName("div")[0];null!=W&&(da=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(d.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(da=null),"orthogonalEdgeStyle"==da&&"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?W.className="geSprite geSprite-curved":W.className="straight"==da||"none"==da||null==da?"geSprite geSprite-straight":"entityRelationEdgeStyle"==da?"geSprite geSprite-entity":"elbowEdgeStyle"==
-da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==da?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=I.getElementsByTagName("div")[0];null!=W&&(W.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");W=ta(mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(d.style,"startFill","1"),Q,"start");da=ta(mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(d.style,
-"endFill","1"),aa,"end");null!=W&&null!=da&&("arrow"==d.style.shape?(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-endblocktrans"):"link"==d.style.shape&&(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(S,"arrow"==d.style.shape?30:100);"connector"!=d.style.shape&&"flexArrow"!=d.style.shape&&"filledEdge"!=d.style.shape?(mxUtils.setOpacity(Q,30),mxUtils.setOpacity(aa,30)):(mxUtils.setOpacity(Q,100),mxUtils.setOpacity(aa,
-100));if(sa||document.activeElement!=K)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),K.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ra.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=fa)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),fa.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W=
-parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ja.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=V)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_PERIMETER_SPACING,0)),V.value=isNaN(W)?"":W+" pt"});var T=this.installInputHandler(K,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var J=this.installInputHandler(ra,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ba=this.installInputHandler(fa,mxConstants.STYLE_ENDSIZE,
+"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(H,8);Q.nextSibling.style.position="relative";Q.nextSibling.style.top="-2px";Q=this.addArrow(T,
+10);Q.nextSibling.style.position="relative";Q.nextSibling.style.top="-3px";T.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(R,null,!0);this.addArrow(ba,null,!0);Q=this.addArrow(m,9);Q.className="geIcon";Q.style.width="auto";var S=this.addArrow(r,9);S.className="geIcon";S.style.width="22px";var P=document.createElement("div");P.style.width="84px";P.style.height="1px";P.style.borderBottom="1px solid "+this.defaultStrokeColor;P.style.marginBottom="7px";Q.appendChild(P);var X=document.createElement("div");
+X.style.width="23px";X.style.height="1px";X.style.borderBottom="1px solid "+this.defaultStrokeColor;X.style.marginBottom="7px";S.appendChild(X);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";H.style.marginLeft="10px";H.style.height="15px";T.style.marginLeft="10px";T.style.height="17px";R.style.marginLeft="3px";R.style.height="17px";ba.style.marginLeft="3px";ba.style.height="17px";a.appendChild(h);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 ja=this.addUnitInput(m,"pt",98,52,function(){ia.apply(this,arguments)}),fa=this.addUnitInput(m,"pt",30,52,function(){aa.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 ra=this.addUnitInput(m,"pt",98,52,function(){J.apply(this,arguments)}),K=this.addUnitInput(m,"pt",30,52,function(){U.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);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";
+h.style.marginTop="6px";h.style.borderWidth="0px";h.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"));h.appendChild(r);var V=this.addUnitInput(h,"pt",30,52,function(){na.apply(this,arguments)});e.edges.length==e.cells.length?(a.appendChild(u),a.appendChild(m)):e.vertices.length==e.cells.length&&
+a.appendChild(h);var O=mxUtils.bind(this,function(W,da,sa){function ta(Ja,Ia,ua,Ba){ua=ua.getElementsByTagName("div")[0];null!=ua&&d.updateCssForMarker(ua,Ba,e.style.shape,Ja,Ia);return ua}e=d.getSelectionState();if(sa||document.activeElement!=C)W=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),C.value=isNaN(W)?"":W+" pt";if(sa||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)?P.style.borderBottom="1px dashed "+this.defaultStrokeColor:P.style.borderBottom="1px dotted "+this.defaultStrokeColor:P.style.borderBottom="1px solid "+this.defaultStrokeColor;
+X.style.borderBottom=P.style.borderBottom;W=T.getElementsByTagName("div")[0];null!=W&&(da=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(da=null),"orthogonalEdgeStyle"==da&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?W.className="geSprite geSprite-curved":W.className="straight"==da||"none"==da||null==da?"geSprite geSprite-straight":"entityRelationEdgeStyle"==da?"geSprite geSprite-entity":"elbowEdgeStyle"==
+da?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==da?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=H.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?(F.style.display="",B.style.display="none"):(F.style.display="none",B.style.display="");Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps&&(a.style.borderBottomStyle="none");W=ta(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),R,"start");da=ta(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
+"endFill","1"),ba,"end");null!=W&&null!=da&&("arrow"==e.style.shape?(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(W.className="geSprite geSprite-noarrow",da.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(T,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(R,30),mxUtils.setOpacity(ba,30)):(mxUtils.setOpacity(R,100),mxUtils.setOpacity(ba,
+100));if(sa||document.activeElement!=K)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),K.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ra.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=fa)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),fa.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=ra)W=
+parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ja.value=isNaN(W)?"":W+" pt";if(sa||document.activeElement!=V)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),V.value=isNaN(W)?"":W+" pt"});var U=this.installInputHandler(K,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var J=this.installInputHandler(ra,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var aa=this.installInputHandler(fa,mxConstants.STYLE_ENDSIZE,
mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var ia=this.installInputHandler(ja,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var na=this.installInputHandler(V,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(C,O);this.addKeyHandler(K,O);this.addKeyHandler(ra,O);this.addKeyHandler(fa,O);this.addKeyHandler(ja,O);this.addKeyHandler(V,O);g.getModel().addListener(mxEvent.CHANGE,O);this.listeners.push({destroy:function(){g.getModel().removeListener(O)}});O();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,D){e=b.getSelectionState();d.value=mxUtils.getValue(e.style,
-"jumpStyle","none");if(D||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(D,F,I){D=this.createCellOption(D,F,I);D.style.width="100%";m.appendChild(D);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(D,F,I){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()};
+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 h=0;h<g.length;h++){var n=document.createElement("option");n.setAttribute("value",g[h]);mxUtils.write(n,mxResources.get(g[h]));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,D){d=b.getSelectionState();e.value=mxUtils.getValue(d.style,
+"jumpStyle","none");if(D||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"),h=document.createElement("tr");h.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";h.appendChild(n);h.appendChild(u);e.appendChild(h);g.appendChild(e);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(D,F,H){D=this.createCellOption(D,F,H);D.style.width="100%";m.appendChild(D);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(D,F,H){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()};
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,e=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var d=document.createElement("div");d.style.marginRight="16px";a.style.paddingTop="8px";var k=document.createElement("table");k.style.width="210px";k.style.fontWeight="bold";var n=document.createElement("tbody"),u=document.createElement("tr");u.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.setAttribute("valign",
-"middle");var r=m.cloneNode(!0);r.style.paddingLeft="8px";d.style.paddingBottom="12px";u.appendChild(m);m.appendChild(this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(P){f.updateCellStyles({sketch:P?"1":null},f.getVerticesAndEdges());b.setSketchMode(!Editor.sketchMode)},null,function(P){P.style.width="auto"}));u.appendChild(r);n.appendChild(u);k.appendChild(n);r.appendChild(this.createOption(mxResources.get("rounded"),mxUtils.bind(this,function(){return this.format.rounded}),
+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=document.createElement("div");e.style.marginRight="16px";a.style.paddingTop="8px";var h=document.createElement("table");h.style.width="210px";h.style.fontWeight="bold";var n=document.createElement("tbody"),u=document.createElement("tr");u.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.setAttribute("valign",
+"middle");var r=m.cloneNode(!0);r.style.paddingLeft="8px";e.style.paddingBottom="12px";u.appendChild(m);m.appendChild(this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(P){f.updateCellStyles({sketch:P?"1":null},f.getVerticesAndEdges());b.setSketchMode(!Editor.sketchMode)},null,function(P){P.style.width="auto"}));u.appendChild(r);n.appendChild(u);h.appendChild(n);r.appendChild(this.createOption(mxResources.get("rounded"),mxUtils.bind(this,function(){return this.format.rounded}),
mxUtils.bind(this,function(P){this.format.rounded=P;f.updateCellStyles({rounded:P?"1":"0"},f.getVerticesAndEdges());P?(f.currentEdgeStyle.rounded="1",f.currentVertexStyle.rounded="1"):(delete f.currentEdgeStyle.rounded,delete f.currentVertexStyle.rounded)}),null,function(P){P.style.width="auto"}));m=m.cloneNode(!1);r=r.cloneNode(!1);u=u.cloneNode(!1);u.appendChild(m);u.appendChild(r);n.appendChild(u);m.appendChild(this.createOption(mxResources.get("curved"),mxUtils.bind(this,function(){return this.format.curved}),
-mxUtils.bind(this,function(P){this.format.curved=P;f.updateCellStyles({curved:P?"1":null},f.getVerticesAndEdges(!1,!0));P?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved}),null,function(P){P.style.width="auto"}));d.appendChild(k);a.appendChild(d);var x=["fillColor","strokeColor","fontColor","gradientColor"],B=mxUtils.bind(this,function(P,X){var ja=f.getVerticesAndEdges();e.beginUpdate();try{for(var fa=0;fa<ja.length;fa++){var ra=f.getCellStyle(ja[fa]);null!=ra.labelBackgroundColor&&
-f.updateCellStyles({labelBackgroundColor:null!=X?X.background:null},[ja[fa]]);for(var K=e.isEdge(ja[fa]),V=e.getStyle(ja[fa]),O=K?f.currentEdgeStyle:f.currentVertexStyle,T=0;T<P.length;T++)if(null!=ra[P[T]]&&ra[P[T]]!=mxConstants.NONE||P[T]!=mxConstants.STYLE_FILLCOLOR&&P[T]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,P[T],O[P[T]]);e.setStyle(ja[fa],V)}}finally{e.endUpdate()}}),D=mxUtils.bind(this,function(P,X,ja){if(null!=P)for(var fa=0;fa<X.length;fa++)if(null!=P[X[fa]]&&P[X[fa]]!=mxConstants.NONE||
+mxUtils.bind(this,function(P){this.format.curved=P;f.updateCellStyles({curved:P?"1":null},f.getVerticesAndEdges(!1,!0));P?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved}),null,function(P){P.style.width="auto"}));e.appendChild(h);a.appendChild(e);var x=["fillColor","strokeColor","fontColor","gradientColor"],B=mxUtils.bind(this,function(P,X){var ja=f.getVerticesAndEdges();d.beginUpdate();try{for(var fa=0;fa<ja.length;fa++){var ra=f.getCellStyle(ja[fa]);null!=ra.labelBackgroundColor&&
+f.updateCellStyles({labelBackgroundColor:null!=X?X.background:null},[ja[fa]]);for(var K=d.isEdge(ja[fa]),V=d.getStyle(ja[fa]),O=K?f.currentEdgeStyle:f.currentVertexStyle,U=0;U<P.length;U++)if(null!=ra[P[U]]&&ra[P[U]]!=mxConstants.NONE||P[U]!=mxConstants.STYLE_FILLCOLOR&&P[U]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,P[U],O[P[U]]);d.setStyle(ja[fa],V)}}finally{d.endUpdate()}}),D=mxUtils.bind(this,function(P,X,ja){if(null!=P)for(var fa=0;fa<X.length;fa++)if(null!=P[X[fa]]&&P[X[fa]]!=mxConstants.NONE||
X[fa]!=mxConstants.STYLE_FILLCOLOR&&X[fa]!=mxConstants.STYLE_STROKECOLOR)P[X[fa]]=ja[X[fa]]}),F=mxUtils.bind(this,function(P,X,ja,fa,ra){if(null!=P){null!=ja&&null!=X.labelBackgroundColor&&(fa=null!=fa?fa.background:null,ra=null!=ra?ra:f,null==fa&&(fa=ra.background),null==fa&&(fa=ra.defaultPageBackgroundColor),X.labelBackgroundColor=fa);for(var K in P)if(null==ja||null!=X[K]&&X[K]!=mxConstants.NONE||K!=mxConstants.STYLE_FILLCOLOR&&K!=mxConstants.STYLE_STROKECOLOR)X[K]=P[K]}});m=mxUtils.button(mxResources.get("reset"),
-mxUtils.bind(this,function(P){P=f.getVerticesAndEdges(!0,!0);this.format.rounded=!1;this.format.curved=!1;if(0<P.length){e.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},P),f.updateCellStyles({curved:null,rounded:"0"},f.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.clearDefaultStyle();b.setSketchMode(!1)}));m.setAttribute("title",mxResources.get("reset"));m.style.textOverflow="ellipsis";m.style.maxWidth="90px";r.appendChild(m);var I=mxUtils.bind(this,function(P,X,ja,fa,ra){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%";ra.appendChild(K);var V=new Graph(K,null,null,f.getStylesheet());V.resetViewOnRootChange=!1;V.foldingEnabled=!1;V.gridEnabled=!1;V.autoScroll=!1;V.setTooltips(!1);V.setConnectable(!1);V.setPanning(!1);V.setEnabled(!1);V.getCellStyle=function(J,ba){ba=null!=ba?ba:!0;var ia=mxUtils.clone(f.getCellStyle.apply(this,arguments)),
-na=f.stylesheet.getDefaultVertexStyle(),W=X;e.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ia,x,na);F(P,ia,J,fa,V);F(W,ia,J,fa,V);ba&&(ia=f.postProcessCellStyle(J,ia));return ia};V.model.beginUpdate();try{var O=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),T=V.insertEdge(V.getDefaultParent(),null,"Connector",O,O,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");T.geometry.points=[new mxPoint(32,70)];T.geometry.offset=
+mxUtils.bind(this,function(P){P=f.getVerticesAndEdges(!0,!0);this.format.rounded=!1;this.format.curved=!1;if(0<P.length){d.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},P),f.updateCellStyles({curved:null,rounded:"0"},f.getVerticesAndEdges(!1,!0))}finally{d.endUpdate()}}b.clearDefaultStyle();b.setSketchMode(!1)}));m.setAttribute("title",mxResources.get("reset"));m.style.textOverflow="ellipsis";m.style.maxWidth="90px";r.appendChild(m);var H=mxUtils.bind(this,function(P,X,ja,fa,ra){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%";ra.appendChild(K);var V=new Graph(K,null,null,f.getStylesheet());V.resetViewOnRootChange=!1;V.foldingEnabled=!1;V.gridEnabled=!1;V.autoScroll=!1;V.setTooltips(!1);V.setConnectable(!1);V.setPanning(!1);V.setEnabled(!1);V.getCellStyle=function(J,aa){aa=null!=aa?aa:!0;var ia=mxUtils.clone(f.getCellStyle.apply(this,arguments)),
+na=f.stylesheet.getDefaultVertexStyle(),W=X;d.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ia,x,na);F(P,ia,J,fa,V);F(W,ia,J,fa,V);aa&&(ia=f.postProcessCellStyle(J,ia));return ia};V.model.beginUpdate();try{var O=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),U=V.insertEdge(V.getDefaultParent(),null,"Connector",O,O,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");U.geometry.points=[new mxPoint(32,70)];U.geometry.offset=
new mxPoint(0,8)}finally{V.model.endUpdate()}}),C=document.createElement("div");C.style.position="relative";a.appendChild(C);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var N=mxUtils.bind(this,function(P,X,ja,fa,ra){var K=this.format.cachedStyleEntries[ra];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!=fa&&null!=fa.background&&(K.style.backgroundColor=fa.background),I(P,X,ja,fa,K),mxEvent.addGestureListeners(K,mxUtils.bind(this,function(V){K.style.opacity=.5}),null,mxUtils.bind(this,function(V){K.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);F(P,f.currentVertexStyle);F(P,f.currentEdgeStyle);F(X,f.currentVertexStyle);F(ja,f.currentEdgeStyle);e.beginUpdate();try{var O=
-x.slice(),T;for(T in P)O.push(T);B(O,fa);var J=new ChangePageSetup(b,null!=fa?fa.background:null);J.ignoreImage=!0;e.execute(J);e.execute(new ChangeGridColor(b,null!=fa&&null!=fa.gridColor?fa.gridColor:g))}finally{e.endUpdate()}})),mxEvent.addListener(K,"mouseenter",mxUtils.bind(this,function(V){var O=f.getCellStyle;V=f.background;var T=f.view.gridColor;f.background=null!=fa?fa.background:null;f.view.gridColor=null!=fa&&null!=fa.gridColor?fa.gridColor:g;f.getCellStyle=function(J,ba){ba=null!=ba?ba:
-!0;var ia=mxUtils.clone(O.apply(this,arguments)),na=f.stylesheet.getDefaultVertexStyle(),W=X;e.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ia,x,na);F(P,ia,J,fa);F(W,ia,J,fa);ba&&(ia=this.postProcessCellStyle(J,ia));return ia};f.refresh();f.getCellStyle=O;f.background=V;f.view.gridColor=T})),mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[ra]=K));C.appendChild(K)}),R=Math.ceil(Editor.styles.length/
-10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var S=[],Q=mxUtils.bind(this,function(){0<S.length&&(S[this.format.currentStylePage].style.background="#84d7ff");for(var P=10*this.format.currentStylePage;P<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);P++){var X=Editor.styles[P];N(X.commonStyle,X.vertexStyle,X.edgeStyle,X.graph,P)}}),aa=mxUtils.bind(this,function(P){0<=P&&P<R&&(S[this.format.currentStylePage].style.background=
-"transparent",C.innerText="",this.format.currentStylePage=P,Q())});if(1<R){d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.position="relative";d.style.textAlign="center";d.style.paddingTop="4px";d.style.width="210px";a.style.paddingBottom="8px";for(r=0;r<R;r++){var U=document.createElement("div");U.style.display="inline-block";U.style.width="6px";U.style.height="6px";U.style.marginLeft="4px";U.style.marginRight="3px";U.style.borderRadius="3px";U.style.cursor="pointer";U.style.background=
-"transparent";U.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(P,X){mxEvent.addListener(U,"click",mxUtils.bind(this,function(){aa(P)}))})(r,U);d.appendChild(U);S.push(U)}a.appendChild(d);Q();15>R&&(k=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},m=document.createElement("div"),m.style.className="geAdaptiveAsset",m.style.position="absolute",m.style.left="0px",m.style.top="0px",m.style.bottom=
-"0px",m.style.width="24px",m.style.height="24px",m.style.margin="0px",m.style.cursor="pointer",m.style.opacity="0.5",m.style.backgroundRepeat="no-repeat",m.style.backgroundPosition="center center",m.style.backgroundSize="24px 24px",m.style.backgroundImage="url("+Editor.previousImage+")",r=m.cloneNode(!1),r.style.backgroundImage="url("+Editor.nextImage+")",r.style.left="",r.style.right="2px",d.appendChild(m),d.appendChild(r),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage-
-1,R))})),mxEvent.addListener(r,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage+1,R))})),k(m),k(r))}else Q();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);
+"8px",K.style.margin="2px",K.style.overflow="hidden",null!=fa&&null!=fa.background&&(K.style.backgroundColor=fa.background),H(P,X,ja,fa,K),mxEvent.addGestureListeners(K,mxUtils.bind(this,function(V){K.style.opacity=.5}),null,mxUtils.bind(this,function(V){K.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);F(P,f.currentVertexStyle);F(P,f.currentEdgeStyle);F(X,f.currentVertexStyle);F(ja,f.currentEdgeStyle);d.beginUpdate();try{var O=
+x.slice(),U;for(U in P)O.push(U);B(O,fa);var J=new ChangePageSetup(b,null!=fa?fa.background:null);J.ignoreImage=!0;d.execute(J);d.execute(new ChangeGridColor(b,null!=fa&&null!=fa.gridColor?fa.gridColor:g))}finally{d.endUpdate()}})),mxEvent.addListener(K,"mouseenter",mxUtils.bind(this,function(V){var O=f.getCellStyle;V=f.background;var U=f.view.gridColor;f.background=null!=fa?fa.background:null;f.view.gridColor=null!=fa&&null!=fa.gridColor?fa.gridColor:g;f.getCellStyle=function(J,aa){aa=null!=aa?aa:
+!0;var ia=mxUtils.clone(O.apply(this,arguments)),na=f.stylesheet.getDefaultVertexStyle(),W=X;d.isEdge(J)&&(na=f.stylesheet.getDefaultEdgeStyle(),W=ja);D(ia,x,na);F(P,ia,J,fa);F(W,ia,J,fa);aa&&(ia=this.postProcessCellStyle(J,ia));return ia};f.refresh();f.getCellStyle=O;f.background=V;f.view.gridColor=U})),mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[ra]=K));C.appendChild(K)}),Q=Math.ceil(Editor.styles.length/
+10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var T=[],R=mxUtils.bind(this,function(){0<T.length&&(T[this.format.currentStylePage].style.background="#84d7ff");for(var P=10*this.format.currentStylePage;P<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);P++){var X=Editor.styles[P];N(X.commonStyle,X.vertexStyle,X.edgeStyle,X.graph,P)}}),ba=mxUtils.bind(this,function(P){0<=P&&P<Q&&(T[this.format.currentStylePage].style.background=
+"transparent",C.innerText="",this.format.currentStylePage=P,R())});if(1<Q){e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.position="relative";e.style.textAlign="center";e.style.paddingTop="4px";e.style.width="210px";a.style.paddingBottom="8px";for(r=0;r<Q;r++){var S=document.createElement("div");S.style.display="inline-block";S.style.width="6px";S.style.height="6px";S.style.marginLeft="4px";S.style.marginRight="3px";S.style.borderRadius="3px";S.style.cursor="pointer";S.style.background=
+"transparent";S.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(P,X){mxEvent.addListener(S,"click",mxUtils.bind(this,function(){ba(P)}))})(r,S);e.appendChild(S);T.push(S)}a.appendChild(e);R();15>Q&&(h=function(P){mxEvent.addListener(P,"mouseenter",function(){P.style.opacity="1"});mxEvent.addListener(P,"mouseleave",function(){P.style.opacity="0.5"})},m=document.createElement("div"),m.style.className="geAdaptiveAsset",m.style.position="absolute",m.style.left="0px",m.style.top="0px",m.style.bottom=
+"0px",m.style.width="24px",m.style.height="24px",m.style.margin="0px",m.style.cursor="pointer",m.style.opacity="0.5",m.style.backgroundRepeat="no-repeat",m.style.backgroundPosition="center center",m.style.backgroundSize="24px 24px",m.style.backgroundImage="url("+Editor.previousImage+")",r=m.cloneNode(!1),r.style.backgroundImage="url("+Editor.nextImage+")",r.style.left="",r.style.right="2px",e.appendChild(m),e.appendChild(r),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentStylePage-
+1,Q))})),mxEvent.addListener(r,"click",mxUtils.bind(this,function(){ba(mxUtils.mod(this.format.currentStylePage+1,Q))})),h(m),h(r))}else R();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(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.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 h=new ChangePageSetup(b,e);h.ignoreImage=null!=e&&e!=mxConstants.NONE;f.model.execute(h)},"#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 h=this.createStepper(e,b,this.getUnitStep(),null,null,null,this.isFloatUnit());e.style.display=g.isGridEnabled()?"":"none";h.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";h.style.marginTop="-17px";h.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";h.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(h);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 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 D(){mxActor.call(this)}function F(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function C(){mxActor.call(this)}function N(){mxActor.call(this)}function R(){mxActor.call(this)}function S(){mxActor.call(this)}function Q(){mxActor.call(this)}function aa(){mxActor.call(this)}function U(){mxActor.call(this)}function P(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,P.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,P.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,P.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,P.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,P.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,P.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function ja(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ra(){mxActor.call(this)}function K(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function T(){mxCylinder.call(this)}function J(){mxShape.call(this)}function ba(){mxShape.call(this)}function ia(){mxEllipse.call(this)}function na(){mxShape.call(this)}
+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,k,q){mxShape.call(this);this.line=c;this.stroke=k;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 h(){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,k,q,l){mxShape.call(this);this.bounds=c;this.fill=k;this.stroke=q;this.strokewidth=null!=l?l:1}function D(){mxActor.call(this)}function F(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function C(){mxActor.call(this)}function N(){mxActor.call(this)}function Q(){mxActor.call(this)}function T(){mxActor.call(this)}function R(){mxActor.call(this)}function ba(){mxActor.call(this)}function S(){mxActor.call(this)}function P(c,k){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.defaultVariation=k;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,P.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,P.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,P.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,P.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,P.prototype.curveTo);
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,P.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function ja(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ra(){mxActor.call(this)}function K(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function U(){mxCylinder.call(this)}function J(){mxShape.call(this)}function aa(){mxShape.call(this)}function ia(){mxEllipse.call(this)}function na(){mxShape.call(this)}
function W(){mxShape.call(this)}function da(){mxRectangleShape.call(this)}function sa(){mxShape.call(this)}function ta(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Ia(){mxShape.call(this)}function ua(){mxShape.call(this)}function Ba(){mxCylinder.call(this)}function qa(){mxCylinder.call(this)}function Ea(){mxRectangleShape.call(this)}function Ua(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ta(){mxArrowConnector.call(this);this.spacing=0}function ab(){mxArrowConnector.call(this);
this.spacing=0}function Ya(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Za(){mxActor.call(this)}function kb(){mxActor.call(this)}function cb(){mxActor.call(this)}function ca(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function G(){mxActor.call(this)}function L(){mxActor.call(this)}function Y(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}
-function ka(){mxRhombus.call(this)}function wa(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Ma(){mxActor.call(this)}function Ha(){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,H,y,Z){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);Z?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(),H=this.getTitleSize();0==H||this.outline?Da.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-h,-q));v||this.outline||!(w&&H<p||!w&&H<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 H=v;v=w;w=H}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(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)))),H=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!=H&&(c.setFillAlpha(Math.abs(H)),c.setFillColor(0>H?"#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())};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),
-c.end(),c.stroke())};mxCellRenderer.registerShape("note",u);mxUtils.extend(m,u);mxCellRenderer.registerShape("note2",m);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,0)}return null};mxUtils.extend(r,mxShape);r.prototype.isoAngle=15;r.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
-"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(D,mxActor);D.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",D);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),H=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));H||(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",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(I,mxCylinder);I.prototype.arcSize=.1;I.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())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(C,mxActor);C.prototype.size=30;C.prototype.isRoundable=function(){return!0};C.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",C);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(R,mxActor);R.prototype.size=.3;R.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};R.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",R);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};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};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(S,mxActor);S.prototype.size=.2;S.prototype.fixedSize=20;S.prototype.isRoundable=function(){return!0};S.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",S);mxUtils.extend(Q,mxActor);Q.prototype.size=.2;Q.prototype.fixedSize=20;Q.prototype.isRoundable=function(){return!0};Q.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",Q);mxUtils.extend(aa,mxActor);aa.prototype.size=.5;aa.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",aa);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);P.prototype.moveTo=function(c,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;this.firstX=c;this.firstY=h};P.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)};
-P.prototype.quadTo=function(c,h,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};P.prototype.curveTo=function(c,h,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};P.prototype.arcTo=function(c,h,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};P.prototype.lineTo=function(c,h){if(null!=this.lastX&&null!=this.lastY){var q=function(M){return"number"===typeof M?M?0>M?-1:1:M===M?0:NaN:NaN},l=Math.abs(c-
-this.lastX),p=Math.abs(h-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;return}var w=Math.round(v/10),H=this.defaultVariation;5>w&&(w=5,H/=3);var y=q(c-this.lastX)*l/w;q=q(h-this.lastY)*p/w;l/=v;p/=v;for(v=0;v<w;v++){var Z=(Math.random()-.5)*H;this.originalLineTo.call(this.canvas,y*v+this.lastX-Z*p,q*v+this.lastY-Z*l)}this.originalLineTo.call(this.canvas,c,h)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=
-h};P.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var bb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){bb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
+function ka(){mxRhombus.call(this)}function wa(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Ma(){mxActor.call(this)}function Ha(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ga(c,k,q,l){mxShape.call(this);this.bounds=c;this.fill=k;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,k,q,l,p,v,w,I,y,Z){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);Z?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var k=0;k<this.line.length;k++){var q=this.line[k];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,
+k,q,l,p){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,k,q,l){if(null!=k){var p=null;c.begin();for(var v=0;v<k.length;v++){var w=k[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 k=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var q=null,l=0;l<this.line.length&&!k;l++){var p=this.line[l];null!=p&&null!=q&&(k=mxUtils.rectangleIntersectsSegment(c,
+q,p));q=p}return k};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,k,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?Da.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-k,-q));v||this.outline||!(w&&I<p||!w&&I<l)||this.paintForeground(c,k,q,l,p)};b.prototype.paintForeground=function(c,k,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,k+l/2,q+p/2);s=this.scale;k=this.bounds.x/s;q=this.bounds.y/s;l=this.bounds.width/s;p=this.bounds.height/
+s;this.paintTableForeground(c,k,q,l,p)}};b.prototype.paintTableForeground=function(c,k,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],k,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,k,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(k,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,k,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(k+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(k,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(c,k,q,l,p){k=Math.min(l,p/Na);c.translate((l-k)/2,(p-k)/2+k/4);c.moveTo(0,
+.25*k);c.lineTo(.5*k,k*Sa);c.lineTo(k,.25*k);c.lineTo(.5*k,(.5-Sa)*k);c.lineTo(0,.25*k);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(h,mxCylinder);h.prototype.size=20;h.prototype.redrawPath=function(c,k,q,l,p,v){k=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*k),c.lineTo(.5*k,(.5-Sa)*k),c.lineTo(k,.25*k),c.moveTo(.5*k,(.5-Sa)*k),c.lineTo(.5*k,(1-Sa)*k)):(c.translate((l-k)/2,(p-k)/2),c.moveTo(0,.25*k),c.lineTo(.5*k,k*Sa),c.lineTo(k,.25*k),c.lineTo(k,.75*k),c.lineTo(.5*
+k,(1-Sa)*k),c.lineTo(0,.75*k),c.close());c.end()};mxCellRenderer.registerShape("isoCube",h);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(c,k,q,l,p,v){k=Math.min(p/2,Math.round(p/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)c.moveTo(0,k),c.curveTo(0,2*k,l,2*k,l,k),v||(c.stroke(),c.begin()),c.translate(0,k/2),c.moveTo(0,k),c.curveTo(0,2*k,l,2*k,l,k),v||(c.stroke(),c.begin()),c.translate(0,k/2),c.moveTo(0,k),c.curveTo(0,2*k,l,2*k,l,k),v||(c.stroke(),c.begin()),c.translate(0,
+-k);v||(c.moveTo(0,k),c.curveTo(0,-k/3,l,-k/3,l,k),c.lineTo(l,p-k),c.curveTo(l,p+k/3,0,p+k/3,0,p-k),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,k,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(k,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),
+c.end(),c.stroke())};mxCellRenderer.registerShape("note",u);mxUtils.extend(m,u);mxCellRenderer.registerShape("note2",m);m.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,k*this.scale),0,0)}return null};mxUtils.extend(r,mxShape);r.prototype.isoAngle=15;r.prototype.paintVertexShape=function(c,k,q,l,p){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
+"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(l*Math.tan(v),.5*p);c.translate(k,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,k,q,l,p){var v=Math.max(0,Math.min(.5*
+p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(k,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,k,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(k,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(D,mxActor);D.prototype.redrawPath=function(c,k,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",D);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,k,q,l,p){c.translate(k,q);k=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));k=Math.max(k,y);k=Math.min(l-y,k);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),q),c.lineTo(Math.max(y,0),0),c.lineTo(k,0),c.lineTo(k,q)):(c.moveTo(l-k,q),c.lineTo(l-k,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",F);F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=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;k=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-k));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-k)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-
+k))}return new mxRectangle(0,Math.min(c.height,k),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,k,q,l,p){c.translate(k,q);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q=mxUtils.getValue(this.style,"umlStateConnection",null);w||(k*=Math.min(l,p));k=Math.min(k,.5*l,.5*p);v||(k=0);v=0;null!=q&&(v=10);c.begin();c.moveTo(v,
+k);c.arcTo(k,k,0,0,1,v+k,0);c.lineTo(l-k,0);c.arcTo(k,k,0,0,1,l,k);c.lineTo(l,p-k);c.arcTo(k,k,0,0,1,l-k,p);c.lineTo(v+k,p);c.arcTo(k,k,0,0,1,v,p-k);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())};H.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",H);mxUtils.extend(C,mxActor);C.prototype.size=30;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=
+function(c,k,q,l,p){k=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(k,0),new mxPoint(l,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,k)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("card",C);mxUtils.extend(N,mxActor);N.prototype.size=.4;N.prototype.redrawPath=function(c,k,q,l,p){k=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,k/2);c.quadTo(l/4,1.4*k,l/2,k/2);c.quadTo(3*l/4,k*(1-1.4),l,k/2);c.lineTo(l,p-k/2);c.quadTo(3*l/4,p-1.4*k,l/2,p-k/2);c.quadTo(l/4,p-k*(1-1.4),0,p-k/2);c.lineTo(0,k/2);c.close();c.end()};N.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=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 k*=
+l,new mxRectangle(c.x,c.y+k,q,l-2*k);k*=q;return new mxRectangle(c.x+k,c.y,q-2*k,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,k,q,l,p){k=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-k/2);c.quadTo(3*l/4,p-1.4*k,l/2,p-k/2);c.quadTo(l/4,p-k*(1-1.4),0,p-k/2);c.lineTo(0,k/2);c.close();c.end()};mxCellRenderer.registerShape("document",Q);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,k,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 k=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*k),0,0)}return null};B.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(k/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*k*this.scale),0,Math.max(0,.3*k*this.scale))}return null};F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=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;k=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-k));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-k)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-k))}return new mxRectangle(0,Math.min(c.height,k),0,0)}return null};H.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 k=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,k*this.scale),0,Math.max(0,k*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,k,q,l,p){k="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(k,0),new mxPoint(l,0),new mxPoint(l-k,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("parallelogram",T);mxUtils.extend(R,mxActor);R.prototype.size=.2;R.prototype.fixedSize=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(c,k,q,l,p){k="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(k,0),new mxPoint(l-k,0),new mxPoint(l,p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("trapezoid",R);mxUtils.extend(ba,mxActor);ba.prototype.size=.5;ba.prototype.redrawPath=function(c,k,q,l,p){c.setFillColor(null);
+k=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(k,0),new mxPoint(k,p/2),new mxPoint(0,p/2),new mxPoint(k,p/2),new mxPoint(k,p),new mxPoint(l,p)],this.isRounded,q,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",ba);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(c,k,q,l,p){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+k=l/5;c.rect(0,0,k,p);c.fillAndStroke();c.rect(2*k,0,k,p);c.fillAndStroke();c.rect(4*k,0,k,p);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",S);P.prototype.moveTo=function(c,k){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;this.firstX=c;this.firstY=k};P.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)};
+P.prototype.quadTo=function(c,k,q,l){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=l};P.prototype.curveTo=function(c,k,q,l,p,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=p;this.lastY=v};P.prototype.arcTo=function(c,k,q,l,p,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};P.prototype.lineTo=function(c,k){if(null!=this.lastX&&null!=this.lastY){var q=function(M){return"number"===typeof M?M?0>M?-1:1:M===M?0:NaN:NaN},l=Math.abs(c-
+this.lastX),p=Math.abs(k-this.lastY),v=Math.sqrt(l*l+p*p);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;return}var w=Math.round(v/10),I=this.defaultVariation;5>w&&(w=5,I/=3);var y=q(c-this.lastX)*l/w;q=q(k-this.lastY)*p/w;l/=v;p/=v;for(v=0;v<w;v++){var Z=(Math.random()-.5)*I;this.originalLineTo.call(this.canvas,y*v+this.lastX-Z*p,q*v+this.lastY-Z*l)}this.originalLineTo.call(this.canvas,c,k)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=
+k};P.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var bb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){bb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var pb=mxShape.prototype.afterPaint;
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 P(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 vb=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"))&&vb.apply(this,arguments)};var wb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,h,q,l,p){if(null==c.handJiggle||c.handJiggle.constructor!=P)wb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+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"))&&vb.apply(this,arguments)};var wb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,k,q,l,p){if(null==c.handJiggle||c.handJiggle.constructor!=P)wb.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(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.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};
-X.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",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(ja,mxRectangleShape);ja.prototype.paintBackground=function(c,h,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};ja.prototype.paintForeground=function(c,h,q,l,p){};mxCellRenderer.registerShape("transparent",ja);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};fa.prototype.isRoundable=function(){return!0};fa.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)))),H=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+H),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",fa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.fixedSize=20;ra.prototype.isRoundable=function(){return!0};ra.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",
-ra);mxUtils.extend(K,mxHexagon);K.prototype.size=.25;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.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",K);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.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",
-V);var $a=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){$a.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),$a.apply(this,[c,h,q,l,p]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.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};O.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 H=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Z=this.style["symbol"+v+"Width"],M=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ca,
-Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Qa+=Ka);Ka=h;var la=q;Ka=H==mxConstants.ALIGN_CENTER?Ka+(l-Z)/2:H==mxConstants.ALIGN_RIGHT?Ka+(l-Z-Ca):Ka+Ca;la=y==mxConstants.ALIGN_MIDDLE?la+(p-M)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-M-Qa):la+Qa;c.save();H=new w;H.style=this.style;w.prototype.paintVertexShape.call(H,c,Ka,la,Z,M);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
-O);mxUtils.extend(T,mxCylinder);T.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",T);mxUtils.extend(J,mxShape);J.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",J);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(ia,mxEllipse);ia.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",ia);mxUtils.extend(na,mxShape);na.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",na);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(da,mxRectangleShape);da.prototype.size=
-40;da.prototype.isHtmlAllowed=function(){return!1};da.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)};da.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!=da&&(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())};da.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",da);mxUtils.extend(sa,mxShape);sa.prototype.width=60;sa.prototype.height=30;sa.prototype.corner=10;sa.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))};sa.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)))),H=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,H-1.5*v));c.lineTo(h+Math.max(0,w-v),q+H);c.lineTo(h,q+H);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+H);c.stroke()};mxCellRenderer.registerShape("umlFrame",sa);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=da.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",fa.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?S.prototype.fixedSize:S.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=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(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+p),new mxPoint(w+
-y,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H)]):(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y,H),new mxPoint(w+y-p,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,H)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(H,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?Q.prototype.fixedSize:Q.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=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)),H=[new mxPoint(w+p,H),new mxPoint(w+y-p,H),new mxPoint(w+y,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,H)]):h==mxConstants.DIRECTION_WEST?
-(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H),new mxPoint(w+y-p,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,H)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+p),new mxPoint(w+y,H),new mxPoint(w+y,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z-p),new mxPoint(w,H+Z),new mxPoint(w,
-H)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(H,c,q)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?ra.prototype.fixedSize:ra.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=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_EAST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y-p,H),new mxPoint(w+y,c),new mxPoint(w+y-p,H+Z),new mxPoint(w,H+Z),new mxPoint(w+p,c),new mxPoint(w,H)]):h==mxConstants.DIRECTION_WEST?(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y,H),new mxPoint(w+y-p,c),new mxPoint(w+
-y,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,c),new mxPoint(w+p,H)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+p),new mxPoint(M,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z),new mxPoint(M,H+Z-p),new mxPoint(w,H+Z),new mxPoint(w,H+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(M,H+p),new mxPoint(w+y,H),new mxPoint(w+y,H+Z-p),new mxPoint(M,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H)]);M=new mxPoint(M,
-c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(H,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?K.prototype.fixedSize:K.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,H=c.y,y=c.width,Z=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(Z,v)):Z*Math.max(0,Math.min(1,v)),H=[new mxPoint(M,H),new mxPoint(w+y,H+p),new mxPoint(w+y,H+Z-p),new mxPoint(M,H+Z),new mxPoint(w,H+Z-p),new mxPoint(w,H+p),new mxPoint(M,H)]):(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+p,H),new mxPoint(w+y-p,H),new mxPoint(w+y,c),new mxPoint(w+y-p,H+Z),new mxPoint(w+p,H+Z),new mxPoint(w,c),new mxPoint(w+p,H)]);M=new mxPoint(M,
-c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(H,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(Ja,
-mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.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",Ja);mxUtils.extend(Ia,
-mxShape);Ia.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",Ia);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(Ba,mxCylinder);Ba.prototype.jettyWidth=20;Ba.prototype.jettyHeight=10;Ba.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 H=Math.min(h,p-h),y=Math.min(H+2*h,p-h);v?(c.moveTo(q,H),c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(q,H+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,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(q,H),c.close());c.end()};mxCellRenderer.registerShape("module",Ba);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=32;qa.prototype.jettyHeight=12;qa.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 H=.3*p-h/2,y=.7*p-h/2;v?(c.moveTo(q,H),c.lineTo(w,H),c.lineTo(w,H+h),c.lineTo(q,H+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,H+h),c.lineTo(0,H+h),c.lineTo(0,H),c.lineTo(q,H),c.close());c.end()};mxCellRenderer.registerShape("component",qa);mxUtils.extend(Ea,mxRectangleShape);Ea.prototype.paintForeground=
-function(c,h,q,l,p){var v=l/2,w=p/2,H=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,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ea);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,
+v,p*v)),c.moveTo(k+v,q),c.lineTo(k+l-v,q),c.quadTo(k+l,q,k+l,q+v),c.lineTo(k+l,q+p-v),c.quadTo(k+l,q+p,k+l-v,q+p),c.lineTo(k+v,q+p),c.quadTo(k,q+p,k,q+p-v),c.lineTo(k,q+v),c.quadTo(k,q,k+v,q)):(c.moveTo(k,q),c.lineTo(k+l,q),c.lineTo(k+l,q+p),c.lineTo(k,q+p),c.lineTo(k,q)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.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 k=c.width,q=c.height;c=new mxRectangle(c.x,c.y,k,q);var l=k*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(k*p,q*p))}c.x+=Math.round(l);c.width-=Math.round(2*l);return c}return c};
+X.prototype.paintForeground=function(c,k,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(k+w,q);c.lineTo(k+w,q+p);c.moveTo(k+l-w,q);c.lineTo(k+l-w,q+p);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(ja,mxRectangleShape);ja.prototype.paintBackground=function(c,k,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(k,q,l,p);c.fill()};ja.prototype.paintForeground=function(c,k,q,l,p){};mxCellRenderer.registerShape("transparent",ja);mxUtils.extend(fa,mxHexagon);fa.prototype.size=30;fa.prototype.position=.5;fa.prototype.position2=.5;fa.prototype.base=20;fa.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(c,k,q,l,p){k=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,k,!0,[4])};mxCellRenderer.registerShape("callout",fa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.fixedSize=20;ra.prototype.isRoundable=function(){return!0};ra.prototype.redrawPath=function(c,k,
+q,l,p){k="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-k,0),new mxPoint(l,p/2),new mxPoint(l-k,p),new mxPoint(0,p),new mxPoint(k,p/2)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("step",
+ra);mxUtils.extend(K,mxHexagon);K.prototype.size=.25;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,k,q,l,p){k="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(k,
+0),new mxPoint(l-k,0),new mxPoint(l,.5*p),new mxPoint(l-k,p),new mxPoint(k,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",K);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,k,q,l,p){var v=Math.min(l/5,p/5)+1;c.begin();c.moveTo(k+l/2,q+v);c.lineTo(k+l/2,q+p-v);c.moveTo(k+v,q+p/2);c.lineTo(k+l-v,q+p/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+V);var $a=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var k=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+k,c.y+k,c.width-2*k,c.height-2*k)}return c};mxRhombus.prototype.paintVertexShape=function(c,k,q,l,p){$a.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);k+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(c.setShadow(!1),$a.apply(this,[c,k,q,l,p]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var k=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+k,c.y+k,c.width-2*k,c.height-2*k)}return c};O.prototype.paintForeground=function(c,k,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);k+=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"],Z=this.style["symbol"+v+"Width"],M=this.style["symbol"+v+"Height"],Ca=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ca,
+Ka=this.style["symbol"+v+"ArcSpacing"];null!=Ka&&(Ka*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ca+=Ka,Qa+=Ka);Ka=k;var la=q;Ka=I==mxConstants.ALIGN_CENTER?Ka+(l-Z)/2:I==mxConstants.ALIGN_RIGHT?Ka+(l-Z-Ca):Ka+Ca;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,Ka,la,Z,M);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
+O);mxUtils.extend(U,mxCylinder);U.prototype.redrawPath=function(c,k,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",U);mxUtils.extend(J,mxShape);J.prototype.paintBackground=function(c,k,q,l,p){c.translate(k,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",J);mxUtils.extend(aa,mxShape);aa.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};aa.prototype.paintBackground=function(c,k,q,l,p){c.translate(k,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",
+aa);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,k,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(k+l/8,q+p);c.lineTo(k+7*l/8,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ia);mxUtils.extend(na,mxShape);na.prototype.paintVertexShape=function(c,k,q,l,p){c.translate(k,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",na);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,k,q,l,p){c.translate(k,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,k,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(da,mxRectangleShape);da.prototype.size=
+40;da.prototype.isHtmlAllowed=function(){return!1};da.prototype.getLabelBounds=function(c){var k=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,k)};da.prototype.paintBackground=function(c,k,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,k,q,l,v):(w=this.state.view.graph.cellRenderer.getShape(w),null!=w&&w!=da&&(w=new w,w.apply(this.state),c.save(),w.paintVertexShape(c,k,q,l,v),c.restore()));v<p&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(k+l/2,q+v),c.lineTo(k+l/2,q+p),c.end(),c.stroke())};da.prototype.paintForeground=function(c,k,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,k,q,l,
+Math.min(p,v))};mxCellRenderer.registerShape("umlLifeline",da);mxUtils.extend(sa,mxShape);sa.prototype.width=60;sa.prototype.height=30;sa.prototype.corner=10;sa.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))};sa.prototype.paintBackground=function(c,k,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(k,q,l,p),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,k,q,l,p),c.setGradient(this.fill,this.gradient,k,q,l,p,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(k,q);c.lineTo(k+w,q);c.lineTo(k+w,q+Math.max(0,I-1.5*v));c.lineTo(k+Math.max(0,w-v),q+I);c.lineTo(k,q+I);c.close();c.fillAndStroke();c.begin();c.moveTo(k+w,q);c.lineTo(k+l,q);c.lineTo(k+l,q+p);c.lineTo(k,q+p);c.lineTo(k,q+I);c.stroke()};mxCellRenderer.registerShape("umlFrame",sa);mxPerimeter.CenterPerimeter=function(c,k,q,l){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,k,
+q,l){l=da.prototype.size;null!=k&&(l=mxUtils.getValue(k.style,"size",l)*k.view.scale);k=parseFloat(k.style[mxConstants.STYLE_STROKEWIDTH]||1)*k.view.scale/2-1;q.x<c.getCenterX()&&(k=-1*(k+1));return new mxPoint(c.getCenterX()+k,Math.min(c.y+c.height,Math.max(c.y+l,q.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,k,q,l){l=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,k,q,l){l=parseFloat(k.style[mxConstants.STYLE_STROKEWIDTH]||1)*k.view.scale/2-1;null!=k.style.backboneSize&&(l+=parseFloat(k.style.backboneSize)*k.view.scale/2-1);if("south"==k.style[mxConstants.STYLE_DIRECTION]||"north"==k.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,k,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(k.style,"size",fa.prototype.size))*k.view.scale))),k.style),k,q,l)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+k,q,l){var p="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=p?T.prototype.fixedSize:T.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));p&&(v*=k.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height;k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+
+y,I+Z),new mxPoint(w,I+Z-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+Z),new mxPoint(w,I+Z),new mxPoint(w+p,I)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,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,k,q,l){var p="0"!=mxUtils.getValue(k.style,
+"fixedSize","0"),v=p?R.prototype.fixedSize:R.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));p&&(v*=k.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height;k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==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+Z),new mxPoint(w,I+Z),new mxPoint(w+p,I)]):k==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+Z),new mxPoint(w+p,I+Z),new mxPoint(w,I)]):k==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I+p),new mxPoint(w+y,I),new mxPoint(w+y,I+Z),new mxPoint(w,I+Z-p),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Z-p),new mxPoint(w,I+Z),new mxPoint(w,
+I)]);Z=c.getCenterX();c=c.getCenterY();c=new mxPoint(Z,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("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,k,q,l){var p="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=p?ra.prototype.fixedSize:ra.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));p&&(v*=k.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height,M=c.getCenterX();c=c.getCenterY();k=null!=
+k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_EAST?(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-p,I),new mxPoint(w+y,c),new mxPoint(w+y-p,I+Z),new mxPoint(w,I+Z),new mxPoint(w+p,c),new mxPoint(w,I)]):k==mxConstants.DIRECTION_WEST?(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,I),new mxPoint(w+y-p,c),new mxPoint(w+
+y,I+Z),new mxPoint(w+p,I+Z),new mxPoint(w,c),new mxPoint(w+p,I)]):k==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Z,v)):Z*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+Z),new mxPoint(M,I+Z-p),new mxPoint(w,I+Z),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Z,v)):Z*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+Z-p),new mxPoint(M,I+Z),new mxPoint(w,I+Z-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,k,q,l){var p="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=p?K.prototype.fixedSize:K.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));p&&(v*=k.view.scale);var w=c.x,I=c.y,y=c.width,Z=c.height,M=c.getCenterX();c=c.getCenterY();k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):
+mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Z,v)):Z*Math.max(0,Math.min(1,v)),I=[new mxPoint(M,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Z-p),new mxPoint(M,I+Z),new mxPoint(w,I+Z-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+Z),new mxPoint(w+p,I+Z),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(ta,mxShape);ta.prototype.size=10;ta.prototype.paintBackground=function(c,k,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(k,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(Ja,
+mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(c,k,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(k,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",Ja);mxUtils.extend(Ia,
+mxShape);Ia.prototype.paintBackground=function(c,k,q,l,p){c.translate(k,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",Ia);mxUtils.extend(ua,mxShape);ua.prototype.inset=2;ua.prototype.paintBackground=function(c,k,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(k,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(Ba,mxCylinder);Ba.prototype.jettyWidth=20;Ba.prototype.jettyHeight=10;Ba.prototype.redrawPath=function(c,k,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=Math.min(k,p-k),y=Math.min(I+2*k,p-k);v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+k),c.lineTo(q,I+k),c.moveTo(q,
+y),c.lineTo(w,y),c.lineTo(w,y+k),c.lineTo(q,y+k)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+k),c.lineTo(0,y+k),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+k),c.lineTo(0,I+k),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ba);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=32;qa.prototype.jettyHeight=12;qa.prototype.redrawPath=function(c,k,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,
+"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=.3*p-k/2,y=.7*p-k/2;v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+k),c.lineTo(q,I+k),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+k),c.lineTo(q,y+k)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+k),c.lineTo(0,y+k),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+k),c.lineTo(0,I+k),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("component",qa);mxUtils.extend(Ea,mxRectangleShape);Ea.prototype.paintForeground=
+function(c,k,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(k+v,q),new mxPoint(k+l,q+w),new mxPoint(k+v,q+p),new mxPoint(k,q+w)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ea);mxUtils.extend(Ua,mxDoubleEllipse);Ua.prototype.outerStroke=!0;Ua.prototype.paintVertexShape=function(c,k,q,l,p){var v=Math.min(4,
+Math.min(l/5,p/5));0<l&&0<p&&(c.ellipse(k+v,q+v,l-2*v,p-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(k,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(ab,mxArrowConnector);ab.prototype.defaultWidth=10;ab.prototype.defaultArrowWidth=20;ab.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ab.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ab.prototype.getEdgeWidth=
-function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ab);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(c,h,q,l,p){h=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(0,p),new mxPoint(0,h),new mxPoint(l,
-0),new mxPoint(l,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ya);mxUtils.extend(Va,mxRectangleShape);Va.prototype.dx=20;Va.prototype.dy=20;Va.prototype.isHtmlAllowed=function(){return!1};Va.prototype.paintForeground=function(c,h,q,l,p){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;v=Math.max(v,Math.min(l*w,p*w))}w=
-Math.max(v,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(h,q+v);c.lineTo(h+l,q+v);c.end();c.stroke();c.begin();c.moveTo(h+w,q);c.lineTo(h+w,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Va);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=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,q),new mxPoint(h,q),new mxPoint(h,p),new mxPoint(0,p)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("corner",Za);mxUtils.extend(kb,mxActor);kb.prototype.redrawPath=function(c,h,q,
-l,p){c.moveTo(0,0);c.lineTo(0,p);c.end();c.moveTo(l,0);c.lineTo(l,p);c.end();c.moveTo(0,p/2);c.lineTo(l,p/2);c.end()};mxCellRenderer.registerShape("crossbar",kb);mxUtils.extend(cb,mxActor);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.redrawPath=function(c,h,q,l,p){h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=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,q),new mxPoint((l+h)/2,q),new mxPoint((l+h)/2,p),new mxPoint((l-h)/2,p),new mxPoint((l-h)/2,q),new mxPoint(0,q)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("tee",cb);mxUtils.extend(ca,mxActor);ca.prototype.arrowWidth=.3;ca.prototype.arrowSize=.2;ca.prototype.redrawPath=function(c,h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
-this.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.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,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(0,v)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ca);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(c,
-h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.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(G,mxActor);G.prototype.size=20;
-G.prototype.isRoundable=function(){return!0};G.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",G);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(Y,mxEllipse);Y.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",Y);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(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(wa,mxEllipse);wa.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",wa);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=
-function(c,h,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,H=q+p-w/2;c.begin();c.moveTo(h,q);c.lineTo(h,q+p);c.moveTo(h+v,H);c.lineTo(h+v+w,H-w/2);c.moveTo(h+v,H);c.lineTo(h+v+w,H+w/2);c.moveTo(h+v,H);c.lineTo(h+l-v,H);c.moveTo(h+l,q);c.lineTo(h+l,q+p);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H-w/2);c.moveTo(h+l-v,H);c.lineTo(h+l-w-v,H+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",za);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.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 H="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Z="1"==mxUtils.getValue(this.style,"right","1"),M="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||H||Z||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||H?c.lineTo(h+l,q):c.moveTo(h+l,q),this.outline||Z?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",Da);mxUtils.extend(La,mxEllipse);La.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(h+l/2,q),c.lineTo(h+l/2,q+p)):(c.moveTo(h,q+p/2),c.lineTo(h+l,q+p/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",La);mxUtils.extend(Ma,mxActor);Ma.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/2);c.moveTo(0,0);c.lineTo(l-h,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-h,p);c.lineTo(0,p);c.close();c.end()};mxCellRenderer.registerShape("delay",Ma);mxUtils.extend(Ha,mxActor);Ha.prototype.size=
-.2;Ha.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(p,l);var v=Math.max(0,Math.min(h,h*parseFloat(mxUtils.getValue(this.style,"size",this.size))));h=(p-v)/2;q=h+v;var w=(l-v)/2;v=w+v;c.moveTo(0,h);c.lineTo(w,h);c.lineTo(w,0);c.lineTo(v,0);c.lineTo(v,h);c.lineTo(l,h);c.lineTo(l,q);c.lineTo(v,q);c.lineTo(v,p);c.lineTo(w,p);c.lineTo(w,q);c.lineTo(0,q);c.close();c.end()};mxCellRenderer.registerShape("cross",Ha);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(c,
-h,q,l,p){h=Math.min(l,p/2);q=Math.min(l-h,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.moveTo(0,p/2);c.lineTo(q,0);c.lineTo(l-h,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-h,p);c.lineTo(q,p);c.close();c.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(Ga,mxActor);Ga.prototype.cst={RECT2:"mxgraph.basic.rect"};Ga.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
+function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ab);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(c,k,q,l,p){k=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(0,p),new mxPoint(0,k),new mxPoint(l,
+0),new mxPoint(l,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ya);mxUtils.extend(Va,mxRectangleShape);Va.prototype.dx=20;Va.prototype.dy=20;Va.prototype.isHtmlAllowed=function(){return!1};Va.prototype.paintForeground=function(c,k,q,l,p){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;v=Math.max(v,Math.min(l*w,p*w))}w=
+Math.max(v,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(k,q+v);c.lineTo(k+l,q+v);c.end();c.stroke();c.begin();c.moveTo(k+w,q);c.lineTo(k+w,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Va);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,k,q,l,p){k=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=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,q),new mxPoint(k,q),new mxPoint(k,p),new mxPoint(0,p)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("corner",Za);mxUtils.extend(kb,mxActor);kb.prototype.redrawPath=function(c,k,q,
+l,p){c.moveTo(0,0);c.lineTo(0,p);c.end();c.moveTo(l,0);c.lineTo(l,p);c.end();c.moveTo(0,p/2);c.lineTo(l,p/2);c.end()};mxCellRenderer.registerShape("crossbar",kb);mxUtils.extend(cb,mxActor);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.redrawPath=function(c,k,q,l,p){k=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=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,q),new mxPoint((l+k)/2,q),new mxPoint((l+k)/2,p),new mxPoint((l-k)/2,p),new mxPoint((l-k)/2,q),new mxPoint(0,q)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("tee",cb);mxUtils.extend(ca,mxActor);ca.prototype.arrowWidth=.3;ca.prototype.arrowSize=.2;ca.prototype.redrawPath=function(c,k,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
+this.arrowWidth))));k=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.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,q),new mxPoint(l-k,q),new mxPoint(l-k,0),new mxPoint(l,p/2),new mxPoint(l-k,p),new mxPoint(l-k,v),new mxPoint(0,v)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ca);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(c,
+k,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth))));k=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.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(k,0),new mxPoint(k,q),new mxPoint(l-k,q),new mxPoint(l-k,0),new mxPoint(l,p/2),new mxPoint(l-k,p),new mxPoint(l-k,v),new mxPoint(k,
+v),new mxPoint(k,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,k,q,l,p){k="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(k,0);c.lineTo(l,0);c.quadTo(l-2*k,p/2,l,p);c.lineTo(k,p);c.quadTo(k-
+2*k,p/2,k,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",z);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,k,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,k,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(G,mxActor);G.prototype.size=20;
+G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(c,k,q,l,p){k=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(k,0),new mxPoint(l-k,0),new mxPoint(l,.8*k),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*k)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("loopLimit",G);mxUtils.extend(L,mxActor);L.prototype.size=
+.375;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,k,q,l,p){k=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-k),new mxPoint(l/2,p),new mxPoint(0,p-k)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",L);mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=
+function(c,k,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(k+l/2,q+p);c.lineTo(k+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",Y);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(c,k,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(k,q+p/2);c.lineTo(k+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(k+l/2,q);c.lineTo(k+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",
+ha);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,k,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(k+.145*l,q+.145*p);c.lineTo(k+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(k+.855*l,q+.145*p);c.lineTo(k+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ea);mxUtils.extend(ka,mxRhombus);ka.prototype.paintVertexShape=function(c,k,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(k,q+p/2);c.lineTo(k+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ka);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(c,k,q,l,p){c.begin();c.moveTo(k,q);c.lineTo(k+l,q);c.lineTo(k+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(k,q+p);c.lineTo(k+l,q+p);c.lineTo(k+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",wa);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=
+function(c,k,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,I=q+p-w/2;c.begin();c.moveTo(k,q);c.lineTo(k,q+p);c.moveTo(k+v,I);c.lineTo(k+v+w,I-w/2);c.moveTo(k+v,I);c.lineTo(k+v+w,I+w/2);c.moveTo(k+v,I);c.lineTo(k+l-v,I);c.moveTo(k+l,q);c.lineTo(k+l,q+p);c.moveTo(k+l-v,I);c.lineTo(k+l-w-v,I-w/2);c.moveTo(k+l-v,I);c.lineTo(k+l-w-v,I+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",za);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(c,k,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"),Z="1"==mxUtils.getValue(this.style,"right","1"),M="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||I||Z||M||y?(c.rect(k,q,l,p),c.fill(),c.pointerEvents=
+v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(k,q),this.outline||I?c.lineTo(k+l,q):c.moveTo(k+l,q),this.outline||Z?c.lineTo(k+l,q+p):c.moveTo(k+l,q+p),this.outline||M?c.lineTo(k,q+p):c.moveTo(k,q+p),(this.outline||y)&&c.lineTo(k,q),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(La,mxEllipse);La.prototype.paintVertexShape=function(c,k,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(k+l/2,q),c.lineTo(k+l/2,q+p)):(c.moveTo(k,q+p/2),c.lineTo(k+l,q+p/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",La);mxUtils.extend(Ma,mxActor);Ma.prototype.redrawPath=function(c,k,q,l,p){k=Math.min(l,p/2);c.moveTo(0,0);c.lineTo(l-k,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-k,p);c.lineTo(0,p);c.close();c.end()};mxCellRenderer.registerShape("delay",Ma);mxUtils.extend(Ha,mxActor);Ha.prototype.size=
+.2;Ha.prototype.redrawPath=function(c,k,q,l,p){k=Math.min(p,l);var v=Math.max(0,Math.min(k,k*parseFloat(mxUtils.getValue(this.style,"size",this.size))));k=(p-v)/2;q=k+v;var w=(l-v)/2;v=w+v;c.moveTo(0,k);c.lineTo(w,k);c.lineTo(w,0);c.lineTo(v,0);c.lineTo(v,k);c.lineTo(l,k);c.lineTo(l,q);c.lineTo(v,q);c.lineTo(v,p);c.lineTo(w,p);c.lineTo(w,q);c.lineTo(0,q);c.close();c.end()};mxCellRenderer.registerShape("cross",Ha);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.25;Fa.prototype.redrawPath=function(c,
+k,q,l,p){k=Math.min(l,p/2);q=Math.min(l-k,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.moveTo(0,p/2);c.lineTo(q,0);c.lineTo(l-k,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,l-k,p);c.lineTo(q,p);c.close();c.end()};mxCellRenderer.registerShape("display",Fa);mxUtils.extend(Ga,mxActor);Ga.prototype.cst={RECT2:"mxgraph.basic.rect"};Ga.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",
dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",
dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",
type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},
{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",
-enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];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),H=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,
+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,k,q,l,p){c.translate(k,q);this.strictDrawShape(c,0,0,l,p)};Ga.prototype.strictDrawShape=function(c,k,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)))),Z=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)))),Ca=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Qa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ka=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),oa=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.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Aa=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Ab=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Bb=v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),xb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),zb=v&&v.gradientColor2?
-v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Cb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Db=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Eb=Math.max(0,Math.min(50,y));v=Ga.prototype;c.setDashed(Ca);Qa&&""!=Qa&&c.setDashPattern(Qa);c.setStrokeWidth(Bb);y=Math.min(.5*p,.5*l,y);H||(y=Eb*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));H||(M=Math.min(Ka*Math.min(l,p)/100));M=Math.min(M,.5*Math.min(l,
-p)-y);(la||pa||oa||ma)&&"frame"!=Z&&(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,oa),oa&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),ma&&v.paintSW(c,h,q,l,p,w,Aa,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(xb),Ca=H=Db,"none"==xb&&(H=0),"none"==zb&&(Ca=0),c.setGradient(xb,zb,0,0,l,p,Cb,H,Ca),
-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,Aa,y,M,oa,ma),ma&&oa&&v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),oa&&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"==Ab&&(c.begin(),v.paintFolds(c,h,q,l,p,w,va,xa,ya,Aa,y,la,pa,oa,ma),c.stroke()));
-la||pa||oa||!ma?la||pa||!oa||ma?!la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),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,Aa,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la||!pa||oa||ma?!la&&pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,M,oa,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,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),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,oa),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,Aa,y,M,oa,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,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&oa&&
-!ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,
-h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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&&oa&&ma?"frame"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,M,oa,ma),
-v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),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,Aa,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),
-v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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||oa||ma?la&&!pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,oa),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"==Z&&(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,Aa,y,M,oa,
-ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,oa),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,Aa,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&!pa&&oa&&!ma?"frame"!=Z?(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"==Z&&(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,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),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,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,
-Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),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"==Z&&(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,Aa,y,M,oa,ma),v.paintSWInner(c,
-h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),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,Aa,y,M,oa,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,
-l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&pa&&!oa&&!ma?"frame"!=Z?(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,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),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,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),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&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,oa),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,oa),"double"==Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),
-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,Aa,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,oa),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,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),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,Aa,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&pa&&oa&&!ma?"frame"!=Z?(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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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&&oa&&ma&&("frame"!=Z?(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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,Aa,
-y,M,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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,Aa,y,M,oa,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,oa),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),v.moveSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),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,Aa,y,M,
-oa,ma),c.close(),c.fillAndStroke())):"frame"!=Z?(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"==Z&&(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"!=Z?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,oa),"double"==
-Z&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,oa),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,oa),v.lineSEInner(c,h,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,
-h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,oa),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,oa),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,Aa,y,M,oa,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,va,xa,ya,Aa,y,la,pa,oa,ma);c.stroke()};Ga.prototype.moveNW=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,H)};Ga.prototype.moveNE=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-H,0)};Ga.prototype.moveSE=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-H)};Ga.prototype.moveSW=
-function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,p):c.moveTo(H,p)};Ga.prototype.paintNW=function(c,h,q,l,p,v,w,H,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(H,H,0,0,h,H,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(H,0);else c.lineTo(0,0)};Ga.prototype.paintTop=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==
-w&&"square"==v||!y?c.lineTo(l,0):c.lineTo(l-H,0)};Ga.prototype.paintNE=function(c,h,q,l,p,v,w,H,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(H,H,0,0,h,l,H)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l,H);else c.lineTo(l,0)};Ga.prototype.paintRight=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(l,p):c.lineTo(l,p-
-H)};Ga.prototype.paintLeft=function(c,h,q,l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,H)};Ga.prototype.paintSE=function(c,h,q,l,p,v,w,H,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(H,H,0,0,h,l-H,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-H,p);else c.lineTo(l,p)};Ga.prototype.paintBottom=function(c,h,q,
-l,p,v,w,H,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,p):c.lineTo(H,p)};Ga.prototype.paintSW=function(c,h,q,l,p,v,w,H,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(H,H,0,0,h,0,p-H)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(0,p-H);else c.lineTo(0,p)};Ga.prototype.paintNWInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"==
-w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,y,.5*y+H);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,y,y+H);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(y,.5*y+H);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+H,y+H),c.lineTo(y,y+H)};Ga.prototype.paintTopInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(0,y):Z&&!M?c.lineTo(y,0):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==
-v?c.lineTo(H+.5*y,y):c.lineTo(H+y,y):c.lineTo(0,y):c.lineTo(0,0)};Ga.prototype.paintNEInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,l-H-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,l-H-y,y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-H-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-H-y,H+y),c.lineTo(l-H-y,y)};Ga.prototype.paintRightInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&
-M?c.lineTo(l-y,0):Z&&!M?c.lineTo(l,y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,H+.5*y):c.lineTo(l-y,H+y):c.lineTo(l-y,0):c.lineTo(l,0)};Ga.prototype.paintLeftInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(y,p):Z&&!M?c.lineTo(0,p-y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-H-.5*
-y):c.lineTo(y,p-H-y):c.lineTo(y,p):c.lineTo(0,p)};Ga.prototype.paintSEInner=function(c,h,q,l,p,v,w,H,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,l-y,p-H-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,l-y,p-H-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-y,p-H-.5*y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-H-y,p-H-y),c.lineTo(l-y,p-H-y)};Ga.prototype.paintBottomInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(l,
-p-y):Z&&!M?c.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Z?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-H-.5*y,p-y):c.lineTo(l-H-y,p-y):c.lineTo(l,p)};Ga.prototype.paintSWInner=function(c,h,q,l,p,v,w,H,y,Z){if(!Z)c.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)c.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,H+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(H+
-y,H+y,0,0,1,H+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(H+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+H,p-H-y),c.lineTo(y+H,p-y)};Ga.prototype.moveSWInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,p-H-y):c.moveTo(0,p-y)};Ga.prototype.lineSWInner=
-function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,p-H-y):c.lineTo(0,p-y)};Ga.prototype.moveSEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-
-y,p-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,p-H-y):c.moveTo(l-y,p)};Ga.prototype.lineSEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"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-H-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,p-H-y):c.lineTo(l-y,p)};Ga.prototype.moveNEInner=function(c,h,
-q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-y,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,H+y):c.moveTo(l,y)};Ga.prototype.lineNEInner=function(c,h,q,l,p,v,w,H,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,H+.5*y):
-("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,H+y):c.lineTo(l,y)};Ga.prototype.moveNWInner=function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.moveTo(y,0):Z&&!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,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,H+y):c.moveTo(0,0)};Ga.prototype.lineNWInner=
-function(c,h,q,l,p,v,w,H,y,Z,M){Z||M?!Z&&M?c.lineTo(y,0):Z&&!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,H+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,H+y):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,h,q,l,p,v,w,H,y,Z,M,Ca,Qa,Ka,la){if("fold"==v||"fold"==w||"fold"==H||"fold"==y||"fold"==Z)("fold"==w||"default"==w&&"fold"==v)&&
-Ca&&la&&(c.moveTo(0,M),c.lineTo(M,M),c.lineTo(M,0)),("fold"==H||"default"==H&&"fold"==v)&&Ca&&Qa&&(c.moveTo(l-M,0),c.lineTo(l-M,M),c.lineTo(l,M)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Qa&&(c.moveTo(l-M,p),c.lineTo(l-M,p-M),c.lineTo(l,p-M)),("fold"==Z||"default"==Z&&"fold"==v)&&Ka&&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;
-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,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2);c.stroke()}});mxMarker.addMarker("box",
-function(c,h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.x+M/2,Ka=l.y+Ca/2;l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa-M/2-Ca/2,Ka-Ca/2+M/2);c.lineTo(Qa-M/2+Ca/2,Ka-Ca/2-M/2);c.lineTo(Qa+Ca/2-3*M/2,Ka-3*Ca/2-M/2);c.lineTo(Qa-Ca/2-3*M/2,Ka-3*Ca/2+M/2);c.close();Z?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2);
-c.moveTo(l.x-M/2+Ca/2,l.y-Ca/2-M/2);c.lineTo(l.x-Ca/2-3*M/2,l.y-3*Ca/2+M/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,h,q,l,p,v,w,H,y,Z){var M=l.clone(),Ca=Pa.apply(this,arguments),Qa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);c.begin();c.moveTo(M.x-p*y,M.y-v*y);c.lineTo(M.x-2*Qa+p*y,M.y-2*Ka+v*y);c.moveTo(M.x-Qa-Ka+v*y,M.y-Ka+Qa-p*y);c.lineTo(M.x+Ka-Qa-v*y,M.y-Ka-Qa+p*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,
-h,q,l,p,v,w,H,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.clone();l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa.x-Ca,Qa.y+M);c.quadTo(l.x-Ca,l.y+M,l.x,l.y);c.quadTo(l.x+Ca,l.y-M,Qa.x+Ca,Qa.y-M);c.stroke()}});mxMarker.addMarker("async",function(c,h,q,l,p,v,w,H,y,Z){h=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var M=l.clone();M.x-=h;M.y-=q;l.x+=-p-h;l.y+=-v-q;return function(){c.begin();c.moveTo(M.x,M.y);H?c.lineTo(M.x-p-v/2,M.y-v+p/2):c.lineTo(M.x+v/2-p,M.y-v-p/2);c.lineTo(M.x-p,M.y-v);c.close();Z?c.fillAndStroke():
-c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(h,q,l,p,v,w,H,y,Z,M){v*=H+Z;w*=H+Z;var Ca=p.clone();return function(){h.begin();h.moveTo(Ca.x,Ca.y);y?h.lineTo(Ca.x-v-w/c,Ca.y-w+v/c):h.lineTo(Ca.x+w/c-v,Ca.y-w-v/c);h.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var lb=function(c,h,q){return Wa(c,["width"],h,function(l,p,v,w,H){H=c.shape.getEdgeWidth()*c.view.scale+q;return new mxPoint(w.x+p*l/4+v*H/2,w.y+v*l/4-p*H/2)},function(l,p,v,w,H,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,
-w.y,H.x,H.y,y.x,y.y));c.style.width=Math.round(2*l)/c.view.scale-q})},Wa=function(c,h,q,l,p){return Ra(c,h,function(v){var w=c.absolutePoints,H=w.length-1;v=c.view.translate;var y=c.view.scale,Z=q?w[0]:w[H];w=q?w[1]:w[H-1];H=w.x-Z.x;var M=w.y-Z.y,Ca=Math.sqrt(H*H+M*M);Z=l.call(this,Ca,H/Ca,M/Ca,Z,w);return new mxPoint(Z.x/y-v.x,Z.y/y-v.y)},function(v,w,H){var y=c.absolutePoints,Z=y.length-1;v=c.view.translate;var M=c.view.scale,Ca=q?y[0]:y[Z];y=q?y[1]:y[Z-1];Z=y.x-Ca.x;var Qa=y.y-Ca.y,Ka=Math.sqrt(Z*
-Z+Qa*Qa);w.x=(w.x+v.x)*M;w.y=(w.y+v.y)*M;p.call(this,Ka,Z/Ka,Qa/Ka,Ca,y,w,H)})},gb=function(c,h){return function(q){return[Wa(q,["startWidth"],!0,function(l,p,v,w,H){H=mxUtils.getNumber(q.style,"startWidth",c)*q.view.scale+h;return new mxPoint(w.x+p*l/4+v*H/2,w.y+v*l/4-p*H/2)},function(l,p,v,w,H,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));q.style.startWidth=Math.round(2*l)/q.view.scale-h})]}},hb=function(c){return function(h){return[Ra(h,["arrowWidth","arrowSize"],function(q){var l=
-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(q.x+q.width-l.x)/q.width))})]}},Xa=function(c){return function(h){return[Ra(h,["size"],function(q){var l=
-Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},sb=function(c,h,q){return function(l){var p=[Ra(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",h)))))*c;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,
-w.y-v.y)))/c)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},qb=function(c,h,q,l,p){q=null!=q?q:.5;return function(v){var w=[Ra(v,["size"],function(H){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Z=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:c));return new mxPoint(H.x+Math.max(0,Math.min(.5*H.width,Z*(y?1:H.width))),H.getCenterY())},function(H,y,Z){H=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
-y.x-H.x:Math.max(0,Math.min(q,(y.x-H.x)/H.width));this.state.style.size=H},!1,l)];h&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(fb(v));return w}},ub=function(c,h,q){c=null!=c?c:.5;return function(l){var p=[Ra(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,H=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",w?q:h)));return new mxPoint(v.x+Math.min(.75*v.width*c,H*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=
-null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(c,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},nb=function(){return function(c){var h=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));return h}},fb=function(c,h){return Ra(c,[mxConstants.STYLE_ARCSIZE],function(q){var l=null!=h?h:q.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
+v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Cb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Db=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Eb=Math.max(0,Math.min(50,y));v=Ga.prototype;c.setDashed(Ca);Qa&&""!=Qa&&c.setDashPattern(Qa);c.setStrokeWidth(Bb);y=Math.min(.5*p,.5*l,y);I||(y=Eb*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));I||(M=Math.min(Ka*Math.min(l,p)/100));M=Math.min(M,.5*Math.min(l,
+p)-y);(la||pa||oa||ma)&&"frame"!=Z&&(c.begin(),la?v.moveNW(c,k,q,l,p,w,va,y,ma):c.moveTo(0,0),la&&v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),oa&&v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),ma&&v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(xb),Ca=I=Db,"none"==xb&&(I=0),"none"==zb&&(Ca=0),c.setGradient(xb,zb,0,0,l,p,Cb,I,Ca),
+c.begin(),la?v.moveNWInner(c,k,q,l,p,w,va,y,M,la,ma):c.moveTo(M,0),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),ma&&oa&&v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),oa&&pa&&v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),pa&&la&&v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),la&&ma&&v.paintNWInner(c,k,q,l,p,w,va,y,M),c.fill(),"none"==Ab&&(c.begin(),v.paintFolds(c,k,q,l,p,w,va,xa,ya,Aa,y,la,pa,oa,ma),c.stroke()));
+la||pa||oa||!ma?la||pa||!oa||ma?!la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,
+k,q,l,p,w,va,y,la),v.lineNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la||!pa||oa||ma?!la&&pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,k,q,l,p,w,va,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma)),c.stroke(),c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,
+p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveSW(c,k,q,l,p,w,va,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.lineNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.lineSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&oa&&
+!ma?"frame"!=Z?(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.lineSWInner(c,
+k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),
+v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.lineNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),
+v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la||pa||oa||ma?la&&!pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,
+ma)),c.stroke()):(c.begin(),v.moveSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.lineNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&!pa&&oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,
+k,q,l,p,w,va,y,M,ma,la)),c.stroke(),c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.lineNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.lineSWInner(c,k,q,l,p,w,
+Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&!pa&&oa&&ma?"frame"!=Z?(c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,
+k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.lineNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,
+l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):la&&pa&&!oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),
+v.paintRight(c,k,q,l,p,w,ya,y,oa),v.lineSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&!oa&&ma?"frame"!=Z?(c.begin(),v.moveSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),"double"==Z&&(v.moveSEInner(c,k,q,l,p,w,ya,y,M,oa),
+v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.lineSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,
+k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),c.close(),c.fillAndStroke()):la&&pa&&oa&&!ma?"frame"!=Z?(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,
+k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.lineSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,
+w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&oa&&ma&&("frame"!=Z?(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),c.close(),"double"==Z&&(v.moveSWInner(c,k,q,l,p,w,Aa,
+y,M,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.paintNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,
+l,p,w,ya,y,oa),v.paintSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.paintSW(c,k,q,l,p,w,Aa,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),c.close(),v.moveSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintSWInner(c,k,q,l,p,w,Aa,y,M,oa),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),v.paintSEInner(c,k,q,l,p,w,ya,y,M),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,k,q,l,p,w,xa,y,M),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,k,q,l,p,w,va,y,M),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,
+oa,ma),c.close(),c.fillAndStroke())):"frame"!=Z?(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),"double"==Z&&(v.moveNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,k,q,l,p,w,va,y,ma),v.paintTop(c,k,q,l,p,w,xa,y,pa),v.lineNEInner(c,k,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,k,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),"double"==
+Z&&(v.moveSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,k,q,l,p,w,xa,y,la),v.paintRight(c,k,q,l,p,w,ya,y,oa),v.lineSEInner(c,k,q,l,p,w,ya,y,M,oa),v.paintRightInner(c,k,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSE(c,k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),"double"==Z&&(v.moveSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa)),c.stroke()):(c.begin(),v.moveSE(c,
+k,q,l,p,w,ya,y,pa),v.paintBottom(c,k,q,l,p,w,Aa,y,ma),v.lineSWInner(c,k,q,l,p,w,Aa,y,M,ma),v.paintBottomInner(c,k,q,l,p,w,ya,y,M,pa,oa),c.close(),c.fillAndStroke()):"frame"!=Z?(c.begin(),v.moveSW(c,k,q,l,p,w,va,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),"double"==Z&&(v.moveNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,w,Aa,y,M,oa,ma)),c.stroke()):(c.begin(),v.moveSW(c,k,q,l,p,w,va,y,oa),v.paintLeft(c,k,q,l,p,w,va,y,la),v.lineNWInner(c,k,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,k,q,l,p,
+w,Aa,y,M,oa,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,k,q,l,p,w,va,xa,ya,Aa,y,la,pa,oa,ma);c.stroke()};Ga.prototype.moveNW=function(c,k,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,k,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,k,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,k,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,k,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){k=0;if("rounded"==w||"default"==w&&"rounded"==v)k=1;c.arcTo(I,I,0,0,k,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,k,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,k,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){k=0;if("rounded"==w||"default"==w&&"rounded"==v)k=1;c.arcTo(I,I,0,0,k,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,k,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,k,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,k,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){k=0;if("rounded"==w||"default"==w&&"rounded"==v)k=1;c.arcTo(I,I,0,0,k,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,k,q,
+l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,p):c.lineTo(I,p)};Ga.prototype.paintSW=function(c,k,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){k=0;if("rounded"==w||"default"==w&&"rounded"==v)k=1;c.arcTo(I,I,0,0,k,0,p-I)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(0,p-I);else c.lineTo(0,p)};Ga.prototype.paintNWInner=function(c,k,q,l,p,v,w,I,y){if("rounded"==w||"default"==
+w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,y,.5*y+I);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,y,y+I);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(y,.5*y+I);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+I,y+I),c.lineTo(y,y+I)};Ga.prototype.paintTopInner=function(c,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&M?c.lineTo(0,y):Z&&!M?c.lineTo(y,0):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==
+v?c.lineTo(I+.5*y,y):c.lineTo(I+y,y):c.lineTo(0,y):c.lineTo(0,0)};Ga.prototype.paintNEInner=function(c,k,q,l,p,v,w,I,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,l-I-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,l-I-y,y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-I-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-I-y,I+y),c.lineTo(l-I-y,y)};Ga.prototype.paintRightInner=function(c,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&
+M?c.lineTo(l-y,0):Z&&!M?c.lineTo(l,y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,I+.5*y):c.lineTo(l-y,I+y):c.lineTo(l-y,0):c.lineTo(l,0)};Ga.prototype.paintLeftInner=function(c,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&M?c.lineTo(y,p):Z&&!M?c.lineTo(0,p-y):Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-I-.5*
+y):c.lineTo(y,p-I-y):c.lineTo(y,p):c.lineTo(0,p)};Ga.prototype.paintSEInner=function(c,k,q,l,p,v,w,I,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,l-y,p-I-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,l-y,p-I-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(l-y,p-I-.5*y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(l-I-y,p-I-y),c.lineTo(l-y,p-I-y)};Ga.prototype.paintBottomInner=function(c,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&M?c.lineTo(l,
+p-y):Z&&!M?c.lineTo(l-y,p):"square"==w||"default"==w&&"square"==v||!Z?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-I-.5*y,p-y):c.lineTo(l-I-y,p-y):c.lineTo(l,p)};Ga.prototype.paintSWInner=function(c,k,q,l,p,v,w,I,y,Z){if(!Z)c.lineTo(y,p);else if("square"==w||"default"==w&&"square"==v)c.lineTo(y,p-y);else if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,I+.5*y,p-y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(I+
+y,I+y,0,0,1,I+y,p-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(I+.5*y,p-y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+I,p-I-y),c.lineTo(y+I,p-y)};Ga.prototype.moveSWInner=function(c,k,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,p-I-y):c.moveTo(0,p-y)};Ga.prototype.lineSWInner=
+function(c,k,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.lineTo(y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,p-I-y):c.lineTo(0,p-y)};Ga.prototype.moveSEInner=function(c,k,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v?c.moveTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-
+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,k,q,l,p,v,w,I,y,Z){Z?"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,k,
+q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?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,k,q,l,p,v,w,I,y,Z){Z?"square"==w||"default"==w&&"square"==v||Z?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,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&M?c.moveTo(y,0):Z&&!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,k,q,l,p,v,w,I,y,Z,M){Z||M?!Z&&M?c.lineTo(y,0):Z&&!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,k,q,l,p,v,w,I,y,Z,M,Ca,Qa,Ka,la){if("fold"==v||"fold"==w||"fold"==I||"fold"==y||"fold"==Z)("fold"==w||"default"==w&&"fold"==v)&&
+Ca&&la&&(c.moveTo(0,M),c.lineTo(M,M),c.lineTo(M,0)),("fold"==I||"default"==I&&"fold"==v)&&Ca&&Qa&&(c.moveTo(l-M,0),c.lineTo(l-M,M),c.lineTo(l,M)),("fold"==y||"default"==y&&"fold"==v)&&Ka&&Qa&&(c.moveTo(l-M,p),c.lineTo(l-M,p-M),c.lineTo(l,p-M)),("fold"==Z||"default"==Z&&"fold"==v)&&Ka&&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;
+Oa.prototype.paintEdgeShape=function(c,k,q){for(var l=[],p=0;p<k.length;p++)l.push(mxUtils.clone(k[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,k,q])))};mxCellRenderer.registerShape("filledEdge",Oa);"undefined"!==typeof StyleFormatPanel&&function(){var c=
+StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var k=this.editorUi.getSelectionState(),q=c.apply(this,arguments);"umlFrame"==k.style.shape&&q.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return q}}();mxMarker.addMarker("dash",function(c,k,q,l,p,v,w,I,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2);c.stroke()}});mxMarker.addMarker("box",
+function(c,k,q,l,p,v,w,I,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.x+M/2,Ka=l.y+Ca/2;l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa-M/2-Ca/2,Ka-Ca/2+M/2);c.lineTo(Qa-M/2+Ca/2,Ka-Ca/2-M/2);c.lineTo(Qa+Ca/2-3*M/2,Ka-3*Ca/2-M/2);c.lineTo(Qa-Ca/2-3*M/2,Ka-3*Ca/2+M/2);c.close();Z?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,k,q,l,p,v,w,I,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ca/2,l.y-Ca/2+M/2);c.lineTo(l.x+Ca/2-3*M/2,l.y-3*Ca/2-M/2);
+c.moveTo(l.x-M/2+Ca/2,l.y-Ca/2-M/2);c.lineTo(l.x-Ca/2-3*M/2,l.y-3*Ca/2+M/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,k,q,l,p,v,w,I,y,Z){var M=l.clone(),Ca=Pa.apply(this,arguments),Qa=p*(w+2*y),Ka=v*(w+2*y);return function(){Ca.apply(this,arguments);c.begin();c.moveTo(M.x-p*y,M.y-v*y);c.lineTo(M.x-2*Qa+p*y,M.y-2*Ka+v*y);c.moveTo(M.x-Qa-Ka+v*y,M.y-Ka+Qa-p*y);c.lineTo(M.x+Ka-Qa-v*y,M.y-Ka-Qa+p*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,
+k,q,l,p,v,w,I,y,Z){var M=p*(w+y+1),Ca=v*(w+y+1),Qa=l.clone();l.x-=M;l.y-=Ca;return function(){c.begin();c.moveTo(Qa.x-Ca,Qa.y+M);c.quadTo(l.x-Ca,l.y+M,l.x,l.y);c.quadTo(l.x+Ca,l.y-M,Qa.x+Ca,Qa.y-M);c.stroke()}});mxMarker.addMarker("async",function(c,k,q,l,p,v,w,I,y,Z){k=p*y*1.118;q=v*y*1.118;p*=w+y;v*=w+y;var M=l.clone();M.x-=k;M.y-=q;l.x+=-p-k;l.y+=-v-q;return function(){c.begin();c.moveTo(M.x,M.y);I?c.lineTo(M.x-p-v/2,M.y-v+p/2):c.lineTo(M.x+v/2-p,M.y-v-p/2);c.lineTo(M.x-p,M.y-v);c.close();Z?c.fillAndStroke():
+c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(k,q,l,p,v,w,I,y,Z,M){v*=I+Z;w*=I+Z;var Ca=p.clone();return function(){k.begin();k.moveTo(Ca.x,Ca.y);y?k.lineTo(Ca.x-v-w/c,Ca.y-w+v/c):k.lineTo(Ca.x+w/c-v,Ca.y-w-v/c);k.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var lb=function(c,k,q){return Wa(c,["width"],k,function(l,p,v,w,I){I=c.shape.getEdgeWidth()*c.view.scale+q;return new mxPoint(w.x+p*l/4+v*I/2,w.y+v*l/4-p*I/2)},function(l,p,v,w,I,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,
+w.y,I.x,I.y,y.x,y.y));c.style.width=Math.round(2*l)/c.view.scale-q})},Wa=function(c,k,q,l,p){return Ra(c,k,function(v){var w=c.absolutePoints,I=w.length-1;v=c.view.translate;var y=c.view.scale,Z=q?w[0]:w[I];w=q?w[1]:w[I-1];I=w.x-Z.x;var M=w.y-Z.y,Ca=Math.sqrt(I*I+M*M);Z=l.call(this,Ca,I/Ca,M/Ca,Z,w);return new mxPoint(Z.x/y-v.x,Z.y/y-v.y)},function(v,w,I){var y=c.absolutePoints,Z=y.length-1;v=c.view.translate;var M=c.view.scale,Ca=q?y[0]:y[Z];y=q?y[1]:y[Z-1];Z=y.x-Ca.x;var Qa=y.y-Ca.y,Ka=Math.sqrt(Z*
+Z+Qa*Qa);w.x=(w.x+v.x)*M;w.y=(w.y+v.y)*M;p.call(this,Ka,Z/Ka,Qa/Ka,Ca,y,w,I)})},gb=function(c,k){return function(q){return[Wa(q,["startWidth"],!0,function(l,p,v,w,I){I=mxUtils.getNumber(q.style,"startWidth",c)*q.view.scale+k;return new mxPoint(w.x+p*l/4+v*I/2,w.y+v*l/4-p*I/2)},function(l,p,v,w,I,y){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));q.style.startWidth=Math.round(2*l)/q.view.scale-k})]}},hb=function(c){return function(k){return[Ra(k,["arrowWidth","arrowSize"],function(q){var l=
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ca.prototype.arrowWidth))),p=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",ca.prototype.arrowSize)));return new mxPoint(q.x+(1-p)*q.width,q.y+(1-l)*q.height/2)},function(q,l){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(q.y+q.height/2-l.y)/q.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(q.x+q.width-l.x)/q.width))})]}},Xa=function(c){return function(k){return[Ra(k,["size"],function(q){var l=
+Math.max(0,Math.min(.5*q.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(q.x,q.y+l)},function(q,l){this.state.style.size=Math.max(0,l.y-q.y)},!0)]}},sb=function(c,k,q){return function(l){var p=[Ra(l,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",k)))))*c;return new mxPoint(v.x+w,v.y+w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,
+w.y-v.y)))/c)},!1)];q&&mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},qb=function(c,k,q,l,p){q=null!=q?q:.5;return function(v){var w=[Ra(v,["size"],function(I){var y=null!=p?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,Z=parseFloat(mxUtils.getValue(this.state.style,"size",y?p:c));return new mxPoint(I.x+Math.max(0,Math.min(.5*I.width,Z*(y?1:I.width))),I.getCenterY())},function(I,y,Z){I=null!=p&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?
+y.x-I.x:Math.max(0,Math.min(q,(y.x-I.x)/I.width));this.state.style.size=I},!1,l)];k&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(fb(v));return w}},ub=function(c,k,q){c=null!=c?c:.5;return function(l){var p=[Ra(l,["size"],function(v){var w=null!=q?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,I=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",w?q:k)));return new mxPoint(v.x+Math.min(.75*v.width*c,I*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=
+null!=q&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(c,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(l.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(fb(l));return p}},nb=function(){return function(c){var k=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&k.push(fb(c));return k}},fb=function(c,k){return Ra(c,[mxConstants.STYLE_ARCSIZE],function(q){var l=null!=k?k:q.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,
0)){var p=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(q.x+q.width-Math.min(q.width/2,p),q.y+l)}p=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(q.x+q.width-Math.min(Math.max(q.width/2,q.height/2),Math.min(q.width,q.height)*p),q.y+l)},function(q,l,p){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Ra=function(c,h,q,l,p,v,w){var H=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);H.execute=function(Z){for(var M=0;M<h.length;M++)this.copyStyle(h[M]);w&&w(Z)};H.getPosition=q;H.setPosition=l;H.ignoreGrid=null!=p?p:!0;if(v){var y=H.positionChanged;H.positionChanged=function(){y.apply(this,
-arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return H},rb={link:function(c){return[lb(c,!0,10),lb(c,!1,10)]},flexArrow:function(c){var h=c.view.graph.gridSize/c.view.scale,q=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,H){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,
-mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),q.push(Wa(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,H){l=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(Z.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<h/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<h&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,H){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=
-Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(Z.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])})),q.push(Wa(c,["startWidth","endWidth",
-mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,H){l=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(H+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(H+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,H,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,H.x,H.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=
-Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(Z.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));
+Math.round(Math.max(0,Math.min(q.width,2*(q.x+q.width-l.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(q.width-l.x+q.x)/Math.min(q.width,q.height))))})},Ra=function(c,k,q,l,p,v,w){var I=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);I.execute=function(Z){for(var M=0;M<k.length;M++)this.copyStyle(k[M]);w&&w(Z)};I.getPosition=q;I.setPosition=l;I.ignoreGrid=null!=p?p:!0;if(v){var y=I.positionChanged;I.positionChanged=function(){y.apply(this,
+arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return I},rb={link:function(c){return[lb(c,!0,10),lb(c,!1,10)]},flexArrow:function(c){var k=c.view.graph.gridSize/c.view.scale,q=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,I){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,
+mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<k/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),q.push(Wa(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(l,p,v,w,I){l=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)+v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)-p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(Z.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<k/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<k&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(q.push(Wa(c,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,I){l=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=
+Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*l)/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(Z.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<k/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),q.push(Wa(c,["startWidth","endWidth",
+mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(l,p,v,w,I){l=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+p*(I+c.shape.strokewidth*c.view.scale)-v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)+p*l/2)},function(l,p,v,w,I,y,Z){l=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,I.x,I.y,y.x,y.y));p=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-p,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=
+Math.round(100*(p-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*l)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(Z.getEvent())||mxEvent.isControlDown(Z.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(Z.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<k/6&&(c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<k&&(c.style.endWidth=c.style.startWidth))})));return q},swimlane:function(c){var k=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var q=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));k.push(fb(c,q/2))}k.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=[],H=0;H<v.length;H++)v[H]!=c.cell&&p.isSwimlane(v[H])&&p.getSwimlaneDirection(p.getCurrentCellStyle(v[H]))==l&&w.push(v[H]);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",da.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(sa.prototype.corner,Math.min(h.width,mxUtils.getValue(this.state.style,"width",sa.prototype.width))),l=Math.max(1.5*sa.prototype.corner,Math.min(h.height,mxUtils.getValue(this.state.style,
-"height",sa.prototype.height)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.width=Math.round(Math.max(sa.prototype.corner,Math.min(h.width,q.x-h.x)));this.state.style.height=Math.round(Math.max(1.5*sa.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",X.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",Ha.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",Ya.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",fa.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));mxUtils.getValue(this.state.style,
+(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 k},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[Ra(c,["size"],function(k){var q=
+Math.max(0,Math.min(k.height,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(k.getCenterX(),k.y+q)},function(k,q){this.state.style.size=Math.round(Math.max(0,Math.min(k.height,q.y-k.y)))},!1)]},umlFrame:function(c){return[Ra(c,["width","height"],function(k){var q=Math.max(sa.prototype.corner,Math.min(k.width,mxUtils.getValue(this.state.style,"width",sa.prototype.width))),l=Math.max(1.5*sa.prototype.corner,Math.min(k.height,mxUtils.getValue(this.state.style,
+"height",sa.prototype.height)));return new mxPoint(k.x+q,k.y+l)},function(k,q){this.state.style.width=Math.round(Math.max(sa.prototype.corner,Math.min(k.width,q.x-k.x)));this.state.style.height=Math.round(Math.max(1.5*sa.prototype.corner,Math.min(k.height,q.y-k.y)))},!1)]},process:function(c){var k=[Ra(c,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",X.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)&&k.push(fb(c));return k},cross:function(c){return[Ra(c,["size"],function(k){var q=Math.min(k.width,k.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ha.prototype.size)))*q/2;return new mxPoint(k.getCenterX()-
+q,k.getCenterY()-q)},function(k,q){var l=Math.min(k.width,k.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,k.getCenterY()-q.y)/l*2,Math.max(0,k.getCenterX()-q.x)/l*2)))})]},note:function(c){return[Ra(c,["size"],function(k){var q=Math.max(0,Math.min(k.width,Math.min(k.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(k.x+k.width-q,k.y+q)},function(k,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(k.width,k.x+
+k.width-q.x),Math.min(k.height,q.y-k.y))))})]},note2:function(c){return[Ra(c,["size"],function(k){var q=Math.max(0,Math.min(k.width,Math.min(k.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(k.x+k.width-q,k.y+q)},function(k,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(k.width,k.x+k.width-q.x),Math.min(k.height,q.y-k.y))))})]},manualInput:function(c){var k=[Ra(c,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,
+"size",Ya.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)&&k.push(fb(c));return k},dataStorage:function(c){return[Ra(c,["size"],function(k){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(k.x+k.width-l*
+(q?1:k.width),k.getCenterY())},function(k,q){k="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(k.width,k.x+k.width-q.x)):Math.max(0,Math.min(1,(k.x+k.width-q.x)/k.width));this.state.style.size=k},!1)]},callout:function(c){var k=[Ra(c,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",fa.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position)));mxUtils.getValue(this.state.style,
"base",fa.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",fa.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",fa.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",fa.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",fa.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",fa.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",Ba.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,
-"jettyHeight",Ba.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",Za.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Za.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",cb.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",cb.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:hb(1),doubleArrow:hb(.5),"mxgraph.arrows2.wedgeArrow":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":gb(20,20),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",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",R.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:Xa(x.prototype.size),cylinder3:Xa(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(ra.prototype.size,!0,null,!0,ra.prototype.fixedSize),hexagon:qb(K.prototype.size,!0,.5,!0,K.prototype.fixedSize),
-curlyBracket:qb(aa.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:sb(1,e.prototype.size,!1),card:sb(.5,C.prototype.size,!0),loopLimit:sb(.5,G.prototype.size,!0),trapezoid:ub(.5,Q.prototype.size,Q.prototype.fixedSize),parallelogram:ub(1,S.prototype.size,S.prototype.fixedSize)};Graph.createHandle=Ra;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var 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 ib=new mxPoint(1,0),jb=new mxPoint(1,0),mb=mxUtils.toRadians(-30);ib=mxUtils.getRotatedPoint(ib,Math.cos(mb),Math.sin(mb));var ob=mxUtils.toRadians(-150);jb=mxUtils.getRotatedPoint(jb,Math.cos(ob),Math.sin(ob));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,
-H=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(c,l));null==H&&null!=h&&(H=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=ib.x,Z=ib.y,M=jb.x,Ca=jb.y,Qa="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=w&&null!=H){c=function(la,pa,oa){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-M*ma)/(y*Ca-Z*M);la=(Z*la-y*ma)/(Z*M-y*Ca);Qa?(oa&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca*
-la)):(oa&&(Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa));p.push(Ka)};var Ka=H;null==l&&(l=new mxPoint(H.x+(w.x-H.x)/2,H.y+(w.y-H.y)/2));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var yb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return yb.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};fa.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,
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",fa.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)&&k.push(fb(c));return k},internalStorage:function(c){var k=[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)&&k.push(fb(c));return k},module:function(c){return[Ra(c,["jettyWidth","jettyHeight"],function(k){var q=Math.max(0,Math.min(k.width,mxUtils.getValue(this.state.style,"jettyWidth",Ba.prototype.jettyWidth))),l=Math.max(0,Math.min(k.height,mxUtils.getValue(this.state.style,
+"jettyHeight",Ba.prototype.jettyHeight)));return new mxPoint(k.x+q/2,k.y+2*l)},function(k,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(k.width,q.x-k.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(k.height,q.y-k.y))/2)})]},corner:function(c){return[Ra(c,["dx","dy"],function(k){var q=Math.max(0,Math.min(k.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),l=Math.max(0,Math.min(k.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(k.x+
+q,k.y+l)},function(k,q){this.state.style.dx=Math.round(Math.max(0,Math.min(k.width,q.x-k.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(k.height,q.y-k.y)))},!1)]},tee:function(c){return[Ra(c,["dx","dy"],function(k){var q=Math.max(0,Math.min(k.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),l=Math.max(0,Math.min(k.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(k.x+(k.width+q)/2,k.y+l)},function(k,q){this.state.style.dx=Math.round(Math.max(0,
+2*Math.min(k.width/2,q.x-k.x-k.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(k.height,q.y-k.y)))},!1)]},singleArrow:hb(1),doubleArrow:hb(.5),"mxgraph.arrows2.wedgeArrow":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed":gb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":gb(20,20),folder:function(c){return[Ra(c,["tabWidth","tabHeight"],function(k){var q=Math.max(0,Math.min(k.width,mxUtils.getValue(this.state.style,"tabWidth",F.prototype.tabWidth))),l=Math.max(0,Math.min(k.height,mxUtils.getValue(this.state.style,
+"tabHeight",F.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=k.width-q);return new mxPoint(k.x+q,k.y+l)},function(k,q){var l=Math.max(0,Math.min(k.width,q.x-k.x));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(l=k.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(k.height,q.y-k.y)))},!1)]},document:function(c){return[Ra(c,
+["size"],function(k){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));return new mxPoint(k.x+3*k.width/4,k.y+(1-q)*k.height)},function(k,q){this.state.style.size=Math.max(0,Math.min(1,(k.y+k.height-q.y)/k.height))},!1)]},tape:function(c){return[Ra(c,["size"],function(k){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(k.getCenterX(),k.y+q*k.height/2)},function(k,q){this.state.style.size=
+Math.max(0,Math.min(1,(q.y-k.y)/k.height*2))},!1)]},isoCube2:function(c){return[Ra(c,["isoAngle"],function(k){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(k.x,k.y+Math.min(k.width*Math.tan(q),.5*k.height))},function(k,q){this.state.style.isoAngle=Math.max(0,50*(q.y-k.y)/k.height)},!0)]},cylinder2:Xa(x.prototype.size),cylinder3:Xa(B.prototype.size),offPageConnector:function(c){return[Ra(c,["size"],function(k){var q=
+Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(k.getCenterX(),k.y+(1-q)*k.height)},function(k,q){this.state.style.size=Math.max(0,Math.min(1,(k.y+k.height-q.y)/k.height))},!1)]},"mxgraph.basic.rect":function(c){var k=[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});k.push(c);return k},step:qb(ra.prototype.size,!0,null,!0,ra.prototype.fixedSize),hexagon:qb(K.prototype.size,!0,.5,!0,K.prototype.fixedSize),
+curlyBracket:qb(ba.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:sb(1,d.prototype.size,!1),card:sb(.5,C.prototype.size,!0),loopLimit:sb(.5,G.prototype.size,!0),trapezoid:ub(.5,R.prototype.size,R.prototype.fixedSize),parallelogram:ub(1,T.prototype.size,T.prototype.fixedSize)};Graph.createHandle=Ra;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var k=
+this.state.style.shape;null==mxCellRenderer.defaultShapes[k]&&null==mxStencilRegistry.getStencil(k)?k=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(k=mxConstants.SHAPE_SWIMLANE);k=rb[k];null==k&&null!=this.state.shape&&this.state.shape.isRoundable()&&(k=rb[mxConstants.SHAPE_RECTANGLE]);null!=k&&(k=k(this.state),null!=k&&(c=null==c?k:c.concat(k)))}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 ib=new mxPoint(1,0),jb=new mxPoint(1,0),mb=mxUtils.toRadians(-30);ib=mxUtils.getRotatedPoint(ib,Math.cos(mb),Math.sin(mb));var ob=mxUtils.toRadians(-150);jb=mxUtils.getRotatedPoint(jb,Math.cos(ob),Math.sin(ob));mxEdgeStyle.IsometricConnector=function(c,k,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!=k&&(I=new mxPoint(k.getCenterX(),k.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=ib.x,Z=ib.y,M=jb.x,Ca=jb.y,Qa="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=w&&null!=I){c=function(la,pa,oa){la-=Ka.x;var ma=pa-Ka.y;pa=(Ca*la-M*ma)/(y*Ca-Z*M);la=(Z*la-y*ma)/(Z*M-y*Ca);Qa?(oa&&(Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa),p.push(Ka)),Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca*
+la)):(oa&&(Ka=new mxPoint(Ka.x+M*la,Ka.y+Ca*la),p.push(Ka)),Ka=new mxPoint(Ka.x+y*pa,Ka.y+Z*pa));p.push(Ka)};var Ka=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 yb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,k){if(k==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return yb.apply(this,arguments)};
+e.prototype.constraints=[];h.prototype.getConstraints=function(c,k,q){c=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(k,q/(.5+l));k=(k-l)/2;q=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k+.5*l,q+l*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k+l,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k+l,q+.75*l));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,k+.5*l,q+(1-p)*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,q+.75*l));return c};r.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;l=Math.min(k*Math.tan(l),.5*q);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,k,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};fa.prototype.getConstraints=function(c,k,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=k*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,k,.5*(q-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,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)));k>=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))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.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};C.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};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};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,
+.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,Math.min(k,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*(k-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,.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));k>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};C.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,Math.min(k,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*(k+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));k>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));return c};d.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,Math.min(k,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*(k-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,l));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,k,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+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,k,q){c=[];k=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,k));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,k));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-k));c.push(new mxConnectionConstraint(new mxPoint(0,
+1),!1,null,0,-k));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,k+.5*(.5*q-k)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,k+.5*(.5*q-k)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,q-k-.5*(.5*q-k)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-k-.5*(.5*q-k)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*k));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*k));c.push(new mxConnectionConstraint(new mxPoint(.855,
+1),!1,null,0,.29*-k));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-k));return c};F.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,Math.min(k,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*(k+l),p))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(k-l),p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,.25*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,.5*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,.75*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,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;Y.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;La.prototype.constraints=mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.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};Ba.prototype.getConstraints=function(c,h,q){h=parseFloat(mxUtils.getValue(c,"jettyWidth",Ba.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Ba.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};G.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),
+mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;La.prototype.constraints=mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(c,k,q){c=[];var l=Math.min(k,q/2),p=Math.min(k-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))*k);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+k-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+k-l),q));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p,q));return c};Ba.prototype.getConstraints=function(c,k,q){k=parseFloat(mxUtils.getValue(c,"jettyWidth",Ba.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Ba.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,k),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,k),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,k));q>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,k));q>15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,k));return l};G.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)];J.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)];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(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,
@@ -3461,285 +3469,285 @@ new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(n
.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)];S.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;R.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;cb.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,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*p));return c};Za.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,.5*(h+l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,
+.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)];T.prototype.constraints=mxRectangleShape.prototype.constraints;R.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,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;cb.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,
+Math.min(k,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,k,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,.75*k+.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+l),q));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-l),q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),
+!1,null,.5*(k-l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*k-.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*p));return c};Za.prototype.getConstraints=function(c,k,q){c=[];var l=Math.max(0,Math.min(k,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,k,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(q+p)));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));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return c};kb.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ca.prototype.getConstraints=function(c,h,q){c=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));l=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,l));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-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-p),q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));return c};t.prototype.getConstraints=function(c,h,q){c=[];var l=q*Math.max(0,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth)))),p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));l=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),
-!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*h,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return c};Ha.prototype.getConstraints=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,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];ca.prototype.getConstraints=function(c,k,q){c=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),p=k*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));l=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-p),l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-p),q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));return c};t.prototype.getConstraints=function(c,k,q){c=[];var l=q*Math.max(0,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"arrowWidth",ca.prototype.arrowWidth)))),p=k*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ca.prototype.arrowSize))));l=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),
+!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return c};Ha.prototype.getConstraints=function(c,k,q){c=[];var l=Math.min(q,k),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=(k-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,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*(k+p),l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+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};da.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)];Ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ua.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){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,D){D.getModel().beginUpdate();try{var F=D.getCellGeometry(m);null!=F&&x&&B&&(x/=B,F=F.clone(),1<x?F.height=F.width/x:F.width=F.height*x,D.getModel().setGeometry(m,
-F));D.setCellStyles(mxConstants.STYLE_CLIP_PATH,r,[m]);D.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[m])}finally{D.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 D=!0,F=0;F<
-B.length&&D;F++)D=D&&d.model.isEdge(B[F]);var I=d.view.translate;F=d.view.scale;var C=I.x,N=I.y;I=null;if(1==B.length&&D){var R=d.getCellGeometry(B[0]);null!=R&&(I=R.getTerminalPoint(!0))}I=null!=I?I:d.getBoundingBoxFromGeometry(B,D);null!=I&&(D=Math.round(d.snap(d.popupMenuHandler.triggerX/F-C)),F=Math.round(d.snap(d.popupMenuHandler.triggerY/F-N)),d.cellsMoved(B,D-I.x,F-I.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,I){var C=B.getValue(F);I=F.cloneValue(I);I.removeAttribute("placeholders");null==C||isNaN(C.nodeType)||I.setAttribute("placeholders",C.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||I.setAttribute("label",d.convertValueToString(F));B.setValue(F,I)}m=null!=r?r:m;var B=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedValue){B.beginUpdate();
-try{var D=d.getEditableCells(d.getSelectionCells());if(0==D.length)x(B.getRoot(),e.copiedValue);else for(r=0;r<D.length;r++)x(D[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,D){x=mxUtils.trim(x);d.setLinkForCell(m,0<x.length?x:null);d.setAttributeForCell(m,"linkTarget",D)},!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,D=d.getLinkTitle(m);null!=r&&0<r.length&&(B=r[0].iconUrl,
-D=r[0].name||r[0].type,D=D.charAt(0).toUpperCase()+D.substring(1),30<D.length&&(D=D.substring(0,30)+"..."));r=new mxCell(D,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"),
-D=0;D<B.length&&null==r;D++)B[D].textContent==m.textContent&&(r=B[D]);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(I){d.cellEditor.restoreSelection(F);null!=I&&d.insertLink(I)}))}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];d.getModel().isVertex(x)&&(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 D=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(D);D=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,D);d.setCellStyles("html",m,[r[x]])}else"0"==
-B&&"1"==m&&(D=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(D)),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 D=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,D);(r&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?d.updateLabelElements(D,function(I){I.style.fontWeight=null;"B"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(D,function(I){I.style.fontStyle=null;"I"==I.nodeName&&d.replaceElement(I)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(D,function(I){I.style.textDecoration=null;"U"==I.nodeName&&d.replaceElement(I)});for(var F=0;F<D.length;F++)0==d.model.getChildCount(D[F])&&d.autoSizeCell(D[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,D=x.x;x=x.y;m=d.getModel().getParent(m);for(var F=d.getCellGeometry(m);d.getModel().isVertex(m)&&null!=F;)D+=F.x,x+=F.y,m=
-d.getModel().getParent(m),F=d.getCellGeometry(m);D=Math.round(d.snap(d.popupMenuHandler.triggerX/B-D));B=Math.round(d.snap(d.popupMenuHandler.triggerY/B-x));r.addPointAt(r.state,D,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 D=x[B];if(d.getModel().isEdge(D)){var F=d.getCellGeometry(D);null!=r&&mxEvent.isShiftDown(m)?(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[D]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[D]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[D]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[D])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,d.getModel().setGeometry(D,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 D=d.cellEditor.saveSelection();e.showImageDialog(m,x,function(F,I,C,N,R,S){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(D),d.insertImage(F,I,C);else{var Q=d.getSelectionCells();if(null!=F&&(0<F.length||0<Q.length)){var aa=null;d.getModel().beginUpdate();try{if(0==Q.length){Q=[d.insertVertex(d.getDefaultParent(),null,"",0,0,I,C,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var U=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(Q,!0));Q[0].geometry.x=U.x;Q[0].geometry.y=U.y;null!=N&&f(Q[0],N,R,S,d);aa=Q;d.fireEvent(new mxEventObject("cellsInserted","cells",aa))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,Q);var P=d.getCurrentCellStyle(Q[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",Q):0==F.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,Q);null==N&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,Q);if(null!=I&&null!=C)for(F=0;F<Q.length;F++){var X=Q[F];if("0"!=d.getCurrentCellStyle(X).expand){var ja=d.getModel().getGeometry(X);null!=ja&&(ja=ja.clone(),ja.width=I,ja.height=C,d.getModel().setGeometry(X,ja))}null!=N&&f(X,N,R,S,d)}}finally{d.getModel().endUpdate()}null!=aa&&(d.setSelectionCells(aa),d.scrollCellToVisible(aa[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(D,F,I){f(m,D,F,I,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("format",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return e.isFormatPanelVisible()}));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};
+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,D){D.getModel().beginUpdate();try{var F=D.getCellGeometry(m);null!=F&&x&&B&&(x/=B,F=F.clone(),1<x?F.height=F.width/x:F.width=F.height*x,D.getModel().setGeometry(m,
+F));D.setCellStyles(mxConstants.STYLE_CLIP_PATH,r,[m]);D.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[m])}finally{D.getModel().endUpdate()}}var d=this.editorUi,g=d.editor,e=g.graph,h=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=h;this.addAction("save",function(){d.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){d.saveFile(!0)},null,
+null,Editor.ctrlKey+"+Shift+S").isEnabled=h;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=h;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 D=!0,F=0;F<
+B.length&&D;F++)D=D&&e.model.isEdge(B[F]);var H=e.view.translate;F=e.view.scale;var C=H.x,N=H.y;H=null;if(1==B.length&&D){var Q=e.getCellGeometry(B[0]);null!=Q&&(H=Q.getTerminalPoint(!0))}H=null!=H?H:e.getBoundingBoxFromGeometry(B,D);null!=H&&(D=Math.round(e.snap(e.popupMenuHandler.triggerX/F-C)),F=Math.round(e.snap(e.popupMenuHandler.triggerY/F-N)),e.cellsMoved(B,D-H.x,F-H.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(F,H){var C=B.getValue(F);H=F.cloneValue(H);H.removeAttribute("placeholders");null==C||isNaN(C.nodeType)||H.setAttribute("placeholders",C.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||H.setAttribute("label",e.convertValueToString(F));B.setValue(F,H)}m=null!=r?r:m;var B=e.getModel();if(e.isEnabled()&&!e.isSelectionEmpty()&&null!=d.copiedValue){B.beginUpdate();
+try{var D=e.getEditableCells(e.getSelectionCells());if(0==D.length)x(B.getRoot(),d.copiedValue);else for(r=0;r<D.length;r++)x(D[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,D){x=mxUtils.trim(x);e.setLinkForCell(m,0<x.length?x:null);e.setAttributeForCell(m,"linkTarget",D)},!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=h;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,D=e.getLinkTitle(m);null!=r&&0<r.length&&(B=r[0].iconUrl,
+D=r[0].name||r[0].type,D=D.charAt(0).toUpperCase()+D.substring(1),30<D.length&&(D=D.substring(0,30)+"..."));r=new mxCell(D,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=h;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"),
+D=0;D<B.length&&null==r;D++)B[D].textContent==m.textContent&&(r=B[D]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",e.selectNode(r));var F=e.cellEditor.saveSelection();d.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(H){e.cellEditor.restoreSelection(F);null!=H&&e.insertLink(H)}))}else e.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;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];e.getModel().isVertex(x)&&(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 D=e.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=e.sanitizeHtml(D);D=mxUtils.extractTextWithWhitespace(F.childNodes);e.cellLabelChanged(state.cell,D);e.setCellStyles("html",m,[r[x]])}else"0"==
+B&&"1"==m&&(D=mxUtils.htmlEntities(e.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(D=D.replace(/\n/g,"<br/>")),e.cellLabelChanged(state.cell,e.sanitizeHtml(D)),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=h;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=h;n=this.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.editor.autosave});n.isEnabled=h;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 D=e.getEditableCells(e.getSelectionCells());e.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,D);(r&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?e.updateLabelElements(D,function(H){H.style.fontWeight=null;"B"==H.nodeName&&e.replaceElement(H)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?e.updateLabelElements(D,function(H){H.style.fontStyle=null;"I"==H.nodeName&&e.replaceElement(H)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&e.updateLabelElements(D,function(H){H.style.textDecoration=null;"U"==H.nodeName&&e.replaceElement(H)});for(var F=0;F<D.length;F++)0==e.model.getChildCount(D[F])&&e.autoSizeCell(D[F],
+!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,D=x.x;x=x.y;m=e.getModel().getParent(m);for(var F=e.getCellGeometry(m);e.getModel().isVertex(m)&&null!=F;)D+=F.x,x+=F.y,m=
+e.getModel().getParent(m),F=e.getCellGeometry(m);D=Math.round(e.snap(e.popupMenuHandler.triggerX/B-D));B=Math.round(e.snap(e.popupMenuHandler.triggerY/B-x));r.addPointAt(r.state,D,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 D=x[B];if(e.getModel().isEdge(D)){var F=e.getCellGeometry(D);null!=r&&mxEvent.isShiftDown(m)?(e.setCellStyles(mxConstants.STYLE_EXIT_X,null,[D]),e.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[D]),e.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[D]),e.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[D])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,e.getModel().setGeometry(D,F))}}}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 D=e.cellEditor.saveSelection();d.showImageDialog(m,x,function(F,H,C,N,Q,T){if(e.cellEditor.isContentEditing())e.cellEditor.restoreSelection(D),e.insertImage(F,H,C);else{var R=e.getSelectionCells();if(null!=F&&(0<F.length||0<R.length)){var ba=null;e.getModel().beginUpdate();try{if(0==R.length){R=[e.insertVertex(e.getDefaultParent(),null,"",0,0,H,C,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var S=e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(R,!0));R[0].geometry.x=S.x;R[0].geometry.y=S.y;null!=N&&f(R[0],N,Q,T,e);ba=R;e.fireEvent(new mxEventObject("cellsInserted","cells",ba))}e.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,R);var P=e.getCurrentCellStyle(R[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?e.setCellStyles(mxConstants.STYLE_SHAPE,"image",R):0==F.length&&e.setCellStyles(mxConstants.STYLE_SHAPE,null,R);null==N&&e.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,R);if(null!=H&&null!=C)for(F=0;F<R.length;F++){var X=R[F];if("0"!=e.getCurrentCellStyle(X).expand){var ja=e.getModel().getGeometry(X);null!=ja&&(ja=ja.clone(),ja.width=H,ja.height=C,e.getModel().setGeometry(X,ja))}null!=N&&f(X,N,Q,T,e)}}finally{e.getModel().endUpdate()}null!=ba&&(e.setSelectionCells(ba),e.scrollCellToVisible(ba[0]))}}},e.cellEditor.isContentEditing(),!e.cellEditor.isContentEditing(),!0,B)}}).isEnabled=h;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(D,F,H){f(m,D,F,H,e)}),d.showDialog(r.container,300,390,!0,!0))}}).isEnabled=h;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("format",mxUtils.bind(this,function(){d.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return d.isFormatPanelVisible()}));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=h};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};
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.autoPopup=!0;
-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"),D=0;D<B.length;D++)if("3"==B[D].getAttribute("size")){B[D].removeAttribute("size");B[D].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("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);e.addSeparator(g);this.addSubmenu("distributeSpacing",e,g,mxResources.get("spacing"))})));this.put("distributeSpacing",new Menu(mxUtils.bind(this,function(e,
-g){e.addItem(mxResources.get("horizontal"),null,function(){b.distributeCells(!0,null,!0)},g);e.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1,null,!0)},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?["format"]:[]).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,["format"],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){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&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,
+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}),h=0;h<this.defaultFonts.length;h++)e(this.defaultFonts[h]);d.addSeparator(g);if(0<this.customFonts.length){for(h=0;h<this.customFonts.length;h++)e(this.customFonts[h]);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(h,n){return d.addItem(h,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 h=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var B=b.cellEditor.textarea.getElementsByTagName("font"),D=0;D<B.length;D++)if("3"==B[D].getAttribute("size")){B[D].removeAttribute("size");B[D].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(){h(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),h(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("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);d.addSeparator(g);this.addSubmenu("distributeSpacing",d,g,mxResources.get("spacing"))})));this.put("distributeSpacing",new Menu(mxUtils.bind(this,function(d,
+g){d.addItem(mxResources.get("horizontal"),null,function(){b.distributeCells(!0,null,!0)},g);d.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1,null,!0)},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)}),h=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,h(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,h(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,h(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?["format"]:[]).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,["format"],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],h=0;h<e.length;h++)(function(n){d.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(e[h]);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){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&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),h=f.isStack(d)||f.isStackChild(d),n=e,u=e;h&&(g=f.isStack(d)?g:f.getCellStyle(f.model.getParent(d)),u="0"==g.horizontalStack,n=!u);null!=b||!e&&!h?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
r,x,B,D){r=D||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(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(D){n=d.getParentByName(mxEvent.getSource(D),"TD");var F=!1;if(null!=n){k=d.getParentByName(n,"TR");var I=mxEvent.isMouseEvent(D)?2:4,C=x,N=Math.min(20,k.sectionRowIndex+I);I=Math.min(20,n.cellIndex+I);for(var R=C.rows.length;R<N;R++)for(var S=C.insertRow(R),Q=0;Q<C.rows[0].cells.length;Q++)S.insertCell(-1);for(R=0;R<C.rows.length;R++)for(S=C.rows[R],Q=S.cells.length;Q<I;Q++)S.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+
-1);for(C=0;C<x.rows.length;C++)for(N=x.rows[C],I=0;I<N.cells.length;I++)R=N.cells[I],C==k.sectionRowIndex&&I==n.cellIndex&&(F="blue"==R.style.backgroundColor),R.style.backgroundColor=C<=k.sectionRowIndex&&I<=n.cellIndex?"blue":"transparent"}mxEvent.consume(D);return F}e=null!=e?e:!0;b=null!=b?b:mxUtils.bind(this,function(D,F,I){var C=this.editorUi.editor.graph;if(null!=C.getParentByName(mxEvent.getSource(D),"TD")&&null!=C.cellEditor.textarea){var N=C.cellEditor.textarea.getElementsByTagName("table");
-D=[];for(var R=0;R<N.length;R++)D.push(N[R]);C.container.focus();R=C.pasteHtmlAtCaret;N=["<table>"];for(var S=0;S<F;S++){N.push("<tr>");for(var Q=0;Q<I;Q++)N.push("<td><br></td>");N.push("</tr>")}N.push("</table>");F=N.join("");R.call(C,F);F=C.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(R=F.length-1;0<=R;R--)if(0==R||F[R]!=D[R-1]){C.selectNode(F[R].rows[0].cells[0]);break}}});var d=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{h?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{h?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{h?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{h?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{h?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{h?
+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(D){n=e.getParentByName(mxEvent.getSource(D),"TD");var F=!1;if(null!=n){h=e.getParentByName(n,"TR");var H=mxEvent.isMouseEvent(D)?2:4,C=x,N=Math.min(20,h.sectionRowIndex+H);H=Math.min(20,n.cellIndex+H);for(var Q=C.rows.length;Q<N;Q++)for(var T=C.insertRow(Q),R=0;R<C.rows[0].cells.length;R++)T.insertCell(-1);for(Q=0;Q<C.rows.length;Q++)for(T=C.rows[Q],R=T.cells.length;R<H;R++)T.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(h.sectionRowIndex+
+1);for(C=0;C<x.rows.length;C++)for(N=x.rows[C],H=0;H<N.cells.length;H++)Q=N.cells[H],C==h.sectionRowIndex&&H==n.cellIndex&&(F="blue"==Q.style.backgroundColor),Q.style.backgroundColor=C<=h.sectionRowIndex&&H<=n.cellIndex?"blue":"transparent"}mxEvent.consume(D);return F}d=null!=d?d:!0;b=null!=b?b:mxUtils.bind(this,function(D,F,H){var C=this.editorUi.editor.graph;if(null!=C.getParentByName(mxEvent.getSource(D),"TD")&&null!=C.cellEditor.textarea){var N=C.cellEditor.textarea.getElementsByTagName("table");
+D=[];for(var Q=0;Q<N.length;Q++)D.push(N[Q]);C.container.focus();Q=C.pasteHtmlAtCaret;N=["<table>"];for(var T=0;T<F;T++){N.push("<tr>");for(var R=0;R<H;R++)N.push("<td><br></td>");N.push("</tr>")}N.push("</table>");F=N.join("");Q.call(C,F);F=C.cellEditor.textarea.getElementsByTagName("table");if(F.length==D.length+1)for(Q=F.length-1;0<=Q;Q--)if(0==Q||F[Q]!=D[Q-1]){C.selectNode(F[Q].rows[0].cells[0]);break}}});var e=this.editorUi.editor.graph,h=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";f=a.getElementsByTagName("td");1<f.length&&(f[1].style.display="none",f[2].style.display="none");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(D){mxEvent.consume(D)}));mxEvent.addGestureListeners(u,null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));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(D){mxEvent.consume(D)}));mxEvent.addGestureListeners(m,
-null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));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(D,F){var I=document.createElement("table");I.setAttribute("border","1");I.style.borderCollapse="collapse";I.style.borderStyle="solid";I.setAttribute("cellPadding","8");for(var C=0;C<D;C++)for(var N=I.insertRow(C),R=0;R<F;R++)N.insertCell(-1);
-return I}(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(D){var F=g(D);null!=n&&null!=k&&F&&(b(D,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 D=u.getCellGeometry(B);null!=D&&(D=D.clone(),D.points=null,u.getModel().setGeometry(B,D))}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 D=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(D){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)};
+null,null,mxUtils.bind(this,function(D){mxEvent.consume(D)}));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(D,F){var H=document.createElement("table");H.setAttribute("border","1");H.style.borderCollapse="collapse";H.style.borderStyle="solid";H.setAttribute("cellPadding","8");for(var C=0;C<D;C++)for(var N=H.insertRow(C),Q=0;Q<F;Q++)N.insertCell(-1);
+return H}(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(D){var F=g(D);null!=n&&null!=h&&F&&(b(D,h.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,h,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(h){var D=u.getCellGeometry(B);null!=D&&(D=D.clone(),D.points=null,u.getModel().setGeometry(B,D))}for(var F=0;F<f.length;F++)u.setCellStyles(f[F],d[F],[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,h,n,u){var m=this.createStyleChangeFunction(f,d);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=h&&r.cellEditor.isContentEditing()?h():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,h=0;h<a.length;h++)if(d.setCellStyles(a[h],b[h],g),a[h]==mxConstants.STYLE_ALIGN&&d.updateLabelElements(g,function(n){n.removeAttribute("align");n.style.textAlign=null}),a[h]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[h])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,h,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 D=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(D){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()}),e,u,h)};
+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 h=g.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,f||g.shapeForegroundColor,mxUtils.bind(this,function(u){g.cellEditor.restoreSelection(h);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(h)});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 h=this.editorUi.actions.get(b);return null!=h&&(a.showDisabled||h.isEnabled())&&h.visible?(b=a.addItem(e||h.label,null,function(n){h.funct(d,n)},f,g,h.isEnabled()),h.toggleAction&&h.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,h),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)};
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 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"],
+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"],
null,f)};
-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.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 h=!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)&&(h=this.editorUi.actions.get("removeWaypoint"),h.handler=g,h.index=e,h=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[h?"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.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 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){this.editorUi.menus.autoPopup&&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){this.editorUi.menusautoPopup||null==this.editorUi.currentMenu||this.editorUi.currentMenuElt==a||this.editorUi.hideCurrentMenu();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)}
+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 h=mxUtils.getOffset(a);e.popup(h.x,h.y+a.offsetHeight,null,
+g);this.editorUi.setCurrentMenu(e,a)}mxEvent.consume(g)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(g){this.editorUi.menus.autoPopup&&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){!this.editorUi.menus.autoPopup&&null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&mxEvent.isMouseEvent(g)&&this.editorUi.hideCurrentMenu();
+f=null==this.editorUi.currentMenu;g.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){d(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(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();
+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();
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,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=
+Toolbar.prototype.addDropDownArrow=function(a,b,f,d,g,e,h,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=d-(null!=h?h: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=
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 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,D,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+("0"+Number(D).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,D,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+
-("0"+Number(D).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)};
+" ("+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(h){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,h);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(h){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,h);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(h){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,h);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 h=b.getSelectedElement(),n=b.getParentByNames(h,["TD","TH"],b.cellEditor.text2),u=b.getParentByName(h,"TR",b.cellEditor.text2);if(null==u)this.editorUi.menus.addInsertTableItem(e);else{var m=b.getParentByName(u,"TABLE",b.cellEditor.text2);h=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");h.setAttribute("title",mxResources.get("insertColumnBefore"));
+h=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");h.setAttribute("title",mxResources.get("insertColumnAfter"));h=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");h.setAttribute("title",mxResources.get("deleteColumn"));
+h=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");h.setAttribute("title",mxResources.get("insertRowBefore"));h=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");h.setAttribute("title",mxResources.get("insertRowAfter"));h=e.addItem("",
+null,mxUtils.bind(this,function(){try{b.deleteRow(m,u.sectionRowIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deleterow");h.setAttribute("title",mxResources.get("deleteRow"));h=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,D,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+("0"+Number(D).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");h.setAttribute("title",mxResources.get("borderColor"));h=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,D,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+
+("0"+Number(D).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");h.setAttribute("title",mxResources.get("backgroundColor"));h=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");h.setAttribute("title",mxResources.get("spacing"));h=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");h.setAttribute("title",mxResources.get("left"));h=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");
+h.setAttribute("title",mxResources.get("center"));h=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");h.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,h){var n=this.editorUi.menus.get(d),u=this.addMenuFunction(a,b,f,function(){n.funct.apply(n,arguments)},g,e);h||"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)};
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,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.style.maxWidth="100%";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 I=k.value;/(^#?[a-zA-Z0-9]*$)/.test(I)?
-("none"!=I&&"#"!=I.charAt(0)&&(I="#"+I),ColorDialog.addRecentColor("none"!=I?I.substring(1):I,12),n(I),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var I=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);I.style.marginBottom="8px";return I}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(I,C,N,R){C=null!=C?C:12;var S=document.createElement("table");S.style.borderCollapse=
-"collapse";S.setAttribute("cellspacing","0");S.style.marginBottom="20px";S.style.cellSpacing="0px";S.style.marginLeft="1px";var Q=document.createElement("tbody");S.appendChild(Q);for(var aa=I.length/C,U=0;U<aa;U++){for(var P=document.createElement("tr"),X=0;X<C;X++)mxUtils.bind(this,function(ja){var fa=document.createElement("td");fa.style.border="0px solid black";fa.style.padding="0px";fa.style.width="16px";fa.style.height="16px";null==ja&&(ja=N);if(null!=ja){fa.style.borderWidth="1px";"none"==ja?
-fa.style.background="url('"+Dialog.prototype.noColorImage+"')":fa.style.backgroundColor="#"+ja;var ra=this.colorNames[ja.toUpperCase()];null!=ra&&fa.setAttribute("title",ra)}P.appendChild(fa);null!=ja&&(fa.style.cursor="pointer",mxEvent.addListener(fa,"click",function(){"none"==ja?(u.fromString("ffffff"),k.value="none"):u.fromString(ja)}),mxEvent.addListener(fa,"dblclick",g))})(I[U*C+X]);Q.appendChild(P)}R&&(I=document.createElement("td"),I.setAttribute("title",mxResources.get("reset")),I.style.border=
-"1px solid black",I.style.padding="0px",I.style.width="16px",I.style.height="16px",I.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",I.style.backgroundPosition="center center",I.style.backgroundRepeat="no-repeat",I.style.cursor="pointer",P.appendChild(I),mxEvent.addListener(I,"click",function(){ColorDialog.resetRecentColors();S.parentNode.replaceChild(d(),S)}));m.appendChild(S);return S});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 D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});D.className="geBtn";a.editor.cancelFirst&&B.appendChild(D);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";B.appendChild(F);a.editor.cancelFirst||B.appendChild(D);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(I){27==I.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(I))});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,d){if(null!=f){var g=this.editorUi.editor.graph,e=null,h=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(h&&(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)}h=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){h=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.style.maxWidth="100%";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 H=h.value;/(^#?[a-zA-Z0-9]*$)/.test(H)?
+("none"!=H&&"#"!=H.charAt(0)&&(H="#"+H),ColorDialog.addRecentColor("none"!=H?H.substring(1):H,12),n(H),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function e(){var H=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);H.style.marginBottom="8px";return H}this.editorUi=a;var h=document.createElement("input");h.style.marginBottom="10px";mxClient.IS_IE&&(h.style.marginTop="10px",document.body.appendChild(h));var n=null!=f?f:this.createApplyFunction();
+this.init=function(){mxClient.IS_TOUCH||h.focus()};var u=new mxJSColor.color(h);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(H,C,N,Q){C=null!=C?C: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 R=document.createElement("tbody");T.appendChild(R);for(var ba=H.length/C,S=0;S<ba;S++){for(var P=document.createElement("tr"),X=0;X<C;X++)mxUtils.bind(this,function(ja){var fa=document.createElement("td");fa.style.border="0px solid black";fa.style.padding="0px";fa.style.width="16px";fa.style.height="16px";null==ja&&(ja=N);if(null!=ja){fa.style.borderWidth="1px";"none"==ja?
+fa.style.background="url('"+Dialog.prototype.noColorImage+"')":fa.style.backgroundColor="#"+ja;var ra=this.colorNames[ja.toUpperCase()];null!=ra&&fa.setAttribute("title",ra)}P.appendChild(fa);null!=ja&&(fa.style.cursor="pointer",mxEvent.addListener(fa,"click",function(){"none"==ja?(u.fromString("ffffff"),h.value="none"):u.fromString(ja)}),mxEvent.addListener(fa,"dblclick",g))})(H[S*C+X]);R.appendChild(P)}Q&&(H=document.createElement("td"),H.setAttribute("title",mxResources.get("reset")),H.style.border=
+"1px solid black",H.style.padding="0px",H.style.width="16px",H.style.height="16px",H.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.style.cursor="pointer",P.appendChild(H),mxEvent.addListener(H,"click",function(){ColorDialog.resetRecentColors();T.parentNode.replaceChild(e(),T)}));m.appendChild(T);return T});f.appendChild(h);if(mxClient.IS_IE||mxClient.IS_IE11)h.style.width="216px";else{h.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?h.focus():(x.value="#"+h.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 D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});D.className="geBtn";a.editor.cancelFirst&&B.appendChild(D);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";B.appendChild(F);a.editor.cancelFirst||B.appendChild(D);null!=b&&("none"==b?(u.fromString("ffffff"),h.value="none"):u.fromString(b));
+f.appendChild(B);this.picker=u;this.colorInput=h;mxEvent.addListener(f,"keydown",function(H){27==H.keyCode&&(a.hideDialog(),null!=d&&d(),mxEvent.consume(H))});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,e,g,d,k,n,u,m,r,x,B,D,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 I=n.cloneNode(!1),C=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";I.style.top="20px";I.style.bottom="64px";C.style.bottom="0px";C.style.height="60px";C.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(I);k.appendChild(C);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};I.appendChild(N);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",C.appendChild(b));if(null!=D)for(b=0;b<D.length;b++)(function(S,
-Q,aa){S=mxUtils.button(S,function(U){Q(U,N)});null!=aa&&S.setAttribute("title",aa);S.className="geBtn";C.appendChild(S)})(D[b][0],D[b][1],D[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&&C.appendChild(d);null!=u&&u(C,N);if(null!=e){var R=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();e(N.value)});R.setAttribute("title","Ctrl+Enter");R.className="geBtn gePrimaryBtn";
-C.appendChild(R);mxEvent.addListener(N,"keypress",function(S){13==S.keyCode&&mxEvent.isControlDown(S)&&R.click()})}a.editor.cancelFirst||C.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 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)});
-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 P=r.value,X=P.lastIndexOf(".");r.value=0<X?P.substring(0,X+1)+x.value:P+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),D.setAttribute("disabled","true"),F.setAttribute("disabled","true"),Q.setAttribute("disabled","true")):(B.removeAttribute("disabled"),D.removeAttribute("disabled"),F.removeAttribute("disabled"),Q.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?R.removeAttribute("disabled"):R.setAttribute("disabled",
-"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled");"png"===x.value?(I.removeAttribute("disabled"),C.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"))}function f(){D.style.backgroundColor=D.value*F.value>MAX_AREA||0>=D.value?"red":"";F.style.backgroundColor=D.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);
+"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,h,n,u,m,r,x,B,D,F){m=null!=m?m:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";n=document.createElement("div");
+n.style.position="absolute";n.style.left="0px";n.style.right="0px";var H=n.cloneNode(!1),C=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";H.style.top="20px";H.style.bottom="64px";C.style.bottom="0px";C.style.height="60px";C.style.textAlign="center";mxUtils.write(n,b);h.appendChild(n);h.appendChild(H);h.appendChild(C);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};H.appendChild(N);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",C.appendChild(b));if(null!=D)for(b=0;b<D.length;b++)(function(T,
+R,ba){T=mxUtils.button(T,function(S){R(S,N)});null!=ba&&T.setAttribute("title",ba);T.className="geBtn";C.appendChild(T)})(D[b][0],D[b][1],D[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&&C.appendChild(e);null!=u&&u(C,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";
+C.appendChild(Q);mxEvent.addListener(N,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&Q.click()})}a.editor.cancelFirst||C.appendChild(e);this.container=h},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(h){h.stopPropagation();h.preventDefault()},!1),f.addEventListener("drop",function(h){h.stopPropagation();h.preventDefault();if(0<h.dataTransfer.files.length){h=h.dataTransfer.files[0];var n=new FileReader;n.onload=function(u){f.value=u.target.result};
+n.readAsText(h)}else f.value=a.extractGraphModelFromEvent(h)},!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 h=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(h);else if("replace"==g.value){a.editor.graph.model.beginUpdate();
+try{a.editor.setGraphXml(mxUtils.parseXml(h).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(h),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 P=r.value,X=P.lastIndexOf(".");r.value=0<X?P.substring(0,X+1)+x.value:P+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),D.setAttribute("disabled","true"),F.setAttribute("disabled","true"),R.setAttribute("disabled","true")):(B.removeAttribute("disabled"),D.removeAttribute("disabled"),F.removeAttribute("disabled"),R.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?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled");"png"===x.value?(H.removeAttribute("disabled"),C.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"))}function f(){D.style.backgroundColor=D.value*F.value>MAX_AREA||0>=D.value?"red":"";F.style.backgroundColor=D.value*F.value>MAX_AREA||0>=F.value?"red":""}var d=a.editor.graph,g=d.getGraphBounds(),e=d.view.scale,h=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);
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);a.printPdfExport||(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 D=document.createElement("input");D.setAttribute("value",k);D.style.width="180px";m=document.createElement("td");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("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 I=document.createElement("select");I.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");I.appendChild(m);
-m=document.createElement("option");m.setAttribute("value","300");mxUtils.write(m,"300dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");I.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));I.appendChild(m);var C=document.createElement("input");C.style.width="180px";C.style.display="none";C.setAttribute("value","100");C.setAttribute("type","number");C.setAttribute("min",
-"50");C.setAttribute("step","50");var N=!1;mxEvent.addListener(I,"change",function(){"custom"==this.value?(this.style.display="none",C.style.display="",C.focus()):(C.value=this.value,N||(B.value=this.value))});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value);isNaN(P)||0>=P?C.style.backgroundColor="red":(C.style.backgroundColor="",N||(B.value=P))});m=document.createElement("td");m.appendChild(I);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("background")+":");g.appendChild(m);var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=null==e.background||e.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(R);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 S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=!1;m=document.createElement("td");m.appendChild(S);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 Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("value",ExportDialog.lastBorderValue);Q.style.width="180px";m=document.createElement("td");m.appendChild(Q);
-g.appendChild(m);u.appendChild(g);d.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){N=!0;var P=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*P).toFixed(2));0<k?(D.value=Math.floor(k*P),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(D,"change",function(){var P=parseInt(D.value)/k;0<P?(B.value=parseFloat((100*P).toFixed(2)),F.value=Math.floor(n*P)):(B.value="100",D.value=k,F.value=n);f()});mxEvent.addListener(F,
-"change",function(){var P=parseInt(F.value)/n;0<P?(B.value=parseFloat((100*P).toFixed(2)),D.value=Math.floor(k*P)):(B.value="100",D.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 aa=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=r.value,X=x.value,ja=Math.max(0,parseFloat(B.value)||
-100)/100,fa=Math.max(0,parseInt(Q.value)),ra=e.background,K=Math.max(1,parseInt(C.value));if(("svg"==X||"png"==X||"pdf"==X)&&R.checked)ra=null;else if(null==ra||ra==mxConstants.NONE)ra="#ffffff";ExportDialog.lastBorderValue=fa;ExportDialog.exportFile(a,P,X,ra,ja,fa,K,S.checked)}}));aa.className="geBtn gePrimaryBtn";var U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});U.className="geBtn";a.editor.cancelFirst?(m.appendChild(U),m.appendChild(aa)):(m.appendChild(aa),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<S.value.length?Q.removeAttribute("disabled"):Q.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=[],D=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,I=function(U,P){var X=document.createElement("div");X.style.position="relative";X.style.paddingRight="20px";X.style.boxSizing="border-box";X.style.width="100%";var ja=document.createElement("a"),fa=mxUtils.createImage(Dialog.prototype.closeImage);fa.style.height="9px";fa.style.fontSize="9px";fa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ja.className="geButton";ja.setAttribute("title",
-mxResources.get("delete"));ja.style.position="absolute";ja.style.top="4px";ja.style.right="0px";ja.style.margin="0px";ja.style.width="9px";ja.style.height="9px";ja.style.cursor="pointer";ja.appendChild(fa);P=function(ra){return function(){for(var K=0,V=0;V<x.length;V++){if(x[V]==ra){B[V]=null;m.table.deleteRow(K+(null!=F?1:0));break}null!=B[V]&&K++}}}(P);mxEvent.addListener(ja,"click",P);P=U.parentNode;X.appendChild(U);X.appendChild(ja);P.appendChild(X)};k=function(U,P,X){x[U]=P;B[U]=m.addTextarea(x[D]+
-":",X,2);B[U].style.width="100%";0<X.indexOf("\n")&&B[U].setAttribute("rows","2");I(B[U],P);null!=n[P]&&0==n[P].editable&&B[U].setAttribute("disabled","disabled")};u=[];for(var C=g.getModel().getParent(b)==g.getModel().getRoot(),N=0;N<r.length;N++)("label"!=r[N].nodeName||Graph.translateDiagram||C)&&"placeholders"!=r[N].nodeName&&u.push({name:r[N].nodeName,value:r[N].nodeValue});u.sort(function(U,P){return U.name<P.name?-1:U.name>P.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 R=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(P){null!=P&&0<P.length&&P!=F&&(null==g.getModel().getCell(P)?(g.getModel().cellRemoved(b),b.setId(P),F=P,R.innerHTML=mxUtils.htmlEntities(P),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[P])}))}),
-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(D,u[N].name,u[N].value),D++;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 S=document.createElement("input");S.setAttribute("placeholder",mxResources.get("enterPropertyName"));S.setAttribute("type","text");S.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");S.style.boxSizing="border-box";S.style.marginLeft="2px";S.style.width="100%";k.appendChild(S);u.appendChild(k);e.appendChild(u);var Q=mxUtils.button(mxResources.get("addProperty"),function(){var U=S.value;if(0<U.length&&"label"!=U&&"placeholders"!=U&&0>U.indexOf(":"))try{var P=
-mxUtils.indexOf(x,U);if(0<=P&&null!=B[P])B[P].focus();else{d.cloneNode(!1).setAttribute(U,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(U);var X=m.addTextarea(U+":","",2);X.style.width="100%";B.push(X);I(X,U);X.focus()}Q.setAttribute("disabled","disabled");S.value=""}catch(ja){mxUtils.alert(ja)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(S,"keypress",function(U){13==U.keyCode&&Q.click()});this.init=function(){0<B.length?B[0].focus():S.focus()};Q.setAttribute("title",
-mxResources.get("addProperty"));Q.setAttribute("disabled","disabled");Q.style.textOverflow="ellipsis";Q.style.position="absolute";Q.style.overflow="hidden";Q.style.width="144px";Q.style.right="0px";Q.className="geBtn";k.appendChild(Q);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var aa=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var U=!1,
-P=0;P<x.length;P++)null==B[P]?d.removeAttribute(x[P]):(d.setAttribute(x[P],B[P].value),U=U||"placeholder"==x[P]&&"1"==d.getAttribute("placeholders"));U&&d.removeAttribute("label");g.getModel().setValue(b,d)}catch(X){mxUtils.alert(X)}});aa.setAttribute("title","Ctrl+Enter");aa.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(U){13==U.keyCode&&mxEvent.isControlDown(U)&&aa.click()});mxEvent.addListener(S,"keyup",f);mxEvent.addListener(S,"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",C=document.createElement("input"),C.setAttribute("type","checkbox"),C.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(C.setAttribute("checked","checked"),C.defaultChecked=!0),mxEvent.addListener(C,"click",function(){"1"==d.getAttribute("placeholders")?
-d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),r.appendChild(C),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(C=document.createElement("a"),C.setAttribute("href",EditDataDialog.placeholderHelpLink),C.setAttribute("title",mxResources.get("help")),C.setAttribute("target","_blank"),C.style.marginLeft="8px",C.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),C.appendChild(N),r.appendChild(C)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(aa)):(k.appendChild(aa),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()});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=
+m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendChild(m);var D=document.createElement("input");D.setAttribute("value",h);D.style.width="180px";m=document.createElement("td");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("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 H=document.createElement("select");H.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");H.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");H.appendChild(m);
+m=document.createElement("option");m.setAttribute("value","300");mxUtils.write(m,"300dpi");H.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");H.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));H.appendChild(m);var C=document.createElement("input");C.style.width="180px";C.style.display="none";C.setAttribute("value","100");C.setAttribute("type","number");C.setAttribute("min",
+"50");C.setAttribute("step","50");var N=!1;mxEvent.addListener(H,"change",function(){"custom"==this.value?(this.style.display="none",C.style.display="",C.focus()):(C.value=this.value,N||(B.value=this.value))});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value);isNaN(P)||0>=P?C.style.backgroundColor="red":(C.style.backgroundColor="",N||(B.value=P))});m=document.createElement("td");m.appendChild(H);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("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 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 R=document.createElement("input");R.setAttribute("type","number");R.setAttribute("value",ExportDialog.lastBorderValue);R.style.width="180px";m=document.createElement("td");m.appendChild(R);
+g.appendChild(m);u.appendChild(g);e.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){N=!0;var P=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*P).toFixed(2));0<h?(D.value=Math.floor(h*P),F.value=Math.floor(n*P)):(B.value="100",D.value=h,F.value=n);f()});mxEvent.addListener(D,"change",function(){var P=parseInt(D.value)/h;0<P?(B.value=parseFloat((100*P).toFixed(2)),F.value=Math.floor(n*P)):(B.value="100",D.value=h,F.value=n);f()});mxEvent.addListener(F,
+"change",function(){var P=parseInt(F.value)/n;0<P?(B.value=parseFloat((100*P).toFixed(2)),D.value=Math.floor(h*P)):(B.value="100",D.value=h,F.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var ba=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=r.value,X=x.value,ja=Math.max(0,parseFloat(B.value)||
+100)/100,fa=Math.max(0,parseInt(R.value)),ra=d.background,K=Math.max(1,parseInt(C.value));if(("svg"==X||"png"==X||"pdf"==X)&&Q.checked)ra=null;else if(null==ra||ra==mxConstants.NONE)ra="#ffffff";ExportDialog.lastBorderValue=fa;ExportDialog.exportFile(a,P,X,ra,ja,fa,K,T.checked)}}));ba.className="geBtn gePrimaryBtn";var S=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});S.className="geBtn";a.editor.cancelFirst?(m.appendChild(S),m.appendChild(ba)):(m.appendChild(ba),m.appendChild(S));
+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,h,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="+h)).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<T.value.length?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled")}var d=document.createElement("div"),g=a.editor.graph,e=g.getModel().getValue(b);if(!mxUtils.isNode(e)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",e||"");e=h}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(S){}var m=new mxForm("properties");m.table.style.width=
+"100%";var r=e.attributes,x=[],B=[],D=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,H=function(S,P){var X=document.createElement("div");X.style.position="relative";X.style.paddingRight="20px";X.style.boxSizing="border-box";X.style.width="100%";var ja=document.createElement("a"),fa=mxUtils.createImage(Dialog.prototype.closeImage);fa.style.height="9px";fa.style.fontSize="9px";fa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ja.className="geButton";ja.setAttribute("title",
+mxResources.get("delete"));ja.style.position="absolute";ja.style.top="4px";ja.style.right="0px";ja.style.margin="0px";ja.style.width="9px";ja.style.height="9px";ja.style.cursor="pointer";ja.appendChild(fa);P=function(ra){return function(){for(var K=0,V=0;V<x.length;V++){if(x[V]==ra){B[V]=null;m.table.deleteRow(K+(null!=F?1:0));break}null!=B[V]&&K++}}}(P);mxEvent.addListener(ja,"click",P);P=S.parentNode;X.appendChild(S);X.appendChild(ja);P.appendChild(X)};h=function(S,P,X){x[S]=P;B[S]=m.addTextarea(x[D]+
+":",X,2);B[S].style.width="100%";0<X.indexOf("\n")&&B[S].setAttribute("rows","2");H(B[S],P);null!=n[P]&&0==n[P].editable&&B[S].setAttribute("disabled","disabled")};u=[];for(var C=g.getModel().getParent(b)==g.getModel().getRoot(),N=0;N<r.length;N++)("label"!=r[N].nodeName||Graph.translateDiagram||C)&&"placeholders"!=r[N].nodeName&&u.push({name:r[N].nodeName,value:r[N].nodeValue});u.sort(function(S,P){return S.name<P.name?-1:S.name>P.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 Q=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(S){mxEvent.isShiftDown(S)&&(S=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(P){null!=P&&0<P.length&&P!=F&&(null==g.getModel().getCell(P)?(g.getModel().cellRemoved(b),b.setId(P),F=P,Q.innerHTML=mxUtils.htmlEntities(P),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[P])}))}),
+mxResources.get("id")),a.showDialog(S.container,300,80,!0,!0),S.init())});r.setAttribute("title","Shift+Double Click to Edit ID")}for(N=0;N<u.length;N++)h(D,u[N].name,u[N].value),D++;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);h=document.createElement("div");h.style.boxSizing="border-box";h.style.paddingRight="160px";h.style.whiteSpace="nowrap";h.style.marginTop=
+"6px";h.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%";h.appendChild(T);u.appendChild(h);d.appendChild(u);var R=mxUtils.button(mxResources.get("addProperty"),function(){var S=T.value;if(0<S.length&&"label"!=S&&"placeholders"!=S&&0>S.indexOf(":"))try{var P=
+mxUtils.indexOf(x,S);if(0<=P&&null!=B[P])B[P].focus();else{e.cloneNode(!1).setAttribute(S,"");0<=P&&(x.splice(P,1),B.splice(P,1));x.push(S);var X=m.addTextarea(S+":","",2);X.style.width="100%";B.push(X);H(X,S);X.focus()}R.setAttribute("disabled","disabled");T.value=""}catch(ja){mxUtils.alert(ja)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(T,"keypress",function(S){13==S.keyCode&&R.click()});this.init=function(){0<B.length?B[0].focus():T.focus()};R.setAttribute("title",
+mxResources.get("addProperty"));R.setAttribute("disabled","disabled");R.style.textOverflow="ellipsis";R.style.position="absolute";R.style.overflow="hidden";R.style.width="144px";R.style.right="0px";R.className="geBtn";h.appendChild(R);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var ba=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var S=!1,
+P=0;P<x.length;P++)null==B[P]?e.removeAttribute(x[P]):(e.setAttribute(x[P],B[P].value),S=S||"placeholder"==x[P]&&"1"==e.getAttribute("placeholders"));S&&e.removeAttribute("label");g.getModel().setValue(b,e)}catch(X){mxUtils.alert(X)}});ba.setAttribute("title","Ctrl+Enter");ba.className="geBtn gePrimaryBtn";mxEvent.addListener(d,"keypress",function(S){13==S.keyCode&&mxEvent.isControlDown(S)&&ba.click()});mxEvent.addListener(T,"keyup",f);mxEvent.addListener(T,"change",f);h=document.createElement("div");
+h.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",C=document.createElement("input"),C.setAttribute("type","checkbox"),C.style.marginRight="6px","1"==e.getAttribute("placeholders")&&(C.setAttribute("checked","checked"),C.defaultChecked=!0),mxEvent.addListener(C,"click",function(){"1"==e.getAttribute("placeholders")?
+e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")}),r.appendChild(C),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(C=document.createElement("a"),C.setAttribute("href",EditDataDialog.placeholderHelpLink),C.setAttribute("title",mxResources.get("help")),C.setAttribute("target","_blank"),C.style.marginLeft="8px",C.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),C.appendChild(N),r.appendChild(C)),h.appendChild(r);a.editor.cancelFirst?(h.appendChild(u),h.appendChild(ba)):(h.appendChild(ba),h.appendChild(u));d.appendChild(h);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 h=document.createElement("input");h.setAttribute("value",b);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type","text");
+h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.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(){h.value="";h.focus()});e.appendChild(h);e.appendChild(b);g.appendChild(e);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?h.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(h,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),d(h.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(h.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,h=document.createElement("div");h.style.position="absolute";h.style.width="100%";h.style.height="100%";h.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),h,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);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(X){if(u.isEnabled()&&null!=X){var ja=u.convertValueToString(X);
-ja=new FilenameDialog(a,ja||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(fa){null!=fa&&u.cellLabelChanged(X,fa)}),mxResources.get("enterName"));a.showDialog(ja.container,300,100,!0,!0);ja.init()}}function k(){var X=U.get(u.getLayerForCells(u.getSelectionCells()));null!=X?X.appendChild(P):null!=P.parentNode&&P.parentNode.removeChild(P)}function n(){function X(ra,K,V,O){var T=document.createElement("div");T.className="geToolbarContainer";U.put(V,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",K);var J=document.createElement("div");J.style.display="inline-block";J.style.width="100%";J.style.textOverflow="ellipsis";J.style.overflow="hidden";mxEvent.addListener(T,
-"dragover",function(na){na.dataTransfer.dropEffect="move";D=ra;na.stopPropagation();na.preventDefault()});mxEvent.addListener(T,"dragstart",function(na){B=T;mxClient.IS_FF&&na.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(T,"dragend",function(na){null!=B&&null!=D&&u.addCell(V,u.model.root,D);D=B=null;na.stopPropagation();na.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(V)?"hide":"show"));u.model.isVisible(V)?(ba.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(T,75)):(ba.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(T,25));Editor.isDarkMode()&&(ba.style.filter="invert(100%)");J.appendChild(ba);mxEvent.addListener(ba,"click",function(na){u.model.setVisible(V,!u.model.isVisible(V));mxEvent.consume(na)});
-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 ia=u.getCurrentCellStyle(V);"1"==mxUtils.getValue(ia,"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(na){if(u.isEnabled()){var W=null;u.getModel().beginUpdate();try{W="1"==mxUtils.getValue(ia,"locked","0")?null:"1",u.setCellStyles("locked",W,[V])}finally{u.getModel().endUpdate()}"1"==W&&u.removeSelectionCells(u.getModel().getDescendants(V));mxEvent.consume(na)}});J.appendChild(ba);ba=document.createElement("span");mxUtils.write(ba,K);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";J.appendChild(ba);T.appendChild(J);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)K=document.createElement("div"),K.style.display="block",K.style.textAlign="right",K.style.whiteSpace="nowrap",K.style.position="absolute",K.style.right="16px",K.style.top="6px",0<ra&&(J=document.createElement("a"),J.setAttribute("title",
+function(){n.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){n.setSuspended(!0)}));n.init(h);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=e.zoomFactor,null!=u.deltaY&&Math.round(u.deltaY)!=u.deltaY&&(r=1+Math.abs(u.deltaY)/20*(r-1)),e.lazyZoom(m,null,null,r),mxEvent.consume(u))})},LayersWindow=function(a,b,f,d,g){function e(X){if(u.isEnabled()&&null!=X){var ja=u.convertValueToString(X);
+ja=new FilenameDialog(a,ja||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(fa){null!=fa&&u.cellLabelChanged(X,fa)}),mxResources.get("enterName"));a.showDialog(ja.container,300,100,!0,!0);ja.init()}}function h(){var X=S.get(u.getLayerForCells(u.getSelectionCells()));null!=X?X.appendChild(P):null!=P.parentNode&&P.parentNode.removeChild(P)}function n(){function X(ra,K,V,O){var U=document.createElement("div");U.className="geToolbarContainer";S.put(V,U);U.style.overflow=
+"hidden";U.style.position="relative";U.style.padding="4px";U.style.height="22px";U.style.display="block";U.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";U.style.borderWidth="0px 0px 1px 0px";U.style.borderColor="#c3c3c3";U.style.borderStyle="solid";U.style.whiteSpace="nowrap";U.setAttribute("title",K);var J=document.createElement("div");J.style.display="inline-block";J.style.width="100%";J.style.textOverflow="ellipsis";J.style.overflow="hidden";mxEvent.addListener(U,
+"dragover",function(na){na.dataTransfer.dropEffect="move";D=ra;na.stopPropagation();na.preventDefault()});mxEvent.addListener(U,"dragstart",function(na){B=U;mxClient.IS_FF&&na.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(U,"dragend",function(na){null!=B&&null!=D&&u.addCell(V,u.model.root,D);D=B=null;na.stopPropagation();na.preventDefault()});var aa=document.createElement("img");aa.setAttribute("draggable","false");aa.setAttribute("align","top");aa.setAttribute("border","0");aa.style.width=
+"16px";aa.style.padding="0px 6px 0 4px";aa.style.marginTop="2px";aa.style.cursor="pointer";aa.setAttribute("title",mxResources.get(u.model.isVisible(V)?"hide":"show"));u.model.isVisible(V)?(aa.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(U,75)):(aa.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(U,25));Editor.isDarkMode()&&(aa.style.filter="invert(100%)");J.appendChild(aa);mxEvent.addListener(aa,"click",function(na){u.model.setVisible(V,!u.model.isVisible(V));mxEvent.consume(na)});
+aa=document.createElement("img");aa.setAttribute("draggable","false");aa.setAttribute("align","top");aa.setAttribute("border","0");aa.style.width="16px";aa.style.padding="0px 6px 0 0";aa.style.marginTop="2px";aa.setAttribute("title",mxResources.get("lockUnlock"));var ia=u.getCurrentCellStyle(V);"1"==mxUtils.getValue(ia,"locked","0")?(aa.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(aa,75)):(aa.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(aa,25));Editor.isDarkMode()&&(aa.style.filter=
+"invert(100%)");u.isEnabled()&&(aa.style.cursor="pointer");mxEvent.addListener(aa,"click",function(na){if(u.isEnabled()){var W=null;u.getModel().beginUpdate();try{W="1"==mxUtils.getValue(ia,"locked","0")?null:"1",u.setCellStyles("locked",W,[V])}finally{u.getModel().endUpdate()}"1"==W&&u.removeSelectionCells(u.getModel().getDescendants(V));mxEvent.consume(na)}});J.appendChild(aa);aa=document.createElement("span");mxUtils.write(aa,K);aa.style.display="block";aa.style.whiteSpace="nowrap";aa.style.overflow=
+"hidden";aa.style.textOverflow="ellipsis";aa.style.position="absolute";aa.style.left="52px";aa.style.right="8px";aa.style.top="8px";J.appendChild(aa);U.appendChild(J);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)K=document.createElement("div"),K.style.display="block",K.style.textAlign="right",K.style.whiteSpace="nowrap",K.style.position="absolute",K.style.right="16px",K.style.top="6px",0<ra&&(J=document.createElement("a"),J.setAttribute("title",
mxResources.get("toBack")),J.className="geButton",J.style.cssFloat="none",J.innerHTML="&#9660;",J.style.width="14px",J.style.height="14px",J.style.fontSize="14px",J.style.margin="0px",J.style.marginTop="-1px",K.appendChild(J),mxEvent.addListener(J,"click",function(na){u.isEnabled()&&u.addCell(V,u.model.root,ra-1);mxEvent.consume(na)})),0<=ra&&ra<F-1&&(J=document.createElement("a"),J.setAttribute("title",mxResources.get("toFront")),J.className="geButton",J.style.cssFloat="none",J.innerHTML="&#9650;",
-J.style.width="14px",J.style.height="14px",J.style.fontSize="14px",J.style.margin="0px",J.style.marginTop="-1px",K.appendChild(J),mxEvent.addListener(J,"click",function(na){u.isEnabled()&&u.addCell(V,u.model.root,ra+1);mxEvent.consume(na)})),T.appendChild(K);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(T.setAttribute("draggable","true"),T.style.cursor="move")}mxEvent.addListener(T,"dblclick",function(na){var W=mxEvent.getSource(na).nodeName;"INPUT"!=W&&"IMG"!=W&&(d(V),mxEvent.consume(na))});
-u.getDefaultParent()==V&&(T.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",T.style.fontWeight=u.isEnabled()?"bold":"",I=V);mxEvent.addListener(T,"click",function(na){u.isEnabled()&&(u.setDefaultParent(O),u.view.setCurrentRoot(null),mxEvent.isShiftDown(na)&&u.setSelectionCells(V.children),mxEvent.consume(na))});x.appendChild(T)}F=u.model.getChildCount(u.model.root);x.innerText="";U.clear();for(var ja=F-1;0<=ja;ja--)mxUtils.bind(this,function(ra){X(ja,u.convertValueToString(ra)||mxResources.get("background"),
-ra,ra)})(u.model.getChildAt(u.model.root,ja));var fa=u.convertValueToString(I)||mxResources.get("background");R.setAttribute("title",mxResources.get("removeIt",[fa]));aa.setAttribute("title",mxResources.get("duplicateIt",[fa]));u.isSelectionEmpty()&&(S.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=
+J.style.width="14px",J.style.height="14px",J.style.fontSize="14px",J.style.margin="0px",J.style.marginTop="-1px",K.appendChild(J),mxEvent.addListener(J,"click",function(na){u.isEnabled()&&u.addCell(V,u.model.root,ra+1);mxEvent.consume(na)})),U.appendChild(K);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(na){var W=mxEvent.getSource(na).nodeName;"INPUT"!=W&&"IMG"!=W&&(e(V),mxEvent.consume(na))});
+u.getDefaultParent()==V&&(U.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",U.style.fontWeight=u.isEnabled()?"bold":"",H=V);mxEvent.addListener(U,"click",function(na){u.isEnabled()&&(u.setDefaultParent(O),u.view.setCurrentRoot(null),mxEvent.isShiftDown(na)&&u.setSelectionCells(V.children),mxEvent.consume(na))});x.appendChild(U)}F=u.model.getChildCount(u.model.root);x.innerText="";S.clear();for(var ja=F-1;0<=ja;ja--)mxUtils.bind(this,function(ra){X(ja,u.convertValueToString(ra)||mxResources.get("background"),
+ra,ra)})(u.model.getChildAt(u.model.root,ja));var fa=u.convertValueToString(H)||mxResources.get("background");Q.setAttribute("title",mxResources.get("removeIt",[fa]));ba.setAttribute("title",mxResources.get("duplicateIt",[fa]));u.isSelectionEmpty()&&(T.className="geButton mxDisabled");h()}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,D=null;mxEvent.addListener(m,"dragover",function(X){X.dataTransfer.dropEffect="move";D=0;X.stopPropagation();X.preventDefault()});mxEvent.addListener(m,"drop",
-function(X){X.stopPropagation();X.preventDefault()});var F=null,I=null,C=document.createElement("div");C.className="geToolbarContainer";C.style.position="absolute";C.style.bottom="0px";C.style.left="0px";C.style.right="0px";C.style.height=r;C.style.overflow="hidden";C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.borderWidth="1px 0px 0px 0px";C.style.borderColor="#c3c3c3";C.style.borderStyle="solid";C.style.display=
-"block";C.style.whiteSpace="nowrap";var N=document.createElement("a");N.className="geButton";var R=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%)");R.appendChild(r);mxEvent.addListener(R,"click",function(X){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.model.root.getIndex(I);u.removeCells([I],!1);0==u.model.getChildCount(u.model.root)?
-(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ja&&ja<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ja-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(R.className="geButton mxDisabled");C.appendChild(R);var S=N.cloneNode();S.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));r=r.cloneNode(!1);r.setAttribute("src",Editor.verticalDotsImage);S.appendChild(r);mxEvent.addListener(S,
-"click",function(X){if(u.isEnabled()&&!u.isSelectionEmpty()){var ja=mxUtils.getOffset(S);a.showPopupMenu(mxUtils.bind(this,function(fa,ra){for(var K=F-1;0<=K;K--)mxUtils.bind(this,function(V){var O=fa.addItem(u.convertValueToString(V)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),0,0,!1,V)}),ra);1==u.getSelectionCount()&&u.model.isAncestor(V,u.getSelectionCell())&&fa.addCheckmark(O,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,K))}),
-ja.x,ja.y+S.offsetHeight,X)}});C.appendChild(S);var Q=N.cloneNode(!1);Q.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);Q.appendChild(r);mxEvent.addListener(Q,"click",function(X){u.isEnabled()&&a.showDataDialog(I);mxEvent.consume(X)});u.isEnabled()||(Q.className="geButton mxDisabled");C.appendChild(Q);var aa=N.cloneNode(!1);aa.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage);
-aa.appendChild(r);mxEvent.addListener(aa,"click",function(X){if(u.isEnabled()){X=null;u.model.beginUpdate();try{X=u.cloneCell(I),u.cellLabelChanged(X,mxResources.get("untitledLayer")),X.setVisible(!0),X=u.addCell(X,u.model.root),u.setDefaultParent(X)}finally{u.model.endUpdate()}null==X||u.isCellLocked(X)||u.selectAll(X)}});u.isEnabled()||(aa.className="geButton mxDisabled");C.appendChild(aa);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(X){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ja)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(N.className="geButton mxDisabled");C.appendChild(N);m.appendChild(C);var U=new mxDictionary,P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="&#8226;";P.style.position=
-"absolute";P.style.fontWeight="bold";P.style.fontSize="16pt";P.style.right="2px";P.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?S.className="geButton mxDisabled":S.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);
+function(X){X.stopPropagation();X.preventDefault()});var F=null,H=null,C=document.createElement("div");C.className="geToolbarContainer";C.style.position="absolute";C.style.bottom="0px";C.style.left="0px";C.style.right="0px";C.style.height=r;C.style.overflow="hidden";C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.borderWidth="1px 0px 0px 0px";C.style.borderColor="#c3c3c3";C.style.borderStyle="solid";C.style.display=
+"block";C.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(X){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.model.root.getIndex(H);u.removeCells([H],!1);0==u.model.getChildCount(u.model.root)?
+(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ja&&ja<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ja-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(Q.className="geButton mxDisabled");C.appendChild(Q);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(X){if(u.isEnabled()&&!u.isSelectionEmpty()){var ja=mxUtils.getOffset(T);a.showPopupMenu(mxUtils.bind(this,function(fa,ra){for(var K=F-1;0<=K;K--)mxUtils.bind(this,function(V){var O=fa.addItem(u.convertValueToString(V)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),0,0,!1,V)}),ra);1==u.getSelectionCount()&&u.model.isAncestor(V,u.getSelectionCell())&&fa.addCheckmark(O,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,K))}),
+ja.x,ja.y+T.offsetHeight,X)}});C.appendChild(T);var R=N.cloneNode(!1);R.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);R.appendChild(r);mxEvent.addListener(R,"click",function(X){u.isEnabled()&&a.showDataDialog(H);mxEvent.consume(X)});u.isEnabled()||(R.className="geButton mxDisabled");C.appendChild(R);var ba=N.cloneNode(!1);ba.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage);
+ba.appendChild(r);mxEvent.addListener(ba,"click",function(X){if(u.isEnabled()){X=null;u.model.beginUpdate();try{X=u.cloneCell(H),u.cellLabelChanged(X,mxResources.get("untitledLayer")),X.setVisible(!0),X=u.addCell(X,u.model.root),u.setDefaultParent(X)}finally{u.model.endUpdate()}null==X||u.isCellLocked(X)||u.selectAll(X)}});u.isEnabled()||(ba.className="geButton mxDisabled");C.appendChild(ba);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(X){if(u.isEnabled()){u.model.beginUpdate();try{var ja=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ja)}finally{u.model.endUpdate()}}mxEvent.consume(X)});u.isEnabled()||(N.className="geButton mxDisabled");C.appendChild(N);m.appendChild(C);var S=new mxDictionary,P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="&#8226;";P.style.position=
+"absolute";P.style.fontWeight="bold";P.style.fontSize="16pt";P.style.right="2px";P.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";h()});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;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";
@@ -5986,9 +5994,9 @@ null,null,"bpmn business process model notation gateway parallel multiple interr
this.createVertexTemplateEntry("points=[[0.25,0.25,0],[0.5,0,0],[0.75,0.25,0],[1,0.5,0],[0.75,0.75,0],[0.5,1,0],[0.25,0.75,0],[0,0.5,0]];shape=mxgraph.bpmn.gateway2;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;align=center;perimeter=rhombusPerimeter;outlineConnect=0;outline=catching;symbol=parallelMultiple;",50,50,"","Parallel Multiple (Catching)",null,null,"bpmn business process model notation gateway parallel multiple catching"),this.createVertexTemplateEntry("points=[[0.25,0.25,0],[0.5,0,0],[0.75,0.25,0],[1,0.5,0],[0.75,0.75,0],[0.5,1,0],[0.25,0.75,0],[0,0.5,0]];shape=mxgraph.bpmn.gateway2;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;align=center;perimeter=rhombusPerimeter;outlineConnect=0;outline=boundInt;symbol=parallelMultiple;",
50,50,"","Parallel Multiple Boundary (Interrupting)",null,null,"bpmn business process model notation gateway parallel multiple boundary interrupting"),this.createVertexTemplateEntry("points=[[0.25,0.25,0],[0.5,0,0],[0.75,0.25,0],[1,0.5,0],[0.75,0.75,0],[0.5,1,0],[0.25,0.75,0],[0,0.5,0]];shape=mxgraph.bpmn.gateway2;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;align=center;perimeter=rhombusPerimeter;outlineConnect=0;outline=boundNonint;symbol=parallelMultiple;",
50,50,"","Parallel Multiple Boundary (Non-Interrupting)",null,null,"bpmn business process model notation gateway parallel multiple boundary non interrupting noninterrupting"),this.createVertexTemplateEntry("points=[[0.25,0.25,0],[0.5,0,0],[0.75,0.25,0],[1,0.5,0],[0.75,0.75,0],[0.5,1,0],[0.25,0.75,0],[0,0.5,0]];shape=mxgraph.bpmn.gateway2;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;align=center;perimeter=rhombusPerimeter;outlineConnect=0;outline=end;symbol=terminate;",
-50,50,"","Terminate",null,null,"bpmn business process model notation gateway terminate")];this.addPalette("bpmn2Gateways","BPMN 2.0 Gateways",!1,mxUtils.bind(this,function(e){for(var f=0;f<b.length;f++)e.appendChild(b[f](e))}))}})();(function(){Sidebar.prototype.addC4Palette=function(){this.setCurrentSearchEntryLibrary("c4");this.addPaletteFunctions("c4","C4",!1,[this.addEntry("c4 person",function(){var a=new mxCell("",new mxGeometry(0,0,200,180),"html=1;fontSize=11;dashed=0;whitespace=wrap;fillColor=#083F75;strokeColor=#06315C;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));
+50,50,"","Terminate",null,null,"bpmn business process model notation gateway terminate")];this.addPalette("bpmn2Gateways","BPMN 2.0 Gateways",!1,mxUtils.bind(this,function(e){for(var f=0;f<b.length;f++)e.appendChild(b[f](e))}))}})();(function(){Sidebar.prototype.addC4Palette=function(){this.setCurrentSearchEntryLibrary("c4");this.addPaletteFunctions("c4","C4",!1,[this.addEntry("c4 person",function(){var a=new mxCell("",new mxGeometry(0,0,200,180),"html=1;fontSize=11;dashed=0;whiteSpace=wrap;fillColor=#083F75;strokeColor=#06315C;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));
a.setAttribute("placeholders","1");a.setAttribute("c4Name","Person name");a.setAttribute("c4Type","Person");a.setAttribute("c4Description","Description of person.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%]</div><br><div><font style="font-size: 11px"><font color="#cccccc">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Person")}),this.addEntry("c4 external person",function(){var a=new mxCell("",
-new mxGeometry(0,0,200,180),"html=1;fontSize=11;dashed=0;whitespace=wrap;fillColor=#6C6477;strokeColor=#4D4D4D;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","External person name");a.setAttribute("c4Type","Person");a.setAttribute("c4Description",
+new mxGeometry(0,0,200,180),"html=1;fontSize=11;dashed=0;whiteSpace=wrap;fillColor=#6C6477;strokeColor=#4D4D4D;fontColor=#ffffff;shape=mxgraph.c4.person2;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","External person name");a.setAttribute("c4Type","Person");a.setAttribute("c4Description",
"Description of external person.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%]</div><br><div><font style="font-size: 11px"><font color="#cccccc">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"External Person")}),this.addEntry("c4 software system",function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#1061B0;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#0D5091;metaEdit=1;resizable=0;points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];");
a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","System name");a.setAttribute("c4Type","Software System");a.setAttribute("c4Description","Description of software system.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%]</div><br><div><font style="font-size: 11px"><font color="#cccccc">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,
a.geometry.height,"Software System")}),this.addEntry("c4 external software system",function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#8C8496;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#736782;metaEdit=1;resizable=0;points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));
@@ -5996,13 +6004,13 @@ a.setAttribute("placeholders","1");a.setAttribute("c4Name","External system name
function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"rounded=1;whiteSpace=wrap;html=1;fontSize=11;labelBackgroundColor=none;fillColor=#23A2D9;fontColor=#ffffff;align=center;arcSize=10;strokeColor=#0E7DAD;metaEdit=1;resizable=0;points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name",
"Container name");a.setAttribute("c4Type","Container");a.setAttribute("c4Technology","e.g. SpringBoot, ElasticSearch, etc.");a.setAttribute("c4Description","Description of container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%: %c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Container")}),
this.addEntry("c4 data container",function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"shape=cylinder3;size=15;whiteSpace=wrap;html=1;boundedLbl=1;rounded=0;labelBackgroundColor=none;fillColor=#23A2D9;fontSize=12;fontColor=#ffffff;align=center;strokeColor=#0E7DAD;metaEdit=1;points=[[0.5,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.5,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");
-a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container ");a.setAttribute("c4Technology","e.g. Oracle Database 12");a.setAttribute("c4Description","Description of storage type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,
+a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container");a.setAttribute("c4Technology","e.g. Oracle Database 12");a.setAttribute("c4Description","Description of storage type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],a.geometry.width,
a.geometry.height,"Data Container")}),this.addEntry("c4 microservice container",function(){var a=new mxCell("",new mxGeometry(0,0,200,170),"shape=hexagon;size=50;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;rounded=1;labelBackgroundColor=none;fillColor=#23A2D9;fontSize=12;fontColor=#ffffff;align=center;strokeColor=#0E7DAD;metaEdit=1;points=[[0.5,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.5,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));
-a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container ");a.setAttribute("c4Technology","e.g. Micronaut, etc.");a.setAttribute("c4Description","Description of microservice type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],
+a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container");a.setAttribute("c4Technology","e.g. Micronaut, etc.");a.setAttribute("c4Description","Description of microservice type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,"Microservice Container")}),this.addEntry("c4 message bus container",function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"shape=cylinder3;size=15;direction=south;whiteSpace=wrap;html=1;boundedLbl=1;rounded=0;labelBackgroundColor=none;fillColor=#23A2D9;fontSize=12;fontColor=#ffffff;align=center;strokeColor=#0E7DAD;metaEdit=1;points=[[0.5,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.5,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];resizable=0;");a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));
-a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container ");a.setAttribute("c4Technology","e.g. Apache Kafka, etc.");a.setAttribute("c4Description","Description of message bus type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],
+a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container");a.setAttribute("c4Technology","e.g. Apache Kafka, etc.");a.setAttribute("c4Description","Description of message bus type container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,"Message Bus Container")}),this.addEntry("c4 web browser container",function(){var a=new mxCell("",new mxGeometry(0,0,240,160),"shape=mxgraph.c4.webBrowserContainer2;whiteSpace=wrap;html=1;boundedLbl=1;rounded=0;labelBackgroundColor=none;strokeColor=#118ACD;fillColor=#23A2D9;strokeColor=#118ACD;strokeColor2=#0E7DAD;fontSize=12;fontColor=#ffffff;align=center;metaEdit=1;points=[[0.5,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.5,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];resizable=0;");
-a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container ");a.setAttribute("c4Technology","e.g. JavaScript, Angular etc.");a.setAttribute("c4Description","Description of web browser container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
+a.vertex=!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Type","Container name");a.setAttribute("c4Container","Container");a.setAttribute("c4Technology","e.g. JavaScript, Angular etc.");a.setAttribute("c4Description","Description of web browser container role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Type%</b></font><div>[%c4Container%:&nbsp;%c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Web Browser Container")}),this.addEntry("c4 component",function(){var a=new mxCell("",new mxGeometry(0,0,240,120),"rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#63BEF2;fontColor=#ffffff;align=center;arcSize=6;strokeColor=#2086C9;metaEdit=1;resizable=0;points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];");a.vertex=
!0;a.setValue(mxUtils.createXmlDocument().createElement("object"));a.setAttribute("placeholders","1");a.setAttribute("c4Name","Component name");a.setAttribute("c4Type","Component");a.setAttribute("c4Technology","e.g. Spring Service");a.setAttribute("c4Description","Description of component role/responsibility.");a.setAttribute("label",'<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%: %c4Technology%]</div><br><div><font style="font-size: 11px">%c4Description%</font></div>');return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,"Component")}),this.addEntry("c4 relationship description technology",function(){var a=new mxCell("",new mxGeometry(0,0,240,0),"endArrow=blockThin;html=1;fontSize=10;fontColor=#404040;strokeWidth=1;endFill=1;strokeColor=#828282;elbow=vertical;metaEdit=1;endSize=14;startSize=14;jumpStyle=arc;jumpSize=16;rounded=0;edgeStyle=orthogonalEdgeStyle;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(240,0),!1);a.geometry.relative=
@@ -9496,10 +9504,9 @@ this.getTagsForStencil("mxgraph.pid.misc","screening_device,_sieve,_strainer_(co
null,null,this.getTagsForStencil("mxgraph.pid.misc","stack,_chimney","process instrumentation ").join(" ")),this.createVertexTemplateEntry(c+"steam_trap2;",53,53,"","Steam Trap",null,null,this.getTagsForStencil("mxgraph.pid.misc","steam_trap","process instrumentation ").join(" ")),this.createVertexTemplateEntry(c+"tank_car,_tank_wagon;",127,80,"","Tank Car, Tank Wagon",null,null,this.getTagsForStencil("mxgraph.pid.misc","tank_car,_tank_wagon","process instrumentation ").join(" ")),this.createVertexTemplateEntry(c+
"viewing_glass;",80,50,"","Viewing Glass",null,null,this.getTagsForStencil("mxgraph.pid.misc","viewing_glass","process instrumentation ").join(" "))])}})();(function(){Sidebar.prototype.addRackPalette=function(a,c){for(var d=0;d<a.length;d++)"general"===a[d].toLowerCase()?(this.setCurrentSearchEntryLibrary("rack","rackGeneral"),this.addRackGeneralPalette()):"f5"===a[d].toLowerCase()?(this.setCurrentSearchEntryLibrary("rack","rackF5"),this.addRackF5Palette()):"dell"===a[d].toLowerCase()?(this.setCurrentSearchEntryLibrary("rack","rackDell"),this.addRackDellPalette()):"hpe aruba gateways controllers"===a[d].toLowerCase()?this.addRackHPEArubaGatewaysControllersPalette():
"hpe aruba security"===a[d].toLowerCase()?this.addRackHPEArubaSecurityPalette():"hpe aruba switches"===a[d].toLowerCase()?this.addRackHPEArubaSwitchesPalette():(this.setCurrentSearchEntryLibrary("rack","rack"+a[d]),this.addStencilPalette("rack"+a[d],"Rack / "+a[d],c+"/rack/"+a[d].toLowerCase()+".xml",";html=1;labelPosition=right;align=left;spacingLeft=15;dashed=0;shadow=0;fillColor=#ffffff;",null,null,null,null,null,"rack"));this.setCurrentSearchEntryLibrary()};Sidebar.prototype.addRackGeneralPalette=
-function(){this.addPaletteFunctions("rackGeneral","Rack / General",!1,[this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.container;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=9;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=off;",180,228.6,"","Rack Cabinet",null,null,"rack equipment general cabinet"),
-this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.container;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=33;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=ascend;",210,228.6,"","Numbered Rack Cabinet",null,null,"rack equipment general cabinet numbered"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.container;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=9;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=off;",
-180,228.6,"","Rack Cabinet",null,null,"rack equipment general cabinet"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.container;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=33;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=ascend;",210,228.6,"","Numbered Rack Cabinet",null,null,"rack equipment general cabinet numbered"),
-this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;text;",160,15,"","Spacing",null,null,"rack equipment general spacing"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.plate;fillColor=#e8e8e8;",160,15,"","Cover Plate",null,null,"rack equipment general cover plate"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rack.general.1u_rack_server;",
+function(){this.addPaletteFunctions("rackGeneral","Rack / General",!1,[this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.rackCabinet2;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=9;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=off;",180,219,"","Rack Cabinet",null,null,"rack equipment general cabinet"),
+this.createVertexTemplateEntry("strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;shape=mxgraph.rackGeneral.rackCabinet2;fillColor2=#f4f4f4;container=1;collapsible=0;childLayout=rack;allowGaps=1;marginLeft=33;marginRight=9;marginTop=21;marginBottom=22;textColor=#666666;numDisp=ascend;",204,219,"","Numbered Rack Cabinet",null,null,"rack equipment general cabinet numbered"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;text;",
+160,15,"","Spacing",null,null,"rack equipment general spacing"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.plate;fillColor=#e8e8e8;",160,15,"","Cover Plate",null,null,"rack equipment general cover plate"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rack.general.1u_rack_server;",
160,15,"","Server",null,null,"rack equipment general server"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.horCableDuct;",160,15,"","Horizontal Cable Duct",null,null,"rack equipment general horizontal cable duct"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.horRoutingBank;",
160,20,"","Horizontal Routing Bank",null,null,"rack equipment general horizontal routing bank"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.neatPatch;",160,30,"","Neat-Patch",null,null,"rack equipment general neat patch"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.shelf;container=1;collapsible=0",
160,15,"","Shelf",null,null,"rack equipment general shelf"),this.createVertexTemplateEntry("strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;outlineConnect=0;shape=mxgraph.rackGeneral.channelBase;",200,30,"","Channel Base",null,null,"rack equipment general channel base"),this.createVertexTemplateEntry("shape=mxgraph.rackGeneral.cabinetLeg;html=1;shadow=0;dashed=0;fillColor=#444444;strokeColor=#444444;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;",
@@ -9716,10 +9723,11 @@ null,null,this.getTagsForStencil("","","sysml model element package name").join(
this.createEdgeTemplateEntry("edgeStyle=none;html=1;endArrow=open;endSize=12;dashed=1;verticalAlign=bottom;",160,0,"&lt;&lt;conform&gt;&gt;","Conform",null,this.getTagsForStencil("","","sysml model element conform").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;endArrow=open;endSize=12;dashed=1;verticalAlign=bottom;",160,0,"&lt;&lt;stereotype1&gt;&gt;\ndependency1","Dependency",null,this.getTagsForStencil("","","sysml model element dependency").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;endArrow=open;endSize=12;dashed=1;verticalAlign=bottom;",
160,0,"&lt;&lt;import&gt;&gt;","Public Package Import",null,this.getTagsForStencil("","","sysml model element public package import").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;endArrow=open;endSize=12;dashed=1;verticalAlign=bottom;",160,0,"&lt;&lt;access&gt;&gt;","Private Package Import",null,this.getTagsForStencil("","","sysml model element private package import").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;"+mxConstants.STYLE_STARTARROW+"=sysMLPackCont;startSize=12;"+
mxConstants.STYLE_ENDARROW+"=none;",160,0,"","Package Containment",null,this.getTagsForStencil("","","sysml model element package containment").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;endSize=12;endArrow=block;endFill=0;dashed=1;",160,0,"","Realization",null,this.getTagsForStencil("","","sysml model element realization").join(" ")),this.createEdgeTemplateEntry("edgeStyle=none;html=1;endArrow=open;endSize=12;dashed=1;verticalAlign=bottom;",160,0,"&lt;&lt;refine&gt;&gt;","Refine",
-null,this.getTagsForStencil("","","sysml model element refine").join(" "))];this.addPalette("sysmlModel Elements","SysML / Model Elements",a||!1,mxUtils.bind(this,function(b){for(var e=0;e<d.length;e++)b.appendChild(d[e](b))}))};Sidebar.prototype.addSysMLBlocksPalette=function(a){var c=this,d=[this.addEntry("sysml block block definition diagram",function(){var b=new mxCell('<p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;"><b>bdd</b> Namespace1</p>',new mxGeometry(0,0,300,100),
-"html=1;shape=mxgraph.sysml.package;labelX=120;align=left;spacingLeft=10;overflow=fill;recursiveResize=0;");b.vertex=!0;var e=new mxCell("Block1",new mxGeometry(15,30,100,50),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;fontStyle=1;html=1;whiteSpace=wrap;align=center;");e.vertex=!0;b.insert(e);var f=new mxCell("Block2",new mxGeometry(190,30,100,50),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;fontStyle=1;html=1;whiteSpace=wrap;align=center;");
-f.vertex=!0;b.insert(f);var g=new mxCell("part1",new mxGeometry(0,0,0,0),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;align=right;html=1;verticalAlign=bottom;endArrow=none;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=none;endFill=0;labelBackgroundColor=none;");g.geometry.relative=!0;g.geometry.x=1;g.edge=!0;b.insert(g);var h=new mxCell("1",new mxGeometry(-1,0,0,0),"resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=none;fontSize=10");h.geometry.relative=
-!0;h.setConnectable(!1);h.vertex=!0;g.insert(h);h=new mxCell("0..*",new mxGeometry(1,0,0,0),"resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=none;fontSize=10");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;g.insert(h);e.insertEdge(g,!0);f.insertEdge(g,!1);return c.createVertexTemplateFromCells([b],300,100,"Block Definition Diagram")}),this.addDataEntry("sysml block relation",160,0,"Relation","zVRNb8IwDP01vUwaCi3aHcrgNGkS+wOhMW20NEapYYVfP9MmLVVh2qYddqjkPNvPHy9NlKRlvXZyX7ygAhMlz1GSOkRqrbJOwZgoFlpFyTKKY8FfFK/ueKeNV+ylA0vfSYjbhKM0B2gRziVPU9HJeFQanVs2nc4LJl4UVHKvyymbR3CkM2nmPmSLRFiyA6yaO4cfjFm0TLSoiMkDprQs0aq3Qtvg2ujzpd50FoCVNqEMqBw2viFP13Z5cdydvoH86GvAEsidOKQeJDgwkvRxyCKr9ph3WR3RK2rm70MqPLgMPHq97BAYyj2JITePmAONEtm46raHGu1u65iMdBxr6KDSZ7ltjmKoYZDXwI5uSEq4Z9TILZiFzN5zhwerUjToejF2aDv9/JgZWgsZ+ZLdXRQXeqjvahZ/qdnjT0UbbPWLFc5GKxSTycNvthh+kv+8xj/aIh/7x6q9t9dv2Sc="),
+null,this.getTagsForStencil("","","sysml model element refine").join(" ")),this.createVertexTemplateEntry("shape=triangle;fillColor=strokeColor;",10,10,"","Flow Direction",null,null,this.getTagsForStencil("","","sysml model element flow direction").join(" ")),this.createVertexTemplateEntry("shape=triangle;fillColor=strokeColor;direction=south;",10,10,"","Flow Direction",null,null,this.getTagsForStencil("","","sysml model element flow direction").join(" "))];this.addPalette("sysmlModel Elements","SysML / Model Elements",
+a||!1,mxUtils.bind(this,function(b){for(var e=0;e<d.length;e++)b.appendChild(d[e](b))}))};Sidebar.prototype.addSysMLBlocksPalette=function(a){var c=this,d=[this.addEntry("sysml block block definition diagram",function(){var b=new mxCell('<p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;"><b>bdd</b> Namespace1</p>',new mxGeometry(0,0,300,100),"html=1;shape=mxgraph.sysml.package;labelX=120;align=left;spacingLeft=10;overflow=fill;recursiveResize=0;");b.vertex=!0;var e=new mxCell("Block1",
+new mxGeometry(15,30,100,50),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;fontStyle=1;html=1;whiteSpace=wrap;align=center;");e.vertex=!0;b.insert(e);var f=new mxCell("Block2",new mxGeometry(190,30,100,50),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;fontStyle=1;html=1;whiteSpace=wrap;align=center;");f.vertex=!0;b.insert(f);var g=new mxCell("part1",new mxGeometry(0,0,0,0),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;align=right;html=1;verticalAlign=bottom;endArrow=none;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=none;endFill=0;labelBackgroundColor=none;");
+g.geometry.relative=!0;g.geometry.x=1;g.edge=!0;b.insert(g);var h=new mxCell("1",new mxGeometry(-1,0,0,0),"resizable=0;html=1;align=left;verticalAlign=top;labelBackgroundColor=none;fontSize=10");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;g.insert(h);h=new mxCell("0..*",new mxGeometry(1,0,0,0),"resizable=0;html=1;align=right;verticalAlign=top;labelBackgroundColor=none;fontSize=10");h.geometry.relative=!0;h.setConnectable(!1);h.vertex=!0;g.insert(h);e.insertEdge(g,!0);f.insertEdge(g,!1);
+return c.createVertexTemplateFromCells([b],300,100,"Block Definition Diagram")}),this.addDataEntry("sysml block relation",160,0,"Relation","zVRNb8IwDP01vUwaCi3aHcrgNGkS+wOhMW20NEapYYVfP9MmLVVh2qYddqjkPNvPHy9NlKRlvXZyX7ygAhMlz1GSOkRqrbJOwZgoFlpFyTKKY8FfFK/ueKeNV+ylA0vfSYjbhKM0B2gRziVPU9HJeFQanVs2nc4LJl4UVHKvyymbR3CkM2nmPmSLRFiyA6yaO4cfjFm0TLSoiMkDprQs0aq3Qtvg2ujzpd50FoCVNqEMqBw2viFP13Z5cdydvoH86GvAEsidOKQeJDgwkvRxyCKr9ph3WR3RK2rm70MqPLgMPHq97BAYyj2JITePmAONEtm46raHGu1u65iMdBxr6KDSZ7ltjmKoYZDXwI5uSEq4Z9TILZiFzN5zhwerUjToejF2aDv9/JgZWgsZ+ZLdXRQXeqjvahZ/qdnjT0UbbPWLFc5GKxSTycNvthh+kv+8xj/aIh/7x6q9t9dv2Sc="),
this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;verticalAlign=top;align=left;whiteSpace=wrap;",220,340,'<p style="margin:0px;margin-top:4px;text-align:center;">&lt;&lt;block&gt;&gt;<br/>{encapsulated}<br/><b>Block1</b></p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>constraints</i></p><p style="margin:0px;margin-left:8px;text-align:left;">{x &gt; y}</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>operations</i></p><p style="margin:0px;margin-left:8px;text-align:left;">operation1 (p1 : Type1) : Type2</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>parts</i></p><p style="margin:0px;margin-left:8px;text-align:left;">property1 : Block2</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>references</i></p><p style="margin:0px;margin-left:8px;text-align:left;">property2 : Block3 [0..*] {ordered}</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>values</i></p><p style="margin:0px;margin-left:8px;text-align:left;">property3 : Integer = 99 {readOnly}<br/>property4 : Real = 10.0</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>properties</i></p><p style="margin:0px;margin-left:8px;text-align:left;">property5 : Type1</p>',
"Block",null,null,this.getTagsForStencil("","","sysml block block").join(" ")),this.createVertexTemplateEntry("shape=umlActor;html=1;verticalLabelPosition=bottom;verticalAlign=top;align=center;",30,60,"ActorName","Actor",null,null,this.getTagsForStencil("","","sysml block actor").join(" ")),this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;whiteSpace=wrap;align=center;",160,80,"<p>&lt;&lt;actor&gt;&gt;<br/><b>ActorName</b></p>","Actor",null,null,this.getTagsForStencil("","","sysml block actor").join(" ")),
this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;whiteSpace=wrap;",200,180,'<p style="margin:0px;margin-top:4px;text-align:center;">&lt;&lt;valueType&gt;&gt;<br/><b>ValueType1</b></p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>operations</i></p><p style="margin:0px;margin-left:8px;text-align:left;">operation1 (p1 : Type1) : Type2</p><hr/><p style="font-size:10px;margin:0px;text-align:center;"><i>properties</i></p><p style="margin:0px;margin-left:8px;text-align:left;">property1 : Type3</p><hr/><p style="margin:0px;margin-left:8px;text-align:center;">&lt;&lt;valueType&gt;&gt;</p><p style="margin:0px;margin-left:8px;text-align:left;">unit = UnitName</p>',
@@ -9812,8 +9820,13 @@ this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;whiteSpace=wrap;
0,160,60),"html=1;shape=mxgraph.sysml.port4;fontStyle=1;whiteSpace=wrap;align=center;");b.vertex=!0;var e=new mxCell("p1",new mxGeometry(0,20,20,20),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;resizable=0;align=left;verticalAlign=bottom;labelPosition=right;verticalLabelPosition=top;labelBackgroundColor=none;fontSize=10;");e.geometry.relative=!1;e.setConnectable(!1);e.vertex=!0;b.insert(e);e=new mxCell("ITransCmd",new mxGeometry(0,0,0,0),"edgeStyle=none;html=1;align=left;verticalAlign=bottom;endArrow=sysMLReqInt;endSize=8;exitX=0;exitY=0.5;");
e.geometry.setTerminalPoint(new mxPoint(0,0),!1);e.geometry.relative=!0;e.geometry.x=1;e.edge=!0;b.insertEdge(e,!0);var f=new mxCell("ITransData",new mxGeometry(0,0,0,0),"edgeStyle=none;html=1;align=left;verticalAlign=top;endArrow=sysMLProvInt;endSize=12;exitX=0;exitY=0.5;");f.geometry.setTerminalPoint(new mxPoint(0,60),!1);f.geometry.relative=!0;f.geometry.x=1;f.edge=!0;b.insertEdge(f,!0);return c.createVertexTemplateFromCells([b,e,f],250,60,"Required Interface")}),this.addEntry("sysml port flow provided interface",
function(){var b=new mxCell("Transmission",new mxGeometry(90,0,160,60),"html=1;shape=mxgraph.sysml.port4;fontStyle=1;whiteSpace=wrap;align=center;");b.vertex=!0;var e=new mxCell("p1",new mxGeometry(0,20,20,20),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;resizable=0;labelBackgroundColor=none;fontSize=10;");e.geometry.relative=!1;e.setConnectable(!1);e.vertex=!0;b.insert(e);e=new mxCell("ITransCmd",new mxGeometry(0,0,0,0),"edgeStyle=none;html=1;align=left;verticalAlign=bottom;endArrow=sysMLReqInt;endSize=8;exitX=0;exitY=0.5;");
-e.geometry.setTerminalPoint(new mxPoint(0,0),!1);e.geometry.relative=!0;e.geometry.x=1;e.edge=!0;b.insertEdge(e,!0);var f=new mxCell("ITransData",new mxGeometry(0,0,0,0),"edgeStyle=none;html=1;align=left;verticalAlign=top;endArrow=sysMLProvInt;endSize=12;exitX=0;exitY=0.5;");f.geometry.setTerminalPoint(new mxPoint(0,60),!1);f.geometry.relative=!0;f.geometry.x=1;f.edge=!0;b.insertEdge(f,!0);return c.createVertexTemplateFromCells([b,e,f],250,60,"Provided Interface")})];this.addPalette("sysmlPorts and Flows",
-"SysML / Ports and Flows",a||!1,mxUtils.bind(this,function(b){for(var e=0;e<d.length;e++)b.appendChild(d[e](b))}))};Sidebar.prototype.addSysMLConstraintBlocksPalette=function(a){var c=this,d=[this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;whiteSpace=wrap;",200,180,'<p style="margin:0px;margin-top:4px;text-align:center;">&lt;&lt;constraint&gt;&gt;<br/><b>ConstraintBlock1</b></p><hr/><p style="font-size:10px;margin:0px;margin-top:4px;text-align:center;"><i>constraints</i></p><p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;">{{L1} x > y }<br/>nested: ConstraintBlock2</p><hr/><p style="font-size:10px;margin:0px;margin-top:4px;text-align:center;"><i>parameters</i></p><p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;">x: Real<br/>y: Real</p>',
+e.geometry.setTerminalPoint(new mxPoint(0,0),!1);e.geometry.relative=!0;e.geometry.x=1;e.edge=!0;b.insertEdge(e,!0);var f=new mxCell("ITransData",new mxGeometry(0,0,0,0),"edgeStyle=none;html=1;align=left;verticalAlign=top;endArrow=sysMLProvInt;endSize=12;exitX=0;exitY=0.5;");f.geometry.setTerminalPoint(new mxPoint(0,60),!1);f.geometry.relative=!0;f.geometry.x=1;f.edge=!0;b.insertEdge(f,!0);return c.createVertexTemplateFromCells([b,e,f],250,60,"Provided Interface")}),this.createVertexTemplateEntry("html=1;shape=mxgraph.sysml.port;sysMLPortType=flowN;",
+20,20,"","Port, Flow North",null,null,this.getTagsForStencil("","","sysml port flow item flow north").join(" ")),this.createVertexTemplateEntry("html=1;shape=mxgraph.sysml.port;sysMLPortType=doubleH;",20,20,"","Port, Double Flow, Horizontal",null,null,this.getTagsForStencil("","","sysml port flow item double flow horizontal").join(" ")),this.addEntry("sysml port flow ports",function(){var b=new mxCell("",new mxGeometry(0,0,200,140),"whiteSpace=wrap;align=center;");b.vertex=!0;var e=new mxCell("port1",
+new mxGeometry(0,0,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=flowS;labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(50,-10);b.insert(e);e=new mxCell("port2",new mxGeometry(1,0,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=empty;labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;");e.geometry.relative=!0;e.vertex=
+!0;e.geometry.offset=new mxPoint(-70,-10);b.insert(e);e=new mxCell("port3",new mxGeometry(0,0,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=flowE;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,30);b.insert(e);e=new mxCell("port4",new mxGeometry(0,1,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=doubleH;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;");
+e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,-50);b.insert(e);e=new mxCell("port5",new mxGeometry(1,0,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=flowE;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,30);b.insert(e);e=new mxCell("port6",new mxGeometry(1,1,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=doubleH;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;");
+e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,-50);b.insert(e);e=new mxCell("port7",new mxGeometry(0,1,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=flowN;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(50,-10);b.insert(e);e=new mxCell("port8",new mxGeometry(1,1,20,20),"html=1;shape=mxgraph.sysml.port;html=1;resizable=0;sysMLPortType=doubleV;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;");
+e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-70,-10);b.insert(e);return c.createVertexTemplateFromCells([b],220,160,"Ports")})];this.addPalette("sysmlPorts and Flows","SysML / Ports and Flows",a||!1,mxUtils.bind(this,function(b){for(var e=0;e<d.length;e++)b.appendChild(d[e](b))}))};Sidebar.prototype.addSysMLConstraintBlocksPalette=function(a){var c=this,d=[this.createVertexTemplateEntry("shape=rect;html=1;overflow=fill;whiteSpace=wrap;",200,180,'<p style="margin:0px;margin-top:4px;text-align:center;">&lt;&lt;constraint&gt;&gt;<br/><b>ConstraintBlock1</b></p><hr/><p style="font-size:10px;margin:0px;margin-top:4px;text-align:center;"><i>constraints</i></p><p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;">{{L1} x > y }<br/>nested: ConstraintBlock2</p><hr/><p style="font-size:10px;margin:0px;margin-top:4px;text-align:center;"><i>parameters</i></p><p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;">x: Real<br/>y: Real</p>',
"Constraint Block",null,null,this.getTagsForStencil("","","sysml constraint block ").join(" ")),this.addEntry("sysml constraint block parametric diagram",function(){var b=new mxCell('<p style="margin:0px;margin-top:4px;margin-left:10px;text-align:left;"><b>par</b> Block1</p>',new mxGeometry(0,0,300,170),"html=1;shape=mxgraph.sysml.package;labelX=120;align=left;spacingLeft=10;overflow=fill;whiteSpace=wrap;recursiveResize=0;");b.vertex=!0;var e=new mxCell("C1: Constraint",new mxGeometry(130,50,150,
100),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;html=1;shape=mxgraph.sysml.paramDgm;fontStyle=1;whiteSpace=wrap;align=center;");e.vertex=!0;b.insert(e);var f=new mxCell("x:",new mxGeometry(0,25,0,0),"html=1;resizable=0;align=left;verticalAlign=middle;labelPosition=left;verticalLabelPosition=middle;labelBackgroundColor=none;fontSize=10;spacingLeft=22;fontStyle=1;");f.geometry.relative=!1;f.setConnectable(!1);f.vertex=!0;e.insert(f);f=new mxCell("y:",new mxGeometry(0,75,0,0),"html=1;resizable=0;align=left;verticalAlign=middle;labelPosition=left;verticalLabelPosition=middle;labelBackgroundColor=none;fontSize=10;spacingLeft=22;fontStyle=1;");
f.geometry.relative=!1;f.setConnectable(!1);f.vertex=!0;e.insert(f);var g=new mxCell("length: Real",new mxGeometry(30,65,20,20),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;fontSize=10;verticalLabelPosition=top;verticalAlign=bottom;");g.vertex=!0;b.insert(g);f=new mxCell("width: Real",new mxGeometry(30,115,20,20),"strokeColor=inherit;fillColor=inherit;gradientColor=inherit;shape=rect;html=1;fontSize=10;verticalLabelPosition=top;verticalAlign=bottom;");f.vertex=!0;
@@ -10699,502 +10712,497 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
"yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos",
"yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos",
"youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))]);this.setCurrentSearchEntryLibrary()}})();
-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,f){b.raw=f;return b};$jscomp.arrayIteratorImpl=function(b){var f=0;return function(){return f<b.length?{done:!1,value:b[f++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return f?f.call(b):$jscomp.arrayIterator(b)};
-DrawioFile=function(b,f){mxEventSource.call(this);this.ui=b;this.setData(f||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,g){b.raw=g;return b};$jscomp.arrayIteratorImpl=function(b){var g=0;return function(){return g<b.length?{done:!1,value:b[g++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var g="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return g?g.call(b):$jscomp.arrayIterator(b)};
+DrawioFile=function(b,g){mxEventSource.call(this);this.ui=b;this.setData(g||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
-DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,f){this.savingFile?null!=f&&f({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,f,k)}),f):this.updateFile(b,f)};
-DrawioFile.prototype.updateFile=function(b,f,k,d){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(t){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[t]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=t?this.mergeFile(t,b,f,d):this.reloadFile(b,
-f))}catch(x){null!=f&&f(x)}}),f))};
-DrawioFile.prototype.mergeFile=function(b,f,k,d){var t=!0;try{this.stats.fileMerged++;var x=this.getShadowPages(),C=b.getShadowPages();if(null!=C&&0<C.length){var G=[this.ui.diffPages(null!=d?d:x,C)],H=this.ignorePatches(G);this.setShadowPages(C);if(H)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",H);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(x,this.ui.pages):null;d={};H={};var I=this.ui.patchPages(x,G[0]),F=this.ui.getHashValueForPages(I,
-d),O=this.ui.getHashValueForPages(C,H);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",x,"pages",this.ui.pages,"patches",G,"backup",this.backupPatch,"checksum",F,"current",O,"valid",F==O,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=F&&F!=O){var c=this.compressReportData(this.getAnonymizedXmlForPages(C)),e=this.compressReportData(this.getAnonymizedXmlForPages(I)),g=this.ui.hashValue(b.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,G,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+F+"\nCurrent: "+O+"\nCurrent Details: "+JSON.stringify(H)+"\nFrom: "+g+"\nTo: "+n+"\n\nFile Data:\n"+c+"\nPatched Shadow:\n"+e,null,"mergeFile",F,O,b.getCurrentRevisionId());return}if(null!=this.sync){var p=this.sync.patchRealtime(G,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==p||mxUtils.isEmptyObject(p)||G.push(p)}this.patch(G,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw t=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(u){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(u);try{if(t)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,u);else{var v=this.getCurrentUser(),y=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,u)}}catch(D){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),k=f.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var t=f.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(t=this.ui.anonymizeNode(t,!0));t.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,t,!0);k.appendChild(t)}return mxUtils.getPrettyXml(k)};
-DrawioFile.prototype.compressReportData=function(b,f,k){f=null!=f?f:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,f,k,d,t,x,C,G){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=f)for(var H=0;H<f.length;H++)this.ui.anonymizePatch(f[H]);var I=mxUtils.bind(this,function(n){var p=this.compressReportData(JSON.stringify(f,null,2));n=null==n?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(n.data)),
-25E3);this.sendErrorReport("Checksum Error in "+t+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+p+(null!=n?"\n\nRemote:\n"+n:""),null,7E4)});null==d?I(null):this.getLatestVersion(mxUtils.bind(this,function(n){null!=n&&n.getCurrentEtag()==d?I(n):I(null)}),function(){})}else{var F=this.getCurrentUser(),O=null!=F?F.id:"unknown",c=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",e=JSON.stringify(f).length,g=null;if(null!=f&&this.constructor==DriveFile&&400>e){for(H=0;H<f.length;H++)this.ui.anonymizePatch(f[H]);
-g=JSON.stringify(f);g=null!=g&&250>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(n){try{var p=null!=g?"Report":"Error",v=this.ui.getHashValueForPages(n.getShadowPages());EditorUi.logError("Checksum "+p+" in "+t+" "+c,null,this.getMode()+"."+this.getId(),"user_"+O+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+e+"-patches_"+f.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=x?"-expected_"+x:"")+(null!=C?"-current_"+C:"")+(null!=G?
-"-rev_"+this.ui.hashValue(G):"")+(null!=v?"-latest_"+v:"")+(null!=n?"-latestRev_"+this.ui.hashValue(n.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+c,action:t,label:"user_"+O+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+e+"-patches_"+f.length+"-size_"+this.getSize()})}catch(y){}}),b)}}catch(n){}};
-DrawioFile.prototype.sendErrorReport=function(b,f,k,d){try{var t=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),x=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),G=null!=C?this.ui.hashValue(C.id):"unknown",H=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",I=this.getTitle(),F=I.lastIndexOf(".");C="xml";0<F&&(C=I.substring(F));var O=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+C+")\nUser="+G+H+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
-"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+O+"\n\nShadow:\n"+t+"\n\nData:\n"+x,d)}catch(c){}};
-DrawioFile.prototype.reloadFile=function(b,f){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),f);else{var d=this.ui.editor.graph,t=d.getSelectionCells(),x=d.getViewState(),C=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(C,x,t);null!=this.backupPatch&&this.patch([this.backupPatch]);var G=this.ui.getCurrentFile();null!=G&&(G.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
-k()}catch(d){null!=f&&f(d)}};DrawioFile.prototype.mergeLatestVersion=function(b,f,k){this.getLatestVersion(mxUtils.bind(this,function(d){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(d.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(d.getDescriptor());this.descriptorChanged();null!=f&&f()}),k)};
-DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var k=0;k<b.length&&f;k++)f=f&&mxUtils.isEmptyObject(b[k]);return f};
-DrawioFile.prototype.patch=function(b,f,k){if(null!=b){var d=this.ui.editor.undoManager,t=d.history.slice(),x=d.indexOfNextAdd,C=this.ui.editor.graph;C.container.style.visibility="hidden";var G=this.changeListenerEnabled;this.changeListenerEnabled=k;var H=C.foldingEnabled,I=C.mathEnabled,F=C.cellRenderer.redraw;C.cellRenderer.redraw=function(O){O.view.graph.isEditing(O.cell)&&(O.view.graph.scrollCellToVisible(O.cell),O.view.graph.cellEditor.resize());F.apply(this,arguments)};C.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{C.container.style.visibility="";C.model.endUpdate();C.cellRenderer.redraw=F;this.changeListenerEnabled=G;k||(d.history=t,d.indexOfNextAdd=x,d.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)I!=C.mathEnabled?
-(this.ui.editor.updateGraphComponents(),C.refresh()):(H!=C.foldingEnabled?C.view.revalidate():C.view.validate(),C.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",k)}return b};
-DrawioFile.prototype.save=function(b,f,k,d,t,x){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",t,"manual",x,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!t&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=k)k({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=k)k(C);else throw C;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
-DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,f,k){};
-DrawioFile.prototype.saveFile=function(b,f,k,d){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
-DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
+DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,g){this.savingFile?null!=g&&g({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,g,k)}),g):this.updateFile(b,g)};
+DrawioFile.prototype.updateFile=function(b,g,k,d){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=g&&g():this.getLatestVersion(mxUtils.bind(this,function(q){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[q]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=g&&g():null!=q?this.mergeFile(q,b,g,d):this.reloadFile(b,
+g))}catch(x){null!=g&&g(x)}}),g))};
+DrawioFile.prototype.mergeFile=function(b,g,k,d){var q=!0;try{this.stats.fileMerged++;var x=this.getShadowPages(),C=b.getShadowPages();if(null!=C&&0<C.length){var G=[this.ui.diffPages(null!=d?d:x,C)],H=this.ignorePatches(G);this.setShadowPages(C);if(H)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",H);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(x,this.ui.pages):null;d={};H={};var I=this.ui.patchPages(x,G[0]),E=this.ui.getHashValueForPages(I,
+d),O=this.ui.getHashValueForPages(C,H);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",x,"pages",this.ui.pages,"patches",G,"backup",this.backupPatch,"checksum",E,"current",O,"valid",E==O,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=E&&E!=O){var c=this.compressReportData(this.getAnonymizedXmlForPages(C)),e=this.compressReportData(this.getAnonymizedXmlForPages(I)),f=this.ui.hashValue(b.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,G,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+E+"\nCurrent: "+O+"\nCurrent Details: "+JSON.stringify(H)+"\nFrom: "+f+"\nTo: "+n+"\n\nFile Data:\n"+c+"\nPatched Shadow:\n"+e,null,"mergeFile",E,O,b.getCurrentRevisionId());return}if(null!=this.sync){var p=this.sync.patchRealtime(G,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==p||mxUtils.isEmptyObject(p)||G.push(p)}this.patch(G,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw q=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=g&&g()}catch(v){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(v);try{if(q)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,v);else{var t=this.getCurrentUser(),y=null!=t?t.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,v)}}catch(D){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var g=new mxCodec(mxUtils.createXmlDocument()),k=g.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var q=g.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(q=this.ui.anonymizeNode(q,!0));q.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,q,!0);k.appendChild(q)}return mxUtils.getPrettyXml(k)};
+DrawioFile.prototype.compressReportData=function(b,g,k){g=null!=g?g:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>g&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,g,k,d,q,x,C,G){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=g)for(var H=0;H<g.length;H++)this.ui.anonymizePatch(g[H]);var I=mxUtils.bind(this,function(n){var p=this.compressReportData(JSON.stringify(g,null,2));n=null==n?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(n.data)),
+25E3);this.sendErrorReport("Checksum Error in "+q+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+p+(null!=n?"\n\nRemote:\n"+n:""),null,7E4)});null==d?I(null):this.getLatestVersion(mxUtils.bind(this,function(n){null!=n&&n.getCurrentEtag()==d?I(n):I(null)}),function(){})}else{var E=this.getCurrentUser(),O=null!=E?E.id:"unknown",c=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",e=JSON.stringify(g).length,f=null;if(null!=g&&this.constructor==DriveFile&&400>e){for(H=0;H<g.length;H++)this.ui.anonymizePatch(g[H]);
+f=JSON.stringify(g);f=null!=f&&250>f.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(n){try{var p=null!=f?"Report":"Error",t=this.ui.getHashValueForPages(n.getShadowPages());EditorUi.logError("Checksum "+p+" in "+q+" "+c,null,this.getMode()+"."+this.getId(),"user_"+O+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+e+"-patches_"+g.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=x?"-expected_"+x:"")+(null!=C?"-current_"+C:"")+(null!=G?
+"-rev_"+this.ui.hashValue(G):"")+(null!=t?"-latest_"+t:"")+(null!=n?"-latestRev_"+this.ui.hashValue(n.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+c,action:q,label:"user_"+O+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+e+"-patches_"+g.length+"-size_"+this.getSize()})}catch(y){}}),b)}}catch(n){}};
+DrawioFile.prototype.sendErrorReport=function(b,g,k,d){try{var q=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),x=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),G=null!=C?this.ui.hashValue(C.id):"unknown",H=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",I=this.getTitle(),E=I.lastIndexOf(".");C="xml";0<E&&(C=I.substring(E));var O=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+C+")\nUser="+G+H+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=g?"\n\n"+g:
+"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+O+"\n\nShadow:\n"+q+"\n\nData:\n"+x,d)}catch(c){}};
+DrawioFile.prototype.reloadFile=function(b,g){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),g);else{var d=this.ui.editor.graph,q=d.getSelectionCells(),x=d.getViewState(),C=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(C,x,q);null!=this.backupPatch&&this.patch([this.backupPatch]);var G=this.ui.getCurrentFile();null!=G&&(G.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+k()}catch(d){null!=g&&g(d)}};DrawioFile.prototype.mergeLatestVersion=function(b,g,k){this.getLatestVersion(mxUtils.bind(this,function(d){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(d.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(d.getDescriptor());this.descriptorChanged();null!=g&&g()}),k)};
+DrawioFile.prototype.copyFile=function(b,g){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var g=!0;if(null!=b)for(var k=0;k<b.length&&g;k++)g=g&&mxUtils.isEmptyObject(b[k]);return g};
+DrawioFile.prototype.patch=function(b,g,k){if(null!=b){var d=this.ui.editor.undoManager,q=d.history.slice(),x=d.indexOfNextAdd,C=this.ui.editor.graph;C.container.style.visibility="hidden";var G=this.changeListenerEnabled;this.changeListenerEnabled=k;var H=C.foldingEnabled,I=C.mathEnabled,E=C.cellRenderer.redraw;C.cellRenderer.redraw=function(O){O.view.graph.isEditing(O.cell)&&(O.view.graph.scrollCellToVisible(O.cell),O.view.graph.cellEditor.resize());E.apply(this,arguments)};C.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,g,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{C.container.style.visibility="";C.model.endUpdate();C.cellRenderer.redraw=E;this.changeListenerEnabled=G;k||(d.history=q,d.indexOfNextAdd=x,d.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)I!=C.mathEnabled?
+(this.ui.editor.updateGraphComponents(),C.refresh()):(H!=C.foldingEnabled?C.view.revalidate():C.view.validate(),C.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",g,"undoable",k)}return b};
+DrawioFile.prototype.save=function(b,g,k,d,q,x){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",q,"manual",x,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!q&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=g&&g();else if(null!=k)k({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=k)k(C);else throw C;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var g=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=g&&(g.viewState=this.ui.editor.graph.getViewState(),g.needsUpdate=!0)}g=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return g};
+DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,g,k){};
+DrawioFile.prototype.saveFile=function(b,g,k,d){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
+DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,g,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,g,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var f=function(k){for(var d=0;null!=k&&d<k.length;d++){var t=k[d];null!=t.id&&0==t.id.indexOf("extFont_")&&t.parentNode.removeChild(t)}};f(document.querySelectorAll("head > style[id]"));f(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var g=function(k){for(var d=0;null!=k&&d<k.length;d++){var q=k[d];null!=q.id&&0==q.id.indexOf("extFont_")&&q.parentNode.removeChild(q)}};g(document.querySelectorAll("head > style[id]"));g(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
-DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,f){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,f){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,f){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),f)};DrawioFile.prototype.patchDescriptor=function(b,f){this.setDescriptorEtag(b,this.getDescriptorEtag(f));this.descriptorChanged()};
+DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,g){b(null)};
+DrawioFile.prototype.loadDescriptor=function(b,g){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,g){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),g)};DrawioFile.prototype.patchDescriptor=function(b,g){this.setDescriptorEtag(b,this.getDescriptorEtag(g));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
-DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,f){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,f){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
+DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,g){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,g){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.getPullingInterval=function(){return 1E4};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};
-DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,f){this.setDescriptorEtag(b,f)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,f){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,f){b=null!=f?f.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
+DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,g){this.setDescriptorEtag(b,g)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,g){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,g){b=null!=g?g.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
-DrawioFile.prototype.addAllSavedStatus=function(b){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+b+'">'+b+"</div>"),b=this.ui.statusContainer.getElementsByTagName("div"),0<b.length&&this.isRevisionHistorySupported()&&(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(f){this.removeDraft()}};
+DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var g=this.isRevisionHistorySupported()?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+g+'title="'+b+'">'+b+"</div>")}};
+DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(g){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
-DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var f=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+f+'" class="geStatusAlert">'+f+" ("+mxUtils.htmlEntities(b.message)+")</div>");f=this.ui.statusContainer.getElementsByTagName("div");null!=f&&0<f.length&&(f[0].style.cursor="pointer",mxEvent.addListener(f[0],
-"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{f=this.getErrorMessage(b);if(null==f&&null!=this.lastSaved){var k=this.ui.timeSince(new Date(this.lastSaved));null!=k&&(f=mxResources.get("lastSaved",[k]))}null!=f&&60<f.length&&(f=f.substring(0,60)+"...");f=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=f&&""!=f?" ("+mxUtils.htmlEntities(f)+")":"");this.ui.editor.setStatus('<div title="'+
-f+'" class="geStatusAlertOrange">'+f+' <img src="'+Editor.saveImage+'"/></div>');f=this.ui.statusContainer.getElementsByTagName("div");null!=f&&0<f.length?(f[0].style.cursor="pointer",mxEvent.addListener(f[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(f=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+f+'" class="geStatusAlert">'+f+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
-EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
-0))}};
-DrawioFile.prototype.addConflictStatus=function(b,f){this.invalidChecksum&&null==f&&(f=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=f&&""!=f?" ("+mxUtils.htmlEntities(f)+")":""));this.ui.spinner.stop();this.clearAutosave();f=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=f&&0<f.length?(f[0].style.cursor="pointer",mxEvent.addListener(f[0],"click",mxUtils.bind(this,function(k){"IMG"!=mxEvent.getSource(k).nodeName&&
-b()}))):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),b)};DrawioFile.prototype.setConflictStatus=function(b){this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert">'+b+' <a href="https://www.diagrams.net/doc/faq/synchronize" title="'+mxResources.get("help")+'" target="_blank"><img src="'+Editor.helpImage+'"/></a></div>')};
-DrawioFile.prototype.showRefreshDialog=function(b,f,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,f)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,f)}),k),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
-f)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,f)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,f,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,f)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
-DrawioFile.prototype.showConflictDialog=function(b,f){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),f,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,f){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=f&&(d+=" ("+f+")");f=mxUtils.bind(this,function(){var t=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
-k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,f,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-f)}};
+DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var g=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+g+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+g+" ("+mxUtils.htmlEntities(b.message)+")</div>")}else g=
+this.getErrorMessage(b),null==g&&null!=this.lastSaved&&(b=this.ui.timeSince(new Date(this.lastSaved)),null!=b&&(g=mxResources.get("lastSaved",[b]))),null!=g&&60<g.length&&(g=g.substring(0,60)+"..."),g=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=g&&""!=g?" ("+mxUtils.htmlEntities(g)+")":""),b='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"',this.ui.editor.setStatus("<div "+b+' title="'+g+'" class="geStatusAlertOrange">'+g+' <img src="'+Editor.saveImage+
+'"/></div>'),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
+0))};DrawioFile.prototype.addConflictStatus=function(b,g){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),g);this.ui.spinner.stop();this.clearAutosave()};
+DrawioFile.prototype.setConflictStatus=function(b,g){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=g?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.diagrams.net/doc/faq/synchronize" src="'+Editor.helpImage+'" style="cursor:help;"/></div>',g)};
+DrawioFile.prototype.showRefreshDialog=function(b,g,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,g)})):(this.addConflictStatus(k,mxUtils.bind(this,function(){this.showRefreshDialog(b,g)})),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
+g)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,g)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
+DrawioFile.prototype.showCopyDialog=function(b,g,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,g)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showConflictDialog=function(b,g){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),g,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
+DrawioFile.prototype.redirectToNewApp=function(b,g){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=g&&(d+=" ("+g+")");g=mxUtils.bind(this,function(){var q=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
+k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});null!=b?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,g,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+g)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
-DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
+DrawioFile.prototype.handleFileError=function(b,g){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,g):(this.isModified()&&this.addUnsavedStatus(b),g?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,f){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(C){this.handleFileError(C,!0)}),t=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),x=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,d,t):this.invalidChecksum?this.showRefreshDialog(k,d,this.getErrorMessage(b)):f?this.showConflictDialog(t,x):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(k,d)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT&&(f=mxResources.get("timeout"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){this.ui.stopSanityCheck();
-null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(f):this.sync.createToken(f,mxUtils.bind(this,function(k){b(f,k)}),mxUtils.bind(this,function(){b(f)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,f,k,d,t){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var x=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(x),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(x,f,k,d,t)}catch(H){this.invalidChecksum=this.inConflictState=
+DrawioFile.prototype.handleConflictError=function(b,g){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(C){this.handleFileError(C,!0)}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),x=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,d,q):this.invalidChecksum?this.showRefreshDialog(k,d,this.getErrorMessage(b)):g?this.showConflictDialog(q,x):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(k,d)}))};DrawioFile.prototype.getErrorMessage=function(b){var g=null!=b?null!=b.error?b.error.message:b.message:null;null==g&&null!=b&&b.code==App.ERROR_TIMEOUT&&(g=mxResources.get("timeout"));return g};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(g){this.ui.stopSanityCheck();
+null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(g){this.handleFileError(g)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
+DrawioFile.prototype.createSecret=function(b){var g=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(g):this.sync.createToken(g,mxUtils.bind(this,function(k){b(g,k)}),mxUtils.bind(this,function(){b(g)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,g,k,d,q){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var x=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(x),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(x,g,k,d,q)}catch(H){this.invalidChecksum=this.inConflictState=
!0;this.descriptorChanged();null!=d&&d(H);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,H);else{var C=this.getCurrentUser(),G=null!=C?C.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),G,H)}}catch(I){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,f,k,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var t=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==t&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",t,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var x=this.isAutosaveRevision();
-x&&(this.lastAutosaveRevision=(new Date).getTime());this.save(x,mxUtils.bind(this,function(C){this.autosaveCompleted();null!=k&&k(C)}),mxUtils.bind(this,function(C){null!=d&&d(C)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",t,"delay",b,"saving",this.savingFile);this.autosaveThread=t};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+DrawioFile.prototype.autosave=function(b,g,k,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<g?b:0;this.clearAutosave();var q=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==q&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var x=this.isAutosaveRevision();
+x&&(this.lastAutosaveRevision=(new Date).getTime());this.save(x,mxUtils.bind(this,function(C){this.autosaveCompleted();null!=k&&k(C)}),mxUtils.bind(this,function(C){null!=d&&d(C)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}catch(C){null!=d&&d(C)}}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",q,"delay",b,"saving",this.savingFile);this.autosaveThread=q};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
-DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=f.lastIndexOf(".");return b===(0<k?f.substring(k):"")}return b==f};
+DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,g){if(null!=b&&null!=g){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=g.lastIndexOf(".");return b===(0<k?g.substring(k):"")}return b==g};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,k){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,k,d,t,x){DrawioFile.call(this,b,f);this.title=k;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=t;this.desc=x};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
-LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,f,k){this.saveAs(this.title,f,k)};LocalFile.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalFile.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
-LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
-LocalFile.prototype.saveFile=function(b,f,k,d,t){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;t||this.updateFileData();var x=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var C=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),H=mxUtils.bind(this,function(I){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var F=mxUtils.bind(this,
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,g){b([])};DrawioFile.prototype.addComment=function(b,g,k){g(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,g){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,g)};LocalFile=function(b,g,k,d,q,x){DrawioFile.call(this,b,g);this.title=k;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=q;this.desc=x};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,g,k){this.saveAs(this.title,g,k)};LocalFile.prototype.saveAs=function(b,g,k){this.saveFile(b,!1,g,k)};LocalFile.prototype.saveAs=function(b,g,k){this.saveFile(b,!1,g,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
+LocalFile.prototype.getLatestVersion=function(b,g){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,g)};
+LocalFile.prototype.saveFile=function(b,g,k,d,q){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;q||this.updateFileData();var x=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var C=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),H=mxUtils.bind(this,function(I){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var E=mxUtils.bind(this,
function(c){this.savingFile=!1;null!=d&&d({error:c})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(c){this.fileHandle.getFile().then(mxUtils.bind(this,function(e){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[e],"conflict",this.desc.lastModified!=e.lastModified);this.desc.lastModified==e.lastModified?c.write(x?this.ui.base64ToBlob(I,"image/png"):I).then(mxUtils.bind(this,function(){c.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){try{var n=this.desc;this.savingFile=!1;this.desc=g;this.fileSaved(C,n,G,F);this.removeDraft()}catch(p){F(p)}}),F)}),F)}),F):(this.inConflictState=!0,F())}),mxUtils.bind(this,function(e){this.invalidFileHandle=!0;F(e)}))}),F)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(I,b,x?"image/png":"text/xml",x);else if(I.length<MAX_REQUEST_SIZE){var O=b.lastIndexOf(".");O=0<O?b.substring(O+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+O+"&xml="+encodeURIComponent(I)+"&filename="+encodeURIComponent(b)+(x?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(I)}));G()}});x?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(I){H(I)}),d,this.ui.getCurrentFile()!=this?C:null,f.scale,f.border)):H(C)};
-LocalFile.prototype.rename=function(b,f,k){this.title=b;this.descriptorChanged();null!=f&&f()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,f,k){LocalFile.call(this,b,f,k)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
-StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,f,k){this.saveAs(this.getTitle(),f,k)};StorageFile.prototype.saveAs=function(b,f,k){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,f,k)};
-StorageFile.insertFile=function(b,f,k,d,t){var x=mxUtils.bind(this,function(C){var G=function(){var H=new StorageFile(b,k,f);H.saveFile(f,!1,function(){d(H)},t)};C?b.confirm(mxResources.get("replaceIt",[f]),G,t):G()});StorageFile.getFileContent(b,f,function(C){x(null!=C)},function(){x(!1)})};StorageFile.getFileContent=function(b,f,k,d){b.getDatabaseItem(f,function(t){k(null!=t?t.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,k):null!=d&&d()}),"files")};
-StorageFile.getFileInfo=function(b,f,k,d){b.getDatabaseItem(f,function(t){k(t)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(t){k(null!=t?{title:f}:null)}):null!=d&&d()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,f,k,d){if(this.isEditable()){var t=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var x=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()});this.setShadowModified(!1);var C=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:C.length,lastModified:Date.now(),type:this.type},{title:this.title,data:C}],x,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
-C,x):null!=d&&d()}),["filesInfo","files"])}catch(G){null!=d&&d(G)}});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(x){this.isRenamable()&&this.getTitle()!=b&&null!=x?this.ui.confirm(mxResources.get("replaceIt",[b]),t,d):t()}),d)}else null!=k&&k()};
-StorageFile.prototype.rename=function(b,f,k){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,f)}),k)});null!=t?this.ui.confirm(mxResources.get("replaceIt",[b]),x,k):x()}),k):f()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
-StorageFile.prototype.getLatestVersion=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(k){b(new StorageFile(this.ui,k,this.title))}),f)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var f=[],k=0;k<localStorage.length;k++){var d=localStorage.key(k),t=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<t.length){var x=(null==b||"F"==b)&&("<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12)),C=(null==b||"L"==b)&&"<mxlibrary>"===t.substring(0,11);(x||C)&&f.push({title:d,type:x?"F":"L",size:t.length,lastModified:Date.now()})}}return f};
-StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var k=b.transaction(["files","filesInfo"],"readwrite");b=k.objectStore("files");k=k.objectStore("filesInfo");for(var d=0;d<f.length;d++){var t=f[d],x=localStorage.getItem(t.title);b.add({title:t.title,data:x});k.add(t)}};
-StorageFile.listFiles=function(b,f,k,d){b.getDatabaseItems(function(t){var x=[];if(null!=t)for(var C=0;C<t.length;C++)"."==t[C].title.charAt(0)||null!=f&&t[C].type!=f||x.push(t[C]);k(x)},function(){null==b.database?k(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,k,d){b.removeDatabaseItem([f,f],k,function(){null==b.database?(localStorage.removeItem(f),k()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,k){StorageFile.call(this,b,f,k)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,k){this.saveFile(b,!1,f,k)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(b,f,k){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,k){DrawioFile.call(this,b,f);this.title=k;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,k){RemoteFile.call(this,b,f,k.title);this.libObj=k};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,k){};
-RemoteLibrary.prototype.saveAs=function(b,f,k){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,k){StorageFile.call(this,b,f,k);b=k;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,k){return!1};UrlLibrary.prototype.saveAs=function(b,f,k){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,k){DrawioFile.call(this,b,f);this.desc=k||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){try{var n=this.desc;this.savingFile=!1;this.desc=f;this.fileSaved(C,n,G,E);this.removeDraft()}catch(p){E(p)}}),E)}),E)}),E):(this.inConflictState=!0,E())}),mxUtils.bind(this,function(e){this.invalidFileHandle=!0;E(e)}))}),E)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(I,b,x?"image/png":"text/xml",x);else if(I.length<MAX_REQUEST_SIZE){var O=b.lastIndexOf(".");O=0<O?b.substring(O+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+O+"&xml="+encodeURIComponent(I)+"&filename="+encodeURIComponent(b)+(x?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(I)}));G()}});x?(g=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(I){H(I)}),d,this.ui.getCurrentFile()!=this?C:null,g.scale,g.border)):H(C)};
+LocalFile.prototype.rename=function(b,g,k){this.title=b;this.descriptorChanged();null!=g&&g()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,g,k){LocalFile.call(this,b,g,k)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,g,k){this.saveFile(b,!1,g,k)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,g,k){DrawioFile.call(this,b,g);this.title=k};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
+StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,g,k){this.saveAs(this.getTitle(),g,k)};StorageFile.prototype.saveAs=function(b,g,k){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,g,k)};
+StorageFile.insertFile=function(b,g,k,d,q){var x=mxUtils.bind(this,function(C){var G=function(){var H=new StorageFile(b,k,g);H.saveFile(g,!1,function(){d(H)},q)};C?b.confirm(mxResources.get("replaceIt",[g]),G,q):G()});StorageFile.getFileContent(b,g,function(C){x(null!=C)},function(){x(!1)})};StorageFile.getFileContent=function(b,g,k,d){b.getDatabaseItem(g,function(q){k(null!=q?q.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(g,k):null!=d&&d()}),"files")};
+StorageFile.getFileInfo=function(b,g,k,d){b.getDatabaseItem(g,function(q){k(q)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(g,function(q){k(null!=q?{title:g}:null)}):null!=d&&d()}),"filesInfo")};
+StorageFile.prototype.saveFile=function(b,g,k,d){if(this.isEditable()){var q=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var x=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()});this.setShadowModified(!1);var C=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:C.length,lastModified:Date.now(),type:this.type},{title:this.title,data:C}],x,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
+C,x):null!=d&&d()}),["filesInfo","files"])}catch(G){null!=d&&d(G)}});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(x){this.isRenamable()&&this.getTitle()!=b&&null!=x?this.ui.confirm(mxResources.get("replaceIt",[b]),q,d):q()}),d)}else null!=k&&k()};
+StorageFile.prototype.rename=function(b,g,k){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(q){var x=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,g)}),k)});null!=q?this.ui.confirm(mxResources.get("replaceIt",[b]),x,k):x()}),k):g()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
+StorageFile.prototype.getLatestVersion=function(b,g){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(k){b(new StorageFile(this.ui,k,this.title))}),g)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
+StorageFile.listLocalStorageFiles=function(b){for(var g=[],k=0;k<localStorage.length;k++){var d=localStorage.key(k),q=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<q.length){var x=(null==b||"F"==b)&&("<mxfile "===q.substring(0,8)||"<?xml"===q.substring(0,5)||"\x3c!--[if IE]>"===q.substring(0,12)),C=(null==b||"L"==b)&&"<mxlibrary>"===q.substring(0,11);(x||C)&&g.push({title:d,type:x?"F":"L",size:q.length,lastModified:Date.now()})}}return g};
+StorageFile.migrate=function(b){var g=StorageFile.listLocalStorageFiles();g.push({title:".scratchpad",type:"L"});var k=b.transaction(["files","filesInfo"],"readwrite");b=k.objectStore("files");k=k.objectStore("filesInfo");for(var d=0;d<g.length;d++){var q=g[d],x=localStorage.getItem(q.title);b.add({title:q.title,data:x});k.add(q)}};
+StorageFile.listFiles=function(b,g,k,d){b.getDatabaseItems(function(q){var x=[];if(null!=q)for(var C=0;C<q.length;C++)"."==q[C].title.charAt(0)||null!=g&&q[C].type!=g||x.push(q[C]);k(x)},function(){null==b.database?k(StorageFile.listLocalStorageFiles(g)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,g,k,d){b.removeDatabaseItem([g,g],k,function(){null==b.database?(localStorage.removeItem(g),k()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,g,k){StorageFile.call(this,b,g,k)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,g,k){this.saveFile(b,!1,g,k)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageLibrary.prototype.isRenamable=function(b,g,k){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,g,k){DrawioFile.call(this,b,g);this.title=k;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,g,k){RemoteFile.call(this,b,g,k.title);this.libObj=k};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,g,k){};
+RemoteLibrary.prototype.saveAs=function(b,g,k){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,g,k){StorageFile.call(this,b,g,k);b=k;g=b.lastIndexOf("/");0<=g&&(b=b.substring(g+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,g,k){return!1};UrlLibrary.prototype.saveAs=function(b,g,k){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,g,k){DrawioFile.call(this,b,g);this.desc=k||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,f,k){function d(O,c,e,g,n,p){function v(){mxEvent.addListener(y,"click",null!=p?p:function(){e!=App.MODE_GOOGLE||b.isDriveDomain()?e==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);f()})):e==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);f()}),
-function(l){b.spinner.stop();b.handleError(l)}):(b.setMode(e,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}G++;++C>k&&(mxUtils.br(H),C=1);var y=document.createElement("a");y.style.overflow="hidden";y.style.display="inline-block";y.className="geBaseButton";y.style.boxSizing="border-box";y.style.fontSize="11px";y.style.position="relative";y.style.margin="4px";y.style.marginTop="8px";y.style.marginBottom="0px";y.style.padding="8px 10px 8px 10px";y.style.width="88px";y.style.height=
-"100px";y.style.whiteSpace="nowrap";y.setAttribute("title",c);var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";u.style.position="absolute";u.style.bottom="8px";u.style.left="0px";u.style.right="0px";mxUtils.write(u,c);y.appendChild(u);if(null!=O){var D=document.createElement("img");D.setAttribute("src",O);D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.width="60px";D.style.height="60px";D.style.paddingBottom="6px";y.appendChild(D)}else u.style.paddingTop=
-"5px",u.style.whiteSpace="normal",mxClient.IS_IOS?(y.style.padding="0px 10px 20px 10px",y.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");if(null!=n)for(O=0;O<n.length;O++)mxUtils.br(u),mxUtils.write(u,n[O]);if(null!=g&&null==b[g]){D.style.visibility="hidden";mxUtils.setOpacity(u,10);var A=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});A.spin(y);
-var U=window.setTimeout(function(){null==b[g]&&(A.stop(),y.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(l,q){null!=b[g]&&q.getProperty("client")==b[g]&&(window.clearTimeout(U),mxUtils.setOpacity(u,100),D.style.visibility="",A.stop(),v(),"drive"==g&&null!=I.parentNode&&I.parentNode.removeChild(I))}))}else v();H.appendChild(y)}k=null!=k?k:2;var t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";t.style.paddingTop="0px";t.style.paddingBottom=
-"20px";var x=document.createElement("div");x.style.border="1px solid #d3d3d3";x.style.borderWidth="1px 0px 1px 0px";x.style.padding="10px 0px 20px 0px";var C=0,G=0,H=document.createElement("div");H.style.paddingTop="2px";x.appendChild(H);var I=document.createElement("p"),F=document.createElement("p");F.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(F,mxResources.get("saveDiagramsTo")+":");t.appendChild(F);t.appendChild(x);C=0;"function"===typeof window.DriveClient&&
+var StorageDialog=function(b,g,k){function d(O,c,e,f,n,p){function t(){mxEvent.addListener(y,"click",null!=p?p:function(){e!=App.MODE_GOOGLE||b.isDriveDomain()?e==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()})):e==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()}),
+function(l){b.spinner.stop();b.handleError(l)}):(b.setMode(e,!0),g()):window.location.hostname=DriveClient.prototype.newAppHostname})}G++;++C>k&&(mxUtils.br(H),C=1);var y=document.createElement("a");y.style.overflow="hidden";y.style.display="inline-block";y.className="geBaseButton";y.style.boxSizing="border-box";y.style.fontSize="11px";y.style.position="relative";y.style.margin="4px";y.style.marginTop="8px";y.style.marginBottom="0px";y.style.padding="8px 10px 8px 10px";y.style.width="88px";y.style.height=
+"100px";y.style.whiteSpace="nowrap";y.setAttribute("title",c);var v=document.createElement("div");v.style.textOverflow="ellipsis";v.style.overflow="hidden";v.style.position="absolute";v.style.bottom="8px";v.style.left="0px";v.style.right="0px";mxUtils.write(v,c);y.appendChild(v);if(null!=O){var D=document.createElement("img");D.setAttribute("src",O);D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.width="60px";D.style.height="60px";D.style.paddingBottom="6px";y.appendChild(D)}else v.style.paddingTop=
+"5px",v.style.whiteSpace="normal",mxClient.IS_IOS?(y.style.padding="0px 10px 20px 10px",y.style.top="6px"):mxClient.IS_FF&&(v.style.paddingTop="0px",v.style.marginTop="-2px");if(null!=n)for(O=0;O<n.length;O++)mxUtils.br(v),mxUtils.write(v,n[O]);if(null!=f&&null==b[f]){D.style.visibility="hidden";mxUtils.setOpacity(v,10);var A=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});A.spin(y);
+var U=window.setTimeout(function(){null==b[f]&&(A.stop(),y.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(l,u){null!=b[f]&&u.getProperty("client")==b[f]&&(window.clearTimeout(U),mxUtils.setOpacity(v,100),D.style.visibility="",A.stop(),t(),"drive"==f&&null!=I.parentNode&&I.parentNode.removeChild(I))}))}else t();H.appendChild(y)}k=null!=k?k:2;var q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";q.style.paddingTop="0px";q.style.paddingBottom=
+"20px";var x=document.createElement("div");x.style.border="1px solid #d3d3d3";x.style.borderWidth="1px 0px 1px 0px";x.style.padding="10px 0px 20px 0px";var C=0,G=0,H=document.createElement("div");H.style.paddingTop="2px";x.appendChild(H);var I=document.createElement("p"),E=document.createElement("p");E.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(E,mxResources.get("saveDiagramsTo")+":");q.appendChild(E);q.appendChild(x);C=0;"function"===typeof window.DriveClient&&
d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");x=document.createElement("span");x.style.position="absolute";x.style.cursor="pointer";x.style.bottom="27px";x.style.color="gray";x.style.userSelect="none";x.style.textAlign="center";x.style.left="50%";mxUtils.setPrefixedStyle(x.style,
-"transform","translate(-50%,0)");mxUtils.write(x,mxResources.get("decideLater"));t.appendChild(x);mxEvent.addListener(x,"click",function(){b.hideDialog();var O=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=O});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(I.style.padding="7px",I.style.fontSize="9pt",I.style.marginTop="-14px",
-I.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",t.appendChild(I))},5E3);this.container=t},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var k=
-b.addLanguageMenu(f,!1,"28px");null!=k&&(k.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var t=document.createElement("div");t.style.margin="8px 0px 0px 0px";t.style.padding="18px 0px 24px 0px";k="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=
+"transform","translate(-50%,0)");mxUtils.write(x,mxResources.get("decideLater"));q.appendChild(x);mxEvent.addListener(x,"click",function(){b.hideDialog();var O=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=O});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(I.style.padding="7px",I.style.fontSize="9pt",I.style.marginTop="-14px",
+I.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",q.appendChild(I))},5E3);this.container=q},SplashDialog=function(b){var g=document.createElement("div");g.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var k=
+b.addLanguageMenu(g,!1,"28px");null!=k&&(k.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var q=document.createElement("div");q.style.margin="8px 0px 0px 0px";q.style.padding="18px 0px 24px 0px";k="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",k=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=
IMAGE_PATH+"/dropbox-logo.svg",k=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",k=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+"/github-logo.svg",k=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",k=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",k=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",k=mxResources.get("trello")):
-(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",t.style.paddingBottom="10px",t.style.paddingTop="30px",k=mxResources.get("device"));var x=document.createElement("button");x.className="geBigButton";x.style.marginBottom="8px";x.style.fontSize="18px";x.style.padding="10px";x.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)t.style.padding="42px 0px 10px 0px",x.style.marginBottom="12px";else{t.style.border="1px solid #d3d3d3";t.style.borderWidth="1px 0px 1px 0px";var C=document.createElement("table"),
-G=document.createElement("tbody"),H=document.createElement("tr"),I=document.createElement("td"),F=document.createElement("td");C.setAttribute("align","center");I.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,k);F.style.textAlign="left";F.appendChild(d);H.appendChild(I);H.appendChild(F);G.appendChild(H);C.appendChild(G);f.appendChild(C);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
-mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("changeStorage"));mxEvent.addListener(k,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(k)}mxUtils.write(x,mxResources.get("createNewDiagram"));mxEvent.addListener(x,"click",function(){b.hideDialog();b.actions.get("new").funct()});t.appendChild(x);mxUtils.br(t);x=document.createElement("button");x.className="geBigButton";x.style.marginBottom="22px";x.style.fontSize=
-"18px";x.style.padding="10px";x.style.width="340px";mxUtils.write(x,mxResources.get("openExistingDiagram"));mxEvent.addListener(x,"click",function(){b.actions.get("open").funct()});t.appendChild(x);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
-b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(e){x.style.marginBottom="24px";var g=document.createElement("a");g.style.display="inline-block";g.style.color="gray";g.style.cursor="pointer";g.style.marginTop="6px";mxUtils.write(g,mxResources.get("signOut"));x.style.marginBottom="16px";t.style.paddingBottom="18px";mxEvent.addListener(g,"click",function(){b.confirm(mxResources.get("areYouSure"),
-function(){e()})});t.appendChild(g)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var O=b.drive.getUsersList();if(0<O.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");x.style.marginBottom="16px";t.style.paddingBottom="18px";t.appendChild(d);var c=document.createElement("select");c.style.marginLeft="4px";c.style.width="140px";for(k=0;k<O.length;k++)C=document.createElement("option"),mxUtils.write(C,O[k].displayName),C.value=k,c.appendChild(C),
-C=document.createElement("option"),C.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(C,"<"+O[k].email+">"),C.setAttribute("disabled","disabled"),c.appendChild(C);C=document.createElement("option");mxUtils.write(C,mxResources.get("addAccount"));C.value=O.length;c.appendChild(C);mxEvent.addListener(c,"change",function(){var e=c.value,g=O.length!=e;g&&b.drive.setUser(O[e]);b.drive.authorize(g,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(n){b.handleError(n,null,function(){b.hideDialog();
-b.showSplash()})},!0)});t.appendChild(c)}else k(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?k(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?k(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&k(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
-null!=b.dropbox&&k(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):k(function(){b.oneDrive.logout()});f.appendChild(t);this.container=f},EmbedDialog=function(b,f,k,d,t,x,C,G,H){C=null!=C?C:"Check out the diagram I made using @drawio";d=document.createElement("div");var I=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=x?mxUtils.write(d,x):mxUtils.write(d,mxResources.get(5E5>f.length?I?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);x=document.createElement("div");
-x.style.position="absolute";x.style.top="30px";x.style.right="30px";x.style.color="gray";mxUtils.write(x,b.formatFileSize(f.length));d.appendChild(x);var F=document.createElement("textarea");F.setAttribute("autocomplete","off");F.setAttribute("autocorrect","off");F.setAttribute("autocapitalize","off");F.setAttribute("spellcheck","false");F.style.fontFamily="monospace";F.style.wordBreak="break-all";F.style.marginTop="10px";F.style.resize="none";F.style.height="150px";F.style.width="440px";F.style.border=
-"1px solid gray";F.value=mxResources.get("updatingDocument");d.appendChild(F);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(F.value=f,F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)):(F.setAttribute("readonly","true"),F.value=mxResources.get("tooLargeUseDownload"))},0)};x=document.createElement("div");x.style.position="absolute";x.style.bottom="36px";x.style.right="32px";var O=null;!EmbedDialog.showPreviewOption||
-mxClient.IS_CHROMEAPP&&!I||navigator.standalone||!(I||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(O=mxUtils.button(null!=G?G:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var e=5E5>f.length?F.value:f;if(null!=t)t(e);else if(I)try{var g=b.openLink(e);null!=g&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=e.substring(0,8)&&(g.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(p){}}),
-k||500)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}else{var n=window.open();n=null!=n?n.document:null;null!=n?(n.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),n.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),O.className="geBtn",x.appendChild(O));if(!I||7500<f.length)G=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
-b.saveData(null!=H?H:"embed.txt","txt",f,"text/plain")}),G.className="geBtn",x.appendChild(G);if(I&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var c=mxUtils.button("",function(){try{var e="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(F.value);b.openLink(e)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}});G=document.createElement("img");G.setAttribute("src",Editor.facebookImage);G.setAttribute("width","18");G.setAttribute("height",
-"18");G.setAttribute("border","0");c.appendChild(G);c.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");c.style.verticalAlign="bottom";c.style.paddingTop="4px";c.style.minWidth="46px";c.className="geBtn";x.appendChild(c)}7168>f.length&&(c=mxUtils.button("",function(){try{var e="https://twitter.com/intent/tweet?text="+encodeURIComponent(C)+"&url="+encodeURIComponent(F.value);b.openLink(e)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}),
-G=document.createElement("img"),G.setAttribute("src",Editor.tweetImage),G.setAttribute("width","18"),G.setAttribute("height","18"),G.setAttribute("border","0"),G.style.marginBottom="5px",c.appendChild(G),c.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",x.appendChild(c))}!b.isOffline()&&5E5>f.length&&(c=mxUtils.button("",function(){try{var e="mailto:?subject="+encodeURIComponent(H||
-b.defaultFilename)+"&body="+encodeURIComponent(F.value);b.openLink(e)}catch(g){b.handleError({message:g.message||mxResources.get("drawingTooLarge")})}}),G=document.createElement("img"),G.className="geAdaptiveAsset",G.setAttribute("src",Editor.mailImage),G.setAttribute("width","18"),G.setAttribute("height","18"),G.setAttribute("border","0"),G.style.marginBottom="5px",c.appendChild(G),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",x.appendChild(c));
-G=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.appendChild(G);c=mxUtils.button(mxResources.get("copy"),function(){F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?G.className="geBtn gePrimaryBtn":(x.appendChild(c),c.className="geBtn gePrimaryBtn",G.className="geBtn"):(x.appendChild(O),
+(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",q.style.paddingBottom="10px",q.style.paddingTop="30px",k=mxResources.get("device"));var x=document.createElement("button");x.className="geBigButton";x.style.marginBottom="8px";x.style.fontSize="18px";x.style.padding="10px";x.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)q.style.padding="42px 0px 10px 0px",x.style.marginBottom="12px";else{q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";var C=document.createElement("table"),
+G=document.createElement("tbody"),H=document.createElement("tr"),I=document.createElement("td"),E=document.createElement("td");C.setAttribute("align","center");I.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,k);E.style.textAlign="left";E.appendChild(d);H.appendChild(I);H.appendChild(E);G.appendChild(H);C.appendChild(G);g.appendChild(C);k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
+mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("changeStorage"));mxEvent.addListener(k,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});g.appendChild(k)}mxUtils.write(x,mxResources.get("createNewDiagram"));mxEvent.addListener(x,"click",function(){b.hideDialog();b.actions.get("new").funct()});q.appendChild(x);mxUtils.br(q);x=document.createElement("button");x.className="geBigButton";x.style.marginBottom="22px";x.style.fontSize=
+"18px";x.style.padding="10px";x.style.width="340px";mxUtils.write(x,mxResources.get("openExistingDiagram"));mxEvent.addListener(x,"click",function(){b.actions.get("open").funct()});q.appendChild(x);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
+b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(k=function(e){x.style.marginBottom="24px";var f=document.createElement("a");f.style.display="inline-block";f.style.color="gray";f.style.cursor="pointer";f.style.marginTop="6px";mxUtils.write(f,mxResources.get("signOut"));x.style.marginBottom="16px";q.style.paddingBottom="18px";mxEvent.addListener(f,"click",function(){b.confirm(mxResources.get("areYouSure"),
+function(){e()})});q.appendChild(f)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var O=b.drive.getUsersList();if(0<O.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");x.style.marginBottom="16px";q.style.paddingBottom="18px";q.appendChild(d);var c=document.createElement("select");c.style.marginLeft="4px";c.style.width="140px";for(k=0;k<O.length;k++)C=document.createElement("option"),mxUtils.write(C,O[k].displayName),C.value=k,c.appendChild(C),
+C=document.createElement("option"),C.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(C,"<"+O[k].email+">"),C.setAttribute("disabled","disabled"),c.appendChild(C);C=document.createElement("option");mxUtils.write(C,mxResources.get("addAccount"));C.value=O.length;c.appendChild(C);mxEvent.addListener(c,"change",function(){var e=c.value,f=O.length!=e;f&&b.drive.setUser(O[e]);b.drive.authorize(f,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(n){b.handleError(n,null,function(){b.hideDialog();
+b.showSplash()})},!0)});q.appendChild(c)}else k(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?k(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?k(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&k(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
+null!=b.dropbox&&k(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):k(function(){b.oneDrive.logout()});g.appendChild(q);this.container=g},EmbedDialog=function(b,g,k,d,q,x,C,G,H){C=null!=C?C:"Check out the diagram I made using @drawio";d=document.createElement("div");var I=/^https?:\/\//.test(g)||/^mailto:\/\//.test(g);null!=x?mxUtils.write(d,x):mxUtils.write(d,mxResources.get(5E5>g.length?I?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);x=document.createElement("div");
+x.style.position="absolute";x.style.top="30px";x.style.right="30px";x.style.color="gray";mxUtils.write(x,b.formatFileSize(g.length));d.appendChild(x);var E=document.createElement("textarea");E.setAttribute("autocomplete","off");E.setAttribute("autocorrect","off");E.setAttribute("autocapitalize","off");E.setAttribute("spellcheck","false");E.style.fontFamily="monospace";E.style.wordBreak="break-all";E.style.marginTop="10px";E.style.resize="none";E.style.height="150px";E.style.width="440px";E.style.border=
+"1px solid gray";E.value=mxResources.get("updatingDocument");d.appendChild(E);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>g.length?(E.value=g,E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)):(E.setAttribute("readonly","true"),E.value=mxResources.get("tooLargeUseDownload"))},0)};x=document.createElement("div");x.style.position="absolute";x.style.bottom="36px";x.style.right="32px";var O=null;!EmbedDialog.showPreviewOption||
+mxClient.IS_CHROMEAPP&&!I||navigator.standalone||!(I||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(O=mxUtils.button(null!=G?G:mxResources.get(5E5>g.length?"preview":"openInNewWindow"),function(){var e=5E5>g.length?E.value:g;if(null!=q)q(e);else if(I)try{var f=b.openLink(e);null!=f&&(null==k||0<k)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=e.substring(0,8)&&(f.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(p){}}),
+k||500)}catch(p){b.handleError({message:p.message||mxResources.get("drawingTooLarge")})}else{var n=window.open();n=null!=n?n.document:null;null!=n?(n.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+g+"</body></html>"),n.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),O.className="geBtn",x.appendChild(O));if(!I||7500<g.length)G=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
+b.saveData(null!=H?H:"embed.txt","txt",g,"text/plain")}),G.className="geBtn",x.appendChild(G);if(I&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>g.length){var c=mxUtils.button("",function(){try{var e="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(E.value);b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}});G=document.createElement("img");G.setAttribute("src",Editor.facebookImage);G.setAttribute("width","18");G.setAttribute("height",
+"18");G.setAttribute("border","0");c.appendChild(G);c.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");c.style.verticalAlign="bottom";c.style.paddingTop="4px";c.style.minWidth="46px";c.className="geBtn";x.appendChild(c)}7168>g.length&&(c=mxUtils.button("",function(){try{var e="https://twitter.com/intent/tweet?text="+encodeURIComponent(C)+"&url="+encodeURIComponent(E.value);b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}}),
+G=document.createElement("img"),G.setAttribute("src",Editor.tweetImage),G.setAttribute("width","18"),G.setAttribute("height","18"),G.setAttribute("border","0"),G.style.marginBottom="5px",c.appendChild(G),c.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",x.appendChild(c))}!b.isOffline()&&5E5>g.length&&(c=mxUtils.button("",function(){try{var e="mailto:?subject="+encodeURIComponent(H||
+b.defaultFilename)+"&body="+encodeURIComponent(E.value);b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}}),G=document.createElement("img"),G.className="geAdaptiveAsset",G.setAttribute("src",Editor.mailImage),G.setAttribute("width","18"),G.setAttribute("height","18"),G.setAttribute("border","0"),G.style.marginBottom="5px",c.appendChild(G),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",x.appendChild(c));
+G=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.appendChild(G);c=mxUtils.button(mxResources.get("copy"),function(){E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>g.length?mxClient.IS_SF||null!=document.documentMode?G.className="geBtn gePrimaryBtn":(x.appendChild(c),c.className="geBtn gePrimaryBtn",G.className="geBtn"):(x.appendChild(O),
G.className="geBtn",O.className="geBtn gePrimaryBtn");d.appendChild(x);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,f){function k(){var l=null!=U&&null!=U.getTitle()?U.getTitle():this.defaultFilename;if(D.checked&&""!=c.value){var q="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(c.value));null!=l&&(q+="&title="+encodeURIComponent(l));0<A.length&&(q+="&s="+A);""!=e.value&&"0"!=e.value&&(q+="&border="+e.value);""!=O.value&&(q+="&height="+O.value);q+="&pan="+(g.checked?"1":"0");q+="&zoom="+(n.checked?"1":"0");q+="&fit="+(u.checked?"1":"0");
-q+="&resize="+(y.checked?"1":"0");q+="&x0="+Number(F.value);q+="&y0="+H;t.mathEnabled&&(q+="&math=1");v.checked?q+="&edit=_blank":p.checked&&(q+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));I.value=q}else U.constructor==DriveFile||U.constructor==DropboxFile?(q="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=c.value?q+=encodeURIComponent(mxUtils.htmlEntities(c.value))+"&type=3":(q+=U.getHash().substring(1),q=U.constructor==DropboxFile?q+"&type=2":q+"&type=1"),null!=
-l&&(q+="&title="+encodeURIComponent(l)),""!=O.value&&(l=parseInt(O.value)+parseInt(F.value),q+="&height="+l),I.value=q):I.value=""}var d=document.createElement("div"),t=b.editor.graph,x=t.getGraphBounds(),C=t.view.scale,G=Math.floor(x.x/C-t.view.translate.x),H=Math.floor(x.y/C-t.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var I=document.createElement("input");I.setAttribute("type","text");I.style.marginBottom="8px";I.style.marginTop="2px";I.style.width="410px";
-d.appendChild(I);mxUtils.br(d);this.init=function(){I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var F=document.createElement("input");F.setAttribute("type","text");F.setAttribute("size","4");F.style.marginRight="16px";F.style.marginLeft="4px";F.value=G;d.appendChild(F);mxUtils.write(d,mxResources.get("height")+":");var O=document.createElement("input");O.setAttribute("type","text");
-O.setAttribute("size","4");O.style.marginLeft="4px";O.value=Math.ceil(x.height/C);d.appendChild(O);mxUtils.br(d);x=document.createElement("hr");x.setAttribute("size","1");x.style.marginBottom="16px";x.style.marginTop="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.setAttribute("size","28");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";c.value=f||"";d.appendChild(c);
-mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","3");e.style.marginBottom="8px";e.style.marginLeft="4px";e.value="0";d.appendChild(e);mxUtils.br(d);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginLeft="16px";d.appendChild(g);mxUtils.write(d,mxResources.get("pan")+" ");var n=document.createElement("input");
-n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;n.style.marginLeft="8px";d.appendChild(n);mxUtils.write(d,mxResources.get("zoom")+" ");var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.marginLeft="8px";p.setAttribute("title",window.location.href);d.appendChild(p);mxUtils.write(d,mxResources.get("edit")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";d.appendChild(v);mxUtils.write(d,
-mxResources.get("asNew")+" ");mxUtils.br(d);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("resize")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="8px";d.appendChild(u);mxUtils.write(d,mxResources.get("fit")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft=
-"8px";d.appendChild(D);mxUtils.write(d,mxResources.get("embed")+" ");var A=b.getBasenames().join(";"),U=b.getCurrentFile();mxEvent.addListener(g,"change",k);mxEvent.addListener(n,"change",k);mxEvent.addListener(y,"change",k);mxEvent.addListener(u,"change",k);mxEvent.addListener(p,"change",k);mxEvent.addListener(v,"change",k);mxEvent.addListener(D,"change",k);mxEvent.addListener(O,"change",k);mxEvent.addListener(F,"change",k);mxEvent.addListener(e,"change",k);mxEvent.addListener(c,"change",k);k();
-mxEvent.addListener(I,"click",function(){I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";x=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.className="geBtn gePrimaryBtn";f.appendChild(x);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,k){var d=document.createElement("div");d.style.textAlign="right";this.init=
-function(){var t=document.createElement("div");t.style.position="relative";t.style.border="1px solid gray";t.style.width="100%";t.style.height="360px";t.style.overflow="hidden";t.style.marginBottom="16px";mxEvent.disableContextMenu(t);d.appendChild(t);var x=new Graph(t);x.setCellsCloneable(!0);x.setPanning(!0);x.setAllowDanglingEdges(!1);x.connectionHandler.select=!1;x.view.setTranslate(20,20);x.border=20;x.panningHandler.useLeftButtonForPanning=!0;var C="curved=1;";x.cellRenderer.installCellOverlayListeners=
-function(n,p,v){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(v.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(y){p.fireEvent(new mxEventObject("pointerdown","event",y,"state",n))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(v.node,"touchstart",function(y){p.fireEvent(new mxEventObject("pointerdown","event",y,"state",n))})};x.getAllConnectionConstraints=function(){return null};x.connectionHandler.marker.highlight.keepOnTop=
-!1;x.connectionHandler.createEdgeState=function(n){n=x.createEdge(null,null,null,null,null,C);return new mxCellState(this.graph.view,n,this.graph.getCellStyle(n))};var G=x.getDefaultParent(),H=mxUtils.bind(this,function(n){var p=new mxCellOverlay(this.connectImage,"Add outgoing");p.cursor="hand";p.addListener(mxEvent.CLICK,function(v,y){x.connectionHandler.reset();x.clearSelection();var u=x.getCellGeometry(n),D;O(function(){D=x.insertVertex(G,null,"Entry",u.x,u.y,80,30,"rounded=1;");H(D);x.view.refresh(D);
-x.insertEdge(G,null,"",n,D,C)},function(){x.scrollCellToVisible(D)})});p.addListener("pointerdown",function(v,y){v=y.getProperty("event");y=y.getProperty("state");x.popupMenuHandler.hideMenu();x.stopEditing(!1);var u=mxUtils.convertPoint(x.container,mxEvent.getClientX(v),mxEvent.getClientY(v));x.connectionHandler.start(y,u.x,u.y);x.isMouseDown=!0;x.isMouseTrigger=mxEvent.isMouseEvent(v);mxEvent.consume(v)});x.addCellOverlay(n,p)});x.getModel().beginUpdate();try{var I=x.insertVertex(G,null,"Start",
-0,0,80,30,"ellipse");H(I)}finally{x.getModel().endUpdate()}if("horizontalTree"==k){var F=new mxCompactTreeLayout(x);F.edgeRouting=!1;F.levelDistance=30;C="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(F=new mxCompactTreeLayout(x,!1),F.edgeRouting=!1,F.levelDistance=30,C="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(F=new mxRadialTreeLayout(x,!1),F.edgeRouting=!1,F.levelDistance=80):"verticalFlow"==k?F=new mxHierarchicalLayout(x,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-k?F=new mxHierarchicalLayout(x,mxConstants.DIRECTION_WEST):"circle"==k?F=new mxCircleLayout(x):(F=new mxFastOrganicLayout(x,!1),F.forceConstant=80);if(null!=F){var O=function(n,p){x.getModel().beginUpdate();try{null!=n&&n(),F.execute(x.getDefaultParent(),I)}catch(v){throw v;}finally{n=new mxMorphing(x),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){x.getModel().endUpdate();null!=p&&p()})),n.startAnimation()}},c=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,p,
-v,y,u){c.apply(this,arguments);O()};x.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);O()};x.connectionHandler.addListener(mxEvent.CONNECT,function(){O()})}var e=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=t.parentNode&&(x.destroy(),t.parentNode.removeChild(t));b.hideDialog()})});e.className="geBtn";b.editor.cancelFirst&&d.appendChild(e);var g=mxUtils.button(mxResources.get("insert"),function(n){x.clearCellOverlays();
-var p=x.getModel().getChildren(x.getDefaultParent());n=mxEvent.isAltDown(n)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(x.getBoundingBoxFromGeometry(p,!0));p=b.editor.graph.importCells(p,n.x,n.y);n=b.editor.graph.view;var v=n.getBounds(p);v.x-=n.translate.x;v.y-=n.translate.y;b.editor.graph.scrollRectToVisible(v);b.editor.graph.setSelectionCells(p);null!=t.parentNode&&(x.destroy(),t.parentNode.removeChild(t));b.hideDialog()});d.appendChild(g);g.className="geBtn gePrimaryBtn";
+var GoogleSitesDialog=function(b,g){function k(){var l=null!=U&&null!=U.getTitle()?U.getTitle():this.defaultFilename;if(D.checked&&""!=c.value){var u="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(c.value));null!=l&&(u+="&title="+encodeURIComponent(l));0<A.length&&(u+="&s="+A);""!=e.value&&"0"!=e.value&&(u+="&border="+e.value);""!=O.value&&(u+="&height="+O.value);u+="&pan="+(f.checked?"1":"0");u+="&zoom="+(n.checked?"1":"0");u+="&fit="+(v.checked?"1":"0");
+u+="&resize="+(y.checked?"1":"0");u+="&x0="+Number(E.value);u+="&y0="+H;q.mathEnabled&&(u+="&math=1");t.checked?u+="&edit=_blank":p.checked&&(u+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));I.value=u}else U.constructor==DriveFile||U.constructor==DropboxFile?(u="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=c.value?u+=encodeURIComponent(mxUtils.htmlEntities(c.value))+"&type=3":(u+=U.getHash().substring(1),u=U.constructor==DropboxFile?u+"&type=2":u+"&type=1"),null!=
+l&&(u+="&title="+encodeURIComponent(l)),""!=O.value&&(l=parseInt(O.value)+parseInt(E.value),u+="&height="+l),I.value=u):I.value=""}var d=document.createElement("div"),q=b.editor.graph,x=q.getGraphBounds(),C=q.view.scale,G=Math.floor(x.x/C-q.view.translate.x),H=Math.floor(x.y/C-q.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var I=document.createElement("input");I.setAttribute("type","text");I.style.marginBottom="8px";I.style.marginTop="2px";I.style.width="410px";
+d.appendChild(I);mxUtils.br(d);this.init=function(){I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var E=document.createElement("input");E.setAttribute("type","text");E.setAttribute("size","4");E.style.marginRight="16px";E.style.marginLeft="4px";E.value=G;d.appendChild(E);mxUtils.write(d,mxResources.get("height")+":");var O=document.createElement("input");O.setAttribute("type","text");
+O.setAttribute("size","4");O.style.marginLeft="4px";O.value=Math.ceil(x.height/C);d.appendChild(O);mxUtils.br(d);x=document.createElement("hr");x.setAttribute("size","1");x.style.marginBottom="16px";x.style.marginTop="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.setAttribute("size","28");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";c.value=g||"";d.appendChild(c);
+mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","3");e.style.marginBottom="8px";e.style.marginLeft="4px";e.value="0";d.appendChild(e);mxUtils.br(d);var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("checked","checked");f.defaultChecked=!0;f.style.marginLeft="16px";d.appendChild(f);mxUtils.write(d,mxResources.get("pan")+" ");var n=document.createElement("input");
+n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;n.style.marginLeft="8px";d.appendChild(n);mxUtils.write(d,mxResources.get("zoom")+" ");var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.marginLeft="8px";p.setAttribute("title",window.location.href);d.appendChild(p);mxUtils.write(d,mxResources.get("edit")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";d.appendChild(t);mxUtils.write(d,
+mxResources.get("asNew")+" ");mxUtils.br(d);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("resize")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";d.appendChild(v);mxUtils.write(d,mxResources.get("fit")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft=
+"8px";d.appendChild(D);mxUtils.write(d,mxResources.get("embed")+" ");var A=b.getBasenames().join(";"),U=b.getCurrentFile();mxEvent.addListener(f,"change",k);mxEvent.addListener(n,"change",k);mxEvent.addListener(y,"change",k);mxEvent.addListener(v,"change",k);mxEvent.addListener(p,"change",k);mxEvent.addListener(t,"change",k);mxEvent.addListener(D,"change",k);mxEvent.addListener(O,"change",k);mxEvent.addListener(E,"change",k);mxEvent.addListener(e,"change",k);mxEvent.addListener(c,"change",k);k();
+mxEvent.addListener(I,"click",function(){I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";x=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.className="geBtn gePrimaryBtn";g.appendChild(x);d.appendChild(g);this.container=d},CreateGraphDialog=function(b,g,k){var d=document.createElement("div");d.style.textAlign="right";this.init=
+function(){var q=document.createElement("div");q.style.position="relative";q.style.border="1px solid gray";q.style.width="100%";q.style.height="360px";q.style.overflow="hidden";q.style.marginBottom="16px";mxEvent.disableContextMenu(q);d.appendChild(q);var x=new Graph(q);x.setCellsCloneable(!0);x.setPanning(!0);x.setAllowDanglingEdges(!1);x.connectionHandler.select=!1;x.view.setTranslate(20,20);x.border=20;x.panningHandler.useLeftButtonForPanning=!0;var C="curved=1;";x.cellRenderer.installCellOverlayListeners=
+function(n,p,t){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(t.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(y){p.fireEvent(new mxEventObject("pointerdown","event",y,"state",n))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(t.node,"touchstart",function(y){p.fireEvent(new mxEventObject("pointerdown","event",y,"state",n))})};x.getAllConnectionConstraints=function(){return null};x.connectionHandler.marker.highlight.keepOnTop=
+!1;x.connectionHandler.createEdgeState=function(n){n=x.createEdge(null,null,null,null,null,C);return new mxCellState(this.graph.view,n,this.graph.getCellStyle(n))};var G=x.getDefaultParent(),H=mxUtils.bind(this,function(n){var p=new mxCellOverlay(this.connectImage,"Add outgoing");p.cursor="hand";p.addListener(mxEvent.CLICK,function(t,y){x.connectionHandler.reset();x.clearSelection();var v=x.getCellGeometry(n),D;O(function(){D=x.insertVertex(G,null,"Entry",v.x,v.y,80,30,"rounded=1;");H(D);x.view.refresh(D);
+x.insertEdge(G,null,"",n,D,C)},function(){x.scrollCellToVisible(D)})});p.addListener("pointerdown",function(t,y){t=y.getProperty("event");y=y.getProperty("state");x.popupMenuHandler.hideMenu();x.stopEditing(!1);var v=mxUtils.convertPoint(x.container,mxEvent.getClientX(t),mxEvent.getClientY(t));x.connectionHandler.start(y,v.x,v.y);x.isMouseDown=!0;x.isMouseTrigger=mxEvent.isMouseEvent(t);mxEvent.consume(t)});x.addCellOverlay(n,p)});x.getModel().beginUpdate();try{var I=x.insertVertex(G,null,"Start",
+0,0,80,30,"ellipse");H(I)}finally{x.getModel().endUpdate()}if("horizontalTree"==k){var E=new mxCompactTreeLayout(x);E.edgeRouting=!1;E.levelDistance=30;C="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==k?(E=new mxCompactTreeLayout(x,!1),E.edgeRouting=!1,E.levelDistance=30,C="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==k?(E=new mxRadialTreeLayout(x,!1),E.edgeRouting=!1,E.levelDistance=80):"verticalFlow"==k?E=new mxHierarchicalLayout(x,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+k?E=new mxHierarchicalLayout(x,mxConstants.DIRECTION_WEST):"circle"==k?E=new mxCircleLayout(x):(E=new mxFastOrganicLayout(x,!1),E.forceConstant=80);if(null!=E){var O=function(n,p){x.getModel().beginUpdate();try{null!=n&&n(),E.execute(x.getDefaultParent(),I)}catch(t){throw t;}finally{n=new mxMorphing(x),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){x.getModel().endUpdate();null!=p&&p()})),n.startAnimation()}},c=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,p,
+t,y,v){c.apply(this,arguments);O()};x.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);O()};x.connectionHandler.addListener(mxEvent.CONNECT,function(){O()})}var e=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=q.parentNode&&(x.destroy(),q.parentNode.removeChild(q));b.hideDialog()})});e.className="geBtn";b.editor.cancelFirst&&d.appendChild(e);var f=mxUtils.button(mxResources.get("insert"),function(n){x.clearCellOverlays();
+var p=x.getModel().getChildren(x.getDefaultParent());n=mxEvent.isAltDown(n)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(x.getBoundingBoxFromGeometry(p,!0));p=b.editor.graph.importCells(p,n.x,n.y);n=b.editor.graph.view;var t=n.getBounds(p);t.x-=n.translate.x;t.y-=n.translate.y;b.editor.graph.scrollRectToVisible(t);b.editor.graph.setSelectionCells(p);null!=q.parentNode&&(x.destroy(),q.parentNode.removeChild(q));b.hideDialog()});d.appendChild(f);f.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||d.appendChild(e)};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(b,f,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var t=document.createElement("h2");mxUtils.write(t,mxResources.get("backgroundImage"));t.style.marginTop="0px";d.appendChild(t);var x=null!=k&&null!=k.originalSrc;t=!1;var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","geBackgroundImageDialogOption");var G=document.createElement("input");
-G.style.cssText="margin-right:8px;margin-bottom:8px;";G.setAttribute("value","url");G.setAttribute("type","radio");G.setAttribute("name","geBackgroundImageDialogOption");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginBottom="8px";H.style.width="360px";H.value=x||null==k?"":k.src;var I=document.createElement("select");I.style.width="360px";if(null!=b.pages)for(var F=0;F<b.pages.length;F++){var O=document.createElement("option");mxUtils.write(O,b.pages[F].getName()||
-mxResources.get("pageWithNumber",[F+1]));O.setAttribute("value","data:page/id,"+b.pages[F].getId());b.pages[F]==b.currentPage&&O.setAttribute("disabled","disabled");null!=k&&k.originalSrc==O.getAttribute("value")&&(O.setAttribute("selected","selected"),t=!0);I.appendChild(O)}x||null!=b.pages&&1!=b.pages.length||(C.style.display="none",G.style.display="none",I.style.display="none");var c=document.createElement("option"),e=!1,g=!1,n=function(D,A){e||null!=D&&g||(G.checked?null!=A&&A(c.selected?null:
-I.value):""==H.value||b.isOffline()?(v.value="",y.value="",null!=A&&A("")):(H.value=mxUtils.trim(H.value),b.loadImage(H.value,function(U){v.value=U.width;y.value=U.height;null!=A&&A(H.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));v.value="";y.value="";null!=A&&A(null)})))},p=mxUtils.bind(this,function(D){b.importFiles(D,0,0,b.maxBackgroundSize,function(A,U,l,q,B,J){H.value=A;n();H.focus()},function(){},function(A){return"image/"==A.type.substring(0,
+var BackgroundImageDialog=function(b,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var q=document.createElement("h2");mxUtils.write(q,mxResources.get("backgroundImage"));q.style.marginTop="0px";d.appendChild(q);var x=null!=k&&null!=k.originalSrc;q=!1;var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","geBackgroundImageDialogOption");var G=document.createElement("input");
+G.style.cssText="margin-right:8px;margin-bottom:8px;";G.setAttribute("value","url");G.setAttribute("type","radio");G.setAttribute("name","geBackgroundImageDialogOption");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginBottom="8px";H.style.width="360px";H.value=x||null==k?"":k.src;var I=document.createElement("select");I.style.width="360px";if(null!=b.pages)for(var E=0;E<b.pages.length;E++){var O=document.createElement("option");mxUtils.write(O,b.pages[E].getName()||
+mxResources.get("pageWithNumber",[E+1]));O.setAttribute("value","data:page/id,"+b.pages[E].getId());b.pages[E]==b.currentPage&&O.setAttribute("disabled","disabled");null!=k&&k.originalSrc==O.getAttribute("value")&&(O.setAttribute("selected","selected"),q=!0);I.appendChild(O)}x||null!=b.pages&&1!=b.pages.length||(C.style.display="none",G.style.display="none",I.style.display="none");var c=document.createElement("option"),e=!1,f=!1,n=function(D,A){e||null!=D&&f||(G.checked?null!=A&&A(c.selected?null:
+I.value):""==H.value||b.isOffline()?(t.value="",y.value="",null!=A&&A("")):(H.value=mxUtils.trim(H.value),b.loadImage(H.value,function(U){t.value=U.width;y.value=U.height;null!=A&&A(H.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));t.value="";y.value="";null!=A&&A(null)})))},p=mxUtils.bind(this,function(D){b.importFiles(D,0,0,b.maxBackgroundSize,function(A,U,l,u,B,J){H.value=A;n();H.focus()},function(){},function(A){return"image/"==A.type.substring(0,
6)},function(A){for(var U=0;U<A.length;U++)A[U]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){x?I.focus():H.focus();mxEvent.addListener(I,"focus",function(){C.removeAttribute("checked");G.setAttribute("checked","checked");G.checked=!0});mxEvent.addListener(H,"focus",function(){G.removeAttribute("checked");C.setAttribute("checked","checked");C.checked=!0});if(Graph.fileSupport){H.setAttribute("placeholder",mxResources.get("dragImagesHere"));var D=d.parentNode,A=null;mxEvent.addListener(D,
"dragleave",function(U){null!=A&&(A.parentNode.removeChild(A),A=null);U.stopPropagation();U.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(U){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=b.highlightElement(D));U.stopPropagation();U.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(U){null!=A&&(A.parentNode.removeChild(A),A=null);if(0<U.dataTransfer.files.length)p(U.dataTransfer.files);else if(0<=mxUtils.indexOf(U.dataTransfer.types,
-"text/uri-list")){var l=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)&&(H.value=decodeURIComponent(l),n())}U.stopPropagation();U.preventDefault()}),!1)}};d.appendChild(C);d.appendChild(H);mxUtils.br(d);F=document.createElement("span");F.style.marginLeft="30px";mxUtils.write(F,mxResources.get("width")+":");d.appendChild(F);var v=document.createElement("input");v.setAttribute("type","text");v.style.width="60px";v.style.marginLeft="8px";v.style.marginRight="16px";
-v.value=null==k||x?"":k.width;d.appendChild(v);mxUtils.write(d,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="60px";y.style.marginLeft="8px";y.style.marginRight="16px";y.value=null==k||x?"":k.height;d.appendChild(y);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(H,"change",n);ImageDialog.filePicked=function(D){D.action==google.picker.Action.PICKED&&null!=D.docs[0].thumbnails&&(D=D.docs[0].thumbnails[D.docs[0].thumbnails.length-1],
-null!=D&&(H.value=D.url,n()));H.focus()};d.appendChild(G);d.appendChild(I);mxUtils.br(d);x?(G.setAttribute("checked","checked"),G.checked=!0):(C.setAttribute("checked","checked"),C.checked=!0);!t&&G.checked&&(mxUtils.write(c,mxResources.get("pageNotFound")),c.setAttribute("disabled","disabled"),c.setAttribute("selected","selected"),c.setAttribute("value","pageNotFound"),I.appendChild(c),mxEvent.addListener(I,"change",function(){null==c.parentNode||c.selected||c.parentNode.removeChild(c)}));k=document.createElement("div");
-k.style.marginTop="30px";k.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){e=!0;b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&k.appendChild(t);F=mxUtils.button(mxResources.get("reset"),function(){H.value="";v.value="";y.value="";C.checked=!0;e=!1});mxEvent.addGestureListeners(F,function(){e=!0});F.className="geBtn";F.width="100";k.appendChild(F);if(Graph.fileSupport){var u=document.createElement("input");u.setAttribute("multiple","multiple");u.setAttribute("type",
-"file");mxEvent.addListener(u,"change",function(D){null!=u.files&&(p(u.files),u.type="",u.type="file",u.value="")});u.style.display="none";d.appendChild(u);F=mxUtils.button(mxResources.get("open"),function(){u.click()});F.className="geBtn";k.appendChild(F)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();n(null,function(D){f(""!=D&&null!=D?new mxImage(D,v.value,y.value):null,null==D)})});mxEvent.addGestureListeners(applyBtn,function(){g=!0});applyBtn.className="geBtn gePrimaryBtn";
-k.appendChild(applyBtn);b.editor.cancelFirst||k.appendChild(t);d.appendChild(k);this.container=d},ParseDialog=function(b,f,k){function d(e,g,n){var p=e.split("\n");if("plantUmlPng"==g||"plantUmlSvg"==g||"plantUmlTxt"==g){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var v=function(P,R,V,X,m){x=mxEvent.isAltDown(n)?x:y.getCenterInsertPoint(new mxRectangle(0,0,X,m));var z=null;y.getModel().beginUpdate();try{z="txt"==R?b.insertAsPreText(V,x.x,x.y):y.insertVertex(null,null,null,x.x,x.y,
-X,m,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),y.setAttributeForCell(z,"plantUmlData",JSON.stringify({data:P,format:R},null,2))}finally{y.getModel().endUpdate()}null!=z&&(y.setSelectionCell(z),y.scrollCellToVisible(z))},y=b.editor.graph,u="plantUmlTxt"==g?"txt":"plantUmlPng"==g?"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"==
-e&&"svg"==u?window.setTimeout(function(){b.spinner.stop();v(e,u,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(e,u,function(P,R,V){b.spinner.stop();v(e,u,P,R,V)},function(P){b.handleError(P)})}}else if("mermaid"==g)b.spinner.spin(document.body,mxResources.get("inserting"))&&(y=b.editor.graph,b.generateMermaidImage(e,u,function(P,R,V){x=mxEvent.isAltDown(n)?x:y.getCenterInsertPoint(new mxRectangle(0,0,R,V));b.spinner.stop();var X=null;y.getModel().beginUpdate();try{X=y.insertVertex(null,null,null,x.x,x.y,R,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-P+";"),y.setAttributeForCell(X,"mermaidData",JSON.stringify({data:e,config:EditorUi.defaultMermaidConfig},null,2))}finally{y.getModel().endUpdate()}null!=X&&(y.setSelectionCell(X),y.scrollCellToVisible(X))},function(P){b.handleError(P)}));else if("table"==g){g=null;for(var D=[],A=0,U={},l=0;l<p.length;l++){var q=mxUtils.trim(p[l]);if("primary key"==q.substring(0,11).toLowerCase()){var B=q.match(/\((.+)\)/);B&&B[1]&&(U[B[1]]=!0);p.splice(l,1)}else 0<q.toLowerCase().indexOf("primary key")&&(U[q.split(" ")[0]]=
-!0,p[l]=mxUtils.trim(q.replace(/primary key/i,"")))}for(l=0;l<p.length;l++)if(q=mxUtils.trim(p[l]),"create table"==q.substring(0,12).toLowerCase())q=mxUtils.trim(q.substring(12)),"("==q.charAt(q.length-1)&&(q=mxUtils.trim(q.substring(0,q.length-1))),g=new mxCell(q,new mxGeometry(A,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),g.vertex=!0,D.push(g),q=b.editor.graph.getPreferredSizeForCell(J),null!=
-q&&(g.geometry.width=q.width+10);else if(null!=g&&")"==q.charAt(0))A+=g.geometry.width+40,g=null;else if("("!=q&&null!=g){q=q.substring(0,","==q.charAt(q.length-1)?q.length-1:q.length);B=U[q.split(" ")[0]];var J=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="+(B?"1":"0")+";");J.vertex=!0;var M=new mxCell(B?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(B?"fontStyle=1;":""));M.vertex=!0;J.insert(M);q=new mxCell(q,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;"+(B?"fontStyle=5;":""));q.vertex=!0;J.insert(q);q=b.editor.graph.getPreferredSizeForCell(q);null!=q&&g.geometry.width<q.width+30&&(g.geometry.width=Math.min(320,
-Math.max(g.geometry.width,q.width+30)));g.insert(J,B?0:null);g.geometry.height+=30}0<D.length&&(y=b.editor.graph,x=mxEvent.isAltDown(n)?x:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(D,!0)),y.setSelectionCells(y.importCells(D,x.x,x.y)),y.scrollCellToVisible(y.getSelectionCell()))}else if("list"==g){if(0<p.length){y=b.editor.graph;J=null;D=[];for(l=g=0;l<p.length;l++)";"!=p[l].charAt(0)&&(0==p[l].length?J=null:null==J?(J=new mxCell(p[l],new mxGeometry(g,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
-J.vertex=!0,D.push(J),q=y.getPreferredSizeForCell(J),null!=q&&J.geometry.width<q.width+10&&(J.geometry.width=q.width+10),g+=J.geometry.width+40):"--"==p[l]?(q=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;"),q.vertex=!0,J.geometry.height+=q.geometry.height,J.insert(q)):0<p[l].length&&(A=new mxCell(p[l],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;"),
-A.vertex=!0,q=y.getPreferredSizeForCell(A),null!=q&&A.geometry.width<q.width&&(A.geometry.width=q.width),J.geometry.width=Math.max(J.geometry.width,A.geometry.width),J.geometry.height+=A.geometry.height,J.insert(A)));if(0<D.length){x=mxEvent.isAltDown(n)?x:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(D,!0));y.getModel().beginUpdate();try{D=y.importCells(D,x.x,x.y);q=[];for(l=0;l<D.length;l++)q.push(D[l]),q=q.concat(D[l].children);y.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{y.getModel().endUpdate()}y.setSelectionCells(D);
-y.scrollCellToVisible(y.getSelectionCell())}}}else{J=function(P){var R=E[P];null==R&&(R=new mxCell(P,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),R.vertex=!0,E[P]=R,D.push(R));return R};var E={};D=[];for(l=0;l<p.length;l++)if(";"!=p[l].charAt(0)){var K=p[l].split("->");2<=K.length&&(B=J(K[0]),M=J(K[K.length-1]),K=new mxCell(2<K.length?K[1]:"",new mxGeometry),K.edge=!0,B.insertEdge(K,!0),M.insertEdge(K,!1),D.push(K))}if(0<D.length){p=document.createElement("div");p.style.visibility="hidden";
-document.body.appendChild(p);y=new Graph(p);y.getModel().beginUpdate();try{D=y.importCells(D);for(l=0;l<D.length;l++)y.getModel().isVertex(D[l])&&(q=y.getPreferredSizeForCell(D[l]),D[l].geometry.width=Math.max(D[l].geometry.width,q.width),D[l].geometry.height=Math.max(D[l].geometry.height,q.height));l=!0;"horizontalFlow"==g||"verticalFlow"==g?((new mxHierarchicalLayout(y,"horizontalFlow"==g?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(y.getDefaultParent(),D),l=!1):"circle"==g?
-(new mxCircleLayout(y)).execute(y.getDefaultParent()):(A=new mxFastOrganicLayout(y),A.disableEdgeStyle=!1,A.forceConstant=180,A.execute(y.getDefaultParent()));l&&(U=new mxParallelEdgeLayout(y),U.spacing=30,U.execute(y.getDefaultParent()))}finally{y.getModel().endUpdate()}y.clearCellOverlays();q=[];b.editor.graph.getModel().beginUpdate();try{D=y.getModel().getChildren(y.getDefaultParent()),x=mxEvent.isAltDown(n)?x:b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(D,!0)),q=b.editor.graph.importCells(D,
-x.x,x.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",q))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(q);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());y.destroy();p.parentNode.removeChild(p)}}}function t(){return"list"==G.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"==G.value?
+"text/uri-list")){var l=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)&&(H.value=decodeURIComponent(l),n())}U.stopPropagation();U.preventDefault()}),!1)}};d.appendChild(C);d.appendChild(H);mxUtils.br(d);E=document.createElement("span");E.style.marginLeft="30px";mxUtils.write(E,mxResources.get("width")+":");d.appendChild(E);var t=document.createElement("input");t.setAttribute("type","text");t.style.width="60px";t.style.marginLeft="8px";t.style.marginRight="16px";
+t.value=null==k||x?"":k.width;d.appendChild(t);mxUtils.write(d,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="60px";y.style.marginLeft="8px";y.style.marginRight="16px";y.value=null==k||x?"":k.height;d.appendChild(y);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(H,"change",n);ImageDialog.filePicked=function(D){D.action==google.picker.Action.PICKED&&null!=D.docs[0].thumbnails&&(D=D.docs[0].thumbnails[D.docs[0].thumbnails.length-1],
+null!=D&&(H.value=D.url,n()));H.focus()};d.appendChild(G);d.appendChild(I);mxUtils.br(d);x?(G.setAttribute("checked","checked"),G.checked=!0):(C.setAttribute("checked","checked"),C.checked=!0);!q&&G.checked&&(mxUtils.write(c,mxResources.get("pageNotFound")),c.setAttribute("disabled","disabled"),c.setAttribute("selected","selected"),c.setAttribute("value","pageNotFound"),I.appendChild(c),mxEvent.addListener(I,"change",function(){null==c.parentNode||c.selected||c.parentNode.removeChild(c)}));k=document.createElement("div");
+k.style.marginTop="30px";k.style.textAlign="right";q=mxUtils.button(mxResources.get("cancel"),function(){e=!0;b.hideDialog()});q.className="geBtn";b.editor.cancelFirst&&k.appendChild(q);E=mxUtils.button(mxResources.get("reset"),function(){H.value="";t.value="";y.value="";C.checked=!0;e=!1});mxEvent.addGestureListeners(E,function(){e=!0});E.className="geBtn";E.width="100";k.appendChild(E);if(Graph.fileSupport){var v=document.createElement("input");v.setAttribute("multiple","multiple");v.setAttribute("type",
+"file");mxEvent.addListener(v,"change",function(D){null!=v.files&&(p(v.files),v.type="",v.type="file",v.value="")});v.style.display="none";d.appendChild(v);E=mxUtils.button(mxResources.get("open"),function(){v.click()});E.className="geBtn";k.appendChild(E)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();n(null,function(D){g(""!=D&&null!=D?new mxImage(D,t.value,y.value):null,null==D)})});mxEvent.addGestureListeners(applyBtn,function(){f=!0});applyBtn.className="geBtn gePrimaryBtn";
+k.appendChild(applyBtn);b.editor.cancelFirst||k.appendChild(q);d.appendChild(k);this.container=d},ParseDialog=function(b,g,k){function d(e,f,n){var p=e.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var t=function(P,R,V,X,m){x=mxEvent.isAltDown(n)?x:y.getCenterInsertPoint(new mxRectangle(0,0,X,m));var z=null;y.getModel().beginUpdate();try{z="txt"==R?b.insertAsPreText(V,x.x,x.y):y.insertVertex(null,null,null,x.x,x.y,
+X,m,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),y.setAttributeForCell(z,"plantUmlData",JSON.stringify({data:P,format:R},null,2))}finally{y.getModel().endUpdate()}null!=z&&(y.setSelectionCell(z),y.scrollCellToVisible(z))},y=b.editor.graph,v="plantUmlTxt"==f?"txt":"plantUmlPng"==f?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+e&&"svg"==v?window.setTimeout(function(){b.spinner.stop();t(e,v,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(e,v,function(P,R,V){b.spinner.stop();t(e,v,P,R,V)},function(P){b.handleError(P)})}}else if("mermaid"==f)b.spinner.spin(document.body,mxResources.get("inserting"))&&(y=b.editor.graph,b.generateMermaidImage(e,v,function(P,R,V){x=mxEvent.isAltDown(n)?x:y.getCenterInsertPoint(new mxRectangle(0,0,R,V));b.spinner.stop();var X=null;y.getModel().beginUpdate();try{X=y.insertVertex(null,null,null,x.x,x.y,R,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+P+";"),y.setAttributeForCell(X,"mermaidData",JSON.stringify({data:e,config:EditorUi.defaultMermaidConfig},null,2))}finally{y.getModel().endUpdate()}null!=X&&(y.setSelectionCell(X),y.scrollCellToVisible(X))},function(P){b.handleError(P)}));else if("table"==f){f=null;for(var D=[],A=0,U={},l=0;l<p.length;l++){var u=mxUtils.trim(p[l]);if("primary key"==u.substring(0,11).toLowerCase()){var B=u.match(/\((.+)\)/);B&&B[1]&&(U[B[1]]=!0);p.splice(l,1)}else 0<u.toLowerCase().indexOf("primary key")&&(U[u.split(" ")[0]]=
+!0,p[l]=mxUtils.trim(u.replace(/primary key/i,"")))}for(l=0;l<p.length;l++)if(u=mxUtils.trim(p[l]),"create table"==u.substring(0,12).toLowerCase())u=mxUtils.trim(u.substring(12)),"("==u.charAt(u.length-1)&&(u=mxUtils.trim(u.substring(0,u.length-1))),f=new mxCell(u,new mxGeometry(A,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),f.vertex=!0,D.push(f),u=b.editor.graph.getPreferredSizeForCell(J),null!=
+u&&(f.geometry.width=u.width+10);else if(null!=f&&")"==u.charAt(0))A+=f.geometry.width+40,f=null;else if("("!=u&&null!=f){u=u.substring(0,","==u.charAt(u.length-1)?u.length-1:u.length);B=U[u.split(" ")[0]];var J=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="+(B?"1":"0")+";");J.vertex=!0;var M=new mxCell(B?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(B?"fontStyle=1;":""));M.vertex=!0;J.insert(M);u=new mxCell(u,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;"+(B?"fontStyle=5;":""));u.vertex=!0;J.insert(u);u=b.editor.graph.getPreferredSizeForCell(u);null!=u&&f.geometry.width<u.width+30&&(f.geometry.width=Math.min(320,
+Math.max(f.geometry.width,u.width+30)));f.insert(J,B?0:null);f.geometry.height+=30}0<D.length&&(y=b.editor.graph,x=mxEvent.isAltDown(n)?x:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(D,!0)),y.setSelectionCells(y.importCells(D,x.x,x.y)),y.scrollCellToVisible(y.getSelectionCell()))}else if("list"==f){if(0<p.length){y=b.editor.graph;J=null;D=[];for(l=f=0;l<p.length;l++)";"!=p[l].charAt(0)&&(0==p[l].length?J=null:null==J?(J=new mxCell(p[l],new mxGeometry(f,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+J.vertex=!0,D.push(J),u=y.getPreferredSizeForCell(J),null!=u&&J.geometry.width<u.width+10&&(J.geometry.width=u.width+10),f+=J.geometry.width+40):"--"==p[l]?(u=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),u.vertex=!0,J.geometry.height+=u.geometry.height,J.insert(u)):0<p[l].length&&(A=new mxCell(p[l],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;"),
+A.vertex=!0,u=y.getPreferredSizeForCell(A),null!=u&&A.geometry.width<u.width&&(A.geometry.width=u.width),J.geometry.width=Math.max(J.geometry.width,A.geometry.width),J.geometry.height+=A.geometry.height,J.insert(A)));if(0<D.length){x=mxEvent.isAltDown(n)?x:y.getCenterInsertPoint(y.getBoundingBoxFromGeometry(D,!0));y.getModel().beginUpdate();try{D=y.importCells(D,x.x,x.y);u=[];for(l=0;l<D.length;l++)u.push(D[l]),u=u.concat(D[l].children);y.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{y.getModel().endUpdate()}y.setSelectionCells(D);
+y.scrollCellToVisible(y.getSelectionCell())}}}else{J=function(P){var R=F[P];null==R&&(R=new mxCell(P,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),R.vertex=!0,F[P]=R,D.push(R));return R};var F={};D=[];for(l=0;l<p.length;l++)if(";"!=p[l].charAt(0)){var K=p[l].split("->");2<=K.length&&(B=J(K[0]),M=J(K[K.length-1]),K=new mxCell(2<K.length?K[1]:"",new mxGeometry),K.edge=!0,B.insertEdge(K,!0),M.insertEdge(K,!1),D.push(K))}if(0<D.length){p=document.createElement("div");p.style.visibility="hidden";
+document.body.appendChild(p);y=new Graph(p);y.getModel().beginUpdate();try{D=y.importCells(D);for(l=0;l<D.length;l++)y.getModel().isVertex(D[l])&&(u=y.getPreferredSizeForCell(D[l]),D[l].geometry.width=Math.max(D[l].geometry.width,u.width),D[l].geometry.height=Math.max(D[l].geometry.height,u.height));l=!0;"horizontalFlow"==f||"verticalFlow"==f?((new mxHierarchicalLayout(y,"horizontalFlow"==f?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(y.getDefaultParent(),D),l=!1):"circle"==f?
+(new mxCircleLayout(y)).execute(y.getDefaultParent()):(A=new mxFastOrganicLayout(y),A.disableEdgeStyle=!1,A.forceConstant=180,A.execute(y.getDefaultParent()));l&&(U=new mxParallelEdgeLayout(y),U.spacing=30,U.execute(y.getDefaultParent()))}finally{y.getModel().endUpdate()}y.clearCellOverlays();u=[];b.editor.graph.getModel().beginUpdate();try{D=y.getModel().getChildren(y.getDefaultParent()),x=mxEvent.isAltDown(n)?x:b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(D,!0)),u=b.editor.graph.importCells(D,
+x.x,x.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(u);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());y.destroy();p.parentNode.removeChild(p)}}}function q(){return"list"==G.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"==G.value?
"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==G.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==G.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
-"plantUmlSvg"==G.value||"plantUmlTxt"==G.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var x=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var C=document.createElement("textarea");C.style.boxSizing="border-box";C.style.resize=
+"plantUmlSvg"==G.value||"plantUmlTxt"==G.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var x=b.editor.graph.getFreeInsertPoint();g=document.createElement("div");g.style.textAlign="right";var C=document.createElement("textarea");C.style.boxSizing="border-box";C.style.resize=
"none";C.style.width="100%";C.style.height="354px";C.style.marginBottom="16px";var G=document.createElement("select");if("formatSql"==k||"mermaid"==k)G.style.display="none";var H=document.createElement("option");H.setAttribute("value","list");mxUtils.write(H,mxResources.get("list"));"plantUml"!=k&&G.appendChild(H);null!=k&&"fromText"!=k||H.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","table");mxUtils.write(H,mxResources.get("formatSql"));"formatSql"==
-k&&(G.appendChild(H),H.setAttribute("selected","selected"));H=document.createElement("option");H.setAttribute("value","mermaid");mxUtils.write(H,mxResources.get("formatSql"));"mermaid"==k&&(G.appendChild(H),H.setAttribute("selected","selected"));H=document.createElement("option");H.setAttribute("value","diagram");mxUtils.write(H,mxResources.get("diagram"));var I=document.createElement("option");I.setAttribute("value","circle");mxUtils.write(I,mxResources.get("circle"));var F=document.createElement("option");
-F.setAttribute("value","horizontalFlow");mxUtils.write(F,mxResources.get("horizontalFlow"));var O=document.createElement("option");O.setAttribute("value","verticalFlow");mxUtils.write(O,mxResources.get("verticalFlow"));"plantUml"!=k&&(G.appendChild(H),G.appendChild(I),G.appendChild(F),G.appendChild(O));H=document.createElement("option");H.setAttribute("value","plantUmlSvg");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&H.setAttribute("selected",
-"selected");I=document.createElement("option");I.setAttribute("value","plantUmlPng");mxUtils.write(I,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");F=document.createElement("option");F.setAttribute("value","plantUmlTxt");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(G.appendChild(H),G.appendChild(I),G.appendChild(F));var c=t();C.value=c;f.appendChild(C);this.init=function(){C.focus()};
-Graph.fileSupport&&(C.addEventListener("dragover",function(e){e.stopPropagation();e.preventDefault()},!1),C.addEventListener("drop",function(e){e.stopPropagation();e.preventDefault();if(0<e.dataTransfer.files.length){e=e.dataTransfer.files[0];var g=new FileReader;g.onload=function(n){C.value=n.target.result};g.readAsText(e)}},!1));f.appendChild(G);mxEvent.addListener(G,"change",function(){var e=t();if(0==C.value.length||C.value==c)c=e,C.value=c});b.isOffline()||"mermaid"!=k&&"plantUml"!=k||(H=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("mermaid"==k?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),H.className="geBtn",f.appendChild(H));H=mxUtils.button(mxResources.get("close"),function(){C.value==c?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});H.className="geBtn";b.editor.cancelFirst&&f.appendChild(H);I=mxUtils.button(mxResources.get("insert"),function(e){b.hideDialog();d(C.value,G.value,e)});f.appendChild(I);I.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-f.appendChild(H);this.container=f},NewDialog=function(b,f,k,d,t,x,C,G,H,I,F,O,c,e,g,n,p,v){function y(ka){null!=ka&&(ya=ta=ka?135:140);ka=!0;if(null!=wa)for(;E<wa.length&&(ka||0!=mxUtils.mod(E,30));){var oa=wa[E++];oa=A(oa.url,oa.libs,oa.title,oa.tooltip?oa.tooltip:oa.title,oa.select,oa.imgUrl,oa.info,oa.onClick,oa.preview,oa.noImg,oa.clibs);ka&&oa.click();ka=!1}}function u(){if(Z&&null!=e)k||b.hideDialog(),e(Z,aa,M.value);else if(d)k||b.hideDialog(),d(S,M.value,ba,N);else{var ka=M.value;null!=ka&&
+k&&(G.appendChild(H),H.setAttribute("selected","selected"));H=document.createElement("option");H.setAttribute("value","mermaid");mxUtils.write(H,mxResources.get("formatSql"));"mermaid"==k&&(G.appendChild(H),H.setAttribute("selected","selected"));H=document.createElement("option");H.setAttribute("value","diagram");mxUtils.write(H,mxResources.get("diagram"));var I=document.createElement("option");I.setAttribute("value","circle");mxUtils.write(I,mxResources.get("circle"));var E=document.createElement("option");
+E.setAttribute("value","horizontalFlow");mxUtils.write(E,mxResources.get("horizontalFlow"));var O=document.createElement("option");O.setAttribute("value","verticalFlow");mxUtils.write(O,mxResources.get("verticalFlow"));"plantUml"!=k&&(G.appendChild(H),G.appendChild(I),G.appendChild(E),G.appendChild(O));H=document.createElement("option");H.setAttribute("value","plantUmlSvg");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==k&&H.setAttribute("selected",
+"selected");I=document.createElement("option");I.setAttribute("value","plantUmlPng");mxUtils.write(I,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");E=document.createElement("option");E.setAttribute("value","plantUmlTxt");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==k&&(G.appendChild(H),G.appendChild(I),G.appendChild(E));var c=q();C.value=c;g.appendChild(C);this.init=function(){C.focus()};
+Graph.fileSupport&&(C.addEventListener("dragover",function(e){e.stopPropagation();e.preventDefault()},!1),C.addEventListener("drop",function(e){e.stopPropagation();e.preventDefault();if(0<e.dataTransfer.files.length){e=e.dataTransfer.files[0];var f=new FileReader;f.onload=function(n){C.value=n.target.result};f.readAsText(e)}},!1));g.appendChild(G);mxEvent.addListener(G,"change",function(){var e=q();if(0==C.value.length||C.value==c)c=e,C.value=c});b.isOffline()||"mermaid"!=k&&"plantUml"!=k||(H=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("mermaid"==k?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),H.className="geBtn",g.appendChild(H));H=mxUtils.button(mxResources.get("close"),function(){C.value==c?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});H.className="geBtn";b.editor.cancelFirst&&g.appendChild(H);I=mxUtils.button(mxResources.get("insert"),function(e){b.hideDialog();d(C.value,G.value,e)});g.appendChild(I);I.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+g.appendChild(H);this.container=g},NewDialog=function(b,g,k,d,q,x,C,G,H,I,E,O,c,e,f,n,p,t){function y(ka){null!=ka&&(ya=ta=ka?135:140);ka=!0;if(null!=wa)for(;F<wa.length&&(ka||0!=mxUtils.mod(F,30));){var oa=wa[F++];oa=A(oa.url,oa.libs,oa.title,oa.tooltip?oa.tooltip:oa.title,oa.select,oa.imgUrl,oa.info,oa.onClick,oa.preview,oa.noImg,oa.clibs);ka&&oa.click();ka=!1}}function v(){if(Z&&null!=e)k||b.hideDialog(),e(Z,aa,M.value);else if(d)k||b.hideDialog(),d(S,M.value,ba,N);else{var ka=M.value;null!=ka&&
0<ka.length&&b.pickFolder(b.mode,function(oa){b.createFile(ka,S,null!=N&&0<N.length?N:null,null,function(){b.hideDialog()},null,oa,null,null!=T&&0<T.length?T:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function D(ka,oa,sa,ma,na,Ea,ja){null!=W&&(W.style.backgroundColor="transparent",W.style.border="1px solid transparent");P.removeAttribute("disabled");S=oa;N=sa;T=Ea;W=ka;Z=ma;ba=ja;aa=na;W.style.backgroundColor=G;W.style.border=H}function A(ka,oa,sa,ma,na,Ea,ja,la,
pa,xa,Ba){function Fa(Ha,Ta){null==Ma?(Qa=Ha,Qa=/^https?:\/\//.test(Qa)&&!b.editor.isCorsEnabledForUrl(Qa)?PROXY_URL+"?url="+encodeURIComponent(Qa):TEMPLATE_PATH+"/"+Qa,mxUtils.get(Qa,mxUtils.bind(this,function(Sa){200<=Sa.getStatus()&&299>=Sa.getStatus()&&(Ma=Sa.getText());Ta(Ma,Qa)}))):Ta(Ma,Qa)}function Ca(Ha,Ta,Sa){if(null!=Ha&&mxUtils.isAncestorNode(document.body,ra)){Ha=mxUtils.parseXml(Ha);Ha=Editor.parseDiagramNode(Ha.documentElement);var Wa=new mxCodec(Ha.ownerDocument),$a=new mxGraphModel;
Wa.decode(Ha,$a);Ha=$a.root.getChildAt(0).children;b.sidebar.createTooltip(ra,Ha,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!=sa?mxResources.get(sa,null,sa):null,!0,new mxPoint(Ta,Sa),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;D(ra,null,null,ka,ja,Ba)},!0,!1)}}function ua(Ha,Ta){null==ka||Va||
b.sidebar.currentElt==ra?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>",Ca(Ta,mxEvent.getClientX(Ha),mxEvent.getClientY(Ha))):(b.sidebar.currentElt=
ra,Va=!0,Fa(ka,function(Sa){Va&&b.sidebar.currentElt==ra&&Ca(Sa,mxEvent.getClientX(Ha),mxEvent.getClientY(Ha));Va=!1})))}var ra=document.createElement("div");ra.className="geTemplate geAdaptiveAsset";ra.style.position="relative";ra.style.height=ya+"px";ra.style.width=ta+"px";var Ma=null,Qa=ka;null!=sa?ra.setAttribute("title",mxResources.get(sa,null,sa)):null!=ma&&0<ma.length&&ra.setAttribute("title",ma);var Va=!1,Ga=null;if(null!=Ea){ra.style.display="inline-flex";ra.style.justifyContent="center";
-ra.style.alignItems="center";na=document.createElement("img");na.setAttribute("src",Ea);na.setAttribute("alt",ma);na.style.maxWidth=ya+"px";na.style.maxHeight=ta+"px";Ga=na;var Ja=Ea.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ra.appendChild(na);na.onerror=function(){this.src!=Ja?this.src=Ja:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ra,mxUtils.bind(this,function(Ha){D(ra,null,null,ka,ja,Ba)}),null,null);mxEvent.addListener(ra,"dblclick",function(Ha){u();
-mxEvent.consume(Ha)})}else if(!xa&&null!=ka&&0<ka.length){var Ka=function(Ha){P.setAttribute("disabled","disabled");ra.style.backgroundColor="transparent";ra.style.border="1px solid transparent";K.spin(fa);Fa(ka,function(Ta,Sa){K.stop();null!=Ta&&(D(ra,Ta,oa,null,null,Ba,Sa),Ha&&u())})};na=pa||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";ra.style.backgroundImage="url("+na+")";ra.style.backgroundPosition="center center";ra.style.backgroundRepeat="no-repeat";if(null!=sa){ma=document.createElement("table");
+ra.style.alignItems="center";na=document.createElement("img");na.setAttribute("src",Ea);na.setAttribute("alt",ma);na.style.maxWidth=ya+"px";na.style.maxHeight=ta+"px";Ga=na;var Ja=Ea.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ra.appendChild(na);na.onerror=function(){this.src!=Ja?this.src=Ja:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ra,mxUtils.bind(this,function(Ha){D(ra,null,null,ka,ja,Ba)}),null,null);mxEvent.addListener(ra,"dblclick",function(Ha){v();
+mxEvent.consume(Ha)})}else if(!xa&&null!=ka&&0<ka.length){var Ka=function(Ha){P.setAttribute("disabled","disabled");ra.style.backgroundColor="transparent";ra.style.border="1px solid transparent";K.spin(fa);Fa(ka,function(Ta,Sa){K.stop();null!=Ta&&(D(ra,Ta,oa,null,null,Ba,Sa),Ha&&v())})};na=pa||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";ra.style.backgroundImage="url("+na+")";ra.style.backgroundPosition="center center";ra.style.backgroundRepeat="no-repeat";if(null!=sa){ma=document.createElement("table");
ma.setAttribute("width","100%");ma.setAttribute("height","100%");ma.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";ma.style.lineHeight="1.3em";ma.style.border="inherit";Ea=document.createElement("tbody");pa=document.createElement("tr");xa=document.createElement("td");xa.setAttribute("align","center");xa.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=ya-34+"px";mxUtils.write(Oa,mxResources.get(sa,null,sa));xa.appendChild(Oa);pa.appendChild(xa);Ea.appendChild(pa);ma.appendChild(Ea);ra.appendChild(ma)}mxEvent.addGestureListeners(ra,mxUtils.bind(this,function(Ha){Ka()}),null,null);mxEvent.addListener(ra,"dblclick",function(Ha){Ka(!0);mxEvent.consume(Ha)})}else ma=document.createElement("table"),ma.setAttribute("width",
"100%"),ma.setAttribute("height","100%"),ma.style.lineHeight="1.3em",Ea=document.createElement("tbody"),pa=document.createElement("tr"),xa=document.createElement("td"),xa.setAttribute("align","center"),xa.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=
-ya-34+"px",mxUtils.write(Oa,mxResources.get(sa,null,sa)),xa.appendChild(Oa),pa.appendChild(xa),Ea.appendChild(pa),ma.appendChild(Ea),ra.appendChild(ma),na&&D(ra),mxEvent.addGestureListeners(ra,mxUtils.bind(this,function(Ha){D(ra,null,null,ka,ja)}),null,null),null!=la?mxEvent.addListener(ra,"click",la):(mxEvent.addListener(ra,"click",function(Ha){D(ra,null,null,ka,ja)}),mxEvent.addListener(ra,"dblclick",function(Ha){u();mxEvent.consume(Ha)}));if(null!=ka){var Ra=document.createElement("img");Ra.setAttribute("src",
+ya-34+"px",mxUtils.write(Oa,mxResources.get(sa,null,sa)),xa.appendChild(Oa),pa.appendChild(xa),Ea.appendChild(pa),ma.appendChild(Ea),ra.appendChild(ma),na&&D(ra),mxEvent.addGestureListeners(ra,mxUtils.bind(this,function(Ha){D(ra,null,null,ka,ja)}),null,null),null!=la?mxEvent.addListener(ra,"click",la):(mxEvent.addListener(ra,"click",function(Ha){D(ra,null,null,ka,ja)}),mxEvent.addListener(ra,"dblclick",function(Ha){v();mxEvent.consume(Ha)}));if(null!=ka){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";ra.appendChild(Ra);var Ua=!1;mxEvent.addGestureListeners(Ra,mxUtils.bind(this,function(Ha){Ua=b.sidebar.currentElt==ra}),null,null);mxEvent.addListener(Ra,"click",mxUtils.bind(this,function(Ha){Ua||ua(Ha,Ra);mxEvent.consume(Ha)}))}fa.appendChild(ra);return ra}function U(){function ka(ua,
-ra){var Ma=mxResources.get(ua);null==Ma&&(Ma=ua.substring(0,1).toUpperCase()+ua.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"&hellip;");return Ma+" ("+ra.length+")"}function oa(ua,ra,Ma){mxEvent.addListener(ra,"click",function(){qa!=ra&&(qa.style.backgroundColor="",qa=ra,qa.style.backgroundColor=C,fa.scrollTop=0,fa.innerText="",E=0,wa=Ma?Pa[ua][Ma]:ca[ua],V=null,y(!1))})}Ia&&(Ia=!1,mxEvent.addListener(fa,"scroll",function(ua){fa.scrollTop+fa.clientHeight>=fa.scrollHeight&&(y(),mxEvent.consume(ua))}));
+ra){var Ma=mxResources.get(ua);null==Ma&&(Ma=ua.substring(0,1).toUpperCase()+ua.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"&hellip;");return Ma+" ("+ra.length+")"}function oa(ua,ra,Ma){mxEvent.addListener(ra,"click",function(){qa!=ra&&(qa.style.backgroundColor="",qa=ra,qa.style.backgroundColor=C,fa.scrollTop=0,fa.innerText="",F=0,wa=Ma?Pa[ua][Ma]:ca[ua],V=null,y(!1))})}Ia&&(Ia=!1,mxEvent.addListener(fa,"scroll",function(ua){fa.scrollTop+fa.clientHeight>=fa.scrollHeight&&(y(),mxEvent.consume(ua))}));
if(0<Da){var sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,mxResources.get("custom"));Aa.appendChild(sa);for(var ma in La){var na=document.createElement("div"),Ea=ma;sa=La[ma];18<Ea.length&&(Ea=Ea.substring(0,18)+"&hellip;");na.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";na.setAttribute("title",
-Ea+" ("+sa.length+")");mxUtils.write(na,na.getAttribute("title"));null!=I&&(na.style.padding=I);Aa.appendChild(na);(function(ua,ra){mxEvent.addListener(na,"click",function(){qa!=ra&&(qa.style.backgroundColor="",qa=ra,qa.style.backgroundColor=C,fa.scrollTop=0,fa.innerText="",E=0,wa=La[ua],V=null,y(!1))})})(ma,na)}sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,"draw.io");Aa.appendChild(sa)}for(ma in ca){Ea=
+Ea+" ("+sa.length+")");mxUtils.write(na,na.getAttribute("title"));null!=I&&(na.style.padding=I);Aa.appendChild(na);(function(ua,ra){mxEvent.addListener(na,"click",function(){qa!=ra&&(qa.style.backgroundColor="",qa=ra,qa.style.backgroundColor=C,fa.scrollTop=0,fa.innerText="",F=0,wa=La[ua],V=null,y(!1))})})(ma,na)}sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,"draw.io");Aa.appendChild(sa)}for(ma in ca){Ea=
Pa[ma];var ja=na=document.createElement(Ea?"ul":"div");sa=ca[ma];var la=ka(ma,sa);if(null!=Ea){var pa=document.createElement("li"),xa=document.createElement("div");xa.className="geTempTreeCaret";xa.setAttribute("title",la);mxUtils.write(xa,la);ja=xa;pa.appendChild(xa);la=document.createElement("ul");la.className="geTempTreeNested";la.style.visibility="hidden";for(var Ba in Ea){var Fa=document.createElement("li"),Ca=ka(Ba,Ea[Ba]);Fa.setAttribute("title",Ca);mxUtils.write(Fa,Ca);oa(ma,Fa,Ba);la.appendChild(Fa)}pa.appendChild(la);
na.className="geTempTree";na.appendChild(pa);(function(ua,ra){mxEvent.addListener(ra,"click",function(){ua.style.visibility="visible";ua.classList.toggle("geTempTreeActive");ua.classList.toggle("geTempTreeNested")&&setTimeout(function(){ua.style.visibility="hidden"},550);ra.classList.toggle("geTempTreeCaret-down")})})(la,xa)}else na.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;",
-na.setAttribute("title",la),mxUtils.write(na,la);null!=I&&(na.style.padding=I);Aa.appendChild(na);null==qa&&0<sa.length&&(qa=na,qa.style.backgroundColor=C,wa=sa);oa(ma,ja)}y(!1)}var l=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);k=null!=k?k:!0;t=null!=t?t:!1;C=null!=C?C:"#ebf2f9";G=null!=G?G:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";H=null!=H?H:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";F=null!=F?F:EditorUi.templateFile;var q=document.createElement("div");
-q.style.userSelect="none";q.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";k&&q.appendChild(B);var J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="40px";J.style.height="40px";J.style.marginRight="10px";J.style.paddingBottom="4px";J.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
-IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||l||!k||B.appendChild(J);k&&mxUtils.write(B,(l?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");J=".drawio";
-b.mode==App.MODE_GOOGLE&&null!=b.drive?J=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?J=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?J=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?J=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?J=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(J=b.trello.extension);var M=document.createElement("input");M.setAttribute("value",b.defaultFilename+J);M.style.marginLeft="10px";M.style.width=f||
-l?"144px":"244px";this.init=function(){k&&(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null));null!=fa.parentNode&&null!=fa.parentNode.parentNode&&mxEvent.addGestureListeners(fa.parentNode.parentNode,mxUtils.bind(this,function(ka){b.sidebar.hideTooltip()}),null,null)};k&&(B.appendChild(M),v?M.style.width=f||l?"350px":"450px":(null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,M,b.editor.diagramFileTypes),v.style.marginLeft=
-"6px",v.style.width=f||l?"80px":"180px",B.appendChild(v)),null!=b.editor.fileExtensions&&(l=FilenameDialog.createTypeHint(b,M,b.editor.fileExtensions),l.style.marginTop="12px",B.appendChild(l))));B=!1;var E=0,K=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),P=mxUtils.button(n||mxResources.get("create"),function(){P.setAttribute("disabled","disabled");u();P.removeAttribute("disabled")});P.className="geBtn gePrimaryBtn";
-if(O||c){var R=[],V=null,X=null,m=null,z=function(ka){P.setAttribute("disabled","disabled");for(var oa=0;oa<R.length;oa++)R[oa].className=oa==ka?"geBtn gePrimaryBtn":"geBtn"};B=!0;n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="30px";q.appendChild(n);l=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Aa.style.display="";Y.style.display="";fa.style.left="160px";z(0);fa.scrollTop=0;fa.innerText="";E=0;V!=wa&&(wa=V,ca=X,Da=m,Aa.innerText="",U(),V=null)});
-R.push(l);n.appendChild(l);var L=function(ka){Aa.style.display="none";Y.style.display="none";fa.style.left="30px";z(ka?-1:1);null==V&&(V=wa);fa.scrollTop=0;fa.innerText="";K.spin(fa);var oa=function(sa,ma,na){E=0;K.stop();wa=sa;na=na||{};var Ea=0,ja;for(ja in na)Ea+=na[ja].length;if(ma)fa.innerText=ma;else if(0==sa.length&&0==Ea)fa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(fa.innerText="",0<Ea){Aa.style.display="";fa.style.left="160px";Aa.innerText="";Da=0;ca={"draw.io":sa};
+na.setAttribute("title",la),mxUtils.write(na,la);null!=I&&(na.style.padding=I);Aa.appendChild(na);null==qa&&0<sa.length&&(qa=na,qa.style.backgroundColor=C,wa=sa);oa(ma,ja)}y(!1)}var l=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);k=null!=k?k:!0;q=null!=q?q:!1;C=null!=C?C:"#ebf2f9";G=null!=G?G:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";H=null!=H?H:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";E=null!=E?E:EditorUi.templateFile;var u=document.createElement("div");
+u.style.userSelect="none";u.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";k&&u.appendChild(B);var J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="40px";J.style.height="40px";J.style.marginRight="10px";J.style.paddingBottom="4px";J.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";g||l||!k||B.appendChild(J);k&&mxUtils.write(B,(l?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");J=".drawio";
+b.mode==App.MODE_GOOGLE&&null!=b.drive?J=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?J=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?J=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?J=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?J=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(J=b.trello.extension);var M=document.createElement("input");M.setAttribute("value",b.defaultFilename+J);M.style.marginLeft="10px";M.style.width=g||
+l?"144px":"244px";this.init=function(){k&&(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null));null!=fa.parentNode&&null!=fa.parentNode.parentNode&&mxEvent.addGestureListeners(fa.parentNode.parentNode,mxUtils.bind(this,function(ka){b.sidebar.hideTooltip()}),null,null)};k&&(B.appendChild(M),t?M.style.width=g||l?"350px":"450px":(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,M,b.editor.diagramFileTypes),t.style.marginLeft=
+"6px",t.style.width=g||l?"80px":"180px",B.appendChild(t)),null!=b.editor.fileExtensions&&(l=FilenameDialog.createTypeHint(b,M,b.editor.fileExtensions),l.style.marginTop="12px",B.appendChild(l))));B=!1;var F=0,K=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),P=mxUtils.button(n||mxResources.get("create"),function(){P.setAttribute("disabled","disabled");v();P.removeAttribute("disabled")});P.className="geBtn gePrimaryBtn";
+if(O||c){var R=[],V=null,X=null,m=null,z=function(ka){P.setAttribute("disabled","disabled");for(var oa=0;oa<R.length;oa++)R[oa].className=oa==ka?"geBtn gePrimaryBtn":"geBtn"};B=!0;n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="30px";u.appendChild(n);l=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Aa.style.display="";Y.style.display="";fa.style.left="160px";z(0);fa.scrollTop=0;fa.innerText="";F=0;V!=wa&&(wa=V,ca=X,Da=m,Aa.innerText="",U(),V=null)});
+R.push(l);n.appendChild(l);var L=function(ka){Aa.style.display="none";Y.style.display="none";fa.style.left="30px";z(ka?-1:1);null==V&&(V=wa);fa.scrollTop=0;fa.innerText="";K.spin(fa);var oa=function(sa,ma,na){F=0;K.stop();wa=sa;na=na||{};var Ea=0,ja;for(ja in na)Ea+=na[ja].length;if(ma)fa.innerText=ma;else if(0==sa.length&&0==Ea)fa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(fa.innerText="",0<Ea){Aa.style.display="";fa.style.left="160px";Aa.innerText="";Da=0;ca={"draw.io":sa};
for(ja in na)ca[ja]=na[ja];U()}else y(!0)};ka?c(Q.value,oa):O(oa)};O&&(l=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),n.appendChild(l),R.push(l));if(c){l=document.createElement("span");l.style.marginLeft="10px";l.innerText=mxResources.get("search")+":";n.appendChild(l);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(ka){13==ka.keyCode&&L(!0)});n.appendChild(Q);l=mxUtils.button(mxResources.get("search"),
function(){L(!0)});l.className="geBtn";n.appendChild(l)}z(0)}var N=null,T=null,S=null,W=null,Z=null,ba=null,aa=null,fa=document.createElement("div");fa.style.border="1px solid #d3d3d3";fa.style.position="absolute";fa.style.left="160px";fa.style.right="34px";n=(k?72:40)+(B?30:0);fa.style.top=n+"px";fa.style.bottom="68px";fa.style.margin="6px 0 0 -1px";fa.style.padding="6px";fa.style.overflow="auto";var Y=document.createElement("div");Y.style.cssText="position:absolute;left:30px;width:128px;top:"+n+
"px;height:22px;margin-top: 6px;white-space: nowrap";var ia=document.createElement("input");ia.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ia.setAttribute("placeholder",mxResources.get("search"));ia.setAttribute("type","text");Y.appendChild(ia);var da=document.createElement("img"),va="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";da.setAttribute("src",va);da.setAttribute("title",mxResources.get("search"));
da.style.position="relative";da.style.left="-18px";da.style.top="1px";da.style.background="url('"+b.editor.transparentImage+"')";Y.appendChild(da);mxEvent.addListener(da,"click",function(){da.getAttribute("src")==Dialog.prototype.closeImage&&(da.setAttribute("src",va),da.setAttribute("title",mxResources.get("search")),ia.value="",null!=Na&&(Na.click(),Na=null));ia.focus()});mxEvent.addListener(ia,"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var oa=ia.value;if(""==oa)null!=Na&&(Na.click(),
-Na=null);else{if(null==NewDialog.tagsList[F]){var sa={};for(Ba in ca)for(var ma=ca[Ba],na=0;na<ma.length;na++){var Ea=ma[na];if(null!=Ea.tags)for(var ja=Ea.tags.toLowerCase().split(";"),la=0;la<ja.length;la++)null==sa[ja[la]]&&(sa[ja[la]]=[]),sa[ja[la]].push(Ea)}NewDialog.tagsList[F]=sa}var pa=oa.toLowerCase().split(" ");sa=NewDialog.tagsList[F];if(0<Da&&null==sa.__tagsList__){for(Ba in La)for(ma=La[Ba],na=0;na<ma.length;na++)for(Ea=ma[na],ja=Ea.title.split(" "),ja.push(Ba),la=0;la<ja.length;la++){var xa=
-ja[la].toLowerCase();null==sa[xa]&&(sa[xa]=[]);sa[xa].push(Ea)}sa.__tagsList__=!0}var Ba=[];ma={};for(na=ja=0;na<pa.length;na++)if(0<pa[na].length){xa=sa[pa[na]];var Fa={};Ba=[];if(null!=xa)for(la=0;la<xa.length;la++)Ea=xa[la],0==ja==(null==ma[Ea.url])&&(Fa[Ea.url]=!0,Ba.push(Ea));ma=Fa;ja++}fa.scrollTop=0;fa.innerText="";E=0;sa=document.createElement("div");sa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(sa,mxResources.get(0==Ba.length?"noResultsFor":
+Na=null);else{if(null==NewDialog.tagsList[E]){var sa={};for(Ba in ca)for(var ma=ca[Ba],na=0;na<ma.length;na++){var Ea=ma[na];if(null!=Ea.tags)for(var ja=Ea.tags.toLowerCase().split(";"),la=0;la<ja.length;la++)null==sa[ja[la]]&&(sa[ja[la]]=[]),sa[ja[la]].push(Ea)}NewDialog.tagsList[E]=sa}var pa=oa.toLowerCase().split(" ");sa=NewDialog.tagsList[E];if(0<Da&&null==sa.__tagsList__){for(Ba in La)for(ma=La[Ba],na=0;na<ma.length;na++)for(Ea=ma[na],ja=Ea.title.split(" "),ja.push(Ba),la=0;la<ja.length;la++){var xa=
+ja[la].toLowerCase();null==sa[xa]&&(sa[xa]=[]);sa[xa].push(Ea)}sa.__tagsList__=!0}var Ba=[];ma={};for(na=ja=0;na<pa.length;na++)if(0<pa[na].length){xa=sa[pa[na]];var Fa={};Ba=[];if(null!=xa)for(la=0;la<xa.length;la++)Ea=xa[la],0==ja==(null==ma[Ea.url])&&(Fa[Ea.url]=!0,Ba.push(Ea));ma=Fa;ja++}fa.scrollTop=0;fa.innerText="";F=0;sa=document.createElement("div");sa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(sa,mxResources.get(0==Ba.length?"noResultsFor":
"resultsFor",[oa]));fa.appendChild(sa);null!=qa&&null==Na&&(qa.style.backgroundColor="",Na=qa,qa=sa);wa=Ba;V=null;y(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(ia,"keyup",mxUtils.bind(this,function(ka){""==ia.value?(da.setAttribute("src",va),da.setAttribute("title",mxResources.get("search"))):(da.setAttribute("src",Dialog.prototype.closeImage),da.setAttribute("title",mxResources.get("reset")))}));n+=23;var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:30px;width:128px;top:"+
-n+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(fa,"scroll",function(){b.sidebar.hideTooltip()});var ya=140,ta=140,ca={},Pa={},La={},Da=0,Ia=!0,qa=null,Na=null;ca.basic=[{title:"blankDiagram",select:!0}];var wa=ca.basic;if(!f){var ha=function(){mxUtils.get(za,function(ka){if(!ea){ea=!0;ka=ka.getXml().documentElement.firstChild;for(var oa={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("clibs"==ka.nodeName){for(var sa=ka.getAttribute("name"),ma=
+n+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(fa,"scroll",function(){b.sidebar.hideTooltip()});var ya=140,ta=140,ca={},Pa={},La={},Da=0,Ia=!0,qa=null,Na=null;ca.basic=[{title:"blankDiagram",select:!0}];var wa=ca.basic;if(!g){var ha=function(){mxUtils.get(za,function(ka){if(!ea){ea=!0;ka=ka.getXml().documentElement.firstChild;for(var oa={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("clibs"==ka.nodeName){for(var sa=ka.getAttribute("name"),ma=
ka.getElementsByTagName("add"),na=[],Ea=0;Ea<ma.length;Ea++)na.push(encodeURIComponent(mxUtils.getTextContent(ma[Ea])));null!=sa&&0<na.length&&(oa[sa]=na.join(";"))}else if(na=ka.getAttribute("url"),null!=na){ma=ka.getAttribute("section");sa=ka.getAttribute("subsection");if(null==ma&&(Ea=na.indexOf("/"),ma=na.substring(0,Ea),null==sa)){var ja=na.indexOf("/",Ea+1);-1<ja&&(sa=na.substring(Ea+1,ja))}Ea=ca[ma];null==Ea&&(Ea=[],ca[ma]=Ea);na=ka.getAttribute("clibs");null!=oa[na]&&(na=oa[na]);na={url:ka.getAttribute("url"),
-libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:na,tags:ka.getAttribute("tags")};Ea.push(na);null!=sa&&(Ea=Pa[ma],null==Ea&&(Ea={},Pa[ma]=Ea),ma=Ea[sa],null==ma&&(ma=[],Ea[sa]=ma),ma.push(na))}ka=ka.nextSibling}K.stop();U()}})};q.appendChild(Y);q.appendChild(Aa);q.appendChild(fa);var ea=!1,za=F;/^https?:\/\//.test(za)&&!b.editor.isCorsEnabledForUrl(za)&&(za=PROXY_URL+"?url="+encodeURIComponent(za));
-K.spin(fa);null!=p?p(function(ka,oa){La=ka;m=Da=oa;ha()},ha):ha();X=ca}mxEvent.addListener(M,"keypress",function(ka){b.dialog.container.firstChild==q&&13==ka.keyCode&&u()});p=document.createElement("div");p.style.marginTop=f?"4px":"16px";p.style.textAlign="right";p.style.position="absolute";p.style.left="40px";p.style.bottom="24px";p.style.right="40px";f||b.isOffline()||!k||null!=d||t||(n=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-n.className="geBtn",p.appendChild(n));n=mxUtils.button(mxResources.get("cancel"),function(){null!=x&&x();b.hideDialog(!0)});n.className="geBtn";!b.editor.cancelFirst||t&&null==x||p.appendChild(n);f||"1"==urlParams.embed||t||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(oa){null!=oa&&0<oa.length&&b.editor.loadUrl(b.editor.getProxiedUrl(oa),function(sa){S=
-sa;N=null;templateRealURl=oa;b.hideDialog();u()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),f.className="geBtn",p.appendChild(f));Graph.fileSupport&&g&&(g=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(oa){b.openFiles(ka.files,!0);
-ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),g.className="geBtn",p.appendChild(g));p.appendChild(P);b.editor.cancelFirst||null!=d||t&&null==x||p.appendChild(n);q.appendChild(p);this.container=q};NewDialog.tagsList={};
-var CreateDialog=function(b,f,k,d,t,x,C,G,H,I,F,O,c,e,g,n,p){function v(B,J,M,E){function K(){mxEvent.addListener(P,"click",function(){var z=M;if(C){var L=D.value,Q=L.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>Q){z=null!=z?z:q.value;var N="";z==App.MODE_GOOGLE?N=b.drive.extension:z==App.MODE_GITHUB?N=b.gitHub.extension:z==App.MODE_GITLAB?N=b.gitLab.extension:z==App.MODE_TRELLO?N=b.trello.extension:z==App.MODE_DROPBOX?N=b.dropbox.extension:z==App.MODE_ONEDRIVE?N=b.oneDrive.extension:z==App.MODE_DEVICE&&
+libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:na,tags:ka.getAttribute("tags")};Ea.push(na);null!=sa&&(Ea=Pa[ma],null==Ea&&(Ea={},Pa[ma]=Ea),ma=Ea[sa],null==ma&&(ma=[],Ea[sa]=ma),ma.push(na))}ka=ka.nextSibling}K.stop();U()}})};u.appendChild(Y);u.appendChild(Aa);u.appendChild(fa);var ea=!1,za=E;/^https?:\/\//.test(za)&&!b.editor.isCorsEnabledForUrl(za)&&(za=PROXY_URL+"?url="+encodeURIComponent(za));
+K.spin(fa);null!=p?p(function(ka,oa){La=ka;m=Da=oa;ha()},ha):ha();X=ca}mxEvent.addListener(M,"keypress",function(ka){b.dialog.container.firstChild==u&&13==ka.keyCode&&v()});p=document.createElement("div");p.style.marginTop=g?"4px":"16px";p.style.textAlign="right";p.style.position="absolute";p.style.left="40px";p.style.bottom="24px";p.style.right="40px";g||b.isOffline()||!k||null!=d||q||(n=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+n.className="geBtn",p.appendChild(n));n=mxUtils.button(mxResources.get("cancel"),function(){null!=x&&x();b.hideDialog(!0)});n.className="geBtn";!b.editor.cancelFirst||q&&null==x||p.appendChild(n);g||"1"==urlParams.embed||q||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(g=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(oa){null!=oa&&0<oa.length&&b.editor.loadUrl(b.editor.getProxiedUrl(oa),function(sa){S=
+sa;N=null;templateRealURl=oa;b.hideDialog();v()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),g.className="geBtn",p.appendChild(g));Graph.fileSupport&&f&&(f=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(oa){b.openFiles(ka.files,!0);
+ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),f.className="geBtn",p.appendChild(f));p.appendChild(P);b.editor.cancelFirst||null!=d||q&&null==x||p.appendChild(n);u.appendChild(p);this.container=u};NewDialog.tagsList={};
+var CreateDialog=function(b,g,k,d,q,x,C,G,H,I,E,O,c,e,f,n,p){function t(B,J,M,F){function K(){mxEvent.addListener(P,"click",function(){var z=M;if(C){var L=D.value,Q=L.lastIndexOf(".");if(0>g.lastIndexOf(".")&&0>Q){z=null!=z?z:u.value;var N="";z==App.MODE_GOOGLE?N=b.drive.extension:z==App.MODE_GITHUB?N=b.gitHub.extension:z==App.MODE_GITLAB?N=b.gitLab.extension:z==App.MODE_TRELLO?N=b.trello.extension:z==App.MODE_DROPBOX?N=b.dropbox.extension:z==App.MODE_ONEDRIVE?N=b.oneDrive.extension:z==App.MODE_DEVICE&&
(N=".drawio");0<=Q&&(L=L.substring(0,Q));D.value=L+N}}y(M)})}var P=document.createElement("a");P.style.overflow="hidden";var R=document.createElement("img");R.src=B;R.setAttribute("border","0");R.setAttribute("align","absmiddle");R.style.width="60px";R.style.height="60px";R.style.paddingBottom="6px";P.style.display="inline-block";P.className="geBaseButton";P.style.position="relative";P.style.margin="4px";P.style.padding="8px 8px 10px 8px";P.style.whiteSpace="nowrap";P.appendChild(R);P.style.color=
-"gray";P.style.fontSize="11px";var V=document.createElement("div");P.appendChild(V);mxUtils.write(V,J);if(null!=E&&null==b[E]){R.style.visibility="hidden";mxUtils.setOpacity(V,10);var X=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});X.spin(P);var m=window.setTimeout(function(){null==b[E]&&(X.stop(),P.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[E]&&(window.clearTimeout(m),
-mxUtils.setOpacity(V,100),R.style.visibility="",X.stop(),K())}))}else K();U.appendChild(P);++l==O&&(mxUtils.br(U),l=0)}function y(B){var J=D.value;if(null==B||null!=J&&0<J.length)p&&b.hideDialog(),k(J,B,D)}F="1"==urlParams.noDevice?!1:F;C=null!=C?C:!0;G=null!=G?G:!0;O=null!=O?O:4;p=null!=p?p:!0;x=document.createElement("div");x.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(x);var u=document.createElement("h2");mxUtils.write(u,t||mxResources.get("create"));u.style.marginTop="0px";u.style.marginBottom=
-"24px";x.appendChild(u);mxUtils.write(x,mxResources.get("filename")+":");var D=document.createElement("input");D.setAttribute("value",f);D.style.width="200px";D.style.marginLeft="10px";D.style.marginBottom="20px";D.style.maxWidth="70%";this.init=function(){D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)};x.appendChild(D);null!=n&&(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),
-t.style.marginLeft="6px",t.style.width="90px",x.appendChild(t)),x.appendChild(FilenameDialog.createTypeHint(b,D,n)));n=null;if("1"!=urlParams.noDevice&&null!=c&&null!=e&&"image/"==e.substring(0,6)&&("image/svg"!=e.substring(0,9)||mxClient.IS_SVG)){D.style.width="160px";t=document.createElement("img");var A=g?c:btoa(unescape(encodeURIComponent(c)));t.setAttribute("src","data:"+e+";base64,"+A);t.style.position="absolute";t.style.top="70px";t.style.right="100px";t.style.maxWidth="120px";t.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(t.style,"transform","translate(50%,-50%)");x.appendChild(t);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=e||(n=mxUtils.button(mxResources.get("copy"),function(B){B=b.base64ToBlob(A,"image/png");B=new ClipboardItem({"image/png":B,"text/html":new Blob(['<img src="data:'+e+";base64,"+A+'">'],{type:"text/html"})});navigator.clipboard.write([B]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))}),
-n.style.marginTop="6px",n.className="geBtn");H&&Editor.popupsAllowed&&(t.style.cursor="pointer",mxEvent.addGestureListeners(t,null,null,function(B){mxEvent.isPopupTrigger(B)||y("_blank")}))}mxUtils.br(x);var U=document.createElement("div");U.style.textAlign="center";var l=0;U.style.marginTop="6px";x.appendChild(U);var q=document.createElement("select");q.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(c=document.createElement("option"),c.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(c,mxResources.get("googleDrive")),q.appendChild(c),v(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(c,mxResources.get("oneDrive")),q.appendChild(c),b.mode==App.MODE_ONEDRIVE&&c.setAttribute("selected","selected"),v(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
-"oneDrive")),"function"===typeof window.DropboxClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(c,mxResources.get("dropbox")),q.appendChild(c),b.mode==App.MODE_DROPBOX&&c.setAttribute("selected","selected"),v(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITHUB),mxUtils.write(c,mxResources.get("github")),q.appendChild(c),v(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITLAB),mxUtils.write(c,mxResources.get("gitlab")),q.appendChild(c),v(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_TRELLO),mxUtils.write(c,mxResources.get("trello")),q.appendChild(c),v(IMAGE_PATH+"/trello-logo.svg",
-mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)c=document.createElement("option"),c.setAttribute("value",App.MODE_DEVICE),mxUtils.write(c,mxResources.get("device")),q.appendChild(c),b.mode!=App.MODE_DEVICE&&G||c.setAttribute("selected","selected"),F&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);G&&isLocalStorage&&"0"!=urlParams.browser&&(G=document.createElement("option"),
-G.setAttribute("value",App.MODE_BROWSER),mxUtils.write(G,mxResources.get("browser")),q.appendChild(G),b.mode==App.MODE_BROWSER&&G.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));G=document.createElement("div");G.style.marginTop="26px";G.style.textAlign="center";null!=I&&(F=mxUtils.button(mxResources.get("help"),function(){b.openLink(I)}),F.className="geBtn",G.appendChild(F));F=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),
-function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});F.className="geBtn";b.editor.cancelFirst&&null==d&&G.appendChild(F);null==d&&(c=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),c.className="geBtn",G.appendChild(c));H&&Editor.popupsAllowed&&(H=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),H.className="geBtn",G.appendChild(H));CreateDialog.showDownloadButton&&(H=mxUtils.button(mxResources.get("download"),
-function(){y("download")}),H.className="geBtn",G.appendChild(H),null!=n&&(H.style.marginTop="6px",G.style.marginTop="6px"));null!=n&&(mxUtils.br(G),G.appendChild(n));b.editor.cancelFirst&&null==d||G.appendChild(F);mxEvent.addListener(D,"keypress",function(B){13==B.keyCode?y(App.MODE_DEVICE):27==B.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});x.appendChild(G);this.container=x};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,f,k,d,t){t=null!=t?t:!0;var x=document.createElement("div");x.style.textAlign="left";x.style.height="100%";mxUtils.write(x,mxResources.get("fileOpenLocation"));mxUtils.br(x);mxUtils.br(x);var C=mxUtils.button(mxResources.get("openInThisWindow"),function(){t&&b.hideDialog();null!=d&&d()});C.className="geBtn";C.style.marginBottom="8px";C.style.width="280px";x.appendChild(C);mxUtils.br(x);var G=mxUtils.button(mxResources.get("openInNewWindow"),function(){t&&b.hideDialog();
-null!=k&&k();b.openLink(f,null,!0)});G.className="geBtn gePrimaryBtn";G.style.width=C.style.width;x.appendChild(G);mxUtils.br(x);mxUtils.br(x);mxUtils.write(x,mxResources.get("allowPopups"));this.container=x},ImageDialog=function(b,f,k,d,t,x,C,G){function H(){0<O.value.length?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}x=null!=x?x:!0;var I=b.editor.graph,F=document.createElement("div");mxUtils.write(F,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor=
-"transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var O=document.createElement("input");O.setAttribute("value",k);O.setAttribute("type","text");O.setAttribute("spellcheck","false");O.setAttribute("autocorrect","off");O.setAttribute("autocomplete","off");O.setAttribute("autocapitalize","off");O.style.marginTop="6px";O.style.width=(Graph.fileSupport?460:340)-20+"px";O.style.backgroundImage="url('"+
+"gray";P.style.fontSize="11px";var V=document.createElement("div");P.appendChild(V);mxUtils.write(V,J);if(null!=F&&null==b[F]){R.style.visibility="hidden";mxUtils.setOpacity(V,10);var X=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});X.spin(P);var m=window.setTimeout(function(){null==b[F]&&(X.stop(),P.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[F]&&(window.clearTimeout(m),
+mxUtils.setOpacity(V,100),R.style.visibility="",X.stop(),K())}))}else K();U.appendChild(P);++l==O&&(mxUtils.br(U),l=0)}function y(B){var J=D.value;if(null==B||null!=J&&0<J.length)p&&b.hideDialog(),k(J,B,D)}E="1"==urlParams.noDevice?!1:E;C=null!=C?C:!0;G=null!=G?G:!0;O=null!=O?O:4;p=null!=p?p:!0;x=document.createElement("div");x.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(x);var v=document.createElement("h2");mxUtils.write(v,q||mxResources.get("create"));v.style.marginTop="0px";v.style.marginBottom=
+"24px";x.appendChild(v);mxUtils.write(x,mxResources.get("filename")+":");var D=document.createElement("input");D.setAttribute("value",g);D.style.width="200px";D.style.marginLeft="10px";D.style.marginBottom="20px";D.style.maxWidth="70%";this.init=function(){D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)};x.appendChild(D);null!=n&&(null!=b.editor.diagramFileTypes&&(q=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),
+q.style.marginLeft="6px",q.style.width="90px",x.appendChild(q)),x.appendChild(FilenameDialog.createTypeHint(b,D,n)));n=null;if("1"!=urlParams.noDevice&&null!=c&&null!=e&&"image/"==e.substring(0,6)&&("image/svg"!=e.substring(0,9)||mxClient.IS_SVG)){D.style.width="160px";q=document.createElement("img");var A=f?c:btoa(unescape(encodeURIComponent(c)));q.setAttribute("src","data:"+e+";base64,"+A);q.style.position="absolute";q.style.top="70px";q.style.right="100px";q.style.maxWidth="120px";q.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(q.style,"transform","translate(50%,-50%)");x.appendChild(q);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=e||(n=mxUtils.button(mxResources.get("copy"),function(B){B=b.base64ToBlob(A,"image/png");B=new ClipboardItem({"image/png":B,"text/html":new Blob(['<img src="data:'+e+";base64,"+A+'">'],{type:"text/html"})});navigator.clipboard.write([B]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))}),
+n.style.marginTop="6px",n.className="geBtn");H&&Editor.popupsAllowed&&(q.style.cursor="pointer",mxEvent.addGestureListeners(q,null,null,function(B){mxEvent.isPopupTrigger(B)||y("_blank")}))}mxUtils.br(x);var U=document.createElement("div");U.style.textAlign="center";var l=0;U.style.marginTop="6px";x.appendChild(U);var u=document.createElement("select");u.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(c=document.createElement("option"),c.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(c,mxResources.get("googleDrive")),u.appendChild(c),t(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(c,mxResources.get("oneDrive")),u.appendChild(c),b.mode==App.MODE_ONEDRIVE&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
+"oneDrive")),"function"===typeof window.DropboxClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(c,mxResources.get("dropbox")),u.appendChild(c),b.mode==App.MODE_DROPBOX&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITHUB),mxUtils.write(c,mxResources.get("github")),u.appendChild(c),t(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITLAB),mxUtils.write(c,mxResources.get("gitlab")),u.appendChild(c),t(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_TRELLO),mxUtils.write(c,mxResources.get("trello")),u.appendChild(c),t(IMAGE_PATH+"/trello-logo.svg",
+mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)c=document.createElement("option"),c.setAttribute("value",App.MODE_DEVICE),mxUtils.write(c,mxResources.get("device")),u.appendChild(c),b.mode!=App.MODE_DEVICE&&G||c.setAttribute("selected","selected"),E&&t(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);G&&isLocalStorage&&"0"!=urlParams.browser&&(G=document.createElement("option"),
+G.setAttribute("value",App.MODE_BROWSER),mxUtils.write(G,mxResources.get("browser")),u.appendChild(G),b.mode==App.MODE_BROWSER&&G.setAttribute("selected","selected"),t(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));G=document.createElement("div");G.style.marginTop="26px";G.style.textAlign="center";null!=I&&(E=mxUtils.button(mxResources.get("help"),function(){b.openLink(I)}),E.className="geBtn",G.appendChild(E));E=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),
+function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});E.className="geBtn";b.editor.cancelFirst&&null==d&&G.appendChild(E);null==d&&(c=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),c.className="geBtn",G.appendChild(c));H&&Editor.popupsAllowed&&(H=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),H.className="geBtn",G.appendChild(H));CreateDialog.showDownloadButton&&(H=mxUtils.button(mxResources.get("download"),
+function(){y("download")}),H.className="geBtn",G.appendChild(H),null!=n&&(H.style.marginTop="6px",G.style.marginTop="6px"));null!=n&&(mxUtils.br(G),G.appendChild(n));b.editor.cancelFirst&&null==d||G.appendChild(E);mxEvent.addListener(D,"keypress",function(B){13==B.keyCode?y(App.MODE_DEVICE):27==B.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});x.appendChild(G);this.container=x};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,g,k,d,q){q=null!=q?q:!0;var x=document.createElement("div");x.style.textAlign="left";x.style.height="100%";mxUtils.write(x,mxResources.get("fileOpenLocation"));mxUtils.br(x);mxUtils.br(x);var C=mxUtils.button(mxResources.get("openInThisWindow"),function(){q&&b.hideDialog();null!=d&&d()});C.className="geBtn";C.style.marginBottom="8px";C.style.width="280px";x.appendChild(C);mxUtils.br(x);var G=mxUtils.button(mxResources.get("openInNewWindow"),function(){q&&b.hideDialog();
+null!=k&&k();b.openLink(g,null,!0)});G.className="geBtn gePrimaryBtn";G.style.width=C.style.width;x.appendChild(G);mxUtils.br(x);mxUtils.br(x);mxUtils.write(x,mxResources.get("allowPopups"));this.container=x},ImageDialog=function(b,g,k,d,q,x,C,G){function H(){0<O.value.length?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}x=null!=x?x:!0;var I=b.editor.graph,E=document.createElement("div");mxUtils.write(E,g);g=document.createElement("div");g.className="geTitle";g.style.backgroundColor=
+"transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";g.style.paddingRight="20px";var O=document.createElement("input");O.setAttribute("value",k);O.setAttribute("type","text");O.setAttribute("spellcheck","false");O.setAttribute("autocorrect","off");O.setAttribute("autocomplete","off");O.setAttribute("autocapitalize","off");O.style.marginTop="6px";O.style.width=(Graph.fileSupport?460:340)-20+"px";O.style.backgroundImage="url('"+
Dialog.prototype.clearImage+"')";O.style.backgroundRepeat="no-repeat";O.style.backgroundPosition="100% 50%";O.style.paddingRight="14px";k=document.createElement("div");k.setAttribute("title",mxResources.get("reset"));k.style.position="relative";k.style.left="-16px";k.style.width="12px";k.style.height="14px";k.style.cursor="pointer";k.style.display="inline-block";k.style.top="3px";k.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(k,"click",function(){O.value="";O.focus()});
-f.appendChild(O);f.appendChild(k);F.appendChild(f);var c=G,e,g,n=function(u,D,A,U){var l="data:"==u.substring(0,5);!b.isOffline()||l&&"undefined"===typeof chrome?0<u.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(u,function(q){b.spinner.stop();b.hideDialog();var B=!1===U?1:null!=D&&null!=A?Math.max(D/q.width,A/q.height):Math.min(1,Math.min(520/q.width,520/q.height));x&&(u=b.convertDataUri(u));d(u,Math.round(Number(q.width)*B),Math.round(Number(q.height)*B),c,e,g)},
-function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(u,null,null,c,e,g)):(u=b.convertDataUri(u),D=null==D?120:D,A=null==A?100:A,b.hideDialog(),d(u,D,A,c,e,g))},p=function(u,D){if(null!=u){var A=t?null:I.getModel().getGeometry(I.getSelectionCell());null!=A?n(u,A.width,A.height,D):n(u,null,null,D)}else b.hideDialog(),d(null)};this.init=function(){O.focus();if(Graph.fileSupport){O.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var u=F.parentNode,D=null;mxEvent.addListener(u,"dragleave",function(A){null!=D&&(D.parentNode.removeChild(D),D=null);A.stopPropagation();A.preventDefault()});mxEvent.addListener(u,"dragover",mxUtils.bind(this,function(A){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=b.highlightElement(u));A.stopPropagation();A.preventDefault()}));mxEvent.addListener(u,"drop",mxUtils.bind(this,function(A){null!=D&&(D.parentNode.removeChild(D),D=null);if(0<A.dataTransfer.files.length)b.importFiles(A.dataTransfer.files,
-0,0,b.maxImageSize,function(l,q,B,J,M,E,K,P){p(l,P)},function(){},function(l){return"image/"==l.type.substring(0,6)},function(l){for(var q=0;q<l.length;q++)l[q]()},!mxEvent.isControlDown(A),null,null,!0);else if(0<=mxUtils.indexOf(A.dataTransfer.types,"text/uri-list")){var U=A.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&p(decodeURIComponent(U))}A.stopPropagation();A.preventDefault()}),!1)}};G=document.createElement("div");G.style.marginTop="14px";G.style.textAlign=
-"center";k=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&G.appendChild(k);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&&(O.value=u.url));O.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var v=document.createElement("input");v.setAttribute("multiple","multiple");v.setAttribute("type",
-"file");mxEvent.addListener(v,"change",function(u){null!=v.files&&(b.importFiles(v.files,0,0,b.maxImageSize,function(D,A,U,l,q,B){p(D)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var A=0;A<D.length;A++)D[A]()},!0),v.type="",v.type="file",v.value="")});v.style.display="none";document.body.appendChild(v);b.imgDlgFileInputElt=v}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";G.appendChild(f)}mxEvent.addListener(O,
-"keypress",function(u){13==u.keyCode&&p(O.value)});var y=mxUtils.button(mxResources.get("crop"),function(){var u=new CropImageDialog(b,O.value,c,function(D,A,U){c=D;e=A;g=U});b.showDialog(u.container,300,390,!0,!0)});C&&(y.className="geBtn",G.appendChild(y));mxEvent.addListener(O,"change",function(u){c=null;H()});H();C=mxUtils.button(mxResources.get("apply"),function(){p(O.value)});C.className="geBtn gePrimaryBtn";G.appendChild(C);b.editor.cancelFirst||G.appendChild(k);Graph.fileSupport&&(G.style.marginTop=
-"120px",F.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",F.style.backgroundPosition="center 65%",F.style.backgroundRepeat="no-repeat",C=document.createElement("div"),C.style.position="absolute",C.style.width="420px",C.style.top="58%",C.style.textAlign="center",C.style.fontSize="18px",C.style.color="#a0c3ff",mxUtils.write(C,mxResources.get("dragImagesHere")),F.appendChild(C));F.appendChild(G);this.container=F},LinkDialog=function(b,f,k,d,t,x,C){function G(u,D,A){A=mxUtils.button("",A);
-A.className="geBtn";A.setAttribute("title",D);D=document.createElement("img");D.style.height="26px";D.style.width="26px";D.setAttribute("src",u);A.style.minWidth="42px";A.style.verticalAlign="middle";A.appendChild(D);y.appendChild(A)}var H=document.createElement("div");H.style.height="100%";mxUtils.write(H,mxResources.get("editLink")+":");var I=document.createElement("div");I.className="geTitle";I.style.backgroundColor="transparent";I.style.borderColor="transparent";I.style.whiteSpace="nowrap";I.style.textOverflow=
-"clip";I.style.cursor="default";I.style.paddingRight="20px";var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("dragUrlsHere"));F.setAttribute("type","text");F.style.marginTop="6px";F.style.width="97%";F.style.boxSizing="border-box";F.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";F.style.backgroundRepeat="no-repeat";F.style.backgroundPosition="100% 50%";F.style.paddingRight="14px";F.style.marginBottom="4px";var O=document.createElement("div");O.setAttribute("title",
-mxResources.get("reset"));O.style.position="relative";O.style.left="-16px";O.style.width="12px";O.style.height="14px";O.style.cursor="pointer";O.style.display="inline-block";O.style.top="3px";O.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(O,"click",function(){F.value="";F.focus()});var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geLinkDialogOption");
-var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","geLinkDialogOption");var g=document.createElement("select");g.style.width="520px";var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.margin="0 6p 0 6px";null!=C&&(n.setAttribute("checked","checked"),n.defaultChecked=!0);C=null!=C?C:"_blank";n.setAttribute("title",C);x&&(F.style.width="340px");if(t&&
-null!=b.pages){null!=f&&Graph.isPageLink(f)?(e.setAttribute("checked","checked"),e.defaultChecked=!0):(F.setAttribute("value",f),c.setAttribute("checked","checked"),c.defaultChecked=!0);I.appendChild(c);I.appendChild(F);I.appendChild(O);x&&(I.appendChild(n),mxUtils.write(I,mxResources.get("openInNewWindow")));mxUtils.br(I);I.appendChild(e);t=!1;for(x=0;x<b.pages.length;x++)O=document.createElement("option"),mxUtils.write(O,b.pages[x].getName()||mxResources.get("pageWithNumber",[x+1])),O.setAttribute("value",
-"data:page/id,"+b.pages[x].getId()),f==O.getAttribute("value")&&(O.setAttribute("selected","selected"),t=!0),g.appendChild(O);if(!t&&e.checked){var p=document.createElement("option");mxUtils.write(p,mxResources.get("pageNotFound"));p.setAttribute("disabled","disabled");p.setAttribute("selected","selected");p.setAttribute("value","pageNotFound");g.appendChild(p);mxEvent.addListener(g,"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)})}I.appendChild(g)}else F.setAttribute("value",
-f),I.appendChild(F),I.appendChild(O);H.appendChild(I);var v=mxUtils.button(k,function(){b.hideDialog();d(e.checked?"pageNotFound"!==g.value?g.value:f:F.value,LinkDialog.selectedDocs,n.checked?C:null)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){e.checked?g.focus():(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(g,"focus",function(){c.removeAttribute("checked");e.setAttribute("checked",
-"checked");e.checked=!0});mxEvent.addListener(F,"focus",function(){e.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});if(Graph.fileSupport){var u=H.parentNode,D=null;mxEvent.addListener(u,"dragleave",function(A){null!=D&&(D.parentNode.removeChild(D),D=null);A.stopPropagation();A.preventDefault()});mxEvent.addListener(u,"dragover",mxUtils.bind(this,function(A){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=b.highlightElement(u));A.stopPropagation();A.preventDefault()}));
-mxEvent.addListener(u,"drop",mxUtils.bind(this,function(A){null!=D&&(D.parentNode.removeChild(D),D=null);0<=mxUtils.indexOf(A.dataTransfer.types,"text/uri-list")&&(F.value=decodeURIComponent(A.dataTransfer.getData("text/uri-list")),c.setAttribute("checked","checked"),c.checked=!0,v.click());A.stopPropagation();A.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="18px";y.style.textAlign="center";k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
-k.style.verticalAlign="middle";k.className="geBtn";y.appendChild(k);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(k.style.display="none");k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.style.verticalAlign="middle";k.className="geBtn";b.editor.cancelFirst&&y.appendChild(k);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(u){if(u.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=u.docs;var D=u.docs[0].url;"application/mxe"==u.docs[0].mimeType||null!=u.docs[0].mimeType&&
-"application/vnd.jgraph."==u.docs[0].mimeType.substring(0,23)?D="https://www.draw.io/#G"+u.docs[0].id:"application/vnd.google-apps.folder"==u.docs[0].mimeType&&(D="https://drive.google.com/#folders/"+u.docs[0].id);F.value=D;F.focus()}else LinkDialog.selectedDocs=null;F.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&G(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 u=b.drive.createLinkPicker();b.linkPicker=u.setCallback(function(D){LinkDialog.filePicked(D)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&G(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(u){F.value=u[0].link;F.focus()}})});null!=b.oneDrive&&G(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(u,D){F.value=D.value[0].webUrl;F.focus()},!0)});null!=b.gitHub&&G(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(u){if(null!=u){u=u.split("/");var D=u[0],A=u[1],U=u[2];u=u.slice(3,u.length).join("/");F.value="https://github.com/"+D+"/"+A+"/blob/"+U+"/"+u;F.focus()}})});null!=b.gitLab&&G(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(u){if(null!=u){u=u.split("/");var D=
-u[0],A=u[1],U=u[2];u=u.slice(3,u.length).join("/");F.value=DRAWIO_GITLAB_URL+"/"+D+"/"+A+"/blob/"+U+"/"+u;F.focus()}})});mxEvent.addListener(F,"keypress",function(u){13==u.keyCode&&(b.hideDialog(),d(e.checked?g.value:F.value,LinkDialog.selectedDocs))});y.appendChild(v);b.editor.cancelFirst||y.appendChild(k);H.appendChild(y);this.container=H},FeedbackDialog=function(b,f,k,d){var t=document.createElement("div"),x=document.createElement("div");mxUtils.write(x,mxResources.get("sendYourFeedback"));x.style.fontSize=
-"18px";x.style.marginBottom="18px";t.appendChild(x);x=document.createElement("div");mxUtils.write(x,mxResources.get("yourEmailAddress")+(k?"":" ("+mxResources.get("required")+")"));t.appendChild(x);var C=document.createElement("input");C.setAttribute("type","text");C.style.marginTop="6px";C.style.width="600px";var G=mxUtils.button(mxResources.get("sendMessage"),function(){var O=F.value+(I.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
-"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;O.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(C.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+
+g.appendChild(O);g.appendChild(k);E.appendChild(g);var c=G,e,f,n=function(v,D,A,U){var l="data:"==v.substring(0,5);!b.isOffline()||l&&"undefined"===typeof chrome?0<v.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(v,function(u){b.spinner.stop();b.hideDialog();var B=!1===U?1:null!=D&&null!=A?Math.max(D/u.width,A/u.height):Math.min(1,Math.min(520/u.width,520/u.height));x&&(v=b.convertDataUri(v));d(v,Math.round(Number(u.width)*B),Math.round(Number(u.height)*B),c,e,f)},
+function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(v,null,null,c,e,f)):(v=b.convertDataUri(v),D=null==D?120:D,A=null==A?100:A,b.hideDialog(),d(v,D,A,c,e,f))},p=function(v,D){if(null!=v){var A=q?null:I.getModel().getGeometry(I.getSelectionCell());null!=A?n(v,A.width,A.height,D):n(v,null,null,D)}else b.hideDialog(),d(null)};this.init=function(){O.focus();if(Graph.fileSupport){O.setAttribute("placeholder",
+mxResources.get("dragImagesHere"));var v=E.parentNode,D=null;mxEvent.addListener(v,"dragleave",function(A){null!=D&&(D.parentNode.removeChild(D),D=null);A.stopPropagation();A.preventDefault()});mxEvent.addListener(v,"dragover",mxUtils.bind(this,function(A){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=b.highlightElement(v));A.stopPropagation();A.preventDefault()}));mxEvent.addListener(v,"drop",mxUtils.bind(this,function(A){null!=D&&(D.parentNode.removeChild(D),D=null);if(0<A.dataTransfer.files.length)b.importFiles(A.dataTransfer.files,
+0,0,b.maxImageSize,function(l,u,B,J,M,F,K,P){p(l,P)},function(){},function(l){return"image/"==l.type.substring(0,6)},function(l){for(var u=0;u<l.length;u++)l[u]()},!mxEvent.isControlDown(A),null,null,!0);else if(0<=mxUtils.indexOf(A.dataTransfer.types,"text/uri-list")){var U=A.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&p(decodeURIComponent(U))}A.stopPropagation();A.preventDefault()}),!1)}};G=document.createElement("div");G.style.marginTop="14px";G.style.textAlign=
+"center";k=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&G.appendChild(k);ImageDialog.filePicked=function(v){v.action==google.picker.Action.PICKED&&null!=v.docs[0].thumbnails&&(v=v.docs[0].thumbnails[v.docs[0].thumbnails.length-1],null!=v&&(O.value=v.url));O.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var t=document.createElement("input");t.setAttribute("multiple","multiple");t.setAttribute("type",
+"file");mxEvent.addListener(t,"change",function(v){null!=t.files&&(b.importFiles(t.files,0,0,b.maxImageSize,function(D,A,U,l,u,B){p(D)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var A=0;A<D.length;A++)D[A]()},!0),t.type="",t.type="file",t.value="")});t.style.display="none";document.body.appendChild(t);b.imgDlgFileInputElt=t}g=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});g.className="geBtn";G.appendChild(g)}mxEvent.addListener(O,
+"keypress",function(v){13==v.keyCode&&p(O.value)});var y=mxUtils.button(mxResources.get("crop"),function(){var v=new CropImageDialog(b,O.value,c,function(D,A,U){c=D;e=A;f=U});b.showDialog(v.container,300,390,!0,!0)});C&&(y.className="geBtn",G.appendChild(y));mxEvent.addListener(O,"change",function(v){c=null;H()});H();C=mxUtils.button(mxResources.get("apply"),function(){p(O.value)});C.className="geBtn gePrimaryBtn";G.appendChild(C);b.editor.cancelFirst||G.appendChild(k);Graph.fileSupport&&(G.style.marginTop=
+"120px",E.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",E.style.backgroundPosition="center 65%",E.style.backgroundRepeat="no-repeat",C=document.createElement("div"),C.style.position="absolute",C.style.width="420px",C.style.top="58%",C.style.textAlign="center",C.style.fontSize="18px",C.style.color="#a0c3ff",mxUtils.write(C,mxResources.get("dragImagesHere")),E.appendChild(C));E.appendChild(G);this.container=E},LinkDialog=function(b,g,k,d,q,x,C){function G(v,D,A){A=mxUtils.button("",A);
+A.className="geBtn";A.setAttribute("title",D);D=document.createElement("img");D.style.height="26px";D.style.width="26px";D.setAttribute("src",v);A.style.minWidth="42px";A.style.verticalAlign="middle";A.appendChild(D);y.appendChild(A)}var H=document.createElement("div");H.style.height="100%";mxUtils.write(H,mxResources.get("editLink")+":");var I=document.createElement("div");I.className="geTitle";I.style.backgroundColor="transparent";I.style.borderColor="transparent";I.style.whiteSpace="nowrap";I.style.textOverflow=
+"clip";I.style.cursor="default";I.style.paddingRight="20px";var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("dragUrlsHere"));E.setAttribute("type","text");E.style.marginTop="6px";E.style.width="97%";E.style.boxSizing="border-box";E.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";E.style.backgroundRepeat="no-repeat";E.style.backgroundPosition="100% 50%";E.style.paddingRight="14px";E.style.marginBottom="4px";var O=document.createElement("div");O.setAttribute("title",
+mxResources.get("reset"));O.style.position="relative";O.style.left="-16px";O.style.width="12px";O.style.height="14px";O.style.cursor="pointer";O.style.display="inline-block";O.style.top="3px";O.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(O,"click",function(){E.value="";E.focus()});var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geLinkDialogOption");
+var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","geLinkDialogOption");var f=document.createElement("select");f.style.width="520px";var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.margin="0 6p 0 6px";null!=C&&(n.setAttribute("checked","checked"),n.defaultChecked=!0);C=null!=C?C:"_blank";n.setAttribute("title",C);x&&(E.style.width="340px");if(q&&
+null!=b.pages){null!=g&&Graph.isPageLink(g)?(e.setAttribute("checked","checked"),e.defaultChecked=!0):(E.setAttribute("value",g),c.setAttribute("checked","checked"),c.defaultChecked=!0);I.appendChild(c);I.appendChild(E);I.appendChild(O);x&&(I.appendChild(n),mxUtils.write(I,mxResources.get("openInNewWindow")));mxUtils.br(I);I.appendChild(e);q=!1;for(x=0;x<b.pages.length;x++)O=document.createElement("option"),mxUtils.write(O,b.pages[x].getName()||mxResources.get("pageWithNumber",[x+1])),O.setAttribute("value",
+"data:page/id,"+b.pages[x].getId()),g==O.getAttribute("value")&&(O.setAttribute("selected","selected"),q=!0),f.appendChild(O);if(!q&&e.checked){var p=document.createElement("option");mxUtils.write(p,mxResources.get("pageNotFound"));p.setAttribute("disabled","disabled");p.setAttribute("selected","selected");p.setAttribute("value","pageNotFound");f.appendChild(p);mxEvent.addListener(f,"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)})}I.appendChild(f)}else E.setAttribute("value",
+g),I.appendChild(E),I.appendChild(O);H.appendChild(I);var t=mxUtils.button(k,function(){b.hideDialog();d(e.checked?"pageNotFound"!==f.value?f.value:g:E.value,LinkDialog.selectedDocs,n.checked?C:null)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){e.checked?f.focus():(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(f,"focus",function(){c.removeAttribute("checked");e.setAttribute("checked",
+"checked");e.checked=!0});mxEvent.addListener(E,"focus",function(){e.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});if(Graph.fileSupport){var v=H.parentNode,D=null;mxEvent.addListener(v,"dragleave",function(A){null!=D&&(D.parentNode.removeChild(D),D=null);A.stopPropagation();A.preventDefault()});mxEvent.addListener(v,"dragover",mxUtils.bind(this,function(A){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=b.highlightElement(v));A.stopPropagation();A.preventDefault()}));
+mxEvent.addListener(v,"drop",mxUtils.bind(this,function(A){null!=D&&(D.parentNode.removeChild(D),D=null);0<=mxUtils.indexOf(A.dataTransfer.types,"text/uri-list")&&(E.value=decodeURIComponent(A.dataTransfer.getData("text/uri-list")),c.setAttribute("checked","checked"),c.checked=!0,t.click());A.stopPropagation();A.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="18px";y.style.textAlign="center";k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
+k.style.verticalAlign="middle";k.className="geBtn";y.appendChild(k);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(k.style.display="none");k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.style.verticalAlign="middle";k.className="geBtn";b.editor.cancelFirst&&y.appendChild(k);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(v){if(v.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=v.docs;var D=v.docs[0].url;"application/mxe"==v.docs[0].mimeType||null!=v.docs[0].mimeType&&
+"application/vnd.jgraph."==v.docs[0].mimeType.substring(0,23)?D="https://www.draw.io/#G"+v.docs[0].id:"application/vnd.google-apps.folder"==v.docs[0].mimeType&&(D="https://drive.google.com/#folders/"+v.docs[0].id);E.value=D;E.focus()}else LinkDialog.selectedDocs=null;E.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&G(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 v=b.drive.createLinkPicker();b.linkPicker=v.setCallback(function(D){LinkDialog.filePicked(D)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&G(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(v){E.value=v[0].link;E.focus()}})});null!=b.oneDrive&&G(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+function(){b.oneDrive.pickFile(function(v,D){E.value=D.value[0].webUrl;E.focus()},!0)});null!=b.gitHub&&G(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(v){if(null!=v){v=v.split("/");var D=v[0],A=v[1],U=v[2];v=v.slice(3,v.length).join("/");E.value="https://github.com/"+D+"/"+A+"/blob/"+U+"/"+v;E.focus()}})});null!=b.gitLab&&G(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(v){if(null!=v){v=v.split("/");var D=
+v[0],A=v[1],U=v[2];v=v.slice(3,v.length).join("/");E.value=DRAWIO_GITLAB_URL+"/"+D+"/"+A+"/blob/"+U+"/"+v;E.focus()}})});mxEvent.addListener(E,"keypress",function(v){13==v.keyCode&&(b.hideDialog(),d(e.checked?f.value:E.value,LinkDialog.selectedDocs))});y.appendChild(t);b.editor.cancelFirst||y.appendChild(k);H.appendChild(y);this.container=H},FeedbackDialog=function(b,g,k,d){var q=document.createElement("div"),x=document.createElement("div");mxUtils.write(x,mxResources.get("sendYourFeedback"));x.style.fontSize=
+"18px";x.style.marginBottom="18px";q.appendChild(x);x=document.createElement("div");mxUtils.write(x,mxResources.get("yourEmailAddress")+(k?"":" ("+mxResources.get("required")+")"));q.appendChild(x);var C=document.createElement("input");C.setAttribute("type","text");C.style.marginTop="6px";C.style.width="600px";var G=mxUtils.button(mxResources.get("sendMessage"),function(){var O=E.value+(I.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;O.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(C.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=g?g:"Feedback")+
":\n"+O),function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});G.className="geBtn gePrimaryBtn";if(!k){G.setAttribute("disabled","disabled");var H=/^(([^<>()[\]\\.,;:\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(C,
-"change",function(){0<C.value.length&&0<H.test(C.value)?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")});mxEvent.addListener(C,"keyup",function(){0<C.value.length&&H.test(C.value)?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")})}t.appendChild(C);this.init=function(){C.focus()};var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("checked","checked");I.defaultChecked=!0;k=document.createElement("p");k.style.marginTop="14px";
-k.appendChild(I);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("includeCopyOfMyDiagram"));k.appendChild(x);mxEvent.addListener(x,"click",function(O){I.checked=!I.checked;mxEvent.consume(O)});t.appendChild(k);x=document.createElement("div");mxUtils.write(x,mxResources.get("feedback"));t.appendChild(x);var F=document.createElement("textarea");F.style.resize="none";F.style.width="600px";F.style.height="140px";F.style.marginTop="6px";F.setAttribute("placeholder",mxResources.get("comments"));
-t.appendChild(F);k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst?(k.appendChild(x),k.appendChild(G)):(k.appendChild(G),k.appendChild(x));t.appendChild(k);this.container=t};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(b,f,k){var d=document.createElement("div"),t=document.createElement("h3");t.style.marginTop="0px";mxUtils.write(t,mxResources.get("revisionHistory"));d.appendChild(t);t=document.createElement("div");t.style.position="absolute";t.style.overflow="auto";t.style.width="170px";t.style.height="378px";d.appendChild(t);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";x.style.left="199px";x.style.width="470px";x.style.height="376px";
-x.style.overflow="hidden";var C=document.createElement("div");C.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";x.appendChild(C);mxEvent.disableContextMenu(x);d.appendChild(x);var G=new Graph(x);G.setTooltips(!1);G.setEnabled(!1);G.setPanning(!0);G.panningHandler.ignoreCell=!0;G.panningHandler.useLeftButtonForPanning=!0;G.minFitScale=null;G.maxFitScale=null;G.centerZoom=!0;var H=0,I=null,F=0,O=G.getGlobalVariable;
-G.getGlobalVariable=function(W){return"page"==W&&null!=I&&null!=I[F]?I[F].getAttribute("name"):"pagenumber"==W?F+1:"pagecount"==W?null!=I?I.length:1:O.apply(this,arguments)};G.getLinkForCell=function(){return null};Editor.MathJaxRender&&G.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(W,Z){b.editor.graph.mathEnabled&&Editor.MathJaxRender(G.container)}));var c={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%"},e=new Spinner(c),g=b.getCurrentFile(),n=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),p={};for(c=0;c<n.length;c++)p[n[c].getAttribute("id")]=n[c];var v=null,y=null,u=null,D=null,A=mxUtils.button("",function(){null!=u&&G.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");
-mxUtils.setOpacity(A,20);var U=mxUtils.button("",function(){null!=u&&G.zoomOut()});U.className="geSprite geSprite-zoomout";U.setAttribute("title",mxResources.get("zoomOut"));U.style.outline="none";U.style.border="none";U.style.margin="2px";U.setAttribute("disabled","disabled");mxUtils.setOpacity(U,20);var l=mxUtils.button("",function(){null!=u&&(G.maxFitScale=8,G.fit(8),G.center())});l.className="geSprite geSprite-fit";l.setAttribute("title",mxResources.get("fit"));l.style.outline="none";l.style.border=
-"none";l.style.margin="2px";l.setAttribute("disabled","disabled");mxUtils.setOpacity(l,20);var q=mxUtils.button("",function(){null!=u&&(G.zoomActual(),G.center())});q.className="geSprite geSprite-actualsize";q.setAttribute("title",mxResources.get("actualSize"));q.style.outline="none";q.style.border="none";q.style.margin="2px";q.setAttribute("disabled","disabled");mxUtils.setOpacity(q,20);var B=mxUtils.button("",function(){});B.className="geSprite geSprite-middle";B.setAttribute("title",mxResources.get("compare"));
-B.style.outline="none";B.style.border="none";B.style.margin="2px";mxUtils.setOpacity(B,60);var J=x.cloneNode(!1);J.style.pointerEvent="none";x.parentNode.appendChild(J);var M=new Graph(J);M.setTooltips(!1);M.setEnabled(!1);M.setPanning(!0);M.panningHandler.ignoreCell=!0;M.panningHandler.useLeftButtonForPanning=!0;M.minFitScale=null;M.maxFitScale=null;M.centerZoom=!0;mxEvent.addGestureListeners(B,function(W){W=p[I[H].getAttribute("id")];mxUtils.setOpacity(B,20);C.innerText="";null==W?mxUtils.write(C,
-mxResources.get("pageNotFound")):(E.style.display="none",x.style.display="none",J.style.display="",J.style.backgroundColor=x.style.backgroundColor,W=Editor.parseDiagramNode(W),(new mxCodec(W.ownerDocument)).decode(W,M.getModel()),M.view.scaleAndTranslate(G.view.scale,G.view.translate.x,G.view.translate.y))},null,function(){mxUtils.setOpacity(B,60);C.innerText="";"none"==x.style.display&&(E.style.display="",x.style.display="",J.style.display="none")});var E=document.createElement("div");E.style.position=
-"absolute";E.style.textAlign="right";E.style.color="gray";E.style.marginTop="10px";E.style.backgroundColor="transparent";E.style.top="440px";E.style.right="32px";E.style.maxWidth="380px";E.style.cursor="default";var K=mxUtils.button(mxResources.get("download"),function(){if(null!=u){var W=mxUtils.getXml(u.documentElement),Z=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(W,Z,"text/xml"):(W="undefined"===typeof pako?"&xml="+encodeURIComponent(W):"&data="+encodeURIComponent(Graph.compress(W)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Z)+"&format=xml"+W)).simulate(document,"_blank"))}});K.className="geBtn";K.setAttribute("disabled","disabled");var P=mxUtils.button(mxResources.get("restore"),function(W){null!=u&&null!=D&&(mxEvent.isShiftDown(W)?null!=u&&(W=b.getPagesForNode(u.documentElement),W=b.diffPages(b.pages,W),W=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(W,null,2),function(Z){if(0<Z.length)try{b.confirm(mxResources.get("areYouSure"),function(){g.patch([JSON.parse(Z)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(W.container,620,460,!0,!0),W.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=k?k(D):b.spinner.spin(document.body,mxResources.get("restoring"))&&g.save(!0,function(Z){b.spinner.stop();b.replaceFileData(D);b.hideDialog()},function(Z){b.spinner.stop();b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)})}))});
-P.className="geBtn";P.setAttribute("disabled","disabled");P.setAttribute("title","Shift+Click for Diff");var R=document.createElement("select");R.setAttribute("disabled","disabled");R.style.maxWidth="80px";R.style.position="relative";R.style.top="-2px";R.style.verticalAlign="bottom";R.style.marginRight="6px";R.style.display="none";var V=null;mxEvent.addListener(R,"change",function(W){null!=V&&(V(W),mxEvent.consume(W))});var X=mxUtils.button(mxResources.get("edit"),function(){null!=u&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(u.documentElement)),b.openLink(b.getUrl(),null,!0))});X.className="geBtn";X.setAttribute("disabled","disabled");null!=k&&(X.style.display="none");var m=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(R.selectedIndex))});m.className="geBtn gePrimaryBtn";m.setAttribute("disabled","disabled");null!=k&&(m.style.display="none",P.className="geBtn gePrimaryBtn");n=document.createElement("div");
-n.style.position="absolute";n.style.top="482px";n.style.width="640px";n.style.textAlign="right";var z=document.createElement("div");z.className="geToolbarContainer";z.style.backgroundColor="transparent";z.style.padding="2px";z.style.border="none";z.style.left="199px";z.style.top="442px";var L=null;if(null!=f&&0<f.length){x.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 N=document.createElement("tbody"),T=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(H=mxUtils.indexOf(b.pages,b.currentPage));for(c=f.length-1;0<=c;c--){var S=function(W){var Z=new Date(W.modifiedDate),ba=null;if(0<=Z.getTime()){var aa=function(Y){e.stop();C.innerText="";var ia=mxUtils.parseXml(Y),da=b.editor.extractGraphModel(ia.documentElement,!0);if(null!=da){var va=function(ya){null!=ya&&(ya=Aa(Editor.parseDiagramNode(ya)));return ya},Aa=function(ya){var ta=ya.getAttribute("background");
-if(null==ta||""==ta||ta==mxConstants.NONE)ta=G.defaultPageBackgroundColor;x.style.backgroundColor=ta;(new mxCodec(ya.ownerDocument)).decode(ya,G.getModel());G.maxFitScale=1;G.fit(8);G.center();return ya};R.style.display="none";R.innerText="";u=ia;D=Y;I=parseSelectFunction=null;F=0;if("mxfile"==da.nodeName){ia=da.getElementsByTagName("diagram");I=[];for(Y=0;Y<ia.length;Y++)I.push(ia[Y]);F=Math.min(H,I.length-1);0<I.length&&va(I[F]);if(1<I.length)for(R.removeAttribute("disabled"),R.style.display="",
-Y=0;Y<I.length;Y++)ia=document.createElement("option"),mxUtils.write(ia,I[Y].getAttribute("name")||mxResources.get("pageWithNumber",[Y+1])),ia.setAttribute("value",Y),Y==F&&ia.setAttribute("selected","selected"),R.appendChild(ia);V=function(){try{var ya=parseInt(R.value);F=H=ya;va(I[ya])}catch(ta){R.value=H,b.handleError(ta)}}}else Aa(da);Y=W.lastModifyingUserName;null!=Y&&20<Y.length&&(Y=Y.substring(0,20)+"...");E.innerText="";mxUtils.write(E,(null!=Y?Y+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());
-E.setAttribute("title",ba.getAttribute("title"));A.removeAttribute("disabled");U.removeAttribute("disabled");l.removeAttribute("disabled");q.removeAttribute("disabled");B.removeAttribute("disabled");null!=g&&g.isRestricted()||(b.editor.graph.isEnabled()&&P.removeAttribute("disabled"),K.removeAttribute("disabled"),m.removeAttribute("disabled"),X.removeAttribute("disabled"));mxUtils.setOpacity(A,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(l,60);mxUtils.setOpacity(q,60);mxUtils.setOpacity(B,60)}else R.style.display=
-"none",R.innerText="",E.innerText="",mxUtils.write(E,mxResources.get("errorLoadingFile")),mxUtils.write(C,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottom="1px solid lightGray";ba.style.fontSize="12px";ba.style.cursor="pointer";var fa=document.createElement("td");fa.style.padding="6px";fa.style.whiteSpace="nowrap";W==f[f.length-1]?mxUtils.write(fa,mxResources.get("current")):Z.toDateString()===T?mxUtils.write(fa,Z.toLocaleTimeString()):mxUtils.write(fa,Z.toLocaleDateString()+
-" "+Z.toLocaleTimeString());ba.appendChild(fa);ba.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=W.fileSize?" "+b.formatFileSize(parseInt(W.fileSize)):"")+(null!=W.lastModifyingUserName?" "+W.lastModifyingUserName:""));mxEvent.addListener(ba,"click",function(Y){y!=W&&(e.stop(),null!=v&&(v.style.backgroundColor=""),y=W,v=ba,v.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",D=u=null,E.removeAttribute("title"),E.innerText=mxResources.get("loading")+"...",
-x.style.backgroundColor=G.defaultPageBackgroundColor,C.innerText="",G.getModel().clear(),P.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),mxUtils.setOpacity(A,20),mxUtils.setOpacity(U,
-20),mxUtils.setOpacity(l,20),mxUtils.setOpacity(q,20),mxUtils.setOpacity(B,20),e.spin(x),W.getXml(function(ia){if(y==W)try{aa(ia)}catch(da){E.innerText=mxResources.get("error")+": "+da.message}},function(ia){e.stop();R.style.display="none";R.innerText="";E.innerText="";mxUtils.write(E,mxResources.get("errorLoadingFile"));mxUtils.write(C,mxResources.get("errorLoadingFile"))}),mxEvent.consume(Y))});mxEvent.addListener(ba,"dblclick",function(Y){m.click();window.getSelection?window.getSelection().removeAllRanges():
-document.selection&&document.selection.empty();mxEvent.consume(Y)},!1);N.appendChild(ba)}return ba}(f[c]);null!=S&&c==f.length-1&&(L=S)}Q.appendChild(N);t.appendChild(Q)}else null==g||null==b.drive&&g.constructor==window.DriveFile||null==b.dropbox&&g.constructor==window.DropboxFile?(x.style.display="none",z.style.display="none",mxUtils.write(t,mxResources.get("notAvailable"))):(x.style.display="none",z.style.display="none",mxUtils.write(t,mxResources.get("noRevisions")));this.init=function(){null!=
-L&&L.click()};t=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});t.className="geBtn";z.appendChild(R);z.appendChild(A);z.appendChild(U);z.appendChild(q);z.appendChild(l);z.appendChild(B);b.editor.cancelFirst?(n.appendChild(t),n.appendChild(K),n.appendChild(X),n.appendChild(P),n.appendChild(m)):(n.appendChild(K),n.appendChild(X),n.appendChild(P),n.appendChild(m),n.appendChild(t));d.appendChild(n);d.appendChild(z);d.appendChild(E);this.container=d},DraftDialog=function(b,f,k,d,t,
-x,C,G,H){var I=document.createElement("div"),F=document.createElement("div");F.style.marginTop="0px";F.style.whiteSpace="nowrap";F.style.overflow="auto";F.style.lineHeight="normal";mxUtils.write(F,f);I.appendChild(F);var O=document.createElement("select"),c=mxUtils.bind(this,function(){y=mxUtils.parseXml(H[O.value].data);u=b.editor.extractGraphModel(y.documentElement,!0);D=0;this.init()});if(null!=H){O.style.marginLeft="4px";for(f=0;f<H.length;f++){var e=document.createElement("option");e.setAttribute("value",
-f);var g=new Date(H[f].created),n=new Date(H[f].modified);mxUtils.write(e,g.toLocaleDateString()+" "+g.toLocaleTimeString()+" - "+(g.toDateString(),n.toDateString(),n.toLocaleDateString())+" "+n.toLocaleTimeString());O.appendChild(e)}F.appendChild(O);mxEvent.addListener(O,"change",c)}null==k&&(k=H[0].data);var p=document.createElement("div");p.style.position="absolute";p.style.border="1px solid lightGray";p.style.marginTop="10px";p.style.left="40px";p.style.right="40px";p.style.top="46px";p.style.bottom=
-"74px";p.style.overflow="hidden";mxEvent.disableContextMenu(p);I.appendChild(p);var v=new Graph(p);v.setEnabled(!1);v.setPanning(!0);v.panningHandler.ignoreCell=!0;v.panningHandler.useLeftButtonForPanning=!0;v.minFitScale=null;v.maxFitScale=null;v.centerZoom=!0;var y=mxUtils.parseXml(k),u=b.editor.extractGraphModel(y.documentElement,!0),D=0,A=null,U=v.getGlobalVariable;v.getGlobalVariable=function(q){return"page"==q&&null!=A&&null!=A[D]?A[D].getAttribute("name"):"pagenumber"==q?D+1:"pagecount"==q?
-null!=A?A.length:1:U.apply(this,arguments)};v.getLinkForCell=function(){return null};k=mxUtils.button("",function(){v.zoomIn()});k.className="geSprite geSprite-zoomin";k.setAttribute("title",mxResources.get("zoomIn"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);F=mxUtils.button("",function(){v.zoomOut()});F.className="geSprite geSprite-zoomout";F.setAttribute("title",mxResources.get("zoomOut"));F.style.outline="none";F.style.border="none";F.style.margin=
-"2px";mxUtils.setOpacity(F,60);f=mxUtils.button("",function(){v.maxFitScale=8;v.fit(8);v.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);e=mxUtils.button("",function(){v.zoomActual();v.center()});e.className="geSprite geSprite-actualsize";e.setAttribute("title",mxResources.get("actualSize"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,
-60);C=mxUtils.button(C||mxResources.get("discard"),function(){t.apply(this,[O.value,mxUtils.bind(this,function(){null!=O.parentNode&&(O.options[O.selectedIndex].parentNode.removeChild(O.options[O.selectedIndex]),0<O.options.length?(O.value=O.options[0].value,c()):b.hideDialog(!0))})])});C.className="geBtn";var l=document.createElement("select");l.style.maxWidth="80px";l.style.position="relative";l.style.top="-2px";l.style.verticalAlign="bottom";l.style.marginRight="6px";l.style.display="none";x=mxUtils.button(x||
-mxResources.get("edit"),function(){d.apply(this,[O.value])});x.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.right="40px";g.style.textAlign="right";n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function q(E){if(null!=E){var K=E.getAttribute("background");if(null==
-K||""==K||K==mxConstants.NONE)K=Editor.isDarkMode()?"transparent":"#ffffff";p.style.backgroundColor=K;(new mxCodec(E.ownerDocument)).decode(E,v.getModel());v.maxFitScale=1;v.fit(8);v.center()}return E}function B(E){null!=E&&(E=q(Editor.parseDiagramNode(E)));return E}mxEvent.addListener(l,"change",function(E){D=parseInt(l.value);B(A[D]);mxEvent.consume(E)});if("mxfile"==u.nodeName){var J=u.getElementsByTagName("diagram");A=[];for(var M=0;M<J.length;M++)A.push(J[M]);0<A.length&&B(A[D]);l.innerText=
-"";if(1<A.length)for(l.style.display="",M=0;M<A.length;M++)J=document.createElement("option"),mxUtils.write(J,A[M].getAttribute("name")||mxResources.get("pageWithNumber",[M+1])),J.setAttribute("value",M),M==D&&J.setAttribute("selected","selected"),l.appendChild(J);else l.style.display="none"}else q(u)};n.appendChild(l);n.appendChild(k);n.appendChild(F);n.appendChild(e);n.appendChild(f);k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});k.className="geBtn";G=null!=G?mxUtils.button(mxResources.get("ignore"),
-G):null;null!=G&&(G.className="geBtn");b.editor.cancelFirst?(g.appendChild(k),null!=G&&g.appendChild(G),g.appendChild(C),g.appendChild(x)):(g.appendChild(x),g.appendChild(C),null!=G&&g.appendChild(G),g.appendChild(k));I.appendChild(g);I.appendChild(n);this.container=I},FindWindow=function(b,f,k,d,t,x){function C(V,X,m,z){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;for(var L=0;L<X.length;L++)if("label"!=X[L].nodeName){var Q=mxUtils.trim(X[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g,
-" ")).toLowerCase();if(null==V&&(z&&0<=Q.indexOf(m)||!z&&Q.substring(0,m.length)===m)||null!=V&&V.test(Q))return!0}}return!1}function G(){e&&A.value?(K.removeAttribute("disabled"),P.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));A.value&&D.value?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled")}function H(V,X,m){M.innerText="";var z=F.model.getDescendants(F.model.getRoot()),L=D.value.toLowerCase(),Q=U.checked?new RegExp(L):
-null,N=null;n=null;O!=L&&(O=L,c=null,g=!1);var T=null==c;if(0<L.length){if(g){g=!1;for(var S,W=0;W<b.pages.length;W++)if(b.currentPage==b.pages[W]){S=W;break}V=(S+1)%b.pages.length;c=null;do g=!1,z=b.pages[V],F=b.createTemporaryGraph(F.getStylesheet()),b.updatePageRoot(z),F.model.setRoot(z.root),V=(V+1)%b.pages.length;while(!H(!0,X,m)&&V!=S);c&&(c=null,m?b.editor.graph.model.execute(new SelectPage(b,z)):b.selectPage(z));g=!1;F=b.editor.graph;return H(!0,X,m)}for(W=0;W<z.length;W++){S=F.view.getState(z[W]);
-X&&null!=Q&&(T=T||S==c);if(null!=S&&null!=S.cell.value&&(T||null==N)&&(F.model.isVertex(S.cell)||F.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(q.innerHTML=F.sanitizeHtml(F.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([q])):label=F.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;X&&x&&null!=Q&&S==c&&(label=label.substr(p),Z=p);var ba=""==A.value,aa=ba;if(null==Q&&(aa&&0<=label.indexOf(L)||!aa&&label.substring(0,L.length)===
-L||ba&&C(Q,S.cell,L,aa))||null!=Q&&(Q.test(label)||ba&&C(Q,S.cell,L,aa)))if(x&&(null!=Q?(ba=label.match(Q),null!=ba&&0<ba.length&&(n=ba[0].toLowerCase(),p=Z+ba.index+n.length)):(n=L,p=n.length)),T){N=S;break}else null==N&&(N=S)}T=T||S==c}}if(null!=N){if(W==z.length&&l.checked)return c=null,g=!0,H(!0,X,m);c=N;F.scrollCellToVisible(c.cell);F.isEnabled()&&!F.isCellLocked(c.cell)?m||F.getSelectionCell()==c.cell&&1==F.getSelectionCount()||F.setSelectionCell(c.cell):F.highlightCell(c.cell)}else{if(!V&&
-l.checked)return g=!0,H(!0,X,m);F.isEnabled()&&!m&&F.clearSelection()}e=null!=N;x&&!V&&G();return 0==L.length||null!=N}var I=b.actions.get("findReplace"),F=b.editor.graph,O=null,c=null,e=!1,g=!1,n=null,p=0,v=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var u=x?"260px":"200px",D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("find"));D.setAttribute("type","text");D.style.marginTop="4px";
-D.style.marginBottom="6px";D.style.width=u;D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";y.appendChild(D);mxUtils.br(y);if(x){var A=document.createElement("input");A.setAttribute("placeholder",mxResources.get("replaceWith"));A.setAttribute("type","text");A.style.marginTop="4px";A.style.marginBottom="6px";A.style.width=u;A.style.fontSize="12px";A.style.borderRadius="4px";A.style.padding="6px";y.appendChild(A);mxUtils.br(y);mxEvent.addListener(A,"input",G)}var U=document.createElement("input");
-U.setAttribute("id","geFindWinRegExChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";y.appendChild(U);u=document.createElement("label");u.setAttribute("for","geFindWinRegExChck");y.appendChild(u);mxUtils.write(u,mxResources.get("regularExpression"));y.appendChild(u);u=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");u.style.position="relative";u.style.marginLeft="6px";u.style.top="-1px";y.appendChild(u);mxUtils.br(y);var l=document.createElement("input");l.setAttribute("id",
-"geFindWinAllPagesChck");l.setAttribute("type","checkbox");l.style.marginRight="4px";y.appendChild(l);u=document.createElement("label");u.setAttribute("for","geFindWinAllPagesChck");y.appendChild(u);mxUtils.write(u,mxResources.get("allPages"));y.appendChild(u);var q=document.createElement("div");mxUtils.br(y);u=document.createElement("div");u.style.left="0px";u.style.right="0px";u.style.marginTop="6px";u.style.padding="0 6px 0 6px";u.style.textAlign="center";y.appendChild(u);var B=mxUtils.button(mxResources.get("reset"),
-function(){M.innerText="";D.value="";D.style.backgroundColor="";x&&(A.value="",G());O=c=null;g=!1;D.focus()});B.setAttribute("title",mxResources.get("reset"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.className="geBtn";x||u.appendChild(B);var J=mxUtils.button(mxResources.get("find"),function(){try{D.style.backgroundColor=H()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});
-J.setAttribute("title",mxResources.get("find")+" (Enter)");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";u.appendChild(J);var M=document.createElement("div");M.style.marginTop="10px";if(x){var E=function(V,X,m,z,L){if(null==L||"1"!=L.html)return z=V.toLowerCase().indexOf(X,z),0>z?V:V.substr(0,z)+m+V.substr(z+X.length);var Q=V;X=mxUtils.htmlEntities(X);L=[];var N=
--1;for(V=V.replace(/<br>/ig,"\n");-1<(N=V.indexOf("<",N+1));)L.push(N);N=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");z=V.toLowerCase().indexOf(X,z);if(0>z)return Q;Q=z+X.length;m=mxUtils.htmlEntities(m);V=V.substr(0,z)+m+V.substr(Q);for(var T=0,S=0;S<L.length;S++){if(L[S]-T<z)V=V.substr(0,L[S])+N[S]+V.substr(L[S]);else{var W=L[S]-T<Q?z+T:L[S]+(m.length-X.length);V=V.substr(0,W)+N[S]+V.substr(W)}T+=N[S].length}return V.replace(/\n/g,"<br>")},K=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=
-n&&null!=c&&A.value){var V=c.cell,X=F.getLabel(V);F.isCellEditable(V)&&F.model.setValue(V,E(X,n,A.value,p-n.length,F.getCurrentCellStyle(V)));D.style.backgroundColor=H(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(m){b.handleError(m)}});K.setAttribute("title",mxResources.get("replFind"));K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";K.className="geBtn gePrimaryBtn";K.setAttribute("disabled",
-"disabled");u.appendChild(K);mxUtils.br(u);var P=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=n&&null!=c&&A.value){var V=c.cell,X=F.getLabel(V);F.model.setValue(V,E(X,n,A.value,p-n.length,F.getCurrentCellStyle(V)));K.setAttribute("disabled","disabled");P.setAttribute("disabled","disabled")}}catch(m){b.handleError(m)}});P.setAttribute("title",mxResources.get("replace"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow=
-"hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");u.appendChild(P);var R=mxUtils.button(mxResources.get("replaceAll"),function(){M.innerText="";if(A.value){O=null;var V=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;F.getModel().beginUpdate();try{for(var m=0,z={};H(!1,!0,!0)&&100>m;){var L=c.cell,Q=F.getLabel(L),N=z[L.id];if(N&&N.replAllMrk==v&&N.replAllPos>=p)break;z[L.id]={replAllMrk:v,replAllPos:p};F.isCellEditable(L)&&
-(F.model.setValue(L,E(Q,n,A.value,p-n.length,F.getCurrentCellStyle(L))),m++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(M,mxResources.get("matchesRepl",[m]))}catch(T){b.handleError(T)}finally{F.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}v++}});R.setAttribute("title",mxResources.get("replaceAll"));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");u.appendChild(R);mxUtils.br(u);u.appendChild(B);B=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));B.setAttribute("title",mxResources.get("close"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.className="geBtn";u.appendChild(B);mxUtils.br(u);u.appendChild(M)}else B.style.width=
-"90px",J.style.width="90px";mxEvent.addListener(D,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)I.funct();else if(O!=D.value.toLowerCase()||13==V.keyCode)try{D.style.backgroundColor=H()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){D.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(V){70==V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(I.funct(),mxEvent.consume(V))});
-this.window=new mxWindow(mxResources.get("find")+(x?"/"+mxResources.get("replace"):""),y,f,k,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?l.removeAttribute("disabled"):
-(l.checked=!1,l.setAttribute("disabled","disabled"))):F.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,f,k,d,t,x){var C=b.editor.graph,G=document.createElement("div");G.style.textAlign="center";G.style.userSelect="none";G.style.overflow="hidden";G.style.height="100%";if(x){var H=document.createElement("input");H.setAttribute("id","geFreehandBrush");H.setAttribute("type","checkbox");H.checked=C.freehand.isPerfectFreehandMode();H.style.margin="10px 5px 0px 10px";H.style.float=
-"left";G.appendChild(H);var I=document.createElement("label");I.setAttribute("for","geFreehandBrush");I.style.float="left";I.style.marginTop="10px";G.appendChild(I);mxUtils.write(I,mxResources.get("brush"));G.appendChild(I);mxUtils.br(G);var F=document.createElement("input");F.setAttribute("type","range");F.setAttribute("min","2");F.setAttribute("max","30");F.setAttribute("value",C.freehand.getBrushSize());F.style.width="90%";F.style.visibility="hidden";G.appendChild(F);mxUtils.br(G);I=function(){C.freehand.setPerfectFreehandMode(H.checked);
-F.style.visibility=H.checked?"visible":"hidden"};mxEvent.addListener(H,"change",I);I();mxEvent.addListener(F,"change",function(){C.freehand.setBrushSize(parseInt(this.value))})}var O=mxUtils.button(mxResources.get("startDrawing"),function(){C.freehand.isDrawing()?C.freehand.stopDrawing():C.freehand.startDrawing()});O.setAttribute("title",mxResources.get("startDrawing"));O.style.marginTop=x?"5px":"10px";O.style.width="90%";O.style.boxSizing="border-box";O.style.overflow="hidden";O.style.textOverflow=
-"ellipsis";O.style.textAlign="center";O.className="geBtn gePrimaryBtn";G.appendChild(O);this.window=new mxWindow(mxResources.get("freehand"),G,f,k,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);C.addListener("freehandStateChanged",mxUtils.bind(this,function(){O.innerText="";mxUtils.write(O,mxResources.get(C.freehand.isDrawing()?"stopDrawing":"startDrawing"));var c=document.createElement("span");c.style.opacity="0.7";
-c.style["float"]="right";mxUtils.write(c,"X");O.appendChild(c);O.setAttribute("title",mxResources.get(C.freehand.isDrawing()?"stopDrawing":"startDrawing"));O.className="geBtn"+(C.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){C.freehand.isDrawing()&&C.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,f,k,d,t){var x=b.editor.graph,
-C=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(H,I){if(x.isEnabled()){var F=new FilenameDialog(b,"",mxResources.get("add"),function(O){b.hideDialog();if(null!=O&&0<O.length){O=O.split(" ");for(var c=[],e=0;e<O.length;e++){var g=mxUtils.trim(O[e]);""!=g&&0>mxUtils.indexOf(H,g)&&c.push(g)}0<c.length&&(x.isSelectionEmpty()?I(H.concat(c)):x.addTagsForCells(x.getSelectionCells(),c))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+
-")");b.showDialog(F.container,300,80,!0,!0);F.init()}}),G=C.div;this.window=new mxWindow(mxResources.get("tags"),G,f,k,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){C.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,k,d){var t=document.createElement("div");t.style.textAlign=
-"center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("authorizationRequired"));var C="Unknown",G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.marginRight="10px";f==b.drive?(C=mxResources.get("googleDrive"),G.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(C=mxResources.get("dropbox"),G.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
-f==b.oneDrive?(C=mxResources.get("oneDrive"),G.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(C=mxResources.get("github"),G.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(C=mxResources.get("gitlab"),G.src=IMAGE_PATH+"/gitlab-logo.svg",G.style.width="32px"):f==b.trello&&(C=mxResources.get("trello"),G.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[C]));var H=document.createElement("input");H.setAttribute("type",
-"checkbox");C=mxUtils.button(mxResources.get("authorize"),function(){d(H.checked)});C.insertBefore(G,C.firstChild);C.style.marginTop="6px";C.className="geBigButton";C.style.fontSize="18px";C.style.padding="14px";t.appendChild(x);t.appendChild(b);t.appendChild(C);k&&(k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(H),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberMe")),k.appendChild(x),t.appendChild(k),H.checked=!0,H.defaultChecked=!0,mxEvent.addListener(x,
-"click",function(I){H.checked=!H.checked;mxEvent.consume(I)}));this.container=t},MoreShapesDialog=function(b,f,k){k=null!=k?k:b.sidebar.entries;var d=document.createElement("div"),t=[];if(null!=b.sidebar.customEntries)for(var x=0;x<b.sidebar.customEntries.length;x++){for(var C=b.sidebar.customEntries[x],G={title:b.getResource(C.title),entries:[]},H=0;H<C.entries.length;H++){var I=C.entries[H];G.entries.push({id:I.id,title:b.getResource(I.title),desc:b.getResource(I.desc),image:I.preview})}t.push(G)}for(x=
-0;x<k.length;x++)if(null==b.sidebar.enabledLibraries)t.push(k[x]);else{G={title:k[x].title,entries:[]};for(H=0;H<k[x].entries.length;H++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,k[x].entries[H].id)&&G.entries.push(k[x].entries[H]);0<G.entries.length&&t.push(G)}k=t;if(f){x=mxUtils.bind(this,function(U){for(var l=0;l<U.length;l++)(function(q){var B=g.cloneNode(!1);B.style.fontWeight="bold";B.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";B.style.padding="6px 0px 6px 20px";mxUtils.write(B,
-q.title);F.appendChild(B);for(var J=0;J<q.entries.length;J++)(function(M){var E=g.cloneNode(!1);E.style.cursor="pointer";E.style.padding="4px 0px 4px 20px";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.textOverflow="ellipsis";E.setAttribute("title",M.title+" ("+M.id+")");var K=document.createElement("input");K.setAttribute("type","checkbox");K.checked=b.sidebar.isEntryVisible(M.id);K.defaultChecked=K.checked;E.appendChild(K);mxUtils.write(E," "+M.title);F.appendChild(E);var P=function(R){if(null==
-R||"INPUT"!=mxEvent.getSource(R).nodeName){O.style.textAlign="center";O.style.padding="0px";O.style.color="";O.innerText="";if(null!=M.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,M.desc);O.appendChild(V)}null!=M.imageCallback?M.imageCallback(O):null!=M.image?O.innerHTML+='<img border="0" src="'+M.image+'"/>':null==M.desc&&(O.style.padding="20px",O.style.color=
-"rgb(179, 179, 179)",mxUtils.write(O,mxResources.get("noPreview")));null!=c&&(c.style.backgroundColor="");c=E;c.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=R&&mxEvent.consume(R)}};mxEvent.addListener(E,"click",P);mxEvent.addListener(E,"dblclick",function(R){K.checked=!K.checked;mxEvent.consume(R)});e.push(function(){return K.checked?M.id:null});0==l&&0==J&&P()})(q.entries[J])})(U[l])});H=document.createElement("div");H.className="geDialogTitle";mxUtils.write(H,mxResources.get("shapes"));
-H.style.position="absolute";H.style.top="0px";H.style.left="0px";H.style.lineHeight="40px";H.style.height="40px";H.style.right="0px";var F=document.createElement("div"),O=document.createElement("div");F.style.position="absolute";F.style.top="40px";F.style.left="0px";F.style.width="202px";F.style.bottom="60px";F.style.overflow="auto";O.style.position="absolute";O.style.left="202px";O.style.right="0px";O.style.top="40px";O.style.bottom="60px";O.style.overflow="auto";O.style.borderLeft="1px solid rgb(211, 211, 211)";
-O.style.textAlign="center";var c=null,e=[],g=document.createElement("div");g.style.position="relative";g.style.left="0px";g.style.right="0px";x(k);d.style.padding="30px";d.appendChild(H);d.appendChild(F);d.appendChild(O);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.color="gray";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height="60px";k.style.lineHeight="52px";var n=document.createElement("input");
-n.setAttribute("type","checkbox");n.style.position="relative";n.style.top="1px";n.checked=b.sidebar.sidebarTitles;n.defaultChecked=n.checked;k.appendChild(n);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("labels"));x.style.paddingRight="20px";k.appendChild(x);mxEvent.addListener(x,"click",function(U){n.checked=!n.checked;mxEvent.consume(U)});var p=document.createElement("input");p.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)x=document.createElement("span"),
-x.style.paddingRight="20px",x.appendChild(p),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),p.style.position="relative",p.style.top="1px",p.checked=!0,p.defaultChecked=!0,mxEvent.addListener(x,"click",function(U){mxEvent.getSource(U)!=p&&(p.checked=!p.checked,mxEvent.consume(U))}),k.appendChild(x);x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";H=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var U=[],l=0;l<e.length;l++){var q=
-e[l].apply(this,arguments);null!=q&&U.push(q)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(l=mxUtils.indexOf(U,".scratchpad"),null!=b.scratchpad!=(0<=l&&0<U.splice(l,1).length)&&b.toggleScratchpad(),l=mxUtils.indexOf(U,"search"),mxSettings.settings.search=0<=l&&0<U.splice(l,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),p.checked&&mxSettings.save());b.sidebar.showEntries(U.join(";"),p.checked,!0);b.setSidebarTitles(n.checked,p.checked)});H.className="geBtn gePrimaryBtn"}else{var v=
-document.createElement("table");x=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";H=document.createElement("tr");v.style.width="100%";f=document.createElement("td");t=document.createElement("td");C=document.createElement("td");var y=mxUtils.bind(this,function(U,l,q){var B=document.createElement("input");B.type="checkbox";v.appendChild(B);B.checked=b.sidebar.isEntryVisible(q);var J=document.createElement("span");mxUtils.write(J,l);l=document.createElement("div");l.style.display=
-"block";l.appendChild(B);l.appendChild(J);mxEvent.addListener(J,"click",function(M){B.checked=!B.checked;mxEvent.consume(M)});U.appendChild(l);return function(){return B.checked?q:null}});H.appendChild(f);H.appendChild(t);H.appendChild(C);x.appendChild(H);v.appendChild(x);e=[];var u=0;for(x=0;x<k.length;x++)for(H=0;H<k[x].entries.length;H++)u++;var D=[f,t,C],A=0;for(x=0;x<k.length;x++)(function(U){for(var l=0;l<U.entries.length;l++){var q=U.entries[l];e.push(y(D[Math.floor(A/(u/3))],q.title,q.id));
-A++}})(k[x]);d.appendChild(v);k=document.createElement("div");k.style.marginTop="18px";k.style.textAlign="center";p=document.createElement("input");isLocalStorage&&(p.setAttribute("type","checkbox"),p.checked=!0,p.defaultChecked=!0,k.appendChild(p),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),k.appendChild(x),mxEvent.addListener(x,"click",function(U){p.checked=!p.checked;mxEvent.consume(U)}));d.appendChild(k);x=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog()});x.className="geBtn";H=mxUtils.button(mxResources.get("apply"),function(){for(var U=["search"],l=0;l<e.length;l++){var q=e[l].apply(this,arguments);null!=q&&U.push(q)}b.sidebar.showEntries(0<U.length?U.join(";"):"",p.checked);b.hideDialog()});H.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right"}b.editor.cancelFirst?(k.appendChild(x),k.appendChild(H)):(k.appendChild(H),k.appendChild(x));d.appendChild(k);this.container=
-d},PluginsDialog=function(b,f,k,d){function t(){H=!0;if(0==G.length)C.innerText=mxResources.get("noPlugins");else{C.innerText="";for(var g=0;g<G.length;g++){var n=document.createElement("span");n.style.whiteSpace="nowrap";var p=document.createElement("span");p.className="geSprite geSprite-delete";p.style.position="relative";p.style.cursor="pointer";p.style.top="5px";p.style.marginRight="4px";p.style.display="inline-block";n.appendChild(p);mxUtils.write(n,G[g]);C.appendChild(n);mxUtils.br(C);mxEvent.addListener(p,
-"click",function(v){return function(){b.confirm(mxResources.get("delete")+' "'+G[v]+'"?',function(){null!=k&&k(G[v]);G.splice(v,1);t()})}}(g))}}}var x=document.createElement("div"),C=document.createElement("div");C.style.height="180px";C.style.overflow="auto";var G=mxSettings.getPlugins().slice(),H=!1;x.appendChild(C);t();H=!1;var I=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(g){g&&0>mxUtils.indexOf(G,g)&&G.push(g);t()})}:function(){var g=document.createElement("div"),n=document.createElement("span");
-n.style.marginTop="6px";mxUtils.write(n,mxResources.get("builtinPlugins")+": ");g.appendChild(n);var p=document.createElement("select");p.style.width="150px";for(n=0;n<App.publicPlugin.length;n++){var v=document.createElement("option");mxUtils.write(v,App.publicPlugin[n]);v.value=App.publicPlugin[n];p.appendChild(v)}g.appendChild(p);mxUtils.br(g);mxUtils.br(g);n=mxUtils.button(mxResources.get("custom")+"...",function(){var y=new FilenameDialog(b,"",mxResources.get("add"),function(u){b.hideDialog();
-if(null!=u&&0<u.length){u=u.split(";");for(var D=0;D<u.length;D++){var A=u[D],U=App.pluginRegistry[A];null!=U&&(A=U);0<A.length&&0>mxUtils.indexOf(G,A)&&G.push(A)}t()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(y.container,300,80,!0,!0);y.init()});n.className="geBtn";g=new CustomDialog(b,g,mxUtils.bind(this,function(){var y=App.pluginRegistry[p.value];0>mxUtils.indexOf(G,y)&&(G.push(y),t())}),null,null,null,n);b.showDialog(g.container,360,100,!0,!0)});I.className=
-"geBtn";var F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";var O=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){H?(mxSettings.setPlugins(G),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});O.className="geBtn gePrimaryBtn";var c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign="right";var e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});
-e.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(e.style.display="none");c.appendChild(e);b.editor.cancelFirst?(d||c.appendChild(F),c.appendChild(I),c.appendChild(O)):(c.appendChild(I),c.appendChild(O),d||c.appendChild(F));x.appendChild(c);this.container=x},CropImageDialog=function(b,f,k,d){function t(){var U=p.checked,l=v.checked,q=e.geometry,B=H.width,J=H.height,M=(300-B)/2,E=(300-J)/2;q.x<M?(q.width-=M-q.x,q.x=M):q.x+q.width>M+B&&(q.width=M+B-q.x,q.x=Math.min(q.x,M+B));q.y<E?(q.height-=
-E-q.y,q.y=E):q.y+q.height>E+J&&(q.height=E+J-q.y,q.y=Math.min(q.y,E+J));var K=(q.x-M)/B*100;B=100-(q.x+q.width-M)/B*100;M=(q.y-E)/J*100;q=100-(q.y+q.height-E)/J*100;return"inset("+mxUtils.format(M)+"% "+mxUtils.format(B)+"% "+mxUtils.format(q)+"% "+mxUtils.format(K)+"%"+(U?" round "+c+"%":l?" round 50%":"")+")"}function x(U){null!=F&&(!0!==U&&(F.model.setGeometry(e,O.clone()),c=5,u.value=c),F.model.setStyle(e,g+t()),F.selectAll(),y.style.visibility=p.checked?"visible":"hidden")}var C=document.createElement("div"),
-G=document.createElement("div");G.style.height="300px";G.style.width="300px";G.style.display="inline-flex";G.style.justifyContent="center";G.style.alignItems="center";G.style.position="absolute";var H=document.createElement("img");H.onload=function(){function U(){F.model.setStyle(e,g+t())}F=new Graph(I);F.autoExtend=!1;F.autoScroll=!1;F.setGridEnabled(!1);F.setEnabled(!0);F.setPanning(!1);F.setConnectable(!1);F.getRubberband().setEnabled(!1);F.graphHandler.allowLivePreview=!1;var l=F.createVertexHandler;
-F.createVertexHandler=function(){var Q=l.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=k)try{if("inset"==k.substring(0,5)){var q=e.geometry,B=H.width,J=H.height,M=(300-B)/2,E=(300-J)/2,K=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),P=parseFloat(K[0]),R=parseFloat(K[1]),V=parseFloat(K[2]),X=parseFloat(K[3]);isFinite(P)&&isFinite(R)&&isFinite(V)&&isFinite(X)?(q.x=X/100*B+M,q.y=P/100*J+E,q.width=(100-R)/100*B+M-q.x,q.height=(100-V)/100*J+E-q.y,"round"==K[4]?"50%"==K[5]?v.setAttribute("checked",
-"checked"):(c=parseInt(K[5]),u.value=c,p.setAttribute("checked","checked"),y.style.visibility="visible"):n.setAttribute("checked","checked")):k=null}else k=null}catch(Q){}e.style=g+(k?k:t());e.vertex=!0;F.addCell(e,null,null,null,null);F.selectAll();F.addListener(mxEvent.CELLS_MOVED,U);F.addListener(mxEvent.CELLS_RESIZED,U);var m=F.graphHandler.mouseUp,z=F.graphHandler.mouseDown;F.graphHandler.mouseUp=function(){m.apply(this,arguments);I.style.backgroundColor="#fff9"};F.graphHandler.mouseDown=function(){z.apply(this,
-arguments);I.style.backgroundColor=""};F.dblClick=function(){};var L=F.getSelectionModel().changeSelection;F.getSelectionModel().changeSelection=function(){L.call(this,[e],[e])}};H.onerror=function(){H.onload=null;H.src=Editor.errorImage};H.setAttribute("src",f);H.style.maxWidth="300px";H.style.maxHeight="300px";G.appendChild(H);C.appendChild(G);var I=document.createElement("div");I.style.width="300px";I.style.height="300px";I.style.overflow="hidden";I.style.backgroundColor="#fff9";C.appendChild(I);
-var F=null,O=new mxGeometry(100,100,100,100),c=5,e=new mxCell("",O.clone(),""),g="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",n=document.createElement("input");n.setAttribute("type","radio");n.setAttribute("id","croppingRect");n.setAttribute("name","croppingShape");n.setAttribute("checked","checked");n.style.margin="5px";C.appendChild(n);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));
-C.appendChild(f);var p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRounded");p.setAttribute("name","croppingShape");p.style.margin="5px";C.appendChild(p);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));C.appendChild(f);var v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingEllipse");v.setAttribute("name","croppingShape");v.style.margin="5px";
-C.appendChild(v);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));C.appendChild(f);mxEvent.addListener(n,"change",x);mxEvent.addListener(p,"change",x);mxEvent.addListener(v,"change",x);var y=document.createElement("div");y.style.textAlign="center";y.style.visibility="hidden";var u=document.createElement("input");u.setAttribute("type","range");u.setAttribute("min","1");u.setAttribute("max","49");u.setAttribute("value",c);u.setAttribute("title",
-mxResources.get("arcSize"));y.appendChild(u);C.appendChild(y);mxEvent.addListener(u,"change",function(){c=this.value;x(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";G=mxUtils.button(mxResources.get("apply"),function(){d(t(),e.geometry.width,e.geometry.height);b.hideDialog()});G.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("reset"),function(){d(null,H.width,H.height);b.hideDialog()});D.className="geBtn";var A=document.createElement("div");
-A.style.marginTop="10px";A.style.textAlign="right";b.editor.cancelFirst?(A.appendChild(f),A.appendChild(D),A.appendChild(G)):(A.appendChild(D),A.appendChild(G),A.appendChild(f));C.appendChild(A);this.container=C},EditGeometryDialog=function(b,f){var k=b.editor.graph,d=1==f.length?k.getCellGeometry(f[0]):null,t=document.createElement("div"),x=document.createElement("table"),C=document.createElement("tbody"),G=document.createElement("tr"),H=document.createElement("td"),I=document.createElement("td");
-x.style.paddingLeft="6px";mxUtils.write(H,mxResources.get("relative")+":");var F=document.createElement("input");F.setAttribute("type","checkbox");null!=d&&d.relative&&(F.setAttribute("checked","checked"),F.defaultChecked=!0);this.init=function(){F.focus()};I.appendChild(F);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("left")+":");var O=document.createElement("input");
-O.setAttribute("type","text");O.style.width="100px";O.value=null!=d?d.x:"";I.appendChild(O);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("top")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.y:"";I.appendChild(c);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");
-I=document.createElement("td");mxUtils.write(H,mxResources.get("dx")+":");var e=document.createElement("input");e.setAttribute("type","text");e.style.width="100px";e.value=null!=d&&null!=d.offset?d.offset.x:"";I.appendChild(e);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("dy")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";
-g.value=null!=d&&null!=d.offset?d.offset.y:"";I.appendChild(g);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("width")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.width:"";I.appendChild(n);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=
-document.createElement("td");mxUtils.write(H,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.height:"";I.appendChild(p);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("rotation")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=
-1==f.length?mxUtils.getValue(k.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";I.appendChild(v);G.appendChild(H);G.appendChild(I);C.appendChild(G);x.appendChild(C);t.appendChild(x);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();k.getModel().beginUpdate();try{for(var u=0;u<f.length;u++){var D=k.getCellGeometry(f[u]);null!=D&&(D=D.clone(),k.isCellMovable(f[u])&&(D.relative=F.checked,
-0<mxUtils.trim(O.value).length&&(D.x=Number(O.value)),0<mxUtils.trim(c.value).length&&(D.y=Number(c.value)),0<mxUtils.trim(e.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.x=Number(e.value)),0<mxUtils.trim(g.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.y=Number(g.value))),k.isCellResizable(f[u])&&(0<mxUtils.trim(n.value).length&&(D.width=Number(n.value)),0<mxUtils.trim(p.value).length&&(D.height=Number(p.value))),k.getModel().setGeometry(f[u],D));0<mxUtils.trim(v.value).length&&
-k.setCellStyles(mxConstants.STYLE_ROTATION,Number(v.value),[f[u]])}}finally{k.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",function(u){13==u.keyCode&&y.click()});x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(d),x.appendChild(y)):(x.appendChild(y),x.appendChild(d));t.appendChild(x);this.container=t},LibraryDialog=function(b,f,k,d,t,x){function C(l){for(l=document.elementFromPoint(l.clientX,
-l.clientY);null!=l&&l.parentNode!=e;)l=l.parentNode;var q=null;if(null!=l){var B=e.firstChild;for(q=0;null!=B&&B!=l;)B=B.nextSibling,q++}return q}function G(l,q,B,J,M,E,K,P,R){try{if(b.spinner.stop(),null==q||"image/"==q.substring(0,6))if(null==l&&null!=K||null==n[l]){var V=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=W.title&&0<W.title.length?W.title:mxResources.get("untitled"));S.style.color=null==W.title||0==
-W.title.length?"#d0d0d0":""};e.style.backgroundImage="";g.style.display="none";var X=M,m=E;if(M>b.maxImageSize||E>b.maxImageSize){var z=Math.min(1,Math.min(b.maxImageSize/Math.max(1,M)),b.maxImageSize/Math.max(1,E));M*=z;E*=z}X>m?(m=Math.round(100*m/X),X=100):(X=Math.round(100*X/m),m=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display="inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition",
-"transform .1s ease-in-out");if(null!=l){var Q=document.createElement("img");Q.setAttribute("src",u.convert(l));Q.style.width=X+"px";Q.style.height=m+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((100-m)/2)+"px";Q.style.paddingLeft=Math.floor((100-X)/2)+"px";L.appendChild(Q)}else if(null!=K){var N=b.stringToCells(Graph.decompress(K.xml));0<N.length&&(b.sidebar.createThumb(N,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var T=document.createElement("img");
-T.setAttribute("src",Editor.closeBlackImage);T.setAttribute("border","0");T.setAttribute("title",mxResources.get("delete"));T.setAttribute("align","top");T.style.paddingTop="4px";T.style.position="absolute";T.style.marginLeft="-12px";T.style.zIndex="1";T.style.cursor="pointer";mxEvent.addListener(T,"dragstart",function(fa){mxEvent.consume(fa)});(function(fa,Y,ia){mxEvent.addListener(T,"click",function(da){n[Y]=null;for(var va=0;va<F.length;va++)if(null!=F[va].data&&F[va].data==Y||null!=F[va].xml&&
-null!=ia&&F[va].xml==ia.xml){F.splice(va,1);break}L.parentNode.removeChild(fa);0==F.length&&(e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",g.style.display="");mxEvent.consume(da)});mxEvent.addListener(T,"dblclick",function(da){mxEvent.consume(da)})})(L,l,K);L.appendChild(T);L.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=
-Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var W=null;null!=l?(W={data:l,w:M,h:E,title:R},null!=P&&(W.aspect=P),n[l]=Q,F.push(W)):null!=K&&(K.aspect="fixed",F.push(K),W=K);mxEvent.addListener(S,"keydown",function(fa){13==fa.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(fa))});V();L.appendChild(S);mxEvent.addListener(S,"mousedown",function(fa){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(fa)});N=function(fa){if(mxClient.IS_IOS||
-mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var Y=new FilenameDialog(b,W.title||"",mxResources.get("ok"),function(ia){null!=ia&&(W.title=ia,V())},mxResources.get("enterValue"));b.showDialog(Y.container,300,80,!0,!0);Y.init();mxEvent.consume(fa)}else if("true"!=S.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==W.title||0==W.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);y=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";W.title=S.innerHTML;V()};mxEvent.consume(fa)}};mxEvent.addListener(S,"click",N);mxEvent.addListener(L,"dblclick",N);e.appendChild(L);mxEvent.addListener(L,"dragstart",function(fa){null==l&&null!=K&&(T.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=K.xml&&fa.dataTransfer.setData("Text",
-K.xml);p=C(fa);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);T.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(fa){"hidden"==T.style.visibility&&(T.style.visibility="",S.style.visibility="");p=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else D||(D=!0,b.handleError({message:mxResources.get("fileExists")}));else{M=
-!1;try{if(X=mxUtils.parseXml(l),"mxlibrary"==X.documentElement.nodeName){m=JSON.parse(mxUtils.getTextContent(X.documentElement));if(null!=m&&0<m.length)for(var Z=0;Z<m.length;Z++)null!=m[Z].xml?G(null,null,0,0,0,0,m[Z]):G(m[Z].data,null,0,0,m[Z].w,m[Z].h,null,"fixed",m[Z].title);M=!0}else if("mxfile"==X.documentElement.nodeName){var ba=X.documentElement.getElementsByTagName("diagram");for(Z=0;Z<ba.length;Z++){m=mxUtils.getTextContent(ba[Z]);N=b.stringToCells(Graph.decompress(m));var aa=b.editor.graph.getBoundingBoxFromGeometry(N);
-G(null,null,0,0,0,0,{xml:m,w:aa.width,h:aa.height})}M=!0}}catch(fa){}M||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){}return null}function H(l){l.dataTransfer.dropEffect=null!=p?"move":"copy";l.stopPropagation();l.preventDefault()}function I(l){l.stopPropagation();l.preventDefault();D=!1;v=C(l);if(null!=p)null!=v&&v<e.children.length?(F.splice(v>p?v-1:v,0,F.splice(p,1)[0]),e.insertBefore(e.children[p],e.children[v])):(F.push(F.splice(p,1)[0]),e.appendChild(e.children[p]));
-else if(0<l.dataTransfer.files.length)b.importFiles(l.dataTransfer.files,0,0,b.maxImageSize,A(l));else if(0<=mxUtils.indexOf(l.dataTransfer.types,"text/uri-list")){var q=decodeURIComponent(l.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(q)||/(\.png)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.svg)($|\?)/i.test(q))&&b.loadImage(q,function(B){G(q,null,0,0,B.width,B.height);e.scrollTop=e.scrollHeight})}l.stopPropagation();l.preventDefault()}var F=[];k=document.createElement("div");
-k.style.height="100%";var O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.height="40px";k.appendChild(O);mxUtils.write(O,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var c=document.createElement("input");c.setAttribute("value",f);c.style.marginRight="20px";c.style.marginLeft="10px";c.style.width="500px";null==t||t.isRenamable()||c.setAttribute("disabled","true");this.init=function(){if(null==t||t.isRenamable())c.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)};O.appendChild(c);var e=document.createElement("div");e.style.borderWidth="1px 0px 1px 0px";e.style.borderColor="#d3d3d3";e.style.borderStyle="solid";e.style.marginTop="6px";e.style.overflow="auto";e.style.height="340px";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";0==F.length&&Graph.fileSupport&&(e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var g=document.createElement("div");
-g.style.position="absolute";g.style.width="640px";g.style.top="260px";g.style.textAlign="center";g.style.fontSize="22px";g.style.color="#a0c3ff";mxUtils.write(g,mxResources.get("dragImagesHere"));k.appendChild(g);var n={},p=null,v=null,y=null;f=function(l){"true"!=mxEvent.getSource(l).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(l))};mxEvent.addListener(e,"mousedown",f);mxEvent.addListener(e,"pointerdown",f);mxEvent.addListener(e,"touchstart",f);var u=new mxUrlConverter,D=
-!1;if(null!=d)for(f=0;f<d.length;f++)O=d[f],G(O.data,null,0,0,O.w,O.h,O,O.aspect,O.title);mxEvent.addListener(e,"dragleave",function(l){g.style.cursor="";for(var q=mxEvent.getSource(l);null!=q;){if(q==e||q==g){l.stopPropagation();l.preventDefault();break}q=q.parentNode}});var A=function(l){return function(q,B,J,M,E,K,P,R,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(X){G(X,B,J,M,E,K,P,"fixed",mxEvent.isAltDown(l)?
-null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(q,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(X){4==X.readyState&&(b.spinner.stop(),200<=X.status&&299>=X.status&&(G(X.responseText,B,J,M,E,K,P,"fixed",mxEvent.isAltDown(l)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),e.scrollTop=e.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(G(q,B,J,M,E,K,P,"fixed",mxEvent.isAltDown(l)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),e.scrollTop=e.scrollHeight)}};mxEvent.addListener(e,"dragover",H);mxEvent.addListener(e,"drop",I);mxEvent.addListener(g,"dragover",H);mxEvent.addListener(g,"drop",I);k.appendChild(e);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&
-d.appendChild(f);"draw.io"!=b.getServiceName()||null==t||t.constructor!=DriveLibrary&&t.constructor!=GitHubLibrary||(O=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&t.getPublicUrl(function(l){b.spinner.stop();if(null!=l){var q=b.getSearch("create title mode url drive splash state clibs ui".split(" "));q+=(0==q.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(l);l=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
-"/"+q,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(l.container,450,240,!0);l.init()}else t.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(t.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),O.className="geBtn",d.appendChild(O));O=mxUtils.button(mxResources.get("export"),
-function(){var l=b.createLibraryDataFromImages(F),q=c.value;/(\.xml)$/i.test(q)||(q+=".xml");b.isLocalFileSave()?b.saveLocalFile(l,q,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(q)+"&format=xml&xml="+encodeURIComponent(l))).simulate(document,"_blank")});O.setAttribute("id","btnDownload");O.className="geBtn";d.appendChild(O);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");
-U.setAttribute("type","file");mxEvent.addListener(U,"change",function(l){D=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(q,B,J,M,E,K,P,R,V){null!=U.files&&(A(l)(q,B,J,M,E,K,P,R,V),U.type="",U.type="file",U.value="")});e.scrollTop=e.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}O=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});O.setAttribute("id","btnAddImage");O.className="geBtn";d.appendChild(O)}O=
-mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),y=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(l,q,B){D=!1;if(null!=l){if("data:image/"==l.substring(0,11)){var J=l.indexOf(",");0<J&&(l=l.substring(0,J)+";base64,"+l.substring(J+1))}G(l,null,0,0,q,B);e.scrollTop=e.scrollHeight}})});O.setAttribute("id","btnAddImageUrl");O.className="geBtn";d.appendChild(O);this.saveBtnClickHandler=function(l,q,B,J){b.saveLibrary(l,q,B,J)};O=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(c.value,F,t,x)}));O.setAttribute("id","btnSave");O.className="geBtn gePrimaryBtn";d.appendChild(O);b.editor.cancelFirst||d.appendChild(f);k.appendChild(d);this.container=k},EditShapeDialog=function(b,f,k,d,t){d=null!=d?d:300;t=null!=t?t:120;var x=document.createElement("table"),C=document.createElement("tbody");x.style.cellPadding="4px";var G=document.createElement("tr");var H=document.createElement("td");H.setAttribute("colspan",
-"2");H.style.fontSize="10pt";mxUtils.write(H,k);G.appendChild(H);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");var I=document.createElement("textarea");I.style.outline="none";I.style.resize="none";I.style.width=d-200+"px";I.style.height=t+"px";this.textarea=I;this.init=function(){I.focus();I.scrollTop=0};H.appendChild(I);G.appendChild(H);H=document.createElement("td");k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.top=
-"6px";k.style.width="200px";k.style.height=t+4+"px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);H.appendChild(k);var F=new Graph(k);F.setEnabled(!1);var O=b.editor.graph.cloneCell(f);F.addCells([O]);k=F.view.getState(O);var c="";null!=k.shape&&null!=k.shape.stencil&&(c=mxUtils.getPrettyXml(k.shape.stencil.desc));mxUtils.write(I,c||"");k=F.getGraphBounds();t=Math.min(160/k.width,(t-40)/k.height);F.view.scaleAndTranslate(t,20/t-k.x,20/t-k.y);G.appendChild(H);
-C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.setAttribute("colspan","2");H.style.paddingTop="2px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),t.className="geBtn",H.appendChild(t));t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&H.appendChild(t);
-var e=function(g,n,p){var v=I.value,y=mxUtils.parseXml(v);v=mxUtils.getPrettyXml(y.documentElement);y=y.documentElement.getElementsByTagName("parsererror");if(null!=y&&0<y.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(p&&b.hideDialog(),y=!g.model.contains(n),!p||y||v!=c){v=Graph.compress(v);g.getModel().beginUpdate();try{if(y){var u=b.editor.graph.getFreeInsertPoint();n.geometry.x=u.x;n.geometry.y=u.y;g.addCell(n)}g.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+v+")",[n])}catch(D){throw D;}finally{g.getModel().endUpdate()}y&&(g.setSelectionCell(n),g.scrollCellToVisible(n))}};k=mxUtils.button(mxResources.get("preview"),function(){e(F,O,!1)});k.className="geBtn";H.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){e(b.editor.graph,f,!0)});k.className="geBtn gePrimaryBtn";H.appendChild(k);b.editor.cancelFirst||H.appendChild(t);G.appendChild(H);C.appendChild(G);x.appendChild(C);this.container=x},CustomDialog=function(b,f,k,d,t,x,
-C,G,H,I,F){var O=document.createElement("div");O.appendChild(f);var c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="center";null!=C&&c.appendChild(C);b.isOffline()||null==x||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(x)}),f.className="geBtn",c.appendChild(f));H=mxUtils.button(H||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});H.className="geBtn";G&&(H.style.display="none");b.editor.cancelFirst&&c.appendChild(H);t=mxUtils.button(t||
-mxResources.get("ok"),mxUtils.bind(this,function(){I||b.hideDialog(null,null,this.container);if(null!=k){var e=k();if("string"===typeof e){b.showError(mxResources.get("error"),e);return}}I&&b.hideDialog(null,null,this.container)}));c.appendChild(t);t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||c.appendChild(H);if(null!=F)for(G=0;G<F.length;G++)(function(e,g,n){e=mxUtils.button(e,function(p){g(p)});null!=n&&e.setAttribute("title",n);e.className="geBtn";c.appendChild(e)})(F[G][0],F[G][1],F[G][2]);
-O.appendChild(c);this.cancelBtn=H;this.okButton=t;this.container=O},TemplatesDialog=function(b,f,k,d,t,x,C,G,H,I,F,O,c,e,g){function n(ja){Ia.innerText=ja;Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function p(){null!=m&&(m.style.fontWeight="normal",m.style.textDecoration="none",z=m,m=null)}function v(ja,la,pa,xa,Ba,Fa,Ca){if(-1<ja.className.indexOf("geTempDlgRadioBtnActive"))return!1;ja.className+=" geTempDlgRadioBtnActive";R.querySelector(".geTempDlgRadioBtn[data-id="+
-xa+"]").className="geTempDlgRadioBtn "+(Ca?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");R.querySelector("."+la).src="/images/"+pa+"-sel.svg";R.querySelector("."+Ba).src="/images/"+Fa+".svg";return!0}function y(ja,la,pa,xa){function Ba(ra,Ma){null==Ca?(ra=/^https?:\/\//.test(ra)&&!b.editor.isCorsEnabledForUrl(ra)?PROXY_URL+"?url="+encodeURIComponent(ra):TEMPLATE_PATH+"/"+ra,mxUtils.get(ra,mxUtils.bind(this,function(Qa){200<=Qa.getStatus()&&299>=Qa.getStatus()&&(Ca=Qa.getText());Ma(Ca)}))):Ma(Ca)}
-function Fa(ra,Ma,Qa){if(null!=ra&&mxUtils.isAncestorNode(document.body,la)&&(ra=mxUtils.parseXml(ra),ra=Editor.extractGraphModel(ra.documentElement,!0),null!=ra)){"mxfile"==ra.nodeName&&(ra=Editor.parseDiagramNode(ra.getElementsByTagName("diagram")[0]));var Va=new mxCodec(ra.ownerDocument),Ga=new mxGraphModel;Va.decode(ra,Ga);ra=Ga.root.getChildAt(0).children||[];b.sidebar.createTooltip(la,ra,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!=ja.title?mxResources.get(ja.title,null,ja.title):null,!0,new mxPoint(Ma,Qa),!0,null,!0);var Ja=document.createElement("div");Ja.className="geTempDlgDialogMask";R.appendChild(Ja);var Ka=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ja&&(R.removeChild(Ja),Ja=null,Ka.apply(this,arguments),b.sidebar.hideTooltip=Ka)};mxEvent.addListener(Ja,"click",function(){b.sidebar.hideTooltip()})}}var Ca=null;if(Na||b.sidebar.currentElt==
-la)b.sidebar.hideTooltip();else{var ua=function(ra){Na&&b.sidebar.currentElt==la&&Fa(ra,mxEvent.getClientX(xa),mxEvent.getClientY(xa));Na=!1;pa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=la;Na=!0;pa.src="/images/aui-wait.gif";ja.isExt?H(ja,ua,function(){n(mxResources.get("cantLoadPrev"));Na=!1;pa.src="/images/icon-search.svg"}):Ba(ja.url,ua)}}function u(ja,la,pa){if(null!=L){for(var xa=L.className.split(" "),Ba=0;Ba<xa.length;Ba++)if(-1<xa[Ba].indexOf("Active")){xa.splice(Ba,
-1);break}L.className=xa.join(" ")}null!=ja?(L=ja,L.className+=" "+la,Q=pa,Pa.className="geTempDlgCreateBtn"):(Q=L=null,Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function D(ja,la){if(null!=Q){var pa=function(ua){Ca.isExternal?H(Ca,function(ra){xa(ra,ua)},Ba):Ca.url?mxUtils.get(TEMPLATE_PATH+"/"+Ca.url,mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?xa(ra.getText(),ua):Ba()})):xa(b.emptyDiagramXml,ua)},xa=function(ua,ra){g||b.hideDialog(!0);f(ua,ra,Ca,la)},Ba=function(){n(mxResources.get("cannotLoad"));
-Fa()},Fa=function(){Q=Ca;Pa.className="geTempDlgCreateBtn";la&&(La.className="geTempDlgOpenBtn")},Ca=Q;Q=null;"boolean"!==typeof la&&(la=Ca.isExternal&&O);1==ja?I(Ca.url,Ca):la?(La.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",pa()):(Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ja=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ja=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),pa,ja,function(ua){var ra=null!=ua&&0<ua.length;return ra&&g?(pa(ua),!1):ra},null,null,null,Fa,e?null:[]),b.showDialog(ja.container,350,80,!0,!0),ja.init())}}function A(ja){Pa.innerText=mxResources.get(fa||ja?"create":"copy");ja=ja?"none":"";O&&(La.style.display=ja);for(var la=R.querySelectorAll(".geTempDlgLinkToDiagram"),pa=0;pa<la.length;pa++)la[pa].style.display=ja}function U(ja,la,pa,xa,Ba){Ba||(ia.innerText="",u(),W=ja,Z=xa);var Fa=null;if(pa){Fa=document.createElement("table");
-Fa.className="geTempDlgDiagramsListGrid";var Ca=document.createElement("tr"),ua=document.createElement("th");ua.style.width="50%";ua.innerText=mxResources.get("diagram");Ca.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("changedBy");Ca.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("lastModifiedOn");Ca.appendChild(ua);Fa.appendChild(Ca);ia.appendChild(Fa)}for(Ca=0;Ca<ja.length;Ca++){ja[Ca].isExternal=
-!la;var ra=ja[Ca].url,Ma=(ua=mxUtils.htmlEntities(la?mxResources.get(ja[Ca].title,null,ja[Ca].title):ja[Ca].title))||ja[Ca].url,Qa=ja[Ca].imgUrl,Va=ja[Ca].changedBy||"",Ga="";ja[Ca].lastModifiedOn&&(Ga=b.timeSince(new Date(ja[Ca].lastModifiedOn)),null==Ga&&(Ga=mxResources.get("lessThanAMinute")),Ga=mxResources.get("timeAgo",[Ga],"{1} ago"));Qa||(Qa=TEMPLATE_PATH+"/"+ra.substring(0,ra.length-4)+".png");ra=pa?50:15;null!=ua&&ua.length>ra&&(ua=ua.substring(0,ra)+"&hellip;");if(pa){var Ja=document.createElement("tr");
-Qa=document.createElement("td");var Ka=document.createElement("img");Ka.src="/images/icon-search.svg";Ka.className="geTempDlgDiagramListPreviewBtn";Ka.setAttribute("title",mxResources.get("preview"));Ba||Qa.appendChild(Ka);Ma=document.createElement("span");Ma.className="geTempDlgDiagramTitle";Ma.innerHTML=ua;Qa.appendChild(Ma);Ja.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Va;Ja.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Ga;Ja.appendChild(Qa);Fa.appendChild(Ja);
-null==L&&(A(la),u(Ja,"geTempDlgDiagramsListGridActive",ja[Ca]));(function(Ha,Ta,Sa){mxEvent.addListener(Ja,"click",function(){L!=Ta&&(A(la),u(Ta,"geTempDlgDiagramsListGridActive",Ha))});mxEvent.addListener(Ja,"dblclick",D);mxEvent.addListener(Ka,"click",function(Wa){y(Ha,Ta,Sa,Wa)})})(ja[Ca],Ja,Ka)}else{var Oa=document.createElement("div");Oa.className="geTempDlgDiagramTile";Oa.setAttribute("title",Ma);null==L&&(A(la),u(Oa,"geTempDlgDiagramTileActive",ja[Ca]));Va=document.createElement("div");Va.className=
-"geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ha,Ta,Sa){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ha.style.display=""};Ra.onerror=function(){this.src!=Sa?this.src=Sa:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,Va,Qa?Qa.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Ra.src=Qa;Va.appendChild(Ra);Oa.appendChild(Va);Va=document.createElement("div");
-Va.className="geTempDlgDiagramTileLbl";Va.innerHTML=null!=ua?ua:"";Oa.appendChild(Va);Ka=document.createElement("img");Ka.src="/images/icon-search.svg";Ka.className="geTempDlgDiagramPreviewBtn";Ka.setAttribute("title",mxResources.get("preview"));Ba||Oa.appendChild(Ka);(function(Ha,Ta,Sa){mxEvent.addListener(Oa,"click",function(){L!=Ta&&(A(la),u(Ta,"geTempDlgDiagramTileActive",Ha))});mxEvent.addListener(Oa,"dblclick",D);mxEvent.addListener(Ka,"click",function(Wa){y(Ha,Ta,Sa,Wa)})})(ja[Ca],Oa,Ka);ia.appendChild(Oa)}}for(var Ua in xa)ja=
-xa[Ua],0<ja.length&&(Ba=document.createElement("div"),Ba.className="geTempDlgImportCat",Ba.innerText=mxResources.get(Ua,null,Ua),ia.appendChild(Ba),U(ja,la,pa,null,!0))}function l(ja,la){ca.innerText="";u();var pa=Math.floor(ca.offsetWidth/150)-1;la=!la&&ja.length>pa?pa:ja.length;for(var xa=0;xa<la;xa++){var Ba=ja[xa];Ba.isCategory=!0;var Fa=document.createElement("div"),Ca=mxResources.get(Ba.title);null==Ca&&(Ca=Ba.title.substring(0,1).toUpperCase()+Ba.title.substring(1));Fa.className="geTempDlgNewDiagramCatItem";
-Fa.setAttribute("title",Ca);Ca=mxUtils.htmlEntities(Ca);15<Ca.length&&(Ca=Ca.substring(0,15)+"&hellip;");null==L&&(A(!0),u(Fa,"geTempDlgNewDiagramCatItemActive",Ba));var ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";var ra=document.createElement("img");ra.src=NEW_DIAGRAM_CATS_PATH+"/"+Ba.img;ua.appendChild(ra);Fa.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerHTML=Ca;Fa.appendChild(ua);ca.appendChild(Fa);(function(Ma,
-Qa){mxEvent.addListener(Fa,"click",function(){L!=Qa&&(A(!0),u(Qa,"geTempDlgNewDiagramCatItemActive",Ma))});mxEvent.addListener(Fa,"dblclick",D)})(Ba,Fa)}Fa=document.createElement("div");Fa.className="geTempDlgNewDiagramCatItem";Ca=mxResources.get("showAllTemps");Fa.setAttribute("title",Ca);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";ua.innerText="...";ua.style.fontSize="32px";Fa.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";
-ua.innerText=Ca;Fa.appendChild(ua);ca.appendChild(Fa);mxEvent.addListener(Fa,"click",function(){function Ma(){var Va=Qa.querySelector(".geTemplateDrawioCatLink");null!=Va?Va.click():setTimeout(Ma,200)}fa=!0;var Qa=R.querySelector(".geTemplatesList");Qa.style.display="block";Aa.style.width="";Da.style.display="";Da.value="";ba=null;Ma()});Y.style.display=ja.length<=pa?"none":""}function q(ja,la,pa){function xa(Ra,Ua){var Ha=mxResources.get(Ra);null==Ha&&(Ha=Ra.substring(0,1).toUpperCase()+Ra.substring(1));
-Ra=Ha+" ("+Ua.length+")";var Ta=Ha=mxUtils.htmlEntities(Ha);15<Ha.length&&(Ha=Ha.substring(0,15)+"&hellip;");return{lbl:Ha+" ("+Ua.length+")",fullLbl:Ra,lblOnly:Ta}}function Ba(Ra,Ua,Ha,Ta,Sa){mxEvent.addListener(Ha,"click",function(){m!=Ha&&(null!=m?(m.style.fontWeight="normal",m.style.textDecoration="none"):(ta.style.display="none",ya.style.minHeight="100%"),m=Ha,m.style.fontWeight="bold",m.style.textDecoration="underline",Aa.scrollTop=0,V&&(X=!0),da.innerHTML=Ua,va.style.display="none",U(Sa?la[Ra]:
-Ta?za[Ra][Ta]:ja[Ra],Sa?!1:!0))})}var Fa=R.querySelector(".geTemplatesList");if(0<pa){pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,mxResources.get("custom"));Fa.appendChild(pa);for(var Ca in la){pa=document.createElement("div");var ua=la[Ca];ua=xa(Ca,ua);pa.className="geTemplateCatLink";pa.setAttribute("title",ua.fullLbl);pa.innerHTML=ua.lbl;Fa.appendChild(pa);Ba(Ca,ua.lblOnly,pa,
-null,!0)}pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,"draw.io");Fa.appendChild(pa)}for(Ca in ja){var ra=za[Ca],Ma=pa=document.createElement(ra?"ul":"div");ua=ja[Ca];ua=xa(Ca,ua);if(null!=ra){var Qa=document.createElement("li"),Va=document.createElement("div");Va.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Va.style.padding="0";Va.setAttribute("title",ua.fullLbl);
-Va.innerHTML=ua.lbl;Ma=Va;Qa.appendChild(Va);var Ga=document.createElement("ul");Ga.className="geTempTreeNested";Ga.style.visibility="hidden";for(var Ja in ra){var Ka=document.createElement("li"),Oa=xa(Ja,ra[Ja]);Ka.setAttribute("title",Oa.fullLbl);Ka.innerHTML=Oa.lbl;Ka.className="geTemplateCatLink";Ka.style.padding="0";Ka.style.margin="0";Ba(Ca,Oa.lblOnly,Ka,Ja);Ga.appendChild(Ka)}Qa.appendChild(Ga);pa.className="geTempTree";pa.appendChild(Qa);(function(Ra,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ha=
-Ra.querySelectorAll("li"),Ta=0;Ta<Ha.length;Ta++)Ha[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Sa=0;Sa<Ha.length;Sa++)Ha[Sa].style.margin="0";Ra.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ga,Va)}else pa.className="geTemplateCatLink geTemplateDrawioCatLink",pa.setAttribute("title",ua.fullLbl),pa.innerHTML=ua.lbl;Fa.appendChild(pa);Ba(Ca,ua.lblOnly,
-Ma)}}function B(){mxUtils.get(d,function(ja){if(!wa){wa=!0;ja=ja.getXml().documentElement.firstChild;for(var la={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("clibs"==ja.nodeName){for(var pa=ja.getAttribute("name"),xa=ja.getElementsByTagName("add"),Ba=[],Fa=0;Fa<xa.length;Fa++)Ba.push(encodeURIComponent(mxUtils.getTextContent(xa[Fa])));null!=pa&&0<Ba.length&&(la[pa]=Ba.join(";"))}else if(Ba=ja.getAttribute("url"),null!=Ba){xa=ja.getAttribute("section");pa=ja.getAttribute("subsection");
-if(null==xa&&(Fa=Ba.indexOf("/"),xa=Ba.substring(0,Fa),null==pa)){var Ca=Ba.indexOf("/",Fa+1);-1<Ca&&(pa=Ba.substring(Fa+1,Ca))}Fa=ea[xa];null==Fa&&(sa++,Fa=[],ea[xa]=Fa);Ba=ja.getAttribute("clibs");null!=la[Ba]&&(Ba=la[Ba]);Ba={url:ja.getAttribute("url"),libs:ja.getAttribute("libs"),title:ja.getAttribute("title")||ja.getAttribute("name"),preview:ja.getAttribute("preview"),clibs:Ba,tags:ja.getAttribute("tags")};Fa.push(Ba);null!=pa&&(Fa=za[xa],null==Fa&&(Fa={},za[xa]=Fa),xa=Fa[pa],null==xa&&(xa=[],
-Fa[pa]=xa),xa.push(Ba))}ja=ja.nextSibling}q(ea,ka,ma)}})}function J(ja){C&&(Aa.scrollTop=0,ia.innerText="",qa.spin(ia),X=!1,V=!0,da.innerText=mxResources.get("recentDiag"),ba=null,C(na,function(){n(mxResources.get("cannotLoad"));na([])},ja?null:x))}function M(ja){if(""==ja)null!=z&&(z.click(),z=null);else{if(null==TemplatesDialog.tagsList[d]){var la={};for(Ma in ea)for(var pa=ea[Ma],xa=0;xa<pa.length;xa++){var Ba=pa[xa];if(null!=Ba.tags)for(var Fa=Ba.tags.toLowerCase().split(";"),Ca=0;Ca<Fa.length;Ca++)null==
-la[Fa[Ca]]&&(la[Fa[Ca]]=[]),la[Fa[Ca]].push(Ba)}TemplatesDialog.tagsList[d]=la}var ua=ja.toLowerCase().split(" ");la=TemplatesDialog.tagsList[d];if(0<ma&&null==la.__tagsList__){for(Ma in ka)for(pa=ka[Ma],xa=0;xa<pa.length;xa++)for(Ba=pa[xa],Fa=Ba.title.split(" "),Fa.push(Ma),Ca=0;Ca<Fa.length;Ca++){var ra=Fa[Ca].toLowerCase();null==la[ra]&&(la[ra]=[]);la[ra].push(Ba)}la.__tagsList__=!0}var Ma=[];pa={};for(xa=Fa=0;xa<ua.length;xa++)if(0<ua[xa].length){ra=la[ua[xa]];var Qa={};Ma=[];if(null!=ra)for(Ca=
-0;Ca<ra.length;Ca++)Ba=ra[Ca],0==Fa==(null==pa[Ba.url])&&(Qa[Ba.url]=!0,Ma.push(Ba));pa=Qa;Fa++}0==Ma.length?da.innerText=mxResources.get("noResultsFor",[ja]):U(Ma,!0)}}function E(ja){if(ba!=ja||T!=aa)p(),Aa.scrollTop=0,ia.innerText="",da.innerText=mxResources.get("searchResults")+' "'+ja+'"',Ea=null,fa?M(ja):G&&(ja?(qa.spin(ia),X=!1,V=!0,G(ja,na,function(){n(mxResources.get("searchFailed"));na([])},T?null:x)):J(T)),ba=ja,aa=T}function K(ja){null!=Ea&&clearTimeout(Ea);13==ja.keyCode?E(Da.value):Ea=
-setTimeout(function(){E(Da.value)},1E3)}var P='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(G?"":'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>'+
+"change",function(){0<C.value.length&&0<H.test(C.value)?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")});mxEvent.addListener(C,"keyup",function(){0<C.value.length&&H.test(C.value)?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")})}q.appendChild(C);this.init=function(){C.focus()};var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("checked","checked");I.defaultChecked=!0;k=document.createElement("p");k.style.marginTop="14px";
+k.appendChild(I);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("includeCopyOfMyDiagram"));k.appendChild(x);mxEvent.addListener(x,"click",function(O){I.checked=!I.checked;mxEvent.consume(O)});q.appendChild(k);x=document.createElement("div");mxUtils.write(x,mxResources.get("feedback"));q.appendChild(x);var E=document.createElement("textarea");E.style.resize="none";E.style.width="600px";E.style.height="140px";E.style.marginTop="6px";E.setAttribute("placeholder",mxResources.get("comments"));
+q.appendChild(E);k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst?(k.appendChild(x),k.appendChild(G)):(k.appendChild(G),k.appendChild(x));q.appendChild(k);this.container=q};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(b,g,k){var d=document.createElement("div"),q=document.createElement("h3");q.style.marginTop="0px";mxUtils.write(q,mxResources.get("revisionHistory"));d.appendChild(q);q=document.createElement("div");q.style.position="absolute";q.style.overflow="auto";q.style.width="170px";q.style.height="378px";d.appendChild(q);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";x.style.left="200px";x.style.width="470px";x.style.height="376px";
+x.style.overflow="hidden";var C=document.createElement("div");C.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";x.appendChild(C);mxEvent.disableContextMenu(x);d.appendChild(x);var G=new Graph(x);G.setTooltips(!1);G.setEnabled(!1);G.setPanning(!0);G.panningHandler.ignoreCell=!0;G.panningHandler.useLeftButtonForPanning=!0;G.minFitScale=null;G.maxFitScale=null;G.centerZoom=!0;var H=0,I=null,E=0,O=G.getGlobalVariable;
+G.getGlobalVariable=function(W){return"page"==W&&null!=I&&null!=I[E]?I[E].getAttribute("name"):"pagenumber"==W?E+1:"pagecount"==W?null!=I?I.length:1:O.apply(this,arguments)};G.getLinkForCell=function(){return null};Editor.MathJaxRender&&G.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(W,Z){b.editor.graph.mathEnabled&&Editor.MathJaxRender(G.container)}));var c={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%"},e=new Spinner(c),f=b.getCurrentFile(),n=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),p={};for(c=0;c<n.length;c++)p[n[c].getAttribute("id")]=n[c];var t=null,y=null,v=null,D=null,A=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=v&&G.zoomIn()},20);A.setAttribute("disabled","disabled");var U=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=v&&
+G.zoomOut()},20);U.setAttribute("disabled","disabled");var l=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=v&&(1==G.view.scale?(G.maxFitScale=8,G.fit(8)):G.zoomActual(),G.center())},20);l.setAttribute("disabled","disabled");var u=b.createToolbarButton(Editor.compareImage,mxResources.get("zoomOut"),null,20);u.setAttribute("disabled","disabled");var B=x.cloneNode(!1);B.style.pointerEvent="none";x.parentNode.appendChild(B);var J=new Graph(B);J.setTooltips(!1);J.setEnabled(!1);
+J.setPanning(!0);J.panningHandler.ignoreCell=!0;J.panningHandler.useLeftButtonForPanning=!0;J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;var M=document.createElement("div");M.style.position="absolute";M.style.textAlign="left";M.style.color="gray";M.style.marginTop="8px";M.style.backgroundColor="transparent";M.style.top="440px";M.style.left="32px";M.style.maxWidth="380px";M.style.cursor="default";var F=null;mxEvent.addGestureListeners(u,function(W){W=p[I[H].getAttribute("id")];mxUtils.setOpacity(u,
+20);C.innerText="";null==W?mxUtils.write(C,mxResources.get("pageNotFound")):(F=M.innerHTML,M.innerHTML=mxResources.get("current"),x.style.display="none",B.style.display="",B.style.backgroundColor=x.style.backgroundColor,W=Editor.parseDiagramNode(W),(new mxCodec(W.ownerDocument)).decode(W,J.getModel()),J.view.scaleAndTranslate(G.view.scale,G.view.translate.x,G.view.translate.y))},null,function(){mxUtils.setOpacity(u,60);C.innerText="";"none"==x.style.display&&(x.style.display="",M.innerHTML=F,B.style.display=
+"none")});var K=mxUtils.button(mxResources.get("download"),function(){if(null!=v){var W=mxUtils.getXml(v.documentElement),Z=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(W,Z,"text/xml"):(W="undefined"===typeof pako?"&xml="+encodeURIComponent(W):"&data="+encodeURIComponent(Graph.compress(W)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Z)+"&format=xml"+W)).simulate(document,"_blank"))}});K.className="geBtn";K.setAttribute("disabled","disabled");var P=mxUtils.button(mxResources.get("restore"),
+function(W){null!=v&&null!=D&&(mxEvent.isShiftDown(W)?null!=v&&(W=b.getPagesForNode(v.documentElement),W=b.diffPages(b.pages,W),W=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(W,null,2),function(Z){if(0<Z.length)try{b.confirm(mxResources.get("areYouSure"),function(){f.patch([JSON.parse(Z)],null,!0);b.hideDialog();b.hideDialog()})}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(W.container,620,460,!0,!0),W.init()):b.confirm(mxResources.get("areYouSure"),
+function(){null!=k?k(D):b.spinner.spin(document.body,mxResources.get("restoring"))&&f.save(!0,function(Z){b.spinner.stop();b.replaceFileData(D);b.hideDialog()},function(Z){b.spinner.stop();b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)})}))});P.className="geBtn";P.setAttribute("disabled","disabled");P.setAttribute("title","Shift+Click for Diff");var R=document.createElement("select");R.setAttribute("disabled","disabled");R.style.userSelect="none";R.style.maxWidth=
+"100px";R.style.position="relative";R.style.top="-2px";R.style.verticalAlign="bottom";R.style.marginLeft="10px";R.style.display="none";var V=null;mxEvent.addListener(R,"change",function(W){null!=V&&(V(W),mxEvent.consume(W))});var X=mxUtils.button(mxResources.get("edit"),function(){null!=v&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(v.documentElement)),b.openLink(b.getUrl(),null,!0))});X.className="geBtn";X.setAttribute("disabled","disabled");
+null!=k&&(X.style.display="none");var m=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(R.selectedIndex))});m.className="geBtn gePrimaryBtn";m.setAttribute("disabled","disabled");null!=k&&(m.style.display="none",P.className="geBtn gePrimaryBtn");n=document.createElement("div");n.style.position="absolute";n.style.top="482px";n.style.right="28px";n.style.left="32px";n.style.textAlign="right";var z=document.createElement("div");z.className="geToolbarContainer";z.style.backgroundColor=
+"transparent";z.style.padding="2px";z.style.border="none";z.style.top="442px";z.style.right="28px";var L=null;if(null!=g&&0<g.length){x.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 N=document.createElement("tbody"),T=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(H=mxUtils.indexOf(b.pages,b.currentPage));for(c=g.length-1;0<=c;c--){var S=function(W){var Z=
+new Date(W.modifiedDate),ba=null;if(0<=Z.getTime()){var aa=function(Y){e.stop();C.innerText="";var ia=mxUtils.parseXml(Y),da=b.editor.extractGraphModel(ia.documentElement,!0);if(null!=da){var va=function(ya){null!=ya&&(ya=Aa(Editor.parseDiagramNode(ya)));return ya},Aa=function(ya){var ta=ya.getAttribute("background");if(null==ta||""==ta||ta==mxConstants.NONE)ta=G.defaultPageBackgroundColor;x.style.backgroundColor=ta;(new mxCodec(ya.ownerDocument)).decode(ya,G.getModel());G.maxFitScale=1;G.fit(8);
+G.center();return ya};R.style.display="none";R.innerText="";v=ia;D=Y;I=parseSelectFunction=null;E=0;if("mxfile"==da.nodeName){ia=da.getElementsByTagName("diagram");I=[];for(Y=0;Y<ia.length;Y++)I.push(ia[Y]);E=Math.min(H,I.length-1);0<I.length&&va(I[E]);if(1<I.length)for(R.removeAttribute("disabled"),R.style.display="",Y=0;Y<I.length;Y++)ia=document.createElement("option"),mxUtils.write(ia,I[Y].getAttribute("name")||mxResources.get("pageWithNumber",[Y+1])),ia.setAttribute("value",Y),Y==E&&ia.setAttribute("selected",
+"selected"),R.appendChild(ia);V=function(){try{var ya=parseInt(R.value);E=H=ya;va(I[ya])}catch(ta){R.value=H,b.handleError(ta)}}}else Aa(da);Y=W.lastModifyingUserName;null!=Y&&20<Y.length&&(Y=Y.substring(0,20)+"...");M.innerText="";mxUtils.write(M,(null!=Y?Y+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());M.setAttribute("title",ba.getAttribute("title"));A.removeAttribute("disabled");U.removeAttribute("disabled");l.removeAttribute("disabled");u.removeAttribute("disabled");null!=f&&f.isRestricted()||
+(b.editor.graph.isEnabled()&&P.removeAttribute("disabled"),K.removeAttribute("disabled"),m.removeAttribute("disabled"),X.removeAttribute("disabled"));mxUtils.setOpacity(A,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(l,60);mxUtils.setOpacity(u,60)}else R.style.display="none",R.innerText="",M.innerText="",C.innerText="",mxUtils.write(M,mxResources.get("errorLoadingFile")),mxUtils.write(C,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottom="1px solid lightGray";
+ba.style.fontSize="12px";ba.style.cursor="pointer";var fa=document.createElement("td");fa.style.padding="6px";fa.style.whiteSpace="nowrap";W==g[g.length-1]?mxUtils.write(fa,mxResources.get("current")):Z.toDateString()===T?mxUtils.write(fa,Z.toLocaleTimeString()):mxUtils.write(fa,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());ba.appendChild(fa);ba.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=W.fileSize?" "+b.formatFileSize(parseInt(W.fileSize)):"")+(null!=W.lastModifyingUserName?
+" "+W.lastModifyingUserName:""));mxEvent.addListener(ba,"click",function(Y){y!=W&&(e.stop(),null!=t&&(t.style.backgroundColor=""),y=W,t=ba,t.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",D=v=null,M.removeAttribute("title"),M.innerText=mxResources.get("loading")+"...",x.style.backgroundColor=G.defaultPageBackgroundColor,C.innerText="",G.getModel().clear(),P.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),U.setAttribute("disabled",
+"disabled"),l.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),mxUtils.setOpacity(A,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(l,20),mxUtils.setOpacity(u,20),e.spin(x),W.getXml(function(ia){if(y==W)try{aa(ia)}catch(da){M.innerText=mxResources.get("error")+": "+da.message}},function(ia){e.stop();R.style.display="none";R.innerText="";M.innerText="";mxUtils.write(M,
+mxResources.get("errorLoadingFile"));mxUtils.write(C,mxResources.get("errorLoadingFile"))}),mxEvent.consume(Y))});mxEvent.addListener(ba,"dblclick",function(Y){m.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(Y)},!1);N.appendChild(ba)}return ba}(g[c]);null!=S&&c==g.length-1&&(L=S)}Q.appendChild(N);q.appendChild(Q)}else null==f||null==b.drive&&f.constructor==window.DriveFile||null==b.dropbox&&f.constructor==window.DropboxFile?
+(x.style.display="none",z.style.display="none",mxUtils.write(q,mxResources.get("notAvailable"))):(x.style.display="none",z.style.display="none",mxUtils.write(q,mxResources.get("noRevisions")));this.init=function(){null!=L&&L.click()};q=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});q.className="geBtn";z.appendChild(u);z.appendChild(U);z.appendChild(l);z.appendChild(A);z.appendChild(R);b.editor.cancelFirst?(n.appendChild(q),n.appendChild(K),n.appendChild(X),n.appendChild(P),n.appendChild(m)):
+(n.appendChild(K),n.appendChild(X),n.appendChild(P),n.appendChild(m),n.appendChild(q));d.appendChild(n);d.appendChild(z);d.appendChild(M);this.container=d},DraftDialog=function(b,g,k,d,q,x,C,G,H){var I=document.createElement("div"),E=document.createElement("div");E.style.marginTop="0px";E.style.whiteSpace="nowrap";E.style.overflow="auto";E.style.lineHeight="normal";mxUtils.write(E,g);I.appendChild(E);var O=document.createElement("select"),c=mxUtils.bind(this,function(){y=mxUtils.parseXml(H[O.value].data);
+v=b.editor.extractGraphModel(y.documentElement,!0);D=0;this.init()});if(null!=H){O.style.marginLeft="4px";for(g=0;g<H.length;g++){var e=document.createElement("option");e.setAttribute("value",g);var f=new Date(H[g].created),n=new Date(H[g].modified);mxUtils.write(e,f.toLocaleDateString()+" "+f.toLocaleTimeString()+" - "+(f.toDateString(),n.toDateString(),n.toLocaleDateString())+" "+n.toLocaleTimeString());O.appendChild(e)}E.appendChild(O);mxEvent.addListener(O,"change",c)}null==k&&(k=H[0].data);var p=
+document.createElement("div");p.style.position="absolute";p.style.border="1px solid lightGray";p.style.marginTop="10px";p.style.left="40px";p.style.right="40px";p.style.top="46px";p.style.bottom="74px";p.style.overflow="hidden";mxEvent.disableContextMenu(p);I.appendChild(p);var t=new Graph(p);t.setEnabled(!1);t.setPanning(!0);t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var y=mxUtils.parseXml(k),v=b.editor.extractGraphModel(y.documentElement,
+!0),D=0,A=null,U=t.getGlobalVariable;t.getGlobalVariable=function(u){return"page"==u&&null!=A&&null!=A[D]?A[D].getAttribute("name"):"pagenumber"==u?D+1:"pagecount"==u?null!=A?A.length:1:U.apply(this,arguments)};t.getLinkForCell=function(){return null};k=mxUtils.button("",function(){t.zoomIn()});k.className="geSprite geSprite-zoomin";k.setAttribute("title",mxResources.get("zoomIn"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);E=mxUtils.button("",function(){t.zoomOut()});
+E.className="geSprite geSprite-zoomout";E.setAttribute("title",mxResources.get("zoomOut"));E.style.outline="none";E.style.border="none";E.style.margin="2px";mxUtils.setOpacity(E,60);g=mxUtils.button("",function(){t.maxFitScale=8;t.fit(8);t.center()});g.className="geSprite geSprite-fit";g.setAttribute("title",mxResources.get("fit"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);e=mxUtils.button("",function(){t.zoomActual();t.center()});e.className="geSprite geSprite-actualsize";
+e.setAttribute("title",mxResources.get("actualSize"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);C=mxUtils.button(C||mxResources.get("discard"),function(){q.apply(this,[O.value,mxUtils.bind(this,function(){null!=O.parentNode&&(O.options[O.selectedIndex].parentNode.removeChild(O.options[O.selectedIndex]),0<O.options.length?(O.value=O.options[0].value,c()):b.hideDialog(!0))})])});C.className="geBtn";var l=document.createElement("select");l.style.maxWidth=
+"80px";l.style.position="relative";l.style.top="-2px";l.style.verticalAlign="bottom";l.style.marginRight="6px";l.style.display="none";x=mxUtils.button(x||mxResources.get("edit"),function(){d.apply(this,[O.value])});x.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.position="absolute";f.style.bottom="30px";f.style.right="40px";f.style.textAlign="right";n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function u(F){if(null!=F){var K=F.getAttribute("background");if(null==K||""==K||K==mxConstants.NONE)K=Editor.isDarkMode()?"transparent":"#ffffff";p.style.backgroundColor=K;(new mxCodec(F.ownerDocument)).decode(F,t.getModel());t.maxFitScale=1;t.fit(8);t.center()}return F}function B(F){null!=F&&(F=u(Editor.parseDiagramNode(F)));return F}mxEvent.addListener(l,"change",function(F){D=parseInt(l.value);B(A[D]);mxEvent.consume(F)});if("mxfile"==v.nodeName){var J=v.getElementsByTagName("diagram");
+A=[];for(var M=0;M<J.length;M++)A.push(J[M]);0<A.length&&B(A[D]);l.innerText="";if(1<A.length)for(l.style.display="",M=0;M<A.length;M++)J=document.createElement("option"),mxUtils.write(J,A[M].getAttribute("name")||mxResources.get("pageWithNumber",[M+1])),J.setAttribute("value",M),M==D&&J.setAttribute("selected","selected"),l.appendChild(J);else l.style.display="none"}else u(v)};n.appendChild(l);n.appendChild(k);n.appendChild(E);n.appendChild(e);n.appendChild(g);k=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});k.className="geBtn";G=null!=G?mxUtils.button(mxResources.get("ignore"),G):null;null!=G&&(G.className="geBtn");b.editor.cancelFirst?(f.appendChild(k),null!=G&&f.appendChild(G),f.appendChild(C),f.appendChild(x)):(f.appendChild(x),f.appendChild(C),null!=G&&f.appendChild(G),f.appendChild(k));I.appendChild(f);I.appendChild(n);this.container=I},FindWindow=function(b,g,k,d,q,x){function C(V,X,m,z){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
+for(var L=0;L<X.length;L++)if("label"!=X[L].nodeName){var Q=mxUtils.trim(X[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(z&&0<=Q.indexOf(m)||!z&&Q.substring(0,m.length)===m)||null!=V&&V.test(Q))return!0}}return!1}function G(){e&&A.value?(K.removeAttribute("disabled"),P.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));A.value&&D.value?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled")}function H(V,
+X,m){M.innerText="";var z=E.model.getDescendants(E.model.getRoot()),L=D.value.toLowerCase(),Q=U.checked?new RegExp(L):null,N=null;n=null;O!=L&&(O=L,c=null,f=!1);var T=null==c;if(0<L.length){if(f){f=!1;for(var S,W=0;W<b.pages.length;W++)if(b.currentPage==b.pages[W]){S=W;break}V=(S+1)%b.pages.length;c=null;do f=!1,z=b.pages[V],E=b.createTemporaryGraph(E.getStylesheet()),b.updatePageRoot(z),E.model.setRoot(z.root),V=(V+1)%b.pages.length;while(!H(!0,X,m)&&V!=S);c&&(c=null,m?b.editor.graph.model.execute(new SelectPage(b,
+z)):b.selectPage(z));f=!1;E=b.editor.graph;return H(!0,X,m)}for(W=0;W<z.length;W++){S=E.view.getState(z[W]);X&&null!=Q&&(T=T||S==c);if(null!=S&&null!=S.cell.value&&(T||null==N)&&(E.model.isVertex(S.cell)||E.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(u.innerHTML=E.sanitizeHtml(E.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([u])):label=E.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;X&&x&&null!=Q&&S==c&&(label=label.substr(p),
+Z=p);var ba=""==A.value,aa=ba;if(null==Q&&(aa&&0<=label.indexOf(L)||!aa&&label.substring(0,L.length)===L||ba&&C(Q,S.cell,L,aa))||null!=Q&&(Q.test(label)||ba&&C(Q,S.cell,L,aa)))if(x&&(null!=Q?(ba=label.match(Q),null!=ba&&0<ba.length&&(n=ba[0].toLowerCase(),p=Z+ba.index+n.length)):(n=L,p=n.length)),T){N=S;break}else null==N&&(N=S)}T=T||S==c}}if(null!=N){if(W==z.length&&l.checked)return c=null,f=!0,H(!0,X,m);c=N;E.scrollCellToVisible(c.cell);E.isEnabled()&&!E.isCellLocked(c.cell)?m||E.getSelectionCell()==
+c.cell&&1==E.getSelectionCount()||E.setSelectionCell(c.cell):E.highlightCell(c.cell)}else{if(!V&&l.checked)return f=!0,H(!0,X,m);E.isEnabled()&&!m&&E.clearSelection()}e=null!=N;x&&!V&&G();return 0==L.length||null!=N}var I=b.actions.get("findReplace"),E=b.editor.graph,O=null,c=null,e=!1,f=!1,n=null,p=0,t=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var v=x?"260px":"200px",D=document.createElement("input");D.setAttribute("placeholder",
+mxResources.get("find"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=v;D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";y.appendChild(D);mxUtils.br(y);if(x){var A=document.createElement("input");A.setAttribute("placeholder",mxResources.get("replaceWith"));A.setAttribute("type","text");A.style.marginTop="4px";A.style.marginBottom="6px";A.style.width=v;A.style.fontSize="12px";A.style.borderRadius="4px";A.style.padding="6px";
+y.appendChild(A);mxUtils.br(y);mxEvent.addListener(A,"input",G)}var U=document.createElement("input");U.setAttribute("id","geFindWinRegExChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";y.appendChild(U);v=document.createElement("label");v.setAttribute("for","geFindWinRegExChck");y.appendChild(v);mxUtils.write(v,mxResources.get("regularExpression"));y.appendChild(v);v=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");v.style.position="relative";v.style.marginLeft=
+"6px";v.style.top="-1px";y.appendChild(v);mxUtils.br(y);var l=document.createElement("input");l.setAttribute("id","geFindWinAllPagesChck");l.setAttribute("type","checkbox");l.style.marginRight="4px";y.appendChild(l);v=document.createElement("label");v.setAttribute("for","geFindWinAllPagesChck");y.appendChild(v);mxUtils.write(v,mxResources.get("allPages"));y.appendChild(v);var u=document.createElement("div");mxUtils.br(y);v=document.createElement("div");v.style.left="0px";v.style.right="0px";v.style.marginTop=
+"6px";v.style.padding="0 6px 0 6px";v.style.textAlign="center";y.appendChild(v);var B=mxUtils.button(mxResources.get("reset"),function(){M.innerText="";D.value="";D.style.backgroundColor="";x&&(A.value="",G());O=c=null;f=!1;D.focus()});B.setAttribute("title",mxResources.get("reset"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.className="geBtn";x||v.appendChild(B);var J=mxUtils.button(mxResources.get("find"),
+function(){try{D.style.backgroundColor=H()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});J.setAttribute("title",mxResources.get("find")+" (Enter)");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";v.appendChild(J);var M=document.createElement("div");M.style.marginTop="10px";if(x){var F=function(V,X,m,z,L){if(null==L||"1"!=L.html)return z=V.toLowerCase().indexOf(X,
+z),0>z?V:V.substr(0,z)+m+V.substr(z+X.length);var Q=V;X=mxUtils.htmlEntities(X);L=[];var N=-1;for(V=V.replace(/<br>/ig,"\n");-1<(N=V.indexOf("<",N+1));)L.push(N);N=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");z=V.toLowerCase().indexOf(X,z);if(0>z)return Q;Q=z+X.length;m=mxUtils.htmlEntities(m);V=V.substr(0,z)+m+V.substr(Q);for(var T=0,S=0;S<L.length;S++){if(L[S]-T<z)V=V.substr(0,L[S])+N[S]+V.substr(L[S]);else{var W=L[S]-T<Q?z+T:L[S]+(m.length-X.length);V=V.substr(0,W)+N[S]+V.substr(W)}T+=N[S].length}return V.replace(/\n/g,
+"<br>")},K=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=n&&null!=c&&A.value){var V=c.cell,X=E.getLabel(V);E.isCellEditable(V)&&E.model.setValue(V,F(X,n,A.value,p-n.length,E.getCurrentCellStyle(V)));D.style.backgroundColor=H(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(m){b.handleError(m)}});K.setAttribute("title",mxResources.get("replFind"));K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow=
+"ellipsis";K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");v.appendChild(K);mxUtils.br(v);var P=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=n&&null!=c&&A.value){var V=c.cell,X=E.getLabel(V);E.model.setValue(V,F(X,n,A.value,p-n.length,E.getCurrentCellStyle(V)));K.setAttribute("disabled","disabled");P.setAttribute("disabled","disabled")}}catch(m){b.handleError(m)}});P.setAttribute("title",mxResources.get("replace"));P.style.float="none";P.style.width="120px";
+P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");v.appendChild(P);var R=mxUtils.button(mxResources.get("replaceAll"),function(){M.innerText="";if(A.value){O=null;var V=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;E.getModel().beginUpdate();try{for(var m=0,z={};H(!1,!0,!0)&&100>m;){var L=c.cell,Q=E.getLabel(L),N=z[L.id];if(N&&N.replAllMrk==
+t&&N.replAllPos>=p)break;z[L.id]={replAllMrk:t,replAllPos:p};E.isCellEditable(L)&&(E.model.setValue(L,F(Q,n,A.value,p-n.length,E.getCurrentCellStyle(L))),m++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(M,mxResources.get("matchesRepl",[m]))}catch(T){b.handleError(T)}finally{E.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}t++}});R.setAttribute("title",mxResources.get("replaceAll"));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");v.appendChild(R);mxUtils.br(v);v.appendChild(B);B=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));B.setAttribute("title",mxResources.get("close"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow=
+"ellipsis";B.className="geBtn";v.appendChild(B);mxUtils.br(v);v.appendChild(M)}else B.style.width="90px",J.style.width="90px";mxEvent.addListener(D,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)I.funct();else if(O!=D.value.toLowerCase()||13==V.keyCode)try{D.style.backgroundColor=H()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){D.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(V){70==
+V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(I.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(x?"/"+mxResources.get("replace"):""),y,g,k,d,q,!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()?(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():
+document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?l.removeAttribute("disabled"):(l.checked=!1,l.setAttribute("disabled","disabled"))):E.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,g,k,d,q,x){var C=b.editor.graph,G=document.createElement("div");G.style.textAlign="center";G.style.userSelect="none";G.style.overflow="hidden";G.style.height="100%";if(x){var H=document.createElement("input");H.setAttribute("id","geFreehandBrush");H.setAttribute("type",
+"checkbox");H.checked=C.freehand.isPerfectFreehandMode();H.style.margin="10px 5px 0px 10px";H.style.float="left";G.appendChild(H);var I=document.createElement("label");I.setAttribute("for","geFreehandBrush");I.style.float="left";I.style.marginTop="10px";G.appendChild(I);mxUtils.write(I,mxResources.get("brush"));G.appendChild(I);mxUtils.br(G);var E=document.createElement("input");E.setAttribute("type","range");E.setAttribute("min","2");E.setAttribute("max","30");E.setAttribute("value",C.freehand.getBrushSize());
+E.style.width="90%";E.style.visibility="hidden";G.appendChild(E);mxUtils.br(G);I=function(){C.freehand.setPerfectFreehandMode(H.checked);E.style.visibility=H.checked?"visible":"hidden"};mxEvent.addListener(H,"change",I);I();mxEvent.addListener(E,"change",function(){C.freehand.setBrushSize(parseInt(this.value))})}var O=mxUtils.button(mxResources.get("startDrawing"),function(){C.freehand.isDrawing()?C.freehand.stopDrawing():C.freehand.startDrawing()});O.setAttribute("title",mxResources.get("startDrawing"));
+O.style.marginTop=x?"5px":"10px";O.style.width="90%";O.style.boxSizing="border-box";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.style.textAlign="center";O.className="geBtn gePrimaryBtn";G.appendChild(O);this.window=new mxWindow(mxResources.get("freehand"),G,g,k,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);C.addListener("freehandStateChanged",mxUtils.bind(this,function(){O.innerText="";mxUtils.write(O,
+mxResources.get(C.freehand.isDrawing()?"stopDrawing":"startDrawing"));var c=document.createElement("span");c.style.opacity="0.7";c.style["float"]="right";mxUtils.write(c,"X");O.appendChild(c);O.setAttribute("title",mxResources.get(C.freehand.isDrawing()?"stopDrawing":"startDrawing"));O.className="geBtn"+(C.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){C.freehand.isDrawing()&&
+C.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,g,k,d,q){var x=b.editor.graph,C=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(H,I){if(x.isEnabled()){var E=new FilenameDialog(b,"",mxResources.get("add"),function(O){b.hideDialog();if(null!=O&&0<O.length){O=O.split(" ");for(var c=[],e=0;e<O.length;e++){var f=mxUtils.trim(O[e]);""!=f&&0>mxUtils.indexOf(H,f)&&c.push(f)}0<c.length&&(x.isSelectionEmpty()?I(H.concat(c)):
+x.addTagsForCells(x.getSelectionCells(),c))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(E.container,300,80,!0,!0);E.init()}}),G=C.div;this.window=new mxWindow(mxResources.get("tags"),G,g,k,d,q,!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(){C.refresh();this.window.fit()}));b.installResizeHandler(this,
+!0)},AuthDialog=function(b,g,k,d){var q=document.createElement("div");q.style.textAlign="center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("authorizationRequired"));var C="Unknown",G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.marginRight="10px";g==b.drive?(C=mxResources.get("googleDrive"),G.src=IMAGE_PATH+"/google-drive-logo-white.svg"):
+g==b.dropbox?(C=mxResources.get("dropbox"),G.src=IMAGE_PATH+"/dropbox-logo-white.svg"):g==b.oneDrive?(C=mxResources.get("oneDrive"),G.src=IMAGE_PATH+"/onedrive-logo-white.svg"):g==b.gitHub?(C=mxResources.get("github"),G.src=IMAGE_PATH+"/github-logo-white.svg"):g==b.gitLab?(C=mxResources.get("gitlab"),G.src=IMAGE_PATH+"/gitlab-logo.svg",G.style.width="32px"):g==b.trello&&(C=mxResources.get("trello"),G.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",
+[C]));var H=document.createElement("input");H.setAttribute("type","checkbox");C=mxUtils.button(mxResources.get("authorize"),function(){d(H.checked)});C.insertBefore(G,C.firstChild);C.style.marginTop="6px";C.className="geBigButton";C.style.fontSize="18px";C.style.padding="14px";q.appendChild(x);q.appendChild(b);q.appendChild(C);k&&(k=document.createElement("p"),k.style.marginTop="20px",k.appendChild(H),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberMe")),k.appendChild(x),
+q.appendChild(k),H.checked=!0,H.defaultChecked=!0,mxEvent.addListener(x,"click",function(I){H.checked=!H.checked;mxEvent.consume(I)}));this.container=q},MoreShapesDialog=function(b,g,k){k=null!=k?k:b.sidebar.entries;var d=document.createElement("div"),q=[];if(null!=b.sidebar.customEntries)for(var x=0;x<b.sidebar.customEntries.length;x++){for(var C=b.sidebar.customEntries[x],G={title:b.getResource(C.title),entries:[]},H=0;H<C.entries.length;H++){var I=C.entries[H];G.entries.push({id:I.id,title:b.getResource(I.title),
+desc:b.getResource(I.desc),image:I.preview})}q.push(G)}for(x=0;x<k.length;x++)if(null==b.sidebar.enabledLibraries)q.push(k[x]);else{G={title:k[x].title,entries:[]};for(H=0;H<k[x].entries.length;H++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,k[x].entries[H].id)&&G.entries.push(k[x].entries[H]);0<G.entries.length&&q.push(G)}k=q;if(g){x=mxUtils.bind(this,function(U){for(var l=0;l<U.length;l++)(function(u){var B=f.cloneNode(!1);B.style.fontWeight="bold";B.style.backgroundColor=Editor.isDarkMode()?
+"#505759":"#e5e5e5";B.style.padding="6px 0px 6px 20px";mxUtils.write(B,u.title);E.appendChild(B);for(var J=0;J<u.entries.length;J++)(function(M){var F=f.cloneNode(!1);F.style.cursor="pointer";F.style.padding="4px 0px 4px 20px";F.style.whiteSpace="nowrap";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.setAttribute("title",M.title+" ("+M.id+")");var K=document.createElement("input");K.setAttribute("type","checkbox");K.checked=b.sidebar.isEntryVisible(M.id);K.defaultChecked=K.checked;F.appendChild(K);
+mxUtils.write(F," "+M.title);E.appendChild(F);var P=function(R){if(null==R||"INPUT"!=mxEvent.getSource(R).nodeName){O.style.textAlign="center";O.style.padding="0px";O.style.color="";O.innerText="";if(null!=M.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,M.desc);O.appendChild(V)}null!=M.imageCallback?M.imageCallback(O):null!=M.image?O.innerHTML+='<img border="0" style="max-width:100%;" src="'+
+M.image+'"/>':null==M.desc&&(O.style.padding="20px",O.style.color="rgb(179, 179, 179)",mxUtils.write(O,mxResources.get("noPreview")));null!=c&&(c.style.backgroundColor="");c=F;c.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=R&&mxEvent.consume(R)}};mxEvent.addListener(F,"click",P);mxEvent.addListener(F,"dblclick",function(R){K.checked=!K.checked;mxEvent.consume(R)});e.push(function(){return K.checked?M.id:null});0==l&&0==J&&P()})(u.entries[J])})(U[l])});H=document.createElement("div");
+H.className="geDialogTitle";mxUtils.write(H,mxResources.get("shapes"));H.style.position="absolute";H.style.top="0px";H.style.left="0px";H.style.lineHeight="40px";H.style.height="40px";H.style.right="0px";var E=document.createElement("div"),O=document.createElement("div");E.style.position="absolute";E.style.top="40px";E.style.left="0px";E.style.width="202px";E.style.bottom="60px";E.style.overflow="auto";O.style.position="absolute";O.style.left="202px";O.style.right="0px";O.style.top="40px";O.style.bottom=
+"60px";O.style.overflow="auto";O.style.borderLeft="1px solid rgb(211, 211, 211)";O.style.textAlign="center";var c=null,e=[],f=document.createElement("div");f.style.position="relative";f.style.left="0px";f.style.right="0px";x(k);d.style.padding="30px";d.appendChild(H);d.appendChild(E);d.appendChild(O);k=document.createElement("div");k.className="geDialogFooter";k.style.position="absolute";k.style.paddingRight="16px";k.style.color="gray";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.height=
+"60px";k.style.lineHeight="52px";var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.position="relative";n.style.top="1px";n.checked=b.sidebar.sidebarTitles;n.defaultChecked=n.checked;k.appendChild(n);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("labels"));x.style.paddingRight="20px";k.appendChild(x);mxEvent.addListener(x,"click",function(U){n.checked=!n.checked;mxEvent.consume(U)});var p=document.createElement("input");p.setAttribute("type","checkbox");
+if(isLocalStorage||mxClient.IS_CHROMEAPP)x=document.createElement("span"),x.style.paddingRight="20px",x.appendChild(p),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),p.style.position="relative",p.style.top="1px",p.checked=!0,p.defaultChecked=!0,mxEvent.addListener(x,"click",function(U){mxEvent.getSource(U)!=p&&(p.checked=!p.checked,mxEvent.consume(U))}),k.appendChild(x);x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";H=mxUtils.button(mxResources.get("apply"),
+function(){b.hideDialog();for(var U=[],l=0;l<e.length;l++){var u=e[l].apply(this,arguments);null!=u&&U.push(u)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(l=mxUtils.indexOf(U,".scratchpad"),null!=b.scratchpad!=(0<=l&&0<U.splice(l,1).length)&&b.toggleScratchpad(),l=mxUtils.indexOf(U,"search"),mxSettings.settings.search=0<=l&&0<U.splice(l,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),p.checked&&mxSettings.save());b.sidebar.showEntries(U.join(";"),p.checked,!0);b.setSidebarTitles(n.checked,
+p.checked)});H.className="geBtn gePrimaryBtn"}else{var t=document.createElement("table");x=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";H=document.createElement("tr");t.style.width="100%";g=document.createElement("td");q=document.createElement("td");C=document.createElement("td");var y=mxUtils.bind(this,function(U,l,u){var B=document.createElement("input");B.type="checkbox";t.appendChild(B);B.checked=b.sidebar.isEntryVisible(u);var J=document.createElement("span");
+mxUtils.write(J,l);l=document.createElement("div");l.style.display="block";l.appendChild(B);l.appendChild(J);mxEvent.addListener(J,"click",function(M){B.checked=!B.checked;mxEvent.consume(M)});U.appendChild(l);return function(){return B.checked?u:null}});H.appendChild(g);H.appendChild(q);H.appendChild(C);x.appendChild(H);t.appendChild(x);e=[];var v=0;for(x=0;x<k.length;x++)for(H=0;H<k[x].entries.length;H++)v++;var D=[g,q,C],A=0;for(x=0;x<k.length;x++)(function(U){for(var l=0;l<U.entries.length;l++){var u=
+U.entries[l];e.push(y(D[Math.floor(A/(v/3))],u.title,u.id));A++}})(k[x]);d.appendChild(t);k=document.createElement("div");k.style.marginTop="18px";k.style.textAlign="center";p=document.createElement("input");isLocalStorage&&(p.setAttribute("type","checkbox"),p.checked=!0,p.defaultChecked=!0,k.appendChild(p),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),k.appendChild(x),mxEvent.addListener(x,"click",function(U){p.checked=!p.checked;mxEvent.consume(U)}));
+d.appendChild(k);x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";H=mxUtils.button(mxResources.get("apply"),function(){for(var U=["search"],l=0;l<e.length;l++){var u=e[l].apply(this,arguments);null!=u&&U.push(u)}b.sidebar.showEntries(0<U.length?U.join(";"):"",p.checked);b.hideDialog()});H.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.marginTop="26px";k.style.textAlign="right"}b.editor.cancelFirst?(k.appendChild(x),k.appendChild(H)):
+(k.appendChild(H),k.appendChild(x));d.appendChild(k);this.container=d},PluginsDialog=function(b,g,k,d){function q(){H=!0;if(0==G.length)C.innerText=mxResources.get("noPlugins");else{C.innerText="";for(var f=0;f<G.length;f++){var n=document.createElement("span");n.style.whiteSpace="nowrap";var p=document.createElement("span");p.className="geSprite geSprite-delete";p.style.position="relative";p.style.cursor="pointer";p.style.top="5px";p.style.marginRight="4px";p.style.display="inline-block";n.appendChild(p);
+mxUtils.write(n,G[f]);C.appendChild(n);mxUtils.br(C);mxEvent.addListener(p,"click",function(t){return function(){b.confirm(mxResources.get("delete")+' "'+G[t]+'"?',function(){null!=k&&k(G[t]);G.splice(t,1);q()})}}(f))}}}var x=document.createElement("div"),C=document.createElement("div");C.style.height="180px";C.style.overflow="auto";var G=mxSettings.getPlugins().slice(),H=!1;x.appendChild(C);q();H=!1;var I=mxUtils.button(mxResources.get("add"),null!=g?function(){g(function(f){f&&0>mxUtils.indexOf(G,
+f)&&G.push(f);q()})}:function(){var f=document.createElement("div"),n=document.createElement("span");n.style.marginTop="6px";mxUtils.write(n,mxResources.get("builtinPlugins")+": ");f.appendChild(n);var p=document.createElement("select");p.style.width="150px";for(n=0;n<App.publicPlugin.length;n++){var t=document.createElement("option");mxUtils.write(t,App.publicPlugin[n]);t.value=App.publicPlugin[n];p.appendChild(t)}f.appendChild(p);mxUtils.br(f);mxUtils.br(f);n=mxUtils.button(mxResources.get("custom")+
+"...",function(){var y=new FilenameDialog(b,"",mxResources.get("add"),function(v){b.hideDialog();if(null!=v&&0<v.length){v=v.split(";");for(var D=0;D<v.length;D++){var A=v[D],U=App.pluginRegistry[A];null!=U&&(A=U);0<A.length&&0>mxUtils.indexOf(G,A)&&G.push(A)}q()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(y.container,300,80,!0,!0);y.init()});n.className="geBtn";f=new CustomDialog(b,f,mxUtils.bind(this,function(){var y=App.pluginRegistry[p.value];0>mxUtils.indexOf(G,
+y)&&(G.push(y),q())}),null,null,null,n);b.showDialog(f.container,360,100,!0,!0)});I.className="geBtn";var E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";var O=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){H?(mxSettings.setPlugins(G),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});O.className="geBtn gePrimaryBtn";var c=document.createElement("div");c.style.marginTop="14px";
+c.style.textAlign="right";var e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});e.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(e.style.display="none");c.appendChild(e);b.editor.cancelFirst?(d||c.appendChild(E),c.appendChild(I),c.appendChild(O)):(c.appendChild(I),c.appendChild(O),d||c.appendChild(E));x.appendChild(c);this.container=x},CropImageDialog=function(b,g,k,d){function q(){var U=p.checked,l=t.checked,u=e.geometry,B=H.width,
+J=H.height,M=(300-B)/2,F=(300-J)/2;u.x<M?(u.width-=M-u.x,u.x=M):u.x+u.width>M+B&&(u.width=M+B-u.x,u.x=Math.min(u.x,M+B));u.y<F?(u.height-=F-u.y,u.y=F):u.y+u.height>F+J&&(u.height=F+J-u.y,u.y=Math.min(u.y,F+J));var K=(u.x-M)/B*100;B=100-(u.x+u.width-M)/B*100;M=(u.y-F)/J*100;u=100-(u.y+u.height-F)/J*100;return"inset("+mxUtils.format(M)+"% "+mxUtils.format(B)+"% "+mxUtils.format(u)+"% "+mxUtils.format(K)+"%"+(U?" round "+c+"%":l?" round 50%":"")+")"}function x(U){null!=E&&(!0!==U&&(E.model.setGeometry(e,
+O.clone()),c=5,v.value=c),E.model.setStyle(e,f+q()),E.selectAll(),y.style.visibility=p.checked?"visible":"hidden")}var C=document.createElement("div"),G=document.createElement("div");G.style.height="300px";G.style.width="300px";G.style.display="inline-flex";G.style.justifyContent="center";G.style.alignItems="center";G.style.position="absolute";var H=document.createElement("img");H.onload=function(){function U(){E.model.setStyle(e,f+q())}E=new Graph(I);E.autoExtend=!1;E.autoScroll=!1;E.setGridEnabled(!1);
+E.setEnabled(!0);E.setPanning(!1);E.setConnectable(!1);E.getRubberband().setEnabled(!1);E.graphHandler.allowLivePreview=!1;var l=E.createVertexHandler;E.createVertexHandler=function(){var Q=l.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=k)try{if("inset"==k.substring(0,5)){var u=e.geometry,B=H.width,J=H.height,M=(300-B)/2,F=(300-J)/2,K=k.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),P=parseFloat(K[0]),R=parseFloat(K[1]),V=parseFloat(K[2]),X=parseFloat(K[3]);isFinite(P)&&isFinite(R)&&isFinite(V)&&
+isFinite(X)?(u.x=X/100*B+M,u.y=P/100*J+F,u.width=(100-R)/100*B+M-u.x,u.height=(100-V)/100*J+F-u.y,"round"==K[4]?"50%"==K[5]?t.setAttribute("checked","checked"):(c=parseInt(K[5]),v.value=c,p.setAttribute("checked","checked"),y.style.visibility="visible"):n.setAttribute("checked","checked")):k=null}else k=null}catch(Q){}e.style=f+(k?k:q());e.vertex=!0;E.addCell(e,null,null,null,null);E.selectAll();E.addListener(mxEvent.CELLS_MOVED,U);E.addListener(mxEvent.CELLS_RESIZED,U);var m=E.graphHandler.mouseUp,
+z=E.graphHandler.mouseDown;E.graphHandler.mouseUp=function(){m.apply(this,arguments);I.style.backgroundColor="#fff9"};E.graphHandler.mouseDown=function(){z.apply(this,arguments);I.style.backgroundColor=""};E.dblClick=function(){};var L=E.getSelectionModel().changeSelection;E.getSelectionModel().changeSelection=function(){L.call(this,[e],[e])}};H.onerror=function(){H.onload=null;H.src=Editor.errorImage};H.setAttribute("src",g);H.style.maxWidth="300px";H.style.maxHeight="300px";G.appendChild(H);C.appendChild(G);
+var I=document.createElement("div");I.style.width="300px";I.style.height="300px";I.style.overflow="hidden";I.style.backgroundColor="#fff9";C.appendChild(I);var E=null,O=new mxGeometry(100,100,100,100),c=5,e=new mxCell("",O.clone(),""),f="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+g.replace(";base64","")+";clipPath=",n=document.createElement("input");n.setAttribute("type","radio");n.setAttribute("id","croppingRect");n.setAttribute("name","croppingShape");n.setAttribute("checked",
+"checked");n.style.margin="5px";C.appendChild(n);g=document.createElement("label");g.setAttribute("for","croppingRect");mxUtils.write(g,mxResources.get("rectangle"));C.appendChild(g);var p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRounded");p.setAttribute("name","croppingShape");p.style.margin="5px";C.appendChild(p);g=document.createElement("label");g.setAttribute("for","croppingRounded");mxUtils.write(g,mxResources.get("rounded"));C.appendChild(g);
+var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingEllipse");t.setAttribute("name","croppingShape");t.style.margin="5px";C.appendChild(t);g=document.createElement("label");g.setAttribute("for","croppingEllipse");mxUtils.write(g,mxResources.get("ellipse"));C.appendChild(g);mxEvent.addListener(n,"change",x);mxEvent.addListener(p,"change",x);mxEvent.addListener(t,"change",x);var y=document.createElement("div");y.style.textAlign="center";y.style.visibility=
+"hidden";var v=document.createElement("input");v.setAttribute("type","range");v.setAttribute("min","1");v.setAttribute("max","49");v.setAttribute("value",c);v.setAttribute("title",mxResources.get("arcSize"));y.appendChild(v);C.appendChild(y);mxEvent.addListener(v,"change",function(){c=this.value;x(!0)});g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";G=mxUtils.button(mxResources.get("apply"),function(){d(q(),e.geometry.width,e.geometry.height);b.hideDialog()});
+G.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("reset"),function(){d(null,H.width,H.height);b.hideDialog()});D.className="geBtn";var A=document.createElement("div");A.style.marginTop="10px";A.style.textAlign="right";b.editor.cancelFirst?(A.appendChild(g),A.appendChild(D),A.appendChild(G)):(A.appendChild(D),A.appendChild(G),A.appendChild(g));C.appendChild(A);this.container=C},EditGeometryDialog=function(b,g){var k=b.editor.graph,d=1==g.length?k.getCellGeometry(g[0]):null,q=document.createElement("div"),
+x=document.createElement("table"),C=document.createElement("tbody"),G=document.createElement("tr"),H=document.createElement("td"),I=document.createElement("td");x.style.paddingLeft="6px";mxUtils.write(H,mxResources.get("relative")+":");var E=document.createElement("input");E.setAttribute("type","checkbox");null!=d&&d.relative&&(E.setAttribute("checked","checked"),E.defaultChecked=!0);this.init=function(){E.focus()};I.appendChild(E);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");
+H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("left")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.width="100px";O.value=null!=d?d.x:"";I.appendChild(O);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("top")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width=
+"100px";c.value=null!=d?d.y:"";I.appendChild(c);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("dx")+":");var e=document.createElement("input");e.setAttribute("type","text");e.style.width="100px";e.value=null!=d&&null!=d.offset?d.offset.x:"";I.appendChild(e);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");
+I=document.createElement("td");mxUtils.write(H,mxResources.get("dy")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=d&&null!=d.offset?d.offset.y:"";I.appendChild(f);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("width")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";
+n.value=null!=d?d.width:"";I.appendChild(n);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");mxUtils.write(H,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.height:"";I.appendChild(p);G.appendChild(H);G.appendChild(I);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");I=document.createElement("td");
+mxUtils.write(H,mxResources.get("rotation")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=1==g.length?mxUtils.getValue(k.getCellStyle(g[0]),mxConstants.STYLE_ROTATION,0):"";I.appendChild(t);G.appendChild(H);G.appendChild(I);C.appendChild(G);x.appendChild(C);q.appendChild(x);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();k.getModel().beginUpdate();
+try{for(var v=0;v<g.length;v++){var D=k.getCellGeometry(g[v]);null!=D&&(D=D.clone(),k.isCellMovable(g[v])&&(D.relative=E.checked,0<mxUtils.trim(O.value).length&&(D.x=Number(O.value)),0<mxUtils.trim(c.value).length&&(D.y=Number(c.value)),0<mxUtils.trim(e.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.x=Number(e.value)),0<mxUtils.trim(f.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.y=Number(f.value))),k.isCellResizable(g[v])&&(0<mxUtils.trim(n.value).length&&(D.width=
+Number(n.value)),0<mxUtils.trim(p.value).length&&(D.height=Number(p.value))),k.getModel().setGeometry(g[v],D));0<mxUtils.trim(t.value).length&&k.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[g[v]])}}finally{k.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",function(v){13==v.keyCode&&y.click()});x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(d),x.appendChild(y)):(x.appendChild(y),
+x.appendChild(d));q.appendChild(x);this.container=q},LibraryDialog=function(b,g,k,d,q,x){function C(l){for(l=document.elementFromPoint(l.clientX,l.clientY);null!=l&&l.parentNode!=e;)l=l.parentNode;var u=null;if(null!=l){var B=e.firstChild;for(u=0;null!=B&&B!=l;)B=B.nextSibling,u++}return u}function G(l,u,B,J,M,F,K,P,R){try{if(b.spinner.stop(),null==u||"image/"==u.substring(0,6))if(null==l&&null!=K||null==n[l]){var V=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow=
+"ellipsis";mxUtils.write(S,null!=W.title&&0<W.title.length?W.title:mxResources.get("untitled"));S.style.color=null==W.title||0==W.title.length?"#d0d0d0":""};e.style.backgroundImage="";f.style.display="none";var X=M,m=F;if(M>b.maxImageSize||F>b.maxImageSize){var z=Math.min(1,Math.min(b.maxImageSize/Math.max(1,M)),b.maxImageSize/Math.max(1,F));M*=z;F*=z}X>m?(m=Math.round(100*m/X),X=100):(X=Math.round(100*X/m),m=100);var L=document.createElement("div");L.setAttribute("draggable","true");L.style.display=
+"inline-block";L.style.position="relative";L.style.padding="0 12px";L.style.cursor="move";mxUtils.setPrefixedStyle(L.style,"transition","transform .1s ease-in-out");if(null!=l){var Q=document.createElement("img");Q.setAttribute("src",v.convert(l));Q.style.width=X+"px";Q.style.height=m+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((100-m)/2)+"px";Q.style.paddingLeft=Math.floor((100-X)/2)+"px";L.appendChild(Q)}else if(null!=K){var N=b.stringToCells(Graph.decompress(K.xml));0<N.length&&
+(b.sidebar.createThumb(N,100,100,L,null,!0,!1),L.firstChild.style.display="inline-block",L.firstChild.style.cursor="")}var T=document.createElement("img");T.setAttribute("src",Editor.closeBlackImage);T.setAttribute("border","0");T.setAttribute("title",mxResources.get("delete"));T.setAttribute("align","top");T.style.paddingTop="4px";T.style.position="absolute";T.style.marginLeft="-12px";T.style.zIndex="1";T.style.cursor="pointer";mxEvent.addListener(T,"dragstart",function(fa){mxEvent.consume(fa)});
+(function(fa,Y,ia){mxEvent.addListener(T,"click",function(da){n[Y]=null;for(var va=0;va<E.length;va++)if(null!=E[va].data&&E[va].data==Y||null!=E[va].xml&&null!=ia&&E[va].xml==ia.xml){E.splice(va,1);break}L.parentNode.removeChild(fa);0==E.length&&(e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",f.style.display="");mxEvent.consume(da)});mxEvent.addListener(T,"dblclick",function(da){mxEvent.consume(da)})})(L,l,K);L.appendChild(T);L.style.marginBottom="30px";var S=document.createElement("div");
+S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var W=null;null!=l?(W={data:l,w:M,h:F,title:R},null!=P&&(W.aspect=P),n[l]=Q,E.push(W)):null!=K&&(K.aspect="fixed",E.push(K),W=K);mxEvent.addListener(S,"keydown",function(fa){13==fa.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(fa))});V();L.appendChild(S);
+mxEvent.addListener(S,"mousedown",function(fa){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(fa)});N=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var Y=new FilenameDialog(b,W.title||"",mxResources.get("ok"),function(ia){null!=ia&&(W.title=ia,V())},mxResources.get("enterValue"));b.showDialog(Y.container,300,80,!0,!0);Y.init();mxEvent.consume(fa)}else if("true"!=S.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==
+W.title||0==W.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);y=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";W.title=S.innerHTML;V()};mxEvent.consume(fa)}};mxEvent.addListener(S,"click",N);mxEvent.addListener(L,"dblclick",N);e.appendChild(L);mxEvent.addListener(L,
+"dragstart",function(fa){null==l&&null!=K&&(T.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=K.xml&&fa.dataTransfer.setData("Text",K.xml);p=C(fa);mxClient.IS_GC&&(L.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(L.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(L,30);T.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(L,"dragend",function(fa){"hidden"==T.style.visibility&&(T.style.visibility="",S.style.visibility="");
+p=null;mxUtils.setOpacity(L,100);mxUtils.setPrefixedStyle(L.style,"transform",null)})}else D||(D=!0,b.handleError({message:mxResources.get("fileExists")}));else{M=!1;try{if(X=mxUtils.parseXml(l),"mxlibrary"==X.documentElement.nodeName){m=JSON.parse(mxUtils.getTextContent(X.documentElement));if(null!=m&&0<m.length)for(var Z=0;Z<m.length;Z++)null!=m[Z].xml?G(null,null,0,0,0,0,m[Z]):G(m[Z].data,null,0,0,m[Z].w,m[Z].h,null,"fixed",m[Z].title);M=!0}else if("mxfile"==X.documentElement.nodeName){var ba=
+X.documentElement.getElementsByTagName("diagram");for(Z=0;Z<ba.length;Z++){m=mxUtils.getTextContent(ba[Z]);N=b.stringToCells(Graph.decompress(m));var aa=b.editor.graph.getBoundingBoxFromGeometry(N);G(null,null,0,0,0,0,{xml:m,w:aa.width,h:aa.height})}M=!0}}catch(fa){}M||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){}return null}function H(l){l.dataTransfer.dropEffect=null!=p?"move":"copy";l.stopPropagation();l.preventDefault()}function I(l){l.stopPropagation();
+l.preventDefault();D=!1;t=C(l);if(null!=p)null!=t&&t<e.children.length?(E.splice(t>p?t-1:t,0,E.splice(p,1)[0]),e.insertBefore(e.children[p],e.children[t])):(E.push(E.splice(p,1)[0]),e.appendChild(e.children[p]));else if(0<l.dataTransfer.files.length)b.importFiles(l.dataTransfer.files,0,0,b.maxImageSize,A(l));else if(0<=mxUtils.indexOf(l.dataTransfer.types,"text/uri-list")){var u=decodeURIComponent(l.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(u)||/(\.png)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||
+/(\.svg)($|\?)/i.test(u))&&b.loadImage(u,function(B){G(u,null,0,0,B.width,B.height);e.scrollTop=e.scrollHeight})}l.stopPropagation();l.preventDefault()}var E=[];k=document.createElement("div");k.style.height="100%";var O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.height="40px";k.appendChild(O);mxUtils.write(O,mxResources.get("filename")+":");null==g&&(g=b.defaultLibraryName+".xml");var c=document.createElement("input");c.setAttribute("value",g);c.style.marginRight="20px";c.style.marginLeft=
+"10px";c.style.width="500px";null==q||q.isRenamable()||c.setAttribute("disabled","true");this.init=function(){if(null==q||q.isRenamable())c.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?c.select():document.execCommand("selectAll",!1,null)};O.appendChild(c);var e=document.createElement("div");e.style.borderWidth="1px 0px 1px 0px";e.style.borderColor="#d3d3d3";e.style.borderStyle="solid";e.style.marginTop="6px";e.style.overflow="auto";e.style.height="340px";e.style.backgroundPosition=
+"center center";e.style.backgroundRepeat="no-repeat";0==E.length&&Graph.fileSupport&&(e.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var f=document.createElement("div");f.style.position="absolute";f.style.width="640px";f.style.top="260px";f.style.textAlign="center";f.style.fontSize="22px";f.style.color="#a0c3ff";mxUtils.write(f,mxResources.get("dragImagesHere"));k.appendChild(f);var n={},p=null,t=null,y=null;g=function(l){"true"!=mxEvent.getSource(l).getAttribute("contentEditable")&&
+null!=y&&(y(),y=null,mxEvent.consume(l))};mxEvent.addListener(e,"mousedown",g);mxEvent.addListener(e,"pointerdown",g);mxEvent.addListener(e,"touchstart",g);var v=new mxUrlConverter,D=!1;if(null!=d)for(g=0;g<d.length;g++)O=d[g],G(O.data,null,0,0,O.w,O.h,O,O.aspect,O.title);mxEvent.addListener(e,"dragleave",function(l){f.style.cursor="";for(var u=mxEvent.getSource(l);null!=u;){if(u==e||u==f){l.stopPropagation();l.preventDefault();break}u=u.parentNode}});var A=function(l){return function(u,B,J,M,F,K,
+P,R,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(X){G(X,B,J,M,F,K,P,"fixed",mxEvent.isAltDown(l)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(u,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(X){4==X.readyState&&(b.spinner.stop(),200<=X.status&&299>=X.status&&(G(X.responseText,B,J,M,F,K,P,"fixed",mxEvent.isAltDown(l)?
+null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),e.scrollTop=e.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(G(u,B,J,M,F,K,P,"fixed",mxEvent.isAltDown(l)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),e.scrollTop=e.scrollHeight)}};mxEvent.addListener(e,"dragover",H);mxEvent.addListener(e,"drop",I);mxEvent.addListener(f,"dragover",H);mxEvent.addListener(f,"drop",I);k.appendChild(e);d=document.createElement("div");d.style.textAlign=
+"right";d.style.marginTop="20px";g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});g.setAttribute("id","btnCancel");g.className="geBtn";b.editor.cancelFirst&&d.appendChild(g);"draw.io"!=b.getServiceName()||null==q||q.constructor!=DriveLibrary&&q.constructor!=GitHubLibrary||(O=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&q.getPublicUrl(function(l){b.spinner.stop();if(null!=l){var u=b.getSearch("create title mode url drive splash state clibs ui".split(" "));
+u+=(0==u.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(l);l=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+u,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(l.container,450,240,!0);l.init()}else q.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(q.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):
+b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),O.className="geBtn",d.appendChild(O));O=mxUtils.button(mxResources.get("export"),function(){var l=b.createLibraryDataFromImages(E),u=c.value;/(\.xml)$/i.test(u)||(u+=".xml");b.isLocalFileSave()?b.saveLocalFile(l,u,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(u)+"&format=xml&xml="+encodeURIComponent(l))).simulate(document,"_blank")});O.setAttribute("id","btnDownload");O.className="geBtn";
+d.appendChild(O);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,"change",function(l){D=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(u,B,J,M,F,K,P,R,V){null!=U.files&&(A(l)(u,B,J,M,F,K,P,R,V),U.type="",U.type="file",U.value="")});e.scrollTop=e.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}O=mxUtils.button(mxResources.get("import"),
+function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});O.setAttribute("id","btnAddImage");O.className="geBtn";d.appendChild(O)}O=mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),y=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(l,u,B){D=!1;if(null!=l){if("data:image/"==l.substring(0,11)){var J=l.indexOf(",");0<J&&(l=l.substring(0,J)+";base64,"+l.substring(J+1))}G(l,null,0,0,u,B);e.scrollTop=e.scrollHeight}})});O.setAttribute("id","btnAddImageUrl");O.className=
+"geBtn";d.appendChild(O);this.saveBtnClickHandler=function(l,u,B,J){b.saveLibrary(l,u,B,J)};O=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(c.value,E,q,x)}));O.setAttribute("id","btnSave");O.className="geBtn gePrimaryBtn";d.appendChild(O);b.editor.cancelFirst||d.appendChild(g);k.appendChild(d);this.container=k},EditShapeDialog=function(b,g,k,d,q){d=null!=d?d:300;q=null!=q?q:120;var x=document.createElement("table"),C=document.createElement("tbody");
+x.style.cellPadding="4px";var G=document.createElement("tr");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";mxUtils.write(H,k);G.appendChild(H);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");var I=document.createElement("textarea");I.style.outline="none";I.style.resize="none";I.style.width=d-200+"px";I.style.height=q+"px";this.textarea=I;this.init=function(){I.focus();I.scrollTop=0};H.appendChild(I);G.appendChild(H);H=document.createElement("td");
+k=document.createElement("div");k.style.position="relative";k.style.border="1px solid gray";k.style.top="6px";k.style.width="200px";k.style.height=q+4+"px";k.style.overflow="hidden";k.style.marginBottom="16px";mxEvent.disableContextMenu(k);H.appendChild(k);var E=new Graph(k);E.setEnabled(!1);var O=b.editor.graph.cloneCell(g);E.addCells([O]);k=E.view.getState(O);var c="";null!=k.shape&&null!=k.shape.stencil&&(c=mxUtils.getPrettyXml(k.shape.stencil.desc));mxUtils.write(I,c||"");k=E.getGraphBounds();
+q=Math.min(160/k.width,(q-40)/k.height);E.view.scaleAndTranslate(q,20/q-k.x,20/q-k.y);G.appendChild(H);C.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.setAttribute("colspan","2");H.style.paddingTop="2px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||(q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),q.className="geBtn",H.appendChild(q));q=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog()});q.className="geBtn";b.editor.cancelFirst&&H.appendChild(q);var e=function(f,n,p){var t=I.value,y=mxUtils.parseXml(t);t=mxUtils.getPrettyXml(y.documentElement);y=y.documentElement.getElementsByTagName("parsererror");if(null!=y&&0<y.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(p&&b.hideDialog(),y=!f.model.contains(n),!p||y||t!=c){t=Graph.compress(t);f.getModel().beginUpdate();try{if(y){var v=b.editor.graph.getFreeInsertPoint();
+n.geometry.x=v.x;n.geometry.y=v.y;f.addCell(n)}f.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+t+")",[n])}catch(D){throw D;}finally{f.getModel().endUpdate()}y&&(f.setSelectionCell(n),f.scrollCellToVisible(n))}};k=mxUtils.button(mxResources.get("preview"),function(){e(E,O,!1)});k.className="geBtn";H.appendChild(k);k=mxUtils.button(mxResources.get("apply"),function(){e(b.editor.graph,g,!0)});k.className="geBtn gePrimaryBtn";H.appendChild(k);b.editor.cancelFirst||H.appendChild(q);G.appendChild(H);
+C.appendChild(G);x.appendChild(C);this.container=x},CustomDialog=function(b,g,k,d,q,x,C,G,H,I,E){var O=document.createElement("div");O.appendChild(g);var c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="center";null!=C&&c.appendChild(C);b.isOffline()||null==x||(g=mxUtils.button(mxResources.get("help"),function(){b.openLink(x)}),g.className="geBtn",c.appendChild(g));H=mxUtils.button(H||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});H.className="geBtn";
+G&&(H.style.display="none");b.editor.cancelFirst&&c.appendChild(H);q=mxUtils.button(q||mxResources.get("ok"),mxUtils.bind(this,function(){I||b.hideDialog(null,null,this.container);if(null!=k){var e=k();if("string"===typeof e){b.showError(mxResources.get("error"),e);return}}I&&b.hideDialog(null,null,this.container)}));c.appendChild(q);q.className="geBtn gePrimaryBtn";b.editor.cancelFirst||c.appendChild(H);if(null!=E)for(G=0;G<E.length;G++)(function(e,f,n){e=mxUtils.button(e,function(p){f(p)});null!=
+n&&e.setAttribute("title",n);e.className="geBtn";c.appendChild(e)})(E[G][0],E[G][1],E[G][2]);O.appendChild(c);this.cancelBtn=H;this.okButton=q;this.container=O},TemplatesDialog=function(b,g,k,d,q,x,C,G,H,I,E,O,c,e,f){function n(ja){Ia.innerText=ja;Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function p(){null!=m&&(m.style.fontWeight="normal",m.style.textDecoration="none",z=m,m=null)}function t(ja,la,pa,xa,Ba,Fa,Ca){if(-1<ja.className.indexOf("geTempDlgRadioBtnActive"))return!1;
+ja.className+=" geTempDlgRadioBtnActive";R.querySelector(".geTempDlgRadioBtn[data-id="+xa+"]").className="geTempDlgRadioBtn "+(Ca?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");R.querySelector("."+la).src="/images/"+pa+"-sel.svg";R.querySelector("."+Ba).src="/images/"+Fa+".svg";return!0}function y(ja,la,pa,xa){function Ba(ra,Ma){null==Ca?(ra=/^https?:\/\//.test(ra)&&!b.editor.isCorsEnabledForUrl(ra)?PROXY_URL+"?url="+encodeURIComponent(ra):TEMPLATE_PATH+"/"+ra,mxUtils.get(ra,mxUtils.bind(this,
+function(Qa){200<=Qa.getStatus()&&299>=Qa.getStatus()&&(Ca=Qa.getText());Ma(Ca)}))):Ma(Ca)}function Fa(ra,Ma,Qa){if(null!=ra&&mxUtils.isAncestorNode(document.body,la)&&(ra=mxUtils.parseXml(ra),ra=Editor.extractGraphModel(ra.documentElement,!0),null!=ra)){"mxfile"==ra.nodeName&&(ra=Editor.parseDiagramNode(ra.getElementsByTagName("diagram")[0]));var Va=new mxCodec(ra.ownerDocument),Ga=new mxGraphModel;Va.decode(ra,Ga);ra=Ga.root.getChildAt(0).children||[];b.sidebar.createTooltip(la,ra,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!=ja.title?mxResources.get(ja.title,null,ja.title):null,!0,new mxPoint(Ma,Qa),!0,null,!0);var Ja=document.createElement("div");Ja.className="geTempDlgDialogMask";R.appendChild(Ja);var Ka=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ja&&(R.removeChild(Ja),Ja=null,Ka.apply(this,arguments),b.sidebar.hideTooltip=
+Ka)};mxEvent.addListener(Ja,"click",function(){b.sidebar.hideTooltip()})}}var Ca=null;if(Na||b.sidebar.currentElt==la)b.sidebar.hideTooltip();else{var ua=function(ra){Na&&b.sidebar.currentElt==la&&Fa(ra,mxEvent.getClientX(xa),mxEvent.getClientY(xa));Na=!1;pa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=la;Na=!0;pa.src="/images/aui-wait.gif";ja.isExt?H(ja,ua,function(){n(mxResources.get("cantLoadPrev"));Na=!1;pa.src="/images/icon-search.svg"}):Ba(ja.url,ua)}}function v(ja,
+la,pa){if(null!=L){for(var xa=L.className.split(" "),Ba=0;Ba<xa.length;Ba++)if(-1<xa[Ba].indexOf("Active")){xa.splice(Ba,1);break}L.className=xa.join(" ")}null!=ja?(L=ja,L.className+=" "+la,Q=pa,Pa.className="geTempDlgCreateBtn"):(Q=L=null,Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function D(ja,la){if(null!=Q){var pa=function(ua){Ca.isExternal?H(Ca,function(ra){xa(ra,ua)},Ba):Ca.url?mxUtils.get(TEMPLATE_PATH+"/"+Ca.url,mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?
+xa(ra.getText(),ua):Ba()})):xa(b.emptyDiagramXml,ua)},xa=function(ua,ra){f||b.hideDialog(!0);g(ua,ra,Ca,la)},Ba=function(){n(mxResources.get("cannotLoad"));Fa()},Fa=function(){Q=Ca;Pa.className="geTempDlgCreateBtn";la&&(La.className="geTempDlgOpenBtn")},Ca=Q;Q=null;"boolean"!==typeof la&&(la=Ca.isExternal&&O);1==ja?I(Ca.url,Ca):la?(La.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",pa()):(Pa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ja=null==b.mode||b.mode==
+App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ja=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),pa,ja,function(ua){var ra=null!=ua&&0<ua.length;return ra&&f?(pa(ua),!1):ra},null,null,null,Fa,e?null:[]),b.showDialog(ja.container,350,80,!0,!0),ja.init())}}function A(ja){Pa.innerText=mxResources.get(fa||ja?"create":"copy");ja=ja?"none":"";O&&(La.style.display=ja);for(var la=R.querySelectorAll(".geTempDlgLinkToDiagram"),pa=
+0;pa<la.length;pa++)la[pa].style.display=ja}function U(ja,la,pa,xa,Ba){Ba||(ia.innerText="",v(),W=ja,Z=xa);var Fa=null;if(pa){Fa=document.createElement("table");Fa.className="geTempDlgDiagramsListGrid";var Ca=document.createElement("tr"),ua=document.createElement("th");ua.style.width="50%";ua.innerText=mxResources.get("diagram");Ca.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerText=mxResources.get("changedBy");Ca.appendChild(ua);ua=document.createElement("th");ua.style.width=
+"25%";ua.innerText=mxResources.get("lastModifiedOn");Ca.appendChild(ua);Fa.appendChild(Ca);ia.appendChild(Fa)}for(Ca=0;Ca<ja.length;Ca++){ja[Ca].isExternal=!la;var ra=ja[Ca].url,Ma=(ua=mxUtils.htmlEntities(la?mxResources.get(ja[Ca].title,null,ja[Ca].title):ja[Ca].title))||ja[Ca].url,Qa=ja[Ca].imgUrl,Va=ja[Ca].changedBy||"",Ga="";ja[Ca].lastModifiedOn&&(Ga=b.timeSince(new Date(ja[Ca].lastModifiedOn)),null==Ga&&(Ga=mxResources.get("lessThanAMinute")),Ga=mxResources.get("timeAgo",[Ga],"{1} ago"));Qa||
+(Qa=TEMPLATE_PATH+"/"+ra.substring(0,ra.length-4)+".png");ra=pa?50:15;null!=ua&&ua.length>ra&&(ua=ua.substring(0,ra)+"&hellip;");if(pa){var Ja=document.createElement("tr");Qa=document.createElement("td");var Ka=document.createElement("img");Ka.src="/images/icon-search.svg";Ka.className="geTempDlgDiagramListPreviewBtn";Ka.setAttribute("title",mxResources.get("preview"));Ba||Qa.appendChild(Ka);Ma=document.createElement("span");Ma.className="geTempDlgDiagramTitle";Ma.innerHTML=ua;Qa.appendChild(Ma);
+Ja.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Va;Ja.appendChild(Qa);Qa=document.createElement("td");Qa.innerText=Ga;Ja.appendChild(Qa);Fa.appendChild(Ja);null==L&&(A(la),v(Ja,"geTempDlgDiagramsListGridActive",ja[Ca]));(function(Ha,Ta,Sa){mxEvent.addListener(Ja,"click",function(){L!=Ta&&(A(la),v(Ta,"geTempDlgDiagramsListGridActive",Ha))});mxEvent.addListener(Ja,"dblclick",D);mxEvent.addListener(Ka,"click",function(Wa){y(Ha,Ta,Sa,Wa)})})(ja[Ca],Ja,Ka)}else{var Oa=document.createElement("div");
+Oa.className="geTempDlgDiagramTile";Oa.setAttribute("title",Ma);null==L&&(A(la),v(Oa,"geTempDlgDiagramTileActive",ja[Ca]));Va=document.createElement("div");Va.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ha,Ta,Sa){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ha.style.display=""};Ra.onerror=function(){this.src!=Sa?this.src=Sa:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,
+Va,Qa?Qa.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Ra.src=Qa;Va.appendChild(Ra);Oa.appendChild(Va);Va=document.createElement("div");Va.className="geTempDlgDiagramTileLbl";Va.innerHTML=null!=ua?ua:"";Oa.appendChild(Va);Ka=document.createElement("img");Ka.src="/images/icon-search.svg";Ka.className="geTempDlgDiagramPreviewBtn";Ka.setAttribute("title",mxResources.get("preview"));Ba||Oa.appendChild(Ka);(function(Ha,Ta,Sa){mxEvent.addListener(Oa,"click",function(){L!=Ta&&(A(la),
+v(Ta,"geTempDlgDiagramTileActive",Ha))});mxEvent.addListener(Oa,"dblclick",D);mxEvent.addListener(Ka,"click",function(Wa){y(Ha,Ta,Sa,Wa)})})(ja[Ca],Oa,Ka);ia.appendChild(Oa)}}for(var Ua in xa)ja=xa[Ua],0<ja.length&&(Ba=document.createElement("div"),Ba.className="geTempDlgImportCat",Ba.innerText=mxResources.get(Ua,null,Ua),ia.appendChild(Ba),U(ja,la,pa,null,!0))}function l(ja,la){ca.innerText="";v();var pa=Math.floor(ca.offsetWidth/150)-1;la=!la&&ja.length>pa?pa:ja.length;for(var xa=0;xa<la;xa++){var Ba=
+ja[xa];Ba.isCategory=!0;var Fa=document.createElement("div"),Ca=mxResources.get(Ba.title);null==Ca&&(Ca=Ba.title.substring(0,1).toUpperCase()+Ba.title.substring(1));Fa.className="geTempDlgNewDiagramCatItem";Fa.setAttribute("title",Ca);Ca=mxUtils.htmlEntities(Ca);15<Ca.length&&(Ca=Ca.substring(0,15)+"&hellip;");null==L&&(A(!0),v(Fa,"geTempDlgNewDiagramCatItemActive",Ba));var ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";var ra=document.createElement("img");ra.src=NEW_DIAGRAM_CATS_PATH+
+"/"+Ba.img;ua.appendChild(ra);Fa.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerHTML=Ca;Fa.appendChild(ua);ca.appendChild(Fa);(function(Ma,Qa){mxEvent.addListener(Fa,"click",function(){L!=Qa&&(A(!0),v(Qa,"geTempDlgNewDiagramCatItemActive",Ma))});mxEvent.addListener(Fa,"dblclick",D)})(Ba,Fa)}Fa=document.createElement("div");Fa.className="geTempDlgNewDiagramCatItem";Ca=mxResources.get("showAllTemps");Fa.setAttribute("title",Ca);ua=document.createElement("div");
+ua.className="geTempDlgNewDiagramCatItemImg";ua.innerText="...";ua.style.fontSize="32px";Fa.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerText=Ca;Fa.appendChild(ua);ca.appendChild(Fa);mxEvent.addListener(Fa,"click",function(){function Ma(){var Va=Qa.querySelector(".geTemplateDrawioCatLink");null!=Va?Va.click():setTimeout(Ma,200)}fa=!0;var Qa=R.querySelector(".geTemplatesList");Qa.style.display="block";Aa.style.width="";Da.style.display="";Da.value=
+"";ba=null;Ma()});Y.style.display=ja.length<=pa?"none":""}function u(ja,la,pa){function xa(Ra,Ua){var Ha=mxResources.get(Ra);null==Ha&&(Ha=Ra.substring(0,1).toUpperCase()+Ra.substring(1));Ra=Ha+" ("+Ua.length+")";var Ta=Ha=mxUtils.htmlEntities(Ha);15<Ha.length&&(Ha=Ha.substring(0,15)+"&hellip;");return{lbl:Ha+" ("+Ua.length+")",fullLbl:Ra,lblOnly:Ta}}function Ba(Ra,Ua,Ha,Ta,Sa){mxEvent.addListener(Ha,"click",function(){m!=Ha&&(null!=m?(m.style.fontWeight="normal",m.style.textDecoration="none"):(ta.style.display=
+"none",ya.style.minHeight="100%"),m=Ha,m.style.fontWeight="bold",m.style.textDecoration="underline",Aa.scrollTop=0,V&&(X=!0),da.innerHTML=Ua,va.style.display="none",U(Sa?la[Ra]:Ta?za[Ra][Ta]:ja[Ra],Sa?!1:!0))})}var Fa=R.querySelector(".geTemplatesList");if(0<pa){pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,mxResources.get("custom"));Fa.appendChild(pa);for(var Ca in la){pa=document.createElement("div");
+var ua=la[Ca];ua=xa(Ca,ua);pa.className="geTemplateCatLink";pa.setAttribute("title",ua.fullLbl);pa.innerHTML=ua.lbl;Fa.appendChild(pa);Ba(Ca,ua.lblOnly,pa,null,!0)}pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,"draw.io");Fa.appendChild(pa)}for(Ca in ja){var ra=za[Ca],Ma=pa=document.createElement(ra?"ul":"div");ua=ja[Ca];ua=xa(Ca,ua);if(null!=ra){var Qa=document.createElement("li"),
+Va=document.createElement("div");Va.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Va.style.padding="0";Va.setAttribute("title",ua.fullLbl);Va.innerHTML=ua.lbl;Ma=Va;Qa.appendChild(Va);var Ga=document.createElement("ul");Ga.className="geTempTreeNested";Ga.style.visibility="hidden";for(var Ja in ra){var Ka=document.createElement("li"),Oa=xa(Ja,ra[Ja]);Ka.setAttribute("title",Oa.fullLbl);Ka.innerHTML=Oa.lbl;Ka.className="geTemplateCatLink";Ka.style.padding="0";Ka.style.margin=
+"0";Ba(Ca,Oa.lblOnly,Ka,Ja);Ga.appendChild(Ka)}Qa.appendChild(Ga);pa.className="geTempTree";pa.appendChild(Qa);(function(Ra,Ua){mxEvent.addListener(Ua,"click",function(){for(var Ha=Ra.querySelectorAll("li"),Ta=0;Ta<Ha.length;Ta++)Ha[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Sa=0;Sa<Ha.length;Sa++)Ha[Sa].style.margin="0";Ra.style.visibility="hidden"},250);Ua.classList.toggle("geTempTreeCaret-down")})})(Ga,
+Va)}else pa.className="geTemplateCatLink geTemplateDrawioCatLink",pa.setAttribute("title",ua.fullLbl),pa.innerHTML=ua.lbl;Fa.appendChild(pa);Ba(Ca,ua.lblOnly,Ma)}}function B(){mxUtils.get(d,function(ja){if(!wa){wa=!0;ja=ja.getXml().documentElement.firstChild;for(var la={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("clibs"==ja.nodeName){for(var pa=ja.getAttribute("name"),xa=ja.getElementsByTagName("add"),Ba=[],Fa=0;Fa<xa.length;Fa++)Ba.push(encodeURIComponent(mxUtils.getTextContent(xa[Fa])));
+null!=pa&&0<Ba.length&&(la[pa]=Ba.join(";"))}else if(Ba=ja.getAttribute("url"),null!=Ba){xa=ja.getAttribute("section");pa=ja.getAttribute("subsection");if(null==xa&&(Fa=Ba.indexOf("/"),xa=Ba.substring(0,Fa),null==pa)){var Ca=Ba.indexOf("/",Fa+1);-1<Ca&&(pa=Ba.substring(Fa+1,Ca))}Fa=ea[xa];null==Fa&&(sa++,Fa=[],ea[xa]=Fa);Ba=ja.getAttribute("clibs");null!=la[Ba]&&(Ba=la[Ba]);Ba={url:ja.getAttribute("url"),libs:ja.getAttribute("libs"),title:ja.getAttribute("title")||ja.getAttribute("name"),preview:ja.getAttribute("preview"),
+clibs:Ba,tags:ja.getAttribute("tags")};Fa.push(Ba);null!=pa&&(Fa=za[xa],null==Fa&&(Fa={},za[xa]=Fa),xa=Fa[pa],null==xa&&(xa=[],Fa[pa]=xa),xa.push(Ba))}ja=ja.nextSibling}u(ea,ka,ma)}})}function J(ja){C&&(Aa.scrollTop=0,ia.innerText="",qa.spin(ia),X=!1,V=!0,da.innerText=mxResources.get("recentDiag"),ba=null,C(na,function(){n(mxResources.get("cannotLoad"));na([])},ja?null:x))}function M(ja){if(""==ja)null!=z&&(z.click(),z=null);else{if(null==TemplatesDialog.tagsList[d]){var la={};for(Ma in ea)for(var pa=
+ea[Ma],xa=0;xa<pa.length;xa++){var Ba=pa[xa];if(null!=Ba.tags)for(var Fa=Ba.tags.toLowerCase().split(";"),Ca=0;Ca<Fa.length;Ca++)null==la[Fa[Ca]]&&(la[Fa[Ca]]=[]),la[Fa[Ca]].push(Ba)}TemplatesDialog.tagsList[d]=la}var ua=ja.toLowerCase().split(" ");la=TemplatesDialog.tagsList[d];if(0<ma&&null==la.__tagsList__){for(Ma in ka)for(pa=ka[Ma],xa=0;xa<pa.length;xa++)for(Ba=pa[xa],Fa=Ba.title.split(" "),Fa.push(Ma),Ca=0;Ca<Fa.length;Ca++){var ra=Fa[Ca].toLowerCase();null==la[ra]&&(la[ra]=[]);la[ra].push(Ba)}la.__tagsList__=
+!0}var Ma=[];pa={};for(xa=Fa=0;xa<ua.length;xa++)if(0<ua[xa].length){ra=la[ua[xa]];var Qa={};Ma=[];if(null!=ra)for(Ca=0;Ca<ra.length;Ca++)Ba=ra[Ca],0==Fa==(null==pa[Ba.url])&&(Qa[Ba.url]=!0,Ma.push(Ba));pa=Qa;Fa++}0==Ma.length?da.innerText=mxResources.get("noResultsFor",[ja]):U(Ma,!0)}}function F(ja){if(ba!=ja||T!=aa)p(),Aa.scrollTop=0,ia.innerText="",da.innerText=mxResources.get("searchResults")+' "'+ja+'"',Ea=null,fa?M(ja):G&&(ja?(qa.spin(ia),X=!1,V=!0,G(ja,na,function(){n(mxResources.get("searchFailed"));
+na([])},T?null:x)):J(T)),ba=ja,aa=T}function K(ja){null!=Ea&&clearTimeout(Ea);13==ja.keyCode?F(Da.value):Ea=setTimeout(function(){F(Da.value)},1E3)}var P='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(G?"":'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>'+
(c?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(O?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",R=document.createElement("div");R.innerHTML=P;R.className=
-"geTemplateDlg";this.container=R;d=null!=d?d:TEMPLATE_PATH+"/index.xml";t=null!=t?t:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,X=!1,m=null,z=null,L=null,Q=null,N=!1,T=!0,S=!1,W=[],Z=null,ba,aa,fa=!1,Y=R.querySelector(".geTempDlgShowAllBtn"),ia=R.querySelector(".geTempDlgDiagramsTiles"),da=R.querySelector(".geTempDlgDiagramsListTitle"),va=R.querySelector(".geTempDlgDiagramsListBtns"),Aa=R.querySelector(".geTempDlgContent"),ya=R.querySelector(".geTempDlgDiagramsList"),ta=R.querySelector(".geTempDlgNewDiagramCat"),
+"geTemplateDlg";this.container=R;d=null!=d?d:TEMPLATE_PATH+"/index.xml";q=null!=q?q:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,X=!1,m=null,z=null,L=null,Q=null,N=!1,T=!0,S=!1,W=[],Z=null,ba,aa,fa=!1,Y=R.querySelector(".geTempDlgShowAllBtn"),ia=R.querySelector(".geTempDlgDiagramsTiles"),da=R.querySelector(".geTempDlgDiagramsListTitle"),va=R.querySelector(".geTempDlgDiagramsListBtns"),Aa=R.querySelector(".geTempDlgContent"),ya=R.querySelector(".geTempDlgDiagramsList"),ta=R.querySelector(".geTempDlgNewDiagramCat"),
ca=R.querySelector(".geTempDlgNewDiagramCatList"),Pa=R.querySelector(".geTempDlgCreateBtn"),La=R.querySelector(".geTempDlgOpenBtn"),Da=R.querySelector(".geTempDlgSearchBox"),Ia=R.querySelector(".geTempDlgErrMsg"),qa=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(R.querySelector(".geTempDlgBack"),"click",function(){p();fa=!1;R.querySelector(".geTemplatesList").style.display="none";Aa.style.width=
-"100%";ta.style.display="";ya.style.minHeight="calc(100% - 280px)";Da.style.display=G?"":"none";Da.value="";ba=null;J(T)});mxEvent.addListener(R.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){v(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(T=!0,null==ba?J(T):E(ba))});mxEvent.addListener(R.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){v(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(T=!1,null==ba?J(T):E(ba))});mxEvent.addListener(R.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){v(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,U(W,!1,S,Z))});mxEvent.addListener(R.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){v(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,U(W,!1,S,Z))});
-var Na=!1;mxEvent.addListener(Y,"click",function(){N?(ta.style.height="280px",ca.style.height="190px",Y.innerText=mxResources.get("showMore"),l(oa)):(ta.style.height="440px",ca.style.height="355px",Y.innerText=mxResources.get("showLess"),l(oa,!0));N=!N});var wa=!1,ha=!1,ea={},za={},ka={},oa=[],sa=1,ma=0;null!=F?F(function(ja,la){ka=ja;ma=la;B()},B):B();mxUtils.get(t,function(ja){if(!ha){ha=!0;for(ja=ja.getXml().documentElement.firstChild;null!=ja;)"undefined"!==typeof ja.getAttribute&&null!=ja.getAttribute("title")&&
+"100%";ta.style.display="";ya.style.minHeight="calc(100% - 280px)";Da.style.display=G?"":"none";Da.value="";ba=null;J(T)});mxEvent.addListener(R.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){t(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(T=!0,null==ba?J(T):F(ba))});mxEvent.addListener(R.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){t(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(T=!1,null==ba?J(T):F(ba))});mxEvent.addListener(R.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){t(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,U(W,!1,S,Z))});mxEvent.addListener(R.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){t(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,U(W,!1,S,Z))});
+var Na=!1;mxEvent.addListener(Y,"click",function(){N?(ta.style.height="280px",ca.style.height="190px",Y.innerText=mxResources.get("showMore"),l(oa)):(ta.style.height="440px",ca.style.height="355px",Y.innerText=mxResources.get("showLess"),l(oa,!0));N=!N});var wa=!1,ha=!1,ea={},za={},ka={},oa=[],sa=1,ma=0;null!=E?E(function(ja,la){ka=ja;ma=la;B()},B):B();mxUtils.get(q,function(ja){if(!ha){ha=!0;for(ja=ja.getXml().documentElement.firstChild;null!=ja;)"undefined"!==typeof ja.getAttribute&&null!=ja.getAttribute("title")&&
oa.push({img:ja.getAttribute("img"),libs:ja.getAttribute("libs"),clibs:ja.getAttribute("clibs"),title:ja.getAttribute("title")}),ja=ja.nextSibling;l(oa)}});var na=function(ja,la,pa){va.style.display="";qa.stop();V=!1;if(X)X=!1;else if(la)ia.innerText=la;else{pa=pa||{};la=0;for(var xa in pa)la+=pa[xa].length;0==ja.length&&0==la?ia.innerText=mxResources.get("noDiagrams"):U(ja,!1,S,0==la?null:pa)}};J(T);var Ea=null;mxEvent.addListener(Da,"keyup",K);mxEvent.addListener(Da,"search",K);mxEvent.addListener(Da,
-"input",K);mxEvent.addListener(Pa,"click",function(ja){D(!1,!1)});O&&mxEvent.addListener(La,"click",function(ja){D(!1,!0)});c&&mxEvent.addListener(R.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ja){D(!0)});mxEvent.addListener(R.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=k&&k();g||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
-var BtnDialog=function(b,f,k,d){var t=document.createElement("div");t.style.textAlign="center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("done"));var C="Unknown",G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.marginRight="10px";f==b.drive?(C=mxResources.get("googleDrive"),G.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
-(C=mxResources.get("dropbox"),G.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(C=mxResources.get("oneDrive"),G.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(C=mxResources.get("github"),G.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(C=mxResources.get("gitlab"),G.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(C=mxResources.get("trello"),G.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[C],"You are now authorized in {1}"));
-k=mxUtils.button(k,d);k.insertBefore(G,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";t.appendChild(x);t.appendChild(b);t.appendChild(k);this.container=t},FontDialog=function(b,f,k,d,t){function x(u){this.style.border="";13==u.keyCode&&y.click()}var C=document.createElement("table"),G=document.createElement("tbody");C.style.marginTop="8px";var H=document.createElement("tr");var I=document.createElement("td");I.colSpan=2;I.style.whiteSpace=
-"nowrap";I.style.fontSize="10pt";I.style.fontWeight="bold";var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value","sysfonts");F.setAttribute("type","radio");F.setAttribute("name","current-fontdialog");F.setAttribute("id","fontdialog-sysfonts");I.appendChild(F);var O=document.createElement("label");O.setAttribute("for","fontdialog-sysfonts");mxUtils.write(O,mxResources.get("sysFonts",null,"System Fonts"));I.appendChild(O);H.appendChild(I);
-G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.width="120px";I.style.paddingLeft="15px";mxUtils.write(I,mxResources.get("fontname",null,"Font Name")+":");H.appendChild(I);var c=document.createElement("input");"s"==d&&c.setAttribute("value",f);c.style.marginLeft="4px";c.style.width="250px";c.className="dlg_fontName_s";I=document.createElement("td");I.appendChild(c);H.appendChild(I);G.appendChild(H);H=document.createElement("tr");
+"input",K);mxEvent.addListener(Pa,"click",function(ja){D(!1,!1)});O&&mxEvent.addListener(La,"click",function(ja){D(!1,!0)});c&&mxEvent.addListener(R.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ja){D(!0)});mxEvent.addListener(R.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=k&&k();f||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+var BtnDialog=function(b,g,k,d){var q=document.createElement("div");q.style.textAlign="center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("done"));var C="Unknown",G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.marginRight="10px";g==b.drive?(C=mxResources.get("googleDrive"),G.src=IMAGE_PATH+"/google-drive-logo-white.svg"):g==b.dropbox?
+(C=mxResources.get("dropbox"),G.src=IMAGE_PATH+"/dropbox-logo-white.svg"):g==b.oneDrive?(C=mxResources.get("oneDrive"),G.src=IMAGE_PATH+"/onedrive-logo-white.svg"):g==b.gitHub?(C=mxResources.get("github"),G.src=IMAGE_PATH+"/github-logo-white.svg"):g==b.gitLab?(C=mxResources.get("gitlab"),G.src=IMAGE_PATH+"/gitlab-logo.svg"):g==b.trello&&(C=mxResources.get("trello"),G.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[C],"You are now authorized in {1}"));
+k=mxUtils.button(k,d);k.insertBefore(G,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";q.appendChild(x);q.appendChild(b);q.appendChild(k);this.container=q},FontDialog=function(b,g,k,d,q){function x(v){this.style.border="";13==v.keyCode&&y.click()}var C=document.createElement("table"),G=document.createElement("tbody");C.style.marginTop="8px";var H=document.createElement("tr");var I=document.createElement("td");I.colSpan=2;I.style.whiteSpace=
+"nowrap";I.style.fontSize="10pt";I.style.fontWeight="bold";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value","sysfonts");E.setAttribute("type","radio");E.setAttribute("name","current-fontdialog");E.setAttribute("id","fontdialog-sysfonts");I.appendChild(E);var O=document.createElement("label");O.setAttribute("for","fontdialog-sysfonts");mxUtils.write(O,mxResources.get("sysFonts",null,"System Fonts"));I.appendChild(O);H.appendChild(I);
+G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.width="120px";I.style.paddingLeft="15px";mxUtils.write(I,mxResources.get("fontname",null,"Font Name")+":");H.appendChild(I);var c=document.createElement("input");"s"==d&&c.setAttribute("value",g);c.style.marginLeft="4px";c.style.width="250px";c.className="dlg_fontName_s";I=document.createElement("td");I.appendChild(c);H.appendChild(I);G.appendChild(H);H=document.createElement("tr");
I=document.createElement("td");I.colSpan=2;I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.fontWeight="bold";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","googlefonts");e.setAttribute("type","radio");e.setAttribute("name","current-fontdialog");e.setAttribute("id","fontdialog-googlefonts");I.appendChild(e);O=document.createElement("label");O.setAttribute("for","fontdialog-googlefonts");mxUtils.write(O,mxResources.get("googleFonts",
null,"Google Fonts"));I.appendChild(O);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(O=b.menus.createHelpLink("https://fonts.google.com/"),O.getElementsByTagName("img")[0].setAttribute("valign","middle"),I.appendChild(O));H.appendChild(I);G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.width="120px";I.style.paddingLeft="15px";mxUtils.write(I,mxResources.get("fontname",null,"Font Name")+":");
-H.appendChild(I);var g=document.createElement("input");"g"==d&&g.setAttribute("value",f);g.style.marginLeft="4px";g.style.width="250px";g.className="dlg_fontName_g";I=document.createElement("td");I.appendChild(g);H.appendChild(I);G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.colSpan=2;I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.fontWeight="bold";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value",
+H.appendChild(I);var f=document.createElement("input");"g"==d&&f.setAttribute("value",g);f.style.marginLeft="4px";f.style.width="250px";f.className="dlg_fontName_g";I=document.createElement("td");I.appendChild(f);H.appendChild(I);G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.colSpan=2;I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.fontWeight="bold";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value",
"webfonts");n.setAttribute("type","radio");n.setAttribute("name","current-fontdialog");n.setAttribute("id","fontdialog-webfonts");I.appendChild(n);O=document.createElement("label");O.setAttribute("for","fontdialog-webfonts");mxUtils.write(O,mxResources.get("webfonts",null,"Web Fonts"));I.appendChild(O);H.appendChild(I);Editor.enableWebFonts&&G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";I.style.width="120px";I.style.paddingLeft=
-"15px";mxUtils.write(I,mxResources.get("fontname",null,"Font Name")+":");H.appendChild(I);var p=document.createElement("input");"w"==d&&(Editor.enableWebFonts?p.setAttribute("value",f):c.setAttribute("value",f));p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_w";I=document.createElement("td");I.appendChild(p);H.appendChild(I);Editor.enableWebFonts&&G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";
-I.style.width="120px";I.style.paddingLeft="15px";mxUtils.write(I,mxResources.get("fontUrl",null,"Font URL")+":");H.appendChild(I);var v=document.createElement("input");v.setAttribute("value",k||"");v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontUrl";I=document.createElement("td");I.appendChild(v);H.appendChild(I);Editor.enableWebFonts&&G.appendChild(H);this.init=function(){var u=c;"g"==d?u=g:"w"==d&&Editor.enableWebFonts&&(u=p);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-u.select():document.execCommand("selectAll",!1,null)};H=document.createElement("tr");I=document.createElement("td");I.colSpan=2;I.style.paddingTop="20px";I.style.whiteSpace="nowrap";I.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",I.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();t()});f.className="geBtn";b.editor.cancelFirst&&I.appendChild(f);
-var y=mxUtils.button(mxResources.get("apply"),function(){if(F.checked){var u=c.value;var D="s"}else if(e.checked){u=g.value;var A=Editor.GOOGLE_FONTS+encodeURIComponent(u).replace(/%20/g,"+");D="g"}else n.checked&&(u=p.value,A=v.value,D="w");var U=A;var l=D,q=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==u||0==u.length?(C.querySelector(".dlg_fontName_"+l).style.border="1px solid red",U=!1):"w"!=l||q.test(U)?U=!0:(C.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",U=!1);U&&(t(u,A,D),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(c,"keypress",x);mxEvent.addListener(g,"keypress",x);mxEvent.addListener(p,"keypress",x);mxEvent.addListener(v,"keypress",x);mxEvent.addListener(c,"focus",function(){F.setAttribute("checked","checked");F.checked=!0});mxEvent.addListener(g,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(p,"focus",function(){n.setAttribute("checked","checked");n.checked=
-!0});mxEvent.addListener(v,"focus",function(){n.setAttribute("checked","checked");n.checked=!0});I.appendChild(y);b.editor.cancelFirst||I.appendChild(f);H.appendChild(I);G.appendChild(H);C.appendChild(G);this.container=C};
-function AspectDialog(b,f,k,d,t){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:k||[]};f=document.createElement("div");var x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("pages"));f.appendChild(x);k=document.createElement("div");k.className="geAspectDlgList";f.appendChild(k);x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("layers"));f.appendChild(x);x=document.createElement("div");x.className="geAspectDlgList";
-f.appendChild(x);this.pagesContainer=k;this.layersContainer=x;this.ui=b;k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="center";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=t&&t()});x.className="geBtn";b.editor.cancelFirst&&k.appendChild(x);var C=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));k.appendChild(C);C.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||k.appendChild(x);C.setAttribute("disabled","disabled");this.okBtn=C;f.appendChild(k);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
-AspectDialog.prototype.createViewer=function(b,f,k,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var t=new Graph(b);t.setTooltips(!1);t.setEnabled(!1);t.setPanning(!1);t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var x=f.getAttribute("background");if(null==x||""==x||x==mxConstants.NONE)x=null!=d?d:"#ffffff";b.style.backgroundColor=x;d=new mxCodec(f.ownerDocument);b=t.getModel();d.decode(f,b);f=b.getChildCount(b.root);
-d=null==k;for(x=0;x<f;x++){var C=b.getChildAt(b.root,x);b.setVisible(C,d||k==C.id)}t.maxFitScale=1;t.fit(0);t.center()}return t};
-AspectDialog.prototype.createPageItem=function(b,f,k){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(d);var t=this.createViewer(d.childNodes[0],k);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
-this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var x=t.model;x=x.getChildCells(x.getRoot());for(var C=0;C<x.length;C++)this.createLayerItem(x[C],b,t,k)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()};
-AspectDialog.prototype.createLayerItem=function(b,f,k,d){f=k.convertValueToString(b)||mxResources.get("background")||"Background";var t=document.createElement("div");t.setAttribute("data-layer-id",b.id);t.className="geAspectDlgListItem";t.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(t);this.createViewer(t.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=t.className.indexOf("geAspectDlgListItemSelected")?
-(t.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(t.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(t,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
-var FilePropertiesDialog=function(b){var f=document.createElement("table"),k=document.createElement("tbody");f.style.width="100%";f.style.marginTop="8px";var d=b.getCurrentFile();var t=null!=d&&null!=d.getTitle()?d.getTitle():b.defaultFilename;var x=function(){};if(/(\.png)$/i.test(t)){x=1;var C=0;t=b.fileNode;null!=t&&(t.hasAttribute("scale")&&(x=parseFloat(t.getAttribute("scale"))),t.hasAttribute("border")&&(C=parseInt(t.getAttribute("border"))));t=document.createElement("tr");var G=document.createElement("td");
-G.style.whiteSpace="nowrap";G.style.fontSize="10pt";G.style.width="120px";mxUtils.write(G,mxResources.get("zoom")+":");t.appendChild(G);var H=document.createElement("input");H.setAttribute("value",100*x+"%");H.style.marginLeft="4px";H.style.width="180px";G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(H);t.appendChild(G);k.appendChild(t);t=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.fontSize="10pt";G.style.width="120px";
-mxUtils.write(G,mxResources.get("borderWidth")+":");t.appendChild(G);var I=document.createElement("input");I.setAttribute("value",C);I.style.marginLeft="4px";I.style.width="180px";G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(I);t.appendChild(G);k.appendChild(t);this.init=function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};x=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
-parseInt(H.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(I.value))),null!=d&&d.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(t)&&!/(\.svg)$/i.test(t)){var F=null!=d?d.isCompressed():Editor.compressXml;t=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.fontSize="10pt";G.style.width="120px";mxUtils.write(G,mxResources.get("compressed")+":");t.appendChild(G);var O=document.createElement("input");O.setAttribute("type","checkbox");
-F&&(O.setAttribute("checked","checked"),O.defaultChecked=!0);G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(O);t.appendChild(G);k.appendChild(t);this.init=function(){O.focus()};x=function(){null!=b.fileNode&&F!=O.checked&&(b.fileNode.setAttribute("compressed",O.checked?"true":"false"),null!=d&&d.fileChanged());b.hideDialog()}}if(null!=d&&d.isRealtimeOptional()){t=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.fontSize="10pt";
-G.style.width="120px";mxUtils.write(G,mxResources.get("realtimeCollaboration")+":");t.appendChild(G);var c=document.createElement("input");c.setAttribute("type","checkbox");var e=d.isRealtimeEnabled();if(e="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))c.setAttribute("checked","checked"),c.defaultChecked=!0;prevApply=x;x=function(){prevApply();b.hideDialog();c.checked!=e&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(c.checked,mxUtils.bind(this,
-function(g){b.spinner.stop()}),mxUtils.bind(this,function(g){b.spinner.stop();b.showError(mxResources.get("error"),null!=g&&null!=g.error?g.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){c.focus()};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(c);G.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));t.appendChild(G);k.appendChild(t)}this.init=null!=this.init?this.init:
-function(){};x=mxUtils.button(mxResources.get("apply"),x);x.className="geBtn gePrimaryBtn";t=document.createElement("tr");G=document.createElement("td");G.colSpan=2;G.style.paddingTop="20px";G.style.whiteSpace="nowrap";G.setAttribute("align","center");C=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});C.className="geBtn";b.editor.cancelFirst&&G.appendChild(C);G.appendChild(x);b.editor.cancelFirst||G.appendChild(C);t.appendChild(G);k.appendChild(t);f.appendChild(k);this.container=
-f},ConnectionPointsDialog=function(b,f){function k(){null!=t&&t.destroy()}var d=document.createElement("div");d.style.userSelect="none";var t=null;this.init=function(){function x(M,E){M=new mxCell("",new mxGeometry(M,E,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");M.vertex=!0;M.cp=!0;return O.addCell(M)}function C(M){M=O.getSelectionCells();O.deleteCells(M)}function G(){var M=parseInt(l.value)||0;M=0>M?0:100<M?100:M;
-l.value=M;var E=parseInt(B.value)||0;E=0>E?0:100<E?100:E;B.value=E;var K=parseInt(q.value)||0,P=parseInt(J.value)||0;M=O.getConnectionPoint(g,new mxConnectionConstraint(new mxPoint(M/100,E/100),!1,null,K,P));E=O.getSelectionCell();if(null!=E){K=E.geometry.clone();P=O.view.scale;var R=O.view.translate;K.x=(M.x-3*P)/P-R.x;K.y=(M.y-3*P)/P-R.y;O.model.setGeometry(E,K)}}function H(M){var E=0,K=0,P=c.geometry,R=mxUtils.format((M.geometry.x+3-P.x)/P.width);M=mxUtils.format((M.geometry.y+3-P.y)/P.height);
-0>R?(E=R*P.width,R=0):1<R&&(E=(R-1)*P.width,R=1);0>M?(K=M*P.height,M=0):1<M&&(K=(M-1)*P.height,M=1);return{x:R,y:M,dx:parseInt(E),dy:parseInt(K)}}function I(){if(1==O.getSelectionCount()){var M=O.getSelectionCell();M=H(M);l.value=100*M.x;B.value=100*M.y;q.value=M.dx;J.value=M.dy;U.style.visibility=""}else U.style.visibility="hidden"}var F=document.createElement("div");F.style.width="350px";F.style.height="350px";F.style.overflow="hidden";F.style.border="1px solid lightGray";F.style.boxSizing="border-box";
-mxEvent.disableContextMenu(F);d.appendChild(F);var O=new Graph(F);O.autoExtend=!1;O.autoScroll=!1;O.setGridEnabled(!1);O.setEnabled(!0);O.setPanning(!0);O.setConnectable(!1);O.setTooltips(!1);O.minFitScale=null;O.maxFitScale=null;O.centerZoom=!0;O.maxFitScale=2;F=f.geometry;var c=new mxCell(f.value,new mxGeometry(0,0,F.width,F.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");c.vertex=!0;O.addCell(c);O.dblClick=function(M,E){if(null!=E&&E!=c)O.setSelectionCell(E);else{E=
-mxUtils.convertPoint(O.container,mxEvent.getClientX(M),mxEvent.getClientY(M));mxEvent.consume(M);M=O.view.scale;var K=O.view.translate;O.setSelectionCell(x((E.x-3*M)/M-K.x,(E.y-3*M)/M-K.y))}};t=new mxKeyHandler(O);t.bindKey(46,C);t.bindKey(8,C);O.getRubberband().isForceRubberbandEvent=function(M){return 0==M.evt.button&&(null==M.getCell()||M.getCell()==c)};O.panningHandler.isForcePanningEvent=function(M){return 2==M.evt.button};var e=O.isCellSelectable;O.isCellSelectable=function(M){return M==c?!1:
-e.apply(this,arguments)};O.getLinkForCell=function(){return null};var g=O.view.getState(c);F=O.getAllConnectionConstraints(g);for(var n=0;null!=F&&n<F.length;n++){var p=O.getConnectionPoint(g,F[n]);x(p.x-3,p.y-3)}O.fit(8);O.center();n=mxUtils.button("",function(){O.zoomIn()});n.className="geSprite geSprite-zoomin";n.setAttribute("title",mxResources.get("zoomIn"));n.style.position="relative";n.style.outline="none";n.style.border="none";n.style.margin="2px";n.style.cursor="pointer";n.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(n,60);p=mxUtils.button("",function(){O.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.position="relative";p.style.outline="none";p.style.border="none";p.style.margin="2px";p.style.cursor="pointer";p.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(p,60);var v=mxUtils.button("",function(){O.fit(8);O.center()});v.className="geSprite geSprite-fit";v.setAttribute("title",mxResources.get("fit"));v.style.position=
-"relative";v.style.outline="none";v.style.border="none";v.style.margin="2px";v.style.cursor="pointer";v.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(v,60);var y=mxUtils.button("",function(){O.zoomActual();O.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,
-60);var u=mxUtils.button("",C);u.className="geSprite geSprite-delete";u.setAttribute("title",mxResources.get("delete"));u.style.position="relative";u.style.outline="none";u.style.border="none";u.style.margin="2px";u.style.float="right";u.style.cursor="pointer";mxUtils.setOpacity(u,10);F=document.createElement("div");F.appendChild(n);F.appendChild(p);F.appendChild(y);F.appendChild(v);F.appendChild(u);d.appendChild(F);var D=document.createElement("input");D.setAttribute("type","number");D.setAttribute("min",
-"1");D.setAttribute("value","1");D.style.width="45px";D.style.position="relative";D.style.top=mxClient.IS_FF?"0px":"-4px";D.style.margin="0 4px 0 4px";F.appendChild(D);var A=document.createElement("select");A.style.position="relative";A.style.top=mxClient.IS_FF?"0px":"-4px";p=["left","right","top","bottom"];for(n=0;n<p.length;n++)v=p[n],y=document.createElement("option"),mxUtils.write(y,mxResources.get(v)),y.value=v,A.appendChild(y);F.appendChild(A);n=mxUtils.button(mxResources.get("add"),function(){var M=
-parseInt(D.value);M=1>M?1:100<M?100:M;D.value=M;for(var E=A.value,K=c.geometry,P=[],R=0;R<M;R++){switch(E){case "left":var V=K.x;var X=K.y+(R+1)*K.height/(M+1);break;case "right":V=K.x+K.width;X=K.y+(R+1)*K.height/(M+1);break;case "top":V=K.x+(R+1)*K.width/(M+1);X=K.y;break;case "bottom":V=K.x+(R+1)*K.width/(M+1),X=K.y+K.height}P.push(x(V-3,X-3))}O.setSelectionCells(P)});n.style.position="relative";n.style.marginLeft="8px";n.style.top=mxClient.IS_FF?"0px":"-4px";F.appendChild(n);var U=document.createElement("div");
-U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";F=document.createElement("span");mxUtils.write(F,mxResources.get("dx"));U.appendChild(F);var l=document.createElement("input");l.setAttribute("type","number");l.setAttribute("min","0");l.setAttribute("max","100");l.style.width="45px";l.style.margin="0 4px 0 4px";U.appendChild(l);mxUtils.write(U,"%");var q=document.createElement("input");q.setAttribute("type","number");q.style.width="45px";q.style.margin="0 4px 0 4px";
-U.appendChild(q);mxUtils.write(U,"pt");F=document.createElement("span");mxUtils.write(F,mxResources.get("dy"));F.style.marginLeft="12px";U.appendChild(F);var B=document.createElement("input");B.setAttribute("type","number");B.setAttribute("min","0");B.setAttribute("max","100");B.style.width="45px";B.style.margin="0 4px 0 4px";U.appendChild(B);mxUtils.write(U,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";U.appendChild(J);
-mxUtils.write(U,"pt");d.appendChild(U);I();O.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<O.getSelectionCount()?mxUtils.setOpacity(u,60):mxUtils.setOpacity(u,10);I()});O.addListener(mxEvent.CELLS_MOVED,I);mxEvent.addListener(l,"change",G);mxEvent.addListener(B,"change",G);mxEvent.addListener(q,"change",G);mxEvent.addListener(J,"change",G);F=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});F.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){var M=
-O.model.cells,E=[],K=[],P;for(P in M){var R=M[P];R.cp&&K.push(H(R))}K.sort(function(V,X){return V.x!=X.x?V.x-X.x:V.y!=X.y?V.y-X.y:V.dx!=X.dx?V.dx-X.dx:V.dy-X.dy});for(M=0;M<K.length;M++)0<M&&K[M].x==K[M-1].x&&K[M].y==K[M-1].y&&K[M].dx==K[M-1].dx&&K[M].dy==K[M-1].dy||E.push("["+K[M].x+","+K[M].y+",0,"+K[M].dx+","+K[M].dy+"]");b.editor.graph.setCellStyles("points","["+E.join(",")+"]",[f]);k();b.hideDialog()});n.className="geBtn gePrimaryBtn";p=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[f]);k();b.hideDialog()});p.className="geBtn";v=document.createElement("div");v.style.marginTop="10px";v.style.textAlign="right";b.editor.cancelFirst?(v.appendChild(F),v.appendChild(p),v.appendChild(n)):(v.appendChild(p),v.appendChild(n),v.appendChild(F));d.appendChild(v)};this.destroy=k;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
-{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,
-fontUrl:decodeURIComponent(Editor.sketchFontSource)}];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"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",
-gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},
-{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
+"15px";mxUtils.write(I,mxResources.get("fontname",null,"Font Name")+":");H.appendChild(I);var p=document.createElement("input");"w"==d&&(Editor.enableWebFonts?p.setAttribute("value",g):c.setAttribute("value",g));p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_w";I=document.createElement("td");I.appendChild(p);H.appendChild(I);Editor.enableWebFonts&&G.appendChild(H);H=document.createElement("tr");I=document.createElement("td");I.style.whiteSpace="nowrap";I.style.fontSize="10pt";
+I.style.width="120px";I.style.paddingLeft="15px";mxUtils.write(I,mxResources.get("fontUrl",null,"Font URL")+":");H.appendChild(I);var t=document.createElement("input");t.setAttribute("value",k||"");t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontUrl";I=document.createElement("td");I.appendChild(t);H.appendChild(I);Editor.enableWebFonts&&G.appendChild(H);this.init=function(){var v=c;"g"==d?v=f:"w"==d&&Editor.enableWebFonts&&(v=p);v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+v.select():document.execCommand("selectAll",!1,null)};H=document.createElement("tr");I=document.createElement("td");I.colSpan=2;I.style.paddingTop="20px";I.style.whiteSpace="nowrap";I.setAttribute("align","right");b.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),g.className="geBtn",I.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();q()});g.className="geBtn";b.editor.cancelFirst&&I.appendChild(g);
+var y=mxUtils.button(mxResources.get("apply"),function(){if(E.checked){var v=c.value;var D="s"}else if(e.checked){v=f.value;var A=Editor.GOOGLE_FONTS+encodeURIComponent(v).replace(/%20/g,"+");D="g"}else n.checked&&(v=p.value,A=t.value,D="w");var U=A;var l=D,u=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==v||0==v.length?(C.querySelector(".dlg_fontName_"+l).style.border="1px solid red",U=!1):"w"!=l||u.test(U)?U=!0:(C.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",U=!1);U&&(q(v,A,D),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(c,"keypress",x);mxEvent.addListener(f,"keypress",x);mxEvent.addListener(p,"keypress",x);mxEvent.addListener(t,"keypress",x);mxEvent.addListener(c,"focus",function(){E.setAttribute("checked","checked");E.checked=!0});mxEvent.addListener(f,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(p,"focus",function(){n.setAttribute("checked","checked");n.checked=
+!0});mxEvent.addListener(t,"focus",function(){n.setAttribute("checked","checked");n.checked=!0});I.appendChild(y);b.editor.cancelFirst||I.appendChild(g);H.appendChild(I);G.appendChild(H);C.appendChild(G);this.container=C};
+function AspectDialog(b,g,k,d,q){this.aspect={pageId:g||(b.pages?b.pages[0].getId():null),layerIds:k||[]};g=document.createElement("div");var x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("pages"));g.appendChild(x);k=document.createElement("div");k.className="geAspectDlgList";g.appendChild(k);x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("layers"));g.appendChild(x);x=document.createElement("div");x.className="geAspectDlgList";
+g.appendChild(x);this.pagesContainer=k;this.layersContainer=x;this.ui=b;k=document.createElement("div");k.style.marginTop="16px";k.style.textAlign="center";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=q&&q()});x.className="geBtn";b.editor.cancelFirst&&k.appendChild(x);var C=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));k.appendChild(C);C.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||k.appendChild(x);C.setAttribute("disabled","disabled");this.okBtn=C;g.appendChild(k);this.container=g}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var g=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(g.getId(),g.getName(),g.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+AspectDialog.prototype.createViewer=function(b,g,k,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var q=new Graph(b);q.setTooltips(!1);q.setEnabled(!1);q.setPanning(!1);q.minFitScale=null;q.maxFitScale=null;q.centerZoom=!0;g="mxGraphModel"==g.nodeName?g:Editor.parseDiagramNode(g);if(null!=g){var x=g.getAttribute("background");if(null==x||""==x||x==mxConstants.NONE)x=null!=d?d:"#ffffff";b.style.backgroundColor=x;d=new mxCodec(g.ownerDocument);b=q.getModel();d.decode(g,b);g=b.getChildCount(b.root);
+d=null==k;for(x=0;x<g;x++){var C=b.getChildAt(b.root,x);b.setVisible(C,d||k==C.id)}q.maxFitScale=1;q.fit(0);q.center()}return q};
+AspectDialog.prototype.createPageItem=function(b,g,k){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(g)+"</div>";this.pagesContainer.appendChild(d);var q=this.createViewer(d.childNodes[0],k);g=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
+this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var x=q.model;x=x.getChildCells(x.getRoot());for(var C=0;C<x.length;C++)this.createLayerItem(x[C],b,q,k)});mxEvent.addListener(d,"click",g);this.aspect.pageId==b&&g()};
+AspectDialog.prototype.createLayerItem=function(b,g,k,d){g=k.convertValueToString(b)||mxResources.get("background")||"Background";var q=document.createElement("div");q.setAttribute("data-layer-id",b.id);q.className="geAspectDlgListItem";q.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(g)+"</div>";this.layersContainer.appendChild(q);this.createViewer(q.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=q.className.indexOf("geAspectDlgListItemSelected")?
+(q.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(q.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(q,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
+var FilePropertiesDialog=function(b){var g=document.createElement("table"),k=document.createElement("tbody");g.style.width="100%";g.style.marginTop="8px";var d=b.getCurrentFile();var q=null!=d&&null!=d.getTitle()?d.getTitle():b.defaultFilename;var x=function(){};if(/(\.png)$/i.test(q)){x=1;var C=0;q=b.fileNode;null!=q&&(q.hasAttribute("scale")&&(x=parseFloat(q.getAttribute("scale"))),q.hasAttribute("border")&&(C=parseInt(q.getAttribute("border"))));q=document.createElement("tr");var G=document.createElement("td");
+G.style.whiteSpace="nowrap";G.style.fontSize="10pt";G.style.width="120px";mxUtils.write(G,mxResources.get("zoom")+":");q.appendChild(G);var H=document.createElement("input");H.setAttribute("value",100*x+"%");H.style.marginLeft="4px";H.style.width="180px";G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(H);q.appendChild(G);k.appendChild(q);q=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.fontSize="10pt";G.style.width="120px";
+mxUtils.write(G,mxResources.get("borderWidth")+":");q.appendChild(G);var I=document.createElement("input");I.setAttribute("value",C);I.style.marginLeft="4px";I.style.width="180px";G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(I);q.appendChild(G);k.appendChild(q);this.init=function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};x=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
+parseInt(H.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(I.value))),null!=d&&d.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(q)&&!/(\.svg)$/i.test(q)){var E=null!=d?d.isCompressed():Editor.compressXml;q=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.fontSize="10pt";G.style.width="120px";mxUtils.write(G,mxResources.get("compressed")+":");q.appendChild(G);var O=document.createElement("input");O.setAttribute("type","checkbox");
+E&&(O.setAttribute("checked","checked"),O.defaultChecked=!0);G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(O);q.appendChild(G);k.appendChild(q);this.init=function(){O.focus()};x=function(){null!=b.fileNode&&E!=O.checked&&(b.fileNode.setAttribute("compressed",O.checked?"true":"false"),null!=d&&d.fileChanged());b.hideDialog()}}if(null!=d&&d.isRealtimeOptional()){q=document.createElement("tr");G=document.createElement("td");G.style.whiteSpace="nowrap";G.style.fontSize="10pt";
+G.style.width="120px";mxUtils.write(G,mxResources.get("realtimeCollaboration")+":");q.appendChild(G);var c=document.createElement("input");c.setAttribute("type","checkbox");var e=d.isRealtimeEnabled();if(e="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))c.setAttribute("checked","checked"),c.defaultChecked=!0;prevApply=x;x=function(){prevApply();b.hideDialog();c.checked!=e&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(c.checked,mxUtils.bind(this,
+function(f){b.spinner.stop()}),mxUtils.bind(this,function(f){b.spinner.stop();b.showError(mxResources.get("error"),null!=f&&null!=f.error?f.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){c.focus()};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(c);G.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));q.appendChild(G);k.appendChild(q)}this.init=null!=this.init?this.init:
+function(){};x=mxUtils.button(mxResources.get("apply"),x);x.className="geBtn gePrimaryBtn";q=document.createElement("tr");G=document.createElement("td");G.colSpan=2;G.style.paddingTop="20px";G.style.whiteSpace="nowrap";G.setAttribute("align","center");C=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});C.className="geBtn";b.editor.cancelFirst&&G.appendChild(C);G.appendChild(x);b.editor.cancelFirst||G.appendChild(C);q.appendChild(G);k.appendChild(q);g.appendChild(k);this.container=
+g},ConnectionPointsDialog=function(b,g){function k(){null!=q&&q.destroy()}var d=document.createElement("div");d.style.userSelect="none";var q=null;this.init=function(){function x(M,F){M=new mxCell("",new mxGeometry(M,F,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");M.vertex=!0;M.cp=!0;return O.addCell(M)}function C(M){M=O.getSelectionCells();O.deleteCells(M)}function G(){var M=parseInt(l.value)||0;M=0>M?0:100<M?100:M;
+l.value=M;var F=parseInt(B.value)||0;F=0>F?0:100<F?100:F;B.value=F;var K=parseInt(u.value)||0,P=parseInt(J.value)||0;M=O.getConnectionPoint(f,new mxConnectionConstraint(new mxPoint(M/100,F/100),!1,null,K,P));F=O.getSelectionCell();if(null!=F){K=F.geometry.clone();P=O.view.scale;var R=O.view.translate;K.x=(M.x-3*P)/P-R.x;K.y=(M.y-3*P)/P-R.y;O.model.setGeometry(F,K)}}function H(M){var F=0,K=0,P=c.geometry,R=mxUtils.format((M.geometry.x+3-P.x)/P.width);M=mxUtils.format((M.geometry.y+3-P.y)/P.height);
+0>R?(F=R*P.width,R=0):1<R&&(F=(R-1)*P.width,R=1);0>M?(K=M*P.height,M=0):1<M&&(K=(M-1)*P.height,M=1);return{x:R,y:M,dx:parseInt(F),dy:parseInt(K)}}function I(){if(1==O.getSelectionCount()){var M=O.getSelectionCell();M=H(M);l.value=100*M.x;B.value=100*M.y;u.value=M.dx;J.value=M.dy;U.style.visibility=""}else U.style.visibility="hidden"}var E=document.createElement("div");E.style.width="350px";E.style.height="350px";E.style.overflow="hidden";E.style.border="1px solid lightGray";E.style.boxSizing="border-box";
+mxEvent.disableContextMenu(E);d.appendChild(E);var O=new Graph(E);O.autoExtend=!1;O.autoScroll=!1;O.setGridEnabled(!1);O.setEnabled(!0);O.setPanning(!0);O.setConnectable(!1);O.setTooltips(!1);O.minFitScale=null;O.maxFitScale=null;O.centerZoom=!0;O.maxFitScale=2;E=g.geometry;var c=new mxCell(g.value,new mxGeometry(0,0,E.width,E.height),g.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");c.vertex=!0;O.addCell(c);O.dblClick=function(M,F){if(null!=F&&F!=c)O.setSelectionCell(F);else{F=
+mxUtils.convertPoint(O.container,mxEvent.getClientX(M),mxEvent.getClientY(M));mxEvent.consume(M);M=O.view.scale;var K=O.view.translate;O.setSelectionCell(x((F.x-3*M)/M-K.x,(F.y-3*M)/M-K.y))}};q=new mxKeyHandler(O);q.bindKey(46,C);q.bindKey(8,C);O.getRubberband().isForceRubberbandEvent=function(M){return 0==M.evt.button&&(null==M.getCell()||M.getCell()==c)};O.panningHandler.isForcePanningEvent=function(M){return 2==M.evt.button};var e=O.isCellSelectable;O.isCellSelectable=function(M){return M==c?!1:
+e.apply(this,arguments)};O.getLinkForCell=function(){return null};var f=O.view.getState(c);E=O.getAllConnectionConstraints(f);for(var n=0;null!=E&&n<E.length;n++){var p=O.getConnectionPoint(f,E[n]);x(p.x-3,p.y-3)}O.fit(8);O.center();n=mxUtils.button("",function(){O.zoomIn()});n.className="geSprite geSprite-zoomin";n.setAttribute("title",mxResources.get("zoomIn"));n.style.position="relative";n.style.outline="none";n.style.border="none";n.style.margin="2px";n.style.cursor="pointer";n.style.top=mxClient.IS_FF?
+"-6px":"0px";mxUtils.setOpacity(n,60);p=mxUtils.button("",function(){O.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.position="relative";p.style.outline="none";p.style.border="none";p.style.margin="2px";p.style.cursor="pointer";p.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(p,60);var t=mxUtils.button("",function(){O.fit(8);O.center()});t.className="geSprite geSprite-fit";t.setAttribute("title",mxResources.get("fit"));t.style.position=
+"relative";t.style.outline="none";t.style.border="none";t.style.margin="2px";t.style.cursor="pointer";t.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(t,60);var y=mxUtils.button("",function(){O.zoomActual();O.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,
+60);var v=mxUtils.button("",C);v.className="geSprite geSprite-delete";v.setAttribute("title",mxResources.get("delete"));v.style.position="relative";v.style.outline="none";v.style.border="none";v.style.margin="2px";v.style.float="right";v.style.cursor="pointer";mxUtils.setOpacity(v,10);E=document.createElement("div");E.appendChild(n);E.appendChild(p);E.appendChild(y);E.appendChild(t);E.appendChild(v);d.appendChild(E);var D=document.createElement("input");D.setAttribute("type","number");D.setAttribute("min",
+"1");D.setAttribute("value","1");D.style.width="45px";D.style.position="relative";D.style.top=mxClient.IS_FF?"0px":"-4px";D.style.margin="0 4px 0 4px";E.appendChild(D);var A=document.createElement("select");A.style.position="relative";A.style.top=mxClient.IS_FF?"0px":"-4px";p=["left","right","top","bottom"];for(n=0;n<p.length;n++)t=p[n],y=document.createElement("option"),mxUtils.write(y,mxResources.get(t)),y.value=t,A.appendChild(y);E.appendChild(A);n=mxUtils.button(mxResources.get("add"),function(){var M=
+parseInt(D.value);M=1>M?1:100<M?100:M;D.value=M;for(var F=A.value,K=c.geometry,P=[],R=0;R<M;R++){switch(F){case "left":var V=K.x;var X=K.y+(R+1)*K.height/(M+1);break;case "right":V=K.x+K.width;X=K.y+(R+1)*K.height/(M+1);break;case "top":V=K.x+(R+1)*K.width/(M+1);X=K.y;break;case "bottom":V=K.x+(R+1)*K.width/(M+1),X=K.y+K.height}P.push(x(V-3,X-3))}O.setSelectionCells(P)});n.style.position="relative";n.style.marginLeft="8px";n.style.top=mxClient.IS_FF?"0px":"-4px";E.appendChild(n);var U=document.createElement("div");
+U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";E=document.createElement("span");mxUtils.write(E,mxResources.get("dx"));U.appendChild(E);var l=document.createElement("input");l.setAttribute("type","number");l.setAttribute("min","0");l.setAttribute("max","100");l.style.width="45px";l.style.margin="0 4px 0 4px";U.appendChild(l);mxUtils.write(U,"%");var u=document.createElement("input");u.setAttribute("type","number");u.style.width="45px";u.style.margin="0 4px 0 4px";
+U.appendChild(u);mxUtils.write(U,"pt");E=document.createElement("span");mxUtils.write(E,mxResources.get("dy"));E.style.marginLeft="12px";U.appendChild(E);var B=document.createElement("input");B.setAttribute("type","number");B.setAttribute("min","0");B.setAttribute("max","100");B.style.width="45px";B.style.margin="0 4px 0 4px";U.appendChild(B);mxUtils.write(U,"%");var J=document.createElement("input");J.setAttribute("type","number");J.style.width="45px";J.style.margin="0 4px 0 4px";U.appendChild(J);
+mxUtils.write(U,"pt");d.appendChild(U);I();O.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<O.getSelectionCount()?mxUtils.setOpacity(v,60):mxUtils.setOpacity(v,10);I()});O.addListener(mxEvent.CELLS_MOVED,I);mxEvent.addListener(l,"change",G);mxEvent.addListener(B,"change",G);mxEvent.addListener(u,"change",G);mxEvent.addListener(J,"change",G);E=mxUtils.button(mxResources.get("cancel"),function(){k();b.hideDialog()});E.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){var M=
+O.model.cells,F=[],K=[],P;for(P in M){var R=M[P];R.cp&&K.push(H(R))}K.sort(function(V,X){return V.x!=X.x?V.x-X.x:V.y!=X.y?V.y-X.y:V.dx!=X.dx?V.dx-X.dx:V.dy-X.dy});for(M=0;M<K.length;M++)0<M&&K[M].x==K[M-1].x&&K[M].y==K[M-1].y&&K[M].dx==K[M-1].dx&&K[M].dy==K[M-1].dy||F.push("["+K[M].x+","+K[M].y+",0,"+K[M].dx+","+K[M].dy+"]");b.editor.graph.setCellStyles("points","["+F.join(",")+"]",[g]);k();b.hideDialog()});n.className="geBtn gePrimaryBtn";p=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[g]);k();b.hideDialog()});p.className="geBtn";t=document.createElement("div");t.style.marginTop="10px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(E),t.appendChild(p),t.appendChild(n)):(t.appendChild(p),t.appendChild(n),t.appendChild(E));d.appendChild(t)};this.destroy=k;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];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"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},
+commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",
+fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.userImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+";
Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==";
@@ -11212,31 +11220,31 @@ Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP/////
Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=";
Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
-Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
-"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(m){m.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(m,z){return"1"!=mxUtils.getValue(m.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(m,
-z){return"1"==mxUtils.getValue(m.style,"comic","0")||"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(m,z){return"1"==
-mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
-{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(m){return"orthogonalEdgeStyle"==mxUtils.getValue(m.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
-dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
-dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&
-0==m.edges.length&&z.isTableCell(m.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTableCell(m.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(m,z){m=z.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLastRow","0")},
-isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTable(m.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(m,z){m=z.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLast","0")},isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTable(m.vertices[0])}},{name:"fillOpacity",
-dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
-defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(m,z){return z.editorUi.editor.graph.isCellConnectable(0<m.vertices.length&&0==m.edges.length?m.vertices[0]:null)},isVisible:function(m,z){return 0<m.vertices.length&&0==m.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
-{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(m,z){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;z=z.editorUi.editor.graph;return null!=m&&(z.isSwimlane(m)||0<z.model.getChildCount(m))},
-isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(m,z){var L=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;z=z.editorUi.editor.graph;return null!=L&&(z.isContainer(L)&&"0"!=m.style.collapsible||!z.isContainer(L)&&"1"==m.style.collapsible)},isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length&&!z.editorUi.editor.graph.isSwimlane(m.vertices[0])&&null==mxUtils.getValue(m.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(m,z){z=z.editorUi.editor.graph.model;return 0<m.vertices.length?z.isVertex(z.getParent(m.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(m,z){m=0<m.vertices.length?z.editorUi.editor.graph.getCellGeometry(m.vertices[0]):null;return null!=m&&!m.relative}},{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(m,z){var L=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return z.editorUi.editor.graph.isSwimlane(m.vertices[0])||null==L||L==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(m,z){return 0<m.vertices.length&&
-z.editorUi.editor.graph.isContainer(m.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.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.enableSimpleTheme="1"==urlParams["live-ui"];
+Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=
+null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(m){m.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(m,z){return"1"!=mxUtils.getValue(m.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",
+type:"float",min:0,defVal:1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"comic","0")||"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?
+"1":"0")&&0<m.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(m,z){return"1"==
+mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",
+type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},
+{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},
+{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(m){return"orthogonalEdgeStyle"==
+mxUtils.getValue(m.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",
+dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",
+dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(m,
+z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTableCell(m.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTableCell(m.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(m,z){m=z.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:
+null);return"1"==mxUtils.getValue(m,"resizeLastRow","0")},isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTable(m.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(m,z){m=z.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLast","0")},isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&
+0==m.edges.length&&z.isTable(m.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",
+defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},
+{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(m,z){return z.editorUi.editor.graph.isCellConnectable(0<m.vertices.length&&0==m.edges.length?m.vertices[0]:null)},isVisible:function(m,z){return 0<m.vertices.length&&0==m.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",
+dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",
+dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(m,z){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;z=z.editorUi.editor.graph;
+return null!=m&&(z.isSwimlane(m)||0<z.model.getChildCount(m))},isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(m,z){var L=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;z=z.editorUi.editor.graph;return null!=L&&(z.isContainer(L)&&"0"!=m.style.collapsible||!z.isContainer(L)&&"1"==m.style.collapsible)},isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"recursiveResize",
+dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length&&!z.editorUi.editor.graph.isSwimlane(m.vertices[0])&&null==mxUtils.getValue(m.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(m,z){z=z.editorUi.editor.graph.model;return 0<m.vertices.length?z.isVertex(z.getParent(m.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",
+defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(m,z){m=0<m.vertices.length?z.editorUi.editor.graph.getCellGeometry(m.vertices[0]):null;return null!=m&&!m.relative}},{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(m,z){var L=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return z.editorUi.editor.graph.isSwimlane(m.vertices[0])||null==L||L==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(m,
+z){return 0<m.vertices.length&&z.editorUi.editor.graph.isContainer(m.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(m){var z=rough.canvas({getContext:function(){return m}});z.draw=function(L){var Q=L.sets||[];L=L.options||this.getDefaultOptions();for(var N=0;N<Q.length;N++){var T=Q[N];switch(T.type){case "path":null!=L.stroke&&this._drawToContext(m,T,L);break;case "fillPath":this._drawToContext(m,T,L);break;case "fillSketch":this.fillSketch(m,T,L)}}};z.fillSketch=function(L,Q,N){var T=m.state.strokeColor,S=m.state.strokeWidth,W=m.state.strokeAlpha,Z=m.state.dashed,ba=N.fillWeight;
0>ba&&(ba=N.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(N.fill||"");m.setStrokeWidth(ba);m.setDashed(!1);this._drawToContext(L,Q,N);m.setDashed(Z);m.setStrokeWidth(S);m.setStrokeColor(T);m.setStrokeAlpha(W)};z._drawToContext=function(L,Q,N){L.begin();for(var T=0;T<Q.ops.length;T++){var S=Q.ops[T],W=S.data;switch(S.op){case "move":L.moveTo(W[0],W[1]);break;case "bcurveTo":L.curveTo(W[0],W[1],W[2],W[3],W[4],W[5]);break;case "lineTo":L.lineTo(W[0],W[1])}}L.end();"fillPath"===
Q.type&&N.filled?L.fill():L.stroke()};return z};(function(){function m(T,S,W){this.canvas=T;this.rc=S;this.shape=W;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
@@ -11275,58 +11283,60 @@ m.emptyLibraryXml);m.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=m.empt
null!=m.autosaveDelay&&(z=parseInt(m.autosaveDelay),!isNaN(z)&&0<z?DrawioFile.prototype.autosaveDelay=z:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=m.maxImageBytes&&(EditorUi.prototype.maxImageBytes=m.maxImageBytes);null!=m.maxImageSize&&(EditorUi.prototype.maxImageSize=m.maxImageSize);null!=m.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=m.shareCursorPosition);null!=m.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=m.showRemoteCursors)}};
Editor.configureFontCss=function(m){if(null!=m){Editor.prototype.fontCss=m;var z=document.getElementsByTagName("script")[0];if(null!=z&&null!=z.parentNode){var L=document.createElement("style");L.setAttribute("type","text/css");L.appendChild(document.createTextNode(m));z.parentNode.insertBefore(L,z);m=m.split("url(");for(L=1;L<m.length;L++){var Q=m[L].indexOf(")");Q=Editor.trimCssUrl(m[L].substring(0,Q));var N=document.createElement("link");N.setAttribute("rel","preload");N.setAttribute("href",Q);
N.setAttribute("as","font");N.setAttribute("crossorigin","");z.parentNode.insertBefore(N,z)}}}};Editor.trimCssUrl=function(m){return m.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(m){m=null!=m?m:Editor.GUID_LENGTH;for(var z=[],L=0;L<m;L++)z.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*
-Editor.GUID_ALPHABET.length)));return z.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(m){m=null!=m&&"mxlibrary"!=m.nodeName?this.extractGraphModel(m):null;if(null!=m){var z=Editor.extractParserError(m,mxResources.get("invalidOrMissingFile"));if(z)throw EditorUi.debug("Editor.setGraphXml ParserError",
-[this],"node",[m],"cause",[z]),Error(mxResources.get("notADiagramFile")+" ("+z+")");if("mxGraphModel"==m.nodeName){z=m.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=z&&""!=z)z!=this.graph.currentStyle&&(L=null!=this.graph.themes?this.graph.themes[z]:mxUtils.load(STYLE_PATH+"/"+z+".xml").getDocumentElement(),null!=L&&(Q=new mxCodec(L.ownerDocument),Q.decode(L,this.graph.getStylesheet())));else{var L=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
-"/default-old.xml").getDocumentElement();if(null!=L){var Q=new mxCodec(L.ownerDocument);Q.decode(L,this.graph.getStylesheet())}}this.graph.currentStyle=z;this.graph.mathEnabled="1"==urlParams.math||"1"==m.getAttribute("math");z=m.getAttribute("backgroundImage");null!=z?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(z)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
-this.graph.setShadowVisible("1"==m.getAttribute("shadow"),!1);if(z=m.getAttribute("extFonts"))try{for(z=z.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}}),L=0;L<z.length;L++)this.graph.addExtFont(z[L].name,z[L].url)}catch(N){console.log("ExtFonts format error: "+N.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
-};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(m,z){m=null!=m?m:!0;var L=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&L.setAttribute("style",this.graph.currentStyle);var Q=this.graph.getBackgroundImageObject(this.graph.backgroundImage,z);null!=Q&&L.setAttribute("backgroundImage",JSON.stringify(Q));L.setAttribute("math",this.graph.mathEnabled?"1":"0");L.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&
-0<this.graph.extFonts.length&&(Q=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),L.setAttribute("extFonts",Q.join("|")));return L};Editor.prototype.isDataSvg=function(m){try{var z=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=z&&(null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(cont,z))),null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z)),null!=z&&0<z.length)){var L=mxUtils.parseXml(z).documentElement;return"mxfile"==
-L.nodeName||"mxGraphModel"==L.nodeName}}catch(Q){}return!1};Editor.prototype.extractGraphModel=function(m,z,L){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var d=
-Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,z){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(N){try{MathJax.typesetClear([N]),MathJax.typeset([N]),
-Editor.onMathJaxDone()}catch(T){MathJax.typesetClear([N]),null!=T.retry?T.retry.then(function(){MathJax.typesetPromise([N]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+T.toString())}};window.MathJax=null!=z?z:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var N=0;N<Editor.mathJaxQueue.length;N++)Editor.doMathJaxRender(Editor.mathJaxQueue[N])}}};
-Editor.MathJaxRender=function(N){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(N):Editor.mathJaxQueue.push(N)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=function(){L.apply(this,arguments);var N=mxUtils.bind(this,function(T,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
-N);this.graph.addListener(mxEvent.REFRESH,N)};z=document.getElementsByTagName("script");if(null!=z&&0<z.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",m);z[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var z="",L=[""],Q=0,N=!0,T;m=$jscomp.makeIterator(m);for(T=m.next();!T.done;T=m.next())T=T.value,'"'===T?(N&&T===z&&(L[Q]+=T),N=!N):","===T&&N?T=L[++Q]="":L[Q]+=T,z=T;return L}return[]};Editor.prototype.getProxiedUrl=
-function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var z=/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m);z=/\.png$/i.test(m)||/\.pdf$/i.test(m)||z;var L="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+L+(z?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.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(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var z=m.convert,L=this;m.convert=function(Q){if(null!=
-Q){var N="http://"==Q.substring(0,7)||"https://"==Q.substring(0,8);N&&!navigator.onLine?Q=Editor.svgBrokenImage.src:!N||Q.substring(0,m.baseUrl.length)==m.baseUrl||L.crossOriginImages&&L.isCorsEnabledForUrl(Q)?"chrome-extension://"==Q.substring(0,19)||mxClient.IS_CHROMEAPP||(Q=z.apply(this,arguments)):Q=PROXY_URL+"?url="+encodeURIComponent(Q)}return Q};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=
-function(m,z){try{var L=!0,Q=window.setTimeout(mxUtils.bind(this,function(){L=!1;z(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(m))mxUtils.get(m,mxUtils.bind(this,function(T){window.clearTimeout(Q);L&&z(Editor.createSvgDataUri(T.getText()))}),function(){window.clearTimeout(Q);L&&z(Editor.svgBrokenImage.src)});else{var N=new Image;this.crossOriginImages&&(N.crossOrigin="anonymous");N.onload=function(){window.clearTimeout(Q);if(L)try{var T=document.createElement("canvas"),S=T.getContext("2d");
-T.height=N.height;T.width=N.width;S.drawImage(N,0,0);z(T.toDataURL())}catch(W){z(Editor.svgBrokenImage.src)}};N.onerror=function(){window.clearTimeout(Q);L&&z(Editor.svgBrokenImage.src)};N.src=m}}catch(T){z(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(m,z,L,Q){null==Q&&(Q=this.createImageUrlConverter());var N=0,T=L||{};L=mxUtils.bind(this,function(S,W){S=m.getElementsByTagName(S);for(var Z=0;Z<S.length;Z++)mxUtils.bind(this,function(ba){try{if(null!=ba){var aa=Q.convert(ba.getAttribute(W));
-if(null!=aa&&"data:"!=aa.substring(0,5)){var fa=T[aa];null==fa?(N++,this.convertImageToDataUri(aa,function(Y){null!=Y&&(T[aa]=Y,ba.setAttribute(W,Y));N--;0==N&&z(m)})):ba.setAttribute(W,fa)}else null!=aa&&ba.setAttribute(W,aa)}}catch(Y){}})(S[Z])});L("image","xlink:href");L("img","src");0==N&&z(m)};Editor.base64Encode=function(m){for(var z="",L=0,Q=m.length,N,T,S;L<Q;){N=m.charCodeAt(L++)&255;if(L==Q){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
-3)<<4);z+="==";break}T=m.charCodeAt(L++);if(L==Q){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(T&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);z+="=";break}S=m.charCodeAt(L++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
-3)<<4|(T&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};Editor.prototype.loadUrl=function(m,z,L,Q,N,T,S,W){try{var Z=!S&&(Q||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));N=null!=N?N:!0;var ba=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(aa){if(200<=aa.getStatus()&&
-299>=aa.getStatus()){if(null!=z){var fa=aa.getText();if(Z){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){aa=mxUtilsBinaryToArray(aa.request.responseBody).toArray();fa=Array(aa.length);for(var Y=0;Y<aa.length;Y++)fa[Y]=String.fromCharCode(aa[Y]);fa=fa.join("")}T=null!=T?T:"data:image/png;base64,";fa=T+Editor.base64Encode(fa)}z(fa)}}else null!=L&&(0==aa.getStatus()?L({message:mxResources.get("accessDenied")},aa):404==aa.getStatus()?L({code:aa.getStatus()},
-aa):L({message:mxResources.get("error")+" "+aa.getStatus()},aa))}),function(aa){null!=L&&L({message:mxResources.get("error")+" "+aa.getStatus()})},Z,this.timeout,function(){N&&null!=L&&L({code:App.ERROR_TIMEOUT,retry:ba})},W)});ba()}catch(aa){null!=L&&L(aa)}};Editor.prototype.absoluteCssFonts=function(m){var z=null;if(null!=m){var L=m.split("url(");if(0<L.length){z=[L[0]];m=window.location.pathname;var Q=null!=m?m.lastIndexOf("/"):-1;0<=Q&&(m=m.substring(0,Q+1));Q=document.getElementsByTagName("base");
-var N=null;null!=Q&&0<Q.length&&(N=Q[0].getAttribute("href"));for(var T=1;T<L.length;T++)if(Q=L[T].indexOf(")"),0<Q){var S=Editor.trimCssUrl(L[T].substring(0,Q));this.graph.isRelativeUrl(S)&&(S=null!=N?N+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":m)+S);z.push('url("'+S+'"'+L[T].substring(Q))}else z.push(L[T])}else z=[m]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(m,z,L){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="+
-encodeURIComponent(z));L(m,z)};Editor.prototype.embedCssFonts=function(m,z){var L=m.split("url("),Q=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==Q){for(var Z=[L[0]],ba=1;ba<L.length;ba++){var aa=L[ba].indexOf(")");Z.push('url("');Z.push(this.cachedFonts[Editor.trimCssUrl(L[ba].substring(0,aa))]);Z.push('"'+L[ba].substring(aa))}z(Z.join(""))}});if(0<L.length){for(m=1;m<L.length;m++){var T=L[m].indexOf(")"),S=null,W=L[m].indexOf("format(",T);0<W&&(S=Editor.trimCssUrl(L[m].substring(W+
-7,L[m].indexOf(")",W))));mxUtils.bind(this,function(Z){if(null==this.cachedFonts[Z]){this.cachedFonts[Z]=Z;Q++;var ba="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(Z))ba="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(Z))ba="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(Z))ba="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(Z))ba="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(Z))ba="application/vnd.ms-fontobject";
-else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(Z))ba="application/font-sfnt";this.mapFontUrl(ba,Z,mxUtils.bind(this,function(aa,fa){this.loadUrl(fa,mxUtils.bind(this,function(Y){this.cachedFonts[Z]=Y;Q--;N()}),mxUtils.bind(this,function(Y){Q--;N()}),!0,null,"data:"+aa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(L[m].substring(0,T)),S)}N()}else z(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=
-z;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&(m[z]=Graph.fontMapping[z]);return m};Editor.prototype.embedExtFonts=function(m){var z=this.graph.getCustomFonts();if(0<z.length){var L=[],Q=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==Q&&this.embedCssFonts(L.join(""),m)}),T=0;T<z.length;T++)mxUtils.bind(this,function(S,W){Graph.isCssFontUrl(W)?
-null==this.cachedGoogleFonts[W]?(Q++,this.loadUrl(W,mxUtils.bind(this,function(Z){this.cachedGoogleFonts[W]=Z;L.push(Z+"\n");Q--;N()}),mxUtils.bind(this,function(Z){Q--;L.push("@import url("+W+");\n");N()}))):L.push(this.cachedGoogleFonts[W]+"\n"):L.push('@font-face {font-family: "'+S+'";src: url("'+W+'")}\n')})(z[T].name,z[T].url);N()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var z=document.getElementsByTagName("style"),L=0;L<z.length;L++){var Q=
-mxUtils.getTextContent(z[L]);0>Q.indexOf("mxPageSelector")&&0<Q.indexOf("MathJax")&&m[0].appendChild(z[L].cloneNode(!0))}};Editor.prototype.addFontCss=function(m,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var L=m.getElementsByTagName("defs"),Q=m.ownerDocument;0==L.length?(L=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"defs"):Q.createElement("defs"),null!=m.firstChild?m.insertBefore(L,m.firstChild):m.appendChild(L)):L=L[0];m=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,
-"style"):Q.createElement("style");m.setAttribute("type","text/css");mxUtils.setTextContent(m,z);L.appendChild(m)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,z,L){var Q=mxClient.IS_FF?8192:16384;return Math.min(L,Math.min(Q/m,Q/z))};Editor.prototype.exportToCanvas=function(m,z,L,Q,N,T,S,W,Z,ba,aa,fa,Y,ia,da,va,Aa,ya){try{T=null!=T?T:!0;S=null!=S?S:!0;fa=null!=fa?fa:this.graph;Y=null!=Y?Y:0;var ta=
-Z?null:fa.background;ta==mxConstants.NONE&&(ta=null);null==ta&&(ta=Q);null==ta&&0==Z&&(ta=va?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(fa.getSvg(null,null,Y,ia,null,S,null,null,null,ba,null,va,Aa,ya),mxUtils.bind(this,function(ca){try{var Pa=new Image;Pa.onload=mxUtils.bind(this,function(){try{var Da=function(){mxClient.IS_SF?window.setTimeout(function(){wa.drawImage(Pa,0,0);m(Ia,ca)},0):(wa.drawImage(Pa,0,0),m(Ia,ca))},Ia=document.createElement("canvas"),qa=parseInt(ca.getAttribute("width")),
-Na=parseInt(ca.getAttribute("height"));W=null!=W?W:1;null!=z&&(W=T?Math.min(1,Math.min(3*z/(4*Na),z/qa)):z/qa);W=this.getMaxCanvasScale(qa,Na,W);qa=Math.ceil(W*qa);Na=Math.ceil(W*Na);Ia.setAttribute("width",qa);Ia.setAttribute("height",Na);var wa=Ia.getContext("2d");null!=ta&&(wa.beginPath(),wa.rect(0,0,qa,Na),wa.fillStyle=ta,wa.fill());1!=W&&wa.scale(W,W);if(da){var ha=fa.view,ea=ha.scale;ha.scale=1;var za=btoa(unescape(encodeURIComponent(ha.createSvgGrid(ha.gridColor))));ha.scale=ea;za="data:image/svg+xml;base64,"+
-za;var ka=fa.gridSize*ha.gridSteps*W,oa=fa.getGraphBounds(),sa=ha.translate.x*ea,ma=ha.translate.y*ea,na=sa+(oa.x-sa)/ea-Y,Ea=ma+(oa.y-ma)/ea-Y,ja=new Image;ja.onload=function(){try{for(var la=-Math.round(ka-mxUtils.mod((sa-na)*W,ka)),pa=-Math.round(ka-mxUtils.mod((ma-Ea)*W,ka));la<qa;la+=ka)for(var xa=pa;xa<Na;xa+=ka)wa.drawImage(ja,la/W,xa/W);Da()}catch(Ba){null!=N&&N(Ba)}};ja.onerror=function(la){null!=N&&N(la)};ja.src=za}else Da()}catch(la){null!=N&&N(la)}});Pa.onerror=function(Da){null!=N&&N(Da)};
-ba&&this.graph.addSvgShadow(ca);this.graph.mathEnabled&&this.addMathCss(ca);var La=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ca,this.resolvedFontCss),Pa.src=Editor.createSvgDataUri(mxUtils.getXml(ca))}catch(Da){null!=N&&N(Da)}});this.embedExtFonts(mxUtils.bind(this,function(Da){try{null!=Da&&this.addFontCss(ca,Da),this.loadFonts(La)}catch(Ia){null!=N&&N(Ia)}}))}catch(Da){null!=N&&N(Da)}}),L,aa)}catch(ca){null!=N&&N(ca)}};Editor.crcTable=[];for(var t=0;256>t;t++)for(var x=
-t,C=0;8>C;C++)x=1==(x&1)?3988292384^x>>>1:x>>>1,Editor.crcTable[t]=x;Editor.updateCRC=function(m,z,L,Q){for(var N=0;N<Q;N++)m=Editor.crcTable[(m^z.charCodeAt(L+N))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,L=0;L<m.length;L++)z=z>>>8^Editor.crcTable[(z^m.charCodeAt(L))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(m,z,L,Q,N){function T(aa,fa){var Y=Z;Z+=fa;return aa.substring(Y,Z)}function S(aa){aa=T(aa,4);return aa.charCodeAt(3)+(aa.charCodeAt(2)<<8)+(aa.charCodeAt(1)<<
-16)+(aa.charCodeAt(0)<<24)}function W(aa){return String.fromCharCode(aa>>24&255,aa>>16&255,aa>>8&255,aa&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var Z=0;if(T(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(T(m,4),"IHDR"!=T(m,4))null!=N&&N();else{T(m,17);N=m.substring(0,Z);do{var ba=S(m);if("IDAT"==T(m,4)){N=m.substring(0,Z-8);"pHYs"==z&&"dpi"==L?(L=Math.round(Q/.0254),L=W(L)+W(L)+String.fromCharCode(1)):L=L+String.fromCharCode(0)+
-("zTXt"==z?String.fromCharCode(0):"")+Q;Q=4294967295;Q=Editor.updateCRC(Q,z,0,4);Q=Editor.updateCRC(Q,L,0,L.length);N+=W(L.length)+z+L+W(Q^4294967295);N+=m.substring(Z-8,m.length);break}N+=m.substring(Z-8,Z-4+ba);T(m,ba);T(m,4)}while(ba);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var G=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,z){G.apply(this,
-arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var H=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,z){var L=null;null!=m.editor.graph.getModel().getParent(z)?L=z.getId():null!=m.currentPage&&(L=m.currentPage.getId());return L});if(null!=window.StyleFormatPanel){var I=Format.prototype.init;
-Format.prototype.init=function(){I.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var F=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?F.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var m=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=m&&m.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(m){return!1};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(m){m=O.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var z=this.editorUi,L=z.editor.graph,Q=this.createOption(mxResources.get("shadow"),function(){return L.shadowVisible},function(N){var T=new ChangePageSetup(z);T.ignoreColor=!0;T.ignoreImage=!0;T.shadowVisible=N;L.model.execute(T)},{install:function(N){this.listener=function(){N(L.shadowVisible)};
-z.addListener("shadowVisibleChanged",this.listener)},destroy:function(){z.removeListener(this.listener)}});Editor.enableShadowOption||(Q.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,60));m.appendChild(Q)}return m};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=c.apply(this,arguments);var z=this.editorUi,L=z.editor.graph;if(L.isEnabled()){var Q=z.getCurrentFile();if(null!=Q&&Q.isAutosaveOptional()){var N=
-this.createOption(mxResources.get("autosave"),function(){return z.editor.autosave},function(S){z.editor.setAutosave(S);z.editor.autosave&&Q.isModified()&&Q.fileChanged()},{install:function(S){this.listener=function(){S(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}});m.appendChild(N)}}if(this.isMathOptionVisible()&&L.isEnabled()&&"undefined"!==typeof MathJax){N=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return L.mathEnabled},function(S){z.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(L.mathEnabled)};z.addListener("mathEnabledChanged",this.listener)},destroy:function(){z.removeListener(this.listener)}});N.style.paddingTop="5px";m.appendChild(N);var T=z.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");T.style.position="relative";T.style.marginLeft="6px";T.style.top="2px";N.appendChild(T)}return m};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",
-dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",
-type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",
-dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
-[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=
-[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",
-type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",
-type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+Editor.GUID_ALPHABET.length)));return z.join("")};Editor.updateStatusInterval=1E4;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.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(m){m=null!=m&&
+"mxlibrary"!=m.nodeName?this.extractGraphModel(m):null;if(null!=m){var z=Editor.extractParserError(m,mxResources.get("invalidOrMissingFile"));if(z)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[m],"cause",[z]),Error(mxResources.get("notADiagramFile")+" ("+z+")");if("mxGraphModel"==m.nodeName){z=m.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=z&&""!=z)z!=this.graph.currentStyle&&(L=null!=this.graph.themes?this.graph.themes[z]:mxUtils.load(STYLE_PATH+"/"+
+z+".xml").getDocumentElement(),null!=L&&(Q=new mxCodec(L.ownerDocument),Q.decode(L,this.graph.getStylesheet())));else{var L=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=L){var Q=new mxCodec(L.ownerDocument);Q.decode(L,this.graph.getStylesheet())}}this.graph.currentStyle=z;this.graph.mathEnabled="1"==urlParams.math||"1"==m.getAttribute("math");z=m.getAttribute("backgroundImage");null!=z?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(z)):
+this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==m.getAttribute("shadow"),!1);if(z=m.getAttribute("extFonts"))try{for(z=z.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}}),L=0;L<z.length;L++)this.graph.addExtFont(z[L].name,z[L].url)}catch(N){console.log("ExtFonts format error: "+N.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 g=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(m,z){m=null!=m?m:!0;var L=g.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&L.setAttribute("style",this.graph.currentStyle);var Q=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
+z);null!=Q&&L.setAttribute("backgroundImage",JSON.stringify(Q));L.setAttribute("math",this.graph.mathEnabled?"1":"0");L.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Q=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),L.setAttribute("extFonts",Q.join("|")));return L};Editor.prototype.isDataSvg=function(m){try{var z=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=z&&(null!=z&&"<"!=z.charAt(0)&&"%"!=
+z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(cont,z))),null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z)),null!=z&&0<z.length)){var L=mxUtils.parseXml(z).documentElement;return"mxfile"==L.nodeName||"mxGraphModel"==L.nodeName}}catch(Q){}return!1};Editor.prototype.extractGraphModel=function(m,z,L){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,z){if("undefined"===
+typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(N){try{MathJax.typesetClear([N]),MathJax.typeset([N]),Editor.onMathJaxDone()}catch(T){MathJax.typesetClear([N]),null!=T.retry?T.retry.then(function(){MathJax.typesetPromise([N]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+T.toString())}};window.MathJax=null!=z?z:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==
+urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var N=0;N<Editor.mathJaxQueue.length;N++)Editor.doMathJaxRender(Editor.mathJaxQueue[N])}}};Editor.MathJaxRender=function(N){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(N):Editor.mathJaxQueue.push(N)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var L=Editor.prototype.init;Editor.prototype.init=
+function(){L.apply(this,arguments);var N=mxUtils.bind(this,function(T,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,N);this.graph.addListener(mxEvent.REFRESH,N)};z=document.getElementsByTagName("script");if(null!=z&&0<z.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",m);z[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=
+function(m){if(0<m.length){var z="",L=[""],Q=0,N=!0,T;m=$jscomp.makeIterator(m);for(T=m.next();!T.done;T=m.next())T=T.value,'"'===T?(N&&T===z&&(L[Q]+=T),N=!N):","===T&&N?T=L[++Q]="":L[Q]+=T,z=T;return L}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var z=/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m);z=/\.png$/i.test(m)||/\.pdf$/i.test(m)||
+z;var L="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+L+(z?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.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(m)||"https://raw.githubusercontent.com/"===m.substring(0,
+34)||"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var z=m.convert,L=this;m.convert=function(Q){if(null!=Q){var N="http://"==Q.substring(0,7)||"https://"==Q.substring(0,8);N&&!navigator.onLine?Q=Editor.svgBrokenImage.src:!N||Q.substring(0,m.baseUrl.length)==m.baseUrl||L.crossOriginImages&&L.isCorsEnabledForUrl(Q)?"chrome-extension://"==Q.substring(0,
+19)||mxClient.IS_CHROMEAPP||(Q=z.apply(this,arguments)):Q=PROXY_URL+"?url="+encodeURIComponent(Q)}return Q};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,z){try{var L=!0,Q=window.setTimeout(mxUtils.bind(this,function(){L=!1;z(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(m))mxUtils.get(m,mxUtils.bind(this,function(T){window.clearTimeout(Q);L&&z(Editor.createSvgDataUri(T.getText()))}),
+function(){window.clearTimeout(Q);L&&z(Editor.svgBrokenImage.src)});else{var N=new Image;this.crossOriginImages&&(N.crossOrigin="anonymous");N.onload=function(){window.clearTimeout(Q);if(L)try{var T=document.createElement("canvas"),S=T.getContext("2d");T.height=N.height;T.width=N.width;S.drawImage(N,0,0);z(T.toDataURL())}catch(W){z(Editor.svgBrokenImage.src)}};N.onerror=function(){window.clearTimeout(Q);L&&z(Editor.svgBrokenImage.src)};N.src=m}}catch(T){z(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=
+function(m,z,L,Q){null==Q&&(Q=this.createImageUrlConverter());var N=0,T=L||{};L=mxUtils.bind(this,function(S,W){S=m.getElementsByTagName(S);for(var Z=0;Z<S.length;Z++)mxUtils.bind(this,function(ba){try{if(null!=ba){var aa=Q.convert(ba.getAttribute(W));if(null!=aa&&"data:"!=aa.substring(0,5)){var fa=T[aa];null==fa?(N++,this.convertImageToDataUri(aa,function(Y){null!=Y&&(T[aa]=Y,ba.setAttribute(W,Y));N--;0==N&&z(m)})):ba.setAttribute(W,fa)}else null!=aa&&ba.setAttribute(W,aa)}}catch(Y){}})(S[Z])});
+L("image","xlink:href");L("img","src");0==N&&z(m)};Editor.base64Encode=function(m){for(var z="",L=0,Q=m.length,N,T,S;L<Q;){N=m.charCodeAt(L++)&255;if(L==Q){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4);z+="==";break}T=m.charCodeAt(L++);if(L==Q){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
+3)<<4|(T&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);z+="=";break}S=m.charCodeAt(L++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(T&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};
+Editor.prototype.loadUrl=function(m,z,L,Q,N,T,S,W){try{var Z=!S&&(Q||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));N=null!=N?N:!0;var ba=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(aa){if(200<=aa.getStatus()&&299>=aa.getStatus()){if(null!=z){var fa=aa.getText();if(Z){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){aa=mxUtilsBinaryToArray(aa.request.responseBody).toArray();
+fa=Array(aa.length);for(var Y=0;Y<aa.length;Y++)fa[Y]=String.fromCharCode(aa[Y]);fa=fa.join("")}T=null!=T?T:"data:image/png;base64,";fa=T+Editor.base64Encode(fa)}z(fa)}}else null!=L&&(0==aa.getStatus()?L({message:mxResources.get("accessDenied")},aa):404==aa.getStatus()?L({code:aa.getStatus()},aa):L({message:mxResources.get("error")+" "+aa.getStatus()},aa))}),function(aa){null!=L&&L({message:mxResources.get("error")+" "+aa.getStatus()})},Z,this.timeout,function(){N&&null!=L&&L({code:App.ERROR_TIMEOUT,
+retry:ba})},W)});ba()}catch(aa){null!=L&&L(aa)}};Editor.prototype.absoluteCssFonts=function(m){var z=null;if(null!=m){var L=m.split("url(");if(0<L.length){z=[L[0]];m=window.location.pathname;var Q=null!=m?m.lastIndexOf("/"):-1;0<=Q&&(m=m.substring(0,Q+1));Q=document.getElementsByTagName("base");var N=null;null!=Q&&0<Q.length&&(N=Q[0].getAttribute("href"));for(var T=1;T<L.length;T++)if(Q=L[T].indexOf(")"),0<Q){var S=Editor.trimCssUrl(L[T].substring(0,Q));this.graph.isRelativeUrl(S)&&(S=null!=N?N+S:
+window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":m)+S);z.push('url("'+S+'"'+L[T].substring(Q))}else z.push(L[T])}else z=[m]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(m,z,L){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="+encodeURIComponent(z));L(m,z)};Editor.prototype.embedCssFonts=function(m,z){var L=m.split("url("),Q=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==Q){for(var Z=
+[L[0]],ba=1;ba<L.length;ba++){var aa=L[ba].indexOf(")");Z.push('url("');Z.push(this.cachedFonts[Editor.trimCssUrl(L[ba].substring(0,aa))]);Z.push('"'+L[ba].substring(aa))}z(Z.join(""))}});if(0<L.length){for(m=1;m<L.length;m++){var T=L[m].indexOf(")"),S=null,W=L[m].indexOf("format(",T);0<W&&(S=Editor.trimCssUrl(L[m].substring(W+7,L[m].indexOf(")",W))));mxUtils.bind(this,function(Z){if(null==this.cachedFonts[Z]){this.cachedFonts[Z]=Z;Q++;var ba="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(Z))ba=
+"image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(Z))ba="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(Z))ba="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(Z))ba="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(Z))ba="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(Z))ba="application/font-sfnt";this.mapFontUrl(ba,Z,mxUtils.bind(this,function(aa,fa){this.loadUrl(fa,mxUtils.bind(this,
+function(Y){this.cachedFonts[Z]=Y;Q--;N()}),mxUtils.bind(this,function(Y){Q--;N()}),!0,null,"data:"+aa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(L[m].substring(0,T)),S)}N()}else z(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=z;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&
+(m[z]=Graph.fontMapping[z]);return m};Editor.prototype.embedExtFonts=function(m){var z=this.graph.getCustomFonts();if(0<z.length){var L=[],Q=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==Q&&this.embedCssFonts(L.join(""),m)}),T=0;T<z.length;T++)mxUtils.bind(this,function(S,W){Graph.isCssFontUrl(W)?null==this.cachedGoogleFonts[W]?(Q++,this.loadUrl(W,mxUtils.bind(this,function(Z){this.cachedGoogleFonts[W]=Z;L.push(Z+"\n");
+Q--;N()}),mxUtils.bind(this,function(Z){Q--;L.push("@import url("+W+");\n");N()}))):L.push(this.cachedGoogleFonts[W]+"\n"):L.push('@font-face {font-family: "'+S+'";src: url("'+W+'")}\n')})(z[T].name,z[T].url);N()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var z=document.getElementsByTagName("style"),L=0;L<z.length;L++){var Q=mxUtils.getTextContent(z[L]);0>Q.indexOf("mxPageSelector")&&0<Q.indexOf("MathJax")&&m[0].appendChild(z[L].cloneNode(!0))}};
+Editor.prototype.addFontCss=function(m,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var L=m.getElementsByTagName("defs"),Q=m.ownerDocument;0==L.length?(L=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"defs"):Q.createElement("defs"),null!=m.firstChild?m.insertBefore(L,m.firstChild):m.appendChild(L)):L=L[0];m=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"style"):Q.createElement("style");m.setAttribute("type","text/css");mxUtils.setTextContent(m,z);L.appendChild(m)}};
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,z,L){var Q=mxClient.IS_FF?8192:16384;return Math.min(L,Math.min(Q/m,Q/z))};Editor.prototype.exportToCanvas=function(m,z,L,Q,N,T,S,W,Z,ba,aa,fa,Y,ia,da,va,Aa,ya){try{T=null!=T?T:!0;S=null!=S?S:!0;fa=null!=fa?fa:this.graph;Y=null!=Y?Y:0;var ta=Z?null:fa.background;ta==mxConstants.NONE&&(ta=null);null==ta&&(ta=Q);null==ta&&0==Z&&(ta=va?this.graph.defaultPageBackgroundColor:
+"#ffffff");this.convertImages(fa.getSvg(null,null,Y,ia,null,S,null,null,null,ba,null,va,Aa,ya),mxUtils.bind(this,function(ca){try{var Pa=new Image;Pa.onload=mxUtils.bind(this,function(){try{var Da=function(){mxClient.IS_SF?window.setTimeout(function(){wa.drawImage(Pa,0,0);m(Ia,ca)},0):(wa.drawImage(Pa,0,0),m(Ia,ca))},Ia=document.createElement("canvas"),qa=parseInt(ca.getAttribute("width")),Na=parseInt(ca.getAttribute("height"));W=null!=W?W:1;null!=z&&(W=T?Math.min(1,Math.min(3*z/(4*Na),z/qa)):z/qa);
+W=this.getMaxCanvasScale(qa,Na,W);qa=Math.ceil(W*qa);Na=Math.ceil(W*Na);Ia.setAttribute("width",qa);Ia.setAttribute("height",Na);var wa=Ia.getContext("2d");null!=ta&&(wa.beginPath(),wa.rect(0,0,qa,Na),wa.fillStyle=ta,wa.fill());1!=W&&wa.scale(W,W);if(da){var ha=fa.view,ea=ha.scale;ha.scale=1;var za=btoa(unescape(encodeURIComponent(ha.createSvgGrid(ha.gridColor))));ha.scale=ea;za="data:image/svg+xml;base64,"+za;var ka=fa.gridSize*ha.gridSteps*W,oa=fa.getGraphBounds(),sa=ha.translate.x*ea,ma=ha.translate.y*
+ea,na=sa+(oa.x-sa)/ea-Y,Ea=ma+(oa.y-ma)/ea-Y,ja=new Image;ja.onload=function(){try{for(var la=-Math.round(ka-mxUtils.mod((sa-na)*W,ka)),pa=-Math.round(ka-mxUtils.mod((ma-Ea)*W,ka));la<qa;la+=ka)for(var xa=pa;xa<Na;xa+=ka)wa.drawImage(ja,la/W,xa/W);Da()}catch(Ba){null!=N&&N(Ba)}};ja.onerror=function(la){null!=N&&N(la)};ja.src=za}else Da()}catch(la){null!=N&&N(la)}});Pa.onerror=function(Da){null!=N&&N(Da)};ba&&this.graph.addSvgShadow(ca);this.graph.mathEnabled&&this.addMathCss(ca);var La=mxUtils.bind(this,
+function(){try{null!=this.resolvedFontCss&&this.addFontCss(ca,this.resolvedFontCss),Pa.src=Editor.createSvgDataUri(mxUtils.getXml(ca))}catch(Da){null!=N&&N(Da)}});this.embedExtFonts(mxUtils.bind(this,function(Da){try{null!=Da&&this.addFontCss(ca,Da),this.loadFonts(La)}catch(Ia){null!=N&&N(Ia)}}))}catch(Da){null!=N&&N(Da)}}),L,aa)}catch(ca){null!=N&&N(ca)}};Editor.crcTable=[];for(var q=0;256>q;q++)for(var x=q,C=0;8>C;C++)x=1==(x&1)?3988292384^x>>>1:x>>>1,Editor.crcTable[q]=x;Editor.updateCRC=function(m,
+z,L,Q){for(var N=0;N<Q;N++)m=Editor.crcTable[(m^z.charCodeAt(L+N))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,L=0;L<m.length;L++)z=z>>>8^Editor.crcTable[(z^m.charCodeAt(L))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(m,z,L,Q,N){function T(aa,fa){var Y=Z;Z+=fa;return aa.substring(Y,Z)}function S(aa){aa=T(aa,4);return aa.charCodeAt(3)+(aa.charCodeAt(2)<<8)+(aa.charCodeAt(1)<<16)+(aa.charCodeAt(0)<<24)}function W(aa){return String.fromCharCode(aa>>24&255,aa>>16&255,aa>>
+8&255,aa&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var Z=0;if(T(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(T(m,4),"IHDR"!=T(m,4))null!=N&&N();else{T(m,17);N=m.substring(0,Z);do{var ba=S(m);if("IDAT"==T(m,4)){N=m.substring(0,Z-8);"pHYs"==z&&"dpi"==L?(L=Math.round(Q/.0254),L=W(L)+W(L)+String.fromCharCode(1)):L=L+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+Q;Q=4294967295;Q=Editor.updateCRC(Q,z,0,4);
+Q=Editor.updateCRC(Q,L,0,L.length);N+=W(L.length)+z+L+W(Q^4294967295);N+=m.substring(Z-8,m.length);break}N+=m.substring(Z-8,Z-4+ba);T(m,ba);T(m,4)}while(ba);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var G=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,z){G.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
+var H=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,z){var L=null;null!=m.editor.graph.getModel().getParent(z)?L=z.getId():null!=m.currentPage&&(L=m.currentPage.getId());return L});if(null!=window.StyleFormatPanel){var I=Format.prototype.init;Format.prototype.init=function(){I.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
+this.update)};var E=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?E.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var m=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=m&&m.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return!1};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=
+function(m){m=O.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var z=this.editorUi,L=z.editor.graph,Q=this.createOption(mxResources.get("shadow"),function(){return L.shadowVisible},function(N){var T=new ChangePageSetup(z);T.ignoreColor=!0;T.ignoreImage=!0;T.shadowVisible=N;L.model.execute(T)},{install:function(N){this.listener=function(){N(L.shadowVisible)};z.addListener("shadowVisibleChanged",this.listener)},destroy:function(){z.removeListener(this.listener)}});
+Editor.enableShadowOption||(Q.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,60));m.appendChild(Q)}return m};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=c.apply(this,arguments);var z=this.editorUi,L=z.editor.graph;if(L.isEnabled()){var Q=z.getCurrentFile();if(null!=Q&&Q.isAutosaveOptional()){var N=this.createOption(mxResources.get("autosave"),function(){return z.editor.autosave},function(S){z.editor.setAutosave(S);
+z.editor.autosave&&Q.isModified()&&Q.fileChanged()},{install:function(S){this.listener=function(){S(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}});m.appendChild(N)}}if(this.isMathOptionVisible()&&L.isEnabled()&&"undefined"!==typeof MathJax){N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return L.mathEnabled},function(S){z.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=
+function(){S(L.mathEnabled)};z.addListener("mathEnabledChanged",this.listener)},destroy:function(){z.removeListener(this.listener)}});N.style.paddingTop="5px";m.appendChild(N);var T=z.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");T.style.position="relative";T.style.marginLeft="6px";T.style.top="2px";N.appendChild(T)}return m};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
+[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
+type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
+type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",
+type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},
+{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",
+type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",
+type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",
+dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];
+mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
@@ -11341,7 +11351,7 @@ font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#
{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(m,z,L){if(null!=z){var Q=function(T){if(null!=T)if(L)for(var S=0;S<T.length;S++)z[T[S].name]=T[S];else for(var W in z){var Z=!1;for(S=0;S<T.length;S++)if(T[S].name==W&&T[S].type==z[W].type){Z=!0;break}Z||delete z[W]}},N=this.editorUi.editor.graph.view.getState(m);null!=N&&null!=N.shape&&(N.shape.commonCustomPropAdded||(N.shape.commonCustomPropAdded=!0,N.shape.customProperties=N.shape.customProperties||[],N.cell.vertex?Array.prototype.push.apply(N.shape.customProperties,Editor.commonVertexProperties):
Array.prototype.push.apply(N.shape.customProperties,Editor.commonEdgeProperties)),Q(N.shape.customProperties));m=m.getAttribute("customProperties");if(null!=m)try{Q(JSON.parse(m))}catch(T){}}};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();"image"!=m.style.shape&&!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments);if(Editor.enableCustomProperties){for(var z=
-{},L=m.vertices,Q=m.edges,N=0;N<L.length;N++)this.findCommonProperties(L[N],z,0==N);for(N=0;N<Q.length;N++)this.findCommonProperties(Q[N],z,0==L.length&&0==N);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(z).length&&this.container.appendChild(this.addProperties(this.createPanel(),z,m))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(m){this.addActions(m,["copyStyle","pasteStyle"]);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+{},L=m.vertices,Q=m.edges,N=0;N<L.length;N++)this.findCommonProperties(L[N],z,0==N);for(N=0;N<Q.length;N++)this.findCommonProperties(Q[N],z,0==L.length&&0==N);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(z).length&&this.container.appendChild(this.addProperties(this.createPanel(),z,m))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(m){this.addActions(m,["copyStyle","pasteStyle"]);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
!0;StyleFormatPanel.prototype.addProperties=function(m,z,L){function Q(wa,ha,ea,za){fa.getModel().beginUpdate();try{var ka=[],oa=[];if(null!=ea.index){for(var sa=[],ma=ea.parentRow.nextSibling;ma&&ma.getAttribute("data-pName")==wa;)sa.push(ma.getAttribute("data-pValue")),ma=ma.nextSibling;ea.index<sa.length?null!=za?sa.splice(za,1):sa[ea.index]=ha:sa.push(ha);null!=ea.size&&sa.length>ea.size&&(sa=sa.slice(0,ea.size));ha=sa.join(",");null!=ea.countProperty&&(fa.setCellStyles(ea.countProperty,sa.length,
fa.getSelectionCells()),ka.push(ea.countProperty),oa.push(sa.length))}fa.setCellStyles(wa,ha,fa.getSelectionCells());ka.push(wa);oa.push(ha);if(null!=ea.dependentProps)for(wa=0;wa<ea.dependentProps.length;wa++){var na=ea.dependentPropsDefVal[wa],Ea=ea.dependentPropsVals[wa];if(Ea.length>ha)Ea=Ea.slice(0,ha);else for(var ja=Ea.length;ja<ha;ja++)Ea.push(na);Ea=Ea.join(",");fa.setCellStyles(ea.dependentProps[wa],Ea,fa.getSelectionCells());ka.push(ea.dependentProps[wa]);oa.push(Ea)}if("function"==typeof ea.onChange)ea.onChange(fa,
ha);aa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",oa,"cells",fa.getSelectionCells()))}finally{fa.getModel().endUpdate()}}function N(wa,ha,ea){var za=mxUtils.getOffset(m,!0),ka=mxUtils.getOffset(wa,!0);ha.style.position="absolute";ha.style.left=ka.x-za.x+"px";ha.style.top=ka.y-za.y+"px";ha.style.width=wa.offsetWidth+"px";ha.style.height=wa.offsetHeight-(ea?4:0)+"px";ha.style.zIndex=5}function T(wa,ha,ea){var za=document.createElement("div");za.style.width="32px";za.style.height=
@@ -11380,7 +11390,7 @@ return m};Graph.getFontUrl=function(m,z){m=Graph.customFontElements[m.toLowerCas
null);null!=L&&Graph.addFont(L,decodeURIComponent(z))}}return m};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 n=Graph.prototype.init;Graph.prototype.init=function(){function m(N){z=N}n.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var z=null;mxEvent.addListener(this.container,"mouseenter",m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(N){z=null});this.isMouseInsertPoint=function(){return null!=z};var L=this.getInsertPoint;
this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):L.apply(this,arguments)};var Q=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var T=this.graph.getCellStyle(N);if(null!=T&&"rack"==T.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=T.marginLeft||0;S.marginRight=T.marginRight||0;S.marginTop=T.marginTop||0;S.marginBottom=
-T.marginBottom||0;S.allowGaps=T.allowGaps||0;S.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return Q.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,z){return Graph.processFontStyle(p.apply(this,arguments))};var v=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,z,L,Q,N,T,S,W,Z,ba,aa){v.apply(this,arguments);Graph.processFontAttributes(aa)};
+T.marginBottom||0;S.allowGaps=T.allowGaps||0;S.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return Q.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,z){return Graph.processFontStyle(p.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,z,L,Q,N,T,S,W,Z,ba,aa){t.apply(this,arguments);Graph.processFontAttributes(aa)};
var y=mxText.prototype.redraw;mxText.prototype.redraw=function(){y.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,z,L){function Q(){for(var da=S.getSelectionCells(),va=[],Aa=0;Aa<da.length;Aa++)S.isCellVisible(da[Aa])&&va.push(da[Aa]);S.setSelectionCells(va)}function N(da){S.setHiddenTags(da?[]:W.slice());Q();S.refresh()}function T(da,va){ba.innerText="";if(0<da.length){var Aa=document.createElement("table");
Aa.setAttribute("cellpadding","2");Aa.style.boxSizing="border-box";Aa.style.tableLayout="fixed";Aa.style.width="100%";var ya=document.createElement("tbody");if(null!=da&&0<da.length)for(var ta=0;ta<da.length;ta++)(function(ca){var Pa=0>mxUtils.indexOf(S.hiddenTags,ca),La=document.createElement("tr"),Da=document.createElement("td");Da.style.align="center";Da.style.width="16px";var Ia=document.createElement("img");Ia.setAttribute("src",Pa?Editor.visibleImage:Editor.hiddenImage);Ia.setAttribute("title",
mxResources.get(Pa?"hideIt":"show",[ca]));mxUtils.setOpacity(Ia,Pa?75:25);Ia.style.verticalAlign="middle";Ia.style.cursor="pointer";Ia.style.width="16px";if(z||Editor.isDarkMode())Ia.style.filter="invert(100%)";Da.appendChild(Ia);mxEvent.addListener(Ia,"click",function(Na){mxEvent.isShiftDown(Na)?N(0<=mxUtils.indexOf(S.hiddenTags,ca)):(S.toggleHiddenTag(ca),Q(),S.refresh());mxEvent.consume(Na)});La.appendChild(Da);Da=document.createElement("td");Da.style.overflow="hidden";Da.style.whiteSpace="nowrap";
@@ -11392,12 +11402,12 @@ qa.style.background="transparent";qa.setAttribute("title",mxResources.get(qa.def
(W=S.hiddenTags.slice());Q();S.refresh()});aa.setAttribute("title",mxResources.get("reset"));aa.className="geBtn";aa.style.margin="0 4px 0 0";var fa=mxUtils.button(mxResources.get("add"),function(){null!=L&&L(W,function(da){W=da;Y()})});fa.setAttribute("title",mxResources.get("add"));fa.className="geBtn";fa.style.margin="0";S.addListener(mxEvent.ROOT,function(){W=S.hiddenTags.slice()});var Y=mxUtils.bind(this,function(da,va){if(m()){da=S.getAllTags();for(va=0;va<da.length;va++)0>mxUtils.indexOf(W,
da[va])&&W.push(da[va]);W.sort();S.isSelectionEmpty()?T(W):T(W,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,Y);S.model.addListener(mxEvent.CHANGE,Y);S.addListener(mxEvent.REFRESH,Y);var ia=document.createElement("div");ia.style.boxSizing="border-box";ia.style.whiteSpace="nowrap";ia.style.position="absolute";ia.style.overflow="hidden";ia.style.bottom="0px";ia.style.height="42px";ia.style.right="10px";ia.style.left="10px";S.isEnabled()&&(ia.appendChild(aa),
ia.appendChild(fa),Z.appendChild(ia));return{div:Z,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];for(var z in Graph.customFontElements){var L=Graph.customFontElements[z];m.push({name:L.name,url:L.url})}return m};Graph.prototype.setFont=function(m,z){Graph.addFont(m,z);document.execCommand("fontname",!1,m);if(null!=z){var L=this.cellEditor.textarea.getElementsByTagName("font");z=Graph.getFontUrl(m,z);for(var Q=0;Q<L.length;Q++)L[Q].getAttribute("face")==
-m&&L[Q].getAttribute("data-font-src")!=z&&L[Q].setAttribute("data-font-src",z)}};var u=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return u.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 m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var z in m)this.globalVars[z]=
+m&&L[Q].getAttribute("data-font-src")!=z&&L[Q].setAttribute("data-font-src",z)}};var v=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return v.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var z in m)this.globalVars[z]=
m[z]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var z=D.apply(this,arguments);null==z&&null!=this.globalVars&&(z=this.globalVars[m]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=
(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,z,L,Q,N,T,S,W,Z,ba,aa,fa,Y,ia){var da=null,va=null,Aa=null;fa||null==this.themes||"darkTheme"!=this.defaultThemeName||(da=this.stylesheet,va=this.shapeForegroundColor,Aa=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 ya=A.apply(this,arguments),ta=this.getCustomFonts();if(aa&&0<ta.length){var ca=ya.ownerDocument,Pa=null!=ca.createElementNS?ca.createElementNS(mxConstants.NS_SVG,"style"):ca.createElement("style");null!=ca.setAttributeNS?Pa.setAttributeNS("type","text/css"):Pa.setAttribute("type","text/css");for(var La="",Da="",Ia=0;Ia<ta.length;Ia++){var qa=ta[Ia].name,Na=ta[Ia].url;Graph.isCssFontUrl(Na)?
La+="@import url("+Na+");\n":Da+='@font-face {\nfont-family: "'+qa+'";\nsrc: url("'+Na+'");\n}\n'}Pa.appendChild(ca.createTextNode(La+Da));ya.getElementsByTagName("defs")[0].appendChild(Pa)}this.mathEnabled&&(document.body.appendChild(ya),Editor.MathJaxRender(ya),ya.parentNode.removeChild(ya));null!=da&&(this.shapeBackgroundColor=Aa,this.shapeForegroundColor=va,this.stylesheet=da,this.refresh());return ya};var U=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){U.apply(this,
-arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var l=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){l.apply(this,arguments);this.enumerationState=0};var q=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return q.apply(this,arguments)};
+arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var l=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){l.apply(this,arguments);this.enumerationState=0};var u=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return u.apply(this,arguments)};
mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(m){var z="1"==mxUtils.getValue(m.style,"enumerate",0);z&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):z||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);z=m.secondLabel;if(null!=z){var L=m.view.scale,Q=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?new mxRectangle(m.x+m.width-4*L,m.y+4*L,0,0):mxRectangle.fromPoint(m.view.getPoint(m));z.bounds.equals(m)&&z.value==Q&&z.scale==L||(z.bounds=m,z.value=Q,z.scale=
L,z.redraw())}};var B=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){B.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var m=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||
@@ -11412,7 +11422,7 @@ aa.highlight.opacity));null!=aa.scroll&&(Y=this.getCellsForAction(aa.scroll));nu
W,ba?1:aa.steps,ba?0:aa.delay));0==Q?Z():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=z&&z()});Z()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,z){var L=this.getLinkForCell(z);null!=L&&"data:action/json,"==L.substring(0,17)&&this.setLinkForCell(z,this.updateCustomLink(m,L));if(this.isHtmlLabel(z)){var Q=document.createElement("div");Q.innerHTML=this.sanitizeHtml(this.getLabel(z));for(var N=Q.getElementsByTagName("a"),T=!1,S=0;S<N.length;S++)L=N[S].getAttribute("href"),
null!=L&&"data:action/json,"==L.substring(0,17)&&(N[S].setAttribute("href",this.updateCustomLink(m,L)),T=!0);T&&this.labelChanged(z,Q.innerHTML)}};Graph.prototype.updateCustomLink=function(m,z){if("data:action/json,"==z.substring(0,17))try{var L=JSON.parse(z.substring(17));null!=L.actions&&(this.updateCustomLinkActions(m,L.actions),z="data:action/json,"+JSON.stringify(L))}catch(Q){}return z};Graph.prototype.updateCustomLinkActions=function(m,z){for(var L=0;L<z.length;L++){var Q=z[L],N;for(N in Q)this.updateCustomLinkAction(m,
Q[N],"cells"),this.updateCustomLinkAction(m,Q[N],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,z,L){if(null!=z&&null!=z[L]){for(var Q=[],N=0;N<z[L].length;N++)if("*"==z[L][N])Q.push(z[L][N]);else{var T=m[z[L][N]];null!=T?""!=T&&Q.push(T):Q.push(z[L][N])}z[L]=Q}};Graph.prototype.getCellsForAction=function(m,z){z=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,z));if(null!=m.excludeCells){for(var L=[],Q=0;Q<z.length;Q++)0>m.excludeCells.indexOf(z[Q].id)&&L.push(z[Q]);
-z=L}return z};Graph.prototype.getCellsById=function(m){var z=[];if(null!=m)for(var L=0;L<m.length;L++)if("*"==m[L]){var Q=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(T){return T!=Q},Q))}else{var N=this.model.getCell(m[L]);null!=N&&z.push(N)}return z};var E=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return E.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+z=L}return z};Graph.prototype.getCellsById=function(m){var z=[];if(null!=m)for(var L=0;L<m.length;L++)if("*"==m[L]){var Q=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(T){return T!=Q},Q))}else{var N=this.model.getCell(m[L]);null!=N&&z.push(N)}return z};var F=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return F.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
Graph.prototype.toggleHiddenTag=function(m){var z=mxUtils.indexOf(this.hiddenTags,m);0>z?this.hiddenTags.push(m):0<=z&&this.hiddenTags.splice(z,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var z=0;z<m.length;z++)if(0>mxUtils.indexOf(this.hiddenTags,m[z]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,z,L,
Q){var N=[];if(null!=m){z=null!=z?z:this.model.getDescendants(this.model.getRoot());for(var T=0,S={},W=0;W<m.length;W++)0<m[W].length&&(S[m[W]]=!0,T++);for(W=0;W<z.length;W++)if(L&&this.model.getParent(z[W])==this.model.root||this.model.isVertex(z[W])||this.model.isEdge(z[W])){var Z=this.getTagsForCell(z[W]),ba=!1;if(0<Z.length&&(Z=Z.split(" "),Z.length>=m.length)){for(var aa=ba=0;aa<Z.length&&ba<T;aa++)null!=S[Z[aa]]&&ba++;ba=ba==T}ba&&(1!=Q||this.isCellVisible(z[W]))&&N.push(z[W])}}return N};Graph.prototype.getAllTags=
function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var z=null,L=[],Q=0;Q<m.length;Q++){var N=this.getTagsForCell(m[Q]);L=[];if(0<N.length){N=N.split(" ");for(var T={},S=0;S<N.length;S++)if(null==z||null!=z[N[S]])T[N[S]]=!0,L.push(N[S]);z=T}else return[]}return L};Graph.prototype.getTagsForCells=function(m){for(var z=[],L={},Q=0;Q<m.length;Q++){var N=this.getTagsForCell(m[Q]);if(0<N.length){N=N.split(" ");for(var T=
@@ -11463,335 +11473,338 @@ z.appendChild(S);m.isOffline()||(da=mxUtils.button(mxResources.get("help"),funct
z.appendChild(S);T.appendChild(z);this.container=T};var R=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 m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=m}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 R.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var V=document.createElement("canvas"),X=new Image;X.onload=function(){try{V.getContext("2d").drawImage(X,0,0);var m=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=m&&6<m.length}catch(z){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}Editor.prototype.useCanvasForExport=
-!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.4.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(g,k,d){d.ui=g.ui;return k};b.afterDecode=function(g,k,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(g,k,d){d.ui=g.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.4.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=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,n,p,v,y){v=null!=v?v:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var u=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";p=null!=p?p:Error(c);(new Image).src=u+"/log?severity="+v+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=n?":colno:"+
-encodeURIComponent(n):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(D){}try{y||null==window.console||console.error(v,c,e,g,n,p)}catch(D){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
-function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,
-c)}}catch(g){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,f,n,p,t,y){t=null!=t?t:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var v=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";p=null!=p?p:Error(c);(new Image).src=v+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(f)+(null!=n?":colno:"+
+encodeURIComponent(n):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}}catch(D){}try{y||null==window.console||console.error(t,c,e,f,n,p)}catch(D){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(f){}};EditorUi.sendReport=
+function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(f){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,
+c)}}catch(f){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(p){}try{var e=document.createElement("canvas"),g=new Image;g.onload=function(){try{e.getContext("2d").drawImage(g,0,0);var p=
-e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=p&&6<p.length}catch(v){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{e=document.createElement("canvas");e.width=e.height=1;var n=e.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==n.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(c,e,g){return this.editor.graph.openLink(c,e,g)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,g){localStorage.setItem(c,e);null!=g&&g()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(p){}try{var e=document.createElement("canvas"),f=new Image;f.onload=function(){try{e.getContext("2d").drawImage(f,0,0);var p=
+e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=p&&6<p.length}catch(t){}};f.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{e=document.createElement("canvas");e.width=e.height=1;var n=e.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==n.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(c,e,f){return this.editor.graph.openLink(c,e,f)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,f){localStorage.setItem(c,e);null!=f&&f()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=
c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){this.editor.graph.mathEnabled=c;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(c,e,g){var n=null==c||null==e;g=null!=g?g:24;var p=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),v=p.spin;p.spin=function(u,D){var A=!1;this.active||(v.call(this,u),this.active=!0,null!=D&&(n&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),A=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(c,e,f){var n=null==c||null==e;f=null!=f?f:24;var p=new Spinner({lines:12,length:f,width:Math.round(f/3),radius:Math.round(f/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=p.spin;p.spin=function(v,D){var A=!1;this.active||(t.call(this,v),this.active=!0,null!=D&&(n&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=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,c)+"px",A.style.top=Math.max(0,e+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"),"..."!=D.substring(D.length-3,D.length)&&"!"!=D.charAt(D.length-1)&&(D+="..."),A.innerHTML=D,u.appendChild(A),p.status=A),this.pause=mxUtils.bind(this,function(){var U=function(){};this.active&&(U=mxUtils.bind(this,function(){this.spin(u,D)}));this.stop();return U}),A=!0);return A};var y=p.stop;p.stop=function(){y.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(c){try{var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=D.substring(D.length-3,D.length)&&"!"!=D.charAt(D.length-1)&&(D+="..."),A.innerHTML=D,v.appendChild(A),p.status=A),this.pause=mxUtils.bind(this,function(){var U=function(){};this.active&&(U=mxUtils.bind(this,function(){this.spin(v,D)}));this.stop();return U}),A=!0);return A};var y=p.stop;p.stop=function(){y.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(c){try{var e=mxUtils.parseXml(c),f=this.editor.extractGraphModel(e.documentElement,!0);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&
3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,n=this.editor.graph,p=this;e.getFunction=function(v){if(n.isSelectionEmpty()&&null!=p.pages&&0<p.pages.length){var y=p.getSelectedPageIndex();if(mxEvent.isShiftDown(v)){if(37==v.keyCode)return function(){0<y&&p.movePage(y,y-1)};if(38==v.keyCode)return function(){0<y&&p.movePage(y,0)};if(39==v.keyCode)return function(){y<p.pages.length-1&&p.movePage(y,
-y+1)};if(40==v.keyCode)return function(){y<p.pages.length-1&&p.movePage(y,p.pages.length-1)}}else if(mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)){if(37==v.keyCode)return function(){0<y&&p.selectNextPage(!1)};if(38==v.keyCode)return function(){0<y&&p.selectPage(p.pages[0])};if(39==v.keyCode)return function(){y<p.pages.length-1&&p.selectNextPage(!0)};if(40==v.keyCode)return function(){y<p.pages.length-1&&p.selectPage(p.pages[p.pages.length-1])}}}return!(65<=v.keyCode&&90>=v.keyCode)||
-n.isSelectionEmpty()||mxEvent.isAltDown(v)||mxEvent.isShiftDown(v)||mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)?g.apply(this,arguments):null}}return e};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=f.apply(this,arguments);if(null==e)try{var g=c.indexOf("&lt;mxfile ");if(0<=g){var n=c.lastIndexOf("&lt;/mxfile&gt;");n>g&&(e=c.substring(g,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var p=mxUtils.parseXml(c),v=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=v?mxUtils.getXml(v):""}}catch(y){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);
-c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;e.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,n=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var p=n.length-1;0<=p;p--){var v=this.updatePageRoot(new DiagramPage(n[p]));null==v.getName()&&
-v.setName(mxResources.get("pageWithNumber",[p+1]));e.model.execute(new ChangePage(this,v,0==p?v:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(p=0;p<g.length;p++)e.model.execute(new ChangePage(this,g[p],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,g,n,p,v,y,u,D,A,U){e=null!=e?e:this.editor.graph;p=null!=p?p:!1;D=null!=D?D:!0;var l=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var q="_blank";else l=q=n;if(null==c)return"";var B=c;if("mxfile"!=B.nodeName.toLowerCase()){if(U){var J=c.ownerDocument.createElement("diagram");J.setAttribute("id",Editor.guid());
+EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var f=e.getFunction,n=this.editor.graph,p=this;e.getFunction=function(t){if(n.isSelectionEmpty()&&null!=p.pages&&0<p.pages.length){var y=p.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<y&&p.movePage(y,y-1)};if(38==t.keyCode)return function(){0<y&&p.movePage(y,0)};if(39==t.keyCode)return function(){y<p.pages.length-1&&p.movePage(y,
+y+1)};if(40==t.keyCode)return function(){y<p.pages.length-1&&p.movePage(y,p.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)){if(37==t.keyCode)return function(){0<y&&p.selectNextPage(!1)};if(38==t.keyCode)return function(){0<y&&p.selectPage(p.pages[0])};if(39==t.keyCode)return function(){y<p.pages.length-1&&p.selectNextPage(!0)};if(40==t.keyCode)return function(){y<p.pages.length-1&&p.selectPage(p.pages[p.pages.length-1])}}}return!(65<=t.keyCode&&90>=t.keyCode)||
+n.isSelectionEmpty()||mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)?f.apply(this,arguments):null}}return e};var g=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var e=g.apply(this,arguments);if(null==e)try{var f=c.indexOf("&lt;mxfile ");if(0<=f){var n=c.lastIndexOf("&lt;/mxfile&gt;");n>f&&(e=c.substring(f,n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var p=mxUtils.parseXml(c),t=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=t?mxUtils.getXml(t):""}}catch(y){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);
+c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;e.model.beginUpdate();try{var f=null!=this.pages?this.pages.slice():null,n=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var p=n.length-1;0<=p;p--){var t=this.updatePageRoot(new DiagramPage(n[p]));null==t.getName()&&
+t.setName(mxResources.get("pageWithNumber",[p+1]));e.model.execute(new ChangePage(this,t,0==p?t:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=f)for(p=0;p<f.length;p++)e.model.execute(new ChangePage(this,f[p],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,f,n,p,t,y,v,D,A,U){e=null!=e?e:this.editor.graph;p=null!=p?p:!1;D=null!=D?D:!0;var l=null;if(null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER)var u="_blank";else l=u=n;if(null==c)return"";var B=c;if("mxfile"!=B.nodeName.toLowerCase()){if(U){var J=c.ownerDocument.createElement("diagram");J.setAttribute("id",Editor.guid());
J.appendChild(c)}else{J=Graph.zapGremlins(mxUtils.getXml(c));B=Graph.compress(J);if(Graph.decompress(B)!=J)return J;J=c.ownerDocument.createElement("diagram");J.setAttribute("id",Editor.guid());mxUtils.setTextContent(J,B)}B=c.ownerDocument.createElement("mxfile");B.appendChild(J)}A?(B=B.cloneNode(!0),B.removeAttribute("modified"),B.removeAttribute("host"),B.removeAttribute("agent"),B.removeAttribute("etag"),B.removeAttribute("userAgent"),B.removeAttribute("version"),B.removeAttribute("editor"),B.removeAttribute("type")):
-(B.removeAttribute("userAgent"),B.removeAttribute("version"),B.removeAttribute("editor"),B.removeAttribute("pages"),B.removeAttribute("type"),mxClient.IS_CHROMEAPP?B.setAttribute("host","Chrome"):EditorUi.isElectronApp?B.setAttribute("host","Electron"):B.setAttribute("host",window.location.hostname),B.setAttribute("modified",(new Date).toISOString()),B.setAttribute("agent",navigator.appVersion),B.setAttribute("version",EditorUi.VERSION),B.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,
-null!=c&&B.setAttribute("type",c),1<B.getElementsByTagName("diagram").length&&null!=this.pages&&B.setAttribute("pages",this.pages.length));U=U?mxUtils.getPrettyXml(B):mxUtils.getXml(B);if(!v&&!p&&(y||null!=g&&/(\.html)$/i.test(g.getTitle())))U=this.getHtml2(mxUtils.getXml(B),e,null!=g?g.getTitle():null,q,l);else if(v||!p&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(n=null),U=this.getEmbeddedSvg(U,e,n,null,u,D,l);return U};EditorUi.prototype.getXmlFileData=
-function(c,e,g,n){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var p=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(D){var A=D.getElementsByTagName("mxGraphModel");A=0<A.length?A[0]:null;null==A&&g?(A=mxUtils.trim(mxUtils.getTextContent(D)),D=D.cloneNode(!1),0<A.length&&(A=Graph.decompress(A),null!=A&&0<A.length&&D.appendChild(mxUtils.parseXml(A).documentElement))):null==A||g?D=D.cloneNode(!0):(D=D.cloneNode(!1),mxUtils.setTextContent(D,
-Graph.compressNode(A)));p.appendChild(D)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(p)),p=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var v=this.pages[e],y=v.node;if(v!=this.currentPage)if(v.needsUpdate){var u=new mxCodec(mxUtils.createXmlDocument());u=u.encode(new mxGraphModel(v.root));this.editor.graph.saveViewState(v.viewState,u,null,n);EditorUi.removeChildNodes(y);mxUtils.setTextContent(y,
-Graph.compressNode(u));delete v.needsUpdate}else n&&(this.updatePageRoot(v),null!=v.viewState.backgroundImage&&(null!=v.viewState.backgroundImage.originalSrc?v.viewState.backgroundImage=this.createImageForPageLink(v.viewState.backgroundImage.originalSrc,v):Graph.isPageLink(v.viewState.backgroundImage.src)&&(v.viewState.backgroundImage=this.createImageForPageLink(v.viewState.backgroundImage.src,v))),null!=v.viewState.backgroundImage&&null!=v.viewState.backgroundImage.originalSrc&&(u=new mxCodec(mxUtils.createXmlDocument()),
-u=u.encode(new mxGraphModel(v.root)),this.editor.graph.saveViewState(v.viewState,u,null,n),y=y.cloneNode(!1),mxUtils.setTextContent(y,Graph.compressNode(u))));c(y)}return p};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],n=0;n<c.length;n++){var p=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(p)?g.push(p):isNaN(parseInt(p))?p.toLowerCase()!=p?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):p.toUpperCase()!=p?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):
-/\s/.test(p)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(g)}catch(v){c[EditorUi.DIFF_INSERT][e].data=
-v.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var n in c[EditorUi.DIFF_UPDATE]){var p=c[EditorUi.DIFF_UPDATE][n];null!=p.name&&(p.name=this.anonymizeString(p.name));null!=p.cells&&(e=mxUtils.bind(this,function(v){var y=p.cells[v];if(null!=y){for(var u in y)null!=y[u].value&&(y[u].value="["+y[u].value.length+"]"),null!=y[u].xmlValue&&(y[u].xmlValue="["+y[u].xmlValue.length+"]"),null!=y[u].style&&(y[u].style="["+y[u].style.length+"]"),mxUtils.isEmptyObject(y[u])&&delete y[u];mxUtils.isEmptyObject(y)&&
-delete p.cells[v]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(p.cells)&&delete p.cells);mxUtils.isEmptyObject(p)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g=
-0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var g=0;g<e.length;g++)null!=e[g].getAttribute("value")&&e[g].setAttribute("value","["+e[g].getAttribute("value").length+"]"),null!=e[g].getAttribute("xmlValue")&&e[g].setAttribute("xmlValue","["+e[g].getAttribute("xmlValue").length+"]"),null!=e[g].getAttribute("style")&&e[g].setAttribute("style","["+e[g].getAttribute("style").length+"]"),null!=
-e[g].parentNode&&"root"!=e[g].parentNode.nodeName&&null!=e[g].parentNode.parentNode&&(e[g].setAttribute("id",e[g].parentNode.getAttribute("id")),e[g].parentNode.parentNode.replaceChild(e[g],e[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),
-this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,n,p,v,y,u,D,A,U){p=null!=p?p:!0;v=null!=v?v:!1;var l=this.editor.graph;if(e||!c&&null!=D&&/(\.svg)$/i.test(D.getTitle())){var q=
-null!=l.themes&&"darkTheme"==l.defaultThemeName;A=!1;if(q||null!=this.pages&&this.currentPage!=this.pages[0]){var B=l.getGlobalVariable;l=this.createTemporaryGraph(q?l.getDefaultStylesheet():l.getStylesheet());l.setBackgroundImage=this.editor.graph.setBackgroundImage;l.background=this.editor.graph.background;var J=this.pages[0];this.currentPage==J?l.setBackgroundImage(this.editor.graph.backgroundImage):null!=J.viewState&&null!=J.viewState&&l.setBackgroundImage(J.viewState.backgroundImage);l.getGlobalVariable=
-function(M){return"page"==M?J.getName():"pagenumber"==M?1:B.apply(this,arguments)};document.body.appendChild(l.container);l.model.setRoot(J.root)}}y=null!=y?y:this.getXmlFileData(p,v,A,U);D=null!=D?D:this.getCurrentFile();c=this.createFileData(y,l,D,window.location.href,c,e,g,n,p,u,A);l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);return c};EditorUi.prototype.getHtml=function(c,e,g,n,p,v){v=null!=v?v:!0;var y=null,u=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){y=
-v?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var D=e.view.scale;v=Math.floor(y.x/D-e.view.translate.x);D=Math.floor(y.y/D-e.view.translate.y);y=e.background;null==p&&(e=this.getBasenames().join(";"),0<e.length&&(u=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",v);c.setAttribute("y0",D)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=n&&c.setAttribute("edit",
-n));null!=p&&(p=p.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));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!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+
-p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=y&&y!=mxConstants.NONE?' style="background-color:'+y+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==p?'<script type="text/javascript" src="'+u+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
-"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,g,n,p){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=p&&(p=p.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==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!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==p?'<script type="text/javascript" src="'+
-e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",
-[this],"data",[c],"node",[e],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){g=null;this.fileNode=e;this.pages=[];for(var n=0;n<c.length;n++)null==c[n].getAttribute("id")&&c[n].setAttribute("id",n),e=new DiagramPage(c[n]),null==e.getName()&&e.setName(mxResources.get("pageWithNumber",
-[n+1])),this.pages.push(e),null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]&&(g=e);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);
-null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var p=urlParams["layer-ids"].split(" ");e={};for(n=0;n<p.length;n++)e[p[n]]=!0;var v=this.editor.graph.getModel(),y=v.getChildren(v.root);for(n=0;n<y.length;n++){var u=y[n];v.setVisible(u,e[u.id]||!1)}}catch(D){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||
-/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,n,p,v,y,u,D,A,U,l){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var q=this.getBaseFilename("remoteSvg"==c?
-!1:!p),B=q+("xml"==c||"pdf"==c&&U?".drawio":"")+"."+c;if("xml"==c){var J=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,p,null,null,null,e);this.saveData(B,c,J,"text/xml")}else if("html"==c)J=this.getHtml2(this.getFileData(!0),this.editor.graph,q),this.saveData(B,c,J,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)B=q+".png";else if("jpeg"==c)B=q+".jpg";else if("remoteSvg"==c){B=q+".svg";c="svg";var M=parseInt(D);
-"string"===typeof u&&0<u.indexOf("%")&&(u=parseInt(u)/100);if(0<M){var E=this.editor.graph,K=E.getGraphBounds();var P=Math.ceil(K.width*u/E.view.scale+2*M);var R=Math.ceil(K.height*u/E.view.scale+2*M)}}this.saveRequest(B,c,mxUtils.bind(this,function(L,Q){try{var N=this.editor.graph.pageVisible;0==v&&(this.editor.graph.pageVisible=v);var T=this.createDownloadRequest(L,c,n,Q,y,p,u,D,A,U,l,P,R);this.editor.graph.pageVisible=N;return T}catch(S){this.handleError(S)}}))}else{var V=null,X=mxUtils.bind(this,
-function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(B,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});if("svg"==c){var m=this.editor.graph.background;if(y||m==mxConstants.NONE)m=null;var z=this.editor.graph.getSvg(m,null,null,null,null,n);g&&this.editor.graph.addSvgShadow(z);this.editor.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();X(Graph.xmlDeclaration+
-"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else B=q+".svg",V=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();X(L)}),n)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,n,p,v,y,u,D,A,U,l,q){var B=this.editor.graph,J=B.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==v?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var M="",E="";if(J.width*J.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
-A=A?"1":"0";"pdf"==e&&(null!=U?E="&from="+U.from+"&to="+U.to:0==v&&(E="&allPages=1"));"xmlpng"==e&&(A="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(v=0;v<this.pages.length;v++)if(this.pages[v]==this.currentPage){M="&from="+v;break}v=B.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!p?p||null!=v&&v!=mxConstants.NONE||(v="#ffffff"):v=mxConstants.NONE;p={globalVars:B.getExportVariables()};D&&(p.grid={size:B.gridSize,steps:B.view.gridSteps,color:B.view.gridColor});Graph.translateDiagram&&
-(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+M+E+"&bg="+(null!=v?v:mxConstants.NONE)+"&base64="+n+"&embedXml="+A+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=y?"&scale="+y:"")+(null!=u?"&border="+u:"")+(l&&isFinite(l)?"&w="+l:"")+(q&&isFinite(q)?"&h="+q:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var n=
-window.location.hash,p=mxUtils.bind(this,function(y){var u=null!=c.data?c.data:"";null!=y&&0<y.length&&(0<u.length&&(u+="\n"),u+=y);y=new LocalFile(this,"csv"!=c.format&&0<u.length?u:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return n};this.fileLoaded(y);"csv"==c.format&&this.importCsv(u,mxUtils.bind(this,function(q){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var D=
-null!=c.interval?parseInt(c.interval):6E4,A=null,U=mxUtils.bind(this,function(){var q=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(B){q===this.currentPage&&(200<=B.getStatus()&&300>=B.getStatus()?(this.updateDiagram(B.getText()),l()):this.handleError({message:mxResources.get("error")+" "+B.getStatus()}))}),mxUtils.bind(this,function(B){this.handleError(B)}))}),l=mxUtils.bind(this,function(){window.clearTimeout(A);
-A=window.setTimeout(U,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){l();U()}));l();U()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var v=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(v,mxUtils.bind(this,function(y){p(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)}))}else p("")};EditorUi.prototype.updateDiagram=function(c){function e(R){var V=new mxCellOverlay(R.image||p.warningImage,R.tooltip,R.align,R.valign,R.offset);V.addListener(mxEvent.CLICK,function(X,
-m){n.alert(R.tooltip)});return V}var g=null,n=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var p=this.editor.graph,v=p.getModel();v.beginUpdate();var y=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var u=v.getCell(c.getAttribute("id"));if(null!=u){try{var D=c.getAttribute("value");if(null!=D){var A=mxUtils.parseXml(D).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))v.setValue(u,A);else for(var U=
-A.attributes,l=0;l<U.length;l++)p.setAttributeForCell(u,U[l].nodeName,0<U[l].nodeValue.length?U[l].nodeValue:null)}}catch(R){null!=window.console&&console.log("Error in value for "+u.id+": "+R)}try{var q=c.getAttribute("style");null!=q&&p.model.setStyle(u,q)}catch(R){null!=window.console&&console.log("Error in style for "+u.id+": "+R)}try{var B=c.getAttribute("icon");if(null!=B){var J=0<B.length?JSON.parse(B):null;null!=J&&J.append||p.removeCellOverlays(u);null!=J&&p.addCellOverlay(u,e(J))}}catch(R){null!=
-window.console&&console.log("Error in icon for "+u.id+": "+R)}try{var M=c.getAttribute("geometry");if(null!=M){M=JSON.parse(M);var E=p.getCellGeometry(u);if(null!=E){E=E.clone();for(key in M){var K=parseFloat(M[key]);"dx"==key?E.x+=K:"dy"==key?E.y+=K:"dw"==key?E.width+=K:"dh"==key?E.height+=K:E[key]=parseFloat(M[key])}p.model.setGeometry(u,E)}}}catch(R){null!=window.console&&console.log("Error in icon for "+u.id+": "+R)}}}else if("model"==c.nodeName){for(var P=c.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=
-P.nextSibling;null!=P&&(new mxCodec(c.firstChild)).decode(P,v)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(p.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(y=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{v.endUpdate()}null!=y&&this.chromelessResize&&this.chromelessResize(!0,
-y)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=g.lastIndexOf(".");0<=n&&(c=g.substring(n),g=g.substring(0,n));if(e){e=g;var p=new Date;g=p.getFullYear();n=p.getMonth()+1;var v=p.getDate(),y=p.getHours(),u=p.getMinutes();p=p.getSeconds();g=e+(" "+(g+"-"+n+"-"+v+"-"+y+"-"+u+"-"+p))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable=
-this.fileLoadedError=null;this.setCurrentFile(null);var n=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var p=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&
+(B.removeAttribute("userAgent"),B.removeAttribute("version"),B.removeAttribute("editor"),B.removeAttribute("pages"),B.removeAttribute("type"),mxClient.IS_CHROMEAPP?B.setAttribute("host","Chrome"):EditorUi.isElectronApp?B.setAttribute("host","Electron"):B.setAttribute("host",window.location.hostname),B.setAttribute("modified",(new Date).toISOString()),B.setAttribute("agent",navigator.appVersion),B.setAttribute("version",EditorUi.VERSION),B.setAttribute("etag",Editor.guid()),c=null!=f?f.getMode():this.mode,
+null!=c&&B.setAttribute("type",c),1<B.getElementsByTagName("diagram").length&&null!=this.pages&&B.setAttribute("pages",this.pages.length));U=U?mxUtils.getPrettyXml(B):mxUtils.getXml(B);if(!t&&!p&&(y||null!=f&&/(\.html)$/i.test(f.getTitle())))U=this.getHtml2(mxUtils.getXml(B),e,null!=f?f.getTitle():null,u,l);else if(t||!p&&null!=f&&/(\.svg)$/i.test(f.getTitle()))null==f||f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER||(n=null),U=this.getEmbeddedSvg(U,e,n,null,v,D,l);return U};EditorUi.prototype.getXmlFileData=
+function(c,e,f,n){c=null!=c?c:!0;e=null!=e?e:!1;f=null!=f?f:!Editor.compressXml;var p=this.editor.getGraphXml(c,n);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(D){var A=D.getElementsByTagName("mxGraphModel");A=0<A.length?A[0]:null;null==A&&f?(A=mxUtils.trim(mxUtils.getTextContent(D)),D=D.cloneNode(!1),0<A.length&&(A=Graph.decompress(A),null!=A&&0<A.length&&D.appendChild(mxUtils.parseXml(A).documentElement))):null==A||f?D=D.cloneNode(!0):(D=D.cloneNode(!1),mxUtils.setTextContent(D,
+Graph.compressNode(A)));p.appendChild(D)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(p)),p=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var t=this.pages[e],y=t.node;if(t!=this.currentPage)if(t.needsUpdate){var v=new mxCodec(mxUtils.createXmlDocument());v=v.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,v,null,n);EditorUi.removeChildNodes(y);mxUtils.setTextContent(y,
+Graph.compressNode(v));delete t.needsUpdate}else n&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&null!=t.viewState.backgroundImage.originalSrc&&(v=new mxCodec(mxUtils.createXmlDocument()),
+v=v.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,v,null,n),y=y.cloneNode(!1),mxUtils.setTextContent(y,Graph.compressNode(v))));c(y)}return p};EditorUi.prototype.anonymizeString=function(c,e){for(var f=[],n=0;n<c.length;n++){var p=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(p)?f.push(p):isNaN(parseInt(p))?p.toLowerCase()!=p?f.push(String.fromCharCode(65+Math.round(25*Math.random()))):p.toUpperCase()!=p?f.push(String.fromCharCode(97+Math.round(25*Math.random()))):
+/\s/.test(p)?f.push(" "):f.push("?"):f.push(e?"0":Math.round(9*Math.random()))}return f.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var f=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=f.getAttribute("name")&&f.setAttribute("name",this.anonymizeString(f.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(f)}catch(t){c[EditorUi.DIFF_INSERT][e].data=
+t.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var n in c[EditorUi.DIFF_UPDATE]){var p=c[EditorUi.DIFF_UPDATE][n];null!=p.name&&(p.name=this.anonymizeString(p.name));null!=p.cells&&(e=mxUtils.bind(this,function(t){var y=p.cells[t];if(null!=y){for(var v in y)null!=y[v].value&&(y[v].value="["+y[v].value.length+"]"),null!=y[v].xmlValue&&(y[v].xmlValue="["+y[v].xmlValue.length+"]"),null!=y[v].style&&(y[v].style="["+y[v].style.length+"]"),mxUtils.isEmptyObject(y[v])&&delete y[v];mxUtils.isEmptyObject(y)&&
+delete p.cells[t]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(p.cells)&&delete p.cells);mxUtils.isEmptyObject(p)&&delete c[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var f=0;f<c.attributes.length;f++)"as"!=c.attributes[f].name&&c.setAttribute(c.attributes[f].name,this.anonymizeString(c.attributes[f].value,e));if(null!=c.childNodes)for(f=
+0;f<c.childNodes.length;f++)this.anonymizeAttributes(c.childNodes[f],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var f=0;f<e.length;f++)null!=e[f].getAttribute("value")&&e[f].setAttribute("value","["+e[f].getAttribute("value").length+"]"),null!=e[f].getAttribute("xmlValue")&&e[f].setAttribute("xmlValue","["+e[f].getAttribute("xmlValue").length+"]"),null!=e[f].getAttribute("style")&&e[f].setAttribute("style","["+e[f].getAttribute("style").length+"]"),null!=
+e[f].parentNode&&"root"!=e[f].parentNode.nodeName&&null!=e[f].parentNode.parentNode&&(e[f].setAttribute("id",e[f].parentNode.getAttribute("id")),e[f].parentNode.parentNode.replaceChild(e[f],e[f].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),
+this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(f){e.handleFileError(f,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(f){e.handleFileError(f,!0)}))))};EditorUi.prototype.getFileData=function(c,e,f,n,p,t,y,v,D,A,U){p=null!=p?p:!0;t=null!=t?t:!1;var l=this.editor.graph;if(e||!c&&null!=D&&/(\.svg)$/i.test(D.getTitle())){var u=
+null!=l.themes&&"darkTheme"==l.defaultThemeName;A=!1;if(u||null!=this.pages&&this.currentPage!=this.pages[0]){var B=l.getGlobalVariable;l=this.createTemporaryGraph(u?l.getDefaultStylesheet():l.getStylesheet());l.setBackgroundImage=this.editor.graph.setBackgroundImage;l.background=this.editor.graph.background;var J=this.pages[0];this.currentPage==J?l.setBackgroundImage(this.editor.graph.backgroundImage):null!=J.viewState&&null!=J.viewState&&l.setBackgroundImage(J.viewState.backgroundImage);l.getGlobalVariable=
+function(M){return"page"==M?J.getName():"pagenumber"==M?1:B.apply(this,arguments)};document.body.appendChild(l.container);l.model.setRoot(J.root)}}y=null!=y?y:this.getXmlFileData(p,t,A,U);D=null!=D?D:this.getCurrentFile();c=this.createFileData(y,l,D,window.location.href,c,e,f,n,p,v,A);l!=this.editor.graph&&l.container.parentNode.removeChild(l.container);return c};EditorUi.prototype.getHtml=function(c,e,f,n,p,t){t=null!=t?t:!0;var y=null,v=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){y=
+t?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var D=e.view.scale;t=Math.floor(y.x/D-e.view.translate.x);D=Math.floor(y.y/D-e.view.translate.y);y=e.background;null==p&&(e=this.getBasenames().join(";"),0<e.length&&(v=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",t);c.setAttribute("y0",D)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=n&&c.setAttribute("edit",
+n));null!=p&&(p=p.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";n=Graph.compress(c);Graph.decompress(n)!=c&&(n=encodeURIComponent(c));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!=f?"<title>"+mxUtils.htmlEntities(f)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+
+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=y&&y!=mxConstants.NONE?' style="background-color:'+y+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==p?'<script type="text/javascript" src="'+v+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+
+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,f,n,p){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=p&&(p=p.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==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!=f?"<title>"+mxUtils.htmlEntities(f)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==p?'<script type="text/javascript" src="'+
+e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,f=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(f)throw EditorUi.debug("EditorUi.setFileData ParserError",
+[this],"data",[c],"node",[e],"cause",[f]),Error(mxResources.get("notADiagramFile")+" ("+f+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){f=null;this.fileNode=e;this.pages=[];for(var n=0;n<c.length;n++)null==c[n].getAttribute("id")&&c[n].setAttribute("id",n),e=new DiagramPage(c[n]),null==e.getName()&&e.setName(mxResources.get("pageWithNumber",
+[n+1])),this.pages.push(e),null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]&&(f=e);this.currentPage=null!=f?f:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);
+null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var p=urlParams["layer-ids"].split(" ");e={};for(n=0;n<p.length;n++)e[p[n]]=!0;var t=this.editor.graph.getModel(),y=t.getChildren(t.root);for(n=0;n<y.length;n++){var v=y[n];t.setVisible(v,e[v.id]||!1)}}catch(D){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||
+/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,f,n,p,t,y,v,D,A,U,l){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var u=this.getBaseFilename("remoteSvg"==c?
+!1:!p),B=u+("xml"==c||"pdf"==c&&U?".drawio":"")+"."+c;if("xml"==c){var J=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,p,null,null,null,e);this.saveData(B,c,J,"text/xml")}else if("html"==c)J=this.getHtml2(this.getFileData(!0),this.editor.graph,u),this.saveData(B,c,J,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)B=u+".png";else if("jpeg"==c)B=u+".jpg";else if("remoteSvg"==c){B=u+".svg";c="svg";var M=parseInt(D);
+"string"===typeof v&&0<v.indexOf("%")&&(v=parseInt(v)/100);if(0<M){var F=this.editor.graph,K=F.getGraphBounds();var P=Math.ceil(K.width*v/F.view.scale+2*M);var R=Math.ceil(K.height*v/F.view.scale+2*M)}}this.saveRequest(B,c,mxUtils.bind(this,function(L,Q){try{var N=this.editor.graph.pageVisible;0==t&&(this.editor.graph.pageVisible=t);var T=this.createDownloadRequest(L,c,n,Q,y,p,v,D,A,U,l,P,R);this.editor.graph.pageVisible=N;return T}catch(S){this.handleError(S)}}))}else{var V=null,X=mxUtils.bind(this,
+function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(B,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});if("svg"==c){var m=this.editor.graph.background;if(y||m==mxConstants.NONE)m=null;var z=this.editor.graph.getSvg(m,null,null,null,null,n);f&&this.editor.graph.addSvgShadow(z);this.editor.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();X(Graph.xmlDeclaration+
+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else B=u+".svg",V=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();X(L)}),n)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(c,e,f,n,p,t,y,v,D,A,U,l,u){var B=this.editor.graph,J=B.getGraphBounds();f=this.getFileData(!0,null,null,null,f,0==t?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var M="",F="";if(J.width*J.height>MAX_AREA||f.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};
+A=A?"1":"0";"pdf"==e&&(null!=U?F="&from="+U.from+"&to="+U.to:0==t&&(F="&allPages=1"));"xmlpng"==e&&(A="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){M="&from="+t;break}t=B.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!p?p||null!=t&&t!=mxConstants.NONE||(t="#ffffff"):t=mxConstants.NONE;p={globalVars:B.getExportVariables()};D&&(p.grid={size:B.gridSize,steps:B.view.gridSteps,color:B.view.gridColor});Graph.translateDiagram&&
+(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+M+F+"&bg="+(null!=t?t:mxConstants.NONE)+"&base64="+n+"&embedXml="+A+"&xml="+encodeURIComponent(f)+(null!=c?"&filename="+encodeURIComponent(c):"")+"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=y?"&scale="+y:"")+(null!=v?"&border="+v:"")+(l&&isFinite(l)?"&w="+l:"")+(u&&isFinite(u)?"&h="+u:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,f){var n=
+window.location.hash,p=mxUtils.bind(this,function(y){var v=null!=c.data?c.data:"";null!=y&&0<y.length&&(0<v.length&&(v+="\n"),v+=y);y=new LocalFile(this,"csv"!=c.format&&0<v.length?v:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return n};this.fileLoaded(y);"csv"==c.format&&this.importCsv(v,mxUtils.bind(this,function(u){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var D=
+null!=c.interval?parseInt(c.interval):6E4,A=null,U=mxUtils.bind(this,function(){var u=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(B){u===this.currentPage&&(200<=B.getStatus()&&300>=B.getStatus()?(this.updateDiagram(B.getText()),l()):this.handleError({message:mxResources.get("error")+" "+B.getStatus()}))}),mxUtils.bind(this,function(B){this.handleError(B)}))}),l=mxUtils.bind(this,function(){window.clearTimeout(A);
+A=window.setTimeout(U,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){l();U()}));l();U()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var t=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(t,mxUtils.bind(this,function(y){p(y)}),mxUtils.bind(this,function(y){null!=f&&f(y)}))}else p("")};EditorUi.prototype.updateDiagram=function(c){function e(R){var V=new mxCellOverlay(R.image||p.warningImage,R.tooltip,R.align,R.valign,R.offset);V.addListener(mxEvent.CLICK,function(X,
+m){n.alert(R.tooltip)});return V}var f=null,n=this;if(null!=c&&0<c.length&&(f=mxUtils.parseXml(c),c=null!=f?f.documentElement:null,null!=c&&"updates"==c.nodeName)){var p=this.editor.graph,t=p.getModel();t.beginUpdate();var y=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var v=t.getCell(c.getAttribute("id"));if(null!=v){try{var D=c.getAttribute("value");if(null!=D){var A=mxUtils.parseXml(D).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))t.setValue(v,A);else for(var U=
+A.attributes,l=0;l<U.length;l++)p.setAttributeForCell(v,U[l].nodeName,0<U[l].nodeValue.length?U[l].nodeValue:null)}}catch(R){null!=window.console&&console.log("Error in value for "+v.id+": "+R)}try{var u=c.getAttribute("style");null!=u&&p.model.setStyle(v,u)}catch(R){null!=window.console&&console.log("Error in style for "+v.id+": "+R)}try{var B=c.getAttribute("icon");if(null!=B){var J=0<B.length?JSON.parse(B):null;null!=J&&J.append||p.removeCellOverlays(v);null!=J&&p.addCellOverlay(v,e(J))}}catch(R){null!=
+window.console&&console.log("Error in icon for "+v.id+": "+R)}try{var M=c.getAttribute("geometry");if(null!=M){M=JSON.parse(M);var F=p.getCellGeometry(v);if(null!=F){F=F.clone();for(key in M){var K=parseFloat(M[key]);"dx"==key?F.x+=K:"dy"==key?F.y+=K:"dw"==key?F.width+=K:"dh"==key?F.height+=K:F[key]=parseFloat(M[key])}p.model.setGeometry(v,F)}}}catch(R){null!=window.console&&console.log("Error in icon for "+v.id+": "+R)}}}else if("model"==c.nodeName){for(var P=c.firstChild;null!=P&&P.nodeType!=mxConstants.NODETYPE_ELEMENT;)P=
+P.nextSibling;null!=P&&(new mxCodec(c.firstChild)).decode(P,t)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(p.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(y=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{t.endUpdate()}null!=y&&this.chromelessResize&&this.chromelessResize(!0,
+y)}return f};EditorUi.prototype.getCopyFilename=function(c,e){var f=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=f.lastIndexOf(".");0<=n&&(c=f.substring(n),f=f.substring(0,n));if(e){e=f;var p=new Date;f=p.getFullYear();n=p.getMonth()+1;var t=p.getDate(),y=p.getHours(),v=p.getMinutes();p=p.getSeconds();f=e+(" "+(f+"-"+n+"-"+t+"-"+y+"-"+v+"-"+p))}return f=mxResources.get("copyOf",[f])+c};EditorUi.prototype.fileLoaded=function(c,e){var f=this.getCurrentFile();this.fileEditable=
+this.fileLoadedError=null;this.setCurrentFile(null);var n=!1;this.hideDialog();null!=f&&(EditorUi.debug("File.closed",[f]),f.removeListener(this.descriptorChangedListener),f.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var p=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=f&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&
(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();
delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?(c.addUnsavedStatus(),null!=c.backupPatch&&c.patch([c.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),
-this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));n=!0;if(!this.isOffline()&&null!=c.getMode()){var v="1"==urlParams.sketch?"sketch":uiTheme;if(null==v)v="default";else if("sketch"==v||"min"==v)v+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),
-action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+v})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(y){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(y){}}catch(y){this.fileLoadedError=
-y;if(null!=c)try{c.close()}catch(u){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+y.message,label:"stack_"+y.stack})}catch(u){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||p():p()});e?c():this.handleError(y,mxResources.get("errorLoadingFile"),c,!0,null,null,
-!0)}else p();return n};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,n=new mxGraphModel,p=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var v=0;v<c.length;v++){this.updatePageRoot(c[v]);var y=c[v].node.cloneNode(!1);y.removeAttribute("name");n.root=c[v].root;var u=p.encode(n);this.editor.graph.saveViewState(c[v].viewState,u,!0);u.removeAttribute("pageWidth");u.removeAttribute("pageHeight");y.appendChild(u);null!=e&&(e.eltCount+=y.getElementsByTagName("*").length,
-e.nodeCount+=y.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(y,function(D,A,U,l){return!l||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=A&&"y"!=A&&"width"!=A&&"height"!=A?l&&"mxCell"==D.nodeName&&"previous"==A?null:U:Math.round(U)},e)<<0}return g};EditorUi.prototype.hashValue=function(c,e,g){var n=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(n^=this.hashValue(c.nodeName,
-e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var p=0;p<c.attributes.length;p++){var v=c.attributes[p].name,y=null!=e?e(c,v,c.attributes[p].value,!0):c.attributes[p].value;null!=y&&(n^=this.hashValue(v,e,g)+this.hashValue(y,e,g))}}if(null!=c.childNodes)for(p=0;p<c.childNodes.length;p++)n=(n<<5)-n+this.hashValue(c.childNodes[p],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(p=0;p<c.length;p++)e=(e<<5)-e+c.charCodeAt(p)<<
-0;n^=e}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,n,p,v,y){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
-c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){var e=mxUtils.createXmlDocument(),g=e.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(c));e.appendChild(g);return mxUtils.getXml(e)};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
-function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var g=0;g<e.length;g++)e[g].parentNode.removeChild(e[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var e=this.sidebar.container;if(null==c){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(c=g[g.length-1].nextSibling)}c=null!=c?c:e.firstChild.nextSibling.nextSibling;g=e.lastChild;var n=g.previousSibling;e.insertBefore(g,c);e.insertBefore(n,g)};EditorUi.prototype.loadLibrary=
-function(c,e){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,n,g.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.libraryLoaded=function(c,e,g,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&&
-(this.scratchpad=c);var p=this.sidebar.palettes[c.getHash()];p=null!=p?p[p.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var v=null,y=mxUtils.bind(this,function(P,R){0==P.length&&c.isEditable()?(null==v&&(v=document.createElement("div"),v.className="geDropTarget",mxUtils.write(v,mxResources.get("dragElementsHere"))),R.appendChild(v)):this.addLibraryEntries(P,R)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,
-g.lastIndexOf("."))));var u=this.sidebar.addPalette(c.getHash(),g,null!=n?n:!0,mxUtils.bind(this,function(P){y(e,P)}));this.repositionLibrary(p);var D=u.parentNode.previousSibling;n=D.getAttribute("title");null!=n&&0<n.length&&".scratchpad"!=c.title&&D.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+n);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";D.style.position="relative";var U=
+this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));n=!0;if(!this.isOffline()&&null!=c.getMode()){var t="1"==urlParams.sketch?"sketch":uiTheme;if(null==t)t="default";else if("sketch"==t||"min"==t)t+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),
+action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+t})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(y){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(y){}}catch(y){this.fileLoadedError=
+y;if(null!=c)try{c.close()}catch(v){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+y.message,label:"stack_"+y.stack})}catch(v){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=f?this.fileLoaded(f)||p():p()});e?c():this.handleError(y,mxResources.get("errorLoadingFile"),c,!0,null,null,
+!0)}else p();return n};EditorUi.prototype.getHashValueForPages=function(c,e){var f=0,n=new mxGraphModel,p=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var t=0;t<c.length;t++){this.updatePageRoot(c[t]);var y=c[t].node.cloneNode(!1);y.removeAttribute("name");n.root=c[t].root;var v=p.encode(n);this.editor.graph.saveViewState(c[t].viewState,v,!0);v.removeAttribute("pageWidth");v.removeAttribute("pageHeight");y.appendChild(v);null!=e&&(e.eltCount+=y.getElementsByTagName("*").length,
+e.nodeCount+=y.getElementsByTagName("mxCell").length);f=(f<<5)-f+this.hashValue(y,function(D,A,U,l){return!l||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=A&&"y"!=A&&"width"!=A&&"height"!=A?l&&"mxCell"==D.nodeName&&"previous"==A?null:U:Math.round(U)},e)<<0}return f};EditorUi.prototype.hashValue=function(c,e,f){var n=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(n^=this.hashValue(c.nodeName,
+e,f));if(null!=c.attributes){null!=f&&(f.attrCount+=c.attributes.length);for(var p=0;p<c.attributes.length;p++){var t=c.attributes[p].name,y=null!=e?e(c,t,c.attributes[p].value,!0):c.attributes[p].value;null!=y&&(n^=this.hashValue(t,e,f)+this.hashValue(y,e,f))}}if(null!=c.childNodes)for(p=0;p<c.childNodes.length;p++)n=(n<<5)-n+this.hashValue(c.childNodes[p],e,f)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=f&&(f.byteCount+=c.length);for(p=0;p<c.length;p++)e=(e<<5)-e+c.charCodeAt(p)<<
+0;n^=e}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,f,n,p,t,y){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
+c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){var e=mxUtils.createXmlDocument(),f=e.createElement("mxlibrary");mxUtils.setTextContent(f,JSON.stringify(c));e.appendChild(f);return mxUtils.getXml(e)};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
+function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var f=0;f<e.length;f++)e[f].parentNode.removeChild(e[f]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var e=this.sidebar.container;if(null==c){var f=this.sidebar.palettes["L.scratchpad"];null==f&&(f=this.sidebar.palettes.search);null!=f&&(c=f[f.length-1].nextSibling)}c=null!=c?c:e.firstChild.nextSibling.nextSibling;f=e.lastChild;var n=f.previousSibling;e.insertBefore(f,c);e.insertBefore(n,f)};EditorUi.prototype.loadLibrary=
+function(c,e){var f=mxUtils.parseXml(c.getData());if("mxlibrary"==f.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(f.documentElement));this.libraryLoaded(c,n,f.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.libraryLoaded=function(c,e,f,n){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&&
+(this.scratchpad=c);var p=this.sidebar.palettes[c.getHash()];p=null!=p?p[p.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var t=null,y=mxUtils.bind(this,function(P,R){0==P.length&&c.isEditable()?(null==t&&(t=document.createElement("div"),t.className="geDropTarget",mxUtils.write(t,mxResources.get("dragElementsHere"))),R.appendChild(t)):this.addLibraryEntries(P,R)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==f&&(f=c.getTitle(),null!=f&&/(\.xml)$/i.test(f)&&(f=f.substring(0,
+f.lastIndexOf("."))));var v=this.sidebar.addPalette(c.getHash(),f,null!=n?n:!0,mxUtils.bind(this,function(P){y(e,P)}));this.repositionLibrary(p);var D=v.parentNode.previousSibling;n=D.getAttribute("title");null!=n&&0<n.length&&".scratchpad"!=c.title&&D.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+n);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";D.style.position="relative";var U=
document.createElement("img");U.className="geAdaptiveAsset";U.setAttribute("src",Editor.crossImage);U.setAttribute("title",mxResources.get("close"));U.setAttribute("valign","absmiddle");U.setAttribute("border","0");U.style.position="relative";U.style.top="2px";U.style.width="14px";U.style.cursor="pointer";U.style.margin="0 3px";var l=null;if(".scratchpad"!=c.title||this.closableScratchpad)A.appendChild(U),mxEvent.addListener(U,"click",mxUtils.bind(this,function(P){if(!mxEvent.isConsumed(P)){var R=
-mxUtils.bind(this,function(){this.closeLibrary(c)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,R,mxResources.get("cancel"),mxResources.get("discardChanges")):R();mxEvent.consume(P)}}));if(c.isEditable()){var q=this.editor.graph,B=null,J=mxUtils.bind(this,function(P){this.showLibraryDialog(c.getTitle(),u,e,c,c.getMode());mxEvent.consume(P)}),M=mxUtils.bind(this,function(P){c.setModified(!0);c.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=U.cloneNode(!1),
+mxUtils.bind(this,function(){this.closeLibrary(c)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,R,mxResources.get("cancel"),mxResources.get("discardChanges")):R();mxEvent.consume(P)}}));if(c.isEditable()){var u=this.editor.graph,B=null,J=mxUtils.bind(this,function(P){this.showLibraryDialog(c.getTitle(),v,e,c,c.getMode());mxEvent.consume(P)}),M=mxUtils.bind(this,function(P){c.setModified(!0);c.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=U.cloneNode(!1),
B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight="2px",B.style.marginTop="-2px",A.insertBefore(B,A.firstChild),D.style.paddingRight=18*A.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),D.style.paddingRight=18*A.childNodes.length+"px")})):null==l&&(l=U.cloneNode(!1),l.setAttribute("src",Editor.saveImage),l.setAttribute("title",
-mxResources.get("save")),A.insertBefore(l,A.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(R){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==l||c.isModified()||(D.style.paddingRight=18*A.childNodes.length+"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(R)})),D.style.paddingRight=18*A.childNodes.length+"px")}),E=mxUtils.bind(this,function(P,R,V,X){P=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(P)));for(var m=
-0;m<P.length;m++){var z=q.getCellGeometry(P[m]);null!=z&&z.translate(-R.x,-R.y)}u.appendChild(this.sidebar.createVertexTemplateFromCells(P,R.width,R.height,X||"",!0,null,!1));P={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(P))),w:R.width,h:R.height};null!=X&&(P.title=X);e.push(P);M(V);null!=v&&null!=v.parentNode&&0<e.length&&(v.parentNode.removeChild(v),v=null)}),K=mxUtils.bind(this,function(P){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(P),q.getRubberband().reset()):
-this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var R=q.getSelectionCells(),V=q.view.getBounds(R),X=q.view.scale;V.x/=X;V.y/=X;V.width/=X;V.height/=X;V.x-=q.view.translate.x;V.y-=q.view.translate.y;E(R,V)}mxEvent.consume(P)});mxEvent.addGestureListeners(u,function(){},mxUtils.bind(this,function(P){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.first&&(q.graphHandler.suspend(),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility=
-"hidden"),u.style.backgroundColor="#f1f3f4",u.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,mxEvent.consume(P))}),mxUtils.bind(this,function(P){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(u.style.backgroundColor="",u.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,K(P),mxEvent.consume(P))}));mxEvent.addListener(u,"mouseleave",mxUtils.bind(this,function(P){q.isMouseDown&&null!=q.graphHandler.first&&
-(q.graphHandler.resume(),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),u.style.backgroundColor="",u.style.cursor="",q.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(u,"dragover",mxUtils.bind(this,function(P){u.style.backgroundColor="#f1f3f4";P.dataTransfer.dropEffect="copy";u.style.cursor="copy";this.sidebar.hideTooltip();P.stopPropagation();P.preventDefault()})),mxEvent.addListener(u,"drop",mxUtils.bind(this,function(P){u.style.cursor="";u.style.backgroundColor=
-"";0<P.dataTransfer.files.length&&this.importFiles(P.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(R,V,X,m,z,L,Q,N,T){if(null!=R&&"image/"==V.substring(0,6))R="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(R),R=[new mxCell("",new mxGeometry(0,0,z,L),R)],R[0].vertex=!0,E(R,new mxRectangle(0,0,z,L),P,mxEvent.isAltDown(P)?null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),null!=v&&null!=v.parentNode&&0<e.length&&
-(v.parentNode.removeChild(v),v=null);else{var S=!1,W=mxUtils.bind(this,function(Z,ba){null!=Z&&"application/pdf"==ba&&(ba=Editor.extractGraphModelFromPdf(Z),null!=ba&&0<ba.length&&(Z=ba));if(null!=Z)if(Z=mxUtils.parseXml(Z),"mxlibrary"==Z.documentElement.nodeName)try{var aa=JSON.parse(mxUtils.getTextContent(Z.documentElement));y(aa,u);e=e.concat(aa);M(P);this.spinner.stop();S=!0}catch(da){}else if("mxfile"==Z.documentElement.nodeName)try{var fa=Z.documentElement.getElementsByTagName("diagram");for(aa=
-0;aa<fa.length;aa++){var Y=this.stringToCells(Editor.getDiagramNodeXml(fa[aa])),ia=this.editor.graph.getBoundingBoxFromGeometry(Y);E(Y,new mxRectangle(0,0,ia.width,ia.height),P)}S=!0}catch(da){null!=window.console&&console.log("error in drop handler:",da)}S||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=v&&null!=v.parentNode&&0<e.length&&(v.parentNode.removeChild(v),v=null)});null!=T&&null!=Q&&(/(\.v(dx|sdx?))($|\?)/i.test(Q)||/(\.vs(x|sx?))($|\?)/i.test(Q))?
+mxResources.get("save")),A.insertBefore(l,A.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(R){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==l||c.isModified()||(D.style.paddingRight=18*A.childNodes.length+"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(R)})),D.style.paddingRight=18*A.childNodes.length+"px")}),F=mxUtils.bind(this,function(P,R,V,X){P=u.cloneCells(mxUtils.sortCells(u.model.getTopmostCells(P)));for(var m=
+0;m<P.length;m++){var z=u.getCellGeometry(P[m]);null!=z&&z.translate(-R.x,-R.y)}v.appendChild(this.sidebar.createVertexTemplateFromCells(P,R.width,R.height,X||"",!0,null,!1));P={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(P))),w:R.width,h:R.height};null!=X&&(P.title=X);e.push(P);M(V);null!=t&&null!=t.parentNode&&0<e.length&&(t.parentNode.removeChild(t),t=null)}),K=mxUtils.bind(this,function(P){if(u.isSelectionEmpty())u.getRubberband().isActive()?(u.getRubberband().execute(P),u.getRubberband().reset()):
+this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var R=u.getSelectionCells(),V=u.view.getBounds(R),X=u.view.scale;V.x/=X;V.y/=X;V.width/=X;V.height/=X;V.x-=u.view.translate.x;V.y-=u.view.translate.y;F(R,V)}mxEvent.consume(P)});mxEvent.addGestureListeners(v,function(){},mxUtils.bind(this,function(P){u.isMouseDown&&null!=u.panningManager&&null!=u.graphHandler.first&&(u.graphHandler.suspend(),null!=u.graphHandler.hint&&(u.graphHandler.hint.style.visibility=
+"hidden"),v.style.backgroundColor="#f1f3f4",v.style.cursor="copy",u.panningManager.stop(),u.autoScroll=!1,mxEvent.consume(P))}),mxUtils.bind(this,function(P){u.isMouseDown&&null!=u.panningManager&&null!=u.graphHandler&&(v.style.backgroundColor="",v.style.cursor="default",this.sidebar.showTooltips=!0,u.panningManager.stop(),u.graphHandler.reset(),u.isMouseDown=!1,u.autoScroll=!0,K(P),mxEvent.consume(P))}));mxEvent.addListener(v,"mouseleave",mxUtils.bind(this,function(P){u.isMouseDown&&null!=u.graphHandler.first&&
+(u.graphHandler.resume(),null!=u.graphHandler.hint&&(u.graphHandler.hint.style.visibility="visible"),v.style.backgroundColor="",v.style.cursor="",u.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(v,"dragover",mxUtils.bind(this,function(P){v.style.backgroundColor="#f1f3f4";P.dataTransfer.dropEffect="copy";v.style.cursor="copy";this.sidebar.hideTooltip();P.stopPropagation();P.preventDefault()})),mxEvent.addListener(v,"drop",mxUtils.bind(this,function(P){v.style.cursor="";v.style.backgroundColor=
+"";0<P.dataTransfer.files.length&&this.importFiles(P.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(R,V,X,m,z,L,Q,N,T){if(null!=R&&"image/"==V.substring(0,6))R="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(R),R=[new mxCell("",new mxGeometry(0,0,z,L),R)],R[0].vertex=!0,F(R,new mxRectangle(0,0,z,L),P,mxEvent.isAltDown(P)?null:Q.substring(0,Q.lastIndexOf(".")).replace(/_/g," ")),null!=t&&null!=t.parentNode&&0<e.length&&
+(t.parentNode.removeChild(t),t=null);else{var S=!1,W=mxUtils.bind(this,function(Z,ba){null!=Z&&"application/pdf"==ba&&(ba=Editor.extractGraphModelFromPdf(Z),null!=ba&&0<ba.length&&(Z=ba));if(null!=Z)if(Z=mxUtils.parseXml(Z),"mxlibrary"==Z.documentElement.nodeName)try{var aa=JSON.parse(mxUtils.getTextContent(Z.documentElement));y(aa,v);e=e.concat(aa);M(P);this.spinner.stop();S=!0}catch(da){}else if("mxfile"==Z.documentElement.nodeName)try{var fa=Z.documentElement.getElementsByTagName("diagram");for(aa=
+0;aa<fa.length;aa++){var Y=this.stringToCells(Editor.getDiagramNodeXml(fa[aa])),ia=this.editor.graph.getBoundingBoxFromGeometry(Y);F(Y,new mxRectangle(0,0,ia.width,ia.height),P)}S=!0}catch(da){null!=window.console&&console.log("error in drop handler:",da)}S||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=t&&null!=t.parentNode&&0<e.length&&(t.parentNode.removeChild(t),t=null)});null!=T&&null!=Q&&(/(\.v(dx|sdx?))($|\?)/i.test(Q)||/(\.vs(x|sx?))($|\?)/i.test(Q))?
this.importVisio(T,function(Z){W(Z,"text/xml")},null,Q):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(R,Q)&&null!=T?this.isExternalDataComms()?this.parseFile(T,mxUtils.bind(this,function(Z){4==Z.readyState&&(this.spinner.stop(),200<=Z.status&&299>=Z.status?W(Z.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Z.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-W(R,V)}}));P.stopPropagation();P.preventDefault()})),mxEvent.addListener(u,"dragleave",function(P){u.style.cursor="";u.style.backgroundColor="";P.stopPropagation();P.preventDefault()}));U=U.cloneNode(!1);U.setAttribute("src",Editor.editImage);U.setAttribute("title",mxResources.get("edit"));A.insertBefore(U,A.firstChild);mxEvent.addListener(U,"click",J);mxEvent.addListener(u,"dblclick",function(P){mxEvent.getSource(P)==u&&J(P)});n=U.cloneNode(!1);n.setAttribute("src",Editor.plusImage);n.setAttribute("title",
+W(R,V)}}));P.stopPropagation();P.preventDefault()})),mxEvent.addListener(v,"dragleave",function(P){v.style.cursor="";v.style.backgroundColor="";P.stopPropagation();P.preventDefault()}));U=U.cloneNode(!1);U.setAttribute("src",Editor.editImage);U.setAttribute("title",mxResources.get("edit"));A.insertBefore(U,A.firstChild);mxEvent.addListener(U,"click",J);mxEvent.addListener(v,"dblclick",function(P){mxEvent.getSource(P)==v&&J(P)});n=U.cloneNode(!1);n.setAttribute("src",Editor.plusImage);n.setAttribute("title",
mxResources.get("add"));A.insertBefore(n,A.firstChild);mxEvent.addListener(n,"click",K);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(n=document.createElement("span"),n.setAttribute("title",mxResources.get("help")),n.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(n,"?"),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(P){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(P)})),A.insertBefore(n,A.firstChild))}D.appendChild(A);
-D.style.paddingRight=18*A.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var n=c[g],p=n.data;if(null!=p){p=this.convertDataUri(p);var v="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(v+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(v+"image="+p,n.w,n.h,"",n.title||"",!1,null,!0))}else null!=n.xml&&(p=this.stringToCells(Graph.decompress(n.xml)),0<p.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(p,
+D.style.paddingRight=18*A.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var f=0;f<c.length;f++){var n=c[f],p=n.data;if(null!=p){p=this.convertDataUri(p);var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(t+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(t+"image="+p,n.w,n.h,"",n.title||"",!1,null,!0))}else null!=n.xml&&(p=this.stringToCells(Graph.decompress(n.xml)),0<p.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(p,
n.w,n.h,n.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",
-targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,g,n,p,v,y){c=new ImageDialog(this,c,e,g,n,p,v,y);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?
-200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e){c=null!=c?c:mxUtils.bind(this,function(g,n){n||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,e);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,n,p){c=new LibraryDialog(this,c,e,g,n,p);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(v){v&&null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.showSplash()}));c.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow="hidden";var e=document.createElement("a");
-e.className="geTitle";e.style.color="#DF6C0C";e.style.fontWeight="bold";e.style.height="100%";e.style.paddingTop="9px";e.innerHTML="<span>+</span>";var g=e.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){n.preventDefault()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(n){this.actions.get("shapes").funct();
-mxEvent.consume(n)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,n,p,v,y){var u=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{y?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO")}catch(B){}if(null!=
-D||null!=e){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var A=mxResources.get("ok"),U=null;e=null!=e?e:mxResources.get("error");if(null!=D){null!=D.retry&&(A=mxResources.get("cancel"),U=function(){u();D.retry()});if(404==D.code||404==D.status||403==D.code){y=403==D.code?null!=D.message?mxUtils.htmlEntities(D.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 l=null!=p?null:null!=v?v:window.location.hash;if(null!=l&&("#G"==l.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==l.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==D.code||404==D.status)){l="#U"==l.substring(0,2)?l.substring(45,l.lastIndexOf("%26ex")):
-l.substring(2);this.showError(e,y,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+l);this.handleError(c,e,g,n,p)}),U,mxResources.get("changeUser"),mxUtils.bind(this,function(){function B(){K.innerText="";for(var P=0;P<J.length;P++){var R=document.createElement("option");mxUtils.write(R,J[P].displayName);R.value=P;K.appendChild(R);R=document.createElement("option");R.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(R,"<"+J[P].email+
-">");R.setAttribute("disabled","disabled");K.appendChild(R)}R=document.createElement("option");mxUtils.write(R,mxResources.get("addAccount"));R.value=J.length;K.appendChild(R)}var J=this.drive.getUsersList(),M=document.createElement("div"),E=document.createElement("span");E.style.marginTop="6px";mxUtils.write(E,mxResources.get("changeUser")+": ");M.appendChild(E);var K=document.createElement("select");K.style.width="200px";B();mxEvent.addListener(K,"change",mxUtils.bind(this,function(){var P=K.value,
-R=J.length!=P;R&&this.drive.setUser(J[P]);this.drive.authorize(R,mxUtils.bind(this,function(){R||(J=this.drive.getUsersList(),B())}),mxUtils.bind(this,function(V){this.handleError(V)}),!0)}));M.appendChild(K);M=new CustomDialog(this,M,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(M.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=D.message?y=""==D.message&&null!=
-D.name?mxUtils.htmlEntities(D.name):mxUtils.htmlEntities(D.message):null!=D.response&&null!=D.response.error?y=mxUtils.htmlEntities(D.response.error):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?y=mxUtils.htmlEntities(mxResources.get("timeout")):D.code==App.ERROR_BUSY?y=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof D&&0<D.length&&(y=mxUtils.htmlEntities(D)))}var q=v=null;null!=D&&null!=D.helpLink?(v=mxResources.get("help"),q=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):
-null!=D&&null!=D.ownerEmail&&(v=mxResources.get("contactOwner"),y+=mxUtils.htmlEntities(" ("+v+": "+D.ownerEmail+")"),q=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))}));this.showError(e,y,A,g,U,null,null,v,q,null,null,null,n?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,g,n,p,v){var y=
-null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},u=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){y();null!=e&&e()},function(){y();null!=g&&g()},n,p,null,null,null,null,u);this.showDialog(c.container,340,46+u,!0,v);c.init()};EditorUi.prototype.showBanner=function(c,e,g,n){var p=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){var v=document.createElement("div");
-v.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(v.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(v.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(v.style,"transition","all 1s ease");v.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;";v.appendChild(p);p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));p.setAttribute("border","0");p.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";v.appendChild(p);mxUtils.write(v,
-e);document.body.appendChild(v);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("id","geDoNotShowAgainCheckbox");y.style.marginRight="6px";if(!n){e.appendChild(y);var u=document.createElement("label");u.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(u,mxResources.get("doNotShowAgain"));e.appendChild(u);v.style.paddingBottom=
-"30px";v.appendChild(e)}var D=mxUtils.bind(this,function(){null!=v.parentNode&&(v.parentNode.removeChild(v),this.bannerShowing=!1,y.checked||n)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(p,"click",mxUtils.bind(this,function(U){mxEvent.consume(U);D()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(v.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){D()}),1E3)});mxEvent.addListener(v,"click",mxUtils.bind(this,function(U){var l=mxEvent.getSource(U);l!=y&&l!=u?(null!=g&&g(),D(),mxEvent.consume(U)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(v.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(A,3E4);p=!0}return p};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
-function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,n){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<n&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,n,p){var v="jpeg"==g?"jpg":g;n=this.getBaseFilename(n)+(null!=e?".drawio":"")+"."+v;c=this.createImageDataUri(c,
-e,g,p);this.saveData(n,v,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
-!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,n,p,v){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=v?v:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=n?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),
-g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,g,n);else{var y=document.createElement("a");v=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof y.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var u=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);v=65==(u?parseInt(u[2],10):
-!1)?!1:v}if(v||this.isOffline()){y.href=URL.createObjectURL(n?this.base64ToBlob(c,g):new Blob([c],{type:g}));v?y.download=e:y.setAttribute("target","_blank");document.body.appendChild(y);try{window.setTimeout(function(){URL.revokeObjectURL(y.href)},2E4),y.click(),y.parentNode.removeChild(y)}catch(D){}}else this.createEchoRequest(c,e,g,n,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,n,p,v){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
-g?"&mime="+g:"")+(null!=p?"&format="+p:"")+(null!=v?"&base64="+v:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,n=Math.ceil(g/1024),p=Array(n),v=0;v<n;++v){for(var y=1024*v,u=Math.min(y+1024,g),D=Array(u-y),A=0;y<u;++A,++y)D[A]=c[y].charCodeAt(0);p[v]=new Uint8Array(D)}return new Blob(p,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,n,p,v,y,u){v=null!=v?v:!1;y=null!=y?y:"vsdx"!=
-p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(v);isLocalStorage&&p++;var D=4>=p?2:6<p?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(A,U){try{if("_blank"==U)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,n);else if(null!=g&&"text/html"==g.substring(0,9)){var l=new EmbedDialog(this,c);this.showDialog(l.container,450,240,!0,!0);l.init()}else{var q=window.open("about:blank");null==q?mxUtils.popup(c,!0):(q.document.write("<pre>"+mxUtils.htmlEntities(c,
-!1)+"</pre>"),q.document.close())}else U==App.MODE_DEVICE||"download"==U?this.doSaveLocalFile(c,A,g,n,null,u):null!=A&&0<A.length&&this.pickFolder(U,mxUtils.bind(this,function(B){try{this.exportFile(c,A,g,n,U,B)}catch(J){this.handleError(J)}}))}catch(B){this.handleError(B)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,v,y,null,1<p,D,c,g,n);v=this.isServices(p)?p>D?390:280:160;this.showDialog(e.container,420,v,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=
-function(c,e,g){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||g?(c=g?c:btoa(unescape(encodeURIComponent(c))),n.document.write('<html><img style="max-width:100%;" src="data:'+e+";base64,"+c+'"/></html>')):n.document.write("<html>"+c+"</html>"):n.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),n.document.close())};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
+targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,f,n,p,t,y){c=new ImageDialog(this,c,e,f,n,p,t,y);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?
+200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e){c=null!=c?c:mxUtils.bind(this,function(f,n){n||(f=new ChangePageSetup(this,null,f),f.ignoreColor=!0,this.editor.graph.model.execute(f))});c=new BackgroundImageDialog(this,c,e);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,f,n,p){c=new LibraryDialog(this,c,e,f,n,p);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.showSplash()}));c.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(f){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow="hidden";var e=document.createElement("a");
+e.className="geTitle";e.style.color="#DF6C0C";e.style.fontWeight="bold";e.style.height="100%";e.style.paddingTop="9px";e.innerHTML="<span>+</span>";var f=e.getElementsByTagName("span")[0];f.style.fontSize="18px";f.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){n.preventDefault()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(n){this.actions.get("shapes").funct();
+mxEvent.consume(n)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,f,n,p,t,y){var v=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{y?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO")}catch(B){}if(null!=
+D||null!=e){y=mxUtils.htmlEntities(mxResources.get("unknownError"));var A=mxResources.get("ok"),U=null;e=null!=e?e:mxResources.get("error");if(null!=D){null!=D.retry&&(A=mxResources.get("cancel"),U=function(){v();D.retry()});if(404==D.code||404==D.status||403==D.code){y=403==D.code?null!=D.message?mxUtils.htmlEntities(D.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 l=null!=p?null:null!=t?t:window.location.hash;if(null!=l&&("#G"==l.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==l.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==D.code||404==D.status)){l="#U"==l.substring(0,2)?l.substring(45,l.lastIndexOf("%26ex")):
+l.substring(2);this.showError(e,y,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+l);this.handleError(c,e,f,n,p)}),U,mxResources.get("changeUser"),mxUtils.bind(this,function(){function B(){K.innerText="";for(var P=0;P<J.length;P++){var R=document.createElement("option");mxUtils.write(R,J[P].displayName);R.value=P;K.appendChild(R);R=document.createElement("option");R.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(R,"<"+J[P].email+
+">");R.setAttribute("disabled","disabled");K.appendChild(R)}R=document.createElement("option");mxUtils.write(R,mxResources.get("addAccount"));R.value=J.length;K.appendChild(R)}var J=this.drive.getUsersList(),M=document.createElement("div"),F=document.createElement("span");F.style.marginTop="6px";mxUtils.write(F,mxResources.get("changeUser")+": ");M.appendChild(F);var K=document.createElement("select");K.style.width="200px";B();mxEvent.addListener(K,"change",mxUtils.bind(this,function(){var P=K.value,
+R=J.length!=P;R&&this.drive.setUser(J[P]);this.drive.authorize(R,mxUtils.bind(this,function(){R||(J=this.drive.getUsersList(),B())}),mxUtils.bind(this,function(V){this.handleError(V)}),!0)}));M.appendChild(K);M=new CustomDialog(this,M,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(M.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=f&&f()}),480,150);return}}null!=D.message?y=""==D.message&&null!=
+D.name?mxUtils.htmlEntities(D.name):mxUtils.htmlEntities(D.message):null!=D.response&&null!=D.response.error?y=mxUtils.htmlEntities(D.response.error):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?y=mxUtils.htmlEntities(mxResources.get("timeout")):D.code==App.ERROR_BUSY?y=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof D&&0<D.length&&(y=mxUtils.htmlEntities(D)))}var u=t=null;null!=D&&null!=D.helpLink?(t=mxResources.get("help"),u=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):
+null!=D&&null!=D.ownerEmail&&(t=mxResources.get("contactOwner"),y+=mxUtils.htmlEntities(" ("+t+": "+D.ownerEmail+")"),u=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))}));this.showError(e,y,A,f,U,null,null,t,u,null,null,null,n?f:null)}else null!=f&&f()};EditorUi.prototype.alert=function(c,e,f){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,f||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,f,n,p,t){var y=
+null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},v=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){y();null!=e&&e()},function(){y();null!=f&&f()},n,p,null,null,null,null,v);this.showDialog(c.container,340,46+v,!0,t);c.init()};EditorUi.prototype.showBanner=function(c,e,f,n){var p=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){var t=document.createElement("div");
+t.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(t.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(t.style,"transition","all 1s ease");t.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;";t.appendChild(p);p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get(n?"doNotShowAgain":"close"));p.setAttribute("border","0");p.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";t.appendChild(p);mxUtils.write(t,
+e);document.body.appendChild(t);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("id","geDoNotShowAgainCheckbox");y.style.marginRight="6px";if(!n){e.appendChild(y);var v=document.createElement("label");v.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(v,mxResources.get("doNotShowAgain"));e.appendChild(v);t.style.paddingBottom=
+"30px";t.appendChild(e)}var D=mxUtils.bind(this,function(){null!=t.parentNode&&(t.parentNode.removeChild(t),this.bannerShowing=!1,y.checked||n)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(p,"click",mxUtils.bind(this,function(U){mxEvent.consume(U);D()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){D()}),1E3)});mxEvent.addListener(t,"click",mxUtils.bind(this,function(U){var l=mxEvent.getSource(U);l!=y&&l!=v?(null!=f&&f(),D(),mxEvent.consume(U)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(A,3E4);p=!0}return p};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,f,n){c=c.toDataURL("image/"+f);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<n&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,f,n,p){var t="jpeg"==f?"jpg":f;n=this.getBaseFilename(n)+(null!=e?".drawio":"")+"."+t;c=this.createImageDataUri(c,
+e,f,p);this.saveData(n,t,c.substring(c.lastIndexOf(",")+1),"image/"+f,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
+!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,f,n,p,t){"text/xml"!=f||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=n?this.base64ToBlob(c,f):new Blob([c],{type:f}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)f=window.open("about:blank","_blank"),null==f?mxUtils.popup(c,!0):(f.document.write(c),
+f.document.close(),f.document.execCommand("SaveAs",!0,e),f.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==f||"image/"!=f.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,f,n);else{var y=document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof y.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var v=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);t=65==(v?parseInt(v[2],10):
+!1)?!1:t}if(t||this.isOffline()){y.href=URL.createObjectURL(n?this.base64ToBlob(c,f):new Blob([c],{type:f}));t?y.download=e:y.setAttribute("target","_blank");document.body.appendChild(y);try{window.setTimeout(function(){URL.revokeObjectURL(y.href)},2E4),y.click(),y.parentNode.removeChild(y)}catch(D){}}else this.createEchoRequest(c,e,f,n,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,f,n,p,t){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
+f?"&mime="+f:"")+(null!=p?"&format="+p:"")+(null!=t?"&base64="+t:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var f=c.length,n=Math.ceil(f/1024),p=Array(n),t=0;t<n;++t){for(var y=1024*t,v=Math.min(y+1024,f),D=Array(v-y),A=0;y<v;++A,++y)D[A]=c[y].charCodeAt(0);p[t]=new Uint8Array(D)}return new Blob(p,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,f,n,p,t,y,v){t=null!=t?t:!1;y=null!=y?y:"vsdx"!=
+p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(t);isLocalStorage&&p++;var D=4>=p?2:6<p?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(A,U){try{if("_blank"==U)if(null!=f&&"image/"==f.substring(0,6))this.openInNewWindow(c,f,n);else if(null!=f&&"text/html"==f.substring(0,9)){var l=new EmbedDialog(this,c);this.showDialog(l.container,450,240,!0,!0);l.init()}else{var u=window.open("about:blank");null==u?mxUtils.popup(c,!0):(u.document.write("<pre>"+mxUtils.htmlEntities(c,
+!1)+"</pre>"),u.document.close())}else U==App.MODE_DEVICE||"download"==U?this.doSaveLocalFile(c,A,f,n,null,v):null!=A&&0<A.length&&this.pickFolder(U,mxUtils.bind(this,function(B){try{this.exportFile(c,A,f,n,U,B)}catch(J){this.handleError(J)}}))}catch(B){this.handleError(B)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,y,null,1<p,D,c,f,n);t=this.isServices(p)?p>D?390:280:160;this.showDialog(e.container,420,t,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=
+function(c,e,f){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||f?(c=f?c:btoa(unescape(encodeURIComponent(c))),n.document.write('<html><img style="max-width:100%;" src="data:'+e+";base64,"+c+'"/></html>')):n.document.write("<html>"+c+"</html>"):n.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),n.document.close())};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(n){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor=
"#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&
(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var p=e.getBoundingClientRect();this.tagsDialog.style.left=p.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=p.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(n)}),
Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var n=this.editor.graph.getAllTags();e.style.display=0<n.length?"":"none"}))}d.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),
-this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=c(mxUtils.bind(this,function(n){var p=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",p);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)p.apply(this);
-else{this.exportDialog=document.createElement("div");var v=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
-"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=v.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";v=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=v.zIndex;var y=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});y.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
-function(u){y.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(u,null,"png");u=document.createElement("img");u.style.maxWidth="140px";u.style.maxHeight="140px";u.style.cursor="pointer";u.style.backgroundColor="white";u.setAttribute("title",mxResources.get("openInNewWindow"));u.setAttribute("border","0");u.setAttribute("src",D);this.exportDialog.appendChild(u);mxEvent.addListener(u,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",p);document.body.appendChild(this.exportDialog)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,n,p){this.isLocalFileSave()?
-this.saveLocalFile(g,c,n,p,e):this.saveRequest(c,e,mxUtils.bind(this,function(v,y){return this.createEchoRequest(g,v,n,p,e,y)}),g,p,n)};EditorUi.prototype.saveRequest=function(c,e,g,n,p,v,y){y=null!=y?y:!mxClient.IS_IOS||!navigator.standalone;var u=this.getServiceCount(!1);isLocalStorage&&u++;var D=4>=u?2:6<u?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(A,U){if("_blank"==U||null!=A&&0<A.length){var l=g("_blank"==U?null:A,U==App.MODE_DEVICE||"download"==U||null==U||"_blank"==U?"0":"1");
-null!=l&&(U==App.MODE_DEVICE||"download"==U||"_blank"==U?l.simulate(document,"_blank"):this.pickFolder(U,mxUtils.bind(this,function(q){v=null!=v?v:"pdf"==e?"application/pdf":"image/"+e;if(null!=n)try{this.exportFile(n,A,v,!0,U,q)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&l.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=l.getStatus()&&299>=l.getStatus())try{this.exportFile(l.getText(),A,v,!0,U,q)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(B){this.spinner.stop();this.handleError(B)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,y,null,1<u,D,n,v,p);u=this.isServices(u)?4<u?390:280:160;this.showDialog(c.container,420,u,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,n,p,v){};EditorUi.prototype.pickFolder=function(c,
-e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,n,p,v,y,u,D,A,U,l,q,B){if(this.spinner.spin(document.body,mxResources.get("export")))try{var J=this.editor.graph.isSelectionEmpty();g=null!=g?g:J;var M=e?null:this.editor.graph.background;M==mxConstants.NONE&&(M=null);null==M&&0==e&&(M=U?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var E=this.editor.graph.getSvg(M,c,y,u,null,g,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!q,U,l);n&&this.editor.graph.addSvgShadow(E);var K=
-this.getBaseFilename()+(p?".drawio":"")+".svg";B=null!=B?B:mxUtils.bind(this,function(V){this.isLocalFileSave()||V.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});var P=mxUtils.bind(this,function(V){this.spinner.stop();p&&V.setAttribute("content",this.getFileData(!0,null,null,null,g,D,null,null,null,!1));B(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+
-"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(V))});this.editor.graph.mathEnabled&&this.editor.addMathCss(E);var R=mxUtils.bind(this,function(V){v?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(V,P,this.thumbImageCache)):P(V)});q?this.embedFonts(E,R):(this.editor.addFontCss(E),R(E))}catch(V){this.handleError(V)}};EditorUi.prototype.addRadiobox=function(c,e,g,n,p,v,y){return this.addCheckbox(c,g,n,p,v,y,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,n,p,v,y,
-u){v=null!=v?v:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",y?"radio":"checkbox");y="geCheckbox-"+Editor.guid();D.id=y;null!=u&&D.setAttribute("name",u);g&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);n&&D.setAttribute("disabled","disabled");v&&(c.appendChild(D),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",y),c.appendChild(g),p||mxUtils.br(c));return D};EditorUi.prototype.addEditButton=function(c,
-e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var n=this.getCurrentFile(),p="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var v=document.createElement("select");v.style.maxWidth="200px";v.style.width="auto";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));v.appendChild(n);
-n=document.createElement("option");n.setAttribute("value","custom");mxUtils.write(n,mxResources.get("custom")+"...");v.appendChild(n);c.appendChild(v);mxEvent.addListener(v,"change",mxUtils.bind(this,function(){if("custom"==v.value){var y=new FilenameDialog(this,p,mxResources.get("ok"),function(u){null!=u?p=u:v.value="blank"},mxResources.get("url"),null,null,null,null,function(){v.value="blank"});this.showDialog(y.container,300,80,!0,!1);y.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,
-function(){g.checked&&(null==e||e.checked)?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===v.value?"_blank":p:null},getEditInput:function(){return g},getEditSelect:function(){return v}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var u=document.createElement("div");u.style.width="100%";u.style.height="100%";u.style.boxSizing="border-box";null!=v&&v!=mxConstants.NONE?(u.style.border="1px solid black",
-u.style.backgroundColor=v):(u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",u.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");y.innerText="";y.appendChild(u)}mxUtils.write(c,mxResources.get("links")+":");var n=document.createElement("select");n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic"));
+this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var f=c(mxUtils.bind(this,function(n){var p=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",p);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)p.apply(this);
+else{this.exportDialog=document.createElement("div");var t=f.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
+"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=t.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=t.zIndex;var y=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});y.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
+function(v){y.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(v,null,"png");v=document.createElement("img");v.style.maxWidth="140px";v.style.maxHeight="140px";v.style.cursor="pointer";v.style.backgroundColor="white";v.setAttribute("title",mxResources.get("openInNewWindow"));v.setAttribute("border","0");v.setAttribute("src",D);this.exportDialog.appendChild(v);mxEvent.addListener(v,"click",mxUtils.bind(this,
+function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",p);document.body.appendChild(this.exportDialog)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,f,n,p){this.isLocalFileSave()?
+this.saveLocalFile(f,c,n,p,e):this.saveRequest(c,e,mxUtils.bind(this,function(t,y){return this.createEchoRequest(f,t,n,p,e,y)}),f,p,n)};EditorUi.prototype.saveRequest=function(c,e,f,n,p,t,y){y=null!=y?y:!mxClient.IS_IOS||!navigator.standalone;var v=this.getServiceCount(!1);isLocalStorage&&v++;var D=4>=v?2:6<v?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(A,U){if("_blank"==U||null!=A&&0<A.length){var l=f("_blank"==U?null:A,U==App.MODE_DEVICE||"download"==U||null==U||"_blank"==U?"0":"1");
+null!=l&&(U==App.MODE_DEVICE||"download"==U||"_blank"==U?l.simulate(document,"_blank"):this.pickFolder(U,mxUtils.bind(this,function(u){t=null!=t?t:"pdf"==e?"application/pdf":"image/"+e;if(null!=n)try{this.exportFile(n,A,t,!0,U,u)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&l.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=l.getStatus()&&299>=l.getStatus())try{this.exportFile(l.getText(),A,t,!0,U,u)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
+function(B){this.spinner.stop();this.handleError(B)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,y,null,1<v,D,n,t,p);v=this.isServices(v)?4<v?390:280:160;this.showDialog(c.container,420,v,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,f,n,p,t){};EditorUi.prototype.pickFolder=function(c,
+e,f){e(null)};EditorUi.prototype.exportSvg=function(c,e,f,n,p,t,y,v,D,A,U,l,u,B){if(this.spinner.spin(document.body,mxResources.get("export")))try{var J=this.editor.graph.isSelectionEmpty();f=null!=f?f:J;var M=e?null:this.editor.graph.background;M==mxConstants.NONE&&(M=null);null==M&&0==e&&(M=U?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var F=this.editor.graph.getSvg(M,c,y,v,null,f,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!u,U,l);n&&this.editor.graph.addSvgShadow(F);var K=
+this.getBaseFilename()+(p?".drawio":"")+".svg";B=null!=B?B:mxUtils.bind(this,function(V){this.isLocalFileSave()||V.length<=MAX_REQUEST_SIZE?this.saveData(K,"svg",V,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(V)}))});var P=mxUtils.bind(this,function(V){this.spinner.stop();p&&V.setAttribute("content",this.getFileData(!0,null,null,null,f,D,null,null,null,!1));B(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+
+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(V))});this.editor.graph.mathEnabled&&this.editor.addMathCss(F);var R=mxUtils.bind(this,function(V){t?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(V,P,this.thumbImageCache)):P(V)});u?this.embedFonts(F,R):(this.editor.addFontCss(F),R(F))}catch(V){this.handleError(V)}};EditorUi.prototype.addRadiobox=function(c,e,f,n,p,t,y){return this.addCheckbox(c,f,n,p,t,y,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,f,n,p,t,y,
+v){t=null!=t?t:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",y?"radio":"checkbox");y="geCheckbox-"+Editor.guid();D.id=y;null!=v&&D.setAttribute("name",v);f&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);n&&D.setAttribute("disabled","disabled");t&&(c.appendChild(D),f=document.createElement("label"),mxUtils.write(f,e),f.setAttribute("for",y),c.appendChild(f),p||mxUtils.br(c));return D};EditorUi.prototype.addEditButton=function(c,
+e){var f=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);f.style.marginLeft="24px";var n=this.getCurrentFile(),p="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));t.appendChild(n);
+n=document.createElement("option");n.setAttribute("value","custom");mxUtils.write(n,mxResources.get("custom")+"...");t.appendChild(n);c.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==t.value){var y=new FilenameDialog(this,p,mxResources.get("ok"),function(v){null!=v?p=v:t.value="blank"},mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(y.container,300,80,!0,!1);y.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,
+function(){f.checked&&(null==e||e.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return f.checked?"blank"===t.value?"_blank":p:null},getEditInput:function(){return f},getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(c,e){function f(){var v=document.createElement("div");v.style.width="100%";v.style.height="100%";v.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(v.style.border="1px solid black",
+v.style.backgroundColor=t):(v.style.backgroundPosition="center center",v.style.backgroundRepeat="no-repeat",v.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");y.innerText="";y.appendChild(v)}mxUtils.write(c,mxResources.get("links")+":");var n=document.createElement("select");n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic"));
n.appendChild(p);p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("openInNewWindow"));n.appendChild(p);p=document.createElement("option");p.setAttribute("value","self");mxUtils.write(p,mxResources.get("openInThisWindow"));n.appendChild(p);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(e));c.appendChild(n);mxUtils.write(c,mxResources.get("borderColor")+
-":");var v="#0000ff",y=null;y=mxUtils.button("",mxUtils.bind(this,function(u){this.pickColor(v||"none",function(D){v=D;g()});mxEvent.consume(u)}));g();y.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";y.style.marginLeft="4px";y.style.height="22px";y.style.width="22px";y.style.position="relative";y.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";y.className="geColorBtn";c.appendChild(y);mxUtils.br(c);return{getColor:function(){return v},getTarget:function(){return n.value},
-focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,n,p,v,y){y=null!=y?y:[];n&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||y.push("lightbox=1"),"auto"!=c&&y.push("target="+c),null!=e&&e!=mxConstants.NONE&&y.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&y.push("edit="+encodeURIComponent(p)),v&&y.push("layers=1"),this.editor.graph.foldingEnabled&&y.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&
-this.currentPage!=this.pages[0]&&y.push("page-id="+this.currentPage.getId());return y};EditorUi.prototype.createLink=function(c,e,g,n,p,v,y,u,D,A){D=this.createUrlParameters(c,e,g,n,p,v,D);c=this.getCurrentFile();e=!0;null!=y?g="#U"+encodeURIComponent(y):(c=this.getCurrentFile(),u||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&
-null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(c.getTitle()));A&&1<g.length&&(D.push("open="+g.substring(1)),g="");return(n&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,n,p,v,y,u,D,A,U,l){this.getBasenames();var q={};""!=
-p&&p!=mxConstants.NONE&&(q.highlight=p);"auto"!==n&&(q.target=n);A||(q.lightbox=!1);q.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(q.zoom=g/100);g=[];y&&(g.push("pages"),q.resize=!0,null!=this.pages&&null!=this.currentPage&&(q.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),q.resize=!0);u&&g.push("layers");D&&g.push("tags");0<g.length&&(A&&g.push("lightbox"),q.toolbar=g.join(" "));null!=U&&0<U.length&&(q.edit=U);null!=c?q.url=c:q.xml=this.getFileData(!0,
-null,null,null,null,!y);e='<div class="mxgraph" style="'+(v?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(q))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";l(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
-EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,n){var p=document.createElement("div");p.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("html"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(v);var y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var u=document.createElement("input");
-u.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";u.setAttribute("value","url");u.setAttribute("type","radio");u.setAttribute("name","type-embedhtmldialog");v=u.cloneNode(!0);v.setAttribute("value","copy");y.appendChild(v);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));y.appendChild(D);mxUtils.br(y);y.appendChild(u);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));y.appendChild(D);var A=this.getCurrentFile();
-null==g&&null!=A&&A.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),y.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(A.getId())})));v.setAttribute("checked","checked");null==g&&u.setAttribute("disabled","disabled");p.appendChild(y);var U=this.addLinkSection(p),l=this.addCheckbox(p,mxResources.get("zoom"),
-!0,null,!0);mxUtils.write(p,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";p.appendChild(q);var B=this.addCheckbox(p,mxResources.get("fit"),!0);y=null!=this.pages&&1<this.pages.length;var J=J=this.addCheckbox(p,mxResources.get("allPages"),y,!y),M=this.addCheckbox(p,mxResources.get("layers"),!0),E=this.addCheckbox(p,mxResources.get("tags"),!0),K=this.addCheckbox(p,
-mxResources.get("lightbox"),!0),P=null;y=380;if(EditorUi.enableHtmlEditOption){P=this.addEditButton(p,K);var R=P.getEditInput();R.style.marginBottom="16px";y+=50;mxEvent.addListener(K,"change",function(){K.checked?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled");R.checked&&K.checked?P.getEditSelect().removeAttribute("disabled"):P.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,p,mxUtils.bind(this,function(){n(u.checked?g:null,l.checked,q.value,U.getTarget(),
-U.getColor(),B.checked,J.checked,M.checked,E.checked,K.checked,null!=P?P.getLink():null)}),null,c,e);this.showDialog(c.container,340,y,!0,!0);v.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,n,p,v,y,u){var D=document.createElement("div");D.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,c||mxResources.get("link"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";D.appendChild(A);var U=this.getCurrentFile();c=0;if(null==
+":");var t="#0000ff",y=null;y=mxUtils.button("",mxUtils.bind(this,function(v){this.pickColor(t||"none",function(D){t=D;f()});mxEvent.consume(v)}));f();y.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";y.style.marginLeft="4px";y.style.height="22px";y.style.width="22px";y.style.position="relative";y.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";y.className="geColorBtn";c.appendChild(y);mxUtils.br(c);return{getColor:function(){return t},getTarget:function(){return n.value},
+focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,f,n,p,t,y){y=null!=y?y:[];n&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||y.push("lightbox=1"),"auto"!=c&&y.push("target="+c),null!=e&&e!=mxConstants.NONE&&y.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&y.push("edit="+encodeURIComponent(p)),t&&y.push("layers=1"),this.editor.graph.foldingEnabled&&y.push("nav=1"));f&&null!=this.currentPage&&null!=this.pages&&
+this.currentPage!=this.pages[0]&&y.push("page-id="+this.currentPage.getId());return y};EditorUi.prototype.createLink=function(c,e,f,n,p,t,y,v,D,A){D=this.createUrlParameters(c,e,f,n,p,t,D);c=this.getCurrentFile();e=!0;null!=y?f="#U"+encodeURIComponent(y):(c=this.getCurrentFile(),v||null==c||c.constructor!=window.DriveFile?f="#R"+encodeURIComponent(f?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(f="#"+c.getHash(),e=!1));e&&
+null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(c.getTitle()));A&&1<f.length&&(D.push("open="+f.substring(1)),f="");return(n&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+f};EditorUi.prototype.createHtml=function(c,e,f,n,p,t,y,v,D,A,U,l){this.getBasenames();var u={};""!=
+p&&p!=mxConstants.NONE&&(u.highlight=p);"auto"!==n&&(u.target=n);A||(u.lightbox=!1);u.nav=this.editor.graph.foldingEnabled;f=parseInt(f);isNaN(f)||100==f||(u.zoom=f/100);f=[];y&&(f.push("pages"),u.resize=!0,null!=this.pages&&null!=this.currentPage&&(u.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(f.push("zoom"),u.resize=!0);v&&f.push("layers");D&&f.push("tags");0<f.length&&(A&&f.push("lightbox"),u.toolbar=f.join(" "));null!=U&&0<U.length&&(u.edit=U);null!=c?u.url=c:u.xml=this.getFileData(!0,
+null,null,null,null,!y);e='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=f?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(u))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";l(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
+EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,f,n){var p=document.createElement("div");p.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(t);var y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var v=document.createElement("input");
+v.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","type-embedhtmldialog");t=v.cloneNode(!0);t.setAttribute("value","copy");y.appendChild(t);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));y.appendChild(D);mxUtils.br(y);y.appendChild(v);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));y.appendChild(D);var A=this.getCurrentFile();
+null==f&&null!=A&&A.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),y.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(A.getId())})));t.setAttribute("checked","checked");null==f&&v.setAttribute("disabled","disabled");p.appendChild(y);var U=this.addLinkSection(p),l=this.addCheckbox(p,mxResources.get("zoom"),
+!0,null,!0);mxUtils.write(p,":");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="100%";p.appendChild(u);var B=this.addCheckbox(p,mxResources.get("fit"),!0);y=null!=this.pages&&1<this.pages.length;var J=J=this.addCheckbox(p,mxResources.get("allPages"),y,!y),M=this.addCheckbox(p,mxResources.get("layers"),!0),F=this.addCheckbox(p,mxResources.get("tags"),!0),K=this.addCheckbox(p,
+mxResources.get("lightbox"),!0),P=null;y=380;if(EditorUi.enableHtmlEditOption){P=this.addEditButton(p,K);var R=P.getEditInput();R.style.marginBottom="16px";y+=50;mxEvent.addListener(K,"change",function(){K.checked?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled");R.checked&&K.checked?P.getEditSelect().removeAttribute("disabled"):P.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,p,mxUtils.bind(this,function(){n(v.checked?f:null,l.checked,u.value,U.getTarget(),
+U.getColor(),B.checked,J.checked,M.checked,F.checked,K.checked,null!=P?P.getLink():null)}),null,c,e);this.showDialog(c.container,340,y,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,f,n,p,t,y,v){var D=document.createElement("div");D.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,c||mxResources.get("link"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";D.appendChild(A);var U=this.getCurrentFile();c=0;if(null==
U||U.constructor!=window.DriveFile||e)y=null!=y?y:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;y=null!=y?y:"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 l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));A.appendChild(l);l=
mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(U.getId())}));l.style.marginTop="12px";l.className="geBtn";A.appendChild(l);D.appendChild(A);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.style.cursor="pointer";mxUtils.write(l,mxResources.get("check"));A.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
-mxUtils.bind(this,function(X){this.spinner.stop();X=new ErrorDialog(this,null,mxResources.get(null!=X?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(X.container,300,80,!0,!1);X.init()}))}))}var q=null,B=null;if(null!=g||null!=n)c+=30,mxUtils.write(D,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",
-q.value="100%",D.appendChild(q),mxUtils.write(D,mxResources.get("height")+":"),B=document.createElement("input"),B.setAttribute("type","text"),B.style.width="50px",B.style.marginLeft="6px",B.style.marginBottom="10px",B.value=n+"px",D.appendChild(B),mxUtils.br(D);var J=this.addLinkSection(D,v);g=null!=this.pages&&1<this.pages.length;var M=null;if(null==U||U.constructor!=window.DriveFile||e)M=this.addCheckbox(D,mxResources.get("allPages"),g,!g);var E=this.addCheckbox(D,mxResources.get("lightbox"),!0,
-null,null,!v),K=this.addEditButton(D,E),P=K.getEditInput();v&&(P.style.marginLeft=E.style.marginLeft,E.style.display="none",c-=20);var R=this.addCheckbox(D,mxResources.get("layers"),!0);R.style.marginLeft=P.style.marginLeft;R.style.marginTop="8px";var V=this.addCheckbox(D,mxResources.get("tags"),!0);V.style.marginLeft=P.style.marginLeft;V.style.marginBottom="16px";V.style.marginTop="16px";mxEvent.addListener(E,"change",function(){E.checked?(R.removeAttribute("disabled"),P.removeAttribute("disabled")):
-(R.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&E.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,D,mxUtils.bind(this,function(){p(J.getTarget(),J.getColor(),null==M?!0:M.checked,E.checked,K.getLink(),R.checked,null!=q?q.value:null,null!=B?B.value:null,V.checked)}),null,mxResources.get("create"),y,u);this.showDialog(e.container,340,300+c,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||
-mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):J.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,n,p){var v=document.createElement("div");v.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("image"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";v.appendChild(y);if(p){mxUtils.write(v,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%";v.appendChild(u);mxUtils.write(v,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";v.appendChild(D);mxUtils.br(v)}var A=this.addCheckbox(v,mxResources.get("selectionOnly"),!1,
-this.editor.graph.isSelectionEmpty()),U=n?null:this.addCheckbox(v,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);y=this.editor.graph;var l=n?null:this.addCheckbox(v,mxResources.get("transparentBackground"),y.background==mxConstants.NONE||null==y.background);null!=l&&(l.style.marginBottom="16px");c=new CustomDialog(this,v,mxUtils.bind(this,function(){var q=parseInt(u.value)/100||1,B=parseInt(D.value)||0;g(!A.checked,null!=U?U.checked:!1,null!=l?l.checked:!1,q,B)}),null,c,e);
-this.showDialog(c.container,300,(p?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,n,p,v,y,u,D){y=null!=y?y:Editor.defaultIncludeDiagram;var A=document.createElement("div");A.style.whiteSpace="nowrap";var U=this.editor.graph,l="jpeg"==u?220:300,q=document.createElement("h3");mxUtils.write(q,c);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";A.appendChild(q);mxUtils.write(A,mxResources.get("zoom")+":");var B=document.createElement("input");
+mxUtils.bind(this,function(X){this.spinner.stop();X=new ErrorDialog(this,null,mxResources.get(null!=X?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(X.container,300,80,!0,!1);X.init()}))}))}var u=null,B=null;if(null!=f||null!=n)c+=30,mxUtils.write(D,mxResources.get("width")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.marginRight="16px",u.style.width="50px",u.style.marginLeft="6px",u.style.marginRight="16px",u.style.marginBottom="10px",
+u.value="100%",D.appendChild(u),mxUtils.write(D,mxResources.get("height")+":"),B=document.createElement("input"),B.setAttribute("type","text"),B.style.width="50px",B.style.marginLeft="6px",B.style.marginBottom="10px",B.value=n+"px",D.appendChild(B),mxUtils.br(D);var J=this.addLinkSection(D,t);f=null!=this.pages&&1<this.pages.length;var M=null;if(null==U||U.constructor!=window.DriveFile||e)M=this.addCheckbox(D,mxResources.get("allPages"),f,!f);var F=this.addCheckbox(D,mxResources.get("lightbox"),!0,
+null,null,!t),K=this.addEditButton(D,F),P=K.getEditInput();t&&(P.style.marginLeft=F.style.marginLeft,F.style.display="none",c-=20);var R=this.addCheckbox(D,mxResources.get("layers"),!0);R.style.marginLeft=P.style.marginLeft;R.style.marginTop="8px";var V=this.addCheckbox(D,mxResources.get("tags"),!0);V.style.marginLeft=P.style.marginLeft;V.style.marginBottom="16px";V.style.marginTop="16px";mxEvent.addListener(F,"change",function(){F.checked?(R.removeAttribute("disabled"),P.removeAttribute("disabled")):
+(R.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&F.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,D,mxUtils.bind(this,function(){p(J.getTarget(),J.getColor(),null==M?!0:M.checked,F.checked,K.getLink(),R.checked,null!=u?u.value:null,null!=B?B.value:null,V.checked)}),null,mxResources.get("create"),y,v);this.showDialog(e.container,340,300+c,!0,!0);null!=u?(u.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)):J.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,f,n,p){var t=document.createElement("div");t.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("image"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";t.appendChild(y);if(p){mxUtils.write(t,mxResources.get("zoom")+":");var v=document.createElement("input");
+v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value=this.lastExportZoom||"100%";t.appendChild(v);mxUtils.write(t,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";t.appendChild(D);mxUtils.br(t)}var A=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,
+this.editor.graph.isSelectionEmpty()),U=n?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);y=this.editor.graph;var l=n?null:this.addCheckbox(t,mxResources.get("transparentBackground"),y.background==mxConstants.NONE||null==y.background);null!=l&&(l.style.marginBottom="16px");c=new CustomDialog(this,t,mxUtils.bind(this,function(){var u=parseInt(v.value)/100||1,B=parseInt(D.value)||0;f(!A.checked,null!=U?U.checked:!1,null!=l?l.checked:!1,u,B)}),null,c,e);
+this.showDialog(c.container,300,(p?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,f,n,p,t,y,v,D){y=null!=y?y:Editor.defaultIncludeDiagram;var A=document.createElement("div");A.style.whiteSpace="nowrap";var U=this.editor.graph,l="jpeg"==v?220:300,u=document.createElement("h3");mxUtils.write(u,c);u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";A.appendChild(u);mxUtils.write(A,mxResources.get("zoom")+":");var B=document.createElement("input");
B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value=this.lastExportZoom||"100%";A.appendChild(B);mxUtils.write(A,mxResources.get("borderWidth")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.value=this.lastExportBorder||"0";A.appendChild(J);mxUtils.br(A);var M=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,
-U.isSelectionEmpty()),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.style.marginLeft="24px";E.setAttribute("disabled","disabled");E.setAttribute("type","checkbox");var K=document.createElement("select");K.style.marginTop="16px";K.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var P={};for(q=0;q<c.length;q++)if(!U.isSelectionEmpty()||"selectionOnly"!=c[q]){var R=document.createElement("option");mxUtils.write(R,mxResources.get(c[q]));R.setAttribute("value",
-c[q]);K.appendChild(R);P[c[q]]=R}D?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(K),mxUtils.br(A),l+=26,mxEvent.addListener(K,"change",function(){"selectionOnly"==K.value&&(M.checked=!0)})):v&&(A.appendChild(E),mxUtils.write(A,mxResources.get("crop")),mxUtils.br(A),l+=30,mxEvent.addListener(M,"change",function(){M.checked?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}));U.isSelectionEmpty()?D&&(M.style.display="none",M.nextSibling.style.display="none",M.nextSibling.nextSibling.style.display=
-"none",l-=30):(K.value="diagram",E.setAttribute("checked","checked"),E.defaultChecked=!0,mxEvent.addListener(M,"change",function(){K.value=M.checked?"selectionOnly":"diagram"}));var V=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=u),X=null;Editor.isDarkMode()&&(X=this.addCheckbox(A,mxResources.get("dark"),!0),l+=26);var m=this.addCheckbox(A,mxResources.get("shadow"),U.shadowVisible),z=null;if("png"==u||"jpeg"==u)z=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||
-!this.canvasSupported,!1,!0),l+=30;var L=this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram"),y,null,null,"jpeg"!=u);L.style.marginBottom="16px";var Q=document.createElement("input");Q.style.marginBottom="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Q.setAttribute("disabled","disabled");var N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="8px";N.style.marginRight="10px";N.style.marginBottom="16px";
-N.className="geBtn";v=document.createElement("option");v.setAttribute("value","none");mxUtils.write(v,mxResources.get("noChange"));N.appendChild(v);v=document.createElement("option");v.setAttribute("value","embedFonts");mxUtils.write(v,mxResources.get("embedFonts"));N.appendChild(v);v=document.createElement("option");v.setAttribute("value","lblToSvg");mxUtils.write(v,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||N.appendChild(v);mxEvent.addListener(N,"change",mxUtils.bind(this,
+U.isSelectionEmpty()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.setAttribute("type","checkbox");var K=document.createElement("select");K.style.marginTop="16px";K.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var P={};for(u=0;u<c.length;u++)if(!U.isSelectionEmpty()||"selectionOnly"!=c[u]){var R=document.createElement("option");mxUtils.write(R,mxResources.get(c[u]));R.setAttribute("value",
+c[u]);K.appendChild(R);P[c[u]]=R}D?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(K),mxUtils.br(A),l+=26,mxEvent.addListener(K,"change",function(){"selectionOnly"==K.value&&(M.checked=!0)})):t&&(A.appendChild(F),mxUtils.write(A,mxResources.get("crop")),mxUtils.br(A),l+=30,mxEvent.addListener(M,"change",function(){M.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));U.isSelectionEmpty()?D&&(M.style.display="none",M.nextSibling.style.display="none",M.nextSibling.nextSibling.style.display=
+"none",l-=30):(K.value="diagram",F.setAttribute("checked","checked"),F.defaultChecked=!0,mxEvent.addListener(M,"change",function(){K.value=M.checked?"selectionOnly":"diagram"}));var V=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),X=null;Editor.isDarkMode()&&(X=this.addCheckbox(A,mxResources.get("dark"),!0),l+=26);var m=this.addCheckbox(A,mxResources.get("shadow"),U.shadowVisible),z=null;if("png"==v||"jpeg"==v)z=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),l+=30;var L=this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram"),y,null,null,"jpeg"!=v);L.style.marginBottom="16px";var Q=document.createElement("input");Q.style.marginBottom="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Q.setAttribute("disabled","disabled");var N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="8px";N.style.marginRight="10px";N.style.marginBottom="16px";
+N.className="geBtn";t=document.createElement("option");t.setAttribute("value","none");mxUtils.write(t,mxResources.get("noChange"));N.appendChild(t);t=document.createElement("option");t.setAttribute("value","embedFonts");mxUtils.write(t,mxResources.get("embedFonts"));N.appendChild(t);t=document.createElement("option");t.setAttribute("value","lblToSvg");mxUtils.write(t,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||N.appendChild(t);mxEvent.addListener(N,"change",mxUtils.bind(this,
function(){"lblToSvg"==N.value?(Q.checked=!0,Q.setAttribute("disabled","disabled"),P.page.style.display="none","page"==K.value&&(K.value="diagram"),m.checked=!1,m.setAttribute("disabled","disabled"),S.style.display="inline-block",T.style.display="none"):"disabled"==Q.getAttribute("disabled")&&(Q.checked=!1,Q.removeAttribute("disabled"),m.removeAttribute("disabled"),P.page.style.display="",S.style.display="none",T.style.display="")}));e&&(A.appendChild(Q),mxUtils.write(A,mxResources.get("embedImages")),
mxUtils.br(A),mxUtils.write(A,mxResources.get("txtSettings")+":"),A.appendChild(N),mxUtils.br(A),l+=60);var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginRight="10px";T.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));T.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));T.appendChild(e);
-e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));T.appendChild(e);var S=document.createElement("div");mxUtils.write(S,mxResources.get("LinksLost"));S.style.margin="7px";S.style.display="none";"svg"==u&&(mxUtils.write(A,mxResources.get("links")+":"),A.appendChild(T),A.appendChild(S),mxUtils.br(A),mxUtils.br(A),l+=50);g=new CustomDialog(this,A,mxUtils.bind(this,function(){this.lastExportBorder=J.value;this.lastExportZoom=B.value;
-p(B.value,V.checked,!M.checked,m.checked,L.checked,Q.checked,J.value,E.checked,!1,T.value,null!=z?z.checked:null,null!=X?X.checked:null,K.value,"embedFonts"==N.value,"lblToSvg"==N.value)}),null,g,n);this.showDialog(g.container,340,l,!0,!0,null,null,null,null,!0);B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,n,p){var v=document.createElement("div");v.style.whiteSpace="nowrap";
-var y=this.editor.graph;if(null!=e){var u=document.createElement("h3");mxUtils.write(u,e);u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";v.appendChild(u)}var D=this.addCheckbox(v,mxResources.get("fit"),!0),A=this.addCheckbox(v,mxResources.get("shadow"),y.shadowVisible&&n,!n),U=this.addCheckbox(v,g),l=this.addCheckbox(v,mxResources.get("lightbox"),!0),q=this.addEditButton(v,l),B=q.getEditInput(),J=1<y.model.getChildCount(y.model.getRoot()),M=this.addCheckbox(v,mxResources.get("layers"),
-J,!J);M.style.marginLeft=B.style.marginLeft;M.style.marginBottom="12px";M.style.marginTop="8px";mxEvent.addListener(l,"change",function(){l.checked?(J&&M.removeAttribute("disabled"),B.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&l.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,v,mxUtils.bind(this,function(){c(D.checked,A.checked,U.checked,
-l.checked,q.getLink(),M.checked)}),null,mxResources.get("embed"),p);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,n,p,v,y,u){function D(B){var J=" ",M="";n&&(J=" 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!=U?"&page="+U:"")+(p?"&edit=_blank":"")+(v?"&layers=1":"")+"');}})(this);\"",M+="cursor:pointer;");c&&(M+="max-width:100%;");var E="";g&&(E=' width="'+Math.round(A.width)+'" height="'+Math.round(A.height)+'"');y('<img src="'+B+'"'+E+(""!=M?' style="'+M+'"':"")+J+"/>")}var A=this.editor.graph.getGraphBounds(),U=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(B){var J=n?this.getFileData(!0):null;B=
-this.createImageDataUri(B,J,"png");D(B)}),null,null,null,mxUtils.bind(this,function(B){u({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),A.width*A.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var l="";g&&(l="&w="+Math.round(2*A.width)+"&h="+Math.round(2*A.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+l+"&xml="+encodeURIComponent(e));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&
-299>=q.getStatus()?D("data:image/png;base64,"+q.getText()):u({message:mxResources.get("unknownError")})}))}else u({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,n,p,v,y){var u=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),D=u.getElementsByTagName("a");if(null!=D)for(var A=0;A<D.length;A++){var U=D[A].getAttribute("href");null!=U&&"#"==U.charAt(0)&&"_blank"==D[A].getAttribute("target")&&D[A].removeAttribute("target")}n&&
-u.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(u);if(g){var l=" ",q="";n&&(l="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":"")+(v?"&layers=1":
-"")+"');}})(this);\"",q+="cursor:pointer;");c&&(q+="max-width:100%;");this.editor.convertImages(u,mxUtils.bind(this,function(B){y('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(B))+'"'+(""!=q?' style="'+q+'"':"")+l+"/>")}))}else q="",n&&(e=this.getSelectedPageIndex(),u.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(p?"&edit=_blank":"")+(v?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),c&&(c=parseInt(u.getAttribute("width")),p=parseInt(u.getAttribute("height")),u.setAttribute("viewBox","-0.5 -0.5 "+c+" "+p),q+="max-width:100%;max-height:"+p+"px;",u.removeAttribute("height")),""!=q&&u.setAttribute("style",q),this.editor.addFontCss(u),this.editor.graph.mathEnabled&&this.editor.addMathCss(u),y(mxUtils.getXml(u))};EditorUi.prototype.timeSince=function(c){c=
-Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g=
-c;else if("mxfile"==c.nodeName){var n=c.getElementsByTagName("diagram");if(0<n.length){g=n[0];var p=e.getGlobalVariable;e.getGlobalVariable=function(v){return"page"==v?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==v?1:p.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}n=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(v){}finally{this.editor.graph=n}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
-c){if(c.hasAttribute("scale")){var n=parseFloat(c.getAttribute("scale"));!isNaN(n)&&0<n&&(e=n)}c.hasAttribute("border")&&(n=parseInt(c.getAttribute("border")),!isNaN(n)&&0<n&&(g=n))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,n,p){try{var v=this.editor.graph,y=null!=v.themes&&"darkTheme"==v.defaultThemeName,u=null;if(null!=g&&0<g.length)v=this.createTemporaryGraph(y?v.getDefaultStylesheet():v.getStylesheet()),document.body.appendChild(v.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),v),u=g;else if(y||null!=this.pages&&this.currentPage!=this.pages[0]){v=this.createTemporaryGraph(y?v.getDefaultStylesheet():v.getStylesheet());var D=v.getGlobalVariable;v.setBackgroundImage=this.editor.graph.setBackgroundImage;var A=this.pages[0];this.currentPage==A?v.setBackgroundImage(this.editor.graph.backgroundImage):null!=A.viewState&&null!=A.viewState&&v.setBackgroundImage(A.viewState.backgroundImage);v.getGlobalVariable=function(U){return"page"==U?A.getName():"pagenumber"==U?1:D.apply(this,
-arguments)};document.body.appendChild(v.container);v.model.setRoot(A.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(U){try{null==u&&(u=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var l=U.toDataURL("image/png");l=Editor.writeGraphModelToPng(l,"tEXt","mxfile",encodeURIComponent(u));c(l.substring(l.lastIndexOf(",")+1));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container)}catch(q){null!=e&&e(q)}}),null,null,null,mxUtils.bind(this,function(U){null!=e&&
-e(U)}),null,null,n,null,v.shadowVisible,null,v,p,null,null,null,"diagram",null)}catch(U){null!=e&&e(U)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,n,p,v,y,u,D,A,U,l,q){u=null!=u?u:!0;U=null!=U?U:0;y=null!=D?D:e.background;y==mxConstants.NONE&&(y=null);v=e.getSvg(y,A,U,null,null,v,null,null,null,e.shadowVisible||l,null,q,"diagram");(e.shadowVisible||l)&&e.addSvgShadow(v,null,null,0==U);null!=c&&v.setAttribute("content",c);null!=g&&v.setAttribute("resource",g);var B=mxUtils.bind(this,function(J){J=
-(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(J);null!=p&&p(J);return J});e.mathEnabled&&this.editor.addMathCss(v);if(null!=p)this.embedFonts(v,mxUtils.bind(this,function(J){u?this.editor.convertImages(J,mxUtils.bind(this,function(M){B(M)})):B(J)}));else return B(v)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(n){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,n,p,v,y,u,D,A,U,l,q){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var B=this.editor.graph.isSelectionEmpty();g=null!=g?g:B;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(J){this.spinner.stop();try{this.saveCanvas(J,
-p?this.getFileData(!0,null,null,null,g,u):null,D,null==this.pages||0==this.pages.length,U)}catch(M){this.handleError(M)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,g,c||1,e,n,null,null,v,y,A,l,q)}catch(J){this.spinner.stop(),this.handleError(J)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,n,p,v,y){e=null!=e?e:0;g=null!=g?g:0;var u=[];try{var D=
-this.editor.graph;if(null!=c&&0<c.length){D.model.beginUpdate();try{var A=mxUtils.parseXml(c);c={};var U=this.editor.extractGraphModel(A.documentElement,null!=this.pages);if(null!=U&&"mxfile"==U.nodeName&&null!=this.pages){var l=U.getElementsByTagName("diagram");if(1==l.length&&!v){if(U=Editor.parseDiagramNode(l[0]),null!=this.currentPage&&(c[l[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var q=l[0].getAttribute("name");null!=q&&""!=q&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,q))}}else if(0<l.length){v=[];var B=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[l[0].getAttribute("id")]=this.pages[0].getId(),U=Editor.parseDiagramNode(l[0]),n=!1,B=1);for(;B<l.length;B++){var J=l[B].getAttribute("id");l[B].removeAttribute("id");var M=this.updatePageRoot(new DiagramPage(l[B]));c[J]=l[B].getAttribute("id");var E=this.pages.length;null==M.getName()&&M.setName(mxResources.get("pageWithNumber",[E+1]));D.model.execute(new ChangePage(this,M,M,E,
-!0));v.push(M)}this.updatePageLinks(c,v)}}if(null!=U&&"mxGraphModel"===U.nodeName){u=D.importGraphModel(U,e,g,n);if(null!=u)for(B=0;B<u.length;B++)this.updatePageLinksForCell(c,u[B]);var K=D.parseBackgroundImage(U.getAttribute("backgroundImage"));if(null!=K&&null!=K.originalSrc){this.updateBackgroundPageLink(c,K);var P=new ChangePageSetup(this,null,K);P.ignoreColor=!0;D.model.execute(P)}}y&&this.insertHandler(u,null,null,D.defaultVertexStyle,D.defaultEdgeStyle,!1,!0)}finally{D.model.endUpdate()}}}catch(R){if(p)throw R;
-this.handleError(R)}return u};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
-function(c,e){var g=document.createElement("div"),n=this.editor.graph,p=n.getLinkForCell(e);null!=p&&n.setLinkForCell(e,this.updatePageLink(c,p));if(n.isHtmlLabel(e)){g.innerHTML=n.sanitizeHtml(n.getLabel(e));for(var v=g.getElementsByTagName("a"),y=!1,u=0;u<v.length;u++)p=v[u].getAttribute("href"),null!=p&&(v[u].setAttribute("href",this.updatePageLink(c,p)),y=!0);y&&n.labelChanged(e,g.innerHTML)}for(u=0;u<n.model.getChildCount(e);u++)this.updatePageLinksForCell(c,n.model.getChildAt(e,u))};EditorUi.prototype.updatePageLink=
-function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var n=JSON.parse(e.substring(17));if(null!=n.actions){for(var p=0;p<n.actions.length;p++){var v=n.actions[p];if(null!=v.open&&Graph.isPageLink(v.open)){var y=v.open.substring(v.open.indexOf(",")+1);g=c[y];null!=g?v.open="data:page/id,"+g:null==this.getPageById(y)&&delete v.open}}e="data:action/json,"+JSON.stringify(n)}}catch(u){}return e};
-EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,n,p){n=null!=n?n:c.name;g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var y=this.isRemoteVisioFormat(n);try{var u="UNKNOWN-VISIO",D=n.lastIndexOf(".");if(0<=D&&D<n.length)u=n.substring(D+1).toUpperCase();else{var A=n.lastIndexOf("/");0<=
-A&&A<n.length&&(n=n.substring(A+1))}EditorUi.logEvent({category:u+"-MS-IMPORT-FILE",action:"filename_"+n,label:y?"remote":"local"})}catch(l){}if(y)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{y=new FormData;y.append("file1",c,n);var U=new XMLHttpRequest;U.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));U.responseType="blob";this.addRemoteServiceSecurityCheck(U);
-null!=p&&U.setRequestHeader("x-convert-custom",p);U.onreadystatechange=mxUtils.bind(this,function(){if(4==U.readyState)if(200<=U.status&&299>=U.status)try{var l=U.response;if("text/xml"==l.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(B){try{e(B.target.result)}catch(J){g({message:mxResources.get("errorLoadingFile")})}});q.readAsText(l)}else this.doImportVisio(l,e,g,n)}catch(B){g(B)}else try{""==U.responseType||"text"==U.responseType?g({message:U.responseText}):(q=new FileReader,q.onload=
-function(){g({message:JSON.parse(q.result).Message})},q.readAsText(U.response))}catch(B){g({})}});U.send(y)}else try{this.doImportVisio(c,e,g,n)}catch(l){g(l)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?v():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",v))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(p){this.handleError(p)});
-var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(c,e,g)}catch(p){g(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.exportVisio=function(c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(c)||
-this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.convertLucidChart=function(c,e,g){var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var p=
-JSON.parse(c);e(LucidImporter.importState(p));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var v=[(new Date).toISOString(),"convertLucidChart",p];null!=p.state&&v.push(JSON.parse(p.state));if(null!=p.svgThumbs)for(var y=0;y<p.svgThumbs.length;y++)v.push(Editor.createSvgDataUri(p.svgThumbs[y]));null!=p.thumb&&v.push(p.thumb);console.log.apply(console,v)}}catch(u){}}catch(u){null!=window.console&&console.error(u),g(u)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
+e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));T.appendChild(e);var S=document.createElement("div");mxUtils.write(S,mxResources.get("LinksLost"));S.style.margin="7px";S.style.display="none";"svg"==v&&(mxUtils.write(A,mxResources.get("links")+":"),A.appendChild(T),A.appendChild(S),mxUtils.br(A),mxUtils.br(A),l+=50);f=new CustomDialog(this,A,mxUtils.bind(this,function(){this.lastExportBorder=J.value;this.lastExportZoom=B.value;
+p(B.value,V.checked,!M.checked,m.checked,L.checked,Q.checked,J.value,F.checked,!1,T.value,null!=z?z.checked:null,null!=X?X.checked:null,K.value,"embedFonts"==N.value,"lblToSvg"==N.value)}),null,f,n);this.showDialog(f.container,340,l,!0,!0,null,null,null,null,!0);B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,f,n,p){var t=document.createElement("div");t.style.whiteSpace="nowrap";
+var y=this.editor.graph;if(null!=e){var v=document.createElement("h3");mxUtils.write(v,e);v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(v)}var D=this.addCheckbox(t,mxResources.get("fit"),!0),A=this.addCheckbox(t,mxResources.get("shadow"),y.shadowVisible&&n,!n),U=this.addCheckbox(t,f),l=this.addCheckbox(t,mxResources.get("lightbox"),!0),u=this.addEditButton(t,l),B=u.getEditInput(),J=1<y.model.getChildCount(y.model.getRoot()),M=this.addCheckbox(t,mxResources.get("layers"),
+J,!J);M.style.marginLeft=B.style.marginLeft;M.style.marginBottom="12px";M.style.marginTop="8px";mxEvent.addListener(l,"change",function(){l.checked?(J&&M.removeAttribute("disabled"),B.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&l.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,t,mxUtils.bind(this,function(){c(D.checked,A.checked,U.checked,
+l.checked,u.getLink(),M.checked)}),null,mxResources.get("embed"),p);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,f,n,p,t,y,v){function D(B){var J=" ",M="";n&&(J=" 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!=U?"&page="+U:"")+(p?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",M+="cursor:pointer;");c&&(M+="max-width:100%;");var F="";f&&(F=' width="'+Math.round(A.width)+'" height="'+Math.round(A.height)+'"');y('<img src="'+B+'"'+F+(""!=M?' style="'+M+'"':"")+J+"/>")}var A=this.editor.graph.getGraphBounds(),U=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(B){var J=n?this.getFileData(!0):null;B=
+this.createImageDataUri(B,J,"png");D(B)}),null,null,null,mxUtils.bind(this,function(B){v({message:mxResources.get("unknownError")})}),null,!0,f?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),A.width*A.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var l="";f&&(l="&w="+Math.round(2*A.width)+"&h="+Math.round(2*A.height));var u=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+l+"&xml="+encodeURIComponent(e));u.send(mxUtils.bind(this,function(){200<=u.getStatus()&&
+299>=u.getStatus()?D("data:image/png;base64,"+u.getText()):v({message:mxResources.get("unknownError")})}))}else v({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,f,n,p,t,y){var v=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!f),D=v.getElementsByTagName("a");if(null!=D)for(var A=0;A<D.length;A++){var U=D[A].getAttribute("href");null!=U&&"#"==U.charAt(0)&&"_blank"==D[A].getAttribute("target")&&D[A].removeAttribute("target")}n&&
+v.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(v);if(f){var l=" ",u="";n&&(l="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":"")+(t?"&layers=1":
+"")+"');}})(this);\"",u+="cursor:pointer;");c&&(u+="max-width:100%;");this.editor.convertImages(v,mxUtils.bind(this,function(B){y('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(B))+'"'+(""!=u?' style="'+u+'"':"")+l+"/>")}))}else u="",n&&(e=this.getSelectedPageIndex(),v.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(p?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),u+="cursor:pointer;"),c&&(c=parseInt(v.getAttribute("width")),p=parseInt(v.getAttribute("height")),v.setAttribute("viewBox","-0.5 -0.5 "+c+" "+p),u+="max-width:100%;max-height:"+p+"px;",v.removeAttribute("height")),""!=u&&v.setAttribute("style",u),this.editor.addFontCss(v),this.editor.graph.mathEnabled&&this.editor.addMathCss(v),y(mxUtils.getXml(v))};EditorUi.prototype.timeSince=function(c){c=
+Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var f=null;if("diagram"==c.nodeName)f=
+c;else if("mxfile"==c.nodeName){var n=c.getElementsByTagName("diagram");if(0<n.length){f=n[0];var p=e.getGlobalVariable;e.getGlobalVariable=function(t){return"page"==t?f.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:p.apply(this,arguments)}}}null!=f&&(c=Editor.parseDiagramNode(f))}n=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(t){}finally{this.editor.graph=n}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,f=0;if(null!=
+c){if(c.hasAttribute("scale")){var n=parseFloat(c.getAttribute("scale"));!isNaN(n)&&0<n&&(e=n)}c.hasAttribute("border")&&(n=parseInt(c.getAttribute("border")),!isNaN(n)&&0<n&&(f=n))}return{scale:e,border:f}};EditorUi.prototype.getEmbeddedPng=function(c,e,f,n,p){try{var t=this.editor.graph,y=null!=t.themes&&"darkTheme"==t.defaultThemeName,v=null;if(null!=f&&0<f.length)t=this.createTemporaryGraph(y?t.getDefaultStylesheet():t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,
+!0),t),v=f;else if(y||null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(y?t.getDefaultStylesheet():t.getStylesheet());var D=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var A=this.pages[0];this.currentPage==A?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=A.viewState&&null!=A.viewState&&t.setBackgroundImage(A.viewState.backgroundImage);t.getGlobalVariable=function(U){return"page"==U?A.getName():"pagenumber"==U?1:D.apply(this,
+arguments)};document.body.appendChild(t.container);t.model.setRoot(A.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(U){try{null==v&&(v=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var l=U.toDataURL("image/png");l=Editor.writeGraphModelToPng(l,"tEXt","mxfile",encodeURIComponent(v));c(l.substring(l.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(u){null!=e&&e(u)}}),null,null,null,mxUtils.bind(this,function(U){null!=e&&
+e(U)}),null,null,n,null,t.shadowVisible,null,t,p,null,null,null,"diagram",null)}catch(U){null!=e&&e(U)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,f,n,p,t,y,v,D,A,U,l,u){v=null!=v?v:!0;U=null!=U?U:0;y=null!=D?D:e.background;y==mxConstants.NONE&&(y=null);t=e.getSvg(y,A,U,null,null,t,null,null,null,e.shadowVisible||l,null,u,"diagram");(e.shadowVisible||l)&&e.addSvgShadow(t,null,null,0==U);null!=c&&t.setAttribute("content",c);null!=f&&t.setAttribute("resource",f);var B=mxUtils.bind(this,function(J){J=
+(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(J);null!=p&&p(J);return J});e.mathEnabled&&this.editor.addMathCss(t);if(null!=p)this.embedFonts(t,mxUtils.bind(this,function(J){v?this.editor.convertImages(J,mxUtils.bind(this,function(M){B(M)})):B(J)}));else return B(t)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(c,f),e(c)}catch(n){e(c)}}))}catch(f){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,f,n,p,t,y,v,D,A,U,l,u){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var B=this.editor.graph.isSelectionEmpty();f=null!=f?f:B;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(J){this.spinner.stop();try{this.saveCanvas(J,
+p?this.getFileData(!0,null,null,null,f,v):null,D,null==this.pages||0==this.pages.length,U)}catch(M){this.handleError(M)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,f,c||1,e,n,null,null,t,y,A,l,u)}catch(J){this.spinner.stop(),this.handleError(J)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,f,n,p,t,y){e=null!=e?e:0;f=null!=f?f:0;var v=[];try{var D=
+this.editor.graph;if(null!=c&&0<c.length){D.model.beginUpdate();try{var A=mxUtils.parseXml(c);c={};var U=this.editor.extractGraphModel(A.documentElement,null!=this.pages);if(null!=U&&"mxfile"==U.nodeName&&null!=this.pages){var l=U.getElementsByTagName("diagram");if(1==l.length&&!t){if(U=Editor.parseDiagramNode(l[0]),null!=this.currentPage&&(c[l[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var u=l[0].getAttribute("name");null!=u&&""!=u&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,u))}}else if(0<l.length){t=[];var B=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[l[0].getAttribute("id")]=this.pages[0].getId(),U=Editor.parseDiagramNode(l[0]),n=!1,B=1);for(;B<l.length;B++){var J=l[B].getAttribute("id");l[B].removeAttribute("id");var M=this.updatePageRoot(new DiagramPage(l[B]));c[J]=l[B].getAttribute("id");var F=this.pages.length;null==M.getName()&&M.setName(mxResources.get("pageWithNumber",[F+1]));D.model.execute(new ChangePage(this,M,M,F,
+!0));t.push(M)}this.updatePageLinks(c,t)}}if(null!=U&&"mxGraphModel"===U.nodeName){v=D.importGraphModel(U,e,f,n);if(null!=v)for(B=0;B<v.length;B++)this.updatePageLinksForCell(c,v[B]);var K=D.parseBackgroundImage(U.getAttribute("backgroundImage"));if(null!=K&&null!=K.originalSrc){this.updateBackgroundPageLink(c,K);var P=new ChangePageSetup(this,null,K);P.ignoreColor=!0;D.model.execute(P)}}y&&this.insertHandler(v,null,null,D.defaultVertexStyle,D.defaultEdgeStyle,!1,!0)}finally{D.model.endUpdate()}}}catch(R){if(p)throw R;
+this.handleError(R)}return v};EditorUi.prototype.updatePageLinks=function(c,e){for(var f=0;f<e.length;f++)this.updatePageLinksForCell(c,e[f].root),null!=e[f].viewState&&this.updateBackgroundPageLink(c,e[f].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var f=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=f&&(e.originalSrc="data:page/id,"+f)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
+function(c,e){var f=document.createElement("div"),n=this.editor.graph,p=n.getLinkForCell(e);null!=p&&n.setLinkForCell(e,this.updatePageLink(c,p));if(n.isHtmlLabel(e)){f.innerHTML=n.sanitizeHtml(n.getLabel(e));for(var t=f.getElementsByTagName("a"),y=!1,v=0;v<t.length;v++)p=t[v].getAttribute("href"),null!=p&&(t[v].setAttribute("href",this.updatePageLink(c,p)),y=!0);y&&n.labelChanged(e,f.innerHTML)}for(v=0;v<n.model.getChildCount(e);v++)this.updatePageLinksForCell(c,n.model.getChildAt(e,v))};EditorUi.prototype.updatePageLink=
+function(c,e){if(Graph.isPageLink(e)){var f=c[e.substring(e.indexOf(",")+1)];e=null!=f?"data:page/id,"+f:null}else if("data:action/json,"==e.substring(0,17))try{var n=JSON.parse(e.substring(17));if(null!=n.actions){for(var p=0;p<n.actions.length;p++){var t=n.actions[p];if(null!=t.open&&Graph.isPageLink(t.open)){var y=t.open.substring(t.open.indexOf(",")+1);f=c[y];null!=f?t.open="data:page/id,"+f:null==this.getPageById(y)&&delete t.open}}e="data:action/json,"+JSON.stringify(n)}}catch(v){}return e};
+EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,f,n,p){n=null!=n?n:c.name;f=null!=f?f:mxUtils.bind(this,function(y){this.handleError(y)});var t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var y=this.isRemoteVisioFormat(n);try{var v="UNKNOWN-VISIO",D=n.lastIndexOf(".");if(0<=D&&D<n.length)v=n.substring(D+1).toUpperCase();else{var A=n.lastIndexOf("/");0<=
+A&&A<n.length&&(n=n.substring(A+1))}EditorUi.logEvent({category:v+"-MS-IMPORT-FILE",action:"filename_"+n,label:y?"remote":"local"})}catch(l){}if(y)if(null==VSD_CONVERT_URL||this.isOffline())f({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{y=new FormData;y.append("file1",c,n);var U=new XMLHttpRequest;U.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));U.responseType="blob";this.addRemoteServiceSecurityCheck(U);
+null!=p&&U.setRequestHeader("x-convert-custom",p);U.onreadystatechange=mxUtils.bind(this,function(){if(4==U.readyState)if(200<=U.status&&299>=U.status)try{var l=U.response;if("text/xml"==l.type){var u=new FileReader;u.onload=mxUtils.bind(this,function(B){try{e(B.target.result)}catch(J){f({message:mxResources.get("errorLoadingFile")})}});u.readAsText(l)}else this.doImportVisio(l,e,f,n)}catch(B){f(B)}else try{""==U.responseType||"text"==U.responseType?f({message:U.responseText}):(u=new FileReader,u.onload=
+function(){f({message:JSON.parse(u.result).Message})},u.readAsText(U.response))}catch(B){f({})}});U.send(y)}else try{this.doImportVisio(c,e,f,n)}catch(l){f(l)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",t))};EditorUi.prototype.importGraphML=function(c,e,f){f=null!=f?f:mxUtils.bind(this,function(p){this.handleError(p)});
+var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(c,e,f)}catch(p){f(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",n))};EditorUi.prototype.exportVisio=function(c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(c)||
+this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.convertLucidChart=function(c,e,f){var n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var p=
+JSON.parse(c);e(LucidImporter.importState(p));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var t=[(new Date).toISOString(),"convertLucidChart",p];null!=p.state&&t.push(JSON.parse(p.state));if(null!=p.svgThumbs)for(var y=0;y<p.svgThumbs.length;y++)t.push(Editor.createSvgDataUri(p.svgThumbs[y]));null!=p.thumb&&t.push(p.thumb);console.log.apply(console,t)}}catch(v){}}catch(v){null!=window.console&&console.error(v),f(v)}else f({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(n,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",n)})})})}):mxscript("js/extensions.min.js",n))};EditorUi.prototype.generateMermaidImage=function(c,
-e,g,n){var p=this,v=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(y){try{if(mxClient.IS_IE||mxClient.IS_IE11)y=y.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var u=mxUtils.parseXml(y).getElementsByTagName("svg");
-if(0<u.length){var D=parseFloat(u[0].getAttribute("width")),A=parseFloat(u[0].getAttribute("height"));if(isNaN(D)||isNaN(A))try{var U=u[0].getAttribute("viewBox").split(/\s+/);D=parseFloat(U[2]);A=parseFloat(U[3])}catch(l){D=D||100,A=A||100}g(p.convertDataUri(Editor.createSvgDataUri(y)),D,A)}else n({message:mxResources.get("invalidInput")})}catch(l){n(l)}})}catch(y){n(y)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?v():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-v):mxscript("js/extensions.min.js",v))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,n){function p(u,D,A){c1=u>>2;c2=(u&3)<<4|D>>4;c3=(D&15)<<2|A>>6;c4=A&63;r="";r+=v(c1&63);r+=v(c2&63);r+=v(c3&63);return r+=v(c4&63)}function v(u){if(10>u)return String.fromCharCode(48+u);u-=10;if(26>u)return String.fromCharCode(65+u);u-=26;if(26>u)return String.fromCharCode(97+u);u-=26;return 0==u?"-":1==u?"_":"?"}var y=new XMLHttpRequest;y.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(u){r="";for(i=0;i<u.length;i+=3)r=i+2==u.length?r+p(u.charCodeAt(i),u.charCodeAt(i+1),0):i+1==u.length?r+p(u.charCodeAt(i),0,0):r+p(u.charCodeAt(i),u.charCodeAt(i+1),u.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(y.responseType="blob");y.onload=function(u){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(A){var U=new Image;U.onload=
-function(){try{var l=U.width,q=U.height;if(0==l&&0==q){var B=D.result,J=B.indexOf(","),M=decodeURIComponent(escape(atob(B.substring(J+1)))),E=mxUtils.parseXml(M).getElementsByTagName("svg");0<E.length&&(l=parseFloat(E[0].getAttribute("width")),q=parseFloat(E[0].getAttribute("height")))}g(D.result,l,q)}catch(K){n(K)}};U.src=D.result};D.onerror=function(A){n(A)}}else n(u)};y.onerror=function(u){n(u)};y.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var n=this.editor.graph,p=null;n.getModel().beginUpdate();
-try{p=n.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(p,!0)}finally{n.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(c,e,g,n,p,v,y,u){v=null!=v?v:!0;y=null!=y?y:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(q){4==
-q.readyState&&200<=q.status&&299>=q.status&&this.editor.graph.setSelectionCells(this.insertTextAt(q.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var D=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var A=Editor.extractGraphModelFromPdf(c);if(null!=A&&0<A.length)return this.importXml(A,e,g,v,!0,u)}if(Editor.isPngDataUrl(c)&&(A=Editor.extractGraphModelFromPng(c),null!=A&&0<A.length))return this.importXml(A,
-e,g,v,!0,u);if("data:image/svg+xml;"==c.substring(0,19))try{A=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(A=c.substring(c.indexOf(",")+1),A=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A,!0)):A=decodeURIComponent(c.substring(c.indexOf(",")+1));var U=this.importXml(A,e,g,v,!0,u);if(0<U.length)return U}catch(q){}this.loadImage(c,mxUtils.bind(this,function(q){if("data:"==c.substring(0,5))this.resizeImage(q,c,mxUtils.bind(this,function(M,E,K){D.setSelectionCell(D.insertVertex(null,null,
-"",D.snap(e),D.snap(g),E,K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(M)+";"))}),y,this.maxImageSize);else{var B=Math.min(1,Math.min(this.maxImageSize/q.width,this.maxImageSize/q.height)),J=Math.round(q.width*B);q=Math.round(q.height*B);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(e),D.snap(g),J,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var q=null;D.getModel().beginUpdate();try{q=D.insertVertex(D.getDefaultParent(),null,c,D.snap(e),D.snap(g),1,1,"text;"+(n?"html=1;":"")),D.updateCellSize(q),D.fireEvent(new mxEventObject("textInserted","cells",[q]))}finally{D.getModel().endUpdate()}D.setSelectionCell(q)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,v,null,u);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(q){this.editor.graph.setSelectionCells(this.importXml(q,e,g,v,null,u))}),mxUtils.bind(this,function(q){this.handleError(q)}));else{D=this.editor.graph;p=null;D.getModel().beginUpdate();try{p=D.insertVertex(D.getDefaultParent(),null,"",D.snap(e),D.snap(g),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[p]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
+e,f,n){var p=this,t=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(y){try{if(mxClient.IS_IE||mxClient.IS_IE11)y=y.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var v=mxUtils.parseXml(y).getElementsByTagName("svg");
+if(0<v.length){var D=parseFloat(v[0].getAttribute("width")),A=parseFloat(v[0].getAttribute("height"));if(isNaN(D)||isNaN(A))try{var U=v[0].getAttribute("viewBox").split(/\s+/);D=parseFloat(U[2]);A=parseFloat(U[3])}catch(l){D=D||100,A=A||100}f(p.convertDataUri(Editor.createSvgDataUri(y)),D,A)}else n({message:mxResources.get("invalidInput")})}catch(l){n(l)}})}catch(y){n(y)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?t():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+t):mxscript("js/extensions.min.js",t))};EditorUi.prototype.generatePlantUmlImage=function(c,e,f,n){function p(v,D,A){c1=v>>2;c2=(v&3)<<4|D>>4;c3=(D&15)<<2|A>>6;c4=A&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(v){if(10>v)return String.fromCharCode(48+v);v-=10;if(26>v)return String.fromCharCode(65+v);v-=26;if(26>v)return String.fromCharCode(97+v);v-=26;return 0==v?"-":1==v?"_":"?"}var y=new XMLHttpRequest;y.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(v){r="";for(i=0;i<v.length;i+=3)r=i+2==v.length?r+p(v.charCodeAt(i),v.charCodeAt(i+1),0):i+1==v.length?r+p(v.charCodeAt(i),0,0):r+p(v.charCodeAt(i),v.charCodeAt(i+1),v.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(y.responseType="blob");y.onload=function(v){if(200<=this.status&&300>this.status)if("txt"==e)f(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(A){var U=new Image;U.onload=
+function(){try{var l=U.width,u=U.height;if(0==l&&0==u){var B=D.result,J=B.indexOf(","),M=decodeURIComponent(escape(atob(B.substring(J+1)))),F=mxUtils.parseXml(M).getElementsByTagName("svg");0<F.length&&(l=parseFloat(F[0].getAttribute("width")),u=parseFloat(F[0].getAttribute("height")))}f(D.result,l,u)}catch(K){n(K)}};U.src=D.result};D.onerror=function(A){n(A)}}else n(v)};y.onerror=function(v){n(v)};y.send()};EditorUi.prototype.insertAsPreText=function(c,e,f){var n=this.editor.graph,p=null;n.getModel().beginUpdate();
+try{p=n.insertVertex(null,null,"<pre>"+c+"</pre>",e,f,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(p,!0)}finally{n.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(c,e,f,n,p,t,y,v){t=null!=t?t:!0;y=null!=y?y:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(u){4==
+u.readyState&&200<=u.status&&299>=u.status&&this.editor.graph.setSelectionCells(this.insertTextAt(u.responseText,e,f,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var D=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var A=Editor.extractGraphModelFromPdf(c);if(null!=A&&0<A.length)return this.importXml(A,e,f,t,!0,v)}if(Editor.isPngDataUrl(c)&&(A=Editor.extractGraphModelFromPng(c),null!=A&&0<A.length))return this.importXml(A,
+e,f,t,!0,v);if("data:image/svg+xml;"==c.substring(0,19))try{A=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(A=c.substring(c.indexOf(",")+1),A=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A,!0)):A=decodeURIComponent(c.substring(c.indexOf(",")+1));var U=this.importXml(A,e,f,t,!0,v);if(0<U.length)return U}catch(u){}this.loadImage(c,mxUtils.bind(this,function(u){if("data:"==c.substring(0,5))this.resizeImage(u,c,mxUtils.bind(this,function(M,F,K){D.setSelectionCell(D.insertVertex(null,null,
+"",D.snap(e),D.snap(f),F,K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(M)+";"))}),y,this.maxImageSize);else{var B=Math.min(1,Math.min(this.maxImageSize/u.width,this.maxImageSize/u.height)),J=Math.round(u.width*B);u=Math.round(u.height*B);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(e),D.snap(f),J,u,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+c+";"))}}),mxUtils.bind(this,function(){var u=null;D.getModel().beginUpdate();try{u=D.insertVertex(D.getDefaultParent(),null,c,D.snap(e),D.snap(f),1,1,"text;"+(n?"html=1;":"")),D.updateCellSize(u),D.fireEvent(new mxEventObject("textInserted","cells",[u]))}finally{D.getModel().endUpdate()}D.setSelectionCell(u)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,f,t,null,v);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
+function(u){this.editor.graph.setSelectionCells(this.importXml(u,e,f,t,null,v))}),mxUtils.bind(this,function(u){this.handleError(u)}));else{D=this.editor.graph;p=null;D.getModel().beginUpdate();try{p=D.insertVertex(D.getDefaultParent(),null,"",D.snap(e),D.snap(f),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[p]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
"...");p.value=c;D.updateCellSize(p);if(0<this.maxTextWidth&&p.geometry.width>this.maxTextWidth){var l=D.getPreferredSizeForCell(p,this.maxTextWidth);p.geometry.width=l.width;p.geometry.height=l.height}Graph.isLink(p.value)&&D.setLinkForCell(p,p.value);p.geometry.width+=D.gridSize;p.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[p]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};
EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==
-this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(y,u){StorageFile.listFiles(this,
-"F",y,u)});window.openBrowserFile=mxUtils.bind(this,function(y,u,D){StorageFile.getFileContent(this,y,u,D)});window.deleteBrowserFile=mxUtils.bind(this,function(y,u,D){StorageFile.deleteFile(this,y,u,D)});if(!e){var n=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(y){this.hideDialog(y)}));window.openFile.setConsumer(mxUtils.bind(this,function(y,u){null!=u&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(u)?(y=new Blob([y],{type:"application/octet-stream"}),
-this.importVisio(y,mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,u)):this.editor.graph.setSelectionCells(this.importXml(y,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var p=this.dialog,v=p.close;this.dialog.close=mxUtils.bind(this,function(y){Editor.useLocalStorage=n;v.apply(p,arguments);y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(c,e,g){var n=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(v){if(mxUtils.isEmptyObject(v.files))g();else{var y=0,u,D=!1;v.forEach(function(A,U){A=U.name.toLowerCase();"diagram/diagram.xml"==A?(D=!0,U.async("string").then(function(l){0==l.indexOf("<mxfile ")?e(l):g()})):0==A.indexOf("versions/")&&(A=parseInt(A.substr(9)),A>y&&(y=A,u=U))});0<y?u.async("string").then(function(A){(new XMLHttpRequest).upload&&
-n.isRemoteFileFormat(A,c.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):n.parseFileData(A,mxUtils.bind(this,function(U){4==U.readyState&&(200<=U.status&&299>=U.status?e(U.responseText):g())}),c.name):g()}):D||g()}},function(v){g(v)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importFile=function(c,e,g,n,p,v,y,u,D,A,U,l){A=null!=
-A?A:!0;var q=!1,B=null,J=mxUtils.bind(this,function(M){var E=null;null!=M&&"<mxlibrary"==M.substring(0,10)?this.loadLibrary(new LocalLibrary(this,M,y)):E=this.importXml(M,g,n,A,null,null!=l?mxEvent.isControlDown(l):null);null!=u&&u(E)});"image"==e.substring(0,5)?(D=!1,"image/png"==e.substring(0,9)&&(e=U?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(B=this.importXml(e,g,n,A,null,null!=l?mxEvent.isControlDown(l):null),D=!0)),D||(e=this.editor.graph,D=c.indexOf(";"),0<D&&(c=c.substring(0,
-D)+c.substring(c.indexOf(",",D+1))),A&&e.isGridEnabled()&&(g=e.snap(g),n=e.snap(n)),B=[e.insertVertex(null,null,"",g,n,p,v,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(q=!0,this.importGraphML(c,J)):null!=D&&null!=y&&(/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y))?(q=!0,this.importVisio(D,J)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,y)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(q=!0,p=mxUtils.bind(this,function(M){4==M.readyState&&(200<=M.status&&299>=M.status?J(M.responseText):null!=u&&u(null))}),null!=c?this.parseFileData(c,p,y):this.parseFile(D,p,y)):0==c.indexOf("PK")&&null!=D?(q=!0,this.importZipFile(D,J,mxUtils.bind(this,function(){B=this.insertTextAt(this.validateFileData(c),g,n,!0,null,A);u(B)}))):/(\.v(sd|dx))($|\?)/i.test(y)||/(\.vs(s|x))($|\?)/i.test(y)||(B=this.insertTextAt(this.validateFileData(c),
-g,n,!0,null,A,null,null!=l?mxEvent.isControlDown(l):null));q||null==u||u(B);return B};EditorUi.prototype.importFiles=function(c,e,g,n,p,v,y,u,D,A,U,l,q){n=null!=n?n:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var B=null!=e&&null!=g,J=!0;e=null!=e?e:0;g=null!=g?g:0;var M=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var E=U||this.resampleThreshold,K=0;K<c.length;K++)if("image/svg"!==c[K].type.substring(0,9)&&"image/"===c[K].type.substring(0,6)&&c[K].size>E){M=!0;break}var P=mxUtils.bind(this,function(){var R=
-this.editor.graph,V=R.gridSize;p=null!=p?p:mxUtils.bind(this,function(N,T,S,W,Z,ba,aa,fa,Y){try{return null!=N&&"<mxlibrary"==N.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,N,aa)),null):"atlassian"!=this.getServiceName()&&"1"!=urlParams.embed&&this.isCompatibleString(N)&&1==c.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,N,aa,!0)),null):this.importFile(N,T,S,W,Z,ba,aa,fa,Y,B,l,q)}catch(ia){return this.handleError(ia),
-null}});v=null!=v?v:mxUtils.bind(this,function(N){R.setSelectionCells(N)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var X=c.length,m=X,z=[],L=mxUtils.bind(this,function(N,T){z[N]=T;if(0==--m){this.spinner.stop();if(null!=u)u(z);else{var S=[];R.getModel().beginUpdate();try{for(N=0;N<z.length;N++){var W=z[N]();null!=W&&(S=S.concat(W))}}finally{R.getModel().endUpdate()}}v(S)}}),Q=0;Q<X;Q++)mxUtils.bind(this,function(N){var T=c[N];if(null!=T){var S=new FileReader;S.onload=mxUtils.bind(this,
-function(W){if(null==y||y(T))if("image/"==T.type.substring(0,6))if("image/svg"==T.type.substring(0,9)){var Z=Graph.clipSvgDataUri(W.target.result),ba=Z.indexOf(",");ba=decodeURIComponent(escape(atob(Z.substring(ba+1))));var aa=mxUtils.parseXml(ba);ba=aa.getElementsByTagName("svg");if(0<ba.length){ba=ba[0];var fa=l?null:ba.getAttribute("content");null!=fa&&"<"!=fa.charAt(0)&&"%"!=fa.charAt(0)&&(fa=unescape(window.atob?atob(fa):Base64.decode(fa,!0)));null!=fa&&"%"==fa.charAt(0)&&(fa=decodeURIComponent(fa));
-null==fa||"<mxfile "!==fa.substring(0,8)&&"<mxGraphModel "!==fa.substring(0,14)?L(N,mxUtils.bind(this,function(){try{if(null!=aa){var da=aa.getElementsByTagName("svg");if(0<da.length){var va=da[0],Aa=va.getAttribute("width"),ya=va.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;ya=null!=ya&&"%"!=ya.charAt(ya.length-1)?parseFloat(ya):NaN;var ta=va.getAttribute("viewBox");if(null==ta||0==ta.length)va.setAttribute("viewBox","0 0 "+Aa+" "+ya);else if(isNaN(Aa)||isNaN(ya)){var ca=
-ta.split(" ");3<ca.length&&(Aa=parseFloat(ca[2]),ya=parseFloat(ca[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(va));var Pa=Math.min(1,Math.min(n/Math.max(1,Aa)),n/Math.max(1,ya)),La=p(Z,T.type,e+N*V,g+N*V,Math.max(1,Math.round(Aa*Pa)),Math.max(1,Math.round(ya*Pa)),T.name);if(isNaN(Aa)||isNaN(ya)){var Da=new Image;Da.onload=mxUtils.bind(this,function(){Aa=Math.max(1,Da.width);ya=Math.max(1,Da.height);La[0].geometry.width=Aa;La[0].geometry.height=ya;va.setAttribute("viewBox","0 0 "+Aa+" "+ya);Z=Editor.createSvgDataUri(mxUtils.getXml(va));
-var Ia=Z.indexOf(";");0<Ia&&(Z=Z.substring(0,Ia)+Z.substring(Z.indexOf(",",Ia+1)));R.setCellStyles("image",Z,[La[0]])});Da.src=Editor.createSvgDataUri(mxUtils.getXml(va))}return La}}}catch(Ia){}return null})):L(N,mxUtils.bind(this,function(){return p(fa,"text/xml",e+N*V,g+N*V,0,0,T.name)}))}else L(N,mxUtils.bind(this,function(){return null}))}else{ba=!1;if("image/png"==T.type){var Y=l?null:this.extractGraphModelFromPng(W.target.result);if(null!=Y&&0<Y.length){var ia=new Image;ia.src=W.target.result;
-L(N,mxUtils.bind(this,function(){return p(Y,"text/xml",e+N*V,g+N*V,ia.width,ia.height,T.name)}));ba=!0}}ba||(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(W.target.result,mxUtils.bind(this,function(da){this.resizeImage(da,W.target.result,mxUtils.bind(this,
-function(va,Aa,ya){L(N,mxUtils.bind(this,function(){if(null!=va&&va.length<A){var ta=J&&this.isResampleImageSize(T.size,U)?Math.min(1,Math.min(n/Aa,n/ya)):1;return p(va,T.type,e+N*V,g+N*V,Math.round(Aa*ta),Math.round(ya*ta),T.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),J,n,U,T.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=W.target.result,p(Z,T.type,e+N*V,g+N*V,240,160,T.name,function(da){L(N,
-function(){return da})},T)});/(\.v(dx|sdx?))($|\?)/i.test(T.name)||/(\.vs(x|sx?))($|\?)/i.test(T.name)?p(null,T.type,e+N*V,g+N*V,240,160,T.name,function(W){L(N,function(){return W})},T):"image"==T.type.substring(0,5)||"application/pdf"==T.type?S.readAsDataURL(T):S.readAsText(T)}})(Q)});if(M){M=[];for(K=0;K<c.length;K++)M.push(c[K]);c=M;this.confirmImageResize(function(R){J=R;P()},D)}else P()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
-this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,p=function(v,y){if(v||e)mxSettings.setResizeImages(v?y:null),mxSettings.save();g();c(y)};null==n||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(v){p(v,!0)},function(v){p(v,
-!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,n)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,e,g)});n.readAsText(c)};EditorUi.prototype.parseFileData=
-function(c,e,g){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){e(n)};n.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,n,p,v,
-y){p=null!=p?p:this.maxImageSize;var u=Math.max(1,c.width),D=Math.max(1,c.height);if(n&&this.isResampleImageSize(null!=y?y:e.length,v))try{var A=Math.max(u/p,D/p);if(1<A){var U=Math.round(u/A),l=Math.round(D/A),q=document.createElement("canvas");q.width=U;q.height=l;q.getContext("2d").drawImage(c,0,0,U,l);var B=q.toDataURL();if(B.length<e.length){var J=document.createElement("canvas");J.width=U;J.height=l;var M=J.toDataURL();B!==M&&(e=B,u=U,D=l)}}}catch(E){}g(e,u,D)};EditorUi.prototype.extractGraphModelFromPng=
-function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;e(n)};null!=g&&(n.onerror=g);n.src=c}catch(p){if(null!=g)g(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=
-mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,e=this.editor.graph;Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(E){var K=E.getEvent();
-return null==E.getState()&&!mxEvent.isMouseEvent(K)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(K)&&(null==E.getState()||mxEvent.isControlDown(K)||mxEvent.isShiftDown(K))});e.cellEditor.editPlantUmlData=function(E,K,P){var R=JSON.parse(P);K=new TextareaDialog(c,mxResources.get("plantUml")+":",R.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(V,R.format,function(X,m,z){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==R.format)e.labelChanged(E,
-"<pre>"+X+"</pre>"),e.updateCellSize(E,!0);else{e.setCellStyles("image",c.convertDataUri(X),[E]);var L=e.model.getGeometry(E);null!=L&&(L=L.clone(),L.width=m,L.height=z,e.cellsResized([E],[L],!1))}e.setAttributeForCell(E,"plantUmlData",JSON.stringify({data:V,format:R.format}))}finally{e.getModel().endUpdate()}},function(X){c.handleError(X)})},null,null,400,220);c.showDialog(K.container,420,300,!0,!0);K.init()};e.cellEditor.editMermaidData=function(E,K,P){var R=JSON.parse(P);K=new TextareaDialog(c,
-mxResources.get("mermaid")+":",R.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(V,R.config,function(X,m,z){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",X,[E]);var L=e.model.getGeometry(E);null!=L&&(L=L.clone(),L.width=Math.max(L.width,m),L.height=Math.max(L.height,z),e.cellsResized([E],[L],!1));e.setAttributeForCell(E,"mermaidData",JSON.stringify({data:V,config:R.config},null,2))}finally{e.getModel().endUpdate()}},
-function(X){c.handleError(X)})},null,null,400,220);c.showDialog(K.container,420,300,!0,!0);K.init()};var g=e.cellEditor.startEditing;e.cellEditor.startEditing=function(E,K){try{var P=this.graph.getAttributeForCell(E,"plantUmlData");if(null!=P)this.editPlantUmlData(E,K,P);else if(P=this.graph.getAttributeForCell(E,"mermaidData"),null!=P)this.editMermaidData(E,K,P);else{var R=e.getCellStyle(E);"1"==mxUtils.getValue(R,"metaEdit","0")?c.showDataDialog(E):g.apply(this,arguments)}}catch(V){c.handleError(V)}};
-e.getLinkTitle=function(E){return c.getLinkTitle(E)};e.customLinkClicked=function(E){var K=!1;try{c.handleCustomLink(E),K=!0}catch(P){c.handleError(P)}return K};var n=e.parseBackgroundImage;e.parseBackgroundImage=function(E){var K=n.apply(this,arguments);null!=K&&null!=K.src&&Graph.isPageLink(K.src)&&(K={originalSrc:K.src});return K};var p=e.setBackgroundImage;e.setBackgroundImage=function(E){null!=E&&null!=E.originalSrc&&(E=c.createImageForPageLink(E.originalSrc,c.currentPage,this));p.apply(this,
-arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(E,K){E=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=E){var P=E.indexOf(",");if(0<P)for(E=E.substring(P+1),K=K.getProperty("patches"),P=0;P<K.length;P++)if(null!=K[P][EditorUi.DIFF_UPDATE]&&null!=K[P][EditorUi.DIFF_UPDATE][E]||
-null!=K[P][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(K[P][EditorUi.DIFF_REMOVE],E)){e.refreshBackgroundImage();break}}}));var v=e.getBackgroundImageObject;e.getBackgroundImageObject=function(E,K){var P=v.apply(this,arguments);if(null!=P&&null!=P.originalSrc)if(!K)P={src:P.originalSrc};else if(K&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var R=this.stylesheet,V=this.shapeForegroundColor,X=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";
+this.importFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.importFiles(f.files,null,null,this.maxImageSize),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.importFileInputElt=f}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(y,v){StorageFile.listFiles(this,
+"F",y,v)});window.openBrowserFile=mxUtils.bind(this,function(y,v,D){StorageFile.getFileContent(this,y,v,D)});window.deleteBrowserFile=mxUtils.bind(this,function(y,v,D){StorageFile.deleteFile(this,y,v,D)});if(!e){var n=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(y){this.hideDialog(y)}));window.openFile.setConsumer(mxUtils.bind(this,function(y,v){null!=v&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(v)?(y=new Blob([y],{type:"application/octet-stream"}),
+this.importVisio(y,mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,v)):this.editor.graph.setSelectionCells(this.importXml(y,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var p=this.dialog,t=p.close;this.dialog.close=mxUtils.bind(this,function(y){Editor.useLocalStorage=n;t.apply(p,arguments);y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(c,e,f){var n=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(t){if(mxUtils.isEmptyObject(t.files))f();else{var y=0,v,D=!1;t.forEach(function(A,U){A=U.name.toLowerCase();"diagram/diagram.xml"==A?(D=!0,U.async("string").then(function(l){0==l.indexOf("<mxfile ")?e(l):f()})):0==A.indexOf("versions/")&&(A=parseInt(A.substr(9)),A>y&&(y=A,v=U))});0<y?v.async("string").then(function(A){(new XMLHttpRequest).upload&&
+n.isRemoteFileFormat(A,c.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f):n.parseFileData(A,mxUtils.bind(this,function(U){4==U.readyState&&(200<=U.status&&299>=U.status?e(U.responseText):f())}),c.name):f()}):D||f()}},function(t){f(t)}):f()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importFile=function(c,e,f,n,p,t,y,v,D,A,U,l){A=null!=
+A?A:!0;var u=!1,B=null,J=mxUtils.bind(this,function(M){var F=null;null!=M&&"<mxlibrary"==M.substring(0,10)?this.loadLibrary(new LocalLibrary(this,M,y)):F=this.importXml(M,f,n,A,null,null!=l?mxEvent.isControlDown(l):null);null!=v&&v(F)});"image"==e.substring(0,5)?(D=!1,"image/png"==e.substring(0,9)&&(e=U?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(B=this.importXml(e,f,n,A,null,null!=l?mxEvent.isControlDown(l):null),D=!0)),D||(e=this.editor.graph,D=c.indexOf(";"),0<D&&(c=c.substring(0,
+D)+c.substring(c.indexOf(",",D+1))),A&&e.isGridEnabled()&&(f=e.snap(f),n=e.snap(n)),B=[e.insertVertex(null,null,"",f,n,p,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(u=!0,this.importGraphML(c,J)):null!=D&&null!=y&&(/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y))?(u=!0,this.importVisio(D,J)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,y)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(u=!0,p=mxUtils.bind(this,function(M){4==M.readyState&&(200<=M.status&&299>=M.status?J(M.responseText):null!=v&&(v(null),this.showError(mxResources.get("error"),413==M.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,p,y):this.parseFile(D,p,y)):0==c.indexOf("PK")&&null!=D?(u=!0,this.importZipFile(D,J,mxUtils.bind(this,function(){B=this.insertTextAt(this.validateFileData(c),
+f,n,!0,null,A);v(B)}))):/(\.v(sd|dx))($|\?)/i.test(y)||/(\.vs(s|x))($|\?)/i.test(y)||(B=this.insertTextAt(this.validateFileData(c),f,n,!0,null,A,null,null!=l?mxEvent.isControlDown(l):null));u||null==v||v(B);return B};EditorUi.prototype.importFiles=function(c,e,f,n,p,t,y,v,D,A,U,l,u){n=null!=n?n:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var B=null!=e&&null!=f,J=!0;e=null!=e?e:0;f=null!=f?f:0;var M=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var F=U||this.resampleThreshold,K=0;K<c.length;K++)if("image/svg"!==
+c[K].type.substring(0,9)&&"image/"===c[K].type.substring(0,6)&&c[K].size>F){M=!0;break}var P=mxUtils.bind(this,function(){var R=this.editor.graph,V=R.gridSize;p=null!=p?p:mxUtils.bind(this,function(N,T,S,W,Z,ba,aa,fa,Y){try{return null!=N&&"<mxlibrary"==N.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,N,aa)),null):"atlassian"!=this.getServiceName()&&"1"!=urlParams.embed&&this.isCompatibleString(N)&&1==c.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),
+this.fileLoaded(new LocalFile(this,N,aa,!0)),null):this.importFile(N,T,S,W,Z,ba,aa,fa,Y,B,l,u)}catch(ia){return this.handleError(ia),null}});t=null!=t?t:mxUtils.bind(this,function(N){R.setSelectionCells(N)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var X=c.length,m=X,z=[],L=mxUtils.bind(this,function(N,T){z[N]=T;if(0==--m){this.spinner.stop();if(null!=v)v(z);else{var S=[];R.getModel().beginUpdate();try{for(N=0;N<z.length;N++){var W=z[N]();null!=W&&(S=S.concat(W))}}finally{R.getModel().endUpdate()}}t(S)}}),
+Q=0;Q<X;Q++)mxUtils.bind(this,function(N){var T=c[N];if(null!=T){var S=new FileReader;S.onload=mxUtils.bind(this,function(W){if(null==y||y(T))if("image/"==T.type.substring(0,6))if("image/svg"==T.type.substring(0,9)){var Z=Graph.clipSvgDataUri(W.target.result),ba=Z.indexOf(",");ba=decodeURIComponent(escape(atob(Z.substring(ba+1))));var aa=mxUtils.parseXml(ba);ba=aa.getElementsByTagName("svg");if(0<ba.length){ba=ba[0];var fa=l?null:ba.getAttribute("content");null!=fa&&"<"!=fa.charAt(0)&&"%"!=fa.charAt(0)&&
+(fa=unescape(window.atob?atob(fa):Base64.decode(fa,!0)));null!=fa&&"%"==fa.charAt(0)&&(fa=decodeURIComponent(fa));null==fa||"<mxfile "!==fa.substring(0,8)&&"<mxGraphModel "!==fa.substring(0,14)?L(N,mxUtils.bind(this,function(){try{if(null!=aa){var da=aa.getElementsByTagName("svg");if(0<da.length){var va=da[0],Aa=va.getAttribute("width"),ya=va.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;ya=null!=ya&&"%"!=ya.charAt(ya.length-1)?parseFloat(ya):NaN;var ta=va.getAttribute("viewBox");
+if(null==ta||0==ta.length)va.setAttribute("viewBox","0 0 "+Aa+" "+ya);else if(isNaN(Aa)||isNaN(ya)){var ca=ta.split(" ");3<ca.length&&(Aa=parseFloat(ca[2]),ya=parseFloat(ca[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(va));var Pa=Math.min(1,Math.min(n/Math.max(1,Aa)),n/Math.max(1,ya)),La=p(Z,T.type,e+N*V,f+N*V,Math.max(1,Math.round(Aa*Pa)),Math.max(1,Math.round(ya*Pa)),T.name);if(isNaN(Aa)||isNaN(ya)){var Da=new Image;Da.onload=mxUtils.bind(this,function(){Aa=Math.max(1,Da.width);ya=Math.max(1,Da.height);
+La[0].geometry.width=Aa;La[0].geometry.height=ya;va.setAttribute("viewBox","0 0 "+Aa+" "+ya);Z=Editor.createSvgDataUri(mxUtils.getXml(va));var Ia=Z.indexOf(";");0<Ia&&(Z=Z.substring(0,Ia)+Z.substring(Z.indexOf(",",Ia+1)));R.setCellStyles("image",Z,[La[0]])});Da.src=Editor.createSvgDataUri(mxUtils.getXml(va))}return La}}}catch(Ia){}return null})):L(N,mxUtils.bind(this,function(){return p(fa,"text/xml",e+N*V,f+N*V,0,0,T.name)}))}else L(N,mxUtils.bind(this,function(){return null}))}else{ba=!1;if("image/png"==
+T.type){var Y=l?null:this.extractGraphModelFromPng(W.target.result);if(null!=Y&&0<Y.length){var ia=new Image;ia.src=W.target.result;L(N,mxUtils.bind(this,function(){return p(Y,"text/xml",e+N*V,f+N*V,ia.width,ia.height,T.name)}));ba=!0}}ba||(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(W.target.result,mxUtils.bind(this,function(da){this.resizeImage(da,W.target.result,mxUtils.bind(this,function(va,Aa,ya){L(N,mxUtils.bind(this,function(){if(null!=va&&va.length<A){var ta=J&&this.isResampleImageSize(T.size,U)?Math.min(1,Math.min(n/Aa,n/ya)):1;return p(va,T.type,e+N*V,f+N*V,Math.round(Aa*ta),Math.round(ya*ta),T.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),J,n,U,T.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=
+W.target.result,p(Z,T.type,e+N*V,f+N*V,240,160,T.name,function(da){L(N,function(){return da})},T)});/(\.v(dx|sdx?))($|\?)/i.test(T.name)||/(\.vs(x|sx?))($|\?)/i.test(T.name)?p(null,T.type,e+N*V,f+N*V,240,160,T.name,function(W){L(N,function(){return W})},T):"image"==T.type.substring(0,5)||"application/pdf"==T.type?S.readAsDataURL(T):S.readAsText(T)}})(Q)});if(M){M=[];for(K=0;K<c.length;K++)M.push(c[K]);c=M;this.confirmImageResize(function(R){J=R;P()},D)}else P()};EditorUi.prototype.isBlankFile=function(){return null!=
+this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,p=function(t,y){if(t||e)mxSettings.setResizeImages(t?y:null),mxSettings.save();f();c(y)};null==n||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+function(t){p(t,!0)},function(t){p(t,!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,n)};EditorUi.prototype.parseFile=function(c,e,f){f=null!=f?f:c.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,e,f)});n.readAsText(c)};
+EditorUi.prototype.parseFileData=function(c,e,f){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){e(n)};n.send("format=xml&filename="+encodeURIComponent(f)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=
+function(c,e,f,n,p,t,y){p=null!=p?p:this.maxImageSize;var v=Math.max(1,c.width),D=Math.max(1,c.height);if(n&&this.isResampleImageSize(null!=y?y:e.length,t))try{var A=Math.max(v/p,D/p);if(1<A){var U=Math.round(v/A),l=Math.round(D/A),u=document.createElement("canvas");u.width=U;u.height=l;u.getContext("2d").drawImage(c,0,0,U,l);var B=u.toDataURL();if(B.length<e.length){var J=document.createElement("canvas");J.width=U;J.height=l;var M=J.toDataURL();B!==M&&(e=B,v=U,D=l)}}}catch(F){}f(e,v,D)};EditorUi.prototype.extractGraphModelFromPng=
+function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,f){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;e(n)};null!=f&&(n.onerror=f);n.src=c}catch(p){if(null!=f)f(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=
+mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,e=this.editor.graph;Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(F){var K=F.getEvent();
+return null==F.getState()&&!mxEvent.isMouseEvent(K)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(K)&&(null==F.getState()||mxEvent.isControlDown(K)||mxEvent.isShiftDown(K))});e.cellEditor.editPlantUmlData=function(F,K,P){var R=JSON.parse(P);K=new TextareaDialog(c,mxResources.get("plantUml")+":",R.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(V,R.format,function(X,m,z){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==R.format)e.labelChanged(F,
+"<pre>"+X+"</pre>"),e.updateCellSize(F,!0);else{e.setCellStyles("image",c.convertDataUri(X),[F]);var L=e.model.getGeometry(F);null!=L&&(L=L.clone(),L.width=m,L.height=z,e.cellsResized([F],[L],!1))}e.setAttributeForCell(F,"plantUmlData",JSON.stringify({data:V,format:R.format}))}finally{e.getModel().endUpdate()}},function(X){c.handleError(X)})},null,null,400,220);c.showDialog(K.container,420,300,!0,!0);K.init()};e.cellEditor.editMermaidData=function(F,K,P){var R=JSON.parse(P);K=new TextareaDialog(c,
+mxResources.get("mermaid")+":",R.data,function(V){null!=V&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(V,R.config,function(X,m,z){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",X,[F]);var L=e.model.getGeometry(F);null!=L&&(L=L.clone(),L.width=Math.max(L.width,m),L.height=Math.max(L.height,z),e.cellsResized([F],[L],!1));e.setAttributeForCell(F,"mermaidData",JSON.stringify({data:V,config:R.config},null,2))}finally{e.getModel().endUpdate()}},
+function(X){c.handleError(X)})},null,null,400,220);c.showDialog(K.container,420,300,!0,!0);K.init()};var f=e.cellEditor.startEditing;e.cellEditor.startEditing=function(F,K){try{var P=this.graph.getAttributeForCell(F,"plantUmlData");if(null!=P)this.editPlantUmlData(F,K,P);else if(P=this.graph.getAttributeForCell(F,"mermaidData"),null!=P)this.editMermaidData(F,K,P);else{var R=e.getCellStyle(F);"1"==mxUtils.getValue(R,"metaEdit","0")?c.showDataDialog(F):f.apply(this,arguments)}}catch(V){c.handleError(V)}};
+e.getLinkTitle=function(F){return c.getLinkTitle(F)};e.customLinkClicked=function(F){var K=!1;try{c.handleCustomLink(F),K=!0}catch(P){c.handleError(P)}return K};var n=e.parseBackgroundImage;e.parseBackgroundImage=function(F){var K=n.apply(this,arguments);null!=K&&null!=K.src&&Graph.isPageLink(K.src)&&(K={originalSrc:K.src});return K};var p=e.setBackgroundImage;e.setBackgroundImage=function(F){null!=F&&null!=F.originalSrc&&(F=c.createImageForPageLink(F.originalSrc,c.currentPage,this));p.apply(this,
+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(F,K){F=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=F){var P=F.indexOf(",");if(0<P)for(F=F.substring(P+1),K=K.getProperty("patches"),P=0;P<K.length;P++)if(null!=K[P][EditorUi.DIFF_UPDATE]&&null!=K[P][EditorUi.DIFF_UPDATE][F]||
+null!=K[P][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(K[P][EditorUi.DIFF_REMOVE],F)){e.refreshBackgroundImage();break}}}));var t=e.getBackgroundImageObject;e.getBackgroundImageObject=function(F,K){var P=t.apply(this,arguments);if(null!=P&&null!=P.originalSrc)if(!K)P={src:P.originalSrc};else if(K&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var R=this.stylesheet,V=this.shapeForegroundColor,X=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";
this.shapeForegroundColor="#000000";P=c.createImageForPageLink(P.originalSrc);this.shapeBackgroundColor=X;this.shapeForegroundColor=V;this.stylesheet=R}return P};var y=this.clearDefaultStyle;this.clearDefaultStyle=function(){y.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl=
-"https://app.diagrams.net/";var u=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(E){E=null!=E?E:"";"1"==urlParams.dev&&(E+=(0<E.length?"&":"?")+"dev=1");return u.apply(this,arguments)};var D=e.addClickHandler;e.addClickHandler=function(E,K,P){var R=K;K=function(V,X){if(null==X){var m=mxEvent.getSource(V);"a"==m.nodeName.toLowerCase()&&(X=m.getAttribute("href"))}null!=X&&e.isCustomLink(X)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&e.customLinkClicked(X)&&mxEvent.consume(V);
-null!=R&&R(V,X)};D.call(this,E,K,P)};t.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(E,K,P){c.editor.graph.isSelectionEmpty()?A.apply(this,arguments):c.menus.addMenuItems(E,"delete - cut copy copyAsImage - duplicate".split(" "),null,P)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=
-c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var U=e.getExportVariables;e.getExportVariables=function(){var E=U.apply(this,arguments),K=c.getCurrentFile();null!=K&&(E.filename=K.getTitle());E.pagecount=null!=c.pages?c.pages.length:1;E.page=null!=c.currentPage?c.currentPage.getName():"";E.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return E};var l=e.getGlobalVariable;e.getGlobalVariable=function(E){var K=
-c.getCurrentFile();return"filename"==E&&null!=K?K.getTitle():"page"==E&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==E?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==E?null!=c.pages?c.pages.length:1:l.apply(this,arguments)};var q=e.labelLinkClicked;e.labelLinkClicked=function(E,K,P){var R=K.getAttribute("href");if(null==R||!e.isCustomLink(R)||!mxEvent.isTouchEvent(P)&&mxEvent.isPopupTrigger(P))q.apply(this,arguments);else{if(!e.isEnabled()||
-null!=E&&e.isCellLocked(E.cell))e.customLinkClicked(R),e.getRubberband().reset();mxEvent.consume(P)}};this.editor.getOrCreateFilename=function(){var E=c.defaultFilename,K=c.getCurrentFile();null!=K&&(E=null!=K.getTitle()?K.getTitle():E);return E};var B=this.actions.get("print");B.setEnabled(!mxClient.IS_IOS||!navigator.standalone);B.visible=B.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),
+"https://app.diagrams.net/";var v=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(F){F=null!=F?F:"";"1"==urlParams.dev&&(F+=(0<F.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var D=e.addClickHandler;e.addClickHandler=function(F,K,P){var R=K;K=function(V,X){if(null==X){var m=mxEvent.getSource(V);"a"==m.nodeName.toLowerCase()&&(X=m.getAttribute("href"))}null!=X&&e.isCustomLink(X)&&(mxEvent.isTouchEvent(V)||!mxEvent.isPopupTrigger(V))&&e.customLinkClicked(X)&&mxEvent.consume(V);
+null!=R&&R(V,X)};D.call(this,F,K,P)};q.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(F,K,P){c.editor.graph.isSelectionEmpty()?A.apply(this,arguments):c.menus.addMenuItems(F,"delete - cut copy copyAsImage - duplicate".split(" "),null,P)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=
+c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var U=e.getExportVariables;e.getExportVariables=function(){var F=U.apply(this,arguments),K=c.getCurrentFile();null!=K&&(F.filename=K.getTitle());F.pagecount=null!=c.pages?c.pages.length:1;F.page=null!=c.currentPage?c.currentPage.getName():"";F.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return F};var l=e.getGlobalVariable;e.getGlobalVariable=function(F){var K=
+c.getCurrentFile();return"filename"==F&&null!=K?K.getTitle():"page"==F&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==F?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==F?null!=c.pages?c.pages.length:1:l.apply(this,arguments)};var u=e.labelLinkClicked;e.labelLinkClicked=function(F,K,P){var R=K.getAttribute("href");if(null==R||!e.isCustomLink(R)||!mxEvent.isTouchEvent(P)&&mxEvent.isPopupTrigger(P))u.apply(this,arguments);else{if(!e.isEnabled()||
+null!=F&&e.isCellLocked(F.cell))e.customLinkClicked(R),e.getRubberband().reset();mxEvent.consume(P)}};this.editor.getOrCreateFilename=function(){var F=c.defaultFilename,K=c.getCurrentFile();null!=K&&(F=null!=K.getTitle()?K.getTitle():F);return F};var B=this.actions.get("print");B.setEnabled(!mxClient.IS_IOS||!navigator.standalone);B.visible=B.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,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,
-!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(E){var K=e.cellEditor.text2,P=null;null!=K&&(mxEvent.addListener(K,"dragleave",function(R){null!=P&&(P.parentNode.removeChild(P),P=null);R.stopPropagation();
+!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(F){var K=e.cellEditor.text2,P=null;null!=K&&(mxEvent.addListener(K,"dragleave",function(R){null!=P&&(P.parentNode.removeChild(P),P=null);R.stopPropagation();
R.preventDefault()}),mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(R){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=this.highlightElement(K));R.stopPropagation();R.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(R){null!=P&&(P.parentNode.removeChild(P),P=null);if(0<R.dataTransfer.files.length)this.importFiles(R.dataTransfer.files,0,0,this.maxImageSize,function(X,m,z,L,Q,N){e.insertImage(X,Q,N)},function(){},function(X){return"image/"==X.type.substring(0,
6)},function(X){for(var m=0;m<X.length;m++)X[m]()},mxEvent.isControlDown(R));else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var V=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(X){var m=Math.max(1,X.width);X=Math.max(1,X.height);var z=this.maxImageSize;z=Math.min(1,Math.min(z/Math.max(1,m)),z/Math.max(1,X));e.insertImage(decodeURIComponent(V),m*z,X*z)})):document.execCommand("insertHTML",
-!1,R.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(R.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,R.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(R.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,R.dataTransfer.getData("text/plain"));R.stopPropagation();R.preventDefault()})))}));this.isSettingsEnabled()&&(B=this.editor.graph.view,B.setUnit(mxSettings.getUnit()),B.addListener("unitChanged",function(E,K){mxSettings.setUnit(K.getProperty("unit"));
+!1,R.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(R.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,R.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(R.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,R.dataTransfer.getData("text/plain"));R.stopPropagation();R.preventDefault()})))}));this.isSettingsEnabled()&&(B=this.editor.graph.view,B.setUnit(mxSettings.getUnit()),B.addListener("unitChanged",function(F,K){mxSettings.setUnit(K.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,B.unit),this.refresh());if("1"==urlParams.styledev){B=document.getElementById("geFooter");null!=B&&(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)})),B.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(E,K){0<this.editor.graph.getSelectionCount()?(E=this.editor.graph.getSelectionCell(),
-E=this.editor.graph.getModel().getStyle(E),this.styleInput.value=E||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var J=this.isSelectionAllowed;this.isSelectionAllowed=function(E){return mxEvent.getSource(E)==this.styleInput?!0:J.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var M=null;mxEvent.addListener(e.container,"dragleave",function(E){e.isEnabled()&&
-(null!=M&&(M.parentNode.removeChild(M),M=null),E.stopPropagation(),E.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(E){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();E.stopPropagation();E.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(E){null!=M&&(M.parentNode.removeChild(M),M=null);if(e.isEnabled()){var K=mxUtils.convertPoint(e.container,
-mxEvent.getClientX(E),mxEvent.getClientY(E)),P=E.dataTransfer.files,R=e.view.translate,V=e.view.scale,X=K.x/V-R.x,m=K.y/V-R.y;if(0<P.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(E)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(P,!0)):(mxEvent.isAltDown(E)&&(m=X=null),this.importFiles(P,X,m,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(E),null,null,mxEvent.isShiftDown(E),E));else{mxEvent.isAltDown(E)&&(m=X=0);var z=0<=mxUtils.indexOf(E.dataTransfer.types,
-"text/uri-list")?E.dataTransfer.getData("text/uri-list"):null;K=this.extractGraphModelFromEvent(E,null!=this.pages);if(null!=K)e.setSelectionCells(this.importXml(K,X,m,!0));else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/html")){var L=E.dataTransfer.getData("text/html");K=document.createElement("div");K.innerHTML=e.sanitizeHtml(L);var Q=null;P=K.getElementsByTagName("img");null!=P&&1==P.length?(L=P[0].getAttribute("src"),null==L&&(L=P[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(L)||
-(Q=!0)):(P=K.getElementsByTagName("a"),null!=P&&1==P.length?L=P[0].getAttribute("href"):(K=K.getElementsByTagName("pre"),null!=K&&1==K.length&&(L=mxUtils.getTextContent(K[0]))));var N=!0,T=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(L,X,m,!0,Q,null,N,mxEvent.isControlDown(E)))});Q&&null!=L&&L.length>this.resampleThreshold?this.confirmImageResize(function(S){N=S;T()},mxEvent.isControlDown(E)):T()}else null!=z&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(z)?this.loadImage(decodeURIComponent(z),
-mxUtils.bind(this,function(S){var W=Math.max(1,S.width);S=Math.max(1,S.height);var Z=this.maxImageSize;Z=Math.min(1,Math.min(Z/Math.max(1,W)),Z/Math.max(1,S));e.setSelectionCell(e.insertVertex(null,null,"",X,m,W*Z,S*Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+z+";"))}),mxUtils.bind(this,function(S){e.setSelectionCells(this.insertTextAt(z,X,m,!0))})):0<=mxUtils.indexOf(E.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(E.dataTransfer.getData("text/plain"),
-X,m,!0))}}E.stopPropagation();E.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();B=mxUtils.bind(this,function(){e.refresh();e.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",B);this.addListener("sketchModeChanged",B);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.refresh()}));e.addListener("enabledChanged",mxUtils.bind(this,
+"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)})),B.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(F,K){0<this.editor.graph.getSelectionCount()?(F=this.editor.graph.getSelectionCell(),
+F=this.editor.graph.getModel().getStyle(F),this.styleInput.value=F||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var J=this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==this.styleInput?!0:J.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var M=null;mxEvent.addListener(e.container,"dragleave",function(F){e.isEnabled()&&
+(null!=M&&(M.parentNode.removeChild(M),M=null),F.stopPropagation(),F.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(F){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();F.stopPropagation();F.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(F){null!=M&&(M.parentNode.removeChild(M),M=null);if(e.isEnabled()){var K=mxUtils.convertPoint(e.container,
+mxEvent.getClientX(F),mxEvent.getClientY(F)),P=F.dataTransfer.files,R=e.view.translate,V=e.view.scale,X=K.x/V-R.x,m=K.y/V-R.y;if(0<P.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(F)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(P,!0)):(mxEvent.isAltDown(F)&&(m=X=null),this.importFiles(P,X,m,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(F),null,null,mxEvent.isShiftDown(F),F));else{mxEvent.isAltDown(F)&&(m=X=0);var z=0<=mxUtils.indexOf(F.dataTransfer.types,
+"text/uri-list")?F.dataTransfer.getData("text/uri-list"):null;K=this.extractGraphModelFromEvent(F,null!=this.pages);if(null!=K)e.setSelectionCells(this.importXml(K,X,m,!0));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/html")){var L=F.dataTransfer.getData("text/html");K=document.createElement("div");K.innerHTML=e.sanitizeHtml(L);var Q=null;P=K.getElementsByTagName("img");null!=P&&1==P.length?(L=P[0].getAttribute("src"),null==L&&(L=P[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(L)||
+(Q=!0)):(P=K.getElementsByTagName("a"),null!=P&&1==P.length?L=P[0].getAttribute("href"):(K=K.getElementsByTagName("pre"),null!=K&&1==K.length&&(L=mxUtils.getTextContent(K[0]))));var N=!0,T=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(L,X,m,!0,Q,null,N,mxEvent.isControlDown(F)))});Q&&null!=L&&L.length>this.resampleThreshold?this.confirmImageResize(function(S){N=S;T()},mxEvent.isControlDown(F)):T()}else null!=z&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(z)?this.loadImage(decodeURIComponent(z),
+mxUtils.bind(this,function(S){var W=Math.max(1,S.width);S=Math.max(1,S.height);var Z=this.maxImageSize;Z=Math.min(1,Math.min(Z/Math.max(1,W)),Z/Math.max(1,S));e.setSelectionCell(e.insertVertex(null,null,"",X,m,W*Z,S*Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+z+";"))}),mxUtils.bind(this,function(S){e.setSelectionCells(this.insertTextAt(z,X,m,!0))})):0<=mxUtils.indexOf(F.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(F.dataTransfer.getData("text/plain"),
+X,m,!0))}}F.stopPropagation();F.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();B=mxUtils.bind(this,function(){e.refresh();e.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",B);this.addListener("sketchModeChanged",B);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.refresh()}));e.addListener("enabledChanged",mxUtils.bind(this,
function(){e.isEnabled()||this.hideShapePicker()}));"simple"==Editor.currentTheme&&(Editor.currentTheme="",this.doSetCurrentTheme("simple",0));mxClient.IS_IE||mxClient.IS_IE11||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(B=!1,this.isSettingsEnabled()&&(B="auto"==mxSettings.settings.darkMode||"auto"==urlParams.dark?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches:!0===mxSettings.settings.darkMode),(B||"dark"==uiTheme||"1"==
-urlParams.dark)&&this.setDarkMode(!0));this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,n=!1,p=0;p<g.types.length;p++)if("text/"===g.types[p].substring(0,5)){n=!0;break}if(!n){var v=g.items;for(index in v){var y=v[index];if("file"===y.kind){if(c.isEditing())this.importFiles([y.getAsFile()],
-0,0,this.maxImageSize,function(D,A,U,l,q,B){c.insertImage(D,q,B)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var A=0;A<D.length;A++)D[A]()});else{var u=this.editor.graph.getInsertPoint();this.importFiles([y.getAsFile()],u.x,u.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},
-0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex=
-"-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(v){var y=mxEvent.getSource(v);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==y.nodeName||"TEXTAREA"==y.nodeName||
-224!=v.keyCode&&(mxClient.IS_MAC||17!=v.keyCode)&&(!mxClient.IS_MAC||91!=v.keyCode&&93!=v.keyCode)||n||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",v=e.container.scrollLeft,y=e.container.scrollTop,e.container.appendChild(g),n=!0,g.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=v,e.container.scrollTop=y)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(v){var y=v.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||
-224!=y&&17!=y&&91!=y&&93!=y||(n=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(v){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g),c()}catch(y){this.handleError(y)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(v){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(g,!0),c()}catch(y){this.handleError(y)}}));
-mxEvent.addListener(g,"paste",mxUtils.bind(this,function(v){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=v.clipboardData&&this.pasteCells(v,g,!0,!0),!mxEvent.isConsumed(v))){var y=e.container.scrollLeft,u=e.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){e.container.scrollLeft=y;e.container.scrollTop=u;this.pasteCells(v,g,!1,!0)}),0)}}),!0);var p=this.isSelectionAllowed;this.isSelectionAllowed=function(v){return mxEvent.getSource(v)==
-g?!0:p.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);(e=this.doSetCurrentTheme(c)||e)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(c,e){function g(l){return""==l||"dark"==l||"kennedy"==l||null==l}var n=Editor.currentTheme;c=g(c)?"default":c;n=g(n)?"default":n;var p="simple"==n&&"default"==c||"default"==n&&"simple"==c;if(p&&!this.themeSwitching){Editor.currentTheme=c;this.themeSwitching=!0;var v=
-this.editor.graph.view.translate,y=v.x,u=v.y,D=mxUtils.getOffset(this.editor.graph.container),A=this.editor.graph.container.scrollLeft-D.x,U=this.editor.graph.container.scrollTop-D.y;e=null!=e?e:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+e+"ms");0==e&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"simple"==n&&"default"==c?(this.sidebarFooterContainer.style.display=
+urlParams.dark)&&this.setDarkMode(!0));this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var f=e.clipboardData||e.originalEvent.clipboardData,n=!1,p=0;p<f.types.length;p++)if("text/"===f.types[p].substring(0,5)){n=!0;break}if(!n){var t=f.items;for(index in t){var y=t[index];if("file"===y.kind){if(c.isEditing())this.importFiles([y.getAsFile()],
+0,0,this.maxImageSize,function(D,A,U,l,u,B){c.insertImage(D,u,B)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var A=0;A<D.length;A++)D[A]()});else{var v=this.editor.graph.getInsertPoint();this.importFiles([y.getAsFile()],v.x,v.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){f.innerHTML="&nbsp;";f.focus();document.execCommand("selectAll",!1,null)},
+0)}var e=this.editor.graph,f=document.createElement("div");f.setAttribute("autocomplete","off");f.setAttribute("autocorrect","off");f.setAttribute("autocapitalize","off");f.setAttribute("spellcheck","false");f.style.textRendering="optimizeSpeed";f.style.fontFamily="monospace";f.style.wordBreak="break-all";f.style.background="transparent";f.style.color="transparent";f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.style.fontSize="1";f.style.zIndex=
+"-1";f.style.resize="none";f.style.outline="none";f.style.width="1px";f.style.height="1px";mxUtils.setOpacity(f,0);f.contentEditable=!0;f.innerHTML="&nbsp;";var n=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(t){var y=mxEvent.getSource(t);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==y.nodeName||"TEXTAREA"==y.nodeName||
+224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||n||(f.style.left=e.container.scrollLeft+10+"px",f.style.top=e.container.scrollTop+10+"px",t=e.container.scrollLeft,y=e.container.scrollTop,e.container.appendChild(f),n=!0,f.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=t,e.container.scrollTop=y)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(t){var y=t.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||
+224!=y&&17!=y&&91!=y&&93!=y||(n=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),f.parentNode.removeChild(f),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(t){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(f),c()}catch(y){this.handleError(y)}}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(t){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(f,!0),c()}catch(y){this.handleError(y)}}));
+mxEvent.addListener(f,"paste",mxUtils.bind(this,function(t){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(f.innerHTML="&nbsp;",f.focus(),null!=t.clipboardData&&this.pasteCells(t,f,!0,!0),!mxEvent.isConsumed(t))){var y=e.container.scrollLeft,v=e.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){e.container.scrollLeft=y;e.container.scrollTop=v;this.pasteCells(t,f,!1,!0)}),0)}}),!0);var p=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==
+f?!0:p.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);(e=this.doSetCurrentTheme(c)||e)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(c,e){function f(l){return""==l||"dark"==l||"kennedy"==l||null==l}var n=Editor.currentTheme;c=f(c)?"default":c;n=f(n)?"default":n;var p="simple"==n&&"default"==c||"default"==n&&"simple"==c;if(p&&!this.themeSwitching){Editor.currentTheme=c;this.themeSwitching=!0;var t=
+this.editor.graph.view.translate,y=t.x,v=t.y,D=mxUtils.getOffset(this.editor.graph.container),A=this.editor.graph.container.scrollLeft-D.x,U=this.editor.graph.container.scrollTop-D.y;e=null!=e?e:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+e+"ms");0==e&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"simple"==n&&"default"==c?(this.sidebarFooterContainer.style.display=
"block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==n&&"simple"==c&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display=
-"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(c);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();var l=this.editor.graph.view.scale;D=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=A+D.x+(v.x-y)*l;this.editor.graph.container.scrollTop=U+D.y+(v.y-u)*l;
-this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),e)}),e)}),e)}),0)}return p};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var e=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-block")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,
-function(){e||(this.statusContainer.style.display="none")}));var g=mxUtils.bind(this,function(){if("simple"==Editor.currentTheme||"1"==urlParams.sketch){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;e=null!=n&&null!=n.getAttribute("class");if(!e&&null!=n){n=n.getAttribute("title");var p=this.getCurrentFile();p=null!=p?p.savingStatusKey:DrawioFile.prototype.savingStatusKey;n==mxResources.get(p)+"..."&&
-(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(p))+'..."src="'+Editor.tailSpin+'"></div>',e=!0)}this.statusContainer.style.display="none";n=26>c.clientWidth;c.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||e)this.statusContainer.style.display="inline-block",e=!0}});this.editor.addListener("statusChanged",g);g()};EditorUi.prototype.switchTheme=function(c){"default"==c&&(null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex=
-"1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer)),this.toggleCompactMode(!0));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();
-this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createPickerMenuForTheme(c);this.createMainMenuForTheme(c);this.createMenubarForTheme(c);this.createFooterMenuForTheme(c);this.sidebarContainer.style.display="";"simple"==c&&(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),
-this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%");null!=this.format&&(c="default"==c||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=
-this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&
-(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(c){var e=this.editor.graph;e.defaultEdgeLength=Graph.prototype.defaultEdgeLength;e.defaultGridEnabled=Graph.prototype.defaultGridEnabled;e.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c);"simple"==c?(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,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),e.defaultEdgeLength=120,null==urlParams.grid&&(e.defaultGridEnabled=
-!1),null==urlParams.pv&&(e.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(c){"simple"==c?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=
-Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(c){"simple"==c?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),
-this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(c){"simple"==c&&null==this.sketchMainMenuElt&&(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText=
-"position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",
-Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(c){if("simple"==c&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
-c=this.sketchFooterMenuElt;var e=this.createPageMenuTab(!1,!0);e.className="geToolbarButton";e.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";c.appendChild(e);var g=mxUtils.bind(this,function(){e.innerText="";if(null!=this.currentPage){mxUtils.write(e,this.currentPage.getName());var n=null!=this.pages?this.pages.length:1,p=this.getPageIndex(this.currentPage);p=null!=p?p+1:1;var v=this.currentPage.getId();
-e.setAttribute("title",this.currentPage.getName()+" ("+p+"/"+n+")"+(null!=v?" ["+v+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){e.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
-g);this.editor.addListener("pagesPatched",g);g();c.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));g=this.createMenu("viewZoom");g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";c.appendChild(g);mxUtils.bind(this,function(n){mxEvent.addListener(n,"click",
-mxUtils.bind(this,function(v){mxEvent.isAltDown(v)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(v)):mxEvent.isShiftDown(v)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(v))}));var p=mxUtils.bind(this,function(){n.innerText="";mxUtils.write(n,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,p);this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",
-p)})(g);c.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(c){if("simple"==c&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
-var e=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(e.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var n=this.createMenuItem("insertFreehand",Editor.freehandImage,
-!0);n.style.paddingLeft="12px";n.style.backgroundSize="";n.style.width="26px";n.style.height="30px";n.style.opacity="0.7";var p=this.createMenu("insert",Editor.shapesImage);p.style.backgroundSize="";p.style.marginBottom="4px";p.style.display="block";p.style.width="30px";p.style.height="30px";p.style.padding="4px";p.style.opacity="0.7";var v=!1,y=mxUtils.bind(this,function(){e.innerText="";if(!v){var u=function(A,U,l,q){null!=U&&A.setAttribute("title",U);A.style.cursor="pointer";A.style.margin="8px 0px";
-A.style.display="block";e.appendChild(A);null!=q&&(A.style.position="relative",A.style.overflow="visible",U=document.createElement("div"),U.style.position="absolute",U.style.fontSize="8px",U.style.left="32px",U.style.top="28px",mxUtils.write(U,q),A.appendChild(U));return A};u(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
-" (A)",null,"A");u(this.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")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");u(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
-!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");u(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var D=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");D.geometry.setTerminalPoint(new mxPoint(0,0),!0);D.geometry.setTerminalPoint(new mxPoint(D.geometry.width,0),!1);D.geometry.points=
-[];D.geometry.relative=!0;D.edge=!0;u(this.sidebar.createEdgeTemplateFromCells([D],D.geometry.width,D.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");D=D.clone();D.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";D.geometry.width=this.editor.graph.defaultEdgeLength+20;D.geometry.setTerminalPoint(new mxPoint(0,20),!0);D.geometry.setTerminalPoint(new mxPoint(D.geometry.width,20),!1);
-u(this.sidebar.createEdgeTemplateFromCells([D],D.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));u(n,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(p)}"1"!=urlParams.embedInline&&e.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){v?(mxUtils.setPrefixedStyle(e.style,"transform","translate(0, -50%)"),e.style.padding="8px 6px 4px",e.style.width="40px",e.style.top="50%",e.style.bottom="",e.style.height="",
-g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",v=!1,y()):(e.innerText="",e.appendChild(g),mxUtils.setPrefixedStyle(e.style,"transform","translate(0, 0)"),e.style.bottom="12px",e.style.padding="0px",e.style.height="24px",e.style.width="24px",e.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",v=!0)}));this.addListener("darkModeChanged",
+"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(c);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var l=this.editor.graph.view.scale;D=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=A+D.x+(t.x-y)*l;this.editor.graph.container.scrollTop=U+D.y+(t.y-v)*l;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),e)}),e)}),e)}),0)}return p};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var e=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-block")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){e||(this.statusContainer.style.display="none")}));
+var f=mxUtils.bind(this,function(){if("simple"==Editor.currentTheme||"1"==urlParams.sketch){var n=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;e=null!=n&&null!=n.getAttribute("class");if(!e&&null!=n){n=n.getAttribute("title");var p=this.getCurrentFile();p=null!=p?p.savingStatusKey:DrawioFile.prototype.savingStatusKey;n==mxResources.get(p)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(p))+
+'..."src="'+Editor.tailSpin+'"></div>',e=!0)}this.statusContainer.style.display="none";n=26>c.clientWidth;c.style.visibility=n&&""==this.editor.getStatus()?"hidden":"";if(n||e)this.statusContainer.style.display="inline-block",e=!0}});this.editor.addListener("statusChanged",f);f()};EditorUi.prototype.switchTheme=function(c){"default"==c&&(null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&
+this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer)),this.toggleCompactMode(!0));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);
+this.createPickerMenuForTheme(c);this.createMainMenuForTheme(c);this.createMenubarForTheme(c);this.createFooterMenuForTheme(c);this.sidebarContainer.style.display="";"simple"==c&&(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom=
+"63px",this.sidebarContainer.style.width="100%");null!=this.format&&(c="default"==c||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&
+(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),
+this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(c){var e=this.editor.graph;e.defaultEdgeLength=Graph.prototype.defaultEdgeLength;e.defaultGridEnabled=Graph.prototype.defaultGridEnabled;e.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c);"simple"==c?(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,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),e.defaultEdgeLength=120,null==urlParams.grid&&(e.defaultGridEnabled=!1),null==urlParams.pv&&(e.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=
+mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(c){"simple"==c?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),
+this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(c){"simple"==c?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,
+this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(c){"simple"==c&&null==this.sketchMainMenuElt&&(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(c){if("simple"==c&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=
+document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";c=this.sketchFooterMenuElt;var e=this.createPageMenuTab(!1,!0);e.className="geToolbarButton";e.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";
+c.appendChild(e);var f=mxUtils.bind(this,function(){e.innerText="";if(null!=this.currentPage){mxUtils.write(e,this.currentPage.getName());var n=null!=this.pages?this.pages.length:1,p=this.getPageIndex(this.currentPage);p=null!=p?p+1:1;var t=this.currentPage.getId();e.setAttribute("title",this.currentPage.getName()+" ("+p+"/"+n+")"+(null!=t?" ["+t+"]":""))}});this.editor.addListener("pagesPatched",f);this.editor.addListener("pageSelected",f);this.editor.addListener("pageRenamed",f);this.editor.addListener("fileLoaded",
+f);f();f=mxUtils.bind(this,function(){e.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",f);this.addListener("pagesVisibleChanged",f);this.editor.addListener("pagesPatched",f);f();c.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));f=this.createMenu("viewZoom");f.setAttribute("title",mxResources.get("zoom"));f.innerHTML="100%";f.className="geToolbarButton";f.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";
+c.appendChild(f);mxUtils.bind(this,function(n){mxEvent.addListener(n,"click",mxUtils.bind(this,function(t){mxEvent.isAltDown(t)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(t)):mxEvent.isShiftDown(t)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(t))}));var p=mxUtils.bind(this,function(){n.innerText="";mxUtils.write(n,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,p);this.editor.addListener("resetGraphView",
+p);this.editor.addListener("pageSelected",p)})(f);c.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(c){if("simple"==c&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;max-height:100%;width:48px;z-index:1;box-sizing:border-box;transform:translate(0, -50%);top:50%;user-select:none;";
+var e=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(e.style,"transition","transform .3s ease-out");var f=document.createElement("a");f.style.padding="0px";f.style.boxShadow="none";f.className="geMenuItem";f.style.display="block";f.style.width="100%";f.style.height="14px";f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";f.style.backgroundPosition="top center";f.style.backgroundRepeat="no-repeat";f.setAttribute("title","Minimize");var n=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);n.style.paddingLeft="12px";n.style.backgroundSize="";n.style.width="26px";n.style.height="30px";n.style.opacity="0.7";var p=this.createMenu("insert",Editor.shapesImage);p.style.backgroundSize="";p.style.marginBottom="4px";p.style.display="block";p.style.width="30px";p.style.height="30px";p.style.padding="4px";p.style.opacity="0.7";var t=!1,y=mxUtils.bind(this,function(){e.innerText="";if(!t){var v=function(A,U,l,u){null!=U&&A.setAttribute("title",U);A.style.cursor="pointer";A.style.margin="8px 0px";
+A.style.display="block";e.appendChild(A);null!=u&&(A.style.position="relative",A.style.overflow="visible",U=document.createElement("div"),U.style.position="absolute",U.style.fontSize="8px",U.style.left="32px",U.style.top="28px",mxUtils.write(U,u),A.appendChild(U));return A};v(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+" (A)",null,"A");v(this.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")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");v(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
+!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");v(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var D=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");D.geometry.setTerminalPoint(new mxPoint(0,0),!0);D.geometry.setTerminalPoint(new mxPoint(D.geometry.width,0),!1);D.geometry.points=
+[];D.geometry.relative=!0;D.edge=!0;v(this.sidebar.createEdgeTemplateFromCells([D],D.geometry.width,D.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");D=D.clone();D.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";D.geometry.width=this.editor.graph.defaultEdgeLength+20;D.geometry.setTerminalPoint(new mxPoint(0,20),!0);D.geometry.setTerminalPoint(new mxPoint(D.geometry.width,20),!1);
+v(this.sidebar.createEdgeTemplateFromCells([D],D.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));v(n,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(p)}"1"!=urlParams.embedInline&&e.appendChild(f)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(){t?(mxUtils.setPrefixedStyle(e.style,"transform","translate(0, -50%)"),e.style.padding="8px 6px 4px",e.style.width="48px",e.style.top="50%",e.style.bottom="",e.style.height="",
+f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",f.setAttribute("title","Minimize"),f.style.width="100%",f.style.height="14px",t=!1,y()):(e.innerText="",e.appendChild(f),mxUtils.setPrefixedStyle(e.style,"transform","translate(0, 0)"),e.style.width="auto",e.style.bottom="12px",e.style.padding="0px",e.style.top="",f.style.backgroundImage="url("+Editor.plusImage+")",f.setAttribute("title",mxResources.get("insert")),f.style.width="24px",f.style.height="24px",t=!0)}));this.addListener("darkModeChanged",
y);this.addListener("sketchModeChanged",y);y();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(c){"simple"==c?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="display:flex;position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;flex-wrap:nowrap;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;max-width:calc(100% - 170px);min-width:40px;justify-content:flex-end;align-items:center;",
-this.sketchWrapperElt.appendChild(this.sketchMenubarElt),"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&this.installStatusMinimizer(this.sketchMenubarElt)),null!=this.statusContainer&&(this.statusContainer.style.flexShrink="1",this.statusContainer.style.overflow="hidden",this.sketchMenubarElt.appendChild(this.statusContainer)),null!=this.userElement&&(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement)),c=this.menubar.langIcon,
-null!=c&&(c.style.position="",c.style.height="21px",c.style.width="21px",c.style.flexShrink="0",this.sketchMenubarElt.appendChild(c)),null!=this.buttonContainer&&(this.buttonContainer.style.flexShrink="0",this.buttonContainer.style.padding="0px",this.buttonContainer.style.position="",this.sketchMenubarElt.appendChild(this.buttonContainer))):(null!=this.statusContainer&&(this.menubar.container.appendChild(this.statusContainer),this.statusContainer.style.flexShrink="",this.statusContainer.style.overflow=
-""),null!=this.userElement&&(this.userElement.style.flexShrink="",this.userElement.style.top="3px",this.menubarContainer.appendChild(this.userElement)),c=this.menubar.langIcon,null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.flexShrink="",this.menubarContainer.parentNode.insertBefore(c,this.menubarContainer)))};EditorUi.prototype.createMenu=function(c,e){var g=this.menus.get(c),n=this.menubar.addMenu(mxResources.get(c),g.funct);n.className="geToolbarButton";
-n.style.display="inline-block";n.style.cursor="pointer";n.style.height="24px";n.setAttribute("title",mxResources.get(c));this.menus.menuCreated(g,n,"geToolbarButton");null!=e&&(n.style.backgroundImage="url("+e+")",n.style.backgroundPosition="center center",n.style.backgroundRepeat="no-repeat",n.style.backgroundSize="100% 100%",n.style.width="24px",n.innerText="");return n};EditorUi.prototype.createMenuItem=function(c,e,g){var n=document.createElement("a");n.className="geToolbarButton";n.setAttribute("title",
-mxResources.get(c));n.style.backgroundImage="url("+e+")";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";n.style.backgroundSize="100% 100%";n.style.display="inline-block";n.style.cursor="pointer";n.style.marginLeft="6px";n.style.width="24px";n.style.height="24px";var p=this.actions.get(c);null!=p&&(mxEvent.addListener(n,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(v){v.preventDefault()})),mxEvent.addListener(n,"click",function(v){"disabled"!=
-n.getAttribute("disabled")&&p.funct(v);mxEvent.consume(v)}),g||(c=function(){p.isEnabled()?(n.removeAttribute("disabled"),n.style.cursor="pointer"):(n.setAttribute("disabled","disabled"),n.style.cursor="default");n.style.opacity=p.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",c),p.addListener("stateChanged",c),c()));return n};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),e="1"==
-urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,e,240,g,mxUtils.bind(this,function(n){n.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};
-var x=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var e=this.formatWindow;null!=e?e.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):x.apply(this,arguments)};var C=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():C.apply(this,arguments)};var G=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=
-this.sketchWrapperElt.parentNode){c=null!=c?c:!0;var e=this.getDiagramContainerOffset();this.diagramContainer.style.left=e.x+"px";this.diagramContainer.style.top=e.y+"px";this.diagramContainer.style.right="0";this.diagramContainer.style.bottom="0";c&&this.editor.graph.sizeDidChange()}else G.apply(this,arguments)};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),e="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
-650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?66:10,"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-e)/2):56,c-6,e-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
-0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+
-(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
-"html > body > div > .geToolbarContainer { box-shadow:0px 2px 10px #e0e0e0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt),c=mxUtils.bind(this,function(){var e=58>this.sketchPickerMenuElt.offsetTop-this.sketchPickerMenuElt.offsetHeight/2;this.sketchMainMenuElt.style.left=e?"70px":"10px";this.sketchMenubarElt.style.maxWidth=e?"calc(100% - 230px)":"calc(100% - 170px)"}),c(),mxEvent.addListener(window,"resize",c)),null!=this.statusContainer&&(this.statusContainer.style.flexShrink="1",this.sketchMenubarElt.appendChild(this.statusContainer)),null!=this.userElement&&
+(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement)),c=this.menubar.langIcon,null!=c&&(c.style.position="",c.style.height="21px",c.style.width="21px",c.style.flexShrink="0",this.sketchMenubarElt.appendChild(c)),null!=this.buttonContainer&&(this.buttonContainer.style.flexShrink="0",this.buttonContainer.style.padding="0px",this.buttonContainer.style.position="",this.sketchMenubarElt.appendChild(this.buttonContainer))):(null!=this.statusContainer&&
+(this.menubar.container.appendChild(this.statusContainer),this.statusContainer.style.flexShrink="",this.statusContainer.style.overflow=""),null!=this.userElement&&(this.userElement.style.flexShrink="",this.userElement.style.top="3px",this.menubarContainer.appendChild(this.userElement)),c=this.menubar.langIcon,null!=c&&(c.style.position="absolute",c.style.height="18px",c.style.width="18px",c.style.flexShrink="",this.menubarContainer.parentNode.insertBefore(c,this.menubarContainer)))};EditorUi.prototype.createMenu=
+function(c,e,f){f=null!=f?f:"geToolbarButton";var n=this.menus.get(c),p=this.menubar.addMenu(mxResources.get(c),n.funct);p.className=f;p.style.display="inline-block";p.style.cursor="pointer";p.style.height="24px";p.setAttribute("title",mxResources.get(c));this.menus.menuCreated(n,p,f);null!=e&&(p.style.backgroundImage="url("+e+")",p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="100% 100%",p.style.width="24px",p.innerText="");return p};EditorUi.prototype.createToolbarButton=
+function(c,e,f,n){n=null!=n?n:24;var p=document.createElement("a");p.className="geToolbarButton geAdaptiveAsset";p.setAttribute("title",e);p.style.backgroundImage="url("+c+")";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";p.style.backgroundSize="100% 100%";p.style.display="inline-block";p.style.cursor="pointer";p.style.marginLeft="6px";p.style.width=n+"px";p.style.height=n+"px";null!=f&&(mxEvent.addListener(p,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
+function(t){t.preventDefault()})),mxEvent.addListener(p,"click",function(t){"disabled"!=p.getAttribute("disabled")&&f(t);mxEvent.consume(t)}));return p};EditorUi.prototype.createMenuItem=function(c,e,f){var n=this.actions.get(c),p=null!=n?n.funct:null,t=this.createToolbarButton(e,mxResources.get(c),p);null==n||f||(c=function(){n.isEnabled()?(t.removeAttribute("disabled"),t.style.cursor="pointer"):(t.setAttribute("disabled","disabled"),t.style.cursor="default");t.style.opacity=n.isEnabled()?"":"0.2"},
+this.editor.graph.addListener("enabledChanged",c),n.addListener("stateChanged",c),c());return t};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),e="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,e,240,f,mxUtils.bind(this,
+function(n){n.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};var x=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var e=this.formatWindow;null!=e?e.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):x.apply(this,arguments)};var C=EditorUi.prototype.isFormatPanelVisible;
+EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():C.apply(this,arguments)};var G=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;var e=this.getDiagramContainerOffset();this.diagramContainer.style.left=e.x+"px";this.diagramContainer.style.top=e.y+"px";this.diagramContainer.style.right="0";this.diagramContainer.style.bottom="0";c&&this.editor.graph.sizeDidChange()}else G.apply(this,
+arguments)};EditorUi.prototype.createShapesPanel=function(c){var e=document.createElement("div");e.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;";e.className="geTitle";var f=document.createElement("span");f.style.fontSize="18px";f.style.marginRight="5px";f.innerHTML="+";e.appendChild(f);mxUtils.write(e,mxResources.get("moreShapes"));c.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,
+function(){this.actions.get("shapes").funct()}));f=mxUtils.bind(this,function(n,p){n=this.createMenu(n,null,"geTitle");n.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;";c.appendChild(n);return n});!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?e.style.bottom="0":null!=this.actions.get("newLibrary")?(e=document.createElement("div"),e.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+e.className="geTitle",f=document.createElement("span"),f.style.cssText="position:relative;top:6px;",mxUtils.write(f,mxResources.get("newLibrary")),e.appendChild(f),c.appendChild(e),mxEvent.addListener(e,"click",this.actions.get("newLibrary").funct),e=e.cloneNode(!1),e.style.left="50%",e.style.borderLeft="1px solid lightgray",f=f.cloneNode(!1),mxUtils.write(f,mxResources.get("openLibrary")),e.appendChild(f),c.appendChild(e),mxEvent.addListener(e,"click",this.actions.get("openLibrary").funct)):(e=f("newLibrary",
+mxResources.get("newLibrary")),e.style.boxSizing="border-box",e.style.paddingRight="6px",e.style.paddingLeft="6px",e.style.height="32px",e.style.left="0",e=f("openLibraryFrom",mxResources.get("openLibraryFrom")),e.style.borderLeft="1px solid lightgray",e.style.boxSizing="border-box",e.style.paddingRight="6px",e.style.paddingLeft="6px",e.style.height="32px",e.style.left="50%");c.appendChild(this.sidebarContainer);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==
+this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),e="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?66:10,"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-e)/2):56,c-6,e-6,mxUtils.bind(this,function(f){this.createShapesPanel(f)}));
+this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());
+this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+"html > body > div > .geToolbarContainer { box-shadow:0px 2px 10px #e0e0e0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html body .geStatus > *:not([class]) { vertical-align:top; }html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }html body .geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+
@@ -11809,305 +11822,305 @@ EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(
c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)c.defaultEdgeStyle.fontSize=null,c.defaultVertexStyle.fontSize=
null;else{c.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var e=parseInt(this.menus.defaultFontSize)-4;c.defaultEdgeStyle.fontSize=e}"simple"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing=
"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultVertexStyle.hachureGap="4",c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.jiggle="2",c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.jiggle="2",c.defaultEdgeStyle.hachureGap=
-"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var e=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var g=c.indexOf(",");0<g&&(e=this.getPageById(c.substring(g+1)),e=null!=e?e.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(e=mxResources.get("action"));return e};
+"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var e=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var f=c.indexOf(",");0<f&&(e=this.getPageById(c.substring(f+1)),e=null!=e?e.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(e=mxResources.get("action"));return e};
EditorUi.prototype.handleCustomLink=function(c){if(Graph.isPageLink(c)){var e=c.indexOf(",");if(c=this.getPageById(c.substring(e+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(c)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(c){c.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(c,
e){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(c=e.getProperty("customFonts"),this.menus.customFonts=c,mxSettings.setCustomFonts(c));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(c,e){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,e){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
mxUtils.bind(this,function(c,e){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,e){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
-this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(n,p){try{this.spinner.stop();var v=this.createImageDataUri(n,e,"png"),y=parseInt(p.getAttribute("width")),u=parseInt(p.getAttribute("height"));this.writeImageToClipboard(v,y,u,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,n){var p=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":p,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](n)};EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerText="";else{var n=
-mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),p=mxUtils.getXml(g.encodeCells(n));mxUtils.setTextContent(c,encodeURIComponent(p));e?(g.removeCells(n,!1),g.lastPasteXml=null):(g.lastPasteXml=p,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),
-e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,g,n){var p=this.editor.graph,v=null;p.lastPasteXml==c?p.pasteCounter++:(p.lastPasteXml=c,p.pasteCounter=0);var y=p.pasteCounter*p.gridSize;if(g||this.isCompatibleString(c))v=this.importXml(c,y,y),p.setSelectionCells(v);else if(e&&1==p.getSelectionCount()){y=p.getStartEditingCell(p.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==p.getCurrentCellStyle(y)[mxConstants.STYLE_SHAPE])p.setCellStyles(mxConstants.STYLE_IMAGE,
-c,[y]);else{p.model.beginUpdate();try{p.labelChanged(y,c),Graph.isLink(c)&&p.setLinkForCell(y,c)}finally{p.model.endUpdate()}}p.setSelectionCell(y)}else v=p.getInsertPoint(),p.isMouseInsertPoint()&&(y=0,p.lastPasteXml==c&&0<p.pasteCounter&&p.pasteCounter--),v=this.insertTextAt(c,v.x+y,v.y+y,!0),p.setSelectionCells(v);p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));return v};EditorUi.prototype.pasteCells=
-function(c,e,g,n){if(!mxEvent.isConsumed(c)){var p=e,v=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var y=c.clipboardData.getData("text/plain"),u=!1;if(null!=y&&0<y.length&&"%3CmxGraphModel%3E"==y.substring(0,18))try{var D=decodeURIComponent(y);this.isCompatibleString(D)&&(u=!0,y=D)}catch(J){}u=u?null:c.clipboardData.getData("text/html");null!=u&&0<u.length?(p=this.parseHtmlData(u),v="text/plain"!=p.getAttribute("data-type")):null!=y&&0<y.length&&(p=document.createElement("div"),mxUtils.setTextContent(p,
-u))}y=p.getElementsByTagName("span");if(null!=y&&0<y.length&&"application/vnd.lucid.chart.objects"===y[0].getAttribute("data-lucid-type"))g=y[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(J){var M=this.editor.graph;M.lastPasteXml==J?M.pasteCounter++:(M.lastPasteXml=J,M.pasteCounter=0);var E=M.pasteCounter*M.gridSize;M.setSelectionCells(this.importXml(J,E,E));M.scrollCellToVisible(M.getSelectionCell())}),mxUtils.bind(this,function(J){this.handleError(J)})),
-mxEvent.consume(c));else{var A=v?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText),U=!1;try{var l=A.lastIndexOf("%3E");0<=l&&l<A.length-3&&(A=A.substring(0,l+3))}catch(J){}try{y=p.getElementsByTagName("span"),(D=null!=y&&0<y.length?mxUtils.trim(decodeURIComponent(y[0].textContent)):decodeURIComponent(A))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(U=!0,A=D)}catch(J){}try{if(null!=A&&0<A.length){if(0==A.substring(0,
-20).replace(/\s/g,"").indexOf('{"isProtected":')){var q=mxUtils.bind(this,function(){try{A=(new MiroImporter).importMiroJson(JSON.parse(A)),this.pasteXml(A,n,U,c)}catch(J){console.log("Miro import error:",J)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",q):q()}else this.pasteXml(A,n,U,c);try{mxEvent.consume(c)}catch(J){}}else if(!g){var B=this.editor.graph;B.lastPasteXml=null;B.pasteCounter=0}}catch(J){this.handleError(J)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=
-function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",function(n){null!=e&&(e.parentNode.removeChild(e),e=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(c[g],"drop",
-mxUtils.bind(this,function(n){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,!0);else{var p=this.extractGraphModelFromEvent(n);if(null==p){var v=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=v&&(10==
-document.documentMode||11==document.documentMode?p=v.getData("Text"):(p=null,p=0<=mxUtils.indexOf(v.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(v.types,"text/html")?v.getData("text/html"):null,null!=p&&0<p.length?(v=document.createElement("div"),v.innerHTML=this.editor.graph.sanitizeHtml(p),v=v.getElementsByTagName("img"),0<v.length&&(p=v[0].getAttribute("src"))):0<=mxUtils.indexOf(v.types,"text/plain")&&(p=v.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)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(p))).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()&&this.openLocalFile(y.getText(),null,!0)})):/^https?:\/\//.test(p)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(p):window.openWindow((mxClient.IS_CHROMEAPP?
-EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(p)))))}else this.openLocalFile(p,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var n=document.body;var p=document.documentElement;var v=(n.clientWidth||p.clientWidth)-3;n=Math.max(n.clientHeight||0,p.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,v=c.clientWidth,n=c.clientHeight;p=document.createElement("div");p.style.zIndex=
-mxPopupMenu.prototype.zIndex+2;p.style.border="3px dotted rgb(254, 137, 12)";p.style.pointerEvents="none";p.style.position="absolute";p.style.top=e+"px";p.style.left=g+"px";p.style.width=Math.max(0,v-3)+"px";p.style.height=Math.max(0,n-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(p):document.body.appendChild(p);return p};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=
-[];if(null!=e){var g=new mxCodec(e.ownerDocument),n=new mxGraphModel;g.decode(e,n);e=n.getChildAt(n.getRoot(),0);for(g=0;g<n.getChildCount(e);g++)c.push(n.getChildAt(e,g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,n,p){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var v=mxUtils.bind(this,function(u){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":
-e+".drawio";if("<mxlibrary"==u.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,u,e))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(u,e,n)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,mxUtils.bind(this,function(u){this.spinner.stop();v(u)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,
-mxUtils.bind(this,function(u){this.spinner.stop();v(u)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(u){4==u.readyState&&(this.spinner.stop(),200<=u.status&&299>=u.status?v(u.responseText):this.handleError({message:mxResources.get(413==u.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(u){this.spinner.stop();this.openLocalFile(u,e,n)}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(u){this.handleError(u,
-mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(u){this.spinner.stop();v(u)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,n)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var y=Editor.extractGraphModelFromPdf(c);null!=y&&(p=null,n=!0,c=y)}this.spinner.stop();this.openLocalFile(c,e,n,p,null!=p?g:null)}}};EditorUi.prototype.openFiles=function(c,
-e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(n){var p=new FileReader;p.onload=mxUtils.bind(this,function(v){try{this.openFileHandle(v.target.result,n.name,n,e)}catch(y){this.handleError(y)}});p.onerror=mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v);window.openFile=null});"image"!==n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?p.readAsText(n):p.readAsDataURL(n)})(c[g])};
-EditorUi.prototype.openLocalFile=function(c,e,g,n,p){var v=this.getCurrentFile(),y=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var u=mxUtils.parseXml(c);null!=u&&(this.editor.setGraphXml(u.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,g,n,p))});if(null!=c&&0<c.length)null==v||!v.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?y():(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||null!=n)&&null!=v&&v.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=v&&v.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()})));else throw Error(mxResources.get("notADiagramFile"));
-};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(y){if(null!=y){var u=y.lastIndexOf(".");0<u&&(y=y.substring(u+1,y.length));null==e[y]&&(e[y]=!0)}}var n=this.editor.graph,p=n.getCellStyle(c);
-g(mxStencilRegistry.getBasenameForStencil(p[mxConstants.STYLE_SHAPE]));n.model.isEdge(c)&&(g(mxMarker.getPackageForType(p[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(p[mxConstants.STYLE_ENDARROW])));p=n.model.getChildCount(c);for(var v=0;v<p;v++)this.addBasenamesForCell(n.model.getChildAt(c,v),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=
-c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c?"":"none";this.editor.graph.setEnabled(c);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=c?"":"hidden");c||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),
-null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(e,
-g,n,p){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(p)try{var v=this.editor.graph;v.setGridEnabled(!1);v.pageVisible=!1;var y=v.model.cells,u;for(u in y){var D=y[u];null!=D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(A){console.log(A)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=n?n:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var e=this.editor.graph;
-e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var n=e.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(p){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(p)}),"*")}),null,null,!0,n,1,this.embedExportBorder)}else c||
-g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(c){var e=null,g=!1,n=!1,p=null,v=mxUtils.bind(this,function(D,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,v);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==(window.opener||window.parent)){var A=D.data,U=null,l=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,
-26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(ia){}return Y});if("json"==urlParams.proto){var q=!1;try{A=JSON.parse(A),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[A])}catch(Y){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 B=new FilenameDialog(this,A.defaultValue||"",null!=A.okKey?mxResources.get(A.okKey):A.ok,function(Y){null!=Y?y.postMessage(JSON.stringify({event:"prompt",value:Y,message:A}),"*"):y.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),
-"*")},null!=A.titleKey?mxResources.get(A.titleKey):A.title);this.showDialog(B.container,300,80,!0,!1);B.init();return}if("draft"==A.action){var J=l(A.xml);this.spinner.stop();B=new DraftDialog(this,mxResources.get("draftFound",[A.name||this.defaultFilename]),J,mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"edit",message:A}),"*")}),mxUtils.bind(this,function(){this.hideDialog();y.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();y.postMessage(JSON.stringify({event:"draft",result:"ignore",message:A}),"*")}):null);this.showDialog(B.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{B.init()}catch(Y){y.postMessage(JSON.stringify({event:"draft",error:Y.toString(),message:A}),"*")}return}if("template"==A.action){this.spinner.stop();
-var M=1==A.enableRecent,E=1==A.enableSearch,K=1==A.enableCustomTemp;if("1"==urlParams.newTempDlg&&!A.templatesOnly&&null!=A.callback){var P=this.getCurrentUser(),R=new TemplatesDialog(this,function(Y,ia,da){Y=Y||this.emptyDiagramXml;y.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:ia,tempUrl:da.url,libs:da.libs,builtIn:null!=da.info&&null!=da.info.custContentId,message:A}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=
-P?P.id:null,M?mxUtils.bind(this,function(Y,ia,da){this.remoteInvoke("getRecentDiagrams",[da],null,Y,ia)}):null,E?mxUtils.bind(this,function(Y,ia,da,va){this.remoteInvoke("searchDiagrams",[Y,va],null,ia,da)}):null,mxUtils.bind(this,function(Y,ia,da){this.remoteInvoke("getFileContent",[Y.url],null,ia,da)}),null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,!1,!1,!0,!0);this.showDialog(R.container,window.innerWidth,window.innerHeight,!0,
-!1,null,!1,!0);return}B=new NewDialog(this,!1,A.templatesOnly?!1:null!=A.callback,mxUtils.bind(this,function(Y,ia,da,va){Y=Y||this.emptyDiagramXml;null!=A.callback?y.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:ia,tempUrl:da,libs:va,builtIn:!0,message:A}),"*"):(c(Y,D,Y!=this.emptyDiagramXml,A.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,M?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",
-[null],null,Y,function(){Y(null,"Network Error!")})}):null,E?mxUtils.bind(this,function(Y,ia){this.remoteInvoke("searchDiagrams",[Y,null],null,ia,function(){ia(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,ia,da){y.postMessage(JSON.stringify({event:"template",docUrl:Y,info:ia,name:da}),"*")}),null,null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):null,1==A.withoutType);this.showDialog(B.container,620,460,!0,!1,mxUtils.bind(this,
-function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));B.init();return}if("textContent"==A.action){var V=this.getDiagramTextContent();y.postMessage(JSON.stringify({event:"textContent",data:V,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 X=
-null!=A.messageKey?mxResources.get(A.messageKey):A.message;null==A.show||A.show?this.spinner.spin(document.body,X):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 m=null!=A.xml?A.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var z=this.editor.graph,L=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var ia=this.createLoadMessage("export");ia.format=A.format;ia.message=A;ia.data=Y;ia.xml=m;y.postMessage(JSON.stringify(ia),"*")}),Q=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==A.format&&(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(m)));z!=this.editor.graph&&
-z.container.parentNode.removeChild(z.container);L(Y)}),N=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()!=N){var Y=z.getGlobalVariable;z=this.createTemporaryGraph(z.getStylesheet());for(var ia,da=0;da<this.pages.length;da++)if(this.pages[da].getId()==N){ia=this.updatePageRoot(this.pages[da]);break}null==ia&&(ia=this.currentPage);z.getGlobalVariable=
-function(ta){return"page"==ta?ia.getName():"pagenumber"==ta?1:Y.apply(this,arguments)};document.body.appendChild(z.container);z.model.setRoot(ia.root)}if(null!=A.layerIds){var va=z.model,Aa=va.getChildCells(va.getRoot()),ya={};for(da=0;da<A.layerIds.length;da++)ya[A.layerIds[da]]=!0;for(da=0;da<Aa.length;da++)va.setVisible(Aa[da],ya[Aa[da].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ta){Q(ta.toDataURL("image/png"))}),A.width,null,A.background,mxUtils.bind(this,function(){Q(null)}),
-null,null,A.scale,A.transparent,A.shadow,null,z,A.border,null,A.grid,A.keepTheme)});null!=A.xml&&0<A.xml.length&&(g=!0,this.setFileData(m),g=!1);T()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==A.format?"1":"0")+(null!=N?"&pageId="+N:"")+(null!=A.layerIds&&0<A.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:A.layerIds})):"")+(null!=A.scale?"&scale="+A.scale:"")+"&base64=1&xml="+encodeURIComponent(m))).send(mxUtils.bind(this,function(Y){200<=Y.getStatus()&&
-299>=Y.getStatus()?L("data:image/png;base64,"+Y.getText()):Q(null)}),mxUtils.bind(this,function(){Q(null)}))}}else if(T=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=A;if("html2"==A.format||"html"==A.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ia=this.getXmlFileData();Y.xml=mxUtils.getXml(ia);Y.data=this.getFileData(null,null,!0,null,null,null,ia);Y.format=A.format}else if("html"==A.format)ia=this.editor.getGraphXml(),Y.data=this.getHtml(ia,
-this.editor.graph),Y.xml=mxUtils.getXml(ia),Y.format=A.format;else{mxSvgCanvas2D.prototype.foAltText=null;ia=null!=A.background?A.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var da=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(va);y.postMessage(JSON.stringify(Y),"*")});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(Y.xml,this.editor.graph,null,!0,da,null,null,A.embedImages,ia,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),ia=this.editor.graph.getSvg(ia,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(ia),this.embedFonts(ia,mxUtils.bind(this,function(va){A.embedImages||null==A.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(Aa){da(mxUtils.getXml(Aa))})):da(mxUtils.getXml(va))}));return}y.postMessage(JSON.stringify(Y),"*")}),null!=A.xml&&0<A.xml.length){if(this.editor.graph.mathEnabled){var S=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){S.apply(this,arguments);T()}}g=!0;this.setFileData(A.xml);g=!1;this.editor.graph.mathEnabled||
-T()}else T();return}if("load"==A.action){q=A.toSketch;n=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 W=Editor.sketchMode;this.doSetSketchMode(A.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=A.dark&&this.setDarkMode(A.dark);
-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 Z=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="";U=mxUtils.bind(this,function(){var Y=this.editor.graph,ia=Y.maxFitScale;Y.maxFitScale=A.maxFitScale;Y.fit(2*Z);Y.maxFitScale=ia;Y.container.scrollTop-=2*Z;Y.container.scrollLeft-=2*Z;this.fireEvent(new mxEventObject("editInlineStart","data",[A]))})}null!=A.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=A.noExitBtn);null!=A.title&&null!=this.buttonContainer&&(J=document.createElement("span"),mxUtils.write(J,A.title),null!=this.embedFilenameSpan&&
-this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(J),this.embedFilenameSpan=J);try{A.libs&&this.sidebar.showEntries(A.libs)}catch(Y){}A=null!=A.xmlpng?this.extractGraphModelFromPng(A.xmlpng):null!=A.descriptor?A.descriptor:A.xml}else{if("merge"==A.action){var ba=this.getCurrentFile();null!=ba&&(J=l(A.xml),null!=J&&""!=J&&ba.mergeFile(new LocalFile(this,J),function(){y.postMessage(JSON.stringify({event:"merge",message:A}),"*")},function(Y){y.postMessage(JSON.stringify({event:"merge",
-message:A,error:Y}),"*")}))}else"remoteInvokeReady"==A.action?this.handleRemoteInvokeReady(y):"remoteInvoke"==A.action?this.handleRemoteInvoke(A,D.origin):"remoteInvokeResponse"==A.action?this.handleRemoteInvokeResponse(A):y.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(A)}),"*");return}}catch(Y){this.handleError(Y)}}var aa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),
-fa=mxUtils.bind(this,function(Y,ia){g=!0;try{c(Y,ia,null,q)}catch(da){this.handleError(da)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");p=aa();n&&null==e&&(e=mxUtils.bind(this,function(da,va){da=aa();da==p||g||(va=this.createLoadMessage("autosave"),va.xml=da,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));p=da}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",
-e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ia=this.createLoadMessage("load"),ia.xml=Y,y.postMessage(JSON.stringify(ia),
-"*");null!=U&&U()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==A.substring(0,34)?(l="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(Y){fa(Y,D)},mxUtils.bind(this,function(Y){this.handleError(Y)}),l)):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(Y){4==Y.readyState&&200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)&&fa(Y.responseText,D)}),""):null!=A&&"function"===typeof A.substring&&this.isLucidChartData(A)?this.convertLucidChart(A,mxUtils.bind(this,function(Y){fa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==A||"object"!==typeof A||null==A.format||null==A.data&&null==A.url?(A=l(A),fa(A,D)):this.loadDescriptor(A,mxUtils.bind(this,function(Y){fa(aa(),
-D)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var y=window.opener||window.parent;v="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";y.postMessage(v,"*");if("json"==urlParams.proto){var u=this.editor.graph.openLink;this.editor.graph.openLink=function(D,A,U){u.apply(this,arguments);y.postMessage(JSON.stringify({event:"openLink",href:D,target:A,allowOpener:U}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,e,
-g,n){var p="simple"==Editor.currentTheme||"min"==Editor.currentTheme,v=document.createElement(p?"a":"button");v.setAttribute("title",c+(null!=g?" ("+g+")":""));v.style.marginLeft="6px";mxUtils.write(v,c);p?(v.className="geMenuItem"+(n?" gePrimaryBtn":""),v.style.marginLeft="8px",v.style.padding="6px"):v.className="geBigButton"+(n?"":" geBigStandardButton");mxEvent.addListener(v,"click",e);return v};EditorUi.prototype.addEmbedButtons=function(){if("1"!=urlParams.embedInline){var c=document.createElement("div");
-c.style.display="inline-block";document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,null,!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),this.actions.get("save").funct,Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),
-this.actions.get("saveAndExit").funct)));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"==Editor.currentTheme||"min"==Editor.currentTheme?null!=this.buttonContainer&&(c.style.position="relative","simple"!=Editor.currentTheme&&(c.style.marginRight="4px","1"!=urlParams.sketch?(c.style.marginTop="6px",this.buttonContainer.style.top="6px"):this.buttonContainer.style.top=
-"0px"),this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged"))):null!=this.menubar&&(c.style.position="absolute",c.style.padding="2px",c.style.right="62px",this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c))}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,
-620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(c){var e=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?e():this.spinner.spin(document.body,mxResources.get("loading"))&&
-(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",e)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var g=c.split("\n"),
-n=[],p=[],v=[],y={};if(0<g.length){var u={},D=this.editor.graph,A=null,U=null,l=null,q=null,B=null,J=null,M=null,E="whiteSpace=wrap;html=1;",K=null,P=null,R="",V="auto",X="auto",m=!1,z=null,L=null,Q=40,N=40,T=100,S=0,W=mxUtils.bind(this,function(){null!=e?e(na):(D.setSelectionCells(na),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=D.getFreeInsertPoint(),ba=Z.x,aa=Z.y;Z=aa;var fa=null,Y="auto";
-P=null;for(var ia=[],da=null,va=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){c=g[Aa].replace(/\r$/,"");for(Aa++;Aa<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[Aa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=c.charAt(1)){var ya=c.indexOf(":");if(0<ya){var ta=mxUtils.trim(c.substring(1,ya)),ca=mxUtils.trim(c.substring(ya+1));"label"==ta?fa=D.sanitizeHtml(ca):"labelname"==ta&&0<ca.length&&"-"!=ca?B=ca:"labels"==ta&&0<ca.length&&"-"!=ca?M=JSON.parse(ca):"style"==
-ta?U=ca:"parentstyle"==ta?E=ca:"unknownStyle"==ta&&"-"!=ca?J=ca:"stylename"==ta&&0<ca.length&&"-"!=ca?q=ca:"styles"==ta&&0<ca.length&&"-"!=ca?l=JSON.parse(ca):"vars"==ta&&0<ca.length&&"-"!=ca?A=JSON.parse(ca):"identity"==ta&&0<ca.length&&"-"!=ca?K=ca:"parent"==ta&&0<ca.length&&"-"!=ca?P=ca:"namespace"==ta&&0<ca.length&&"-"!=ca?R=ca:"width"==ta?V=ca:"height"==ta?X=ca:"collapsed"==ta&&"-"!=ca?m="true"==ca:"left"==ta&&0<ca.length?z=ca:"top"==ta&&0<ca.length?L=ca:"ignore"==ta?va=ca.split(","):"connect"==
-ta?ia.push(JSON.parse(ca)):"link"==ta?da=ca:"padding"==ta?S=parseFloat(ca):"edgespacing"==ta?Q=parseFloat(ca):"nodespacing"==ta?N=parseFloat(ca):"levelspacing"==ta?T=parseFloat(ca):"layout"==ta&&(Y=ca)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Pa=this.editor.csvToArray(g[Aa].replace(/\r$/,""));ya=c=null;ta=[];for(ca=0;ca<Pa.length;ca++)K==Pa[ca]&&(c=ca),P==Pa[ca]&&(ya=ca),ta.push(mxUtils.trim(Pa[ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));
-null==fa&&(fa="%"+ta[0]+"%");if(null!=ia)for(var La=0;La<ia.length;La++)null==u[ia[La].to]&&(u[ia[La].to]={});K=[];for(ca=Aa+1;ca<g.length;ca++){var Da=this.editor.csvToArray(g[ca].replace(/\r$/,""));if(null==Da){var Ia=40<g[ca].length?g[ca].substring(0,40)+"...":g[ca];throw Error(Ia+" ("+ca+"):\n"+mxResources.get("containsValidationErrors"));}0<Da.length&&K.push(Da)}D.model.beginUpdate();try{for(ca=0;ca<K.length;ca++){Da=K[ca];var qa=null,Na=null!=c?R+Da[c]:null;g=!1;null!=Na&&(qa=D.model.getCell(Na),
-g=null==qa||0<=mxUtils.indexOf(n,qa));var wa=new mxCell(fa,new mxGeometry(ba,Z,0,0),U||"whiteSpace=wrap;html=1;");wa.collapsed=m;wa.vertex=!0;wa.id=Na;null==qa||g||D.model.setCollapsed(qa,m);for(var ha=0;ha<Da.length;ha++)D.setAttributeForCell(wa,ta[ha],Da[ha]),null==qa||g||D.setAttributeForCell(qa,ta[ha],Da[ha]);if(null!=B&&null!=M){var ea=M[wa.getAttribute(B)];null!=ea&&(D.labelChanged(wa,ea),null==qa||g||D.cellLabelChanged(qa,ea))}if(null!=q&&null!=l){var za=l[wa.getAttribute(q)];null!=za&&(wa.style=
-za)}D.setAttributeForCell(wa,"placeholders","1");wa.style=D.replacePlaceholders(wa,wa.style,A);null==qa||g?D.fireEvent(new mxEventObject("cellsInserted","cells",[wa])):(D.model.setStyle(qa,wa.style),0>mxUtils.indexOf(v,qa)&&v.push(qa),D.fireEvent(new mxEventObject("cellsInserted","cells",[qa])));g=null!=qa;qa=wa;if(!g)for(La=0;La<ia.length;La++)u[ia[La].to][qa.getAttribute(ia[La].to)]=qa;null!=da&&"link"!=da&&(D.setLinkForCell(qa,qa.getAttribute(da)),D.setAttributeForCell(qa,da,null));var ka=this.editor.graph.getPreferredSizeForCell(qa);
-P=null!=ya?D.model.getCell(R+Da[ya]):null;if(qa.vertex){Ia=null!=P?0:ba;Aa=null!=P?0:aa;null!=z&&null!=qa.getAttribute(z)&&(qa.geometry.x=Ia+parseFloat(qa.getAttribute(z)));null!=L&&null!=qa.getAttribute(L)&&(qa.geometry.y=Aa+parseFloat(qa.getAttribute(L)));var oa="@"==V.charAt(0)?qa.getAttribute(V.substring(1)):null;qa.geometry.width=null!=oa&&"auto"!=oa?parseFloat(qa.getAttribute(V.substring(1))):"auto"==V||"auto"==oa?ka.width+S:parseFloat(V);var sa="@"==X.charAt(0)?qa.getAttribute(X.substring(1)):
-null;qa.geometry.height=null!=sa&&"auto"!=sa?parseFloat(sa):"auto"==X||"auto"==sa?ka.height+S:parseFloat(X);Z+=qa.geometry.height+N}g?(null==y[Na]&&(y[Na]=[]),y[Na].push(qa)):(n.push(qa),null!=P?(P.style=D.replacePlaceholders(P,E,A),D.addCell(qa,P),p.push(P)):v.push(D.addCell(qa)))}for(ca=0;ca<p.length;ca++)oa="@"==V.charAt(0)?p[ca].getAttribute(V.substring(1)):null,sa="@"==X.charAt(0)?p[ca].getAttribute(X.substring(1)):null,"auto"!=V&&"auto"!=oa||"auto"!=X&&"auto"!=sa||D.updateGroupBounds([p[ca]],
-S,!0);var ma=v.slice(),na=v.slice();for(La=0;La<ia.length;La++){var Ea=ia[La];for(ca=0;ca<n.length;ca++){qa=n[ca];var ja=mxUtils.bind(this,function(Ga,Ja,Ka){var Oa=Ja.getAttribute(Ka.from);if(null!=Oa&&""!=Oa){Oa=Oa.split(",");for(var Ra=0;Ra<Oa.length;Ra++){var Ua=u[Ka.to][Oa[Ra]];if(null==Ua&&null!=J){Ua=new mxCell(Oa[Ra],new mxGeometry(ba,aa,0,0),J);Ua.style=D.replacePlaceholders(Ja,Ua.style,A);var Ha=this.editor.graph.getPreferredSizeForCell(Ua);Ua.geometry.width=Ha.width+S;Ua.geometry.height=
-Ha.height+S;u[Ka.to][Oa[Ra]]=Ua;Ua.vertex=!0;Ua.id=Oa[Ra];v.push(D.addCell(Ua))}if(null!=Ua){Ha=Ka.label;null!=Ka.fromlabel&&(Ha=(Ja.getAttribute(Ka.fromlabel)||"")+(Ha||""));null!=Ka.sourcelabel&&(Ha=D.replacePlaceholders(Ja,Ka.sourcelabel,A)+(Ha||""));null!=Ka.tolabel&&(Ha=(Ha||"")+(Ua.getAttribute(Ka.tolabel)||""));null!=Ka.targetlabel&&(Ha=(Ha||"")+D.replacePlaceholders(Ua,Ka.targetlabel,A));var Ta="target"==Ka.placeholders==!Ka.invert?Ua:Ga;Ta=null!=Ka.style?D.replacePlaceholders(Ta,Ka.style,
-A):D.createCurrentEdgeStyle();Ha=D.insertEdge(null,null,Ha||"",Ka.invert?Ua:Ga,Ka.invert?Ga:Ua,Ta);if(null!=Ka.labels)for(Ta=0;Ta<Ka.labels.length;Ta++){var Sa=Ka.labels[Ta],Wa=new mxCell(Sa.label||Ta,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Wa.vertex=!0;Wa.connectable=!1;Wa.geometry.relative=!0;null!=Sa.placeholders&&(Wa.value=D.replacePlaceholders("target"==Sa.placeholders==!Ka.invert?Ua:Ga,Wa.value,A));if(null!=Sa.dx||null!=Sa.dy)Wa.geometry.offset=new mxPoint(null!=
-Sa.dx?Sa.dx:0,null!=Sa.dy?Sa.dy:0);Ha.insert(Wa)}na.push(Ha);mxUtils.remove(Ka.invert?Ga:Ua,ma)}}}});ja(qa,qa,Ea);if(null!=y[qa.id])for(ha=0;ha<y[qa.id].length;ha++)ja(qa,y[qa.id][ha],Ea)}}if(null!=va)for(ca=0;ca<n.length;ca++)for(qa=n[ca],ha=0;ha<va.length;ha++)D.setAttributeForCell(qa,mxUtils.trim(va[ha]),null);if(0<v.length){var la=new mxParallelEdgeLayout(D);la.spacing=Q;la.checkOverlap=!0;var pa=function(){0<la.spacing&&la.execute(D.getDefaultParent());for(var Ga=0;Ga<v.length;Ga++){var Ja=D.getCellGeometry(v[Ga]);
-Ja.x=Math.round(D.snap(Ja.x));Ja.y=Math.round(D.snap(Ja.y));"auto"==V&&(Ja.width=Math.round(D.snap(Ja.width)));"auto"==X&&(Ja.height=Math.round(D.snap(Ja.height)))}};if("["==Y.charAt(0)){var xa=W;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(Y)),function(){pa();xa()});W=null}else if("circle"==Y){var Ba=new mxCircleLayout(D);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Fa=Ba.isVertexIgnored;Ba.isVertexIgnored=function(Ga){return Fa.apply(this,arguments)||0>mxUtils.indexOf(v,Ga)};
-this.executeLayout(function(){Ba.execute(D.getDefaultParent());pa()},!0,W);W=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&na.length==2*v.length-1&&1==ma.length){D.view.validate();var Ca=new mxCompactTreeLayout(D,"horizontaltree"==Y);Ca.levelDistance=N;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(D.getDefaultParent(),0<ma.length?ma[0]:null)},!0,W);W=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ma.length){D.view.validate();var ua=
-new mxHierarchicalLayout(D,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ua.intraCellSpacing=N;ua.parallelEdgeSpacing=Q;ua.interRankCellSpacing=T;ua.disableEdgeStyle=!1;this.executeLayout(function(){ua.execute(D.getDefaultParent(),na);D.moveCells(na,ba,aa)},!0,W);W=null}else if("orgchart"==Y){D.view.validate();var ra=new mxOrgChartLayout(D,2,T,N),Ma=ra.isVertexIgnored;ra.isVertexIgnored=function(Ga){return Ma.apply(this,arguments)||0>mxUtils.indexOf(v,Ga)};this.executeLayout(function(){ra.execute(D.getDefaultParent());
-pa()},!0,W);W=null}else if("organic"==Y||"auto"==Y&&na.length>v.length){D.view.validate();var Qa=new mxFastOrganicLayout(D);Qa.forceConstant=3*N;Qa.disableEdgeStyle=!1;Qa.resetEdges=!1;var Va=Qa.isVertexIgnored;Qa.isVertexIgnored=function(Ga){return Va.apply(this,arguments)||0>mxUtils.indexOf(v,Ga)};this.executeLayout(function(){Qa.execute(D.getDefaultParent());pa()},!0,W);W=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=W&&W()}}catch(Ga){this.handleError(Ga)}};EditorUi.prototype.getSearch=
-function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(e+=g+n+"="+urlParams[n],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-n;for(n in urlParams)0>mxUtils.indexOf(g,n)&&(c=0==e?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,n,p){c=new LinkDialog(this,c,e,g,!0,n,p);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
-e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
-this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);
-this.actions.get("resetView").setEnabled(e);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&
-this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var I=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
-function(c){var e=I.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){e.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){e.refresh()}));return e};var F=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){F.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),g=this.getSelectionState(),n=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(n);this.actions.get("autosave").setEnabled(null!=
-e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(n&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(n);
-this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
-this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=
-c&&null!=c.shape&&null!=c.shape.stencil)};var O=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);O.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,n,p,v,y,u){var D=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");
-else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(D.getSvg(n,p,v)),"image/svg+xml");else{var A=c.getFileData(!0,null,null,null,null,!0),U=D.getGraphBounds(),l=Math.floor(U.width*p/D.view.scale),q=Math.floor(U.height*p/D.view.scale);if(A.length<=MAX_REQUEST_SIZE&&l*q<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var B={globalVars:D.getExportVariables()};u&&(B.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});c.saveRequest(e,g,function(J,
-M){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(M||"0")+(null!=J?"&filename="+encodeURIComponent(J):"")+"&extras="+encodeURIComponent(JSON.stringify(B))+(0<y?"&dpi="+y:"")+"&bg="+(null!=n?n:"none")+"&w="+l+"&h="+q+"&border="+v+"&xml="+encodeURIComponent(A))})}else"png"==g?c.exportImage(p,null==n||"none"==n,!0,!1,!1,v,!0,!1,null,u,y):c.exportImage(p,!1,!0,!1,!1,v,!0,!1,"jpeg",u);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
-var c=this.editor.graph,e="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var n=c;this.currentPage!=this.pages[g]&&(n=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),n.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+n.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var n=
-document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(c));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(n);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 v={};try{var y=mxSettings.getCustomLibraries();for(c=0;c<y.length;c++){var u=y[c];if("R"==u.substring(0,1)){var D=JSON.parse(decodeURIComponent(u.substring(1)));
-v[D[0]]={id:D[0],title:D[1],downloadUrl:D[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 U=0;U<A.length;U++){var l=A[U];v[l.id]&&(e[l.id]=l);var q=this.addCheckbox(p,l.title,v[l.id]);(function(B,J){mxEvent.addListener(J,"change",function(){this.checked?e[B.id]=B:delete e[B.id]})})(l,q)}},mxUtils.bind(this,
-function(A){p.innerText="";var U=document.createElement("div");U.style.padding="8px";U.style.textAlign="center";mxUtils.write(U,mxResources.get("error")+": ");mxUtils.write(U,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));p.appendChild(U)}));g.appendChild(p);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var A=0,U;for(U in e)null==v[U]&&(A++,mxUtils.bind(this,function(l){this.remoteInvoke("getFileContent",[l.downloadUrl],
-null,mxUtils.bind(this,function(q){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,q,l))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){A--;0==A&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[U]));for(U in v)e[U]||this.closeLibrary(new RemoteLibrary(this,null,v[U]));0==A&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,
-340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],
-"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,n,p){var v=!0,y=window.setTimeout(mxUtils.bind(this,function(){v=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),u=mxUtils.bind(this,function(){window.clearTimeout(y);v&&n.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(y);v&&p.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:u,error:D});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,
-e){var g=mxUtils.bind(this,function(A,U){var l={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=U?l.error={errResp:U}:null!=A&&(l.resp=A);this.remoteWin.postMessage(JSON.stringify(l),"*")});try{var n=c.funtionName,p=this.remoteInvokableFns[n];if(null!=p&&"function"===typeof this[n]){if(p.allowedDomains){for(var v=!1,y=0;y<p.allowedDomains.length;y++)if(e=="https://"+p.allowedDomains[y]){v=!0;break}if(!v){g(null,"Invalid Call: "+n+" is not allowed.");return}}var u=c.functionArgs;Array.isArray(u)||
-(u=[]);if(p.isAsync)u.push(function(){g(Array.prototype.slice.apply(arguments))}),u.push(function(A){g(null,A||"Unkown Error")}),this[n].apply(this,u);else{var D=this[n].apply(this,u);g([D])}}else g(null,"Invalid Call: "+n+" is not found.")}catch(A){g(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var n=g.open("database",2);n.onupgradeneeded=
-function(p){try{var v=n.result;1>p.oldVersion&&v.createObjectStore("objects",{keyPath:"key"});2>p.oldVersion&&(v.createObjectStore("files",{keyPath:"title"}),v.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(y){null!=e&&e(y)}};n.onsuccess=mxUtils.bind(this,function(p){var v=n.result;this.database=v;EditorUi.migrateStorageFiles&&(StorageFile.migrate(v),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(y){if(!y||"1"==urlParams.forceMigration){var u=document.createElement("iframe");u.style.display="none";u.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(u);var D=!0,A=!1,U,l=0,q=mxUtils.bind(this,function(){A=!0;this.setDatabaseItem(".drawioMigrated3",!0);u.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),B=mxUtils.bind(this,function(){l++;J()}),J=mxUtils.bind(this,function(){try{if(l>=U.length)q();else{var E=U[l];StorageFile.getFileContent(this,E,mxUtils.bind(this,function(K){null==K||".scratchpad"==E&&K==this.emptyLibraryXml?u.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[E]}),"*"):B()}),B)}}catch(K){console.log(K)}}),M=mxUtils.bind(this,function(E){try{this.setDatabaseItem(null,[{title:E.title,
-size:E.data.length,lastModified:Date.now(),type:E.isLib?"L":"F"},{title:E.title,data:E.data}],B,B,["filesInfo","files"])}catch(K){console.log(K)}});y=mxUtils.bind(this,function(E){try{if(E.source==u.contentWindow){var K={};try{K=JSON.parse(E.data)}catch(P){}"init"==K.event?(u.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),u.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=K.event||A||
-(D?null!=K.resp&&0<K.resp.length&&null!=K.resp[0]?(U=K.resp[0],D=!1,J()):q():null!=K.resp&&0<K.resp.length&&null!=K.resp[0]?M(K.resp[0]):B())}}catch(P){console.log(P)}});window.addEventListener("message",y)}})));c(v);v.onversionchange=function(){v.close()}});n.onerror=e;n.onblocked=function(){}}catch(p){null!=e&&e(p)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,n,p){this.openDatabase(mxUtils.bind(this,function(v){try{p=p||"objects";Array.isArray(p)||(p=
-[p],c=[c],e=[e]);var y=v.transaction(p,"readwrite");y.oncomplete=g;y.onerror=n;for(v=0;v<p.length;v++)y.objectStore(p[v]).put(null!=c&&null!=c[v]?{key:c[v],data:e[v]}:e[v])}catch(u){null!=n&&n(u)}}),n)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,n){this.openDatabase(mxUtils.bind(this,function(p){n=n||"objects";Array.isArray(n)||(n=[n],c=[c]);p=p.transaction(n,"readwrite");p.oncomplete=e;p.onerror=g;for(var v=0;v<n.length;v++)p.objectStore(n[v]).delete(c[v])}),g)};EditorUi.prototype.getDatabaseItem=
-function(c,e,g,n){this.openDatabase(mxUtils.bind(this,function(p){try{n=n||"objects";var v=p.transaction([n],"readonly").objectStore(n).get(c);v.onsuccess=function(){e(v.result)};v.onerror=g}catch(y){null!=g&&g(y)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(n){try{g=g||"objects";var p=n.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),v=[];p.onsuccess=function(y){null==y.target.result?c(v):(v.push(y.target.result.value),
-y.target.result.continue())};p.onerror=e}catch(y){null!=e&&e(y)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(n){try{g=g||"objects";var p=n.transaction([g],"readonly").objectStore(g).getAllKeys();p.onsuccess=function(){c(p.result)};p.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=
-this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,e){var g=this.getCurrentFile();null!=g?g.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,g){var n=this.getCurrentFile();null!=n?n.addComment(c,e,g):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?
-c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var g=this.getCurrentFile();return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=
-g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,n,p,v,y,u){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(c,e,g,n,p,v,y,u)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,n,p,v,y,u,D,A,U,l,q,B,J,M){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,n,p,v,y,u,D,A,U,l,q,B,J,M)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
-return this.editor.convertImages(c,e,g,n)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,g,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
-return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,n,p){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,g,n,p)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),n=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<n.length){var p=
-"<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(p||n)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,f,k,d,t,x){function C(){for(var B=y.getElementsByTagName("div"),J=0,M=0;M<B.length;M++)"none"!=B[M].style.display&&B[M].parentNode==y&&J++;u.style.display=0==J?"block":"none"}function G(B,J,M,E){function K(){J.removeChild(V);J.removeChild(X);R.style.display="block";P.style.display="block"}n={div:J,comment:B,saveCallback:M,deleteOnCancel:E};var P=J.querySelector(".geCommentTxt"),R=J.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
-"geCommentEditTxtArea";V.style.minHeight=P.offsetHeight+"px";V.value=B.content;J.insertBefore(V,P);var X=document.createElement("div");X.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){E?(J.parentNode.removeChild(J),C()):K();n=null});m.className="geCommentEditBtn";X.appendChild(m);var z=mxUtils.button(mxResources.get("save"),function(){P.innerText="";B.content=V.value;mxUtils.write(P,B.content);K();M(B);n=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,f){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(n,p){try{this.spinner.stop();var t=this.createImageDataUri(n,e,"png"),y=parseInt(p.getAttribute("width")),v=parseInt(p.getAttribute("height"));this.writeImageToClipboard(t,y,v,mxUtils.bind(this,function(D){this.handleError(D)}))}catch(D){this.handleError(D)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,null!=f?f:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(c,e,f,n){var p=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":p,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+f+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](n)};EditorUi.prototype.copyCells=function(c,e){var f=this.editor.graph;if(f.isSelectionEmpty())c.innerText="";else{var n=
+mxUtils.sortCells(f.model.getTopmostCells(f.getSelectionCells())),p=mxUtils.getXml(f.encodeCells(n));mxUtils.setTextContent(c,encodeURIComponent(p));e?(f.removeCells(n,!1),f.lastPasteXml=null):(f.lastPasteXml=p,f.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),
+e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,f,n){var p=this.editor.graph,t=null;p.lastPasteXml==c?p.pasteCounter++:(p.lastPasteXml=c,p.pasteCounter=0);var y=p.pasteCounter*p.gridSize;if(f||this.isCompatibleString(c))t=this.importXml(c,y,y),p.setSelectionCells(t);else if(e&&1==p.getSelectionCount()){y=p.getStartEditingCell(p.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==p.getCurrentCellStyle(y)[mxConstants.STYLE_SHAPE])p.setCellStyles(mxConstants.STYLE_IMAGE,
+c,[y]);else{p.model.beginUpdate();try{p.labelChanged(y,c),Graph.isLink(c)&&p.setLinkForCell(y,c)}finally{p.model.endUpdate()}}p.setSelectionCell(y)}else t=p.getInsertPoint(),p.isMouseInsertPoint()&&(y=0,p.lastPasteXml==c&&0<p.pasteCounter&&p.pasteCounter--),t=this.insertTextAt(c,t.x+y,t.y+y,!0),p.setSelectionCells(t);p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));return t};EditorUi.prototype.pasteCells=
+function(c,e,f,n){if(!mxEvent.isConsumed(c)){var p=e,t=!1;if(f&&null!=c.clipboardData&&c.clipboardData.getData){var y=c.clipboardData.getData("text/plain"),v=!1;if(null!=y&&0<y.length&&"%3CmxGraphModel%3E"==y.substring(0,18))try{var D=decodeURIComponent(y);this.isCompatibleString(D)&&(v=!0,y=D)}catch(J){}v=v?null:c.clipboardData.getData("text/html");null!=v&&0<v.length?(p=this.parseHtmlData(v),t="text/plain"!=p.getAttribute("data-type")):null!=y&&0<y.length&&(p=document.createElement("div"),mxUtils.setTextContent(p,
+v))}y=p.getElementsByTagName("span");if(null!=y&&0<y.length&&"application/vnd.lucid.chart.objects"===y[0].getAttribute("data-lucid-type"))f=y[0].getAttribute("data-lucid-content"),null!=f&&0<f.length&&(this.convertLucidChart(f,mxUtils.bind(this,function(J){var M=this.editor.graph;M.lastPasteXml==J?M.pasteCounter++:(M.lastPasteXml=J,M.pasteCounter=0);var F=M.pasteCounter*M.gridSize;M.setSelectionCells(this.importXml(J,F,F));M.scrollCellToVisible(M.getSelectionCell())}),mxUtils.bind(this,function(J){this.handleError(J)})),
+mxEvent.consume(c));else{var A=t?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText),U=!1;try{var l=A.lastIndexOf("%3E");0<=l&&l<A.length-3&&(A=A.substring(0,l+3))}catch(J){}try{y=p.getElementsByTagName("span"),(D=null!=y&&0<y.length?mxUtils.trim(decodeURIComponent(y[0].textContent)):decodeURIComponent(A))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(U=!0,A=D)}catch(J){}try{if(null!=A&&0<A.length){if(0==A.substring(0,
+20).replace(/\s/g,"").indexOf('{"isProtected":')){var u=mxUtils.bind(this,function(){try{A=(new MiroImporter).importMiroJson(JSON.parse(A)),this.pasteXml(A,n,U,c)}catch(J){console.log("Miro import error:",J)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",u):u()}else this.pasteXml(A,n,U,c);try{mxEvent.consume(c)}catch(J){}}else if(!f){var B=this.editor.graph;B.lastPasteXml=null;B.pasteCounter=0}}catch(J){this.handleError(J)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=
+function(c){if(Graph.fileSupport)for(var e=null,f=0;f<c.length;f++)mxEvent.addListener(c[f],"dragleave",function(n){null!=e&&(e.parentNode.removeChild(e),e=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(c[f],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());n.stopPropagation();n.preventDefault()})),mxEvent.addListener(c[f],"drop",
+mxUtils.bind(this,function(n){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,!0);else{var p=this.extractGraphModelFromEvent(n);if(null==p){var t=null!=n.dataTransfer?n.dataTransfer:n.clipboardData;null!=t&&(10==
+document.documentMode||11==document.documentMode?p=t.getData("Text"):(p=null,p=0<=mxUtils.indexOf(t.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(t.types,"text/html")?t.getData("text/html"):null,null!=p&&0<p.length?(t=document.createElement("div"),t.innerHTML=this.editor.graph.sanitizeHtml(p),t=t.getElementsByTagName("img"),0<t.length&&(p=t[0].getAttribute("src"))):0<=mxUtils.indexOf(t.types,"text/plain")&&(p=t.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)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(p))).send(mxUtils.bind(this,function(y){200<=y.getStatus()&&299>=y.getStatus()?this.openLocalFile(y.getText(),null,!0):this.showError(mxResources.get("error"),413==y.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):
+/^https?:\/\//.test(p)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(p):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(p)))))}else this.openLocalFile(p,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,f=0;if(null==c){var n=document.body;var p=document.documentElement;var t=(n.clientWidth||p.clientWidth)-3;n=Math.max(n.clientHeight||
+0,p.clientHeight)-3}else e=c.offsetTop,f=c.offsetLeft,t=c.clientWidth,n=c.clientHeight;p=document.createElement("div");p.style.zIndex=mxPopupMenu.prototype.zIndex+2;p.style.border="3px dotted rgb(254, 137, 12)";p.style.pointerEvents="none";p.style.position="absolute";p.style.top=e+"px";p.style.left=f+"px";p.style.width=Math.max(0,t-3)+"px";p.style.height=Math.max(0,n-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(p):document.body.appendChild(p);
+return p};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var f=new mxCodec(e.ownerDocument),n=new mxGraphModel;f.decode(e,n);e=n.getChildAt(n.getRoot(),0);for(f=0;f<n.getChildCount(e);f++)c.push(n.getChildAt(e,f))}return c};EditorUi.prototype.openFileHandle=function(c,e,f,n,p){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=
+e.substring(0,e.length-4)+".drawio");var t=mxUtils.bind(this,function(v){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==v.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,v,e))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(v,e,n)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(f,
+mxUtils.bind(this,function(v){this.spinner.stop();t(v)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(v){this.spinner.stop();t(v)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(f,mxUtils.bind(this,function(v){4==v.readyState&&(this.spinner.stop(),200<=v.status&&299>=v.status?t(v.responseText):this.handleError({message:mxResources.get(413==
+v.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(v){this.spinner.stop();this.openLocalFile(v,e,n)}),mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,c,f.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(f,mxUtils.bind(this,function(v){this.spinner.stop();t(v)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,n)}));else{if("image/png"==f.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==f.type){var y=Editor.extractGraphModelFromPdf(c);null!=y&&(p=null,n=!0,
+c=y)}this.spinner.stop();this.openLocalFile(c,e,n,p,null!=p?f:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var f=0;f<c.length;f++)mxUtils.bind(this,function(n){var p=new FileReader;p.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,n.name,n,e)}catch(y){this.handleError(y)}});p.onerror=mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t);window.openFile=null});"image"!==n.type.substring(0,
+5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?p.readAsText(n):p.readAsDataURL(n)})(c[f])};EditorUi.prototype.openLocalFile=function(c,e,f,n,p){var t=this.getCurrentFile(),y=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var v=mxUtils.parseXml(c);null!=v&&(this.editor.setGraphXml(v.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,f,n,p))});if(null!=
+c&&0<c.length)null==t||!t.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?y():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var f in c)e.push(f);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function f(y){if(null!=
+y){var v=y.lastIndexOf(".");0<v&&(y=y.substring(v+1,y.length));null==e[y]&&(e[y]=!0)}}var n=this.editor.graph,p=n.getCellStyle(c);f(mxStencilRegistry.getBasenameForStencil(p[mxConstants.STYLE_SHAPE]));n.model.isEdge(c)&&(f(mxMarker.getPackageForType(p[mxConstants.STYLE_STARTARROW])),f(mxMarker.getPackageForType(p[mxConstants.STYLE_ENDARROW])));p=n.model.getChildCount(c);for(var t=0;t<p;t++)this.addBasenamesForCell(n.model.getChildAt(c,t),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=
+c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c?"":"none";this.editor.graph.setEnabled(c);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=c?"":"hidden");c||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
+null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=
+!1;this.installMessageHandler(mxUtils.bind(this,function(e,f,n,p){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(p)try{var t=this.editor.graph;t.setGridEnabled(!1);t.pageVisible=!1;var y=t.model.cells,v;for(v in y){var D=y[v];null!=D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(A){console.log(A)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=n?n:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
+function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
+scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var e=this.editor.graph;e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var f=window.opener||window.parent;if(this.editor.modified){var n=e.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(p){f.postMessage(JSON.stringify({event:"export",
+point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(p)}),"*")}),null,null,!0,n,1,this.embedExportBorder)}else c||f.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
+function(c){var e=null,f=!1,n=!1,p=null,t=mxUtils.bind(this,function(D,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,t);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==(window.opener||window.parent)){var A=D.data,U=null,l=mxUtils.bind(this,function(Y){if(null!=Y&&"function"===typeof Y.charAt&&
+"<"!=Y.charAt(0))try{Editor.isPngDataUrl(Y)?Y=Editor.extractGraphModelFromPng(Y):"data:image/svg+xml;base64,"==Y.substring(0,26)?Y=atob(Y.substring(26)):"data:image/svg+xml;utf8,"==Y.substring(0,24)&&(Y=Y.substring(24)),null!=Y&&("%"==Y.charAt(0)?Y=decodeURIComponent(Y):"<"!=Y.charAt(0)&&(Y=Graph.decompress(Y)))}catch(ia){}return Y});if("json"==urlParams.proto){var u=!1;try{A=JSON.parse(A),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[A])}catch(Y){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 B=new FilenameDialog(this,A.defaultValue||"",null!=A.okKey?mxResources.get(A.okKey):A.ok,function(Y){null!=
+Y?y.postMessage(JSON.stringify({event:"prompt",value:Y,message:A}),"*"):y.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),"*")},null!=A.titleKey?mxResources.get(A.titleKey):A.title);this.showDialog(B.container,300,80,!0,!1);B.init();return}if("draft"==A.action){var J=l(A.xml);this.spinner.stop();B=new DraftDialog(this,mxResources.get("draftFound",[A.name||this.defaultFilename]),J,mxUtils.bind(this,function(){this.hideDialog();y.postMessage(JSON.stringify({event:"draft",result:"edit",
+message:A}),"*")}),mxUtils.bind(this,function(){this.hideDialog();y.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();y.postMessage(JSON.stringify({event:"draft",result:"ignore",message:A}),"*")}):null);this.showDialog(B.container,640,480,!0,!1,mxUtils.bind(this,function(Y){Y&&this.actions.get("exit").funct()}));try{B.init()}catch(Y){y.postMessage(JSON.stringify({event:"draft",
+error:Y.toString(),message:A}),"*")}return}if("template"==A.action){this.spinner.stop();var M=1==A.enableRecent,F=1==A.enableSearch,K=1==A.enableCustomTemp;if("1"==urlParams.newTempDlg&&!A.templatesOnly&&null!=A.callback){var P=this.getCurrentUser(),R=new TemplatesDialog(this,function(Y,ia,da){Y=Y||this.emptyDiagramXml;y.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:ia,tempUrl:da.url,libs:da.libs,builtIn:null!=da.info&&null!=da.info.custContentId,message:A}),
+"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=P?P.id:null,M?mxUtils.bind(this,function(Y,ia,da){this.remoteInvoke("getRecentDiagrams",[da],null,Y,ia)}):null,F?mxUtils.bind(this,function(Y,ia,da,va){this.remoteInvoke("searchDiagrams",[Y,va],null,ia,da)}):null,mxUtils.bind(this,function(Y,ia,da){this.remoteInvoke("getFileContent",[Y.url],null,ia,da)}),null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},0)})}):
+null,!1,!1,!0,!0);this.showDialog(R.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}B=new NewDialog(this,!1,A.templatesOnly?!1:null!=A.callback,mxUtils.bind(this,function(Y,ia,da,va){Y=Y||this.emptyDiagramXml;null!=A.callback?y.postMessage(JSON.stringify({event:"template",xml:Y,blank:Y==this.emptyDiagramXml,name:ia,tempUrl:da,libs:va,builtIn:!0,message:A}),"*"):(c(Y,D,Y!=this.emptyDiagramXml,A.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,
+null,null,null,M?mxUtils.bind(this,function(Y){this.remoteInvoke("getRecentDiagrams",[null],null,Y,function(){Y(null,"Network Error!")})}):null,F?mxUtils.bind(this,function(Y,ia){this.remoteInvoke("searchDiagrams",[Y,null],null,ia,function(){ia(null,"Network Error!")})}):null,mxUtils.bind(this,function(Y,ia,da){y.postMessage(JSON.stringify({event:"template",docUrl:Y,info:ia,name:da}),"*")}),null,null,K?mxUtils.bind(this,function(Y){this.remoteInvoke("getCustomTemplates",null,null,Y,function(){Y({},
+0)})}):null,1==A.withoutType);this.showDialog(B.container,620,460,!0,!1,mxUtils.bind(this,function(Y){this.sidebar.hideTooltip();Y&&this.actions.get("exit").funct()}));B.init();return}if("textContent"==A.action){var V=this.getDiagramTextContent();y.postMessage(JSON.stringify({event:"textContent",data:V,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 X=null!=A.messageKey?mxResources.get(A.messageKey):A.message;null==A.show||A.show?this.spinner.spin(document.body,X):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 m=null!=A.xml?A.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var z=this.editor.graph,L=mxUtils.bind(this,function(Y){this.editor.graph.setEnabled(!0);this.spinner.stop();var ia=this.createLoadMessage("export");ia.format=A.format;ia.message=A;ia.data=Y;ia.xml=m;y.postMessage(JSON.stringify(ia),"*")}),Q=mxUtils.bind(this,function(Y){null==Y&&(Y=Editor.blankImage);"xmlpng"==A.format&&
+(Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(m)));z!=this.editor.graph&&z.container.parentNode.removeChild(z.container);L(Y)}),N=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()!=N){var Y=z.getGlobalVariable;z=this.createTemporaryGraph(z.getStylesheet());for(var ia,da=0;da<this.pages.length;da++)if(this.pages[da].getId()==
+N){ia=this.updatePageRoot(this.pages[da]);break}null==ia&&(ia=this.currentPage);z.getGlobalVariable=function(ta){return"page"==ta?ia.getName():"pagenumber"==ta?1:Y.apply(this,arguments)};document.body.appendChild(z.container);z.model.setRoot(ia.root)}if(null!=A.layerIds){var va=z.model,Aa=va.getChildCells(va.getRoot()),ya={};for(da=0;da<A.layerIds.length;da++)ya[A.layerIds[da]]=!0;for(da=0;da<Aa.length;da++)va.setVisible(Aa[da],ya[Aa[da].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ta){Q(ta.toDataURL("image/png"))}),
+A.width,null,A.background,mxUtils.bind(this,function(){Q(null)}),null,null,A.scale,A.transparent,A.shadow,null,z,A.border,null,A.grid,A.keepTheme)});null!=A.xml&&0<A.xml.length&&(f=!0,this.setFileData(m),f=!1);T()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==A.format?"1":"0")+(null!=N?"&pageId="+N:"")+(null!=A.layerIds&&0<A.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:A.layerIds})):"")+(null!=A.scale?"&scale="+A.scale:"")+"&base64=1&xml="+encodeURIComponent(m))).send(mxUtils.bind(this,
+function(Y){200<=Y.getStatus()&&299>=Y.getStatus()?L("data:image/png;base64,"+Y.getText()):Q(null)}),mxUtils.bind(this,function(){Q(null)}))}}else if(T=mxUtils.bind(this,function(){var Y=this.createLoadMessage("export");Y.message=A;if("html2"==A.format||"html"==A.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ia=this.getXmlFileData();Y.xml=mxUtils.getXml(ia);Y.data=this.getFileData(null,null,!0,null,null,null,ia);Y.format=A.format}else if("html"==A.format)ia=this.editor.getGraphXml(),
+Y.data=this.getHtml(ia,this.editor.graph),Y.xml=mxUtils.getXml(ia),Y.format=A.format;else{mxSvgCanvas2D.prototype.foAltText=null;ia=null!=A.background?A.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);Y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Y.format="svg";var da=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();Y.data=Editor.createSvgDataUri(va);y.postMessage(JSON.stringify(Y),"*")});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(Y.xml,this.editor.graph,null,!0,da,null,null,A.embedImages,ia,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),ia=this.editor.graph.getSvg(ia,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(ia),this.embedFonts(ia,mxUtils.bind(this,function(va){A.embedImages||null==A.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(Aa){da(mxUtils.getXml(Aa))})):da(mxUtils.getXml(va))}));return}y.postMessage(JSON.stringify(Y),"*")}),null!=A.xml&&0<A.xml.length){if(this.editor.graph.mathEnabled){var S=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){S.apply(this,arguments);T()}}f=!0;this.setFileData(A.xml);
+f=!1;this.editor.graph.mathEnabled||T()}else T();return}if("load"==A.action){u=A.toSketch;n=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 W=Editor.sketchMode;this.doSetSketchMode(A.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
+A.dark&&this.setDarkMode(A.dark);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 Z=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="";U=mxUtils.bind(this,function(){var Y=this.editor.graph,ia=Y.maxFitScale;Y.maxFitScale=A.maxFitScale;Y.fit(2*Z);Y.maxFitScale=ia;Y.container.scrollTop-=2*Z;Y.container.scrollLeft-=2*Z;this.fireEvent(new mxEventObject("editInlineStart","data",[A]))})}null!=A.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=A.noExitBtn);null!=A.title&&null!=this.buttonContainer&&(J=document.createElement("span"),mxUtils.write(J,
+A.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(J),this.embedFilenameSpan=J);try{A.libs&&this.sidebar.showEntries(A.libs)}catch(Y){}A=null!=A.xmlpng?this.extractGraphModelFromPng(A.xmlpng):null!=A.descriptor?A.descriptor:A.xml}else{if("merge"==A.action){var ba=this.getCurrentFile();null!=ba&&(J=l(A.xml),null!=J&&""!=J&&ba.mergeFile(new LocalFile(this,J),function(){y.postMessage(JSON.stringify({event:"merge",
+message:A}),"*")},function(Y){y.postMessage(JSON.stringify({event:"merge",message:A,error:Y}),"*")}))}else"remoteInvokeReady"==A.action?this.handleRemoteInvokeReady(y):"remoteInvoke"==A.action?this.handleRemoteInvoke(A,D.origin):"remoteInvokeResponse"==A.action?this.handleRemoteInvokeResponse(A):y.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(A)}),"*");return}}catch(Y){this.handleError(Y)}}var aa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<
+this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(Y,ia){f=!0;try{c(Y,ia,null,u)}catch(da){this.handleError(da)}f=!1;null!=urlParams.modified&&this.editor.setStatus("");p=aa();n&&null==e&&(e=mxUtils.bind(this,function(da,va){da=aa();da==p||f||(va=this.createLoadMessage("autosave"),va.xml=da,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));p=da}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",
+e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ia=this.createLoadMessage("load"),
+ia.xml=Y,y.postMessage(JSON.stringify(ia),"*");null!=U&&U()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==A.substring(0,34)?(l="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(Y){fa(Y,D)},mxUtils.bind(this,function(Y){this.handleError(Y)}),l)):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(Y){4==Y.readyState&&(200<=Y.status&&299>=Y.status&&"<mxGraphModel"==Y.responseText.substring(0,13)?fa(Y.responseText,D):this.handleError({message:413==Y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=A&&"function"===typeof A.substring&&this.isLucidChartData(A)?this.convertLucidChart(A,mxUtils.bind(this,function(Y){fa(Y)}),mxUtils.bind(this,function(Y){this.handleError(Y)})):null==
+A||"object"!==typeof A||null==A.format||null==A.data&&null==A.url?(A=l(A),fa(A,D)):this.loadDescriptor(A,mxUtils.bind(this,function(Y){fa(aa(),D)}),mxUtils.bind(this,function(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}))}}));var y=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";y.postMessage(t,"*");if("json"==urlParams.proto){var v=this.editor.graph.openLink;this.editor.graph.openLink=function(D,A,U){v.apply(this,arguments);
+y.postMessage(JSON.stringify({event:"openLink",href:D,target:A,allowOpener:U}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,e,f,n){var p="simple"==Editor.currentTheme||"min"==Editor.currentTheme,t=document.createElement(p?"a":"button");t.setAttribute("title",c+(null!=f?" ("+f+")":""));t.style.marginLeft="6px";mxUtils.write(t,c);p?(t.className="geMenuItem"+(n?" gePrimaryBtn":""),t.style.marginLeft="8px",t.style.padding="6px"):t.className="geBigButton"+(n?"":" geBigStandardButton");mxEvent.addListener(t,
+"click",e);return t};EditorUi.prototype.addEmbedButtons=function(){if("1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display="inline-block";document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,null,!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),
+this.actions.get("save").funct,Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct)));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"==Editor.currentTheme||"min"==Editor.currentTheme?null!=this.buttonContainer&&(c.style.position="relative","simple"!=Editor.currentTheme&&
+(c.style.marginRight="4px","1"!=urlParams.sketch?(c.style.marginTop="6px",this.buttonContainer.style.top="6px"):this.buttonContainer.style.top="0px"),this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged"))):null!=this.menubar&&(c.style.position="absolute",c.style.padding="2px",c.style.right="62px",this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c))}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=
+new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(c){var e=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});
+"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?e():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",e)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,
+function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var f=c.split("\n"),n=[],p=[],t=[],y={};if(0<f.length){var v={},D=this.editor.graph,A=null,U=null,l=null,u=null,B=null,J=null,M=null,F="whiteSpace=wrap;html=1;",K=null,P=null,R="",V="auto",X="auto",m=!1,z=null,L=null,Q=40,N=40,T=100,S=0,W=mxUtils.bind(this,function(){null!=e?e(na):(D.setSelectionCells(na),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,
+function(){this.chromelessResize(!0)}),0)}),Z=D.getFreeInsertPoint(),ba=Z.x,aa=Z.y;Z=aa;var fa=null,Y="auto";P=null;for(var ia=[],da=null,va=null,Aa=0;Aa<f.length&&"#"==f[Aa].charAt(0);){c=f[Aa].replace(/\r$/,"");for(Aa++;Aa<f.length&&"\\"==c.charAt(c.length-1)&&"#"==f[Aa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(f[Aa].substring(1)),Aa++;if("#"!=c.charAt(1)){var ya=c.indexOf(":");if(0<ya){var ta=mxUtils.trim(c.substring(1,ya)),ca=mxUtils.trim(c.substring(ya+1));"label"==ta?fa=D.sanitizeHtml(ca):
+"labelname"==ta&&0<ca.length&&"-"!=ca?B=ca:"labels"==ta&&0<ca.length&&"-"!=ca?M=JSON.parse(ca):"style"==ta?U=ca:"parentstyle"==ta?F=ca:"unknownStyle"==ta&&"-"!=ca?J=ca:"stylename"==ta&&0<ca.length&&"-"!=ca?u=ca:"styles"==ta&&0<ca.length&&"-"!=ca?l=JSON.parse(ca):"vars"==ta&&0<ca.length&&"-"!=ca?A=JSON.parse(ca):"identity"==ta&&0<ca.length&&"-"!=ca?K=ca:"parent"==ta&&0<ca.length&&"-"!=ca?P=ca:"namespace"==ta&&0<ca.length&&"-"!=ca?R=ca:"width"==ta?V=ca:"height"==ta?X=ca:"collapsed"==ta&&"-"!=ca?m="true"==
+ca:"left"==ta&&0<ca.length?z=ca:"top"==ta&&0<ca.length?L=ca:"ignore"==ta?va=ca.split(","):"connect"==ta?ia.push(JSON.parse(ca)):"link"==ta?da=ca:"padding"==ta?S=parseFloat(ca):"edgespacing"==ta?Q=parseFloat(ca):"nodespacing"==ta?N=parseFloat(ca):"levelspacing"==ta?T=parseFloat(ca):"layout"==ta&&(Y=ca)}}}if(null==f[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Pa=this.editor.csvToArray(f[Aa].replace(/\r$/,""));ya=c=null;ta=[];for(ca=0;ca<Pa.length;ca++)K==Pa[ca]&&(c=ca),P==Pa[ca]&&(ya=
+ca),ta.push(mxUtils.trim(Pa[ca]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==fa&&(fa="%"+ta[0]+"%");if(null!=ia)for(var La=0;La<ia.length;La++)null==v[ia[La].to]&&(v[ia[La].to]={});K=[];for(ca=Aa+1;ca<f.length;ca++){var Da=this.editor.csvToArray(f[ca].replace(/\r$/,""));if(null==Da){var Ia=40<f[ca].length?f[ca].substring(0,40)+"...":f[ca];throw Error(Ia+" ("+ca+"):\n"+mxResources.get("containsValidationErrors"));}0<Da.length&&K.push(Da)}D.model.beginUpdate();try{for(ca=
+0;ca<K.length;ca++){Da=K[ca];var qa=null,Na=null!=c?R+Da[c]:null;f=!1;null!=Na&&(qa=D.model.getCell(Na),f=null==qa||0<=mxUtils.indexOf(n,qa));var wa=new mxCell(fa,new mxGeometry(ba,Z,0,0),U||"whiteSpace=wrap;html=1;");wa.collapsed=m;wa.vertex=!0;wa.id=Na;null==qa||f||D.model.setCollapsed(qa,m);for(var ha=0;ha<Da.length;ha++)D.setAttributeForCell(wa,ta[ha],Da[ha]),null==qa||f||D.setAttributeForCell(qa,ta[ha],Da[ha]);if(null!=B&&null!=M){var ea=M[wa.getAttribute(B)];null!=ea&&(D.labelChanged(wa,ea),
+null==qa||f||D.cellLabelChanged(qa,ea))}if(null!=u&&null!=l){var za=l[wa.getAttribute(u)];null!=za&&(wa.style=za)}D.setAttributeForCell(wa,"placeholders","1");wa.style=D.replacePlaceholders(wa,wa.style,A);null==qa||f?D.fireEvent(new mxEventObject("cellsInserted","cells",[wa])):(D.model.setStyle(qa,wa.style),0>mxUtils.indexOf(t,qa)&&t.push(qa),D.fireEvent(new mxEventObject("cellsInserted","cells",[qa])));f=null!=qa;qa=wa;if(!f)for(La=0;La<ia.length;La++)v[ia[La].to][qa.getAttribute(ia[La].to)]=qa;
+null!=da&&"link"!=da&&(D.setLinkForCell(qa,qa.getAttribute(da)),D.setAttributeForCell(qa,da,null));var ka=this.editor.graph.getPreferredSizeForCell(qa);P=null!=ya?D.model.getCell(R+Da[ya]):null;if(qa.vertex){Ia=null!=P?0:ba;Aa=null!=P?0:aa;null!=z&&null!=qa.getAttribute(z)&&(qa.geometry.x=Ia+parseFloat(qa.getAttribute(z)));null!=L&&null!=qa.getAttribute(L)&&(qa.geometry.y=Aa+parseFloat(qa.getAttribute(L)));var oa="@"==V.charAt(0)?qa.getAttribute(V.substring(1)):null;qa.geometry.width=null!=oa&&"auto"!=
+oa?parseFloat(qa.getAttribute(V.substring(1))):"auto"==V||"auto"==oa?ka.width+S:parseFloat(V);var sa="@"==X.charAt(0)?qa.getAttribute(X.substring(1)):null;qa.geometry.height=null!=sa&&"auto"!=sa?parseFloat(sa):"auto"==X||"auto"==sa?ka.height+S:parseFloat(X);Z+=qa.geometry.height+N}f?(null==y[Na]&&(y[Na]=[]),y[Na].push(qa)):(n.push(qa),null!=P?(P.style=D.replacePlaceholders(P,F,A),D.addCell(qa,P),p.push(P)):t.push(D.addCell(qa)))}for(ca=0;ca<p.length;ca++)oa="@"==V.charAt(0)?p[ca].getAttribute(V.substring(1)):
+null,sa="@"==X.charAt(0)?p[ca].getAttribute(X.substring(1)):null,"auto"!=V&&"auto"!=oa||"auto"!=X&&"auto"!=sa||D.updateGroupBounds([p[ca]],S,!0);var ma=t.slice(),na=t.slice();for(La=0;La<ia.length;La++){var Ea=ia[La];for(ca=0;ca<n.length;ca++){qa=n[ca];var ja=mxUtils.bind(this,function(Ga,Ja,Ka){var Oa=Ja.getAttribute(Ka.from);if(null!=Oa&&""!=Oa){Oa=Oa.split(",");for(var Ra=0;Ra<Oa.length;Ra++){var Ua=v[Ka.to][Oa[Ra]];if(null==Ua&&null!=J){Ua=new mxCell(Oa[Ra],new mxGeometry(ba,aa,0,0),J);Ua.style=
+D.replacePlaceholders(Ja,Ua.style,A);var Ha=this.editor.graph.getPreferredSizeForCell(Ua);Ua.geometry.width=Ha.width+S;Ua.geometry.height=Ha.height+S;v[Ka.to][Oa[Ra]]=Ua;Ua.vertex=!0;Ua.id=Oa[Ra];t.push(D.addCell(Ua))}if(null!=Ua){Ha=Ka.label;null!=Ka.fromlabel&&(Ha=(Ja.getAttribute(Ka.fromlabel)||"")+(Ha||""));null!=Ka.sourcelabel&&(Ha=D.replacePlaceholders(Ja,Ka.sourcelabel,A)+(Ha||""));null!=Ka.tolabel&&(Ha=(Ha||"")+(Ua.getAttribute(Ka.tolabel)||""));null!=Ka.targetlabel&&(Ha=(Ha||"")+D.replacePlaceholders(Ua,
+Ka.targetlabel,A));var Ta="target"==Ka.placeholders==!Ka.invert?Ua:Ga;Ta=null!=Ka.style?D.replacePlaceholders(Ta,Ka.style,A):D.createCurrentEdgeStyle();Ha=D.insertEdge(null,null,Ha||"",Ka.invert?Ua:Ga,Ka.invert?Ga:Ua,Ta);if(null!=Ka.labels)for(Ta=0;Ta<Ka.labels.length;Ta++){var Sa=Ka.labels[Ta],Wa=new mxCell(Sa.label||Ta,new mxGeometry(null!=Sa.x?Sa.x:0,null!=Sa.y?Sa.y:0,0,0),"resizable=0;html=1;");Wa.vertex=!0;Wa.connectable=!1;Wa.geometry.relative=!0;null!=Sa.placeholders&&(Wa.value=D.replacePlaceholders("target"==
+Sa.placeholders==!Ka.invert?Ua:Ga,Wa.value,A));if(null!=Sa.dx||null!=Sa.dy)Wa.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=Sa.dy?Sa.dy:0);Ha.insert(Wa)}na.push(Ha);mxUtils.remove(Ka.invert?Ga:Ua,ma)}}}});ja(qa,qa,Ea);if(null!=y[qa.id])for(ha=0;ha<y[qa.id].length;ha++)ja(qa,y[qa.id][ha],Ea)}}if(null!=va)for(ca=0;ca<n.length;ca++)for(qa=n[ca],ha=0;ha<va.length;ha++)D.setAttributeForCell(qa,mxUtils.trim(va[ha]),null);if(0<t.length){var la=new mxParallelEdgeLayout(D);la.spacing=Q;la.checkOverlap=
+!0;var pa=function(){0<la.spacing&&la.execute(D.getDefaultParent());for(var Ga=0;Ga<t.length;Ga++){var Ja=D.getCellGeometry(t[Ga]);Ja.x=Math.round(D.snap(Ja.x));Ja.y=Math.round(D.snap(Ja.y));"auto"==V&&(Ja.width=Math.round(D.snap(Ja.width)));"auto"==X&&(Ja.height=Math.round(D.snap(Ja.height)))}};if("["==Y.charAt(0)){var xa=W;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(Y)),function(){pa();xa()});W=null}else if("circle"==Y){var Ba=new mxCircleLayout(D);Ba.disableEdgeStyle=!1;Ba.resetEdges=
+!1;var Fa=Ba.isVertexIgnored;Ba.isVertexIgnored=function(Ga){return Fa.apply(this,arguments)||0>mxUtils.indexOf(t,Ga)};this.executeLayout(function(){Ba.execute(D.getDefaultParent());pa()},!0,W);W=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&na.length==2*t.length-1&&1==ma.length){D.view.validate();var Ca=new mxCompactTreeLayout(D,"horizontaltree"==Y);Ca.levelDistance=N;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(D.getDefaultParent(),0<ma.length?ma[0]:
+null)},!0,W);W=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ma.length){D.view.validate();var ua=new mxHierarchicalLayout(D,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ua.intraCellSpacing=N;ua.parallelEdgeSpacing=Q;ua.interRankCellSpacing=T;ua.disableEdgeStyle=!1;this.executeLayout(function(){ua.execute(D.getDefaultParent(),na);D.moveCells(na,ba,aa)},!0,W);W=null}else if("orgchart"==Y){D.view.validate();var ra=new mxOrgChartLayout(D,2,T,N),Ma=ra.isVertexIgnored;
+ra.isVertexIgnored=function(Ga){return Ma.apply(this,arguments)||0>mxUtils.indexOf(t,Ga)};this.executeLayout(function(){ra.execute(D.getDefaultParent());pa()},!0,W);W=null}else if("organic"==Y||"auto"==Y&&na.length>t.length){D.view.validate();var Qa=new mxFastOrganicLayout(D);Qa.forceConstant=3*N;Qa.disableEdgeStyle=!1;Qa.resetEdges=!1;var Va=Qa.isVertexIgnored;Qa.isVertexIgnored=function(Ga){return Va.apply(this,arguments)||0>mxUtils.indexOf(t,Ga)};this.executeLayout(function(){Qa.execute(D.getDefaultParent());
+pa()},!0,W);W=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=W&&W()}}catch(Ga){this.handleError(Ga)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var f="?",n;for(n in urlParams)0>mxUtils.indexOf(c,n)&&null!=urlParams[n]&&(e+=f+n+"="+urlParams[n],f="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;
+if("1"==urlParams.offline)c+=window.location.search;else{var f="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(f,n)&&(c=0==e?c+"?":c+"&",null!=urlParams[n]&&(c+=n+"="+urlParams[n],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,f,n,p){c=new LinkDialog(this,c,e,f,!0,n,p);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&
+"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);
+this.menus.get("viewZoom").setEnabled(e);var f=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!f);this.actions.get("print").setEnabled(!f);this.menus.get("exportAs").setEnabled(!f);this.menus.get("embed").setEnabled(!f);f="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(f);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(f),this.menus.get("newLibrary").setEnabled(f));
+c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);this.actions.get("resetView").setEnabled(e);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);
+this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();
+return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var I=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(c){var e=I.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){e.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){e.refresh()}));return e};var E=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){E.apply(this,arguments);var c=this.editor.graph,
+e=this.getCurrentFile(),f=this.getSelectionState(),n=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(n);this.actions.get("autosave").setEnabled(null!=e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("shadowVisible").setEnabled(n);this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!c.isSelectionEmpty());
+this.actions.get("pasteStyle").setEnabled(n&&0<f.cells.length);this.actions.get("editGeometry").setEnabled(0<f.vertices.length);this.actions.get("createShape").setEnabled(n);this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("tags").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);
+e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(n&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var O=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);O.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
+!1,ExportDialog.exportFile=function(c,e,f,n,p,t,y,v){var D=c.editor.graph;if("xml"==f)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==f)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(D.getSvg(n,p,t)),"image/svg+xml");else{var A=c.getFileData(!0,null,null,null,null,!0),U=D.getGraphBounds(),l=Math.floor(U.width*p/D.view.scale),u=Math.floor(U.height*p/D.view.scale);if(A.length<=MAX_REQUEST_SIZE&&l*u<MAX_AREA)if(c.hideDialog(),"png"!=f&&"jpg"!=f&&
+"jpeg"!=f||!c.isExportToCanvas()){var B={globalVars:D.getExportVariables()};v&&(B.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});c.saveRequest(e,f,function(J,M){return new mxXmlRequest(EXPORT_URL,"format="+f+"&base64="+(M||"0")+(null!=J?"&filename="+encodeURIComponent(J):"")+"&extras="+encodeURIComponent(JSON.stringify(B))+(0<y?"&dpi="+y:"")+"&bg="+(null!=n?n:"none")+"&w="+l+"&h="+u+"&border="+t+"&xml="+encodeURIComponent(A))})}else"png"==f?c.exportImage(p,null==n||"none"==
+n,!0,!1,!1,t,!0,!1,null,v,y):c.exportImage(p,!1,!0,!1,!1,t,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var f=0;f<this.pages.length;f++){var n=c;this.currentPage!=this.pages[f]&&(n=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[f]),n.model.setRoot(this.pages[f].root));e+=this.pages[f].getName()+" "+n.getIndexableText()+
+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},f=document.createElement("div");f.style.whiteSpace="nowrap";var n=document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(c));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(n);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 t={};try{var y=mxSettings.getCustomLibraries();for(c=0;c<y.length;c++){var v=y[c];if("R"==v.substring(0,1)){var D=JSON.parse(decodeURIComponent(v.substring(1)));t[D[0]]={id:D[0],title:D[1],downloadUrl:D[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 U=0;U<
+A.length;U++){var l=A[U];t[l.id]&&(e[l.id]=l);var u=this.addCheckbox(p,l.title,t[l.id]);(function(B,J){mxEvent.addListener(J,"change",function(){this.checked?e[B.id]=B:delete e[B.id]})})(l,u)}},mxUtils.bind(this,function(A){p.innerText="";var U=document.createElement("div");U.style.padding="8px";U.style.textAlign="center";mxUtils.write(U,mxResources.get("error")+": ");mxUtils.write(U,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));p.appendChild(U)}));f.appendChild(p);f=new CustomDialog(this,
+f,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var A=0,U;for(U in e)null==t[U]&&(A++,mxUtils.bind(this,function(l){this.remoteInvoke("getFileContent",[l.downloadUrl],null,mxUtils.bind(this,function(u){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,u,l))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){A--;0==A&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[U]));
+for(U in t)e[U]||this.closeLibrary(new RemoteLibrary(this,null,t[U]));0==A&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(f.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};
+EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,f=this.remoteInvokeCallbacks[e.callbackId];if(null==f)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?f.error&&f.error(c.error.errResp):
+f.callback&&f.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,f,n,p){var t=!0,y=window.setTimeout(mxUtils.bind(this,function(){t=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),v=mxUtils.bind(this,function(){window.clearTimeout(y);t&&n.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(y);t&&p.apply(this,arguments)});f=f||{};f.callbackId=this.remoteInvokeCallbacks.length;
+this.remoteInvokeCallbacks.push({callback:v,error:D});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:f});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var f=mxUtils.bind(this,function(A,U){var l={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=U?l.error={errResp:U}:null!=A&&(l.resp=A);this.remoteWin.postMessage(JSON.stringify(l),"*")});try{var n=c.funtionName,p=
+this.remoteInvokableFns[n];if(null!=p&&"function"===typeof this[n]){if(p.allowedDomains){for(var t=!1,y=0;y<p.allowedDomains.length;y++)if(e=="https://"+p.allowedDomains[y]){t=!0;break}if(!t){f(null,"Invalid Call: "+n+" is not allowed.");return}}var v=c.functionArgs;Array.isArray(v)||(v=[]);if(p.isAsync)v.push(function(){f(Array.prototype.slice.apply(arguments))}),v.push(function(A){f(null,A||"Unkown Error")}),this[n].apply(this,v);else{var D=this[n].apply(this,v);f([D])}}else f(null,"Invalid Call: "+
+n+" is not found.")}catch(A){f(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var f=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=f)try{var n=f.open("database",2);n.onupgradeneeded=function(p){try{var t=n.result;1>p.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>p.oldVersion&&(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
+isLocalStorage)}catch(y){null!=e&&e(y)}};n.onsuccess=mxUtils.bind(this,function(p){var t=n.result;this.database=t;EditorUi.migrateStorageFiles&&(StorageFile.migrate(t),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(y){if(!y||"1"==urlParams.forceMigration){var v=document.createElement("iframe");v.style.display="none";v.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
+urlParams.forceMigration);document.body.appendChild(v);var D=!0,A=!1,U,l=0,u=mxUtils.bind(this,function(){A=!0;this.setDatabaseItem(".drawioMigrated3",!0);v.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),B=mxUtils.bind(this,function(){l++;J()}),J=mxUtils.bind(this,function(){try{if(l>=U.length)u();else{var F=U[l];StorageFile.getFileContent(this,F,mxUtils.bind(this,function(K){null==K||".scratchpad"==F&&K==this.emptyLibraryXml?v.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[F]}),"*"):B()}),B)}}catch(K){console.log(K)}}),M=mxUtils.bind(this,function(F){try{this.setDatabaseItem(null,[{title:F.title,size:F.data.length,lastModified:Date.now(),type:F.isLib?"L":"F"},{title:F.title,data:F.data}],B,B,["filesInfo","files"])}catch(K){console.log(K)}});y=mxUtils.bind(this,function(F){try{if(F.source==v.contentWindow){var K={};try{K=JSON.parse(F.data)}catch(P){}"init"==K.event?(v.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),v.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=K.event||A||(D?null!=K.resp&&0<K.resp.length&&null!=K.resp[0]?(U=K.resp[0],D=!1,J()):u():null!=K.resp&&0<K.resp.length&&null!=K.resp[0]?M(K.resp[0]):B())}}catch(P){console.log(P)}});window.addEventListener("message",y)}})));c(t);t.onversionchange=function(){t.close()}});n.onerror=e;n.onblocked=function(){}}catch(p){null!=e&&e(p)}else null!=e&&e()}else c(this.database)};
+EditorUi.prototype.setDatabaseItem=function(c,e,f,n,p){this.openDatabase(mxUtils.bind(this,function(t){try{p=p||"objects";Array.isArray(p)||(p=[p],c=[c],e=[e]);var y=t.transaction(p,"readwrite");y.oncomplete=f;y.onerror=n;for(t=0;t<p.length;t++)y.objectStore(p[t]).put(null!=c&&null!=c[t]?{key:c[t],data:e[t]}:e[t])}catch(v){null!=n&&n(v)}}),n)};EditorUi.prototype.removeDatabaseItem=function(c,e,f,n){this.openDatabase(mxUtils.bind(this,function(p){n=n||"objects";Array.isArray(n)||(n=[n],c=[c]);p=p.transaction(n,
+"readwrite");p.oncomplete=e;p.onerror=f;for(var t=0;t<n.length;t++)p.objectStore(n[t]).delete(c[t])}),f)};EditorUi.prototype.getDatabaseItem=function(c,e,f,n){this.openDatabase(mxUtils.bind(this,function(p){try{n=n||"objects";var t=p.transaction([n],"readonly").objectStore(n).get(c);t.onsuccess=function(){e(t.result)};t.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.getDatabaseItems=function(c,e,f){this.openDatabase(mxUtils.bind(this,function(n){try{f=f||"objects";var p=n.transaction([f],
+"readonly").objectStore(f).openCursor(IDBKeyRange.lowerBound(0)),t=[];p.onsuccess=function(y){null==y.target.result?c(t):(t.push(y.target.result.value),y.target.result.continue())};p.onerror=e}catch(y){null!=e&&e(y)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,f){this.openDatabase(mxUtils.bind(this,function(n){try{f=f||"objects";var p=n.transaction([f],"readonly").objectStore(f).getAllKeys();p.onsuccess=function(){c(p.result)};p.onerror=e}catch(t){null!=e&&e(t)}}),e)};EditorUi.prototype.commentsSupported=
+function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,e){var f=this.getCurrentFile();null!=f?f.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,f){var n=this.getCurrentFile();
+null!=n?n.addComment(c,e,f):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var f=this.getCurrentFile();return null!=f?f.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();
+return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var f=this.getCurrentFile();null!=f&&f.getRevisions?f.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,f,n,p,t,y,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,f,n,p,t,y,v)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,f,n,p,t,y,v,D,A,U,l,u,B,J,M){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,f,n,p,t,y,v,D,A,U,l,u,B,J,M)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,f,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,f,n)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=
+function(c,e,f,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,f,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,f,n,p){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,f,n,p)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var f=localStorage.key(e),n=localStorage.getItem(f);if(0<f.length&&(".scratchpad"==f||"."!=f.charAt(0))&&0<n.length){var p="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(p||n)&&c.push(f)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,g,k,d,q,x){function C(){for(var B=y.getElementsByTagName("div"),J=0,M=0;M<B.length;M++)"none"!=B[M].style.display&&B[M].parentNode==y&&J++;v.style.display=0==J?"block":"none"}function G(B,J,M,F){function K(){J.removeChild(V);J.removeChild(X);R.style.display="block";P.style.display="block"}n={div:J,comment:B,saveCallback:M,deleteOnCancel:F};var P=J.querySelector(".geCommentTxt"),R=J.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
+"geCommentEditTxtArea";V.style.minHeight=P.offsetHeight+"px";V.value=B.content;J.insertBefore(V,P);var X=document.createElement("div");X.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){F?(J.parentNode.removeChild(J),C()):K();n=null});m.className="geCommentEditBtn";X.appendChild(m);var z=mxUtils.button(mxResources.get("save"),function(){P.innerText="";B.content=V.value;mxUtils.write(P,B.content);K();M(B);n=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
function(L){mxEvent.isConsumed(L)||((mxEvent.isControlDown(L)||mxClient.IS_MAC&&mxEvent.isMetaDown(L))&&13==L.keyCode?(z.click(),mxEvent.consume(L)):27==L.keyCode&&(m.click(),mxEvent.consume(L)))}));z.focus();z.className="geCommentEditBtn gePrimaryBtn";X.appendChild(z);J.insertBefore(X,P);R.style.display="none";P.style.display="none";V.focus()}function H(B,J){J.innerText="";B=new Date(B.modifiedDate);var M=b.timeSince(B);null==M&&(M=mxResources.get("lessThanAMinute"));mxUtils.write(J,mxResources.get("timeAgo",
-[M],"{1} ago"));J.setAttribute("title",B.toLocaleDateString()+" "+B.toLocaleTimeString())}function I(B){var J=document.createElement("img");J.className="geCommentBusyImg";J.src=IMAGE_PATH+"/spin.gif";B.appendChild(J);B.busyImg=J}function F(B){B.style.border="1px solid red";B.removeChild(B.busyImg)}function O(B){B.style.border="";B.removeChild(B.busyImg)}function c(B,J,M,E,K){function P(N,T,S){var W=document.createElement("li");W.className="geCommentAction";var Z=document.createElement("a");Z.className=
-"geCommentActionLnk";mxUtils.write(Z,N);W.appendChild(Z);mxEvent.addListener(Z,"click",function(ba){T(ba,B);ba.preventDefault();mxEvent.consume(ba)});Q.appendChild(W);S&&(W.style.display="none")}function R(){function N(W){T.push(S);if(null!=W.replies)for(var Z=0;Z<W.replies.length;Z++)S=S.nextSibling,N(W.replies[Z])}var T=[],S=X;N(B);return{pdiv:S,replies:T}}function V(N,T,S,W,Z){function ba(){I(ia);B.addReply(Y,function(da){Y.id=da;B.replies.push(Y);O(ia);S&&S()},function(da){aa();F(ia);b.handleError(da,
-null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},W,Z)}function aa(){G(Y,ia,function(da){ba()},!0)}var fa=R().pdiv,Y=b.newComment(N,b.getCurrentUser());Y.pCommentId=B.id;null==B.replies&&(B.replies=[]);var ia=c(Y,B.replies,fa,E+1);T?aa():ba()}if(K||!B.isResolved){u.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",B.id);X.style.marginLeft=20*E+5+"px";B.isResolved&&!Editor.isDarkMode()&&(X.style.backgroundColor=
+[M],"{1} ago"));J.setAttribute("title",B.toLocaleDateString()+" "+B.toLocaleTimeString())}function I(B){var J=document.createElement("img");J.className="geCommentBusyImg";J.src=IMAGE_PATH+"/spin.gif";B.appendChild(J);B.busyImg=J}function E(B){B.style.border="1px solid red";B.removeChild(B.busyImg)}function O(B){B.style.border="";B.removeChild(B.busyImg)}function c(B,J,M,F,K){function P(N,T,S){var W=document.createElement("li");W.className="geCommentAction";var Z=document.createElement("a");Z.className=
+"geCommentActionLnk";mxUtils.write(Z,N);W.appendChild(Z);mxEvent.addListener(Z,"click",function(ba){T(ba,B);ba.preventDefault();mxEvent.consume(ba)});Q.appendChild(W);S&&(W.style.display="none")}function R(){function N(W){T.push(S);if(null!=W.replies)for(var Z=0;Z<W.replies.length;Z++)S=S.nextSibling,N(W.replies[Z])}var T=[],S=X;N(B);return{pdiv:S,replies:T}}function V(N,T,S,W,Z){function ba(){I(ia);B.addReply(Y,function(da){Y.id=da;B.replies.push(Y);O(ia);S&&S()},function(da){aa();E(ia);b.handleError(da,
+null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},W,Z)}function aa(){G(Y,ia,function(da){ba()},!0)}var fa=R().pdiv,Y=b.newComment(N,b.getCurrentUser());Y.pCommentId=B.id;null==B.replies&&(B.replies=[]);var ia=c(Y,B.replies,fa,F+1);T?aa():ba()}if(K||!B.isResolved){v.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",B.id);X.style.marginLeft=20*F+5+"px";B.isResolved&&!Editor.isDarkMode()&&(X.style.backgroundColor=
"ghostWhite");var m=document.createElement("div");m.className="geCommentHeader";var z=document.createElement("img");z.className="geCommentUserImg";z.src=B.user.pictureUrl||Editor.userImage;m.appendChild(z);z=document.createElement("div");z.className="geCommentHeaderTxt";m.appendChild(z);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,B.user.displayName||"");z.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",
-B.id);H(B,L);z.appendChild(L);X.appendChild(m);m=document.createElement("div");m.className="geCommentTxt";mxUtils.write(m,B.content||"");X.appendChild(m);B.isLocked&&(X.style.opacity="0.5");m=document.createElement("div");m.className="geCommentActions";var Q=document.createElement("ul");Q.className="geCommentActionsList";m.appendChild(Q);e||B.isLocked||0!=E&&!g||P(mxResources.get("reply"),function(){V("",!0)},B.isResolved);z=b.getCurrentUser();null==z||z.id!=B.user.id||e||B.isLocked||(P(mxResources.get("edit"),
-function(){function N(){G(B,X,function(){I(X);B.editComment(B.content,function(){O(X)},function(T){F(X);N();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}N()},B.isResolved),P(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){I(X);B.deleteComment(function(N){if(!0===N){N=X.querySelector(".geCommentTxt");N.innerText="";mxUtils.write(N,mxResources.get("msgDeleted"));var T=X.querySelectorAll(".geCommentAction");for(N=
-0;N<T.length;N++)T[N].parentNode.removeChild(T[N]);O(X);X.style.opacity="0.5"}else{T=R(B).replies;for(N=0;N<T.length;N++)y.removeChild(T[N]);for(N=0;N<J.length;N++)if(J[N]==B){J.splice(N,1);break}u.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(N){F(X);b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},B.isResolved));e||B.isLocked||0!=E||P(B.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(N){function T(){var S=
+B.id);H(B,L);z.appendChild(L);X.appendChild(m);m=document.createElement("div");m.className="geCommentTxt";mxUtils.write(m,B.content||"");X.appendChild(m);B.isLocked&&(X.style.opacity="0.5");m=document.createElement("div");m.className="geCommentActions";var Q=document.createElement("ul");Q.className="geCommentActionsList";m.appendChild(Q);e||B.isLocked||0!=F&&!f||P(mxResources.get("reply"),function(){V("",!0)},B.isResolved);z=b.getCurrentUser();null==z||z.id!=B.user.id||e||B.isLocked||(P(mxResources.get("edit"),
+function(){function N(){G(B,X,function(){I(X);B.editComment(B.content,function(){O(X)},function(T){E(X);N();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}N()},B.isResolved),P(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){I(X);B.deleteComment(function(N){if(!0===N){N=X.querySelector(".geCommentTxt");N.innerText="";mxUtils.write(N,mxResources.get("msgDeleted"));var T=X.querySelectorAll(".geCommentAction");for(N=
+0;N<T.length;N++)T[N].parentNode.removeChild(T[N]);O(X);X.style.opacity="0.5"}else{T=R(B).replies;for(N=0;N<T.length;N++)y.removeChild(T[N]);for(N=0;N<J.length;N++)if(J[N]==B){J.splice(N,1);break}v.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(N){E(X);b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},B.isResolved));e||B.isLocked||0!=F||P(B.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(N){function T(){var S=
N.target;S.innerText="";B.isResolved=!B.isResolved;mxUtils.write(S,B.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var W=B.isResolved?"none":"",Z=R(B).replies,ba=Editor.isDarkMode()?"transparent":B.isResolved?"ghostWhite":"white",aa=0;aa<Z.length;aa++){Z[aa].style.backgroundColor=ba;for(var fa=Z[aa].querySelectorAll(".geCommentAction"),Y=0;Y<fa.length;Y++)fa[Y]!=S.parentNode&&(fa[Y].style.display=W);U||(Z[aa].style.display="none")}C()}B.isResolved?V(mxResources.get("reOpened")+
-": ",!0,T,!1,!0):V(mxResources.get("markedAsResolved"),!1,T,!0)});X.appendChild(m);null!=M?y.insertBefore(X,M.nextSibling):y.appendChild(X);for(M=0;null!=B.replies&&M<B.replies.length;M++)m=B.replies[M],m.isResolved=B.isResolved,c(m,B.replies,null,E+1,K);null!=n&&(n.comment.id==B.id?(K=B.content,B.content=n.comment.content,G(B,X,n.saveCallback,n.deleteOnCancel),B.content=K):null==n.comment.id&&n.comment.pCommentId==B.id&&(y.appendChild(n.div),G(n.comment,n.div,n.saveCallback,n.deleteOnCancel)));return X}}
-var e=!b.canComment(),g=b.canReplyToReplies(),n=null,p=document.createElement("div");p.className="geCommentsWin";p.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var v=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(v)+7+"px";p.appendChild(y);var u=document.createElement("span");u.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(u,mxResources.get("noCommentsFound"));var D=document.createElement("div");D.className="geToolbarContainer geCommentsToolbar";D.style.height=v;D.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";D.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";v=document.createElement("a");v.className="geButton";if(!e){var A=v.cloneNode();A.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';A.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(A,"click",function(B){function J(){G(M,E,function(K){I(E);b.addComment(K,function(P){K.id=P;l.push(K);O(E)},function(P){F(E);J();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var M=b.newComment("",b.getCurrentUser()),E=c(M,l,null,0);J();B.preventDefault();mxEvent.consume(B)});D.appendChild(A)}A=v.cloneNode();A.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';A.setAttribute("title",mxResources.get("showResolved"));
-A.className="geAdaptiveAsset";var U=!1;mxEvent.addListener(A,"click",function(B){this.className=(U=!U)?"geButton geCheckedBtn":"geButton";q();B.preventDefault();mxEvent.consume(B)});D.appendChild(A);b.commentsRefreshNeeded()&&(A=v.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',A.setAttribute("title",mxResources.get("refresh")),A.className="geAdaptiveAsset",mxEvent.addListener(A,"click",function(B){q();B.preventDefault();mxEvent.consume(B)}),D.appendChild(A));
-b.commentsSaveNeeded()&&(v=v.cloneNode(),v.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',v.setAttribute("title",mxResources.get("save")),v.className="geAdaptiveAsset",mxEvent.addListener(v,"click",function(B){x();B.preventDefault();mxEvent.consume(B)}),D.appendChild(v));p.appendChild(D);var l=[],q=mxUtils.bind(this,function(){this.hasError=!1;if(null!=n)try{n.div=n.div.cloneNode(!0);var B=n.div.querySelector(".geCommentEditTxtArea"),J=n.div.querySelector(".geCommentEditBtns");
-n.comment.content=B.value;B.parentNode.removeChild(B);J.parentNode.removeChild(J)}catch(M){b.handleError(M)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";g=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(M){function E(K){if(null!=K){K.sort(function(R,V){return new Date(R.modifiedDate)-new Date(V.modifiedDate)});for(var P=0;P<K.length;P++)E(K[P].replies)}}
-M.sort(function(K,P){return new Date(K.modifiedDate)-new Date(P.modifiedDate)});y.innerText="";y.appendChild(u);u.style.display="block";l=M;for(M=0;M<l.length;M++)E(l[M].replies),c(l[M],l,null,0,U);null!=n&&null==n.comment.id&&null==n.comment.pCommentId&&(y.appendChild(n.div),G(n.comment,n.div,n.saveCallback,n.deleteOnCancel))},mxUtils.bind(this,function(M){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(M&&M.message?": "+M.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
-q();this.refreshComments=q;D=mxUtils.bind(this,function(){function B(P){var R=M[P.id];if(null!=R)for(H(P,R),R=0;null!=P.replies&&R<P.replies.length;R++)B(P.replies[R])}if(this.window.isVisible()){for(var J=y.querySelectorAll(".geCommentDate"),M={},E=0;E<J.length;E++){var K=J[E];M[K.getAttribute("data-commentId")]=K}for(E=0;E<l.length;E++)B(l[E])}});setInterval(D,6E4);this.refreshCommentsTime=D;this.window=new mxWindow(mxResources.get("comments"),p,f,k,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,
-0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,k,d,t,x,C,G,H,I,F){var O=document.createElement("div");O.style.textAlign="center";F=null!=F?F:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=F+
-"px";c.style.lineHeight="1.2em";mxUtils.write(c,f);O.appendChild(c);null!=I&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",I),c.appendChild(f),O.appendChild(c));I=document.createElement("div");I.style.textAlign="center";I.style.whiteSpace="nowrap";var e=document.createElement("input");e.setAttribute("type","checkbox");x=mxUtils.button(x||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(e.checked)});x.className="geBtn";
-null!=G&&(x.innerHTML=G+"<br>"+x.innerHTML,x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.style.width="40%");b.editor.cancelFirst&&I.appendChild(x);var g=mxUtils.button(t||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(e.checked)});I.appendChild(g);null!=C?(g.innerHTML=C+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-I.appendChild(x);O.appendChild(I);H?(I.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(e),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),c.appendChild(t),O.appendChild(c),mxEvent.addListener(t,"click",function(n){e.checked=!e.checked;mxEvent.consume(n)})):I.style.marginTop="12px";this.init=function(){g.focus()};this.container=O};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
-EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,k,d,t){if(null!=f)for(var x=0;x<f.length;x++)null!=f[x]&&(b=this.patchPages(b,f[x],k,d,t));return b};
-EditorUi.prototype.patchPages=function(b,f,k,d,t){var x={},C=[],G={},H={},I={},F={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var O in d[EditorUi.DIFF_UPDATE])x[O]=d[EditorUi.DIFF_UPDATE][O];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)H[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)G[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(O in f[EditorUi.DIFF_UPDATE])d=
-f[EditorUi.DIFF_UPDATE][O],null!=d.previous&&(F[d.previous]=O);if(null!=b){var c="";for(d=0;d<b.length;d++){var e=b[d].getId();I[e]=b[d];null!=F[c]||H[e]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][e]&&null!=f[EditorUi.DIFF_UPDATE][e].previous||(F[c]=e);c=e}}var g={},n=mxUtils.bind(this,function(v){var y=null!=v?v.getId():"";if(null!=v&&!g[y]){g[y]=!0;C.push(v);var u=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][y]:null;null!=u&&(this.updatePageRoot(v),null!=u.name&&v.setName(u.name),
-null!=u.view&&this.patchViewState(v,u.view),null!=u.cells&&this.patchPage(v,u.cells,x[v.getId()],t),!k||null==u.cells&&null==u.view||(v.needsUpdate=!0))}v=F[y];null!=v&&(delete F[y],n(I[v]));v=G[y];null!=v&&(delete G[y],p(v))}),p=mxUtils.bind(this,function(v){v=mxUtils.parseXml(v.data).documentElement;v=new DiagramPage(v);this.updatePageRoot(v);var y=I[v.getId()];null==y?n(v):(this.patchPage(y,this.diffPages([y],[v]),x[y.getId()],t),k&&(y.needsUpdate=!0))});n();for(O in F)n(I[F[O]]),delete F[O];for(O in G)p(G[O]),
-delete G[O];return C};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var k in f)try{this.patchViewStateProperty(b,f,k)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,k){b.viewState[k]=JSON.parse(f[k])};
-EditorUi.prototype.createParentLookup=function(b,f){function k(I){var F=d[I];null==F&&(F={inserted:[],moved:{}},d[I]=F);return F}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var t=0;t<f[EditorUi.DIFF_INSERT].length;t++){var x=f[EditorUi.DIFF_INSERT][t],C=null!=x.parent?x.parent:"",G=null!=x.previous?x.previous:"";k(C).inserted[G]=x}if(null!=f[EditorUi.DIFF_UPDATE])for(var H in f[EditorUi.DIFF_UPDATE])x=f[EditorUi.DIFF_UPDATE][H],null!=x.previous&&(C=x.parent,null==C&&(t=b.getCell(H),null!=t&&(t=
-b.getParent(t),null!=t&&(C=t.getId()))),null!=C&&(k(C).moved[x.previous]=H));return d};
-EditorUi.prototype.patchPage=function(b,f,k,d){var t=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),x=this.createParentLookup(t,f);t.beginUpdate();try{var C=t.updateEdgeParent,G=new mxDictionary,H=[];t.updateEdgeParent=function(p,v){!G.get(p)&&d&&(G.put(p,!0),H.push(p))};var I=x[""],F=null!=I&&null!=I.inserted?I.inserted[""]:null,O=null;null!=F&&(O=this.getCellForJson(F));if(null==O){var c=null!=I&&null!=I.moved?I.moved[""]:null;null!=c&&(O=t.getCell(c))}null!=O&&(t.setRoot(O),
-b.root=O);this.patchCellRecursive(b,t,t.root,x,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var e=0;e<f[EditorUi.DIFF_REMOVE].length;e++){var g=t.getCell(f[EditorUi.DIFF_REMOVE][e]);null!=g&&t.remove(g)}if(null!=f[EditorUi.DIFF_UPDATE]){var n=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(c in f[EditorUi.DIFF_UPDATE])this.patchCell(t,t.getCell(c),f[EditorUi.DIFF_UPDATE][c],null!=n?n[c]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(e=0;e<f[EditorUi.DIFF_INSERT].length;e++)F=f[EditorUi.DIFF_INSERT][e],
-g=t.getCell(F.id),null!=g&&(t.setTerminal(g,t.getCell(F.source),!0),t.setTerminal(g,t.getCell(F.target),!1));t.updateEdgeParent=C;if(d&&0<H.length)for(e=0;e<H.length;e++)t.contains(H[e])&&t.updateEdgeParent(H[e])}finally{t.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,f,k,d,t){if(null!=k){var x=d[k.getId()],C=null!=x&&null!=x.inserted?x.inserted:{};x=null!=x&&null!=x.moved?x.moved:{};for(var G=0,H=f.getChildCount(k),I="",F=0;F<H;F++){var O=f.getChildAt(k,F).getId();null==x[I]&&(null==t[EditorUi.DIFF_UPDATE]||null==t[EditorUi.DIFF_UPDATE][O]||null==t[EditorUi.DIFF_UPDATE][O].previous&&null==t[EditorUi.DIFF_UPDATE][O].parent)&&(x[I]=O);I=O}H=mxUtils.bind(this,function(c,e){var g=null!=c?c.getId():"";null!=c&&e&&(e=
-f.getCell(g),null!=e&&e!=c&&(c=null));null!=c&&(f.getChildAt(k,G)!=c&&f.add(k,c,G),this.patchCellRecursive(b,f,c,d,t),G++);return g});for(I=[null];0<I.length;)if(F=I.shift(),F=H(null!=F?F.child:null,null!=F?F.insert:!1),O=x[F],null!=O&&(delete x[F],I.push({child:f.getCell(O)})),O=C[F],null!=O&&(delete C[F],I.push({child:this.getCellForJson(O),insert:!0})),0==I.length){for(F in x)I.push({child:f.getCell(x[F])}),delete x[F];for(F in C)I.push({child:this.getCellForJson(C[F]),insert:!0}),delete C[F]}}};
-EditorUi.prototype.patchCell=function(b,f,k,d){if(null!=f&&null!=k){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in k?b.setValue(f,k.value):null!=k.xmlValue&&b.setValue(f,mxUtils.parseXml(k.xmlValue).documentElement);null!=d&&null!=d.style||null==k.style||b.setStyle(f,k.style);null!=k.visible&&b.setVisible(f,1==k.visible);null!=k.collapsed&&b.setCollapsed(f,1==k.collapsed);null!=k.vertex&&(f.vertex=1==k.vertex);null!=k.edge&&(f.edge=1==k.edge);null!=k.connectable&&(f.connectable=
-1==k.connectable);null!=k.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(k.geometry).documentElement));null!=k.source&&b.setTerminal(f,b.getCell(k.source),!0);null!=k.target&&b.setTerminal(f,b.getCell(k.target),!1);for(var t in k)this.cellProperties[t]||(f[t]=k[t])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
-EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var k=0;k<b.length;k++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[k].root));this.editor.graph.saveViewState(b[k].viewState,d);var t=b[k].node.cloneNode(!1);t.appendChild(d);f.appendChild(t)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
-EditorUi.prototype.getPagesForNode=function(b,f){var k=this.editor.extractGraphModel(b,!0,!0);null!=k&&(b=k);f=b.getElementsByTagName(f||"diagram");k=[];if(0<f.length)for(b=0;b<f.length;b++){var d=new DiagramPage(f[b]);this.updatePageRoot(d,!0);k.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(d.node,Graph.compressNode(b,!0)),k.push(d));return k};
-EditorUi.prototype.diffPages=function(b,f){var k=[],d=[],t={},x={},C={},G=null;if(null!=b&&null!=f){for(var H=0;H<f.length;H++)x[f[H].getId()]={page:f[H],prev:G},G=f[H];G=null;for(H=0;H<b.length;H++){var I=b[H].getId();f=x[I];if(null==f)d.push(I);else{var F=this.diffPage(b[H],f.page),O={};mxUtils.isEmptyObject(F)||(O.cells=F);F=this.diffViewState(b[H],f.page);mxUtils.isEmptyObject(F)||(O.view=F);if((null!=f.prev?null==G:null!=G)||null!=G&&null!=f.prev&&G.getId()!=f.prev.getId())O.previous=null!=f.prev?
-f.prev.getId():"";null!=f.page.getName()&&b[H].getName()!=f.page.getName()&&(O.name=f.page.getName());mxUtils.isEmptyObject(O)||(C[I]=O)}delete x[b[H].getId()];G=b[H]}for(I in x)f=x[I],k.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(C)||(t[EditorUi.DIFF_UPDATE]=C);0<d.length&&(t[EditorUi.DIFF_REMOVE]=d);0<k.length&&(t[EditorUi.DIFF_INSERT]=k)}return t};
-EditorUi.prototype.createCellLookup=function(b,f,k){k=null!=k?k:{};k[b.getId()]={cell:b,prev:f};var d=b.getChildCount();f=null;for(var t=0;t<d;t++){var x=b.getChildAt(t);this.createCellLookup(x,f,k);f=x}return k};
-EditorUi.prototype.diffCellRecursive=function(b,f,k,d,t){d=null!=d?d:{};var x=k[b.getId()];delete k[b.getId()];if(null==x)t.push(b.getId());else{var C=this.diffCell(b,x.cell);if(null!=C.parent||(null!=x.prev?null==f:null!=f)||null!=f&&null!=x.prev&&f.getId()!=x.prev.getId())C.previous=null!=x.prev?x.prev.getId():"";mxUtils.isEmptyObject(C)||(d[b.getId()]=C)}x=b.getChildCount();f=null;for(C=0;C<x;C++){var G=b.getChildAt(C);this.diffCellRecursive(G,f,k,d,t);f=G}return d};
-EditorUi.prototype.diffPage=function(b,f){var k=[],d=[],t={};this.updatePageRoot(b);this.updatePageRoot(f);f=this.createCellLookup(f.root);var x=this.diffCellRecursive(b.root,null,f,x,d),C;for(C in f)b=f[C],k.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(x)||(t[EditorUi.DIFF_UPDATE]=x);0<d.length&&(t[EditorUi.DIFF_REMOVE]=d);0<k.length&&(t[EditorUi.DIFF_INSERT]=k);return t};
-EditorUi.prototype.diffViewState=function(b,f){b=b.viewState;var k=f.viewState,d={};f==this.currentPage&&(k=this.editor.graph.getViewState());if(null!=b&&null!=k)for(var t in this.viewStateProperties)this.diffViewStateProperty(b,k,t,d);return d};EditorUi.prototype.diffViewStateProperty=function(b,f,k,d){b=JSON.stringify(this.getViewStateProperty(b,k));f=JSON.stringify(this.getViewStateProperty(f,k));b!=f&&(d[k]=f)};
-EditorUi.prototype.getViewStateProperty=function(b,f){b=b[f];"backgroundImage"==f&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==f&&null==b&&(b=[]);return b};
-EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,k=b.value;null!=b.xmlValue&&(k=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(k,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var d in b)this.cellProperties[d]||(f[d]=b[d]);return f};
-EditorUi.prototype.getJsonForCell=function(b,f){var k={id:b.getId()};b.vertex&&(k.vertex=1);b.edge&&(k.edge=1);b.connectable||(k.connectable=0);null!=b.parent&&(k.parent=b.parent.getId());null!=f&&(k.previous=f.getId());null!=b.source&&(k.source=b.source.getId());null!=b.target&&(k.target=b.target.getId());null!=b.style&&(k.style=b.style);null!=b.geometry&&(k.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(k.collapsed=1);b.visible||(k.visible=0);null!=b.value&&("object"===typeof b.value&&
+": ",!0,T,!1,!0):V(mxResources.get("markedAsResolved"),!1,T,!0)});X.appendChild(m);null!=M?y.insertBefore(X,M.nextSibling):y.appendChild(X);for(M=0;null!=B.replies&&M<B.replies.length;M++)m=B.replies[M],m.isResolved=B.isResolved,c(m,B.replies,null,F+1,K);null!=n&&(n.comment.id==B.id?(K=B.content,B.content=n.comment.content,G(B,X,n.saveCallback,n.deleteOnCancel),B.content=K):null==n.comment.id&&n.comment.pCommentId==B.id&&(y.appendChild(n.div),G(n.comment,n.div,n.saveCallback,n.deleteOnCancel)));return X}}
+var e=!b.canComment(),f=b.canReplyToReplies(),n=null,p=document.createElement("div");p.className="geCommentsWin";p.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var t=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(t)+7+"px";p.appendChild(y);var v=document.createElement("span");v.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(v,mxResources.get("noCommentsFound"));var D=document.createElement("div");D.className="geToolbarContainer geCommentsToolbar";D.style.height=t;D.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";D.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";t=document.createElement("a");t.className="geButton";if(!e){var A=t.cloneNode();A.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';A.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(A,"click",function(B){function J(){G(M,F,function(K){I(F);b.addComment(K,function(P){K.id=P;l.push(K);O(F)},function(P){E(F);J();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var M=b.newComment("",b.getCurrentUser()),F=c(M,l,null,0);J();B.preventDefault();mxEvent.consume(B)});D.appendChild(A)}A=t.cloneNode();A.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';A.setAttribute("title",mxResources.get("showResolved"));
+A.className="geAdaptiveAsset";var U=!1;mxEvent.addListener(A,"click",function(B){this.className=(U=!U)?"geButton geCheckedBtn":"geButton";u();B.preventDefault();mxEvent.consume(B)});D.appendChild(A);b.commentsRefreshNeeded()&&(A=t.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',A.setAttribute("title",mxResources.get("refresh")),A.className="geAdaptiveAsset",mxEvent.addListener(A,"click",function(B){u();B.preventDefault();mxEvent.consume(B)}),D.appendChild(A));
+b.commentsSaveNeeded()&&(t=t.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',t.setAttribute("title",mxResources.get("save")),t.className="geAdaptiveAsset",mxEvent.addListener(t,"click",function(B){x();B.preventDefault();mxEvent.consume(B)}),D.appendChild(t));p.appendChild(D);var l=[],u=mxUtils.bind(this,function(){this.hasError=!1;if(null!=n)try{n.div=n.div.cloneNode(!0);var B=n.div.querySelector(".geCommentEditTxtArea"),J=n.div.querySelector(".geCommentEditBtns");
+n.comment.content=B.value;B.parentNode.removeChild(B);J.parentNode.removeChild(J)}catch(M){b.handleError(M)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";f=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(M){function F(K){if(null!=K){K.sort(function(R,V){return new Date(R.modifiedDate)-new Date(V.modifiedDate)});for(var P=0;P<K.length;P++)F(K[P].replies)}}
+M.sort(function(K,P){return new Date(K.modifiedDate)-new Date(P.modifiedDate)});y.innerText="";y.appendChild(v);v.style.display="block";l=M;for(M=0;M<l.length;M++)F(l[M].replies),c(l[M],l,null,0,U);null!=n&&null==n.comment.id&&null==n.comment.pCommentId&&(y.appendChild(n.div),G(n.comment,n.div,n.saveCallback,n.deleteOnCancel))},mxUtils.bind(this,function(M){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(M&&M.message?": "+M.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
+u();this.refreshComments=u;D=mxUtils.bind(this,function(){function B(P){var R=M[P.id];if(null!=R)for(H(P,R),R=0;null!=P.replies&&R<P.replies.length;R++)B(P.replies[R])}if(this.window.isVisible()){for(var J=y.querySelectorAll(".geCommentDate"),M={},F=0;F<J.length;F++){var K=J[F];M[K.getAttribute("data-commentId")]=K}for(F=0;F<l.length;F++)B(l[F])}});setInterval(D,6E4);this.refreshCommentsTime=D;this.window=new mxWindow(mxResources.get("comments"),p,g,k,d,q,!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,g,k,d,q,x,C,G,H,I,E){var O=document.createElement("div");O.style.textAlign="center";E=null!=E?E:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=E+
+"px";c.style.lineHeight="1.2em";mxUtils.write(c,g);O.appendChild(c);null!=I&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",g=document.createElement("img"),g.setAttribute("src",I),c.appendChild(g),O.appendChild(c));I=document.createElement("div");I.style.textAlign="center";I.style.whiteSpace="nowrap";var e=document.createElement("input");e.setAttribute("type","checkbox");x=mxUtils.button(x||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(e.checked)});x.className="geBtn";
+null!=G&&(x.innerHTML=G+"<br>"+x.innerHTML,x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.style.width="40%");b.editor.cancelFirst&&I.appendChild(x);var f=mxUtils.button(q||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(e.checked)});I.appendChild(f);null!=C?(f.innerHTML=C+"<br>"+f.innerHTML+"<br>",f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.className="geBtn",f.style.width="40%"):f.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+I.appendChild(x);O.appendChild(I);H?(I.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(e),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),c.appendChild(q),O.appendChild(c),mxEvent.addListener(q,"click",function(n){e.checked=!e.checked;mxEvent.consume(n)})):I.style.marginTop="12px";this.init=function(){f.focus()};this.container=O};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,g,k,d,q){if(null!=g)for(var x=0;x<g.length;x++)null!=g[x]&&(b=this.patchPages(b,g[x],k,d,q));return b};
+EditorUi.prototype.patchPages=function(b,g,k,d,q){var x={},C=[],G={},H={},I={},E={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var O in d[EditorUi.DIFF_UPDATE])x[O]=d[EditorUi.DIFF_UPDATE][O];if(null!=g[EditorUi.DIFF_REMOVE])for(d=0;d<g[EditorUi.DIFF_REMOVE].length;d++)H[g[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=g[EditorUi.DIFF_INSERT])for(d=0;d<g[EditorUi.DIFF_INSERT].length;d++)G[g[EditorUi.DIFF_INSERT][d].previous]=g[EditorUi.DIFF_INSERT][d];if(null!=g[EditorUi.DIFF_UPDATE])for(O in g[EditorUi.DIFF_UPDATE])d=
+g[EditorUi.DIFF_UPDATE][O],null!=d.previous&&(E[d.previous]=O);if(null!=b){var c="";for(d=0;d<b.length;d++){var e=b[d].getId();I[e]=b[d];null!=E[c]||H[e]||null!=g[EditorUi.DIFF_UPDATE]&&null!=g[EditorUi.DIFF_UPDATE][e]&&null!=g[EditorUi.DIFF_UPDATE][e].previous||(E[c]=e);c=e}}var f={},n=mxUtils.bind(this,function(t){var y=null!=t?t.getId():"";if(null!=t&&!f[y]){f[y]=!0;C.push(t);var v=null!=g[EditorUi.DIFF_UPDATE]?g[EditorUi.DIFF_UPDATE][y]:null;null!=v&&(this.updatePageRoot(t),null!=v.name&&t.setName(v.name),
+null!=v.view&&this.patchViewState(t,v.view),null!=v.cells&&this.patchPage(t,v.cells,x[t.getId()],q),!k||null==v.cells&&null==v.view||(t.needsUpdate=!0))}t=E[y];null!=t&&(delete E[y],n(I[t]));t=G[y];null!=t&&(delete G[y],p(t))}),p=mxUtils.bind(this,function(t){t=mxUtils.parseXml(t.data).documentElement;t=new DiagramPage(t);this.updatePageRoot(t);var y=I[t.getId()];null==y?n(t):(this.patchPage(y,this.diffPages([y],[t]),x[y.getId()],q),k&&(y.needsUpdate=!0))});n();for(O in E)n(I[E[O]]),delete E[O];for(O in G)p(G[O]),
+delete G[O];return C};EditorUi.prototype.patchViewState=function(b,g){if(null!=b.viewState&&null!=g){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var k in g)try{this.patchViewStateProperty(b,g,k)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,g,k){b.viewState[k]=JSON.parse(g[k])};
+EditorUi.prototype.createParentLookup=function(b,g){function k(I){var E=d[I];null==E&&(E={inserted:[],moved:{}},d[I]=E);return E}var d={};if(null!=g[EditorUi.DIFF_INSERT])for(var q=0;q<g[EditorUi.DIFF_INSERT].length;q++){var x=g[EditorUi.DIFF_INSERT][q],C=null!=x.parent?x.parent:"",G=null!=x.previous?x.previous:"";k(C).inserted[G]=x}if(null!=g[EditorUi.DIFF_UPDATE])for(var H in g[EditorUi.DIFF_UPDATE])x=g[EditorUi.DIFF_UPDATE][H],null!=x.previous&&(C=x.parent,null==C&&(q=b.getCell(H),null!=q&&(q=
+b.getParent(q),null!=q&&(C=q.getId()))),null!=C&&(k(C).moved[x.previous]=H));return d};
+EditorUi.prototype.patchPage=function(b,g,k,d){var q=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),x=this.createParentLookup(q,g);q.beginUpdate();try{var C=q.updateEdgeParent,G=new mxDictionary,H=[];q.updateEdgeParent=function(p,t){!G.get(p)&&d&&(G.put(p,!0),H.push(p))};var I=x[""],E=null!=I&&null!=I.inserted?I.inserted[""]:null,O=null;null!=E&&(O=this.getCellForJson(E));if(null==O){var c=null!=I&&null!=I.moved?I.moved[""]:null;null!=c&&(O=q.getCell(c))}null!=O&&(q.setRoot(O),
+b.root=O);this.patchCellRecursive(b,q,q.root,x,g);if(null!=g[EditorUi.DIFF_REMOVE])for(var e=0;e<g[EditorUi.DIFF_REMOVE].length;e++){var f=q.getCell(g[EditorUi.DIFF_REMOVE][e]);null!=f&&q.remove(f)}if(null!=g[EditorUi.DIFF_UPDATE]){var n=null!=k&&null!=k.cells?k.cells[EditorUi.DIFF_UPDATE]:null;for(c in g[EditorUi.DIFF_UPDATE])this.patchCell(q,q.getCell(c),g[EditorUi.DIFF_UPDATE][c],null!=n?n[c]:null)}if(null!=g[EditorUi.DIFF_INSERT])for(e=0;e<g[EditorUi.DIFF_INSERT].length;e++)E=g[EditorUi.DIFF_INSERT][e],
+f=q.getCell(E.id),null!=f&&(q.setTerminal(f,q.getCell(E.source),!0),q.setTerminal(f,q.getCell(E.target),!1));q.updateEdgeParent=C;if(d&&0<H.length)for(e=0;e<H.length;e++)q.contains(H[e])&&q.updateEdgeParent(H[e])}finally{q.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,g,k,d,q){if(null!=k){var x=d[k.getId()],C=null!=x&&null!=x.inserted?x.inserted:{};x=null!=x&&null!=x.moved?x.moved:{};for(var G=0,H=g.getChildCount(k),I="",E=0;E<H;E++){var O=g.getChildAt(k,E).getId();null==x[I]&&(null==q[EditorUi.DIFF_UPDATE]||null==q[EditorUi.DIFF_UPDATE][O]||null==q[EditorUi.DIFF_UPDATE][O].previous&&null==q[EditorUi.DIFF_UPDATE][O].parent)&&(x[I]=O);I=O}H=mxUtils.bind(this,function(c,e){var f=null!=c?c.getId():"";null!=c&&e&&(e=
+g.getCell(f),null!=e&&e!=c&&(c=null));null!=c&&(g.getChildAt(k,G)!=c&&g.add(k,c,G),this.patchCellRecursive(b,g,c,d,q),G++);return f});for(I=[null];0<I.length;)if(E=I.shift(),E=H(null!=E?E.child:null,null!=E?E.insert:!1),O=x[E],null!=O&&(delete x[E],I.push({child:g.getCell(O)})),O=C[E],null!=O&&(delete C[E],I.push({child:this.getCellForJson(O),insert:!0})),0==I.length){for(E in x)I.push({child:g.getCell(x[E])}),delete x[E];for(E in C)I.push({child:this.getCellForJson(C[E]),insert:!0}),delete C[E]}}};
+EditorUi.prototype.patchCell=function(b,g,k,d){if(null!=g&&null!=k){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in k?b.setValue(g,k.value):null!=k.xmlValue&&b.setValue(g,mxUtils.parseXml(k.xmlValue).documentElement);null!=d&&null!=d.style||null==k.style||b.setStyle(g,k.style);null!=k.visible&&b.setVisible(g,1==k.visible);null!=k.collapsed&&b.setCollapsed(g,1==k.collapsed);null!=k.vertex&&(g.vertex=1==k.vertex);null!=k.edge&&(g.edge=1==k.edge);null!=k.connectable&&(g.connectable=
+1==k.connectable);null!=k.geometry&&b.setGeometry(g,this.codec.decode(mxUtils.parseXml(k.geometry).documentElement));null!=k.source&&b.setTerminal(g,b.getCell(k.source),!0);null!=k.target&&b.setTerminal(g,b.getCell(k.target),!1);for(var q in k)this.cellProperties[q]||(g[q]=k[q])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var g=null;null!=b&&(g=mxUtils.getXml(b));return g};
+EditorUi.prototype.getNodeForPages=function(b){var g=null;if(null!=this.fileNode&&null!=b){g=this.fileNode.cloneNode(!1);for(var k=0;k<b.length;k++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[k].root));this.editor.graph.saveViewState(b[k].viewState,d);var q=b[k].node.cloneNode(!1);q.appendChild(d);g.appendChild(q)}}return g};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
+EditorUi.prototype.getPagesForNode=function(b,g){var k=this.editor.extractGraphModel(b,!0,!0);null!=k&&(b=k);g=b.getElementsByTagName(g||"diagram");k=[];if(0<g.length)for(b=0;b<g.length;b++){var d=new DiagramPage(g[b]);this.updatePageRoot(d,!0);k.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(d.node,Graph.compressNode(b,!0)),k.push(d));return k};
+EditorUi.prototype.diffPages=function(b,g){var k=[],d=[],q={},x={},C={},G=null;if(null!=b&&null!=g){for(var H=0;H<g.length;H++)x[g[H].getId()]={page:g[H],prev:G},G=g[H];G=null;for(H=0;H<b.length;H++){var I=b[H].getId();g=x[I];if(null==g)d.push(I);else{var E=this.diffPage(b[H],g.page),O={};mxUtils.isEmptyObject(E)||(O.cells=E);E=this.diffViewState(b[H],g.page);mxUtils.isEmptyObject(E)||(O.view=E);if((null!=g.prev?null==G:null!=G)||null!=G&&null!=g.prev&&G.getId()!=g.prev.getId())O.previous=null!=g.prev?
+g.prev.getId():"";null!=g.page.getName()&&b[H].getName()!=g.page.getName()&&(O.name=g.page.getName());mxUtils.isEmptyObject(O)||(C[I]=O)}delete x[b[H].getId()];G=b[H]}for(I in x)g=x[I],k.push({data:mxUtils.getXml(g.page.node),previous:null!=g.prev?g.prev.getId():""});mxUtils.isEmptyObject(C)||(q[EditorUi.DIFF_UPDATE]=C);0<d.length&&(q[EditorUi.DIFF_REMOVE]=d);0<k.length&&(q[EditorUi.DIFF_INSERT]=k)}return q};
+EditorUi.prototype.createCellLookup=function(b,g,k){k=null!=k?k:{};k[b.getId()]={cell:b,prev:g};var d=b.getChildCount();g=null;for(var q=0;q<d;q++){var x=b.getChildAt(q);this.createCellLookup(x,g,k);g=x}return k};
+EditorUi.prototype.diffCellRecursive=function(b,g,k,d,q){d=null!=d?d:{};var x=k[b.getId()];delete k[b.getId()];if(null==x)q.push(b.getId());else{var C=this.diffCell(b,x.cell);if(null!=C.parent||(null!=x.prev?null==g:null!=g)||null!=g&&null!=x.prev&&g.getId()!=x.prev.getId())C.previous=null!=x.prev?x.prev.getId():"";mxUtils.isEmptyObject(C)||(d[b.getId()]=C)}x=b.getChildCount();g=null;for(C=0;C<x;C++){var G=b.getChildAt(C);this.diffCellRecursive(G,g,k,d,q);g=G}return d};
+EditorUi.prototype.diffPage=function(b,g){var k=[],d=[],q={};this.updatePageRoot(b);this.updatePageRoot(g);g=this.createCellLookup(g.root);var x=this.diffCellRecursive(b.root,null,g,x,d),C;for(C in g)b=g[C],k.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(x)||(q[EditorUi.DIFF_UPDATE]=x);0<d.length&&(q[EditorUi.DIFF_REMOVE]=d);0<k.length&&(q[EditorUi.DIFF_INSERT]=k);return q};
+EditorUi.prototype.diffViewState=function(b,g){b=b.viewState;var k=g.viewState,d={};g==this.currentPage&&(k=this.editor.graph.getViewState());if(null!=b&&null!=k)for(var q in this.viewStateProperties)this.diffViewStateProperty(b,k,q,d);return d};EditorUi.prototype.diffViewStateProperty=function(b,g,k,d){b=JSON.stringify(this.getViewStateProperty(b,k));g=JSON.stringify(this.getViewStateProperty(g,k));b!=g&&(d[k]=g)};
+EditorUi.prototype.getViewStateProperty=function(b,g){b=b[g];"backgroundImage"==g&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==g&&null==b&&(b=[]);return b};
+EditorUi.prototype.getCellForJson=function(b){var g=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,k=b.value;null!=b.xmlValue&&(k=mxUtils.parseXml(b.xmlValue).documentElement);g=new mxCell(k,g,b.style);g.connectable=0!=b.connectable;g.collapsed=1==b.collapsed;g.visible=0!=b.visible;g.vertex=1==b.vertex;g.edge=1==b.edge;g.id=b.id;for(var d in b)this.cellProperties[d]||(g[d]=b[d]);return g};
+EditorUi.prototype.getJsonForCell=function(b,g){var k={id:b.getId()};b.vertex&&(k.vertex=1);b.edge&&(k.edge=1);b.connectable||(k.connectable=0);null!=b.parent&&(k.parent=b.parent.getId());null!=g&&(k.previous=g.getId());null!=b.source&&(k.source=b.source.getId());null!=b.target&&(k.target=b.target.getId());null!=b.style&&(k.style=b.style);null!=b.geometry&&(k.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(k.collapsed=1);b.visible||(k.visible=0);null!=b.value&&("object"===typeof b.value&&
"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?k.xmlValue=mxUtils.getXml(b.value):k.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(k[d]=b[d]);return k};
-EditorUi.prototype.diffCell=function(b,f){function k(C){return null!=C&&"object"===typeof C&&"number"===typeof C.nodeType&&"string"===typeof C.nodeName&&"function"===typeof C.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():"";
-if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())d.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())d.target=null!=f.target?f.target.getId():"";k(b.value)&&k(f.value)?b.value.isEqualNode(f.value)||(d.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(k(f.value)?d.xmlValue=mxUtils.getXml(f.value):d.value=null!=f.value?
-f.value:null);b.style!=f.style&&(d.style=f.style);b.visible!=f.visible&&(d.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(d.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var t=this.codec.encode(f.geometry);null!=t&&(d.geometry=mxUtils.getXml(t))}for(var x in b)this.cellProperties[x]||"function"===typeof b[x]||"function"===typeof f[x]||b[x]==f[x]||(d[x]=void 0===f[x]?null:f[x]);for(x in f)x in b||this.cellProperties[x]||"function"===typeof b[x]||"function"===
-typeof f[x]||b[x]==f[x]||(d[x]=void 0===f[x]?null:f[x]);return d};EditorUi.prototype.isObjectEqual=function(b,f,k){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var d=function(t,x){return null==k||k[t]!=x?!0===x?1:x:void 0};return JSON.stringify(b,d)==JSON.stringify(f,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
-mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings()){mxSettings.settings.ui=b;if("kennedy"==b||""==b)mxSettings.settings.darkMode=!1;mxSettings.save()}else{var f=mxSettings.getMainSettings();f.ui=b;"kennedy"==b&&(f.darkMode=!1);localStorage.setItem(".drawio-config",JSON.stringify(f))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?
-mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,f){f?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
-b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],f=0;f<b.length;f++)"string"===typeof b[f]&&(b[f]={name:b[f],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
+EditorUi.prototype.diffCell=function(b,g){function k(C){return null!=C&&"object"===typeof C&&"number"===typeof C.nodeType&&"string"===typeof C.nodeName&&"function"===typeof C.getAttribute}var d={};b.vertex!=g.vertex&&(d.vertex=g.vertex?1:0);b.edge!=g.edge&&(d.edge=g.edge?1:0);b.connectable!=g.connectable&&(d.connectable=g.connectable?1:0);if((null!=b.parent?null==g.parent:null!=g.parent)||null!=b.parent&&null!=g.parent&&b.parent.getId()!=g.parent.getId())d.parent=null!=g.parent?g.parent.getId():"";
+if((null!=b.source?null==g.source:null!=g.source)||null!=b.source&&null!=g.source&&b.source.getId()!=g.source.getId())d.source=null!=g.source?g.source.getId():"";if((null!=b.target?null==g.target:null!=g.target)||null!=b.target&&null!=g.target&&b.target.getId()!=g.target.getId())d.target=null!=g.target?g.target.getId():"";k(b.value)&&k(g.value)?b.value.isEqualNode(g.value)||(d.xmlValue=mxUtils.getXml(g.value)):b.value!=g.value&&(k(g.value)?d.xmlValue=mxUtils.getXml(g.value):d.value=null!=g.value?
+g.value:null);b.style!=g.style&&(d.style=g.style);b.visible!=g.visible&&(d.visible=g.visible?1:0);b.collapsed!=g.collapsed&&(d.collapsed=g.collapsed?1:0);if(!this.isObjectEqual(b.geometry,g.geometry,new mxGeometry)){var q=this.codec.encode(g.geometry);null!=q&&(d.geometry=mxUtils.getXml(q))}for(var x in b)this.cellProperties[x]||"function"===typeof b[x]||"function"===typeof g[x]||b[x]==g[x]||(d[x]=void 0===g[x]?null:g[x]);for(x in g)x in b||this.cellProperties[x]||"function"===typeof b[x]||"function"===
+typeof g[x]||b[x]==g[x]||(d[x]=void 0===g[x]?null:g[x]);return d};EditorUi.prototype.isObjectEqual=function(b,g,k){if(null==b&&null==g)return!0;if(null!=b?null==g:null!=g)return!1;var d=function(q,x){return null==k||k[q]!=x?!0===x?1:x:void 0};return JSON.stringify(b,d)==JSON.stringify(g,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},isMainSettings:function(){return".drawio-config"==mxSettings.key},getMainSettings:function(){var b=localStorage.getItem(".drawio-config");null==b?(b=mxSettings.getDefaults(),delete b.isNew):(b=JSON.parse(b),b.version=mxSettings.currentVersion);return b},getUi:function(){return mxSettings.isMainSettings()?
+mxSettings.settings.ui:mxSettings.getMainSettings().ui},setUi:function(b){if(mxSettings.isMainSettings()){mxSettings.settings.ui=b;if("kennedy"==b||""==b)mxSettings.settings.darkMode=!1;mxSettings.save()}else{var g=mxSettings.getMainSettings();g.ui=b;"kennedy"==b&&(g.darkMode=!1);localStorage.setItem(".drawio-config",JSON.stringify(g))}},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?
+mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,g){g?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=
+b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],g=0;g<b.length;g++)"string"===typeof b[g]&&(b[g]={name:b[g],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,
b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(b){mxSettings.settings.plugins=b},getRecentColors:function(){return mxSettings.settings.recentColors},
setRecentColors:function(b){mxSettings.settings.recentColors=b},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(b){mxSettings.settings.formatWidth=b},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(b){mxSettings.settings.createTarget=b},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(b){mxSettings.settings.pageFormat=b},getUnit:function(){return mxSettings.settings.unit||
mxConstants.POINTS},setUnit:function(b){mxSettings.settings.unit=b},isRulerOn:function(){return mxSettings.settings.isRulerOn},setRulerOn:function(b){mxSettings.settings.isRulerOn=b},getDraftSaveDelay:function(){return mxSettings.settings.draftSaveDelay},setDraftSaveDelay:function(b){mxSettings.settings.draftSaveDelay=b},getDefaults:function(){return{language:"",configVersion:Editor.configVersion,customFonts:[],libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,
-plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,createTarget:"1"==urlParams.sketch||"1"==urlParams["live-ui"],pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.defaultGridColor,darkGridColor:mxGraphView.prototype.defaultDarkGridColor,autosave:!EditorUi.isElectronApp,resizeImages:null,openCounter:0,version:mxSettings.currentVersion,isNew:!0,unit:mxConstants.POINTS,isRulerOn:!1}},init:function(){mxSettings.settings=mxSettings.getDefaults()},
+plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,createTarget:"1"==urlParams.sketch||Editor.enableSimpleTheme,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.defaultGridColor,darkGridColor:mxGraphView.prototype.defaultDarkGridColor,autosave:!EditorUi.isElectronApp,resizeImages:null,openCounter:0,version:mxSettings.currentVersion,isNew:!0,unit:mxConstants.POINTS,isRulerOn:!1}},init:function(){mxSettings.settings=mxSettings.getDefaults()},
save:function(){if(isLocalStorage&&"undefined"!==typeof JSON)try{delete mxSettings.settings.isNew,mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSettings.key,JSON.stringify(mxSettings.settings))}catch(b){}},load:function(){isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key));null==mxSettings.settings&&mxSettings.init()},parse:function(b){b=null!=b?JSON.parse(b):null;null==b||b.configVersion!=Editor.configVersion||null!=Editor.config&&
Editor.config.override?(mxSettings.settings=null,mxSettings.init()):(mxSettings.settings=b,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.customFonts&&(mxSettings.settings.customFonts=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),
null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&
(mxSettings.settings.showStartScreen=!0),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.defaultGridColor),null==mxSettings.settings.darkGridColor&&(mxSettings.settings.darkGridColor=mxGraphView.prototype.defaultDarkGridColor),null==mxSettings.settings.autosave?mxSettings.settings.autosave=!EditorUi.isElectronApp:EditorUi.isElectronApp&&null==localStorage.getItem("._autoSaveTrans_")&&(localStorage.setItem("._autoSaveTrans_","1"),mxSettings.settings.autosave=
-!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePuller=function(b,f){this.file=b;this.sync=f};
-DrawioFilePuller.prototype.start=function(b){var f=mxUtils.bind(this,function(){this.sync.lastModified=this.file.getLastModifiedDate();this.sync.updateStatus()});this.intId=setInterval(mxUtils.bind(this,function(){this.file.getLatestVersionId(mxUtils.bind(this,function(k){k!=this.file.getCurrentRevisionId()?this.file.getLatestVersion(mxUtils.bind(this,function(d){this.file.mergeFile(d,f)}),mxUtils.bind(this,function(){})):f()}),mxUtils.bind(this,function(){}))}),b);this._isConnected=!0};
+!1,mxSettings.save()),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();DrawioFilePuller=function(b,g){this.file=b;this.sync=g};
+DrawioFilePuller.prototype.start=function(b){var g=mxUtils.bind(this,function(){this.sync.lastModified=this.file.getLastModifiedDate();this.sync.updateStatus()});this.intId=setInterval(mxUtils.bind(this,function(){this.file.getLatestVersionId(mxUtils.bind(this,function(k){k!=this.file.getCurrentRevisionId()?this.file.getLatestVersion(mxUtils.bind(this,function(d){this.file.mergeFile(d,g)}),mxUtils.bind(this,function(){})):g()}),mxUtils.bind(this,function(){}))}),b);this._isConnected=!0};
DrawioFilePuller.prototype.stop=function(){clearInterval(this.intId);this._isConnected=!1};DrawioFilePuller.prototype.isConnected=function(){return this._isConnected};DrawioFileSync=function(b){mxEventSource.call(this);this.lastActivity=Date.now();this.clientId=Editor.guid();this.ui=b.ui;this.file=b;this.onlineListener=mxUtils.bind(this,function(){this.updateOnlineState();this.isConnected()&&this.fileChangedNotify()});mxEvent.addListener(window,"online",this.onlineListener);this.realtimeListener=mxUtils.bind(this,function(){this.updateOnlineState()});this.file.addListener("realtimeStateChanged",this.realtimeListener);this.autosaveListener=mxUtils.bind(this,function(){this.updateRealtime()});
-this.ui.editor.addListener("autosaveChanged",this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(f){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",
-this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(f){null!=f.error&&null!=f.error.data&&4004===f.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=
-mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected())if(this.announced)this.fileChangedNotify();else{var f=this.file.getCurrentUser(),k={a:"join"};null!=f&&(k.name=encodeURIComponent(f.displayName),k.uid=f.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(k))));this.file.stats.msgSent++;this.announced=!0}});this.changeListener=mxUtils.bind(this,function(f){this.file.stats.msgReceived++;
-this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var k=this.stringToObject(f);null!=k&&(EditorUi.debug("DrawioFileSync.message",[this],k,f.length,"bytes"),k.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):k.v===DrawioFileSync.PROTOCOL&&null!=k.d&&this.handleMessageData(k.d))}catch(d){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;
-mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;DrawioFileSync.prototype.syncReceiveMessageDelay=50;DrawioFileSync.prototype.cleanupDelay=12E3;DrawioFileSync.prototype.syncChangeCounter=0;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.updateStatusInterval=1E4;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;
-DrawioFileSync.prototype.catchupRetryCount=0;DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=1;DrawioFileSync.prototype.cacheReadyDelay=700;DrawioFileSync.prototype.maxOptimisticRetries=6;DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null;
+this.ui.editor.addListener("autosaveChanged",this.autosaveListener);this.visibleListener=mxUtils.bind(this,function(){"hidden"==document.visibilityState?this.isConnected()&&this.stop():this.start()});mxEvent.addListener(document,"visibilitychange",this.visibleListener);this.activityListener=mxUtils.bind(this,function(g){this.lastActivity=Date.now();this.start()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener);mxEvent.addListener(document,"keypress",
+this.activityListener);mxEvent.addListener(window,"focus",this.activityListener);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.addListener(document,"touchstart",this.activityListener),mxEvent.addListener(document,"touchmove",this.activityListener));this.file.addListener("realtimeMessage",this.activityListener);this.pusherErrorListener=mxUtils.bind(this,function(g){null!=g.error&&null!=g.error.data&&4004===g.error.data.code&&EditorUi.logError("Error: Pusher Limit",null,this.file.getId())});this.connectionListener=
+mxUtils.bind(this,function(){this.updateOnlineState();this.updateStatus();if(this.isConnected())if(this.announced)this.fileChangedNotify();else{var g=this.file.getCurrentUser(),k={a:"join"};null!=g&&(k.name=encodeURIComponent(g.displayName),k.uid=g.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(k))));this.file.stats.msgSent++;this.announced=!0}});this.changeListener=mxUtils.bind(this,function(g){this.file.stats.msgReceived++;
+this.lastActivity=Date.now();if(this.enabled&&!this.file.inConflictState&&!this.file.redirectDialogShowing)try{var k=this.stringToObject(g);null!=k&&(EditorUi.debug("DrawioFileSync.message",[this],k,g.length,"bytes"),k.v>DrawioFileSync.PROTOCOL?this.file.redirectToNewApp(mxUtils.bind(this,function(){})):k.v===DrawioFileSync.PROTOCOL&&null!=k.d&&this.handleMessageData(k.d))}catch(d){this.isConnected()&&this.fileChangedNotify()}})};DrawioFileSync.PROTOCOL=6;DrawioFileSync.ENABLE_SOCKETS="0"!=urlParams.sockets;
+mxUtils.extend(DrawioFileSync,mxEventSource);DrawioFileSync.prototype.maxCacheEntrySize=1E6;DrawioFileSync.prototype.maxSyncMessageSize=9E3;DrawioFileSync.prototype.syncSendMessageDelay=300;DrawioFileSync.prototype.syncReceiveMessageDelay=50;DrawioFileSync.prototype.cleanupDelay=12E3;DrawioFileSync.prototype.syncChangeCounter=0;DrawioFileSync.prototype.enabled=!0;DrawioFileSync.prototype.channelId=null;DrawioFileSync.prototype.channel=null;DrawioFileSync.prototype.catchupRetryCount=0;
+DrawioFileSync.prototype.maxCatchupRetries=15;DrawioFileSync.prototype.maxCacheReadyRetries=1;DrawioFileSync.prototype.cacheReadyDelay=700;DrawioFileSync.prototype.maxOptimisticRetries=6;DrawioFileSync.prototype.inactivityTimeoutSeconds=1800;DrawioFileSync.prototype.lastActivity=null;
DrawioFileSync.prototype.start=function(){null==this.channelId&&(this.channelId=this.file.getChannelId());null==this.key&&(this.key=this.file.getChannelKey());var b=!1;if(DrawioFileSync.PULLING_MODE&&null==this.puller&&"hidden"!=document.visibilityState)null==this.puller&&(this.puller=new DrawioFilePuller(this.file,this)),this.puller.start(this.file.getPullingInterval()),EditorUi.debug("DrawioFileSync.start (Pulling)",[this,"v"+DrawioFileSync.PROTOCOL],"rev",this.file.getCurrentRevisionId()),b=!0;
-else if(!DrawioFileSync.PULLING_MODE&&null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(f){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start",[this,"v"+DrawioFileSync.PROTOCOL],"rev",this.file.getCurrentRevisionId())}catch(f){}this.installListeners()}b=
+else if(!DrawioFileSync.PULLING_MODE&&null==this.pusher&&null!=this.channelId&&"hidden"!=document.visibilityState){this.pusher=this.ui.getPusher();if(null!=this.pusher){try{null!=this.pusher.connection&&this.pusher.connection.bind("error",this.pusherErrorListener)}catch(g){}try{this.pusher.connect(),this.channel=this.pusher.subscribe(this.channelId),EditorUi.debug("DrawioFileSync.start",[this,"v"+DrawioFileSync.PROTOCOL],"rev",this.file.getCurrentRevisionId())}catch(g){}this.installListeners()}b=
!0}b&&window.setTimeout(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.lastActivity=Date.now();this.resetUpdateStatusThread();this.updateOnlineState();this.updateStatus()},0));this.updateRealtime()};
DrawioFileSync.prototype.updateRealtime=function(){this.isValidState()&&(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()&&this.isRealtimeActive()?this.file.isRealtime()||this.initRealtime():this.file.isRealtime()&&this.resetRealtime(),DrawioFileSync.ENABLE_SOCKETS&&this.file.isRealtime()&&null==this.p2pCollab&&null!=this.channelId?(this.p2pCollab=new P2PCollab(this.ui,this,this.channelId),this.p2pCollab.joinFile()):this.file.isRealtime()||null==this.p2pCollab||(this.p2pCollab.destroy(),
this.p2pCollab=null))};DrawioFileSync.prototype.initRealtime=function(){this.file.theirPages=this.ui.clonePages(this.ui.pages);this.file.ownPages=this.ui.clonePages(this.ui.pages);this.snapshot=this.file.ownPages};DrawioFileSync.prototype.resetRealtime=function(){var b=this.file.getShadowPages();null!=b&&(b=this.ui.diffPages(b,this.file.ownPages),this.file.patch([b]));this.sendLocalChanges();this.cleanup();this.file.theirPages=null;this.snapshot=this.file.ownPages=null};
DrawioFileSync.prototype.isConnected=function(){return null!=this.pusher&&null!=this.pusher.connection?"connected"==this.pusher.connection.state:null!=this.puller?this.puller.isConnected():!1};
-DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(d){mxEvent.addListener(d,"click",mxUtils.bind(this,function(t){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){t=this.file.getRealtimeState();var x=mxResources.get("disconnected");this.file.invalidChecksum?x=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?x=mxResources.get("offline"):1==t&&(x=mxResources.get("online"));
-this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(x))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var f=document.createElement("a");f.className="geButton geAdaptiveAsset";f.style.position="absolute";f.style.display="inline-block";f.style.verticalAlign=
-"bottom";f.style.color="#666";f.style.top="6px";f.style.right="atlas"!=uiTheme?null!=this.ui.darkModeElement?"90px":"70px":"50px";f.style.padding="2px";f.style.fontSize="8pt";f.style.verticalAlign="middle";f.style.textDecoration="none";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";f.style.backgroundSize="16px 16px";f.style.width="16px";f.style.height="16px";mxUtils.setOpacity(f,60);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
-function(d){d.preventDefault()}));b(f);this.ui.toolbarContainer.appendChild(f);this.collaboratorsElement=f}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var k=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),k=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),k=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&&
-this.file.isRealtimeSupported()&&(f=this.file.getRealtimeError(),k=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==k?(this.collaboratorsElement.style.display="none",k=Editor.syncImage):(k=Editor.syncProblemImage,b=null!=f&&null!=f.message?b+(" ("+f.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),k=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+
+DrawioFileSync.prototype.updateOnlineState=function(){if("1"!=urlParams.embedRT){var b=mxUtils.bind(this,function(d){mxEvent.addListener(d,"click",mxUtils.bind(this,function(q){if(this.file.isRealtimeEnabled()&&this.file.isRealtimeSupported()){q=this.file.getRealtimeState();var x=mxResources.get("disconnected");this.file.invalidChecksum?x=mxResources.get("error")+": "+mxResources.get("checksum"):this.ui.isOffline(!0)||!this.isConnected()?x=mxResources.get("offline"):1==q&&(x=mxResources.get("online"));
+this.ui.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(x))}else this.enabled=!this.enabled,this.ui.updateButtonContainer(),this.resetUpdateStatusThread(),this.updateOnlineState(),this.updateStatus(),!this.file.inConflictState&&this.enabled&&this.fileChangedNotify()}))});if(null!=this.ui.toolbarContainer&&null==this.collaboratorsElement){var g=document.createElement("a");g.className="geButton geAdaptiveAsset";g.style.position="absolute";g.style.display="inline-block";g.style.verticalAlign=
+"bottom";g.style.color="#666";g.style.top="6px";g.style.right="atlas"!=uiTheme?null!=this.ui.darkModeElement?"90px":"70px":"50px";g.style.padding="2px";g.style.fontSize="8pt";g.style.verticalAlign="middle";g.style.textDecoration="none";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";g.style.backgroundSize="16px 16px";g.style.width="16px";g.style.height="16px";mxUtils.setOpacity(g,60);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
+function(d){d.preventDefault()}));b(g);this.ui.toolbarContainer.appendChild(g);this.collaboratorsElement=g}if(null!=this.collaboratorsElement){this.collaboratorsElement.style.display="inline-block";var k=Editor.cloudImage;b="";this.enabled?this.file.invalidChecksum?(b=mxResources.get("error")+": "+mxResources.get("checksum"),k=Editor.syncProblemImage):this.ui.isOffline(!0)||!this.isConnected()?(b=mxResources.get("offline"),k=Editor.cloudOffImage):(b=mxResources.get("online"),this.file.isRealtimeEnabled()&&
+this.file.isRealtimeSupported()&&(g=this.file.getRealtimeError(),k=this.file.getRealtimeState(),b=mxResources.get("realtimeCollaboration"),1==k?(this.collaboratorsElement.style.display="none",k=Editor.syncImage):(k=Editor.syncProblemImage,b=null!=g&&null!=g.message?b+(" ("+g.message+")"):b+(" ("+mxResources.get("disconnected")+")")))):(b=mxResources.get("disconnected"),k=Editor.cloudOffImage);this.collaboratorsElement.setAttribute("title",b);this.collaboratorsElement.style.backgroundImage="url("+
k+")"}}};
-DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var f=this.file.isRevisionHistorySupported(),k=
-this.lastMessage;this.lastMessage=null;null!=k&&40<k.length&&(k=k.substring(0,40)+"...");b=mxResources.get("lastChange",[b]);this.ui.editor.setStatus('<div title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>")+(null!=k?' <span title="'+mxUtils.htmlEntities(k)+
-'">('+mxUtils.htmlEntities(k)+")</span>":""));k=this.ui.statusContainer.getElementsByTagName("div");0<k.length&&f&&(k[0].style.display="inline-block",f&&(k[0].style.cursor="pointer",k[0].style.textDecoration="underline",mxEvent.addListener(k[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))));f=this.ui.statusContainer.getElementsByTagName("span");if(0<f.length){var d=f[0];d.style.opacity="0";mxUtils.setPrefixedStyle(d.style,"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(d,100);mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);window.setTimeout(mxUtils.bind(this,function(){this.updateStatus()}),1E3)}),this.updateStatusInterval/2)}),0)}this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};
-DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),this.updateStatusInterval))};DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)};
-DrawioFileSync.prototype.handleMessageData=function(b){if("desc"==b.a)this.file.savingFile||this.reloadDescriptor();else if("join"==b.a||"leave"==b.a)"join"==b.a&&this.file.stats.joined++,null!=b.name&&(this.lastMessage=mxResources.get("join"==b.a?"userJoined":"userLeft",[decodeURIComponent(b.name)]),this.resetUpdateStatusThread(),this.updateStatus());else if("change"==b.a)this.receiveRemoteChanges(b);else if(null!=b.m){var f=new Date(b.m);if(null==this.lastMessageModified||this.lastMessageModified<
-f)this.lastMessageModified=f,this.fileChangedNotify(b)}};DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing};
-DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){this.file.getLatestVersion(mxUtils.bind(this,function(f){this.reloadThread=null;if(null!=f){var k=this.file.getCurrentRevisionId(),d=f.getCurrentRevisionId();k==d?this.optimisticSync(b+1):this.file.mergeFile(f,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),
+DrawioFileSync.prototype.updateStatus=function(){this.isConnected()&&null!=this.lastActivity&&(Date.now()-this.lastActivity)/1E3>this.inactivityTimeoutSeconds&&this.stop();if(!(this.file.isModified()||this.file.inConflictState||null!=this.file.autosaveThread||this.file.savingFile||this.file.redirectDialogShowing))if(this.enabled&&null!=this.ui.statusContainer){var b=this.ui.timeSince(new Date(this.lastModified));null==b&&(b=mxResources.get("lessThanAMinute"));var g=this.lastMessage;this.lastMessage=null;
+null!=g&&40<g.length&&(g=g.substring(0,40)+"...");b=mxResources.get("lastChange",[b]);var k=this.file.isRevisionHistorySupported()?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+k+'title="'+mxUtils.htmlEntities(b)+'">'+mxUtils.htmlEntities(b)+"</div>"+(this.file.isEditable()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")+(this.isConnected()?"":'<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("disconnected"))+"</div>")+
+(null!=g?' <div data-effect="fade" title="'+mxUtils.htmlEntities(g)+'">('+mxUtils.htmlEntities(g)+")</div>":""));this.resetUpdateStatusThread()}else this.file.addAllSavedStatus()};DrawioFileSync.prototype.resetUpdateStatusThread=function(){null!=this.updateStatusThread&&window.clearInterval(this.updateStatusThread);null!=this.channel&&(this.updateStatusThread=window.setInterval(mxUtils.bind(this,function(){this.updateStatus()}),Editor.updateStatusInterval))};
+DrawioFileSync.prototype.installListeners=function(){null!=this.pusher&&null!=this.pusher.connection&&this.pusher.connection.bind("state_change",this.connectionListener);null!=this.channel&&this.channel.bind("changed",this.changeListener)};
+DrawioFileSync.prototype.handleMessageData=function(b){if("desc"==b.a)this.file.savingFile||this.reloadDescriptor();else if("join"==b.a||"leave"==b.a)"join"==b.a&&this.file.stats.joined++,null!=b.name&&(this.lastMessage=mxResources.get("join"==b.a?"userJoined":"userLeft",[decodeURIComponent(b.name)]),this.resetUpdateStatusThread(),this.updateStatus());else if("change"==b.a)this.receiveRemoteChanges(b);else if(null!=b.m){var g=new Date(b.m);if(null==this.lastMessageModified||this.lastMessageModified<
+g)this.lastMessageModified=g,this.fileChangedNotify(b)}};DrawioFileSync.prototype.isValidState=function(){return this.ui.getCurrentFile()==this.file&&this.file.sync==this&&!this.file.invalidChecksum&&!this.file.redirectDialogShowing};
+DrawioFileSync.prototype.optimisticSync=function(b){null==this.reloadThread&&(b=null!=b?b:0,b<this.maxOptimisticRetries&&(this.reloadThread=window.setTimeout(mxUtils.bind(this,function(){this.file.getLatestVersion(mxUtils.bind(this,function(g){this.reloadThread=null;if(null!=g){var k=this.file.getCurrentRevisionId(),d=g.getCurrentRevisionId();k==d?this.optimisticSync(b+1):this.file.mergeFile(g,mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus()}))}}),
mxUtils.bind(this,function(){this.reloadThread=null}))}),(b+1)*this.file.optimisticSyncDelay)),EditorUi.debug("DrawioFileSync.optimisticSync",[this],"attempt",b,"of",this.maxOptimisticRetries))};
-DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var f=this.fileChanged(mxUtils.bind(this,function(k){this.updateStatus()}),mxUtils.bind(this,function(k){this.file.handleFileError(k)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=f}),!0)};
+DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if(this.file.savingFile)this.remoteFileChanged=!0;else if(null!=b&&"optimistic"==b.type)this.optimisticSync();else var g=this.fileChanged(mxUtils.bind(this,function(k){this.updateStatus()}),mxUtils.bind(this,function(k){this.file.handleFileError(k)}),mxUtils.bind(this,function(){return!this.file.savingFile&&this.notifyThread!=g}),!0)};
DrawioFileSync.prototype.localFileChanged=function(){this.file.isRealtime()&&(window.clearTimeout(this.triggerSendThread),this.localFileWasChanged=!0,this.scheduleCleanup(!0),this.triggerSendThread=window.setTimeout(mxUtils.bind(this,function(){this.sendLocalChanges()}),Math.min(this.file.autosaveDelay,this.syncSendMessageDelay-20)))};
-DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var f=this.clientId+"."+this.syncChangeCounter++,k=this.createMessage({a:"change",c:b,id:f,t:Date.now()});f=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(k):"1"==urlParams.dev?(k=encodeURIComponent(this.objectToString(k)),0==this.maxSyncMessageSize||k.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+k):f=!0):f=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
-"changes",b,f?"(skipped)":"")}};
-DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(t,x){return t.id<x.id?-1:t.id>x.id?1:0});for(var f=null,k=0;k<this.receivedData.length;k++){var d=JSON.stringify(this.receivedData[k].c);d!=f&&this.doReceiveRemoteChanges(this.receivedData[k].c);
-f=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(f){this.file.handleFileError(f)}))}),this.cleanupDelay))};
-DrawioFileSync.prototype.cleanup=function(b,f,k){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var d=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",d,"checkFile",k);k?this.file.getLatestVersion(mxUtils.bind(this,function(t){try{if(this.isValidState()&&
-!this.file.inConflictState&&this.file.isRealtime()){var x=this.ui.getPagesForXml(t.data);d=[this.ui.diffPages(this.ui.pages,x),this.ui.diffPages(x,this.file.ownPages)];this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",t,"patches",d)}null!=b&&b()}catch(C){null!=f&&f(C)}}),f):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",k,"modified",this.file.isModified()))};
+DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatches(b)){var g=this.clientId+"."+this.syncChangeCounter++,k=this.createMessage({a:"change",c:b,id:g,t:Date.now()});g=!1;null!=this.p2pCollab?this.p2pCollab.sendDiff(k):"1"==urlParams.dev?(k=encodeURIComponent(this.objectToString(k)),0==this.maxSyncMessageSize||k.length<this.maxSyncMessageSize?mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+k):g=!0):g=!0;EditorUi.debug("DrawioFileSync.doSendLocalChanges",[this],
+"changes",b,g?"(skipped)":"")}};
+DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(q,x){return q.id<x.id?-1:q.id>x.id?1:0});for(var g=null,k=0;k<this.receivedData.length;k++){var d=JSON.stringify(this.receivedData[k].c);d!=g&&this.doReceiveRemoteChanges(this.receivedData[k].c);
+g=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(g){this.file.handleFileError(g)}))}),this.cleanupDelay))};
+DrawioFileSync.prototype.cleanup=function(b,g,k){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var d=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",d,"checkFile",k);k?this.file.getLatestVersion(mxUtils.bind(this,function(q){try{if(this.isValidState()&&
+!this.file.inConflictState&&this.file.isRealtime()){var x=this.ui.getPagesForXml(q.data);d=[this.ui.diffPages(this.ui.pages,x),this.ui.diffPages(x,this.file.ownPages)];this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",q,"patches",d)}null!=b&&b()}catch(C){null!=g&&g(C)}}),g):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",k,"modified",this.file.isModified()))};
DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
-DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var k in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][k];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][k]={};var t=f[EditorUi.DIFF_UPDATE][k];t.cells={};t.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return f};
-DrawioFileSync.prototype.patchRealtime=function(b,f,k){var d=null;if(this.file.isRealtime()){d=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var t=this.extractRemove(this.extractLocal(d)),x=(null==k?b:b.concat(k)).concat([t]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,x,!0,f);mxUtils.isEmptyObject(t)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",k,"all",d,"local",
-t,"applied",x)}return d};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
-DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([f])}this.localFileWasChanged=!1}catch(k){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
+DrawioFileSync.prototype.extractRemove=function(b){var g={};null!=b[EditorUi.DIFF_REMOVE]&&(g[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var k in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][k];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==g[EditorUi.DIFF_UPDATE]&&(g[EditorUi.DIFF_UPDATE]={});g[EditorUi.DIFF_UPDATE][k]={};var q=g[EditorUi.DIFF_UPDATE][k];q.cells={};q.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return g};
+DrawioFileSync.prototype.patchRealtime=function(b,g,k){var d=null;if(this.file.isRealtime()){d=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var q=this.extractRemove(this.extractLocal(d)),x=(null==k?b:b.concat(k)).concat([q]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,x,!0,g);mxUtils.isEmptyObject(q)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",g,"own",k,"all",d,"local",
+q,"applied",x)}return d};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
+DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),g=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,g,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([g])}this.localFileWasChanged=!1}catch(k){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
b,k)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,f,k,d,t,x){try{this.file.stats.merged++;this.lastModified=new Date;var C=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var G=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(G,this.ui.pages):null;var H=this.file.isRealtime()?this.ui.diffPages(G,this.file.ownPages):null;G=this.ui.applyPatches(G,b);var I=null==f?null:this.ui.getHashValueForPages(G);
-this.file.setShadowPages(G);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",H,"checksum",f,"current",I,"valid",f==I,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",C,"etag",this.file.getDescriptorEtag(k));if(null!=f&&f!=I){var F=this.ui.hashValue(C),O=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(t,b,"From: "+O+"\nTo: "+F+"\nChecksum: "+f+"\nCurrent: "+I,C,"merge",
-f,I,C);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(G)]);return}null==this.patchRealtime(b,null,H)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);this.file.backupPatch=null;null!=d&&d(!0)}catch(g){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=t&&t(g);try{if(this.file.errorReportsEnabled)O=this.ui.hashValue(this.file.getCurrentRevisionId()),F=this.ui.hashValue(C),this.file.sendErrorReport("Error in merge","From: "+O+"\nTo: "+F+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),g);else{var c=this.file.getCurrentUser(),e=null!=c?c.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),e,g)}}catch(n){}}};
-DrawioFileSync.prototype.fileChanged=function(b,f,k,d){var t=window.setTimeout(mxUtils.bind(this,function(){null!=k&&k()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(x){null!=k&&k()||(this.isValidState()?this.catchup(x,b,f,k):null!=f&&f())}),f):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=t};
+DrawioFileSync.prototype.merge=function(b,g,k,d,q,x){try{this.file.stats.merged++;this.lastModified=new Date;var C=this.file.getDescriptorRevisionId(k);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var G=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(G,this.ui.pages):null;var H=this.file.isRealtime()?this.ui.diffPages(G,this.file.ownPages):null;G=this.ui.applyPatches(G,b);var I=null==g?null:this.ui.getHashValueForPages(G);
+this.file.setShadowPages(G);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",H,"checksum",g,"current",I,"valid",g==I,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",C,"etag",this.file.getDescriptorEtag(k));if(null!=g&&g!=I){var E=this.ui.hashValue(C),O=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(q,b,"From: "+O+"\nTo: "+E+"\nChecksum: "+g+"\nCurrent: "+I,C,"merge",
+g,I,C);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(G)]);return}null==this.patchRealtime(b,null,H)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),k);this.file.backupPatch=null;null!=d&&d(!0)}catch(f){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
+null!=q&&q(f);try{if(this.file.errorReportsEnabled)O=this.ui.hashValue(this.file.getCurrentRevisionId()),E=this.ui.hashValue(C),this.file.sendErrorReport("Error in merge","From: "+O+"\nTo: "+E+"\nChecksum: "+g+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),f);else{var c=this.file.getCurrentUser(),e=null!=c?c.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),e,f)}}catch(n){}}};
+DrawioFileSync.prototype.fileChanged=function(b,g,k,d){var q=window.setTimeout(mxUtils.bind(this,function(){null!=k&&k()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(x){null!=k&&k()||(this.isValidState()?this.catchup(x,b,g,k):null!=g&&g())}),g):null!=g&&g())}),d?this.cacheReadyDelay:0);return this.notifyThread=q};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(b,f,k,d){if(null!=b&&(null==d||!d())){var t=this.file.getCurrentRevisionId(),x=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",t,"to",x,"valid",this.isValidState());if(t==x)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var C=this.file.getDescriptorSecret(b);if(null==C||"1"==urlParams.lockdown)this.reload(f,k,d);else{var G=0,H=!1,I=mxUtils.bind(this,function(){if(null==
-d||!d())if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var F=!0,O=window.setTimeout(mxUtils.bind(this,function(){F=!1;this.reload(f,k,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(t)+"&to="+encodeURIComponent(x)+(null!=C?"&secret="+encodeURIComponent(C):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=c.getText().length;window.clearTimeout(O);if(F&&
-(null==d||!d()))if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var e=null,g=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[c],"status",c.getStatus(),"cacheReadyRetryCount",G,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var n=JSON.parse(c.getText());if(null!=n&&0<n.length)for(var p=0;p<n.length;p++){var v=this.stringToObject(n[p]);if(v.v>DrawioFileSync.PROTOCOL){H=!0;g=[];break}else if(v.v===
-DrawioFileSync.PROTOCOL&&null!=v.d)e=v.d.checksum,g.push(v.d.patch);else{H=!0;g=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[n],"failed",H,"temp",g,"checksum",e)}catch(y){g=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<g.length?(this.file.stats.cacheHits++,this.merge(g,e,b,f,k,d)):G<=this.maxCacheReadyRetries-1&&!H&&401!=c.getStatus()&&503!=c.getStatus()&&410!=c.getStatus()?(G++,this.file.stats.cacheMiss++,window.setTimeout(I,(G+1)*this.cacheReadyDelay)):
-(this.file.stats.cacheFail++,this.reload(f,k,d))}catch(y){null!=k&&k(y)}}else null!=k&&k()}))}else null!=k&&k()});window.setTimeout(I,this.cacheReadyDelay)}}else null!=k&&k()}};DrawioFileSync.prototype.reload=function(b,f,k,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(t){null!=f&&f(t)}),k,d)};
-DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),k=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
+DrawioFileSync.prototype.catchup=function(b,g,k,d){if(null!=b&&(null==d||!d())){var q=this.file.getCurrentRevisionId(),x=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",q,"to",x,"valid",this.isValidState());if(q==x)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=g&&g(!0);else if(this.isValidState()){var C=this.file.getDescriptorSecret(b);if(null==C||"1"==urlParams.lockdown)this.reload(g,k,d);else{var G=0,H=!1,I=mxUtils.bind(this,function(){if(null==
+d||!d())if(q!=this.file.getCurrentRevisionId())null!=g&&g(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var E=!0,O=window.setTimeout(mxUtils.bind(this,function(){E=!1;this.reload(g,k,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(q)+"&to="+encodeURIComponent(x)+(null!=C?"&secret="+encodeURIComponent(C):""),mxUtils.bind(this,function(c){this.file.stats.bytesReceived+=c.getText().length;window.clearTimeout(O);if(E&&
+(null==d||!d()))if(q!=this.file.getCurrentRevisionId())null!=g&&g(!0);else if(this.isValidState()){var e=null,f=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[c],"status",c.getStatus(),"cacheReadyRetryCount",G,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=c.getStatus()&&299>=c.getStatus()&&0<c.getText().length)try{var n=JSON.parse(c.getText());if(null!=n&&0<n.length)for(var p=0;p<n.length;p++){var t=this.stringToObject(n[p]);if(t.v>DrawioFileSync.PROTOCOL){H=!0;f=[];break}else if(t.v===
+DrawioFileSync.PROTOCOL&&null!=t.d)e=t.d.checksum,f.push(t.d.patch);else{H=!0;f=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[n],"failed",H,"temp",f,"checksum",e)}catch(y){f=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<f.length?(this.file.stats.cacheHits++,this.merge(f,e,b,g,k,d)):G<=this.maxCacheReadyRetries-1&&!H&&401!=c.getStatus()&&503!=c.getStatus()&&410!=c.getStatus()?(G++,this.file.stats.cacheMiss++,window.setTimeout(I,(G+1)*this.cacheReadyDelay)):
+(this.file.stats.cacheFail++,this.reload(g,k,d))}catch(y){null!=k&&k(y)}}else null!=k&&k()}))}else null!=k&&k()});window.setTimeout(I,this.cacheReadyDelay)}}else null!=k&&k()}};DrawioFileSync.prototype.reload=function(b,g,k,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(q){null!=g&&g(q)}),k,d)};
+DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var g=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),k=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(k)+"&msg="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",k)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
-DrawioFileSync.prototype.createToken=function(b,f,k){var d=!0,t=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(x){window.clearTimeout(t);d&&(200<=x.getStatus()&&299>=x.getStatus()?f(x.getText()):k({code:x.getStatus(),message:"Token Error "+x.getStatus()}))}))};
+DrawioFileSync.prototype.createToken=function(b,g,k){var d=!0,q=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(x){window.clearTimeout(q);d&&(200<=x.getStatus()&&299>=x.getStatus()?g(x.getText()):k({code:x.getStatus(),message:"Token Error "+x.getStatus()}))}))};
DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})}EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
-DrawioFileSync.prototype.fileSaved=function(b,f,k,d,t){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var x=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),C=this.file.getDescriptorSecret(this.file.getDescriptor()),G=this.file.getDescriptorRevisionId(f),H=this.file.getCurrentRevisionId();if(null==
-C||null==t||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(x),function(){}),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",G,"to",H,"etag",this.file.getCurrentEtag());else{var I=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);var F=this.ui.getHashValueForPages(b),O=this.objectToString(this.createMessage({patch:I,checksum:F}));this.file.stats.bytesSent+=O.length;
-this.file.stats.msgSent++;var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(G)+"&to="+encodeURIComponent(H)+"&msg="+encodeURIComponent(x)+(null!=C?"&secret="+encodeURIComponent(C):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(O.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(O):"")+(null!=t?"&token="+encodeURIComponent(t):
-""),mxUtils.bind(this,function(g){window.clearTimeout(e);c&&(200<=g.getStatus()&&299>=g.getStatus()?null!=k&&k():d({code:g.getStatus(),message:g.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",I,O.length,"bytes","from",G,"to",H,"etag",this.file.getCurrentEtag(),"checksum",F)}}this.file.setShadowPages(b);this.scheduleCleanup()};
+DrawioFileSync.prototype.fileSaved=function(b,g,k,d,q){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var x=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),C=this.file.getDescriptorSecret(this.file.getDescriptor()),G=this.file.getDescriptorRevisionId(g),H=this.file.getCurrentRevisionId();if(null==
+C||null==q||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(x),function(){}),null!=k&&k(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",G,"to",H,"etag",this.file.getCurrentEtag());else{var I=this.ui.diffPages(this.file.getShadowPages(),b);g=this.file.getDescriptorSecret(g);var E=this.ui.getHashValueForPages(b),O=this.objectToString(this.createMessage({patch:I,checksum:E}));this.file.stats.bytesSent+=O.length;
+this.file.stats.msgSent++;var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(G)+"&to="+encodeURIComponent(H)+"&msg="+encodeURIComponent(x)+(null!=C?"&secret="+encodeURIComponent(C):"")+(null!=g?"&last-secret="+encodeURIComponent(g):"")+(O.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(O):"")+(null!=q?"&token="+encodeURIComponent(q):
+""),mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(200<=f.getStatus()&&299>=f.getStatus()?null!=k&&k():d({code:f.getStatus(),message:f.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",I,O.length,"bytes","from",G,"to",H,"etag",this.file.getCurrentEtag(),"checksum",E)}}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
-DrawioFileSync.prototype.fileConflict=function(b,f,k){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,k):this.fileChanged(f,k)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
+DrawioFileSync.prototype.fileConflict=function(b,g,k){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,g,k):this.fileChanged(g,k)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=k&&k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher?(EditorUi.debug("DrawioFileSync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null)):null!=this.puller&&(EditorUi.debug("DrawioFileSync.stop (Pulling)",
[this]),this.puller.stop(),this.puller=null);this.updateOnlineState();this.updateStatus()};
-DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),f={a:"leave"};null!=b&&(f.name=encodeURIComponent(b.displayName),f.uid=b.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(f))));this.file.stats.msgSent++}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged",
+DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.file.getCurrentUser(),g={a:"leave"};null!=b&&(g.name=encodeURIComponent(b.displayName),g.uid=b.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(g))));this.file.stats.msgSent++}this.stop();null!=this.onlineListener&&(mxEvent.removeListener(window,"online",this.onlineListener),this.onlineListener=null);null!=this.autosaveListener&&(this.ui.editor.addListener("autosaveChanged",
this.autosaveListener),this.autosaveListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,
-"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,f,k){EditorUi.call(this,b,f,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var d=this.getCurrentFile();if(null!=d&&d.isModified()){var t={category:"DISCARD-FILE-"+d.getHash(),action:(d.savingFile?"saving":"")+(d.savingFile&&null!=d.savingFileTime?"_"+Math.round((Date.now()-d.savingFileTime.getTime())/1E3):"")+(null!=d.saveLevel?"-sl_"+d.saveLevel:"")+"-age_"+(null!=
+"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,g,k){EditorUi.call(this,b,g,null!=k?k:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var d=this.getCurrentFile();if(null!=d&&d.isModified()){var q={category:"DISCARD-FILE-"+d.getHash(),action:(d.savingFile?"saving":"")+(d.savingFile&&null!=d.savingFileTime?"_"+Math.round((Date.now()-d.savingFileTime.getTime())/1E3):"")+(null!=d.saveLevel?"-sl_"+d.saveLevel:"")+"-age_"+(null!=
d.ageStart?Math.round((Date.now()-d.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(d.isAutosave()?"":"-noauto")+"-open_"+(null!=d.opened?Math.round((Date.now()-d.opened.getTime())/1E3):"x")+"-save_"+(null!=d.lastSaved?Math.round((Date.now()-d.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=d.lastChanged?Math.round((Date.now()-d.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=d.sync?"client_"+d.sync.clientId:"nosync"};
-d.constructor==DriveFile&&null!=d.desc&&null!=this.drive&&(t.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+d.desc.headRevisionId+"-mod_"+d.desc.modifiedDate+"-size_"+d.getSize()+"-mime_"+d.desc.mimeType);EditorUi.logEvent(t)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
+d.constructor==DriveFile&&null!=d.desc&&null!=this.drive&&(q.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+d.desc.headRevisionId+"-mod_"+d.desc.modifiedDate+"-size_"+d.getSize()+"-mime_"+d.desc.mimeType);EditorUi.logEvent(q)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.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=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(d,t,x){if("1"==urlParams.openInSameWin||navigator.standalone)x();else{var C=null;try{C=window.open(d)}catch(G){}null==C||void 0===C?this.showDialog((new PopupDialog(this,d,t,x)).container,320,140,!0,!0):null!=t&&t()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(d,q,x){if("1"==urlParams.openInSameWin||navigator.standalone)x();else{var C=null;try{C=window.open(d)}catch(G){}null==C||void 0===C?this.showDialog((new PopupDialog(this,d,q,x)).container,320,140,!0,!0):null!=q&&q()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(d){try{d(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL=window.DRAWIO_BASE_URL+"/js/dropbox/Dropbox-sdk.min.js";
App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":window.DRAWIO_BASE_URL+"/js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL=window.DRAWIO_BASE_URL+"/js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/simplepeer/simplepeer9.10.0.min.js";
App.GOOGLE_APIS="drive-share";App.startTime=new Date;
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",p1:"plugins/p1.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",voice:"plugins/voice.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",electron:"plugins/electron.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",
"import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",tickets:"plugins/tickets.js",flow:"plugins/flow.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex voice tips svgdata number sql props text anim update trees replay anon tickets flow webcola tags".split(" ");
-App.loadScripts=function(b,f){for(var k=b.length,d=0;d<b.length;d++)mxscript(b[d],function(){0==--k&&null!=f&&f()})};
-App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var f=document.cookie.split(";"),k=0;k<f.length;k++){var d=mxUtils.trim(f[k]);if("MODE="==d.substring(0,5)){b=d.substring(5);break}}null!=b&&isLocalStorage&&(f=new Date,f.setYear(f.getFullYear()-1),document.cookie="MODE=; expires="+f.toUTCString(),localStorage.setItem(".mode",b))}return b};
+App.loadScripts=function(b,g){for(var k=b.length,d=0;d<b.length;d++)mxscript(b[d],function(){0==--k&&null!=g&&g()})};
+App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var g=document.cookie.split(";"),k=0;k<g.length;k++){var d=mxUtils.trim(g[k]);if("MODE="==d.substring(0,5)){b=d.substring(5);break}}null!=b&&isLocalStorage&&(g=new Date,g.setYear(g.getFullYear()-1),document.cookie="MODE=; expires="+g.toUTCString(),localStorage.setItem(".mode",b))}return b};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
-App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistrations().then(function(k){if(null!=k&&0<k.length){for(var d=0;d<k.length;d++)k[d].unregister();null!=b&&b()}})["catch"](function(){null!=f&&f()})};App.isSameDomain=function(b){var f=document.createElement("a");f.href=b;return f.protocol===window.location.protocol||f.host===window.location.host};App.isBuiltInPlugin=function(b){for(var f in App.pluginRegistry)if(App.pluginRegistry[f]==b)return!0;return!1};
-App.main=function(b,f){function k(I){mxUtils.getAll("1"!=urlParams.dev?[I]:[I,STYLE_PATH+"/default.xml"],function(F){function O(){var p=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
+App.clearServiceWorker=function(b,g){navigator.serviceWorker.getRegistrations().then(function(k){if(null!=k&&0<k.length){for(var d=0;d<k.length;d++)k[d].unregister();null!=b&&b()}})["catch"](function(){null!=g&&g()})};App.isSameDomain=function(b){var g=document.createElement("a");g.href=b;return g.protocol===window.location.protocol||g.host===window.location.host};App.isBuiltInPlugin=function(b){for(var g in App.pluginRegistry)if(App.pluginRegistry[g]==b)return!0;return!1};
+App.main=function(b,g){function k(I){mxUtils.getAll("1"!=urlParams.dev?[I]:[I,STYLE_PATH+"/default.xml"],function(E){function O(){var p=null!=g?g():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(p);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[p,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(F[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var c=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
-if(null!=c){EditorUi.debug("Setting configuration",JSON.stringify(c));if(null!=c.merge){var e=localStorage.getItem(Editor.configurationKey);if(null!=e)try{var g=JSON.parse(e),n;for(n in c.merge)g[n]=c.merge[n];c=g}catch(p){window.location.hash="",alert(p)}else c=c.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(c)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(p){window.location.hash=
-"",alert(p)}1<F.length&&(Graph.prototype.defaultThemes["default-style2"]=F[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=F[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?O():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],O))},function(F){F=document.getElementById("geStatus");null!=F&&(F.innerHTML="Error loading page. <a>Please try refreshing.</a>",F.getElementsByTagName("a")[0].onclick=
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(p);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[p,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(E[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var c=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
+if(null!=c){EditorUi.debug("Setting configuration",JSON.stringify(c));if(null!=c.merge){var e=localStorage.getItem(Editor.configurationKey);if(null!=e)try{var f=JSON.parse(e),n;for(n in c.merge)f[n]=c.merge[n];c=f}catch(p){window.location.hash="",alert(p)}else c=c.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(c)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(p){window.location.hash=
+"",alert(p)}1<E.length&&(Graph.prototype.defaultThemes["default-style2"]=E[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=E[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?O():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],O))},function(E){E=document.getElementById("geStatus");null!=E&&(E.innerHTML="Error loading page. <a>Please try refreshing.</a>",E.getElementsByTagName("a")[0].onclick=
function(){mxLanguage="en";k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="atlas"!=uiTheme&&"kennedy"!=uiTheme&&(Editor.isDarkMode()||mxSettings.settings.darkMode)?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var I=parseInt(mxSettings.settings.autosaveDelay);!isNaN(I)&&0<I?(DrawioFile.prototype.autosaveDelay=I,EditorUi.debug("Setting autosaveDelay",
-I)):EditorUi.debug("Invalid autosaveDelay",I)}null!=mxSettings.settings.defaultEdgeLength&&(I=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(I)&&0<I?(Graph.prototype.defaultEdgeLength=I,EditorUi.debug("Using defaultEdgeLength",I)):EditorUi.debug("Invalid defaultEdgeLength",I))}}catch(O){null!=window.console&&console.error(O)}if(null!=Menus.prototype.defaultFonts)for(I=0;I<Menus.prototype.defaultFonts.length;I++){var F=Menus.prototype.defaultFonts[I];"string"!==typeof F&&null!=F.fontFamily&&
-null!=F.fontUrl&&Graph.addFont(F.fontFamily,F.fontUrl)}mxResources.loadDefaultBundle=!1;k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(I,F,O,c,e){EditorUi.logError("Global: "+(null!=I?I:""),F,O,c,e,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var t=
-document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){t=document.getElementsByTagName("script");if(null!=t&&0<t.length){var x=mxUtils.getTextContent(t[0]);"1f536e2400baaa30261b8c3976d6fe06"!=
-CryptoJS.MD5(x).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=t&&1<t.length&&(x=mxUtils.getTextContent(t[t.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(x).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||
+I)):EditorUi.debug("Invalid autosaveDelay",I)}null!=mxSettings.settings.defaultEdgeLength&&(I=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(I)&&0<I?(Graph.prototype.defaultEdgeLength=I,EditorUi.debug("Using defaultEdgeLength",I)):EditorUi.debug("Invalid defaultEdgeLength",I))}}catch(O){null!=window.console&&console.error(O)}if(null!=Menus.prototype.defaultFonts)for(I=0;I<Menus.prototype.defaultFonts.length;I++){var E=Menus.prototype.defaultFonts[I];"string"!==typeof E&&null!=E.fontFamily&&
+null!=E.fontUrl&&Graph.addFont(E.fontFamily,E.fontUrl)}mxResources.loadDefaultBundle=!1;k(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(I,E,O,c,e){EditorUi.logError("Global: "+(null!=I?I:""),E,O,c,e,null,!0)};if(window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var q=
+document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){q=document.getElementsByTagName("script");if(null!=q&&0<q.length){var x=mxUtils.getTextContent(q[0]);"1f536e2400baaa30261b8c3976d6fe06"!=
+CryptoJS.MD5(x).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=q&&1<q.length&&(x=mxUtils.getTextContent(q[q.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(x).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||
/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(I){null!=window.console&&console.error(I)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=
-urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){t=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var C=JSON.parse(localStorage.getItem(mxSettings.key));null!=C&&(t=C.plugins)}catch(I){}C=urlParams.p;App.initPluginCallback();null!=C&&App.loadPlugins(C.split(";"));if(null!=
-t&&0<t.length&&"0"!=urlParams.plugins)for(C=0;C<t.length;C++)try{("/"==t[C].charAt(0)&&(t[C]=PLUGINS_BASE_PATH+t[C]),App.isSameDomain(t[C]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(t[C])?null==App.pluginsLoaded[t[C]]&&(App.pluginsLoaded[t[C]]=!0,App.embedModePluginsCount++,mxscript(t[C])):null!=window.console&&console.log("Unknown plugin:",t[C]):null!=window.console&&console.log("Blocked plugin:",t[C])}catch(I){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&
-"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var G=window.opener||window.parent,H=function(I){if(I.source==G)try{var F=JSON.parse(I.data);null!=F&&"configure"==
-F.action&&(mxEvent.removeListener(window,"message",H),Editor.configure(F.config),mxSettings.load(),F.colorSchemeMeta&&mxmeta("color-scheme","dark light"),d())}catch(O){null!=window.console&&console.log("Error in configure message: "+O,I.data)}};mxEvent.addListener(window,"message",H);G.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
+urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){q=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var C=JSON.parse(localStorage.getItem(mxSettings.key));null!=C&&(q=C.plugins)}catch(I){}C=urlParams.p;App.initPluginCallback();null!=C&&App.loadPlugins(C.split(";"));if(null!=
+q&&0<q.length&&"0"!=urlParams.plugins)for(C=0;C<q.length;C++)try{("/"==q[C].charAt(0)&&(q[C]=PLUGINS_BASE_PATH+q[C]),App.isSameDomain(q[C]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(q[C])?null==App.pluginsLoaded[q[C]]&&(App.pluginsLoaded[q[C]]=!0,App.embedModePluginsCount++,mxscript(q[C])):null!=window.console&&console.log("Unknown plugin:",q[C]):null!=window.console&&console.log("Blocked plugin:",q[C])}catch(I){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&
+"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var G=window.opener||window.parent,H=function(I){if(I.source==G)try{var E=JSON.parse(I.data);null!=E&&"configure"==
+E.action&&(mxEvent.removeListener(window,"message",H),Editor.configure(E.config),mxSettings.load(),E.colorSchemeMeta&&mxmeta("color-scheme","dark light"),d())}catch(O){null!=window.console&&console.log("Error in configure message: "+O,I.data)}};mxEvent.addListener(window,"message",H);G.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
mxSettings.load()}catch(I){null!=window.console&&console.error(I)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(C=localStorage.getItem(Editor.configurationKey),null!=C))try{C=JSON.parse(C),null!=C&&(EditorUi.debug("Using local configuration",C),Editor.configure(C),mxSettings.load())}catch(I){null!=window.console&&console.error(I)}}d()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'};
mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=";
@@ -12115,189 +12128,189 @@ App.prototype.chevronDownImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB
App.prototype.formatShowImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REY1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5RTA1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlERDU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlERTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlnMQ/8AAAAJUExURQAAAP///3FxcTfTiAsAAAACdFJOU/8A5bcwSgAAACFJREFUeNpiYEQDDEQJMMABTAAixcQ00ALoDiPRcwABBgB6DADly9Yx8wAAAABJRU5ErkJggg==";
App.prototype.formatHideImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=";
App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var k=0;k<b.length;k++)if(null!=b[k]&&0<b[k].length)try{if(null!=App.pluginRegistry[b[k]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[k]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(d):mxscript(d):f?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[k])}catch(t){null!=window.console&&console.log("Error loading plugin:",
-b[k],t)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
+App.loadPlugins=function(b,g){EditorUi.debug("Loading plugins",b);for(var k=0;k<b.length;k++)if(null!=b[k]&&0<b[k].length)try{if(null!=App.pluginRegistry[b[k]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[k]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?g?mxinclude(d):mxscript(d):g?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[k])}catch(q){null!=window.console&&console.log("Error loading plugin:",
+b[k],q)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this);null!=this.gitLab&&this.gitLab.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",
-mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var f=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),
-this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(x){null!=window.console&&console.error(x)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var k=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var x=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));
+mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var g=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),
+this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(x){null!=window.console&&console.error(x)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=g)});g()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var k=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var x=mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));
this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,x),window.DrawGapiClientCallback=null):x()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=k)});k()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),
this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(x){null!=window.console&&console.error(x)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility=
"hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(x){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){x.prompt()})})),mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var x=this.getCurrentFile();x=null!=x?x.getMode():null;"1"==urlParams.extAuth||x!=App.MODE_DEVICE&&x!=App.MODE_BROWSER?"1"!=urlParams.embed&&this.getServiceName():this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||
-"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var t=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var x=this.getCurrentFile();null!=x&&null!=x.sync&&(x.sync.destroy(),x.sync=null,x=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+x+'" class="geStatusAlert">'+x+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);
-(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(x){window.clearTimeout(t)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="32px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));
+"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var q=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var x=this.getCurrentFile();null!=x&&null!=x.sync&&(x.sync.destroy(),x.sync=null,x=mxUtils.htmlEntities(mxResources.get("timeout")),this.editor.setStatus('<div title="'+x+'" class="geStatusAlert">'+x+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);
+(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(x){window.clearTimeout(q)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="32px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));
"atlas"!=uiTheme&&"1"!=urlParams.atlas||null==this.menubar||(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding="1"==urlParams.atlas?"7px":"6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(x){this.appIconClicked(x)})),
this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()};App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};
App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
-App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){var f={category:"WARN-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=b.ageStart?Math.round((Date.now()-b.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+"-open_"+(null!=
-b.opened?Math.round((Date.now()-b.opened.getTime())/1E3):"x")+"-save_"+(null!=b.lastSaved?Math.round((Date.now()-b.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=b.lastChanged?Math.round((Date.now()-b.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=b.sync?"client_"+b.sync.clientId:"nosync"};b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(f.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+
-"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);EditorUi.logEvent(f);f=mxResources.get("ensureDataSaved");null!=b.lastSaved&&(f=this.timeSince(b.lastSaved),null==f&&(f=mxResources.get("lessThanAMinute")),f=mxResources.get("lastSaved",[f]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),f,mxResources.get("ignore"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.stopSanityCheck();this.actions.get(null!=
+App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){var g={category:"WARN-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=b.ageStart?Math.round((Date.now()-b.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+"-open_"+(null!=
+b.opened?Math.round((Date.now()-b.opened.getTime())/1E3):"x")+"-save_"+(null!=b.lastSaved?Math.round((Date.now()-b.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=b.lastChanged?Math.round((Date.now()-b.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=b.sync?"client_"+b.sync.clientId:"nosync"};b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(g.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+
+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);EditorUi.logEvent(g);g=mxResources.get("ensureDataSaved");null!=b.lastSaved&&(g=this.timeSince(b.lastSaved),null==g&&(g=mxResources.get("lessThanAMinute")),g=mxResources.get("lastSaved",[g]));this.spinner.stop();this.showError(mxResources.get("unsavedChanges"),g,mxResources.get("ignore"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("save"),mxUtils.bind(this,function(){this.stopSanityCheck();this.actions.get(null!=
this.mode&&b.isEditable()?"save":"saveAs").funct()}),null,null,360,120,null,mxUtils.bind(this,function(){this.scheduleSanityCheck()}))}};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};
App.prototype.getPusher=function(){null==this.pusher&&"function"===typeof window.Pusher&&(this.pusher=new Pusher(App.PUSHER_KEY,{cluster:App.PUSHER_CLUSTER,encrypted:!0}));return this.pusher};App.prototype.showNameChangeBanner=function(){this.showBanner("DiagramsFooter","draw.io is now diagrams.net",mxUtils.bind(this,function(){this.openLink("https://www.diagrams.net/blog/move-diagrams-net")}))};
App.prototype.showNameConfBanner=function(){this.showBanner("ConfFooter","Try draw.io for Confluence",mxUtils.bind(this,function(){this.openLink("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence")}),!0)};App.prototype.showDownloadDesktopBanner=function(){this.showBanner("DesktopFooter",mxResources.get("downloadDesktop"),mxUtils.bind(this,function(){this.openLink("https://get.diagrams.net/")}))};
App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBannerratingFooter||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings.closeratingFooter)){var b=document.createElement("div");b.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(b.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(b.style,
-"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(f);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var k=document.createElement("img");
+"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.closeImage);g.setAttribute("title",mxResources.get("close"));g.setAttribute("border","0");g.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(g);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var k=document.createElement("img");
k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.setAttribute("title","1 star");k.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");k.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(k);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(d);var t=document.createElement("img");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.setAttribute("title","3 star");t.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");t.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(t);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.setAttribute("title","4 star");x.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");x.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(x);this.bannerShowing=!0;var C=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);C()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);C()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
-function(G){mxEvent.consume(G);C()}));mxEvent.addListener(t,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);C()}));mxEvent.addListener(x,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");C()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){C()}),1E3)});window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(f,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var k=f.lastIndexOf("@"),d=0<=k?f.substring(k+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(t){try{if(200<=t.getStatus()&&299>=t.getStatus()){var x=t.getText();if(0<x.length){var C=JSON.parse(x);null!=C&&this.handleLicense(C,
-d)}}}catch(G){}}))}};App.prototype.handleLicense=function(b,f){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
-App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var f=this.getRecent();if(null==f)f=[];else for(var k=0;k<f.length;k++)f[k].id==b.id&&f.splice(k,1);null!=f&&(f.unshift(b),f=f.slice(0,10),localStorage.setItem(".recent",JSON.stringify(f)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(f){}return null}};
-App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(f){}};
+b.appendChild(d);var q=document.createElement("img");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.setAttribute("title","3 star");q.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");q.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(q);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.setAttribute("title","4 star");x.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");x.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(x);this.bannerShowing=!0;var C=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(g,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);C()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);C()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
+function(G){mxEvent.consume(G);C()}));mxEvent.addListener(q,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);C()}));mxEvent.addListener(x,"click",mxUtils.bind(this,function(G){mxEvent.consume(G);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");C()}));g=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){C()}),1E3)});window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(g,6E4)}};
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),g=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=g&&null!=b.id){var k=g.lastIndexOf("@"),d=0<=k?g.substring(k+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(q){try{if(200<=q.getStatus()&&299>=q.getStatus()){var x=q.getText();if(0<x.length){var C=JSON.parse(x);null!=C&&this.handleLicense(C,
+d)}}}catch(G){}}))}};App.prototype.handleLicense=function(b,g){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
+App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var g=this.getRecent();if(null==g)g=[];else for(var k=0;k<g.length;k++)g[k].id==b.id&&g.splice(k,1);null!=g&&(g.unshift(b),g=g.slice(0,10),localStorage.setItem(".recent",JSON.stringify(g)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(g){}return null}};
+App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(g){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
-App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,f=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
-App.prototype.getThumbnail=function(b,f){var k=!1;try{var d=!0,t=window.setTimeout(mxUtils.bind(this,function(){d=!1;f(null)}),this.timeout),x=mxUtils.bind(this,function(q){window.clearTimeout(t);d&&f(q)});null==this.thumbImageCache&&(this.thumbImageCache={});var C=this.editor.graph,G=C.backgroundImage,H=null!=C.themes&&"darkTheme"==C.defaultThemeName;if(null!=this.pages&&(H||this.currentPage!=this.pages[0])){var I=C.getGlobalVariable;C=this.createTemporaryGraph(C.getStylesheet());C.setBackgroundImage=
-this.editor.graph.setBackgroundImage;var F=this.pages[0];this.currentPage==F?C.setBackgroundImage(G):null!=F.viewState&&null!=F.viewState&&(G=F.viewState.backgroundImage,C.setBackgroundImage(G));C.getGlobalVariable=function(q){return"page"==q?F.getName():"pagenumber"==q?1:I.apply(this,arguments)};C.getGlobalVariable=I;document.body.appendChild(C.container);C.model.setRoot(F.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(q){try{C!=this.editor.graph&&
-null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}catch(B){q=null}x(q)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,C,null,null,null,null,"diagram",null),k=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var O=document.createElement("canvas"),c=C.getGraphBounds(),e=C.view.translate,g=C.view.scale;null!=G&&(c=mxRectangle.fromRectangle(c),c.add(new mxRectangle((e.x+G.x)*g,(e.y+G.y)*g,G.width*g,G.height*g)));var n=b/c.width;
-n=Math.min(1,Math.min(3*b/(4*c.height),n));var p=Math.floor(c.x),v=Math.floor(c.y);O.setAttribute("width",Math.ceil(n*(c.width+4)));O.setAttribute("height",Math.ceil(n*(c.height+4)));var y=O.getContext("2d");y.scale(n,n);y.translate(-p,-v);var u=C.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";y.save();y.fillStyle=u;y.fillRect(p,v,Math.ceil(c.width+4),Math.ceil(c.height+4));y.restore();if(null!=G){var D=new Image;D.src=G.src;y.drawImage(D,G.x*n,G.y*n,G.width*n,G.height*n)}var A=new mxJsCanvas(O),
-U=new mxAsyncCanvas(this.thumbImageCache);A.images=this.thumbImageCache.images;var l=new mxImageExport;l.drawShape=function(q,B){q.shape instanceof mxShape&&q.shape.checkBounds()&&(B.save(),B.translate(.5,.5),q.shape.paint(B),B.translate(-.5,-.5),B.restore())};l.drawText=function(q,B){};l.drawState(C.getView().getState(C.model.root),U);U.finish(mxUtils.bind(this,function(){try{l.drawState(C.getView().getState(C.model.root),A),C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}catch(q){O=
-null}x(O)}));k=!0}}catch(q){k=!1,null!=C&&C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}k||window.clearTimeout(t);return k};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
-(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,k){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();f=null!=d?d.getMode():f;f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
-this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=f==App.MODE_DEVICE?"pointer":"default")}if(k)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var t=new Date;t.setYear(t.getFullYear()+1);document.cookie="MODE="+f+"; expires="+t.toUTCString()}}catch(x){}}})();
-App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var f=this.getCurrentFile(),k=null!=f?f.getMode():null;k==App.MODE_GOOGLE?null!=f&&null!=f.desc&&null!=f.desc.parents&&0<f.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+f.desc.parents[0].id):null!=f&&null!=f.getId()?this.openLink("https://drive.google.com/open?id="+f.getId()):this.openLink("https://drive.google.com/?authuser=0"):k==App.MODE_ONEDRIVE?null!=
-f&&null!=f.meta&&null!=f.meta.webUrl?(k=f.meta.webUrl,f=encodeURIComponent(f.meta.name),k.substring(k.length-f.length,k.length)==f&&(k=k.substring(0,k.length-f.length)),this.openLink(k)):this.openLink("https://onedrive.live.com/"):k==App.MODE_DROPBOX?null!=f&&null!=f.stat&&null!=f.stat.path_display?(k="https://www.dropbox.com/home/Apps/drawio"+f.stat.path_display,mxEvent.isShiftDown(b)||(k=k.substring(0,k.length-f.stat.name.length)),this.openLink(k)):this.openLink("https://www.dropbox.com/"):k==App.MODE_TRELLO?
-this.openLink("https://trello.com/"):k==App.MODE_GITHUB?null!=f&&f.constructor==GitHubFile?this.openLink(f.meta.html_url):this.openLink("https://github.com/"):k==App.MODE_GITLAB?null!=f&&f.constructor==GitLabFile?this.openLink(f.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):k==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(b)};
-App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};App.prototype.getDiagramId=function(){var b=window.location.hash;null!=b&&0<b.length&&(b=b.substring(1));if(null!=b&&1<b.length&&"T"==b.charAt(0)){var f=b.indexOf("#");0<f&&(b=b.substring(0,f))}return b};
-App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var f=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(f.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(k,d,t){this.spinner.stop();null==d&&(d=urlParams.title,t=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(this.useCanvasForExport?
--1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,k,d):new LocalFile(this,k,d,t))}))}}catch(k){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
+App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,g=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=g&&(b=(null!=g.getTitle()?g.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,g){var k=!1;try{var d=!0,q=window.setTimeout(mxUtils.bind(this,function(){d=!1;g(null)}),this.timeout),x=mxUtils.bind(this,function(u){window.clearTimeout(q);d&&g(u)});null==this.thumbImageCache&&(this.thumbImageCache={});var C=this.editor.graph,G=C.backgroundImage,H=null!=C.themes&&"darkTheme"==C.defaultThemeName;if(null!=this.pages&&(H||this.currentPage!=this.pages[0])){var I=C.getGlobalVariable;C=this.createTemporaryGraph(C.getStylesheet());C.setBackgroundImage=
+this.editor.graph.setBackgroundImage;var E=this.pages[0];this.currentPage==E?C.setBackgroundImage(G):null!=E.viewState&&null!=E.viewState&&(G=E.viewState.backgroundImage,C.setBackgroundImage(G));C.getGlobalVariable=function(u){return"page"==u?E.getName():"pagenumber"==u?1:I.apply(this,arguments)};C.getGlobalVariable=I;document.body.appendChild(C.container);C.model.setRoot(E.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(u){try{C!=this.editor.graph&&
+null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}catch(B){u=null}x(u)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,C,null,null,null,null,"diagram",null),k=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var O=document.createElement("canvas"),c=C.getGraphBounds(),e=C.view.translate,f=C.view.scale;null!=G&&(c=mxRectangle.fromRectangle(c),c.add(new mxRectangle((e.x+G.x)*f,(e.y+G.y)*f,G.width*f,G.height*f)));var n=b/c.width;
+n=Math.min(1,Math.min(3*b/(4*c.height),n));var p=Math.floor(c.x),t=Math.floor(c.y);O.setAttribute("width",Math.ceil(n*(c.width+4)));O.setAttribute("height",Math.ceil(n*(c.height+4)));var y=O.getContext("2d");y.scale(n,n);y.translate(-p,-t);var v=C.background;if(null==v||""==v||v==mxConstants.NONE)v="#ffffff";y.save();y.fillStyle=v;y.fillRect(p,t,Math.ceil(c.width+4),Math.ceil(c.height+4));y.restore();if(null!=G){var D=new Image;D.src=G.src;y.drawImage(D,G.x*n,G.y*n,G.width*n,G.height*n)}var A=new mxJsCanvas(O),
+U=new mxAsyncCanvas(this.thumbImageCache);A.images=this.thumbImageCache.images;var l=new mxImageExport;l.drawShape=function(u,B){u.shape instanceof mxShape&&u.shape.checkBounds()&&(B.save(),B.translate(.5,.5),u.shape.paint(B),B.translate(-.5,-.5),B.restore())};l.drawText=function(u,B){};l.drawState(C.getView().getState(C.model.root),U);U.finish(mxUtils.bind(this,function(){try{l.drawState(C.getView().getState(C.model.root),A),C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}catch(u){O=
+null}x(O)}));k=!0}}catch(u){k=!1,null!=C&&C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}k||window.clearTimeout(q);return k};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(g,k){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();g=null!=d?d.getMode():g;g==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):g==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
+this.appIcon.style.cursor="pointer"):g==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=g==App.MODE_DEVICE?"pointer":"default")}if(k)try{if(isLocalStorage)localStorage.setItem(".mode",g);else if("undefined"!=typeof Storage){var q=new Date;q.setYear(q.getFullYear()+1);document.cookie="MODE="+g+"; expires="+q.toUTCString()}}catch(x){}}})();
+App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var g=this.getCurrentFile(),k=null!=g?g.getMode():null;k==App.MODE_GOOGLE?null!=g&&null!=g.desc&&null!=g.desc.parents&&0<g.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+g.desc.parents[0].id):null!=g&&null!=g.getId()?this.openLink("https://drive.google.com/open?id="+g.getId()):this.openLink("https://drive.google.com/?authuser=0"):k==App.MODE_ONEDRIVE?null!=
+g&&null!=g.meta&&null!=g.meta.webUrl?(k=g.meta.webUrl,g=encodeURIComponent(g.meta.name),k.substring(k.length-g.length,k.length)==g&&(k=k.substring(0,k.length-g.length)),this.openLink(k)):this.openLink("https://onedrive.live.com/"):k==App.MODE_DROPBOX?null!=g&&null!=g.stat&&null!=g.stat.path_display?(k="https://www.dropbox.com/home/Apps/drawio"+g.stat.path_display,mxEvent.isShiftDown(b)||(k=k.substring(0,k.length-g.stat.name.length)),this.openLink(k)):this.openLink("https://www.dropbox.com/"):k==App.MODE_TRELLO?
+this.openLink("https://trello.com/"):k==App.MODE_GITHUB?null!=g&&g.constructor==GitHubFile?this.openLink(g.meta.html_url):this.openLink("https://github.com/"):k==App.MODE_GITLAB?null!=g&&g.constructor==GitLabFile?this.openLink(g.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):k==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(b)};
+App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};App.prototype.getDiagramId=function(){var b=window.location.hash;null!=b&&0<b.length&&(b=b.substring(1));if(null!=b&&1<b.length&&"T"==b.charAt(0)){var g=b.indexOf("#");0<g&&(b=b.substring(0,g))}return b};
+App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var g=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(g.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(k,d,q){this.spinner.stop();null==d&&(d=urlParams.title,q=!0,d=null!=d?decodeURIComponent(d):this.defaultFilename);0<(this.useCanvasForExport?
+-1:".png"==d.substring(d.length-4))&&(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,k,d):new LocalFile(this,k,d,q))}))}}catch(k){}};App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b)};
App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
-App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),f||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&k.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
+App.prototype.showRefreshDialog=function(b,g){this.showingRefreshDialog||(this.showingRefreshDialog=!0,this.showError(b||mxResources.get("externalChanges"),g||mxResources.get("redirectToNewApp"),mxResources.get("refresh"),mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&k.setModified(!1);this.spinner.spin(document.body,mxResources.get("connecting"));this.editor.graph.setEnabled(!1);window.location.reload()}),null,null,null,null,null,340,180),null!=this.dialog&&null!=this.dialog.container&&
(b=this.createRealtimeNotice(),b.style.left="0",b.style.right="0",b.style.borderRadius="0",b.style.borderLeftStyle="none",b.style.borderRightStyle="none",b.style.marginBottom="26px",b.style.padding="8px 0 8px 0",this.dialog.container.appendChild(b)))};
-App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var f=document.createElement("div");f.className="geAlert";f.style.zIndex=2E9;f.style.left="50%";f.style.top="-100%";f.style.maxWidth="80%";f.style.width="max-content";f.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
-b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(k){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(k))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},
+App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var g=document.createElement("div");g.className="geAlert";g.style.zIndex=2E9;g.style.left="50%";g.style.top="-100%";g.style.maxWidth="80%";g.style.width="max-content";g.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");g.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
+b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");g.appendChild(b);mxEvent.addListener(b,"click",function(k){null!=g.parentNode&&(g.parentNode.removeChild(g),mxEvent.consume(k))});document.body.appendChild(g);window.setTimeout(function(){g.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(g.style,"transition","all 2s ease");g.style.opacity="0";window.setTimeout(function(){null!=g.parentNode&&g.parentNode.removeChild(g)},
2E3)},15E3)}};
App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(x,C,G,H,I){"ResizeObserver loop limit exceeded"!=x&&(EditorUi.logError("Uncaught: "+(null!=x?x:""),C,G,H,I,null,!0),b.handleError({message:x},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
function(x){var C=this.getCurrentFile();EditorUi.debug("storage event",[x],[C]);null!=C&&".draft-alive-check"==x.key&&null!=x.newValue&&null!=C.draftId&&(this.draftAliveCheck=x.newValue,C.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(x){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(x){try{this.hideDialog();
var C=this.getDiagramId(),G=this.getCurrentFile();null!=G&&G.getHash()==C||this.loadFile(C,!0)}catch(H){null!=document.body&&this.handleError(H,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var I=this.getCurrentFile();window.location.hash=null!=I?I.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"))}))}catch(x){this.handleError(x,
-mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var x=mxUtils.bind(this,function(H){Editor.isPngDataUrl(H)&&(H=Editor.extractGraphModelFromPng(H));var I=urlParams.title;I=null!=I?decodeURIComponent(I):
+mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var g=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var x=mxUtils.bind(this,function(H){Editor.isPngDataUrl(H)&&(H=Editor.extractGraphModelFromPng(H));var I=urlParams.title;I=null!=I?decodeURIComponent(I):
this.defaultFilename;H=new LocalFile(this,H,I,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(H.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(H);this.getCurrentFile().setModified(!this.editor.chromeless)}),C=window.opener||window.parent;if(C!=window){var G=urlParams.create;null!=G?x(C[decodeURIComponent(G)]):(G=urlParams.data,null!=G?x(decodeURIComponent(G)):this.installMessageHandler(mxUtils.bind(this,function(H,I){I.source==C&&x(H)})))}}else if(null==
this.dialog)if("1"==urlParams.demo)G=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=G;else{G=!1;try{G=null!=window.opener&&null!=window.opener.openFile}catch(H){}G?this.spinner.spin(document.body,mxResources.get("loading")):(G=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=G&&0!=G.length||this.editor.isChromelessView()?null!=G&&0<G.length?this.loadFile(G,null,null,mxUtils.bind(this,
-function(){var H=decodeURIComponent(urlParams.viewbox||"");if(""!=H)try{var I=JSON.parse(H);this.editor.graph.fitWindow(I,I.border)}catch(F){console.error(F)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),k=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=k&&0<k.length&&this.spinner.spin(document.body,
-mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),t=mxUtils.bind(this,function(x){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,x,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var C=urlParams.title;C=null!=C?decodeURIComponent(C):this.defaultFilename;x=this.getServiceCount(!0);isLocalStorage&&x++;var G=4>=
-x?2:6<x?4:3;C=new CreateDialog(this,C,mxUtils.bind(this,function(H,I){if(null==I){this.hideDialog();var F=Editor.useLocalStorage;this.createFile(0<H.length?H:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=F}else this.pickFolder(I,mxUtils.bind(this,function(O){this.createFile(H,this.getFileData(!0),null,I,null,!0,O)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,G,null,null,null,this.editor.fileExtensions);this.showDialog(C.container,420,x>G?
-390:280,!0,!1,mxUtils.bind(this,function(H){H&&null==this.getCurrentFile()&&this.showSplash()}));C.init()}});k=decodeURIComponent(k);if("http://"!=k.substring(0,7)&&"https://"!=k.substring(0,8))try{null!=window.opener&&null!=window.opener[k]?t(window.opener[k]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else this.loadTemplate(k,function(x){t(x)},mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"),
+function(){var H=decodeURIComponent(urlParams.viewbox||"");if(""!=H)try{var I=JSON.parse(H);this.editor.graph.fitWindow(I,I.border)}catch(E){console.error(E)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),k=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=k&&0<k.length&&this.spinner.spin(document.body,
+mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),q=mxUtils.bind(this,function(x){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,x,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var C=urlParams.title;C=null!=C?decodeURIComponent(C):this.defaultFilename;x=this.getServiceCount(!0);isLocalStorage&&x++;var G=4>=
+x?2:6<x?4:3;C=new CreateDialog(this,C,mxUtils.bind(this,function(H,I){if(null==I){this.hideDialog();var E=Editor.useLocalStorage;this.createFile(0<H.length?H:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=E}else this.pickFolder(I,mxUtils.bind(this,function(O){this.createFile(H,this.getFileData(!0),null,I,null,!0,O)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,G,null,null,null,this.editor.fileExtensions);this.showDialog(C.container,420,x>G?
+390:280,!0,!1,mxUtils.bind(this,function(H){H&&null==this.getCurrentFile()&&this.showSplash()}));C.init()}});k=decodeURIComponent(k);if("http://"!=k.substring(0,7)&&"https://"!=k.substring(0,8))try{null!=window.opener&&null!=window.opener[k]?q(window.opener[k]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else this.loadTemplate(k,function(x){q(x)},mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"),
d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),
-f())}}catch(x){this.handleError(x)}};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&(k.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,f,k){function d(){k(t)}var t=[];try{this.getDatabaseItems(mxUtils.bind(this,function(x){EditorUi.debug("App.filterDrafts",[this],"items",x);for(var C=0;C<x.length;C++)try{var G=x[C].key;if(null!=G&&".draft_"==G.substring(0,7)){var H=JSON.parse(x[C].data);null!=H&&"draft"==H.type&&H.aliveCheck!=f&&(null==b&&null==H.fileObject||null!=H.fileObject&&H.fileObject.path==b)&&(H.key=G,t.push(H))}}catch(I){}d()},d))}catch(x){d()}};
-App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(f){if(1==f.length)this.loadDraft(f[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[0].key)}));else if(1<f.length){var k=new Date(f[0].modified);k=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
-[k.toLocaleDateString()+" "+k.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d?d:0;this.loadDraft(f[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key)}))}),mxUtils.bind(this,function(d,t){d=""!=d?d:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key);null!=t&&t()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<f.length?f:null);this.showDialog(k.container,
-640,480,!0,!1,mxUtils.bind(this,function(d){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));k.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};
-App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),k=mxUtils.bind(this,function(){var t=new SplashDialog(this);this.showDialog(t.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(x){x&&!mxClient.IS_CHROMEAPP&&(x=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=x)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&k();else{b=4==f?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();k()}),b);this.showDialog(d.container,3>b?200:300,3<f?320:210,!0,!1)}}};
-App.prototype.addLanguageMenu=function(b,f,k){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),d.setAttribute("title",mxResources.get("language")),d.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor=
-"pointer",d.style.bottom="20px",d.style.right=null!=k?k:"22px",f&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=k?k:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),d.appendChild(f),f.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(d,"click",mxUtils.bind(this,function(t){this.editor.graph.popupMenuHandler.hideMenu();
-var x=new mxPopupMenu(this.menus.get("language").funct);x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);x.destroy()});var C=mxUtils.getOffset(d);x.popup(C.x,C.y+d.offsetHeight,null,t);this.setCurrentMenu(x)})),b.appendChild(d));return d};
-App.prototype.loadFileSystemEntry=function(b,f,k){k=null!=k?k:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var t=new FileReader;t.onload=mxUtils.bind(this,function(x){try{if(null!=f){var C=x.target.result;"image/png"==d.type&&(C=this.extractGraphModelFromPng(C));f(new LocalFile(this,C,d.name,null,b,d))}else this.openFileHandle(x.target.result,d.name,d,!1,b)}catch(G){k(G)}});t.onerror=k;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||
-"image/svg"===d.type.substring(0,9)?t.readAsText(d):t.readAsDataURL(d)}),k)}catch(d){k(d)}};
-App.prototype.createFileSystemOptions=function(b){var f=[],k=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(k=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var t={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};t.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==k?f.splice(0,0,
-t):this.editor.diagramFileTypes[d].extension==k?f.splice(0,0,t):f.push(t)}return{types:f,fileName:b}};App.prototype.showSaveFilePicker=function(b,f,k){f=null!=f?f:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});k=null!=k?k:this.createFileSystemOptions();window.showSaveFilePicker(k).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(t){b(d,t)}),f)}),f)};
-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getPeerForMode(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(C){null!=C&&0<C.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(C[0])}),
+g())}}catch(x){this.handleError(x)}};App.prototype.loadDraft=function(b,g){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var k=this.getCurrentFile();null!=k&&(k.fileChanged(),null!=g&&g())}),0)}),null,null,!0)};
+App.prototype.filterDrafts=function(b,g,k){function d(){k(q)}var q=[];try{this.getDatabaseItems(mxUtils.bind(this,function(x){EditorUi.debug("App.filterDrafts",[this],"items",x);for(var C=0;C<x.length;C++)try{var G=x[C].key;if(null!=G&&".draft_"==G.substring(0,7)){var H=JSON.parse(x[C].data);null!=H&&"draft"==H.type&&H.aliveCheck!=g&&(null==b&&null==H.fileObject||null!=H.fileObject&&H.fileObject.path==b)&&(H.key=G,q.push(H))}}catch(I){}d()},d))}catch(x){d()}};
+App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(g){if(1==g.length)this.loadDraft(g[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(g[0].key)}));else if(1<g.length){var k=new Date(g[0].modified);k=new DraftDialog(this,1<g.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
+[k.toLocaleDateString()+" "+k.toLocaleTimeString()]),1<g.length?null:g[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d?d:0;this.loadDraft(g[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(g[d].key)}))}),mxUtils.bind(this,function(d,q){d=""!=d?d:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(g[d].key);null!=q&&q()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<g.length?g:null);this.showDialog(k.container,
+640,480,!0,!1,mxUtils.bind(this,function(d){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));k.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(g){}};
+App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var g=this.getServiceCount(!0),k=mxUtils.bind(this,function(){var q=new SplashDialog(this);this.showDialog(q.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(x){x&&!mxClient.IS_CHROMEAPP&&(x=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=x)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&k();else{b=4==g?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();k()}),b);this.showDialog(d.container,3>b?200:300,3<g?320:210,!0,!1)}}};
+App.prototype.addLanguageMenu=function(b,g,k){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),d.setAttribute("title",mxResources.get("language")),d.className="atlas"!=uiTheme?"geIcon geAdaptiveAsset":"",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor=
+"pointer",d.style.bottom="20px",d.style.right=null!=k?k:"22px",g&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=k?k:"24px",g=document.createElement("span"),g.style.display="inline-block",g.style.fontSize="12px",g.style.margin="2px 24px 0 0",g.style.userSelect="none",mxUtils.write(g,mxResources.get("language")),d.appendChild(g),g.className="atlas"!=uiTheme?"geAdaptiveAsset":""),mxEvent.addListener(d,"click",mxUtils.bind(this,function(q){this.editor.graph.popupMenuHandler.hideMenu();
+var x=new mxPopupMenu(this.menus.get("language").funct);x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);x.destroy()});var C=mxUtils.getOffset(d);x.popup(C.x,C.y+d.offsetHeight,null,q);this.setCurrentMenu(x)})),b.appendChild(d));return d};
+App.prototype.loadFileSystemEntry=function(b,g,k){k=null!=k?k:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var q=new FileReader;q.onload=mxUtils.bind(this,function(x){try{if(null!=g){var C=x.target.result;"image/png"==d.type&&(C=this.extractGraphModelFromPng(C));g(new LocalFile(this,C,d.name,null,b,d))}else this.openFileHandle(x.target.result,d.name,d,!1,b)}catch(G){k(G)}});q.onerror=k;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||
+"image/svg"===d.type.substring(0,9)?q.readAsText(d):q.readAsDataURL(d)}),k)}catch(d){k(d)}};
+App.prototype.createFileSystemOptions=function(b){var g=[],k=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(k=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var q={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};q.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==k?g.splice(0,0,
+q):this.editor.diagramFileTypes[d].extension==k?g.splice(0,0,q):g.push(q)}return{types:g,fileName:b}};App.prototype.showSaveFilePicker=function(b,g,k){g=null!=g?g:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});k=null!=k?k:this.createFileSystemOptions();window.showSaveFilePicker(k).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(q){b(d,q)}),g)}),g)};
+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var g=this.getPeerForMode(b);if(null!=g)g.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(C){null!=C&&0<C.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(C[0])}),
mxUtils.bind(this,function(C){"AbortError"!=C.name&&this.handleError(C)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.openFiles(k.files),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.openFileInputElt=k}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(C,G){StorageFile.listFiles(this,"F",C,G)});window.openBrowserFile=mxUtils.bind(this,function(C,G,H){StorageFile.getFileContent(this,C,G,H)});window.deleteBrowserFile=mxUtils.bind(this,function(C,G,H){StorageFile.deleteFile(this,C,G,H)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(C,G){var H=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=G.substring(G.length-4)||(G=G.substring(0,G.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,C,G):new LocalFile(this,C,G))}),I=this.getCurrentFile();null!=I&&I.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()}));var t=this.dialog,x=t.close;this.dialog.close=mxUtils.bind(this,function(C){Editor.useLocalStorage=
-d;x.apply(t,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(C){this.handleError(C)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(t,x){if(null!=x)try{this.loadLibrary(x)}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&f.getLibrary(t,mxUtils.bind(this,function(C){this.spinner.stop();try{this.loadLibrary(C)}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(C){this.handleError(C,null!=C?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){if(null!=
-k.files){for(var t=0;t<k.files.length;t++)mxUtils.bind(this,function(x){var C=new FileReader;C.onload=mxUtils.bind(this,function(G){try{this.loadLibrary(new LocalLibrary(this,G.target.result,x.name))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}});C.readAsText(x)})(k.files[t]);k.type="";k.type="file";k.value=""}}));k.style.display="none";document.body.appendChild(k);this.libFileInputElt=k}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
-mxUtils.bind(this,function(t,x){StorageFile.listFiles(this,"L",t,x)});window.openBrowserFile=mxUtils.bind(this,function(t,x,C){StorageFile.getFileContent(this,t,x,C)});window.deleteBrowserFile=mxUtils.bind(this,function(t,x,C){StorageFile.deleteFile(this,t,x,C)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(t){this.hideDialog(t)}));window.openFile.setConsumer(mxUtils.bind(this,function(t,x){try{this.loadLibrary(b==
-App.MODE_BROWSER?new StorageLibrary(this,t,x):new LocalLibrary(this,t,x))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,f,k,d,t,x,C){try{d=null!=d?d:this.mode;t=null!=t?t:!1;x=null!=x?x:!1;var G=this.createLibraryDataFromImages(f),H=mxUtils.bind(this,function(O){this.spinner.stop();null!=C&&C();this.handleError(O,null!=O?mxResources.get("errorSavingFile"):null)});null==k&&d==App.MODE_DEVICE&&(k=new LocalLibrary(this,G,b));if(null==k)this.pickFolder(d,mxUtils.bind(this,function(O){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,G,O,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,f)}),H,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,f)}),H,O):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,f)}),H,O):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,f)}),H,O):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(c,f)}),H,O):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,f)}),H,O):d==App.MODE_BROWSER?(O=mxUtils.bind(this,function(){var c=new StorageLibrary(this,G,b);c.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,f)}),H)}),null==localStorage.getItem(b)?
-O():this.confirm(mxResources.get("replaceIt",[b]),O)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(t||this.spinner.spin(document.body,mxResources.get("saving"))){k.setData(G);var I=mxUtils.bind(this,function(){k.save(!0,mxUtils.bind(this,function(O){this.spinner.stop();this.hideDialog(!0);x||this.libraryLoaded(k,f);null!=C&&C()}),H)});if(b!=k.getTitle()){var F=k.getHash();k.rename(b,mxUtils.bind(this,function(O){k.constructor!=LocalLibrary&&F!=k.getHash()&&
-(mxSettings.removeCustomLibrary(F),mxSettings.addCustomLibrary(k.getHash()));this.removeLibrarySidebar(F);I()}),H)}else I()}}catch(O){this.handleError(O)}};
-App.prototype.saveFile=function(b,f){var k=this.getCurrentFile();if(null!=k){var d=mxUtils.bind(this,function(){EditorUi.enableDrafts&&k.removeDraft();this.getCurrentFile()==k||k.isModified()||(k.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=f&&f()});if(b||null==k.getTitle()||null!=k.invalidFileHandle||null==this.mode)if(null!=k&&k.constructor==LocalFile&&null!=k.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
-function(H,I){k.invalidFileHandle=null;k.fileHandle=H;k.title=I.name;k.desc=I;this.save(I.name,d)}),null,this.createFileSystemOptions(k.getTitle()));else{var t=null!=k.getTitle()?k.getTitle():this.defaultFilename,x=!mxClient.IS_IOS||!navigator.standalone,C=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var G=4>=b?2:6<b?4:3;t=new CreateDialog(this,t,mxUtils.bind(this,function(H,I,F){null!=H&&0<H.length&&(/(\.pdf)$/i.test(H)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
-function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){F.value=H.split(".").slice(0,-1).join(".");F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==C&&I==App.MODE_DEVICE?null!=k&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(O,c){k.fileHandle=O;k.mode=App.MODE_DEVICE;k.title=c.name;
+function(C,G){var H=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=G.substring(G.length-4)||(G=G.substring(0,G.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,C,G):new LocalFile(this,C,G))}),I=this.getCurrentFile();null!=I&&I.isModified()?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H()}));var q=this.dialog,x=q.close;this.dialog.close=mxUtils.bind(this,function(C){Editor.useLocalStorage=
+d;x.apply(q,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(C){this.handleError(C)}};
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var g=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=g&&g.pickLibrary(mxUtils.bind(this,function(q,x){if(null!=x)try{this.loadLibrary(x)}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&g.getLibrary(q,mxUtils.bind(this,function(C){this.spinner.stop();try{this.loadLibrary(C)}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(C){this.handleError(C,null!=C?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){if(null!=
+k.files){for(var q=0;q<k.files.length;q++)mxUtils.bind(this,function(x){var C=new FileReader;C.onload=mxUtils.bind(this,function(G){try{this.loadLibrary(new LocalLibrary(this,G.target.result,x.name))}catch(H){this.handleError(H,mxResources.get("errorLoadingFile"))}});C.readAsText(x)})(k.files[q]);k.type="";k.type="file";k.value=""}}));k.style.display="none";document.body.appendChild(k);this.libFileInputElt=k}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxUtils.bind(this,function(q,x){StorageFile.listFiles(this,"L",q,x)});window.openBrowserFile=mxUtils.bind(this,function(q,x,C){StorageFile.getFileContent(this,q,x,C)});window.deleteBrowserFile=mxUtils.bind(this,function(q,x,C){StorageFile.deleteFile(this,q,x,C)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(q){this.hideDialog(q)}));window.openFile.setConsumer(mxUtils.bind(this,function(q,x){try{this.loadLibrary(b==
+App.MODE_BROWSER?new StorageLibrary(this,q,x):new LocalLibrary(this,q,x))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}};
+App.prototype.saveLibrary=function(b,g,k,d,q,x,C){try{d=null!=d?d:this.mode;q=null!=q?q:!1;x=null!=x?x:!1;var G=this.createLibraryDataFromImages(g),H=mxUtils.bind(this,function(O){this.spinner.stop();null!=C&&C();this.handleError(O,null!=O?mxResources.get("errorSavingFile"):null)});null==k&&d==App.MODE_DEVICE&&(k=new LocalLibrary(this,G,b));if(null==k)this.pickFolder(d,mxUtils.bind(this,function(O){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,G,O,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),H,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),H,O):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),H,O):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),H,O):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(c,g)}),H,O):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,G,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),H,O):d==App.MODE_BROWSER?(O=mxUtils.bind(this,function(){var c=new StorageLibrary(this,G,b);c.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,g)}),H)}),null==localStorage.getItem(b)?
+O():this.confirm(mxResources.get("replaceIt",[b]),O)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(q||this.spinner.spin(document.body,mxResources.get("saving"))){k.setData(G);var I=mxUtils.bind(this,function(){k.save(!0,mxUtils.bind(this,function(O){this.spinner.stop();this.hideDialog(!0);x||this.libraryLoaded(k,g);null!=C&&C()}),H)});if(b!=k.getTitle()){var E=k.getHash();k.rename(b,mxUtils.bind(this,function(O){k.constructor!=LocalLibrary&&E!=k.getHash()&&
+(mxSettings.removeCustomLibrary(E),mxSettings.addCustomLibrary(k.getHash()));this.removeLibrarySidebar(E);I()}),H)}else I()}}catch(O){this.handleError(O)}};
+App.prototype.saveFile=function(b,g){var k=this.getCurrentFile();if(null!=k){var d=mxUtils.bind(this,function(){EditorUi.enableDrafts&&k.removeDraft();this.getCurrentFile()==k||k.isModified()||(k.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=g&&g()});if(b||null==k.getTitle()||null!=k.invalidFileHandle||null==this.mode)if(null!=k&&k.constructor==LocalFile&&null!=k.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
+function(H,I){k.invalidFileHandle=null;k.fileHandle=H;k.title=I.name;k.desc=I;this.save(I.name,d)}),null,this.createFileSystemOptions(k.getTitle()));else{var q=null!=k.getTitle()?k.getTitle():this.defaultFilename,x=!mxClient.IS_IOS||!navigator.standalone,C=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var G=4>=b?2:6<b?4:3;q=new CreateDialog(this,q,mxUtils.bind(this,function(H,I,E){null!=H&&0<H.length&&(/(\.pdf)$/i.test(H)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
+function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){E.value=H.split(".").slice(0,-1).join(".");E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==C&&I==App.MODE_DEVICE?null!=k&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(O,c){k.fileHandle=O;k.mode=App.MODE_DEVICE;k.title=c.name;
k.desc=c;this.setMode(App.MODE_DEVICE);this.save(c.name,d)}),mxUtils.bind(this,function(O){"AbortError"!=O.name&&this.handleError(O)}),this.createFileSystemOptions(H)):(this.setMode(App.MODE_DEVICE),this.save(H,d)):"download"==I?(new LocalFile(this,null,H)).save():"_blank"==I?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):C!=I?this.pickFolder(I,mxUtils.bind(this,function(O){this.createFile(H,
-this.getFileData(/(\.xml)$/i.test(H)||0>H.indexOf(".")||/(\.drawio)$/i.test(H),/(\.svg)$/i.test(H),/(\.html)$/i.test(H)),null,I,d,null==this.mode,O)})):null!=I&&this.save(H,d)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,x,null,!0,G,null,null,null,this.editor.fileExtensions,!1);this.showDialog(t.container,420,b>G?390:280,!0,!0);t.init()}else this.save(k.getTitle(),d)}};
-App.prototype.loadTemplate=function(b,f,k,d,t){var x=!1,C=b,G=null!=d?d:b,H=/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G);d=/\.png$/i.test(G)||/\.pdf$/i.test(G);this.editor.isCorsEnabledForUrl(C)||(x=d||H,C="t="+(new Date).getTime(),C=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+C+(x?"&base64=1":""));this.editor.loadUrl(C,mxUtils.bind(this,function(I){try{var F=x?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(I):atob(I):I;if(H||this.isVisioData(F))H||(G=t?this.isRemoteVisioData(F)?
-"raw.vss":"raw.vssx":this.isRemoteVisioData(F)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(I.substring(I.indexOf(",")+1)),function(O){f(O)},k,G);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,G))this.isExternalDataComms()?this.parseFileData(F,mxUtils.bind(this,function(O){4==O.readyState&&200<=O.status&&299>=O.status&&"<mxGraphModel"==O.responseText.substring(0,13)&&f(O.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k);
-else if(this.isLucidChartData(F))this.convertLucidChart(F,mxUtils.bind(this,function(O){f(O)}),mxUtils.bind(this,function(O){k(O)}));else{if(/(\.png)($|\?)/i.test(G)||Editor.isPngData(F))F=Editor.extractGraphModelFromPng(I);f(F)}}catch(O){k(O)}}),k,/(\.png)($|\?)/i.test(G)||/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G),null,null,x)};
+this.getFileData(/(\.xml)$/i.test(H)||0>H.indexOf(".")||/(\.drawio)$/i.test(H),/(\.svg)$/i.test(H),/(\.html)$/i.test(H)),null,I,d,null==this.mode,O)})):null!=I&&this.save(H,d)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,x,null,!0,G,null,null,null,this.editor.fileExtensions,!1);this.showDialog(q.container,420,b>G?390:280,!0,!0);q.init()}else this.save(k.getTitle(),d)}};
+App.prototype.loadTemplate=function(b,g,k,d,q){var x=!1,C=b,G=null!=d?d:b,H=/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G);d=/\.png$/i.test(G)||/\.pdf$/i.test(G);this.editor.isCorsEnabledForUrl(C)||(x=d||H,C="t="+(new Date).getTime(),C=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+C+(x?"&base64=1":""));this.editor.loadUrl(C,mxUtils.bind(this,function(I){try{var E=x?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(I):atob(I):I;if(H||this.isVisioData(E))H||(G=q?this.isRemoteVisioData(E)?
+"raw.vss":"raw.vssx":this.isRemoteVisioData(E)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(I.substring(I.indexOf(",")+1)),function(O){g(O)},k,G);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,G))this.isExternalDataComms()?this.parseFileData(E,mxUtils.bind(this,function(O){4==O.readyState&&200<=O.status&&299>=O.status&&"<mxGraphModel"==O.responseText.substring(0,13)&&g(O.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k);
+else if(this.isLucidChartData(E))this.convertLucidChart(E,mxUtils.bind(this,function(O){g(O)}),mxUtils.bind(this,function(O){k(O)}));else{if(/(\.png)($|\?)/i.test(G)||Editor.isPngData(E))E=Editor.extractGraphModelFromPng(I);g(E)}}catch(O){k(O)}}),k,/(\.png)($|\?)/i.test(G)||/(\.v(dx|sdx?))($|\?)/i.test(G)||/(\.vs(x|sx?))($|\?)/i.test(G),null,null,x)};
App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(b,f,k,d,t,x,C,G,H){d=G?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;var I=mxUtils.bind(this,function(){this.spinner.stop()}),F=mxUtils.bind(this,function(O){I();null==O&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=O&&this.handleError(O)});try{d==App.MODE_GOOGLE&&null!=this.drive?(null==C&&null!=this.stateArg&&null!=this.stateArg.folderId&&(C=this.stateArg.folderId),
-this.drive.insertFile(b,f,C,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,t,H)}),F)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,t,H)}),F,!1,C):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,t,H)}),F,!1,C):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,t,H)}),F,
-!1,C):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,t,H)}),F):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,t,H)}),F,!1,C):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,t,H)}),F):!G&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(I(),this.showSaveFilePicker(mxUtils.bind(this,
-function(O,c){var e=new LocalFile(this,f,c.name,null,O,c);e.saveFile(c.name,!1,mxUtils.bind(this,function(){this.fileCreated(e,k,x,t,H)}),F,!0)}),mxUtils.bind(this,function(O){"AbortError"!=O.name&&F(O)}),this.createFileSystemOptions(b))):(I(),this.fileCreated(new LocalFile(this,f,b,null==d),k,x,t,H))}catch(O){I(),this.handleError(O)}}};
-App.prototype.fileCreated=function(b,f,k,d,t){var x=window.location.pathname;null!=f&&0<f.length&&(x+="?libs="+f);null!=t&&0<t.length&&(x+="?clibs="+t);x=this.getUrl(x);b.getMode()!=App.MODE_DEVICE&&(x+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var C=b.getData();C=0<C.length?this.editor.extractGraphModel(mxUtils.parseXml(C).documentElement,!0):null;var G=window.location.protocol+"//"+window.location.hostname+x,H=C,I=null;null!=C&&/\.svg$/i.test(b.getTitle())&&
-(I=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(I.container),H=this.decodeNodeIntoGraph(H,I));b.setData(this.createFileData(C,I,b,G));null!=I&&I.container.parentNode.removeChild(I.container);var F=mxUtils.bind(this,function(){this.spinner.stop()}),O=mxUtils.bind(this,function(){F();var c=this.getCurrentFile();null==k&&null!=c&&(k=!c.isModified()&&null==c.getMode());var e=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);k&&b.addAllSavedStatus();
-null!=f&&this.sidebar.showEntries(f);if(null!=t){for(var n=[],p=t.split(";"),v=0;v<p.length;v++)n.push(decodeURIComponent(p[v]));this.loadLibraries(n)}}),g=mxUtils.bind(this,function(){k||null==c||!c.isModified()?e():this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==k||k?g():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
-null==b.getMode())),null!=d&&d(),window.openWindow(x,null,g))});b.constructor==LocalFile?O():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){O()}),mxUtils.bind(this,function(c){F();null!=c&&"AbortError"==c.name||this.handleError(c)}))}};
-App.prototype.loadFile=function(b,f,k,d,t){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var x=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 H=mxUtils.bind(this,function(e){this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();
-window.location.hash=null!=g?g.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(e){null!=e?(this.fileLoaded(new StorageFile(this,e,b)),null!=d&&d()):H({message:mxResources.get("fileNotFound")})}),H)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var e=this.getCurrentFile();window.location.hash=null!=e?e.getHash():""}));else if(null!=k)this.spinner.stop(),
+App.prototype.createFile=function(b,g,k,d,q,x,C,G,H){d=G?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){g=null!=g?g:this.emptyDiagramXml;var I=mxUtils.bind(this,function(){this.spinner.stop()}),E=mxUtils.bind(this,function(O){I();null==O&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=O&&this.handleError(O)});try{d==App.MODE_GOOGLE&&null!=this.drive?(null==C&&null!=this.stateArg&&null!=this.stateArg.folderId&&(C=this.stateArg.folderId),
+this.drive.insertFile(b,g,C,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,q,H)}),E)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,g,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,q,H)}),E,!1,C):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,g,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,q,H)}),E,!1,C):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,g,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,q,H)}),E,
+!1,C):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,g,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,q,H)}),E):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,g,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,q,H)}),E,!1,C):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,g,mxUtils.bind(this,function(O){I();this.fileCreated(O,k,x,q,H)}),E):!G&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(I(),this.showSaveFilePicker(mxUtils.bind(this,
+function(O,c){var e=new LocalFile(this,g,c.name,null,O,c);e.saveFile(c.name,!1,mxUtils.bind(this,function(){this.fileCreated(e,k,x,q,H)}),E,!0)}),mxUtils.bind(this,function(O){"AbortError"!=O.name&&E(O)}),this.createFileSystemOptions(b))):(I(),this.fileCreated(new LocalFile(this,g,b,null==d),k,x,q,H))}catch(O){I(),this.handleError(O)}}};
+App.prototype.fileCreated=function(b,g,k,d,q){var x=window.location.pathname;null!=g&&0<g.length&&(x+="?libs="+g);null!=q&&0<q.length&&(x+="?clibs="+q);x=this.getUrl(x);b.getMode()!=App.MODE_DEVICE&&(x+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var C=b.getData();C=0<C.length?this.editor.extractGraphModel(mxUtils.parseXml(C).documentElement,!0):null;var G=window.location.protocol+"//"+window.location.hostname+x,H=C,I=null;null!=C&&/\.svg$/i.test(b.getTitle())&&
+(I=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(I.container),H=this.decodeNodeIntoGraph(H,I));b.setData(this.createFileData(C,I,b,G));null!=I&&I.container.parentNode.removeChild(I.container);var E=mxUtils.bind(this,function(){this.spinner.stop()}),O=mxUtils.bind(this,function(){E();var c=this.getCurrentFile();null==k&&null!=c&&(k=!c.isModified()&&null==c.getMode());var e=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);k&&b.addAllSavedStatus();
+null!=g&&this.sidebar.showEntries(g);if(null!=q){for(var n=[],p=q.split(";"),t=0;t<p.length;t++)n.push(decodeURIComponent(p[t]));this.loadLibraries(n)}}),f=mxUtils.bind(this,function(){k||null==c||!c.isModified()?e():this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==k||k?f():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null==b.getMode())),null!=d&&d(),window.openWindow(x,null,f))});b.constructor==LocalFile?O():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){O()}),mxUtils.bind(this,function(c){E();null!=c&&"AbortError"==c.name||this.handleError(c)}))}};
+App.prototype.loadFile=function(b,g,k,d,q){if("1"==urlParams.openInSameWin||navigator.standalone)g=!0;this.hideDialog();var x=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 H=mxUtils.bind(this,function(e){this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var f=this.getCurrentFile();
+window.location.hash=null!=f?f.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(e){null!=e?(this.fileLoaded(new StorageFile(this,e,b)),null!=d&&d()):H({message:mxResources.get("fileNotFound")})}),H)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var e=this.getCurrentFile();window.location.hash=null!=e?e.getHash():""}));else if(null!=k)this.spinner.stop(),
this.fileLoaded(k),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var I=decodeURIComponent(b.substring(1));"<"!=I.charAt(0)&&(I=Graph.decompress(I));I=new LocalFile(this,I,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);I.getHash=function(){return b};this.fileLoaded(I);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(e,g){this.spinner.stop();this.fileLoaded(new EmbedFile(this,e,g));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var F=decodeURIComponent(b.substring(1)),O=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=F.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var e=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var g=F.substring(31,F.lastIndexOf("&ex"));this.loadFile("G"+g,f,null,mxUtils.bind(this,function(){var n=this.getCurrentFile();null!=n&&this.editor.chromeless&&
-!this.editor.editable&&(n.getHash=function(){return"G"+g},window.location.hash="#"+n.getHash());null!=d&&d()}));return!0}return!1});!e()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",e);return!0});this.loadTemplate(F,mxUtils.bind(this,function(e){this.spinner.stop();if(null!=e&&0<e.length){var g=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var n=F,p=F.lastIndexOf("."),v=n.lastIndexOf("/");p>v&&0<v&&(n=n.substring(v+1,p),p=F.substring(p),
-this.useCanvasForExport||".png"!=p||(p=".drawio"),".svg"===p||".xml"===p||".html"===p||".png"===p||".drawio"===p)&&(g=n+p)}e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):g,!0);e.getHash=function(){return b};this.fileLoaded(e,!0)?null!=d&&d():O()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else O()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+this.defaultFilename,!0);I.getHash=function(){return b};this.fileLoaded(I);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(e,f){this.spinner.stop();this.fileLoaded(new EmbedFile(this,e,f));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var E=decodeURIComponent(b.substring(1)),O=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=E.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var e=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var f=E.substring(31,E.lastIndexOf("&ex"));this.loadFile("G"+f,g,null,mxUtils.bind(this,function(){var n=this.getCurrentFile();null!=n&&this.editor.chromeless&&
+!this.editor.editable&&(n.getHash=function(){return"G"+f},window.location.hash="#"+n.getHash());null!=d&&d()}));return!0}return!1});!e()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",e);return!0});this.loadTemplate(E,mxUtils.bind(this,function(e){this.spinner.stop();if(null!=e&&0<e.length){var f=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var n=E,p=E.lastIndexOf("."),t=n.lastIndexOf("/");p>t&&0<t&&(n=n.substring(t+1,p),p=E.substring(p),
+this.useCanvasForExport||".png"!=p||(p=".drawio"),".svg"===p||".xml"===p||".html"===p||".png"===p||".drawio"===p)&&(f=n+p)}e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):f,!0);e.getHash=function(){return b};this.fileLoaded(e,!0)?null!=d&&d():O()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else O()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){O()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(I=null,"G"==b.charAt(0)?I=this.drive:"D"==b.charAt(0)?I=this.dropbox:"W"==b.charAt(0)?I=this.oneDrive:"H"==b.charAt(0)?I=this.gitHub:"A"==b.charAt(0)?I=this.gitLab:"T"==b.charAt(0)&&(I=this.trello),null==I)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var e=this.getCurrentFile();window.location.hash=null!=e?e.getHash():""}));else{var c=b.charAt(0);b=decodeURIComponent(b.substring(1));I.getFile(b,mxUtils.bind(this,function(e){this.spinner.stop();this.fileLoaded(e);var g=this.getCurrentFile();null==g?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(g.getHash=function(){return c+b},window.location.hash="#"+g.getHash()):e==g&&null==e.getMode()&&
-(e=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(e){null!=window.console&&null!=e&&console.log("error in loadFile:",b,e);var g=mxUtils.bind(this,function(){var n=this.getCurrentFile();null==n?(window.location.hash="",this.showSplash()):window.location.hash="#"+n.getHash()});null==e||"AbortError"!=e.name?this.handleError(e,null!=e?mxResources.get("errorLoadingFile"):null,g,null,null,"#"+c+b):g()}))}}),
-C=this.getCurrentFile(),G=mxUtils.bind(this,function(){t||null==C||!C.isModified()?x():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=C&&(window.location.hash=C.getHash())}),x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?G():null==C||f?G():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,G)).container,320,140,!0,!0)};
-App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+
-mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(k){for(var d=0;d<k.length;d++)""!=k[d]&&0>mxUtils.indexOf(f,k[d])&&f.push(k[d])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
-App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(I,F){F||mxSettings.removeCustomLibrary(I);delete this.loadedLibraries[I]}),d=0,t=[],x=0<b.length&&"L.scratchpad"==b[0]?1:0,C=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var I=b.length-1;0<=I;I--)null!=t[I]&&this.loadLibrary(t[I],I<=x);null!=f&&f()}});if(null!=b)for(var G=0;G<b.length;G++){var H=encodeURIComponent(decodeURIComponent(b[G]));
-mxUtils.bind(this,function(I,F){if(null!=I&&0<I.length&&null==this.loadedLibraries[I]&&null==this.sidebar.palettes[I]){this.loadedLibraries[I]=!0;d++;var O=mxUtils.bind(this,function(v){t[F]=v;d--;C()}),c=mxUtils.bind(this,function(v){k(I,v);d--;C()}),e=I.substring(0,1);if("L"==e)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var v=decodeURIComponent(I.substring(1));StorageFile.getFileContent(this,v,mxUtils.bind(this,function(y){".scratchpad"==v&&null==
-y&&(y=this.emptyLibraryXml);null!=y?O(new StorageLibrary(this,y,v)):c()}),c)}catch(y){c()}}),0);else if("U"==e){var g=decodeURIComponent(I.substring(1));this.isOffline()||this.loadTemplate(g,mxUtils.bind(this,function(v){null!=v&&0<v.length?O(new UrlLibrary(this,v,g)):c()}),function(){c()},null,!0)}else if("R"==e){e=decodeURIComponent(I.substring(1));try{e=JSON.parse(e);var n={id:e[0],title:e[1],downloadUrl:e[2]};this.remoteInvoke("getFileContent",[n.downloadUrl],null,mxUtils.bind(this,function(v){try{O(new RemoteLibrary(this,
-v,n))}catch(y){c()}}),function(){c()})}catch(v){c()}}else if("S"==e&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(I.substring(1)),function(v){O(v)},c)}catch(v){c()}else{var p=null;"G"==e?null!=this.drive&&null!=this.drive.user&&(p=this.drive):"H"==e?null!=this.gitHub&&null!=this.gitHub.getUser()&&(p=this.gitHub):"T"==e?null!=this.trello&&this.trello.isAuthorized()&&(p=this.trello):"D"==e?null!=this.dropbox&&null!=this.dropbox.getUser()&&(p=this.dropbox):"W"==e&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(p=this.oneDrive);null!=p?p.getLibrary(decodeURIComponent(I.substring(1)),mxUtils.bind(this,function(v){try{O(v)}catch(y){c()}}),function(v){c()}):c(!0)}}})(H,G)}C()}};
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var e=this.getCurrentFile();window.location.hash=null!=e?e.getHash():""}));else{var c=b.charAt(0);b=decodeURIComponent(b.substring(1));I.getFile(b,mxUtils.bind(this,function(e){this.spinner.stop();this.fileLoaded(e);var f=this.getCurrentFile();null==f?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(f.getHash=function(){return c+b},window.location.hash="#"+f.getHash()):e==f&&null==e.getMode()&&
+(e=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+e+'" class="geStatusAlert">'+e+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(e){null!=window.console&&null!=e&&console.log("error in loadFile:",b,e);var f=mxUtils.bind(this,function(){var n=this.getCurrentFile();null==n?(window.location.hash="",this.showSplash()):window.location.hash="#"+n.getHash()});null==e||"AbortError"!=e.name?this.handleError(e,null!=e?mxResources.get("errorLoadingFile"):null,f,null,null,"#"+c+b):f()}))}}),
+C=this.getCurrentFile(),G=mxUtils.bind(this,function(){q||null==C||!C.isModified()?x():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=C&&(window.location.hash=C.getHash())}),x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?G():null==C||g?G():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,G)).container,320,140,!0,!0)};
+App.prototype.getLibraryStorageHint=function(b){var g=b.getTitle();b.constructor!=LocalLibrary&&(g+="\n"+b.getHash());b.constructor==DriveLibrary?g+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?g+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?g+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?g+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?g+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?g+=" ("+
+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(g+=" ("+mxResources.get("device")+")");return g};App.prototype.restoreLibraries=function(){function b(k){for(var d=0;d<k.length;d++)""!=k[d]&&0>mxUtils.indexOf(g,k[d])&&g.push(k[d])}var g=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(g)};
+App.prototype.loadLibraries=function(b,g){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var k=mxUtils.bind(this,function(I,E){E||mxSettings.removeCustomLibrary(I);delete this.loadedLibraries[I]}),d=0,q=[],x=0<b.length&&"L.scratchpad"==b[0]?1:0,C=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var I=b.length-1;0<=I;I--)null!=q[I]&&this.loadLibrary(q[I],I<=x);null!=g&&g()}});if(null!=b)for(var G=0;G<b.length;G++){var H=encodeURIComponent(decodeURIComponent(b[G]));
+mxUtils.bind(this,function(I,E){if(null!=I&&0<I.length&&null==this.loadedLibraries[I]&&null==this.sidebar.palettes[I]){this.loadedLibraries[I]=!0;d++;var O=mxUtils.bind(this,function(t){q[E]=t;d--;C()}),c=mxUtils.bind(this,function(t){k(I,t);d--;C()}),e=I.substring(0,1);if("L"==e)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var t=decodeURIComponent(I.substring(1));StorageFile.getFileContent(this,t,mxUtils.bind(this,function(y){".scratchpad"==t&&null==
+y&&(y=this.emptyLibraryXml);null!=y?O(new StorageLibrary(this,y,t)):c()}),c)}catch(y){c()}}),0);else if("U"==e){var f=decodeURIComponent(I.substring(1));this.isOffline()||this.loadTemplate(f,mxUtils.bind(this,function(t){null!=t&&0<t.length?O(new UrlLibrary(this,t,f)):c()}),function(){c()},null,!0)}else if("R"==e){e=decodeURIComponent(I.substring(1));try{e=JSON.parse(e);var n={id:e[0],title:e[1],downloadUrl:e[2]};this.remoteInvoke("getFileContent",[n.downloadUrl],null,mxUtils.bind(this,function(t){try{O(new RemoteLibrary(this,
+t,n))}catch(y){c()}}),function(){c()})}catch(t){c()}}else if("S"==e&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(I.substring(1)),function(t){O(t)},c)}catch(t){c()}else{var p=null;"G"==e?null!=this.drive&&null!=this.drive.user&&(p=this.drive):"H"==e?null!=this.gitHub&&null!=this.gitHub.getUser()&&(p=this.gitHub):"T"==e?null!=this.trello&&this.trello.isAuthorized()&&(p=this.trello):"D"==e?null!=this.dropbox&&null!=this.dropbox.getUser()&&(p=this.dropbox):"W"==e&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(p=this.oneDrive);null!=p?p.getLibrary(decodeURIComponent(I.substring(1)),mxUtils.bind(this,function(t){try{O(t)}catch(y){c()}}),function(t){c()}):c(!0)}}})(H,G)}C()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&"simple"!=Editor.currentTheme&&("1"!=urlParams.sketch&&(this.buttonContainer.style.paddingRight="12px"),this.buttonContainer.style.paddingTop="6px");this.commentsSupported()&&"1"!=urlParams.sketch&&"simple"!=Editor.currentTheme?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className=
"geToolbarButton geAdaptiveAsset",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),"atlas"==uiTheme&&(this.commentButton.style.filter="invert(100%)")):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&
this.fetchAndShowNotification(urlParams.notif):(null!=b?(null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight=
"28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.className="geInverseAdaptiveAsset",b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),"atlas"!=uiTheme&&(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),
mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)),this.shareButton.style.display="simple"==Editor.currentTheme||"min"==Editor.currentTheme?"none":"inline-block"):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}};
-App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var k=null,d=mxUtils.bind(this,function(t){t=t.filter(function(H){return!H.targets||-1<H.targets.indexOf(b)||null!=f&&-1<H.targets.indexOf(f)});for(var x=b+"NotifReadTS",C=isLocalStorage?parseInt(localStorage.getItem(x)):!0,G=0;G<t.length;G++)t[G].isNew=!C||t[G].timestamp>C;this.showNotification(t,x)});try{isLocalStorage&&(k=JSON.parse(localStorage.getItem(".notifCache")))}catch(t){}null==k||k.ts+864E5<Date.now()?
-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(t){200<=t.getStatus()&&299>=t.getStatus()&&(t=JSON.parse(t.getText()),t.sort(function(x,C){return C.timestamp-x.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:t})),this.fetchingNotif=!1,d(t))}))):d(k.notifs)}};
-App.prototype.showNotification=function(b,f){function k(I){var F=document.querySelector(".geNotification-count");null!=F&&(F.innerHTML=I,F.style.display=0==I?"none":"",F=document.querySelector(".geNotification-bell"),F.style.animation=0==I?"none":"",F.className="geNotification-bell"+(0==I?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==I?"none":"")}var d=b.length;if("min"==uiTheme)for(var t=d=0;t<b.length;t++)b[t].isNew&&d++;if(0==d)null!=this.notificationBtn&&
-(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var x=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var I=this.notificationWin.querySelectorAll(".circle.active"),F=0;F<I.length;F++)I[F].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme?
-(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);d=document.createElement("div");d.className="geNotification-bell";d.style.opacity="min"==uiTheme?"0.5":"";t=document.createElement("span");t.className="geBell-top";d.appendChild(t);t=document.createElement("span");t.className="geBell-middle";d.appendChild(t);
-t=document.createElement("span");t.className="geBell-bottom";d.appendChild(t);t=document.createElement("span");t.className="geBell-rad";d.appendChild(t);this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);t=document.createElement("div");t.className=
-"header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");t.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";t.appendChild(d);this.notificationWin.appendChild(t);t=document.createElement("div");t.className="notifications clearfix";var C=document.createElement("div");C.setAttribute("id","geNotifList");C.style.position="relative";t.appendChild(C);this.notificationWin.appendChild(t);mxEvent.addListener(this.notificationBtn,
-"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var I=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=I.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=I.right-this.notificationWin.clientWidth+"px";k(0)}else x()}));mxEvent.addListener(d,"click",x)}else this.notificationBtn.style.display="";var G=0,H=document.getElementById("geNotifList");
-if(null!=H){H.innerHTML='<div class="line"></div>';for(t=0;t<b.length;t++)(function(I,F){F.isNew&&G++;var O=document.createElement("div");O.className="notification";I=I.timeSince(new Date(F.timestamp));null==I&&(I=mxResources.get("lessThanAMinute"));O.innerHTML='<div class="circle'+(F.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[I],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(F.content)+"</p>";F.link&&mxEvent.addListener(O,"click",function(){window.open(F.link,
-"notifWin")});H.appendChild(O)})(this,b[t]);k(G)}}};
-App.prototype.save=function(b,f){var k=this.getCurrentFile();if(null!=k&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(){k.handleFileSuccess(!0);null!=f&&f()}),t=mxUtils.bind(this,function(x){k.isModified()&&Editor.addRetryToError(x,mxUtils.bind(this,function(){this.save(b,f)}));k.handleFileError(x,null==x||"AbortError"!=x.name)});try{b==k.getTitle()?k.save(!0,d,
-t):k.saveAs(b,d,t)}catch(x){t(x)}}};
-App.prototype.pickFolder=function(b,f,k,d,t){k=null!=k?k:!0;var x=this.spinner.pause();k&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(C){x();if(C.action==google.picker.Action.PICKED){var G=null;null!=C.docs&&0<C.docs.length&&"folder"==C.docs[0].type&&(G=C.docs[0].id);f(G)}}),t):k&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(C){x();null!=C&&null!=C.value&&0<C.value.length&&(C=OneDriveFile.prototype.getIdOf(C.value[0]),
-f(C))}),d):k&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(C){x();f(C)})):k&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(C){x();f(C)})):k&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(C){x();f(C)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,f,k,d,t,x){t==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)})):t==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,x,mxUtils.bind(this,function(C){this.spinner.stop()}),
-mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),k,d):t==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,x):t==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,x,d):t==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,x,d):t==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b,
-k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,x):t==App.MODE_BROWSER&&(k=mxUtils.bind(this,function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?k():this.confirm(mxResources.get("replaceIt",[f]),k))};
-App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f);this.fname.setAttribute("title",f+" - "+mxResources.get("rename"))}f=this.editor.graph;var k=b.isEditable()&&!b.invalidChecksum;f.isEnabled()&&!k&&f.reset();f.setEnabled(k);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?
-window.location.hash=f:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
-App.prototype.showAuthDialog=function(b,f,k,d){var t=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(x){try{null!=k&&k(x,mxUtils.bind(this,function(){this.hideDialog();t()}))}catch(C){this.editor.setStatus(mxUtils.htmlEntities(C.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(x){null!=d&&d(x);x&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,f,k,d,t,x,C,G){var H=f;/\.svg$/i.test(H)||(H=H.substring(0,f.lastIndexOf("."))+d);var I=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(I=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var F=new XMLHttpRequest;F.open("GET",b,!0);I||(F.responseType="blob");if(G)for(var O in G)F.setRequestHeader(O,G[O]);F.onload=mxUtils.bind(this,function(){if(200<=
-F.status&&299>=F.status){var e=null;I?(e=JSON.parse(F.responseText),e=this.base64ToBlob(e.content,"application/octet-stream")):e=new Blob([F.response],{type:"application/octet-stream"});this.importVisio(e,mxUtils.bind(this,function(g){t(new LocalFile(this,g,H,!0))}),x,f)}else null!=x&&x({message:mxResources.get("errorLoadingFile")})});F.onerror=x;F.send()}else{var c=mxUtils.bind(this,function(e){try{if(/\.pdf$/i.test(f)){var g=Editor.extractGraphModelFromPdf(e);null!=g&&0<g.length&&t(new LocalFile(this,
-g,H,!0))}else/\.png$/i.test(f)?(g=this.extractGraphModelFromPng(e),null!=g?t(new LocalFile(this,g,H,!0)):t(new LocalFile(this,e,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,b)?this.parseFileData(e,mxUtils.bind(this,function(n){4==n.readyState&&(200<=n.status&&299>=n.status?t(new LocalFile(this,n.responseText,H,!0)):null!=x&&x({message:mxResources.get("errorLoadingFile")}))}),f):t(new LocalFile(this,e,H,!0))}catch(n){null!=x&&x(n)}});k=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
-/\.pdf$/i.test(f)||null!=k&&"image/"==k.substring(0,6);I?mxUtils.get(b,mxUtils.bind(this,function(e){if(200<=e.getStatus()&&299>=e.getStatus()){if(null!=t){e=JSON.parse(e.getText());var g=e.content;"base64"===e.encoding&&(g=/\.png$/i.test(f)?"data:image/png;base64,"+g:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+g:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(g):atob(g));c(g)}}else null!=x&&x({code:App.ERROR_UNKNOWN})}),function(){null!=x&&x({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+App.prototype.fetchAndShowNotification=function(b,g){if(!this.fetchingNotif){b=b||"online";var k=null,d=mxUtils.bind(this,function(q){q=q.filter(function(H){return!H.targets||-1<H.targets.indexOf(b)||null!=g&&-1<H.targets.indexOf(g)});for(var x=b+"NotifReadTS",C=isLocalStorage?parseInt(localStorage.getItem(x)):!0,G=0;G<q.length;G++)q[G].isNew=!C||q[G].timestamp>C;this.showNotification(q,x)});try{isLocalStorage&&(k=JSON.parse(localStorage.getItem(".notifCache")))}catch(q){}null==k||k.ts+864E5<Date.now()?
+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(q){200<=q.getStatus()&&299>=q.getStatus()&&(q=JSON.parse(q.getText()),q.sort(function(x,C){return C.timestamp-x.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:q})),this.fetchingNotif=!1,d(q))}))):d(k.notifs)}};
+App.prototype.showNotification=function(b,g){function k(I){var E=document.querySelector(".geNotification-count");null!=E&&(E.innerHTML=I,E.style.display=0==I?"none":"",E=document.querySelector(".geNotification-bell"),E.style.animation=0==I?"none":"",E.className="geNotification-bell"+(0==I?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==I?"none":"")}var d=b.length;if("min"==uiTheme)for(var q=d=0;q<b.length;q++)b[q].isNew&&d++;if(0==d)null!=this.notificationBtn&&
+(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var x=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var I=this.notificationWin.querySelectorAll(".circle.active"),E=0;E<I.length;E++)I[E].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(g,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";d=document.createElement("span");
+d.className="geNotification-count";this.notificationBtn.appendChild(d);if("simple"==Editor.currentTheme||"min"==Editor.currentTheme){if("min"!=Editor.currentTheme||"1"==urlParams.sketch)this.notificationBtn.style.width="30px",d.style.marginRight="-10px";this.notificationBtn.style.top="simple"==Editor.currentTheme||"1"==urlParams.sketch?"7px":"4px"}else"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");d=document.createElement("div");d.className="geNotification-bell";d.style.opacity="min"==
+uiTheme?"0.5":"";q=document.createElement("span");q.className="geBell-top";d.appendChild(q);q=document.createElement("span");q.className="geBell-middle";d.appendChild(q);q=document.createElement("span");q.className="geBell-bottom";d.appendChild(q);q=document.createElement("span");q.className="geBell-rad";d.appendChild(q);this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className=
+"geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);q=document.createElement("div");q.className="header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");q.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";q.appendChild(d);this.notificationWin.appendChild(q);q=document.createElement("div");q.className="notifications clearfix";var C=document.createElement("div");
+C.setAttribute("id","geNotifList");C.style.position="relative";q.appendChild(C);this.notificationWin.appendChild(q);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var I=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=I.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=I.right-this.notificationWin.clientWidth+
+"px";k(0)}else x()}));mxEvent.addListener(d,"click",x)}else this.notificationBtn.style.display="";var G=0,H=document.getElementById("geNotifList");if(null!=H){H.innerHTML='<div class="line"></div>';for(q=0;q<b.length;q++)(function(I,E){E.isNew&&G++;var O=document.createElement("div");O.className="notification";I=I.timeSince(new Date(E.timestamp));null==I&&(I=mxResources.get("lessThanAMinute"));O.innerHTML='<div class="circle'+(E.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",
+[I],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(E.content)+"</p>";E.link&&mxEvent.addListener(O,"click",function(){window.open(E.link,"notifWin")});H.appendChild(O)})(this,b[q]);k(G)}}};
+App.prototype.save=function(b,g){var k=this.getCurrentFile();if(null!=k&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(){k.handleFileSuccess(!0);null!=g&&g()}),q=mxUtils.bind(this,function(x){k.isModified()&&Editor.addRetryToError(x,mxUtils.bind(this,function(){this.save(b,g)}));k.handleFileError(x,null==x||"AbortError"!=x.name)});try{b==k.getTitle()?k.save(!0,d,
+q):k.saveAs(b,d,q)}catch(x){q(x)}}};
+App.prototype.pickFolder=function(b,g,k,d,q){k=null!=k?k:!0;var x=this.spinner.pause();k&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(C){x();if(C.action==google.picker.Action.PICKED){var G=null;null!=C.docs&&0<C.docs.length&&"folder"==C.docs[0].type&&(G=C.docs[0].id);g(G)}}),q):k&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(C){x();null!=C&&null!=C.value&&0<C.value.length&&(C=OneDriveFile.prototype.getIdOf(C.value[0]),
+g(C))}),d):k&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(C){x();g(C)})):k&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(C){x();g(C)})):k&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(C){x();g(C)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,g,k,d,q,x){q==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(g,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)})):q==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(g,b,x,mxUtils.bind(this,function(C){this.spinner.stop()}),
+mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),k,d):q==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(g,d?this.base64ToBlob(b,k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,x):q==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(g,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,x,d):q==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(g,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,x,d):q==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(g,d?this.base64ToBlob(b,
+k):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,x):q==App.MODE_BROWSER&&(k=mxUtils.bind(this,function(){localStorage.setItem(g,b)}),null==localStorage.getItem(g)?k():this.confirm(mxResources.get("replaceIt",[g]),k))};
+App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var g=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,g);this.fname.setAttribute("title",g+" - "+mxResources.get("rename"))}g=this.editor.graph;var k=b.isEditable()&&!b.invalidChecksum;g.isEnabled()&&!k&&g.reset();g.setEnabled(k);null==urlParams.rev&&(this.updateDocumentTitle(),g=b.getHash(),0<g.length?
+window.location.hash=g:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
+App.prototype.showAuthDialog=function(b,g,k,d){var q=this.spinner.pause();this.showDialog((new AuthDialog(this,b,g,mxUtils.bind(this,function(x){try{null!=k&&k(x,mxUtils.bind(this,function(){this.hideDialog();q()}))}catch(C){this.editor.setStatus(mxUtils.htmlEntities(C.message))}}))).container,300,g?180:140,!0,!0,mxUtils.bind(this,function(x){null!=d&&d(x);x&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,g,k,d,q,x,C,G){var H=g;/\.svg$/i.test(H)||(H=H.substring(0,g.lastIndexOf("."))+d);var I=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(I=!0);if(/\.v(dx|sdx?)$/i.test(g)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var E=new XMLHttpRequest;E.open("GET",b,!0);I||(E.responseType="blob");if(G)for(var O in G)E.setRequestHeader(O,G[O]);E.onload=mxUtils.bind(this,function(){if(200<=
+E.status&&299>=E.status){var e=null;I?(e=JSON.parse(E.responseText),e=this.base64ToBlob(e.content,"application/octet-stream")):e=new Blob([E.response],{type:"application/octet-stream"});this.importVisio(e,mxUtils.bind(this,function(f){q(new LocalFile(this,f,H,!0))}),x,g)}else null!=x&&x({message:mxResources.get("errorLoadingFile")})});E.onerror=x;E.send()}else{var c=mxUtils.bind(this,function(e){try{if(/\.pdf$/i.test(g)){var f=Editor.extractGraphModelFromPdf(e);null!=f&&0<f.length&&q(new LocalFile(this,
+f,H,!0))}else/\.png$/i.test(g)?(f=this.extractGraphModelFromPng(e),null!=f?q(new LocalFile(this,f,H,!0)):q(new LocalFile(this,e,g,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,b)?this.parseFileData(e,mxUtils.bind(this,function(n){4==n.readyState&&(200<=n.status&&299>=n.status?q(new LocalFile(this,n.responseText,H,!0)):null!=x&&x({message:mxResources.get("errorLoadingFile")}))}),g):q(new LocalFile(this,e,H,!0))}catch(n){null!=x&&x(n)}});k=/\.png$/i.test(g)||/\.jpe?g$/i.test(g)||
+/\.pdf$/i.test(g)||null!=k&&"image/"==k.substring(0,6);I?mxUtils.get(b,mxUtils.bind(this,function(e){if(200<=e.getStatus()&&299>=e.getStatus()){if(null!=q){e=JSON.parse(e.getText());var f=e.content;"base64"===e.encoding&&(f=/\.png$/i.test(g)?"data:image/png;base64,"+f:/\.pdf$/i.test(g)?"data:application/pdf;base64,"+f:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(f):atob(f));c(f)}}else null!=x&&x({code:App.ERROR_UNKNOWN})}),function(){null!=x&&x({code:App.ERROR_UNKNOWN})},!1,this.timeout,
function(){null!=x&&x({code:App.ERROR_TIMEOUT,retry:fn})},G):null!=C?C(b,c,x,k):this.editor.loadUrl(b,c,x,k,null,null,null,G)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundSize=
-"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(t){this.appIconClicked(t)}));var f=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",f);f();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
-mxUtils.bind(this,function(){var t=this.getCurrentFile();null!=t&&(t=t.getMode(),t==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):t==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):t==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize=
-"70% 70%"):t==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):t==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):t==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout",
+"100% 100%";this.appIcon.style.backgroundRepeat="no-repeat";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(q){this.appIconClicked(q)}));var g=mxUtils.bind(this,function(){this.appIcon.style.backgroundColor=Editor.isDarkMode()?"":"#f08705"});this.addListener("darkModeChanged",g);g();mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",
+mxUtils.bind(this,function(){var q=this.getCurrentFile();null!=q&&(q=q.getMode(),q==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):q==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):q==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize=
+"70% 70%"):q==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize="70% 70%"):q==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="100% 100%"):q==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70% 70%"))}));mxEvent.addListener(this.appIcon,"mouseout",
mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize="90% 90%"}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position="absolute";this.fnameWrapper.style.right="120px";this.fnameWrapper.style.left="60px";this.fnameWrapper.style.top="9px";this.fnameWrapper.style.height="26px";this.fnameWrapper.style.display="none";this.fnameWrapper.style.overflow="hidden";
-this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,
-function(t){var x=this.getCurrentFile();null!=x&&x.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(t)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box",
-this.menubar.container.style.top="34px");f="atlas"!=uiTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right=f+"px";this.toggleFormatElement.style.padding="2px";
-this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);f+=20;mxEvent.addListener(this.toggleFormatElement,
-mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(t){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"format"});this.actions.get("format").funct();mxEvent.consume(t)}));var k=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",
-k);k();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=f+"px";this.toolbarContainer.appendChild(this.fullscreenElement);f+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()}));mxEvent.addListener(this.fullscreenElement,
-"click",mxUtils.bind(this,function(t){var x=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:x});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(x);x||(d=this.hsplitPosition);this.hsplitPosition=x?d:0;this.toggleFormatPanel(x);this.fullscreenMode=!x;mxEvent.consume(t)}));"1"!=urlParams["live-ui"]&&"atlas"!=uiTheme&&"1"!=urlParams.embed&&(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",
-mxResources.get("theme")),this.darkModeElement.style.right=f+"px",this.toolbarContainer.appendChild(this.darkModeElement),f+=20,f=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged",f),f(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(this.darkModeElement,
-"click",mxUtils.bind(this,function(t){this.actions.get("toggleDarkMode").funct();mxEvent.consume(t)})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var d=this.hsplitPosition;"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display=
+this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()}));mxEvent.addListener(this.fname,"click",mxUtils.bind(this,
+function(q){var x=this.getCurrentFile();null!=x&&x.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(q)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.toolbar.container.style.paddingLeft="16px",this.menubar.container.style.boxSizing="border-box",
+this.menubar.container.style.top="34px");g="atlas"!=uiTheme&&"1"!=urlParams.embed?30:10;this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="atlas"==uiTheme?"8px":"6px";this.toggleFormatElement.style.right=g+"px";this.toggleFormatElement.style.padding="2px";
+this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton geAdaptiveAsset":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition="50% 50%";this.toggleFormatElement.style.backgroundSize="16px 16px";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);g+=20;mxEvent.addListener(this.toggleFormatElement,
+mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()}));mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(q){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"format"});this.actions.get("format").funct();mxEvent.consume(q)}));var k=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+"')"});this.addListener("formatWidthChanged",
+k);k();this.fullscreenElement=this.toggleFormatElement.cloneNode(!0);this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.backgroundImage="url('"+Editor.fullscreenImage+"')";this.fullscreenElement.style.right=g+"px";this.toolbarContainer.appendChild(this.fullscreenElement);g+=20;mxEvent.addListener(this.fullscreenElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()}));mxEvent.addListener(this.fullscreenElement,
+"click",mxUtils.bind(this,function(q){var x=this.fullscreenMode;EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"fullscreen",currentstate:x});"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(x);x||(d=this.hsplitPosition);this.hsplitPosition=x?d:0;this.toggleFormatPanel(x);this.fullscreenMode=!x;mxEvent.consume(q)}));Editor.enableSimpleTheme||"atlas"==uiTheme||"1"==urlParams.embed||(this.darkModeElement=this.toggleFormatElement.cloneNode(!0),this.darkModeElement.setAttribute("title",
+mxResources.get("theme")),this.darkModeElement.style.right=g+"px",this.toolbarContainer.appendChild(this.darkModeElement),g+=20,g=mxUtils.bind(this,function(){this.darkModeElement.style.backgroundImage="url('"+(Editor.isDarkMode()||"atlas"==uiTheme?Editor.lightModeImage:Editor.darkModeImage)+"')"}),this.addListener("darkModeChanged",g),g(),mxEvent.addListener(this.darkModeElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()})),mxEvent.addListener(this.darkModeElement,
+"click",mxUtils.bind(this,function(q){this.actions.get("toggleDarkMode").funct();mxEvent.consume(q)})));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70));var d=this.hsplitPosition;"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton geAdaptiveAsset",this.toggleElement.style.position="absolute",this.toggleElement.style.display=
"inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",this.toggleElement.style.top="atlas"==uiTheme?"8px":"6px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat=
-"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(t){t.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(t){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(t)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,
+"no-repeat",mxEvent.addListener(this.toggleElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(q){q.preventDefault()})),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(q){EditorUi.logEvent({category:"TOOLBAR-ACTION-",action:"toggleUI"});this.toggleCompactMode();mxEvent.consume(q)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,
function(){this.toggleElement.click()}),0))}};
App.prototype.toggleCompactMode=function(b){(b=null!=b?b:this.compactMode)?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="59px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="34px",this.toolbar.container.style.paddingLeft="16px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility=
"visible",this.menubarHeight=App.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')"):(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="8px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none",
@@ -12307,432 +12320,432 @@ var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():n
560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="inline-block")):this.userElement.style.display="none"}else this.userElement.style.display="none";this.updateUserElementStyle();this.updateUserElementIcon()};
App.prototype.updateUserElementStyle=function(){var b=this.userElement;null!=b&&("simple"==Editor.currentTheme||"min"==Editor.currentTheme?(b.className="geToolbarButton",b.style.backgroundImage="url("+Editor.userImage+")",b.style.backgroundPosition="center center",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="100% 100%",b.style.position="relative",b.style.margin="0px",b.style.padding="0px",b.style.height="24px",b.style.width="24px",b.style.right="","min"==Editor.currentTheme&&(b.style.top=
"3px")):(b.className="geItem",b.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",b.style.backgroundPosition="100% 60%",b.style.backgroundRepeat="no-repeat",b.style.backgroundSize="",b.style.position="absolute",b.style.margin="4px",b.style.padding="2px",b.style.paddingRight="16px",b.style.width="",b.style.height="",b.style.right="atlas"==Editor.currentTheme||null!=this.darkModeElement?"12px":"26px",b.style.top="atlas"==Editor.currentTheme?"8px":"2px"))};
-App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var f=mxResources.get("changeUser");if("none"!=b.style.display){var k=this.getCurrentFile();if(null!=k&&k.isRealtimeEnabled()&&k.isRealtimeSupported()){var d=document.createElement("img");d.setAttribute("border","0");d.style.position="absolute";d.style.left="16px";d.style.top="2px";d.style.width="12px";d.style.height="12px";var t=k.getRealtimeError();k=k.getRealtimeState();f+=" (";1==k?(d.src=Editor.syncImage,f+=mxResources.get("online")):
-(d.src=Editor.syncProblemImage,f=null!=t&&null!=t.message?f+t.message:f+mxResources.get("disconnected"));f+=")";if("simple"==Editor.currentTheme||"min"==Editor.currentTheme)b.style.marginRight="4px",b.appendChild(d)}b.setAttribute("title",f)}}};
-App.prototype.createUserElement=function(){var b=document.createElement("a");mxUtils.setPrefixedStyle(b.style,"transition","none");b.style.display="inline-block";b.style.cursor="pointer";b.style.fontSize="8pt";mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){if(null==this.userPanel){var k=document.createElement("div");k.className="geDialog";k.style.position="absolute";
+App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b){var g=mxResources.get("changeUser");if("none"!=b.style.display){var k=this.getCurrentFile();if(null!=k&&k.isRealtimeEnabled()&&k.isRealtimeSupported()){var d=document.createElement("img");d.setAttribute("border","0");d.style.position="absolute";d.style.left="16px";d.style.top="2px";d.style.width="12px";d.style.height="12px";var q=k.getRealtimeError();k=k.getRealtimeState();g+=" (";1==k?(d.src=Editor.syncImage,g+=mxResources.get("online")):
+(d.src=Editor.syncProblemImage,g=null!=q&&null!=q.message?g+q.message:g+mxResources.get("disconnected"));g+=")";if("simple"==Editor.currentTheme||"min"==Editor.currentTheme)b.style.marginRight="4px",b.appendChild(d)}b.setAttribute("title",g)}}};
+App.prototype.createUserElement=function(){var b=document.createElement("a");mxUtils.setPrefixedStyle(b.style,"transition","none");b.style.display="inline-block";b.style.cursor="pointer";b.style.fontSize="8pt";mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(g){if(null==this.userPanel){var k=document.createElement("div");k.className="geDialog";k.style.position="absolute";
k.style.top=b.clientTop+b.clientHeight+6+"px";k.style.zIndex=5;k.style.right="36px";k.style.padding="0px";k.style.cursor="default";k.style.minWidth="300px";this.userPanel=k}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var d=!1;this.userPanel.innerText="";k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.className="geDialogClose";k.style.top="8px";k.style.right="8px";
-mxEvent.addListener(k,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(k);if(null!=this.drive){var t=this.drive.getUsersList();if(0<t.length){var x=mxUtils.bind(this,function(H,I){var F=this.getCurrentFile();null!=F&&F.constructor==DriveFile?(this.spinner.spin(document.body,I),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();H()}),2E3)):H()});k=mxUtils.bind(this,
-function(H){var I=document.createElement("tr");I.setAttribute("title","User ID: "+H.id);var F=document.createElement("td");F.setAttribute("valig","middle");F.style.height="59px";F.style.width="66px";var O=document.createElement("img");O.setAttribute("width","50");O.setAttribute("height","50");O.setAttribute("border","0");O.setAttribute("src",null!=H.pictureUrl?H.pictureUrl:this.defaultUserPicture);O.style.borderRadius="50%";O.style.margin="4px 8px 0 8px";F.appendChild(O);I.appendChild(F);F=document.createElement("td");
-F.setAttribute("valign","middle");F.style.whiteSpace="nowrap";F.style.paddingTop="4px";F.style.maxWidth="0";F.style.overflow="hidden";F.style.textOverflow="ellipsis";mxUtils.write(F,H.displayName+(H.isCurrent&&1<t.length?" ("+mxResources.get("default")+")":""));null!=H.email&&(mxUtils.br(F),O=document.createElement("small"),O.style.color="gray",mxUtils.write(O,H.email),F.appendChild(O));O=document.createElement("div");O.style.marginTop="4px";var c=document.createElement("i");mxUtils.write(c,mxResources.get("googleDrive"));
-O.appendChild(c);F.appendChild(O);I.appendChild(F);H.isCurrent||(I.style.cursor="pointer",I.style.opacity="0.3",mxEvent.addListener(I,"click",mxUtils.bind(this,function(e){x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(H);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(e)})));return I});d=!0;var C=
-document.createElement("table");C.style.borderSpacing="0";C.style.fontSize="10pt";C.style.width="100%";C.style.padding="10px";for(var G=0;G<t.length;G++)C.appendChild(k(t[G]));this.userPanel.appendChild(C);k=document.createElement("div");k.style.textAlign="left";k.style.padding="10px";k.style.whiteSpace="nowrap";k.style.borderTop="1px solid rgb(224, 224, 224)";C=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){x(mxUtils.bind(this,
+mxEvent.addListener(k,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(k);if(null!=this.drive){var q=this.drive.getUsersList();if(0<q.length){var x=mxUtils.bind(this,function(H,I){var E=this.getCurrentFile();null!=E&&E.constructor==DriveFile?(this.spinner.spin(document.body,I),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();H()}),2E3)):H()});k=mxUtils.bind(this,
+function(H){var I=document.createElement("tr");I.setAttribute("title","User ID: "+H.id);var E=document.createElement("td");E.setAttribute("valig","middle");E.style.height="59px";E.style.width="66px";var O=document.createElement("img");O.setAttribute("width","50");O.setAttribute("height","50");O.setAttribute("border","0");O.setAttribute("src",null!=H.pictureUrl?H.pictureUrl:this.defaultUserPicture);O.style.borderRadius="50%";O.style.margin="4px 8px 0 8px";E.appendChild(O);I.appendChild(E);E=document.createElement("td");
+E.setAttribute("valign","middle");E.style.whiteSpace="nowrap";E.style.paddingTop="4px";E.style.maxWidth="0";E.style.overflow="hidden";E.style.textOverflow="ellipsis";mxUtils.write(E,H.displayName+(H.isCurrent&&1<q.length?" ("+mxResources.get("default")+")":""));null!=H.email&&(mxUtils.br(E),O=document.createElement("small"),O.style.color="gray",mxUtils.write(O,H.email),E.appendChild(O));O=document.createElement("div");O.style.marginTop="4px";var c=document.createElement("i");mxUtils.write(c,mxResources.get("googleDrive"));
+O.appendChild(c);E.appendChild(O);I.appendChild(E);H.isCurrent||(I.style.cursor="pointer",I.style.opacity="0.3",mxEvent.addListener(I,"click",mxUtils.bind(this,function(e){x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(H);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(f){this.handleError(f)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(e)})));return I});d=!0;var C=
+document.createElement("table");C.style.borderSpacing="0";C.style.fontSize="10pt";C.style.width="100%";C.style.padding="10px";for(var G=0;G<q.length;G++)C.appendChild(k(q[G]));this.userPanel.appendChild(C);k=document.createElement("div");k.style.textAlign="left";k.style.padding="10px";k.style.whiteSpace="nowrap";k.style.borderTop="1px solid rgb(224, 224, 224)";C=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){x(mxUtils.bind(this,
function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));C.className="geBtn";C.style.float="right";k.appendChild(C);C=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var H=this.drive.createAuthWin();H.blur();window.focus();x(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
-mxUtils.bind(this,function(I){this.handleError(I)}),!0,H)}),mxResources.get("closingFile")+"...")}));C.className="geBtn";C.style.margin="0px";k.appendChild(C);this.userPanel.appendChild(k)}}k=mxUtils.bind(this,function(H,I,F,O){if(null!=H){d&&this.userPanel.appendChild(document.createElement("hr"));d=!0;var c=document.createElement("table");c.style.borderSpacing="0";c.style.fontSize="10pt";c.style.width="100%";c.style.padding="10px";var e=document.createElement("tbody"),g=document.createElement("tr"),
-n=document.createElement("td");n.setAttribute("valig","top");n.style.width="40px";if(null!=I){var p=document.createElement("img");p.setAttribute("width","40");p.setAttribute("height","40");p.setAttribute("border","0");p.setAttribute("src",I);p.style.marginRight="6px";n.appendChild(p)}g.appendChild(n);n=document.createElement("td");n.setAttribute("valign","middle");n.style.whiteSpace="nowrap";n.style.maxWidth="0";n.style.overflow="hidden";n.style.textOverflow="ellipsis";mxUtils.write(n,H.displayName);
-null!=H.email&&(mxUtils.br(n),I=document.createElement("small"),I.style.color="gray",mxUtils.write(I,H.email),n.appendChild(I));null!=O&&(H=document.createElement("div"),H.style.marginTop="4px",I=document.createElement("i"),mxUtils.write(I,O),H.appendChild(I),n.appendChild(H));g.appendChild(n);e.appendChild(g);c.appendChild(e);this.userPanel.appendChild(c);H=document.createElement("div");H.style.textAlign="center";H.style.padding="10px";H.style.whiteSpace="nowrap";null!=F&&(F=mxUtils.button(mxResources.get("signOut"),
-F),F.className="geBtn",H.appendChild(F));this.userPanel.appendChild(H)}});null!=this.dropbox&&k(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var H=this.getCurrentFile();if(null!=H&&H.constructor==DropboxFile){var I=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}else this.dropbox.logout()}),mxResources.get("dropbox"));
+mxUtils.bind(this,function(I){this.handleError(I)}),!0,H)}),mxResources.get("closingFile")+"...")}));C.className="geBtn";C.style.margin="0px";k.appendChild(C);this.userPanel.appendChild(k)}}k=mxUtils.bind(this,function(H,I,E,O){if(null!=H){d&&this.userPanel.appendChild(document.createElement("hr"));d=!0;var c=document.createElement("table");c.style.borderSpacing="0";c.style.fontSize="10pt";c.style.width="100%";c.style.padding="10px";var e=document.createElement("tbody"),f=document.createElement("tr"),
+n=document.createElement("td");n.setAttribute("valig","top");n.style.width="40px";if(null!=I){var p=document.createElement("img");p.setAttribute("width","40");p.setAttribute("height","40");p.setAttribute("border","0");p.setAttribute("src",I);p.style.marginRight="6px";n.appendChild(p)}f.appendChild(n);n=document.createElement("td");n.setAttribute("valign","middle");n.style.whiteSpace="nowrap";n.style.maxWidth="0";n.style.overflow="hidden";n.style.textOverflow="ellipsis";mxUtils.write(n,H.displayName);
+null!=H.email&&(mxUtils.br(n),I=document.createElement("small"),I.style.color="gray",mxUtils.write(I,H.email),n.appendChild(I));null!=O&&(H=document.createElement("div"),H.style.marginTop="4px",I=document.createElement("i"),mxUtils.write(I,O),H.appendChild(I),n.appendChild(H));f.appendChild(n);e.appendChild(f);c.appendChild(e);this.userPanel.appendChild(c);H=document.createElement("div");H.style.textAlign="center";H.style.padding="10px";H.style.whiteSpace="nowrap";null!=E&&(E=mxUtils.button(mxResources.get("signOut"),
+E),E.className="geBtn",H.appendChild(E));this.userPanel.appendChild(H)}});null!=this.dropbox&&k(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var H=this.getCurrentFile();if(null!=H&&H.constructor==DropboxFile){var I=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}else this.dropbox.logout()}),mxResources.get("dropbox"));
null!=this.oneDrive&&k(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var H=this.getCurrentFile();if(null!=H&&H.constructor==OneDriveFile){var I=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&
k(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var H=this.getCurrentFile();if(null!=H&&H.constructor==GitHubFile){var I=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&k(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,
function(){var H=this.getCurrentFile();if(null!=H&&H.constructor==GitLabFile){var I=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&k(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var H=this.getCurrentFile();if(null!=H&&H.constructor==
TrelloFile){var I=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(C=this.getCurrentFile(),null!=C&&C.isRealtimeEnabled()&&C.isRealtimeSupported()&&(k=document.createElement("div"),k.style.padding="10px",k.style.whiteSpace="nowrap",k.style.borderTop="1px solid rgb(224, 224, 224)",
-k.style.marginTop="4px",k.style.textAlign="center",k.style.padding="10px",k.style.fontSize="9pt",G=C.getRealtimeError(),1!=C.getRealtimeState()&&(mxUtils.write(k,mxResources.get("realtimeCollaboration")+": "+(null!=G&&null!=G.message?G.message:mxResources.get("disconnected"))),this.userPanel.appendChild(k))));document.body.appendChild(this.userPanel)}mxEvent.consume(f)}));mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(f){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||
+k.style.marginTop="4px",k.style.textAlign="center",k.style.padding="10px",k.style.fontSize="9pt",G=C.getRealtimeError(),1!=C.getRealtimeState()&&(mxUtils.write(k,mxResources.get("realtimeCollaboration")+": "+(null!=G&&null!=G.message?G.message:mxResources.get("disconnected"))),this.userPanel.appendChild(k))));document.body.appendChild(this.userPanel)}mxEvent.consume(g)}));mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(g){mxEvent.isConsumed(g)||null==this.userPanel||null==this.userPanel.parentNode||
this.userPanel.parentNode.removeChild(this.userPanel)}));return b};App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(k){var d=document.createElement("span");d.setAttribute("title",mxResources.get("help"));d.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
-var t=document.createElement("img");mxUtils.setOpacity(t,50);t.style.height="16px";t.style.width="16px";t.setAttribute("border","0");t.setAttribute("valign","bottom");t.setAttribute("src",Editor.helpImage);d.appendChild(t);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(x){this.editorUi.hideCurrentMenu();this.editorUi.openLink(k);mxEvent.consume(x)}));return d};Menus.prototype.addLinkToItem=function(k,d){null!=k&&k.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var f=Menus.prototype.init;
-Menus.prototype.init=function(){function k(l,q,B){this.ui=l;this.previousExtFonts=this.extFonts=q;this.prevCustomFonts=this.customFonts=B}f.apply(this,arguments);var d=this.editorUi,t=d.editor.graph,x=mxUtils.bind(t,t.isEnabled),C=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),G=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+var q=document.createElement("img");mxUtils.setOpacity(q,50);q.style.height="16px";q.style.width="16px";q.setAttribute("border","0");q.setAttribute("valign","bottom");q.setAttribute("src",Editor.helpImage);d.appendChild(q);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(x){this.editorUi.hideCurrentMenu();this.editorUi.openLink(k);mxEvent.consume(x)}));return d};Menus.prototype.addLinkToItem=function(k,d){null!=k&&k.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var g=Menus.prototype.init;
+Menus.prototype.init=function(){function k(l,u,B){this.ui=l;this.previousExtFonts=this.extFonts=u;this.prevCustomFonts=this.customFonts=B}g.apply(this,arguments);var d=this.editorUi,q=d.editor.graph,x=mxUtils.bind(q,q.isEnabled),C=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),G=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
(null==document.documentMode||9<document.documentMode),H=("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),I="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
-d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(l){return"file"!=l}));d.actions.addAction("new...",function(){var l=d.isOffline();if(l||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var q=new NewDialog(d,l,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(q.container,l?350:620,l?70:460,!0,!0,function(J){d.sidebar.hideTooltip();J&&null==d.getCurrentFile()&&d.showSplash()});
-q.init()}else{var B=function(J){return{id:J.id,isExt:!0,url:J.downloadUrl,title:J.title,imgUrl:J.thumbnailLink,changedBy:J.lastModifyingUserName,lastModifiedOn:J.modifiedDate}};l=new TemplatesDialog(d,function(J,M,E){var K=E.libs,P=E.clibs;d.pickFolder(d.mode,function(R){d.createFile(M,J,null!=K&&0<K.length?K:null,null,function(){d.hideDialog()},null,R,null,null!=P&&0<P.length?P:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(J,M,E){var K=new Date;K.setDate(K.getDate()-
-7);d.drive.listFiles(null,K,E?!0:!1,function(P){for(var R=[],V=0;V<P.items.length;V++)R.push(B(P.items[V]));J(R)},M)},function(J,M,E,K){d.drive.listFiles(J,null,K?!0:!1,function(P){for(var R=[],V=0;V<P.items.length;V++)R.push(B(P.items[V]));M(R)},E)},function(J,M,E){d.drive.getFile(J.id,function(K){M(K.data)},E)},null,null,!1,!1);d.showDialog(l.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(t.isEnabled()&&
-!t.isCellLocked(t.getDefaultParent())){var l=new NewDialog(d,null,!1,function(q){d.hideDialog();if(null!=q){var B=d.editor.graph.getFreeInsertPoint();t.setSelectionCells(d.importXml(q,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));t.scrollCellToVisible(t.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(l.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});l.init()}})).isEnabled=x;var F=d.actions.addAction("shareCursor",
-function(){d.setShareCursorPosition(!d.isShareCursorPosition())});F.setToggleAction(!0);F.setSelectedCallback(function(){return d.isShareCursorPosition()});F=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});F.setToggleAction(!0);F.setSelectedCallback(function(){return d.isShowRemoteCursors()});F=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});F.setToggleAction(!0);F.setSelectedCallback(function(){return d.editor.graph.view.unit==
-mxConstants.POINTS});F=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});F.setToggleAction(!0);F.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});F=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});F.setToggleAction(!0);F.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});F=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});
-F.setToggleAction(!0);F.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(l,q){this.addMenuItems(l,["points","inches","millimeters","meters"],q);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(l,["-","ruler","-","pageScale"],q)})));F=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):
-d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});F.setEnabled(d.canvasSupported&&9!=document.documentMode);F.setToggleAction(!0);F.setSelectedCallback(function(){return null!=d.ruler});F=d.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?d.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});F.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&
-null!=document.body.requestFullscreen;F.setToggleAction(!0);F.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});F=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(l){d.setDarkMode(!Editor.isDarkMode());mxSettings.settings.darkMode=Editor.isDarkMode();mxSettings.save();l=mxSettings.getUi();"atlas"!=l&&"min"!=l&&"sketch"!=l&&"simple"!=l&&d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));F.setToggleAction(!0);
-F.setSelectedCallback(function(){return Editor.isDarkMode()});F=d.actions.put("toggleSimpleMode",new Action(mxResources.get("simple"),function(l){d.setCurrentTheme("simple"==Editor.currentTheme?Editor.isDarkMode()?"dark":"kennedy":"simple")}));F.setToggleAction(!0);F.setSelectedCallback(function(){return"simple"==Editor.currentTheme});F=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(l){d.setSketchMode(!Editor.sketchMode)}));F.setToggleAction(!0);F.setSelectedCallback(function(){return Editor.sketchMode});
-d.actions.addAction("properties...",function(){var l=new FilePropertiesDialog(d);d.showDialog(l.container,320,120,!0,!0);l.init()}).isEnabled=x;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(t.isEnabled()){if(null==d.freehandWindow){var l=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,l?120:84,l)}t.freehand.isDrawing()?t.freehand.stopDrawing():t.freehand.startDrawing();d.freehandWindow.window.setVisible(t.freehand.isDrawing())}},
-null,null,"X")).isEnabled=function(){return x()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var l=document.createElement("div");l.style.whiteSpace="nowrap";var q=null==d.pages||1>=d.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";l.appendChild(B);var J=d.addCheckbox(l,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),
-M=d.addCheckbox(l,mxResources.get("compressed"),!0),E=d.addCheckbox(l,mxResources.get("allPages"),!q,q);E.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?E.setAttribute("disabled","disabled"):E.removeAttribute("disabled")});l=new CustomDialog(d,l,mxUtils.bind(this,function(){d.downloadFile("xml",!M.checked,null,!J.checked,q||!E.checked)}),null,mxResources.get("export"));d.showDialog(l.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+
-"...",function(){d.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(l,q,B,J,M,E,K,P,R){K=[];R&&K.push("tags=%7B%7D");l=new EmbedDialog(d,d.createLink(l,q,B,J,M,E,null,!0,K));d.showDialog(l.container,450,240,!0,!0);l.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(l){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),
-null,l,function(q,B,J,M,E,K,P,R,V,X,m){d.createHtml(q,B,J,M,E,K,P,R,V,X,m,mxUtils.bind(this,function(z,L){var Q=d.getBaseFilename(P);z='\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(Q)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+z+"\n"+L+"\n</body>\n</html>";d.saveData(Q+(".drawio"==Q.substring(Q.lenth-7)?"":".drawio")+".html","html",z,"text/html")}))})})}));d.actions.put("exportPdf",
-new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport){var l=null==d.pages||1>=d.pages.length,q=document.createElement("div");q.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";q.appendChild(B);var J=function(){P!=this&&this.checked?(L.removeAttribute("disabled"),L.checked=!t.pageVisible):(L.setAttribute("disabled",
-"disabled"),L.checked=!1)};B=200;var M=1,E=null;if(d.pdfPageExport&&!l){var K=function(){m.value=Math.max(1,Math.min(M,Math.max(parseInt(m.value),parseInt(V.value))));V.value=Math.max(1,Math.min(M,Math.min(parseInt(m.value),parseInt(V.value))))},P=d.addRadiobox(q,"pages",mxResources.get("allPages"),!0),R=d.addRadiobox(q,"pages",mxResources.get("pages")+":",!1,null,!0),V=document.createElement("input");V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","1");V.setAttribute("type","number");
-V.setAttribute("min","1");V.style.width="50px";q.appendChild(V);var X=document.createElement("span");mxUtils.write(X,mxResources.get("to"));q.appendChild(X);var m=V.cloneNode(!0);q.appendChild(m);mxEvent.addListener(V,"focus",function(){R.checked=!0});mxEvent.addListener(m,"focus",function(){R.checked=!0});mxEvent.addListener(V,"change",K);mxEvent.addListener(m,"change",K);if(null!=d.pages&&(M=d.pages.length,null!=d.currentPage))for(K=0;K<d.pages.length;K++)if(d.currentPage==d.pages[K]){E=K+1;V.value=
-E;m.value=E;break}V.setAttribute("max",M);m.setAttribute("max",M);mxUtils.br(q);var z=d.addRadiobox(q,"pages",mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),L=d.addCheckbox(q,mxResources.get("crop"),!1,!0),Q=d.addCheckbox(q,mxResources.get("grid"),!1,!1);mxEvent.addListener(P,"change",J);mxEvent.addListener(R,"change",J);mxEvent.addListener(z,"change",J);B+=64}else z=d.addCheckbox(q,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),L=d.addCheckbox(q,mxResources.get("crop"),!t.pageVisible||
-!d.pdfPageExport,!d.pdfPageExport),Q=d.addCheckbox(q,mxResources.get("grid"),!1,!1),d.pdfPageExport||mxEvent.addListener(z,"change",J);J=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var N=null,T=null;if(EditorUi.isElectronApp||J)T=d.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),B+=30;J&&(N=d.addCheckbox(q,mxResources.get("transparentBackground"),!1),B+=30);q=new CustomDialog(d,q,mxUtils.bind(this,function(){var S=null;if(!l){S=
-parseInt(V.value);var W=parseInt(m.value);S=P.checked||S==E&&W==E?null:{from:Math.max(0,Math.min(M-1,S-1)),to:Math.max(0,Math.min(M-1,W-1))}}d.downloadFile("pdf",null,null,!z.checked,l?!0:!P.checked&&null==S,!L.checked,null!=N&&N.checked,null,null,Q.checked,null!=T&&T.checked,S)}),null,mxResources.get("export"));d.showDialog(q.container,300,B,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?
-470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function l(){null!=q&&q.removeDraft();d.fileLoaded(null)}var q=d.getCurrentFile();null!=q&&q.isModified()?d.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){t.getSelectionCells();if(1==t.getSelectionCount()){var l=t.getSelectionCell(),q=t.view.getState(l);null!=
-q&&null!=q.shape&&null!=q.shape.stencil&&(l=new EditShapeDialog(d,l,mxResources.get("editShape")+":",630,400),d.showDialog(l.container,640,480,!0,!1),l.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(l,q){d.spinner.stop();l=new RevisionDialog(d,l,q);d.showDialog(l.container,640,480,!0,!0);l.init()}),mxUtils.bind(this,function(l){d.handleError(l)})):d.showError(mxResources.get("error"),
-mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");F=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(F.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var l=d.getCurrentFile();null!=l&&(window.drawdata=d.getFileData(),l=null!=l.getTitle()?l.getTitle():d.defaultFilename,
-d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(l),null,!0))});"undefined"!==typeof MathJax&&(F=d.actions.addAction("mathematicalTypesetting",function(){var l=new ChangePageSetup(d);l.ignoreColor=!0;l.ignoreImage=!0;l.mathEnabled=!d.isMathEnabled();t.model.execute(l)}),F.setToggleAction(!0),F.setSelectedCallback(function(){return d.isMathEnabled()}),F.isEnabled=x);isLocalStorage&&(F=d.actions.addAction("showStartScreen",
-function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),F.setToggleAction(!0),F.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var O=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});O.setToggleAction(!0);O.setSelectedCallback(function(){return O.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var l=t.getSelectionCells(),q=[],B=0;B<l.length;B++)t.getModel().isVertex(l[B])&&
-q.push(l[B]);0<q.length&&(l=new EditGeometryDialog(d,q),d.showDialog(l.container,200,270,!0,!0),l.init())},null,null,Editor.ctrlKey+"+Shift+M");var c=null;d.actions.addAction("copyStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&(c=t.copyStyle(t.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&null!=c&&t.pasteStyle(c,t.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");d.actions.put("pageBackgroundImage",
-new Action(mxResources.get("backgroundImage")+"...",function(){if(!d.isOffline()){var l=new BackgroundImageDialog(d,function(q){d.setBackgroundImage(q)});d.showDialog(l.container,400,170,!0,!0);l.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(l,q,B,J,M,E,K,P,R,V,X,m,z,L,Q){R=parseInt(l);!isNaN(R)&&0<
-R&&(Q?d.downloadFile("remoteSvg",null,null,B,null,P,q,l,K,null,M):d.exportSvg(R/100,q,B,J,M,E,K,!P,!1,V,m,z,L))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(l,q,B,J,M,E,K,P,R,V,X,m,z){l=parseInt(l);!isNaN(l)&&0<l&&d.exportImage(l/100,q,B,J,M,K,!P,!1,null,X,null,m,z)}),
-!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(l,q,B,J,M){d.downloadFile(q?"xmlpng":"png",null,null,l,null,null,B,J,M)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
-function(l,q,B,J,M,E,K,P,R,V,X,m,z){l=parseInt(l);!isNaN(l)&&0<l&&d.exportImage(l/100,!1,B,J,!1,K,!P,!1,"jpeg",X,null,m,z)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(l,q,B,J,M){d.downloadFile("jpeg",null,null,l,null,null,null,J,M)}),!0,!0)}));F=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var l=mxUtils.sortCells(t.model.getTopmostCells(t.getSelectionCells())),q=mxUtils.getXml(0==
-l.length?d.editor.getGraphXml():t.encodeCells(l));d.copyImage(l,q)}));F.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;F=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){t.setShadowVisible(!t.shadowVisible)}));F.setToggleAction(!0);F.setSelectedCallback(function(){return t.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(l){return"file"!=l}));d.actions.addAction("new...",function(){var l=d.isOffline();if(l||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var u=new NewDialog(d,l,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(u.container,l?350:620,l?70:460,!0,!0,function(J){d.sidebar.hideTooltip();J&&null==d.getCurrentFile()&&d.showSplash()});
+u.init()}else{var B=function(J){return{id:J.id,isExt:!0,url:J.downloadUrl,title:J.title,imgUrl:J.thumbnailLink,changedBy:J.lastModifyingUserName,lastModifiedOn:J.modifiedDate}};l=new TemplatesDialog(d,function(J,M,F){var K=F.libs,P=F.clibs;d.pickFolder(d.mode,function(R){d.createFile(M,J,null!=K&&0<K.length?K:null,null,function(){d.hideDialog()},null,R,null,null!=P&&0<P.length?P:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(J,M,F){var K=new Date;K.setDate(K.getDate()-
+7);d.drive.listFiles(null,K,F?!0:!1,function(P){for(var R=[],V=0;V<P.items.length;V++)R.push(B(P.items[V]));J(R)},M)},function(J,M,F,K){d.drive.listFiles(J,null,K?!0:!1,function(P){for(var R=[],V=0;V<P.items.length;V++)R.push(B(P.items[V]));M(R)},F)},function(J,M,F){d.drive.getFile(J.id,function(K){M(K.data)},F)},null,null,!1,!1);d.showDialog(l.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(q.isEnabled()&&
+!q.isCellLocked(q.getDefaultParent())){var l=new NewDialog(d,null,!1,function(u){d.hideDialog();if(null!=u){var B=d.editor.graph.getFreeInsertPoint();q.setSelectionCells(d.importXml(u,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));q.scrollCellToVisible(q.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(l.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});l.init()}})).isEnabled=x;var E=d.actions.addAction("shareCursor",
+function(){d.setShareCursorPosition(!d.isShareCursorPosition())});E.setToggleAction(!0);E.setSelectedCallback(function(){return d.isShareCursorPosition()});E=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});E.setToggleAction(!0);E.setSelectedCallback(function(){return d.isShowRemoteCursors()});E=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});E.setToggleAction(!0);E.setSelectedCallback(function(){return d.editor.graph.view.unit==
+mxConstants.POINTS});E=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});E.setToggleAction(!0);E.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});E=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});E.setToggleAction(!0);E.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});E=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});
+E.setToggleAction(!0);E.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(l,u){this.addMenuItems(l,["points","inches","millimeters","meters"],u);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(l,["-","ruler","-","pageScale"],u)})));E=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):
+d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});E.setEnabled(d.canvasSupported&&9!=document.documentMode);E.setToggleAction(!0);E.setSelectedCallback(function(){return null!=d.ruler});E=d.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?d.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});E.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&
+null!=document.body.requestFullscreen;E.setToggleAction(!0);E.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});E=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(l){d.setDarkMode(!Editor.isDarkMode());mxSettings.settings.darkMode=Editor.isDarkMode();mxSettings.save();l=mxSettings.getUi();"atlas"!=l&&"min"!=l&&"sketch"!=l&&"simple"!=l&&d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy",!0)}));E.setToggleAction(!0);
+E.setSelectedCallback(function(){return Editor.isDarkMode()});E=d.actions.put("toggleSimpleMode",new Action(mxResources.get("simple"),function(l){d.setCurrentTheme("simple"==Editor.currentTheme?Editor.isDarkMode()?"dark":"kennedy":"simple")}));E.setToggleAction(!0);E.setSelectedCallback(function(){return"simple"==Editor.currentTheme});E=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(l){d.setSketchMode(!Editor.sketchMode)}));E.setToggleAction(!0);E.setSelectedCallback(function(){return Editor.sketchMode});
+d.actions.addAction("properties...",function(){var l=new FilePropertiesDialog(d);d.showDialog(l.container,320,120,!0,!0);l.init()}).isEnabled=x;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(q.isEnabled()){if(null==d.freehandWindow){var l=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,l?120:84,l)}q.freehand.isDrawing()?q.freehand.stopDrawing():q.freehand.startDrawing();d.freehandWindow.window.setVisible(q.freehand.isDrawing())}},
+null,null,"X")).isEnabled=function(){return x()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var l=document.createElement("div");l.style.whiteSpace="nowrap";var u=null==d.pages||1>=d.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";l.appendChild(B);var J=d.addCheckbox(l,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),
+M=d.addCheckbox(l,mxResources.get("compressed"),!0),F=d.addCheckbox(l,mxResources.get("allPages"),!u,u);F.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?F.setAttribute("disabled","disabled"):F.removeAttribute("disabled")});l=new CustomDialog(d,l,mxUtils.bind(this,function(){d.downloadFile("xml",!M.checked,null,!J.checked,u||!F.checked)}),null,mxResources.get("export"));d.showDialog(l.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+
+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(l,u,B,J,M,F,K,P,R){K=[];R&&K.push("tags=%7B%7D");l=new EmbedDialog(d,d.createLink(l,u,B,J,M,F,null,!0,K));d.showDialog(l.container,450,240,!0,!0);l.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(l){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),
+null,l,function(u,B,J,M,F,K,P,R,V,X,m){d.createHtml(u,B,J,M,F,K,P,R,V,X,m,mxUtils.bind(this,function(z,L){var Q=d.getBaseFilename(P);z='\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(Q)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+z+"\n"+L+"\n</body>\n</html>";d.saveData(Q+(".drawio"==Q.substring(Q.lenth-7)?"":".drawio")+".html","html",z,"text/html")}))})})}));d.actions.put("exportPdf",
+new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport){var l=null==d.pages||1>=d.pages.length,u=document.createElement("div");u.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";u.appendChild(B);var J=function(){P!=this&&this.checked?(L.removeAttribute("disabled"),L.checked=!q.pageVisible):(L.setAttribute("disabled",
+"disabled"),L.checked=!1)};B=200;var M=1,F=null;if(d.pdfPageExport&&!l){var K=function(){m.value=Math.max(1,Math.min(M,Math.max(parseInt(m.value),parseInt(V.value))));V.value=Math.max(1,Math.min(M,Math.min(parseInt(m.value),parseInt(V.value))))},P=d.addRadiobox(u,"pages",mxResources.get("allPages"),!0),R=d.addRadiobox(u,"pages",mxResources.get("pages")+":",!1,null,!0),V=document.createElement("input");V.style.cssText="margin:0 8px 0 8px;";V.setAttribute("value","1");V.setAttribute("type","number");
+V.setAttribute("min","1");V.style.width="50px";u.appendChild(V);var X=document.createElement("span");mxUtils.write(X,mxResources.get("to"));u.appendChild(X);var m=V.cloneNode(!0);u.appendChild(m);mxEvent.addListener(V,"focus",function(){R.checked=!0});mxEvent.addListener(m,"focus",function(){R.checked=!0});mxEvent.addListener(V,"change",K);mxEvent.addListener(m,"change",K);if(null!=d.pages&&(M=d.pages.length,null!=d.currentPage))for(K=0;K<d.pages.length;K++)if(d.currentPage==d.pages[K]){F=K+1;V.value=
+F;m.value=F;break}V.setAttribute("max",M);m.setAttribute("max",M);mxUtils.br(u);var z=d.addRadiobox(u,"pages",mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),L=d.addCheckbox(u,mxResources.get("crop"),!1,!0),Q=d.addCheckbox(u,mxResources.get("grid"),!1,!1);mxEvent.addListener(P,"change",J);mxEvent.addListener(R,"change",J);mxEvent.addListener(z,"change",J);B+=64}else z=d.addCheckbox(u,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),L=d.addCheckbox(u,mxResources.get("crop"),!q.pageVisible||
+!d.pdfPageExport,!d.pdfPageExport),Q=d.addCheckbox(u,mxResources.get("grid"),!1,!1),d.pdfPageExport||mxEvent.addListener(z,"change",J);J=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var N=null,T=null;if(EditorUi.isElectronApp||J)T=d.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),B+=30;J&&(N=d.addCheckbox(u,mxResources.get("transparentBackground"),!1),B+=30);u=new CustomDialog(d,u,mxUtils.bind(this,function(){var S=null;if(!l){S=
+parseInt(V.value);var W=parseInt(m.value);S=P.checked||S==F&&W==F?null:{from:Math.max(0,Math.min(M-1,S-1)),to:Math.max(0,Math.min(M-1,W-1))}}d.downloadFile("pdf",null,null,!z.checked,l?!0:!P.checked&&null==S,!L.checked,null!=N&&N.checked,null,null,Q.checked,null!=T&&T.checked,S)}),null,mxResources.get("export"));d.showDialog(u.container,300,B,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?
+470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function l(){null!=u&&u.removeDraft();d.fileLoaded(null)}var u=d.getCurrentFile();null!=u&&u.isModified()?d.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){q.getSelectionCells();if(1==q.getSelectionCount()){var l=q.getSelectionCell(),u=q.view.getState(l);null!=
+u&&null!=u.shape&&null!=u.shape.stencil&&(l=new EditShapeDialog(d,l,mxResources.get("editShape")+":",630,400),d.showDialog(l.container,640,480,!0,!1),l.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(l,u){d.spinner.stop();l=new RevisionDialog(d,l,u);d.showDialog(l.container,640,480,!0,!0);l.init()}),mxUtils.bind(this,function(l){d.handleError(l)})):d.showError(mxResources.get("error"),
+mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");E=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(E.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var l=d.getCurrentFile();null!=l&&(window.drawdata=d.getFileData(),l=null!=l.getTitle()?l.getTitle():d.defaultFilename,
+d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(l),null,!0))});"undefined"!==typeof MathJax&&(E=d.actions.addAction("mathematicalTypesetting",function(){var l=new ChangePageSetup(d);l.ignoreColor=!0;l.ignoreImage=!0;l.mathEnabled=!d.isMathEnabled();q.model.execute(l)}),E.setToggleAction(!0),E.setSelectedCallback(function(){return d.isMathEnabled()}),E.isEnabled=x);isLocalStorage&&(E=d.actions.addAction("showStartScreen",
+function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),E.setToggleAction(!0),E.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var O=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});O.setToggleAction(!0);O.setSelectedCallback(function(){return O.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var l=q.getSelectionCells(),u=[],B=0;B<l.length;B++)q.getModel().isVertex(l[B])&&
+u.push(l[B]);0<u.length&&(l=new EditGeometryDialog(d,u),d.showDialog(l.container,200,270,!0,!0),l.init())},null,null,Editor.ctrlKey+"+Shift+M");var c=null;d.actions.addAction("copyStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&(c=q.copyStyle(q.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&null!=c&&q.pasteStyle(c,q.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");d.actions.put("pageBackgroundImage",
+new Action(mxResources.get("backgroundImage")+"...",function(){if(!d.isOffline()){var l=new BackgroundImageDialog(d,function(u){d.setBackgroundImage(u)});d.showDialog(l.container,400,170,!0,!0);l.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(l,u,B,J,M,F,K,P,R,V,X,m,z,L,Q){R=parseInt(l);!isNaN(R)&&0<
+R&&(Q?d.downloadFile("remoteSvg",null,null,B,null,P,u,l,K,null,M):d.exportSvg(R/100,u,B,J,M,F,K,!P,!1,V,m,z,L))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(l,u,B,J,M,F,K,P,R,V,X,m,z){l=parseInt(l);!isNaN(l)&&0<l&&d.exportImage(l/100,u,B,J,M,K,!P,!1,null,X,null,m,z)}),
+!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(l,u,B,J,M){d.downloadFile(u?"xmlpng":"png",null,null,l,null,null,B,J,M)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
+function(l,u,B,J,M,F,K,P,R,V,X,m,z){l=parseInt(l);!isNaN(l)&&0<l&&d.exportImage(l/100,!1,B,J,!1,K,!P,!1,"jpeg",X,null,m,z)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(l,u,B,J,M){d.downloadFile("jpeg",null,null,l,null,null,null,J,M)}),!0,!0)}));E=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var l=mxUtils.sortCells(q.model.getTopmostCells(q.getSelectionCells())),u=mxUtils.getXml(0==
+l.length?d.editor.getGraphXml():q.encodeCells(l));d.copyImage(l,u)}));E.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;E=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){q.setShadowVisible(!q.shadowVisible)}));E.setToggleAction(!0);E.setSelectedCallback(function(){return q.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
d.alert(d.editor.appName+" "+EditorUi.VERSION):d.openLink("https://www.diagrams.net/")}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",
-function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var l=new FeedbackDialog(d);d.showDialog(l.container,610,360,!0,!1);l.init()});d.actions.addAction("quickStart...",function(){d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});F=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?
-(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");F.setToggleAction(!0);F.setSelectedCallback(mxUtils.bind(this,
-function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));F=d.actions.addAction("findReplace",mxUtils.bind(this,function(l,q){var B=(l=t.isEnabled()&&(null==q||!mxEvent.isShiftDown(q)))?"findReplace":"find";q=B+"Window";if(null==this[q]){var J=l?"min"==uiTheme?330:300:240;this[q]=new FindWindow(d,document.body.offsetWidth-(J+20),100,J,l?"min"==uiTheme?304:288:170,l);this[q].window.addListener("show",function(){d.fireEvent(new mxEventObject(B))});this[q].window.addListener("hide",
-function(){d.fireEvent(new mxEventObject(B))});this[q].window.setVisible(!0)}else this[q].window.setVisible(!this[q].window.isVisible())}),null,null,Editor.ctrlKey+"+F");F.setToggleAction(!0);F.setSelectedCallback(mxUtils.bind(this,function(){var l=t.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[l]&&this[l].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var l=null==d.pages||1>=d.pages.length;if(l)d.exportVisio();else{var q=
-document.createElement("div");q.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";q.appendChild(B);var J=d.addCheckbox(q,mxResources.get("allPages"),!l,l);J.style.marginBottom="16px";l=new CustomDialog(d,q,mxUtils.bind(this,function(){d.exportVisio(!J.checked)}),null,mxResources.get("export"));d.showDialog(l.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&
-"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginRight="4px";l.checked=mxSettings.getShowStartScreen();l.defaultChecked=l.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var q=document.createElement("span");q.style["float"]="right";q.style.cursor="pointer";q.style.userSelect="none";q.style.marginTop="-4px";q.appendChild(l);mxUtils.write(q,mxResources.get("showStartScreen"));mxEvent.addListener(q,
-"click",function(M){mxEvent.getSource(M)!=l&&(l.checked=!l.checked)});header=q}var B=localStorage.getItem(Editor.configurationKey);q=[[mxResources.get("reset"),function(M,E){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(M)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(K){d.handleError(K)}})},"Shift+Click to Reset Settings"]];
-var J=d.actions.get("plugins");null!=J&&"1"==urlParams.sketch&&q.push([mxResources.get("plugins"),J.funct]);EditorUi.isElectronApp||q.push([mxResources.get("share"),function(M,E){if(0<E.value.length)try{var K=JSON.parse(E.value),P=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(K)),R=new EmbedDialog(d,P);d.showDialog(R.container,450,240,!0);R.init()}catch(V){d.handleError(V)}else d.handleError({message:mxResources.get("invalidInput")})}]);
-q=new TextareaDialog(d,mxResources.get("configuration")+":",null!=B?JSON.stringify(JSON.parse(B),null,2):"",function(M){if(null!=M)try{if(null!=l.parentNode&&(mxSettings.setShowStartScreen(l.checked),mxSettings.save()),M==B)d.hideDialog();else{if(0<M.length){var E=JSON.parse(M);localStorage.setItem(Editor.configurationKey,JSON.stringify(E))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(K){d.handleError(K)}},null,null,
-null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",q,l.parentNode);d.showDialog(q.container,620,460,!0,!1);q.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(l,q){var B=mxUtils.bind(this,function(M){var E=""==M?mxResources.get("automatic"):mxLanguageMap[M],K=null;""!=E&&(K=l.addItem(E,null,mxUtils.bind(this,function(){mxSettings.setLanguage(M);mxSettings.save();mxClient.language=M;mxResources.loadDefaultBundle=
-!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),q),(M==mxLanguage||""==M&&null==mxLanguage)&&l.addCheckmark(K,Editor.checkmarkImage));return K});B("");l.addSeparator(q);for(var J in mxLanguageMap)B(J)})));var e=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(l){var q=e.apply(this,arguments);if(null!=q&&"1"!=urlParams.embed&&"atlas"!=uiTheme&&"1"==urlParams["live-ui"]){var B=this.get("appearance");if(null!=B){var J=q.addMenu("",B.funct);
-J.setAttribute("title",mxResources.get("theme"));J.className="geToolbarButton geAdaptiveAsset";J.style.backgroundPosition="center center";J.style.backgroundRepeat="no-repeat";J.style.backgroundSize="100% 100%";J.style.display="inline-block";J.style.verticalAlign="top";J.style.marginLeft="2px";J.style.cursor="pointer";J.style.zIndex="1";J.style.position="absolute";J.style.height="18px";J.style.width="18px";"atlas"==Editor.currentTheme?(J.style.filter="invert(100%)",J.style.right="11px",J.style.top=
-"10px"):(J.style.right="10px",J.style.top="5px");"1"==urlParams.winCtrls&&(J.style.right="95px",J.style.webkitAppRegion="no-drag",icon.style.webkitAppRegion="no-drag");document.body.appendChild(J);q.langIcon=J;B=mxUtils.bind(this,function(){J.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("darkModeChanged",B);B();this.editorUi.switchThemeElt=J}}return q}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",
-intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var l=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(q){if(0<q.length)try{var B=JSON.parse(q);d.executeLayouts(t.createLayouts(B));d.customLayoutConfig=B;d.hideDialog()}catch(J){d.handleError(J)}},null,null,null,null,function(q,B){var J=mxUtils.button(mxResources.get("copy"),function(){try{var M=B.value;B.value=JSON.stringify(JSON.parse(M));
-B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));B.value=M}catch(E){d.handleError(E)}});J.setAttribute("title","copy");J.className="geBtn";q.appendChild(J)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(l.container,620,460,!0,!0);l.init()});F=this.get("viewZoom");var g=F.funct;F.funct=mxUtils.bind(this,function(l,q){g.apply(this,
-arguments);"simple"!=Editor.currentTheme&&"1"!=urlParams.sketch&&"min"!=uiTheme||this.addMenuItems(l,["-","outline","fullscreen"],q)});F=this.get("layout");var n=F.funct;F.funct=function(l,q){n.apply(this,arguments);l.addItem(mxResources.get("orgChart"),null,function(){var B=null,J=20,M=20,E=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=B){var L=d.editor.graph,Q=new mxOrgChartLayout(L,B,J,M),N=L.getDefaultParent();1<L.model.getChildCount(L.getSelectionCell())&&(N=L.getSelectionCell());
+function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var l=new FeedbackDialog(d);d.showDialog(l.container,610,360,!0,!1);l.init()});d.actions.addAction("quickStart...",function(){d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});E=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?
+(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");E.setToggleAction(!0);E.setSelectedCallback(mxUtils.bind(this,
+function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));E=d.actions.addAction("findReplace",mxUtils.bind(this,function(l,u){var B=(l=q.isEnabled()&&(null==u||!mxEvent.isShiftDown(u)))?"findReplace":"find";u=B+"Window";if(null==this[u]){var J=l?"min"==uiTheme?330:300:240;this[u]=new FindWindow(d,document.body.offsetWidth-(J+20),100,J,l?"min"==uiTheme?304:288:170,l);this[u].window.addListener("show",function(){d.fireEvent(new mxEventObject(B))});this[u].window.addListener("hide",
+function(){d.fireEvent(new mxEventObject(B))});this[u].window.setVisible(!0)}else this[u].window.setVisible(!this[u].window.isVisible())}),null,null,Editor.ctrlKey+"+F");E.setToggleAction(!0);E.setSelectedCallback(mxUtils.bind(this,function(){var l=q.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[l]&&this[l].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var l=null==d.pages||1>=d.pages.length;if(l)d.exportVisio();else{var u=
+document.createElement("div");u.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";u.appendChild(B);var J=d.addCheckbox(u,mxResources.get("allPages"),!l,l);J.style.marginBottom="16px";l=new CustomDialog(d,u,mxUtils.bind(this,function(){d.exportVisio(!J.checked)}),null,mxResources.get("export"));d.showDialog(l.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&
+"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginRight="4px";l.checked=mxSettings.getShowStartScreen();l.defaultChecked=l.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var u=document.createElement("span");u.style["float"]="right";u.style.cursor="pointer";u.style.userSelect="none";u.style.marginTop="-4px";u.appendChild(l);mxUtils.write(u,mxResources.get("showStartScreen"));mxEvent.addListener(u,
+"click",function(M){mxEvent.getSource(M)!=l&&(l.checked=!l.checked)});header=u}var B=localStorage.getItem(Editor.configurationKey);u=[[mxResources.get("reset"),function(M,F){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(M)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(K){d.handleError(K)}})},"Shift+Click to Reset Settings"]];
+var J=d.actions.get("plugins");null!=J&&"1"==urlParams.sketch&&u.push([mxResources.get("plugins"),J.funct]);EditorUi.isElectronApp||u.push([mxResources.get("share"),function(M,F){if(0<F.value.length)try{var K=JSON.parse(F.value),P=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(K)),R=new EmbedDialog(d,P);d.showDialog(R.container,450,240,!0);R.init()}catch(V){d.handleError(V)}else d.handleError({message:mxResources.get("invalidInput")})}]);
+u=new TextareaDialog(d,mxResources.get("configuration")+":",null!=B?JSON.stringify(JSON.parse(B),null,2):"",function(M){if(null!=M)try{if(null!=l.parentNode&&(mxSettings.setShowStartScreen(l.checked),mxSettings.save()),M==B)d.hideDialog();else{if(0<M.length){var F=JSON.parse(M);localStorage.setItem(Editor.configurationKey,JSON.stringify(F))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(K){d.handleError(K)}},null,null,
+null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",u,l.parentNode);d.showDialog(u.container,620,460,!0,!1);u.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(l,u){var B=mxUtils.bind(this,function(M){var F=""==M?mxResources.get("automatic"):mxLanguageMap[M],K=null;""!=F&&(K=l.addItem(F,null,mxUtils.bind(this,function(){mxSettings.setLanguage(M);mxSettings.save();mxClient.language=M;mxResources.loadDefaultBundle=
+!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),u),(M==mxLanguage||""==M&&null==mxLanguage)&&l.addCheckmark(K,Editor.checkmarkImage));return K});B("");l.addSeparator(u);for(var J in mxLanguageMap)B(J)})));var e=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(l){var u=e.apply(this,arguments);if(null!=u&&Editor.enableSimpleTheme&&"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&"atlas"!=uiTheme){var B=this.get("appearance");if(null!=
+B){var J=u.addMenu("",B.funct);J.setAttribute("title",mxResources.get("theme"));J.className="geToolbarButton geAdaptiveAsset";J.style.backgroundPosition="center center";J.style.backgroundRepeat="no-repeat";J.style.backgroundSize="100% 100%";J.style.display="inline-block";J.style.marginLeft="2px";J.style.cursor="pointer";J.style.zIndex="1";J.style.position="absolute";J.style.height="18px";J.style.width="18px";"atlas"==Editor.currentTheme?(J.style.filter="invert(100%)",J.style.right="11px",J.style.top=
+"10px"):(J.style.right="10px",J.style.top="5px");"1"==urlParams.winCtrls&&(J.style.right="95px",J.style.webkitAppRegion="no-drag",icon.style.webkitAppRegion="no-drag");document.body.appendChild(J);u.langIcon=J;B=mxUtils.bind(this,function(){J.style.backgroundImage="url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("darkModeChanged",B);B();this.editorUi.switchThemeElt=J}}return u}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",
+intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){var l=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(u){if(0<u.length)try{var B=JSON.parse(u);d.executeLayouts(q.createLayouts(B));d.customLayoutConfig=B;d.hideDialog()}catch(J){d.handleError(J)}},null,null,null,null,function(u,B){var J=mxUtils.button(mxResources.get("copy"),function(){try{var M=B.value;B.value=JSON.stringify(JSON.parse(M));
+B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));B.value=M}catch(F){d.handleError(F)}});J.setAttribute("title","copy");J.className="geBtn";u.appendChild(J)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(l.container,620,460,!0,!0);l.init()});E=this.get("viewZoom");var f=E.funct;E.funct=mxUtils.bind(this,function(l,u){f.apply(this,
+arguments);"simple"!=Editor.currentTheme&&"1"!=urlParams.sketch&&"min"!=uiTheme||this.addMenuItems(l,["-","outline","fullscreen"],u)});E=this.get("layout");var n=E.funct;E.funct=function(l,u){n.apply(this,arguments);l.addItem(mxResources.get("orgChart"),null,function(){var B=null,J=20,M=20,F=function(){if("undefined"!==typeof mxOrgChartLayout&&null!=B){var L=d.editor.graph,Q=new mxOrgChartLayout(L,B,J,M),N=L.getDefaultParent();1<L.model.getChildCount(L.getSelectionCell())&&(N=L.getSelectionCell());
Q.execute(N)}},K=document.createElement("div"),P=document.createElement("div");P.style.marginTop="6px";P.style.display="inline-block";P.style.width="140px";mxUtils.write(P,mxResources.get("orgChartType")+": ");K.appendChild(P);var R=document.createElement("select");R.style.width="200px";R.style.boxSizing="border-box";P=[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 V=0;V<P.length;V++){var X=document.createElement("option");mxUtils.write(X,P[V]);X.value=V;2==V&&X.setAttribute("selected","selected");R.appendChild(X)}mxEvent.addListener(R,"change",function(){B=R.value});K.appendChild(R);P=document.createElement("div");P.style.marginTop="6px";P.style.display="inline-block";P.style.width="140px";mxUtils.write(P,mxResources.get("parentChildSpacing")+": ");K.appendChild(P);var m=document.createElement("input");m.type="number";m.value=
J;m.style.width="200px";m.style.boxSizing="border-box";K.appendChild(m);mxEvent.addListener(m,"change",function(){J=m.value});P=document.createElement("div");P.style.marginTop="6px";P.style.display="inline-block";P.style.width="140px";mxUtils.write(P,mxResources.get("siblingSpacing")+": ");K.appendChild(P);var z=document.createElement("input");z.type="number";z.value=M;z.style.width="200px";z.style.boxSizing="border-box";K.appendChild(z);mxEvent.addListener(z,"change",function(){M=z.value});K=new CustomDialog(d,
-K,function(){null==B&&(B=2);d.loadOrgChartLayouts(E)});d.showDialog(K.container,355,140,!0,!0)},q,null,x());l.addSeparator(q);l.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(t);B.checkOverlap=!0;d.prompt(mxResources.get("spacing"),B.spacing,mxUtils.bind(this,function(J){B.spacing=J;d.executeLayout(function(){B.execute(t.getDefaultParent(),t.isSelectionEmpty()?null:t.getSelectionCells())},!1)}))}),q);l.addSeparator(q);d.menus.addMenuItem(l,"runLayout",
-q,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(l,q){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(l,["about"],q);else{var B=l.addItem("Search:",null,null,q,null,null,!1);B.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";B.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("size","25");J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(M){var E=
-mxUtils.trim(J.value);13==M.keyCode&&0<E.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(E)),J.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:E}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(J.value="")}));B.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,function(M){document.activeElement!=
-J&&J.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),this.addMenuItems(l,"- keyboardShortcuts quickStart website support -".split(" "),q),"1"!=urlParams.disableUpdate&&this.addMenuItems(l,["check4Updates"],q),this.addMenuItems(l,["openDevTools",
-"-","about"],q)):this.addMenuItems(l,"- keyboardShortcuts quickStart support - about".split(" "),q)}"1"==urlParams.test&&(l.addSeparator(q),this.addSubmenu("testDevelop",l,q))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var l=prompt("Language Code",Graph.diagramLanguage||"");null!=l&&(Graph.diagramLanguage=0<l.length?l:null,t.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");
+K,function(){null==B&&(B=2);d.loadOrgChartLayouts(F)});d.showDialog(K.container,355,140,!0,!0)},u,null,x());l.addSeparator(u);l.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(q);B.checkOverlap=!0;d.prompt(mxResources.get("spacing"),B.spacing,mxUtils.bind(this,function(J){B.spacing=J;d.executeLayout(function(){B.execute(q.getDefaultParent(),q.isSelectionEmpty()?null:q.getSelectionCells())},!1)}))}),u);l.addSeparator(u);d.menus.addMenuItem(l,"runLayout",
+u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(l,u){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(l,["about"],u);else{var B=l.addItem("Search:",null,null,u,null,null,!1);B.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";B.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("size","25");J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(M){var F=
+mxUtils.trim(J.value);13==M.keyCode&&0<F.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(F)),J.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:F}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(J.value="")}));B.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,function(M){document.activeElement!=
+J&&J.focus();mxEvent.consume(M)},function(M){mxEvent.consume(M)},function(M){mxEvent.consume(M)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),this.addMenuItems(l,"- keyboardShortcuts quickStart website support -".split(" "),u),"1"!=urlParams.disableUpdate&&this.addMenuItems(l,["check4Updates"],u),this.addMenuItems(l,["openDevTools",
+"-","about"],u)):this.addMenuItems(l,"- keyboardShortcuts quickStart support - about".split(" "),u)}"1"==urlParams.test&&(l.addSeparator(u),this.addSubmenu("testDevelop",l,u))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var l=prompt("Language Code",Graph.diagramLanguage||"");null!=l&&(Graph.diagramLanguage=0<l.length?l:null,q.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");
mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,
-function(){if(!t.isSelectionEmpty()){var l=t.cloneCells(t.getSelectionCells()),q=t.getBoundingBoxFromGeometry(l);l=t.moveCells(l,-q.x,-q.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+q.width+", "+q.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(t.encodeCells(l)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var l=t.getGraphBounds(),q=t.view.translate,B=t.view.scale;t.insertVertex(t.getDefaultParent(),null,"",l.x/B-q.x,l.y/B-
-q.y,l.width/B,l.height/B,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var l=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";l=new TextareaDialog(d,"Paste Data:",l,function(q){if(0<q.length)try{var B=function(P){function R(W){if(null==S[W]){if(S[W]=!0,null!=m[W]){for(;0<m[W].length;){var Z=m[W].pop();R(Z)}delete m[W]}}else mxLog.debug(V+": Visited: "+W)}var V=P.parentNode.id,X=P.childNodes;P={};
+function(){if(!q.isSelectionEmpty()){var l=q.cloneCells(q.getSelectionCells()),u=q.getBoundingBoxFromGeometry(l);l=q.moveCells(l,-u.x,-u.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(q.encodeCells(l)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var l=q.getGraphBounds(),u=q.view.translate,B=q.view.scale;q.insertVertex(q.getDefaultParent(),null,"",l.x/B-u.x,l.y/B-
+u.y,l.width/B,l.height/B,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var l=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";l=new TextareaDialog(d,"Paste Data:",l,function(u){if(0<u.length)try{var B=function(P){function R(W){if(null==S[W]){if(S[W]=!0,null!=m[W]){for(;0<m[W].length;){var Z=m[W].pop();R(Z)}delete m[W]}}else mxLog.debug(V+": Visited: "+W)}var V=P.parentNode.id,X=P.childNodes;P={};
for(var m={},z=null,L={},Q=0;Q<X.length;Q++){var N=X[Q];if(null!=N.id&&0<N.id.length)if(null==P[N.id]){P[N.id]=N.id;var T=N.getAttribute("parent");null==T?null!=z?mxLog.debug(V+": Multiple roots: "+N.id):z=N.id:(null==m[T]&&(m[T]=[]),m[T].push(N.id))}else L[N.id]=N.id}X=Object.keys(L);0<X.length?(X=V+": "+X.length+" Duplicates: "+X.join(", "),mxLog.debug(X+" (see console)")):mxLog.debug(V+": Checked");var S={};null==z?mxLog.debug(V+": No root"):(R(z),Object.keys(S).length!=Object.keys(P).length&&
-(mxLog.debug(V+": Invalid tree: (see console)"),console.log(V+": Invalid tree",m)))};"<"!=q.charAt(0)&&(q=Graph.decompress(q),mxLog.debug("See console for uncompressed XML"),console.log("xml",q));var J=mxUtils.parseXml(q),M=d.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var E=d.getHashValueForPages(M);mxLog.debug("Checksum: ",E)}catch(P){mxLog.debug("Error: ",P.message)}else mxLog.debug("No pages found for checksum");var K=J.getElementsByTagName("root");for(q=0;q<K.length;q++)B(K[q]);
-mxLog.show()}catch(P){d.handleError(P),null!=window.console&&console.error(P)}});d.showDialog(l.container,620,460,!0,!0);l.init()}));var p=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var l=new TextareaDialog(d,"Diff/Sync:","",function(q){var B=d.getCurrentFile();if(0<q.length&&null!=B)try{var J=JSON.parse(q);B.patch([J],null,!0);d.hideDialog()}catch(M){d.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(q,B){p=d.getPagesForXml(d.getFileData(!0));
-l.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(p)}],["Diff",function(q,B){try{l.textarea.value=JSON.stringify(d.diffPages(p,d.pages),null,2)}catch(J){d.handleError(J)}}]]);null==p?(p=d.getPagesForXml(d.getFileData(!0)),l.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(p)):l.textarea.value=JSON.stringify(d.diffPages(p,d.pages),null,2);d.showDialog(l.container,620,460,!0,!0);l.init()}else d.alert("No pages")}));
-d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var l=d.getCurrentFile();console.log("editorUi",d,"file",l);if(null!=l&&l.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(l.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(l.theirPages));console.log("diff ownPages/theirPages",d.diffPages(l.ownPages,l.theirPages));var q=l.getShadowPages();null!=q&&(console.log("Checksum shadowPages",d.getHashValueForPages(q)),console.log("diff shadowPages/ownPages",
-d.diffPages(q,l.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(l.ownPages,q)),console.log("diff theirPages/shadowPages",d.diffPages(l.theirPages,q)));null!=l.sync&&null!=l.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(l.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(l.ownPages,l.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(l.theirPages,l.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(l.sync.snapshot,
+(mxLog.debug(V+": Invalid tree: (see console)"),console.log(V+": Invalid tree",m)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var J=mxUtils.parseXml(u),M=d.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var F=d.getHashValueForPages(M);mxLog.debug("Checksum: ",F)}catch(P){mxLog.debug("Error: ",P.message)}else mxLog.debug("No pages found for checksum");var K=J.getElementsByTagName("root");for(u=0;u<K.length;u++)B(K[u]);
+mxLog.show()}catch(P){d.handleError(P),null!=window.console&&console.error(P)}});d.showDialog(l.container,620,460,!0,!0);l.init()}));var p=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var l=new TextareaDialog(d,"Diff/Sync:","",function(u){var B=d.getCurrentFile();if(0<u.length&&null!=B)try{var J=JSON.parse(u);B.patch([J],null,!0);d.hideDialog()}catch(M){d.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,B){p=d.getPagesForXml(d.getFileData(!0));
+l.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(p)}],["Diff",function(u,B){try{l.textarea.value=JSON.stringify(d.diffPages(p,d.pages),null,2)}catch(J){d.handleError(J)}}]]);null==p?(p=d.getPagesForXml(d.getFileData(!0)),l.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(p)):l.textarea.value=JSON.stringify(d.diffPages(p,d.pages),null,2);d.showDialog(l.container,620,460,!0,!0);l.init()}else d.alert("No pages")}));
+d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var l=d.getCurrentFile();console.log("editorUi",d,"file",l);if(null!=l&&l.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(l.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(l.theirPages));console.log("diff ownPages/theirPages",d.diffPages(l.ownPages,l.theirPages));var u=l.getShadowPages();null!=u&&(console.log("Checksum shadowPages",d.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",
+d.diffPages(u,l.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(l.ownPages,u)),console.log("diff theirPages/shadowPages",d.diffPages(l.theirPages,u)));null!=l.sync&&null!=l.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(l.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(l.ownPages,l.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(l.theirPages,l.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(l.sync.snapshot,
d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(l.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(l.theirPages,d.pages)))}null!=l&&console.log("Shadow pages",[d.getXmlForPages(l.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var l=d.getCurrentFile();null!=l&&l.isRealtime()&&null!=l.shadowPages&&
-(console.log("patching actualPages to shadowPages",l.patch([d.diffPages(l.shadowPages,d.pages)])),l.ownPages=d.clonePages(d.pages),l.theirPages=d.clonePages(d.pages),l.shadowPages=d.clonePages(d.pages),null!=l.sync&&(l.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){t.model.beginUpdate();try{var l=t.model.cells,q=0,B=[],J=[],M;for(M in l){var E=l[M],K=t.getCurrentCellStyle(E)[mxConstants.STYLE_IMAGE];null!=K&&"data:"==K.substring(0,5)&&(null==
-B[K]&&(B[K]=(B[K]||0)+1,q++),J.push(E))}t.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",q,"image(s) from",J.length,"cell(s): ",[J,B])}finally{t.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,t.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var l=new mxImageExport,q=t.getGraphBounds(),B=t.view.scale,J=mxUtils.createXmlDocument(),M=J.createElement("output");J.appendChild(M);J=new mxXmlCanvas2D(M);
-J.translate(Math.floor((1-q.x)/B),Math.floor((1-q.y)/B));J.scale(1/B);var E=0,K=J.save;J.save=function(){E++;K.apply(this,arguments)};var P=J.restore;J.restore=function(){E--;P.apply(this,arguments)};var R=l.drawShape;l.drawShape=function(V){mxLog.debug("entering shape",V,E);R.apply(this,arguments);mxLog.debug("leaving shape",V,E)};l.drawState(t.getView().getState(t.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",E)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?
-mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(l,q){this.addMenuItems(l,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),q)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?
-mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(l){t.isEnabled()&&(l=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),l.vertex=!0,l=new EditShapeDialog(d,l,mxResources.get("editShape")+":",630,400),d.showDialog(l.container,640,480,!0,!1),l.init())})).isEnabled=x;d.actions.put("embedHtml",new Action(mxResources.get("html")+
-"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(l){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",l,function(q,B,J,M,E,K,P,R,V,X,m){d.createHtml(q,B,J,M,E,K,P,R,V,X,m,mxUtils.bind(this,function(z,L){var Q=new EmbedDialog(d,z+"\n"+L,null,null,function(){var N=window.open(),T=N.document;if(null!=T){"CSS1Compat"===document.compatMode&&T.writeln("<!DOCTYPE html>");T.writeln("<html>");
+(console.log("patching actualPages to shadowPages",l.patch([d.diffPages(l.shadowPages,d.pages)])),l.ownPages=d.clonePages(d.pages),l.theirPages=d.clonePages(d.pages),l.shadowPages=d.clonePages(d.pages),null!=l.sync&&(l.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){q.model.beginUpdate();try{var l=q.model.cells,u=0,B=[],J=[],M;for(M in l){var F=l[M],K=q.getCurrentCellStyle(F)[mxConstants.STYLE_IMAGE];null!=K&&"data:"==K.substring(0,5)&&(null==
+B[K]&&(B[K]=(B[K]||0)+1,u++),J.push(F))}q.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",u,"image(s) from",J.length,"cell(s): ",[J,B])}finally{q.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,q.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var l=new mxImageExport,u=q.getGraphBounds(),B=q.view.scale,J=mxUtils.createXmlDocument(),M=J.createElement("output");J.appendChild(M);J=new mxXmlCanvas2D(M);
+J.translate(Math.floor((1-u.x)/B),Math.floor((1-u.y)/B));J.scale(1/B);var F=0,K=J.save;J.save=function(){F++;K.apply(this,arguments)};var P=J.restore;J.restore=function(){F--;P.apply(this,arguments)};var R=l.drawShape;l.drawShape=function(V){mxLog.debug("entering shape",V,F);R.apply(this,arguments);mxLog.debug("leaving shape",V,F)};l.drawState(q.getView().getState(q.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(M));mxLog.debug("stateCounter",F)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?
+mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(l,u){this.addMenuItems(l,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),u)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?
+mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(l){q.isEnabled()&&(l=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),l.vertex=!0,l=new EditShapeDialog(d,l,mxResources.get("editShape")+":",630,400),d.showDialog(l.container,640,480,!0,!1),l.init())})).isEnabled=x;d.actions.put("embedHtml",new Action(mxResources.get("html")+
+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(l){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",l,function(u,B,J,M,F,K,P,R,V,X,m){d.createHtml(u,B,J,M,F,K,P,R,V,X,m,mxUtils.bind(this,function(z,L){var Q=new EmbedDialog(d,z+"\n"+L,null,null,function(){var N=window.open(),T=N.document;if(null!=T){"CSS1Compat"===document.compatMode&&T.writeln("<!DOCTYPE html>");T.writeln("<html>");
T.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');T.writeln("<body>");T.writeln(z);var S=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;S&&T.writeln(L);T.writeln("</body>");T.writeln("</html>");T.close();if(!S){var W=N.document.createElement("div");W.marginLeft="26px";W.marginTop="26px";mxUtils.write(W,mxResources.get("updatingDocument"));S=N.document.createElement("img");S.setAttribute("src",window.location.protocol+"//"+
window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");S.style.marginLeft="6px";W.appendChild(S);N.document.body.insertBefore(W,N.document.body.firstChild);window.setTimeout(function(){var Z=document.createElement("script");Z.type="text/javascript";Z.src=/<script.*?src="(.*?)"/.exec(L)[1];T.body.appendChild(Z);W.parentNode.removeChild(W)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(Q.container,450,240,!0,!0);Q.init()}))})})}));d.actions.put("liveImage",
-new Action("Live image...",function(){var l=d.getCurrentFile();null!=l&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(q){d.spinner.stop();null!=q?(q=new EmbedDialog(d,'<img src="'+(l.constructor!=DriveFile?q:"https://drive.google.com/uc?id="+l.getId())+'"/>'),d.showDialog(q.container,450,240,!0,!0),q.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(l,
-q,B,J,M,E){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(l,q,B,J,M,E,function(K){d.spinner.stop();K=new EmbedDialog(d,K);d.showDialog(K.container,450,240,!0,!0);K.init()},function(K){d.spinner.stop();d.handleError(K)})},mxResources.get("image"),mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(l,q,B,J,M,E){d.spinner.spin(document.body,mxResources.get("loading"))&&
-d.createEmbedSvg(l,q,B,J,M,E,function(K){d.spinner.stop();K=new EmbedDialog(d,K);d.showDialog(K.container,450,240,!0,!0);K.init()},function(K){d.spinner.stop();d.handleError(K)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var l=t.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(l.height/t.view.scale)+2,function(q,
-B,J,M,E,K,P,R,V){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(X){d.spinner.stop();var m=[];V&&m.push("tags=%7B%7D");X=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+P+";height:"+R+';" src="'+d.createLink(q,B,J,M,E,K,X,null,m)+'"></iframe>');d.showDialog(X.container,450,240,!0,!0);X.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var l=document.createElement("div");l.style.position=
-"absolute";l.style.bottom="30px";l.style.textAlign="center";l.style.width="100%";l.style.left="0px";var q=document.createElement("a");q.setAttribute("href","javascript:void(0);");q.setAttribute("target","_blank");q.style.cursor="pointer";mxUtils.write(q,mxResources.get("getNotionChromeExtension"));l.appendChild(q);mxEvent.addListener(q,"click",function(B){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});d.showPublishLinkDialog(mxResources.get("notion"),
-null,null,null,function(B,J,M,E,K,P,R,V,X){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(m){d.spinner.stop();var z=["border=0"];X&&z.push("tags=%7B%7D");m=new EmbedDialog(d,d.createLink(B,J,M,E,K,P,m,null,z,!0));d.showDialog(m.container,450,240,!0,!0);m.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",l)}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(l,
-q,B,J,M,E,K,P,R){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(V){d.spinner.stop();var X=[];R&&X.push("tags=%7B%7D");V=new EmbedDialog(d,d.createLink(l,q,B,J,M,E,V,null,X));d.showDialog(V.container,450,240,!0,!0);V.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",
-function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(l){d.spinner.stop();l=new GoogleSitesDialog(d,l);d.showDialog(l.container,420,256,!0,!0);l.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)F=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),
-F.setToggleAction(!0),F.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});F=d.actions.addAction("search",function(){var l=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!l);isLocalStorage&&(mxSettings.settings.search=!l,mxSettings.save())});F.label=mxResources.get("searchShapes");F.setToggleAction(!0);F.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});
-"1"==urlParams.embed&&(d.actions.get("save").funct=function(l){t.isEditing()&&t.stopEditing();var q="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var B=d.createLoadMessage("save");B.xml=q;l&&(B.exit=!0);q=JSON.stringify(B)}(window.opener||window.parent).postMessage(q,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));l=d.getCurrentFile();null==l||l.constructor==
-EmbedFile||l.constructor==LocalFile&&null==l.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var l=function(){d.editor.modified=!1;var q="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):
-"";(window.opener||window.parent).postMessage(q,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(l,q){d.isExportToCanvas()?(this.addMenuItems(l,["exportPng"],q),d.jpgSupported&&this.addMenuItems(l,["exportJpg"],q)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["exportPng","exportJpg"],q);this.addMenuItems(l,["exportSvg",
-"-"],q);d.isOffline()||d.printPdfExport?this.addMenuItems(l,["exportPdf"],q):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["exportPdf"],q);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(l,["exportVsdx"],q);this.addMenuItems(l,["-","exportHtml","exportXml","exportUrl"],q);d.isOffline()||(l.addSeparator(q),this.addMenuItem(l,"export",q).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");if("simple"==Editor.currentTheme||
-"min"==Editor.currentTheme)mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.addMenuItems(l,["publishLink"],q),d.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(l.addSeparator(q),d.menus.addSubmenu("embed",l,q))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(l,q){function B(E){E.pickFile(function(K){d.spinner.spin(document.body,mxResources.get("loading"))&&E.getFile(K,function(P){var R="data:image/"==P.getData().substring(0,11)?M(P.getTitle()):"text/xml";/\.svg$/i.test(P.getTitle())&&
-!d.editor.isDataSvg(P.getData())&&(P.setData(Editor.createSvgDataUri(P.getData())),R="image/svg+xml");J(P.getData(),R,P.getTitle())},function(P){d.handleError(P,null!=P?mxResources.get("errorLoadingFile"):null)},E==d.drive)},!0)}var J=mxUtils.bind(this,function(E,K,P){var R=t.view,V=t.getGraphBounds(),X=t.snap(Math.ceil(Math.max(0,V.x/R.scale-R.translate.x)+4*t.gridSize)),m=t.snap(Math.ceil(Math.max(0,(V.y+V.height)/R.scale-R.translate.y)+4*t.gridSize));"data:image/"==E.substring(0,11)?d.loadImage(E,
-mxUtils.bind(this,function(z){var L=!0,Q=mxUtils.bind(this,function(){d.resizeImage(z,E,mxUtils.bind(this,function(N,T,S){N=L?Math.min(1,Math.min(d.maxImageSize/T,d.maxImageSize/S)):1;d.importFile(E,K,X,m,Math.round(T*N),Math.round(S*N),P,function(W){d.spinner.stop();t.setSelectionCells(W);t.scrollCellToVisible(t.getSelectionCell())})}),L)});E.length>d.resampleThreshold?d.confirmImageResize(function(N){L=N;Q()}):Q()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):
-d.importFile(E,K,X,m,0,0,P,function(z){d.spinner.stop();t.setSelectionCells(z);t.scrollCellToVisible(t.getSelectionCell())})}),M=mxUtils.bind(this,function(E){var K="text/xml";/\.png$/i.test(E)?K="image/png":/\.jpe?g$/i.test(E)?K="image/jpg":/\.gif$/i.test(E)?K="image/gif":/\.pdf$/i.test(E)&&(K="application/pdf");return K});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){B(d.drive)},q):C&&"function"===typeof window.DriveClient&&
-l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1));null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){B(d.oneDrive)},q):H&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){B(d.dropbox)},q):G&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);null!=d.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){B(d.gitHub)},q);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){B(d.gitLab)},q);null!=d.trello?l.addItem(mxResources.get("trello")+"...",null,function(){B(d.trello)},q):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);
-l.addSeparator(q);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},q);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},q);d.isOffline()||(l.addSeparator(q),l.addItem(mxResources.get("url")+"...",null,function(){var E=new FilenameDialog(d,"",mxResources.get("import"),function(K){if(null!=K&&0<K.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var P=/(\.png)($|\?)/i.test(K)?
-"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(K),function(R){J(R,P,K)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==P)}},mxResources.get("url"));d.showDialog(E.container,300,80,!0,!0);E.init()},q))}))).isEnabled=x;this.put("appearance",new Menu(mxUtils.bind(this,function(l,q){(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(l,["toggleDarkMode"],q);this.addMenuItems(l,["toggleSimpleMode",
-"toggleSketchMode"],q)})));this.put("theme",new Menu(mxUtils.bind(this,function(l,q){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(l,["toggleDarkMode"],q);l.addSeparator(q);var J=l.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},q);"kennedy"!=B&&"atlas"!=B&&"dark"!=B&&"simple"!=B&&"sketch"!=B&&"min"!=B&&l.addCheckmark(J,Editor.checkmarkImage);J=l.addItem(mxResources.get("default"),
-null,function(){d.setCurrentTheme("kennedy")},q);"kennedy"!=B&&"dark"!=B&&"simple"!=B||l.addCheckmark(J,Editor.checkmarkImage);J=l.addItem(mxResources.get("sketch"),null,function(){d.setCurrentTheme("sketch")},q);"sketch"==B&&l.addCheckmark(J,Editor.checkmarkImage);J=l.addItem(mxResources.get("minimal"),null,function(){d.setCurrentTheme("min")},q);"min"==B&&l.addCheckmark(J,Editor.checkmarkImage);J=l.addItem(mxResources.get("atlas"),null,function(){d.setCurrentTheme("atlas")},q);"atlas"==B&&l.addCheckmark(J,
-Editor.checkmarkImage)})));F=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var l=this.editorUi.getCurrentFile();if(null!=l)if(l.constructor==LocalFile&&null!=l.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(B,J){l.invalidFileHandle=null;l.fileHandle=B;l.title=J.name;l.desc=J;d.save(J.name)}),null,d.createFileSystemOptions(l.getTitle()));else{var q=null!=l.getTitle()?l.getTitle():this.editorUi.defaultFilename;q=new FilenameDialog(this.editorUi,q,mxResources.get("rename"),
+new Action("Live image...",function(){var l=d.getCurrentFile();null!=l&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(u){d.spinner.stop();null!=u?(u=new EmbedDialog(d,'<img src="'+(l.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+l.getId())+'"/>'),d.showDialog(u.container,450,240,!0,!0),u.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(l,
+u,B,J,M,F){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(l,u,B,J,M,F,function(K){d.spinner.stop();K=new EmbedDialog(d,K);d.showDialog(K.container,450,240,!0,!0);K.init()},function(K){d.spinner.stop();d.handleError(K)})},mxResources.get("image"),mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(l,u,B,J,M,F){d.spinner.spin(document.body,mxResources.get("loading"))&&
+d.createEmbedSvg(l,u,B,J,M,F,function(K){d.spinner.stop();K=new EmbedDialog(d,K);d.showDialog(K.container,450,240,!0,!0);K.init()},function(K){d.spinner.stop();d.handleError(K)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var l=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(l.height/q.view.scale)+2,function(u,
+B,J,M,F,K,P,R,V){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(X){d.spinner.stop();var m=[];V&&m.push("tags=%7B%7D");X=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+P+";height:"+R+';" src="'+d.createLink(u,B,J,M,F,K,X,null,m)+'"></iframe>');d.showDialog(X.container,450,240,!0,!0);X.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var l=document.createElement("div");l.style.position=
+"absolute";l.style.bottom="30px";l.style.textAlign="center";l.style.width="100%";l.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,mxResources.get("getNotionChromeExtension"));l.appendChild(u);mxEvent.addListener(u,"click",function(B){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});d.showPublishLinkDialog(mxResources.get("notion"),
+null,null,null,function(B,J,M,F,K,P,R,V,X){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(m){d.spinner.stop();var z=["border=0"];X&&z.push("tags=%7B%7D");m=new EmbedDialog(d,d.createLink(B,J,M,F,K,P,m,null,z,!0));d.showDialog(m.container,450,240,!0,!0);m.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",l)}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(l,
+u,B,J,M,F,K,P,R){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(V){d.spinner.stop();var X=[];R&&X.push("tags=%7B%7D");V=new EmbedDialog(d,d.createLink(l,u,B,J,M,F,V,null,X));d.showDialog(V.container,450,240,!0,!0);V.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",
+function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(l){d.spinner.stop();l=new GoogleSitesDialog(d,l);d.showDialog(l.container,420,256,!0,!0);l.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)E=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),
+E.setToggleAction(!0),E.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});E=d.actions.addAction("search",function(){var l=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!l);isLocalStorage&&(mxSettings.settings.search=!l,mxSettings.save())});E.label=mxResources.get("searchShapes");E.setToggleAction(!0);E.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});
+"1"==urlParams.embed&&(d.actions.get("save").funct=function(l){q.isEditing()&&q.stopEditing();var u="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var B=d.createLoadMessage("save");B.xml=u;l&&(B.exit=!0);u=JSON.stringify(B)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));l=d.getCurrentFile();null==l||l.constructor==
+EmbedFile||l.constructor==LocalFile&&null==l.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var l=function(){d.editor.modified=!1;var u="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):
+"";(window.opener||window.parent).postMessage(u,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges")):l()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(l,u){d.isExportToCanvas()?(this.addMenuItems(l,["exportPng"],u),d.jpgSupported&&this.addMenuItems(l,["exportJpg"],u)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["exportPng","exportJpg"],u);this.addMenuItems(l,["exportSvg",
+"-"],u);d.isOffline()||d.printPdfExport?this.addMenuItems(l,["exportPdf"],u):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(l,["exportVsdx"],u);this.addMenuItems(l,["-","exportHtml","exportXml","exportUrl"],u);d.isOffline()||(l.addSeparator(u),this.addMenuItem(l,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");if("simple"==Editor.currentTheme||
+"min"==Editor.currentTheme)mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.addMenuItems(l,["publishLink"],u),d.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(l.addSeparator(u),d.menus.addSubmenu("embed",l,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(l,u){function B(F){F.pickFile(function(K){d.spinner.spin(document.body,mxResources.get("loading"))&&F.getFile(K,function(P){var R="data:image/"==P.getData().substring(0,11)?M(P.getTitle()):"text/xml";/\.svg$/i.test(P.getTitle())&&
+!d.editor.isDataSvg(P.getData())&&(P.setData(Editor.createSvgDataUri(P.getData())),R="image/svg+xml");J(P.getData(),R,P.getTitle())},function(P){d.handleError(P,null!=P?mxResources.get("errorLoadingFile"):null)},F==d.drive)},!0)}var J=mxUtils.bind(this,function(F,K,P){var R=q.view,V=q.getGraphBounds(),X=q.snap(Math.ceil(Math.max(0,V.x/R.scale-R.translate.x)+4*q.gridSize)),m=q.snap(Math.ceil(Math.max(0,(V.y+V.height)/R.scale-R.translate.y)+4*q.gridSize));"data:image/"==F.substring(0,11)?d.loadImage(F,
+mxUtils.bind(this,function(z){var L=!0,Q=mxUtils.bind(this,function(){d.resizeImage(z,F,mxUtils.bind(this,function(N,T,S){N=L?Math.min(1,Math.min(d.maxImageSize/T,d.maxImageSize/S)):1;d.importFile(F,K,X,m,Math.round(T*N),Math.round(S*N),P,function(W){d.spinner.stop();q.setSelectionCells(W);q.scrollCellToVisible(q.getSelectionCell())})}),L)});F.length>d.resampleThreshold?d.confirmImageResize(function(N){L=N;Q()}):Q()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):
+d.importFile(F,K,X,m,0,0,P,function(z){d.spinner.stop();q.setSelectionCells(z);q.scrollCellToVisible(q.getSelectionCell())})}),M=mxUtils.bind(this,function(F){var K="text/xml";/\.png$/i.test(F)?K="image/png":/\.jpe?g$/i.test(F)?K="image/jpg":/\.gif$/i.test(F)?K="image/gif":/\.pdf$/i.test(F)&&(K="application/pdf");return K});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){B(d.drive)},u):C&&"function"===typeof window.DriveClient&&
+l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){B(d.oneDrive)},u):H&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){B(d.dropbox)},u):G&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);l.addSeparator(u);null!=d.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){B(d.gitHub)},u);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){B(d.gitLab)},u);null!=d.trello?l.addItem(mxResources.get("trello")+"...",null,function(){B(d.trello)},u):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);
+l.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},u);d.isOffline()||(l.addSeparator(u),l.addItem(mxResources.get("url")+"...",null,function(){var F=new FilenameDialog(d,"",mxResources.get("import"),function(K){if(null!=K&&0<K.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var P=/(\.png)($|\?)/i.test(K)?
+"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(K),function(R){J(R,P,K)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==P)}},mxResources.get("url"));d.showDialog(F.container,300,80,!0,!0);F.init()},u))}))).isEnabled=x;this.put("appearance",new Menu(mxUtils.bind(this,function(l,u){(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(l,["toggleDarkMode"],u);this.addMenuItems(l,["toggleSimpleMode"],
+u)})));this.put("theme",new Menu(mxUtils.bind(this,function(l,u){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi();("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(l,["toggleDarkMode"],u);l.addSeparator(u);var J=l.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},u);"kennedy"!=B&&"atlas"!=B&&"dark"!=B&&"simple"!=B&&"sketch"!=B&&"min"!=B&&l.addCheckmark(J,Editor.checkmarkImage);J=l.addItem(mxResources.get("default"),
+null,function(){d.setCurrentTheme("kennedy")},u);"kennedy"!=B&&"dark"!=B&&"simple"!=B||l.addCheckmark(J,Editor.checkmarkImage);J=l.addItem(mxResources.get("sketch"),null,function(){d.setCurrentTheme("sketch")},u);"sketch"==B&&l.addCheckmark(J,Editor.checkmarkImage);J=l.addItem(mxResources.get("minimal"),null,function(){d.setCurrentTheme("min")},u);"min"==B&&l.addCheckmark(J,Editor.checkmarkImage);J=l.addItem(mxResources.get("atlas"),null,function(){d.setCurrentTheme("atlas")},u);"atlas"==B&&l.addCheckmark(J,
+Editor.checkmarkImage)})));E=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var l=this.editorUi.getCurrentFile();if(null!=l)if(l.constructor==LocalFile&&null!=l.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(B,J){l.invalidFileHandle=null;l.fileHandle=B;l.title=J.name;l.desc=J;d.save(J.name)}),null,d.createFileSystemOptions(l.getTitle()));else{var u=null!=l.getTitle()?l.getTitle():this.editorUi.defaultFilename;u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),
mxUtils.bind(this,function(B){null!=B&&0<B.length&&null!=l&&B!=l.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&l.rename(B,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J,null!=J?mxResources.get("errorRenamingFile"):null)}))}),l.constructor==DriveFile||l.constructor==StorageFile?mxResources.get("diagramName"):null,function(B){if(null!=B&&0<B.length)return!0;d.showError(mxResources.get("error"),
-mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(q.container,340,96,!0,!0);q.init()}}));F.isEnabled=function(){return this.enabled&&x.apply(this,arguments)};F.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var l=d.getCurrentFile();if(null!=l){var q=d.getCopyFilename(l);l.constructor==DriveFile?(q=new CreateDialog(d,q,mxUtils.bind(this,function(B,J){"_blank"==J?d.editor.editAsNew(d.getFileData(),
-B):("download"==J&&(J=App.MODE_GOOGLE),null!=B&&0<B.length&&(J==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&l.saveAs(B,mxUtils.bind(this,function(M){l.desc=M;l.save(!1,mxUtils.bind(this,function(){d.spinner.stop();l.setModified(!1);l.addAllSavedStatus()}),mxUtils.bind(this,function(E){d.handleError(E)}))}),mxUtils.bind(this,function(M){d.handleError(M)})):d.createFile(B,d.getFileData(!0),null,J)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),
-mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(q.container,420,380,!0,!0),q.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),q)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(l,q){d.appIconClicked(q)}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var l=d.getCurrentFile();if(l.getMode()==App.MODE_GOOGLE||l.getMode()==App.MODE_ONEDRIVE){var q=!1;if(l.getMode()==
-App.MODE_GOOGLE&&null!=l.desc.parents)for(var B=0;B<l.desc.parents.length;B++)if(l.desc.parents[B].isRoot){q=!0;break}d.pickFolder(l.getMode(),mxUtils.bind(this,function(J){d.spinner.spin(document.body,mxResources.get("moving"))&&l.move(J,mxUtils.bind(this,function(M){d.spinner.stop()}),mxUtils.bind(this,function(M){d.handleError(M)}))}),null,!0,q)}}));this.put("publish",new Menu(mxUtils.bind(this,function(l,q){this.addMenuItems(l,["publishLink"],q)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+
-"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var l=d.getCurrentFile();null!=l&&l.share()}catch(q){d.handleError(q)}}));this.put("embed",new Menu(mxUtils.bind(this,function(l,q){var B=d.getCurrentFile();null==B||B.getMode()!=App.MODE_GOOGLE&&B.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(B.getTitle())||this.addMenuItems(l,["liveImage","-"],q);this.addMenuItems(l,["embedImage","embedSvg","-","embedHtml"],q);navigator.standalone||
-d.isOffline()||this.addMenuItems(l,["embedIframe"],q);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(l,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),q)})));d.addInsertItem=function(l,q,B,J){("plantUml"!=J||EditorUi.enablePlantUml&&!d.isOffline())&&l.addItem(B,null,mxUtils.bind(this,function(){if("fromText"==J||"formatSql"==J||"plantUml"==J||"mermaid"==J){var M=new ParseDialog(d,B,J);d.showDialog(M.container,620,420,!0,!1);d.dialog.container.style.overflow=
-"auto"}else M=new CreateGraphDialog(d,B,J),d.showDialog(M.container,620,420,!0,!1);M.init()}),q,null,x())};var v=function(l){t.getModel().beginUpdate();try{l=t.addCell(l),t.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{t.getModel().endUpdate()}t.scrollCellToVisible(l);t.setSelectionCell(l);t.container.focus();t.editAfterInsert&&t.startEditing(l);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(t.view.getState(l))},0);return l},y=function(l,q,B,J,M){l=new mxCell(l,
-new mxGeometry(0,0,q,B),J);l.vertex=!0;null==M&&(M=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([l],!0)));l.geometry.x=M.x;l.geometry.y=M.y;return v(l)};d.actions.put("insertText",new Action(mxResources.get("text"),function(l){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&t.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?
-null:t.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=x;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(l){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?null:t.getInsertPoint())},null,null,"D")).isEnabled=x;d.actions.put("insertNote",new Action(mxResources.get("note"),function(l){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",140,
-160,"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;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?null:t.getInsertPoint())},null,null,"S")).isEnabled=x;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(l){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;",
-null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?null:t.getInsertPoint())},null,null,"F")).isEnabled=x;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(l){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?null:t.getInsertPoint())})).isEnabled=x;d.actions.put("insertEdge",new Action(mxResources.get("line"),function(l){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var q=
-t.defaultEdgeLength;l=null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)?null:t.getInsertPoint();null==l&&(l=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([B],!0)));var B=new mxCell("",new mxGeometry(0,0,q,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");B.geometry.setTerminalPoint(l,!0);B.geometry.setTerminalPoint(new mxPoint(l.x+B.geometry.width,l.y),!1);B.geometry.points=[];B.geometry.relative=!0;B.edge=!0;v(B)}},null,null,"C")).isEnabled=x;F=d.actions.put("toggleShapes",
-new Action(mxResources.get("shapes"),function(){null!=d.sidebarWindow?d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible()):(d.hsplitPosition=0==d.hsplitPosition?EditorUi.prototype.hsplitPosition:0,d.refresh())},null,null,Editor.ctrlKey+"+Shift+K"));F.setToggleAction(!0);F.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()}));d.addInsertMenuItems=mxUtils.bind(this,function(l,q,B){for(var J=0;J<B.length;J++)"-"==B[J]?l.addSeparator(q):
-d.addInsertItem(l,q,mxResources.get(B[J])+"...",B[J])});this.put("insert",new Menu(mxUtils.bind(this,function(l,q){"simple"==Editor.currentTheme||"1"==urlParams.sketch?(d.menus.addMenuItems(l,["toggleShapes"],q),d.menus.addSubmenu("table",l,q),l.addSeparator(q),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(l,["insertTemplate"],q),d.menus.addMenuItems(l,["insertImage","insertLink","-"],q),d.menus.addSubmenu("insertAdvanced",l,q,mxResources.get("advanced")),d.menus.addSubmenu("layout",
-l,q)):(this.addMenuItems(l,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),q),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(l,["insertTemplate"],q),l.addSeparator(q),this.addSubmenu("insertLayout",l,q,mxResources.get("layout")),this.addSubmenu("insertAdvanced",l,q,mxResources.get("advanced")),"min"==uiTheme&&this.addSubmenu("table",l,q))})));this.put("table",new Menu(mxUtils.bind(this,
-function(l,q){d.menus.addInsertTableCellItem(l,q)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,q){d.addInsertMenuItems(l,q,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(l,q){d.addInsertMenuItems(l,q,["fromText","plantUml","mermaid","-","formatSql"]);l.addItem(mxResources.get("csv")+"...",null,function(){t.popupMenuHandler.hideMenu();d.showImportCsvDialog()},
-q,null,x());"min"==uiTheme&&this.addMenuItems(l,["-","createShape","editDiagram"],q)})));this.put("openRecent",new Menu(function(l,q){var B=d.getRecent();if(null!=B){for(var J=0;J<B.length;J++)(function(M){var E=M.mode;E==App.MODE_GOOGLE?E="googleDrive":E==App.MODE_ONEDRIVE&&(E="oneDrive");l.addItem(M.title+" ("+mxResources.get(E)+")",null,function(){d.loadFile(M.id)},q)})(B[J]);l.addSeparator(q)}l.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},q)}));this.put("openFrom",new Menu(function(l,
-q){null!=d.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},q):C&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},q):H&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,
-function(){},q,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},q):G&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);null!=d.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},q);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},
-q);null!=d.trello?l.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},q):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},q);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},
-q);d.isOffline()||(l.addSeparator(q),l.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(d,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(J)))},mxResources.get("url"));d.showDialog(B.container,300,80,!0,!0);B.init()},q))}));Editor.enableCustomLibraries&&
-(this.put("newLibrary",new Menu(function(l,q){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},q):C&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1));null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,
-null,null,null,App.MODE_ONEDRIVE)},q):H&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},q):G&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);null!=
-d.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},q);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},q);null!=d.trello?l.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},q):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},q,null,!1);l.addSeparator(q);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},q);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},q)})),this.put("openLibraryFrom",new Menu(function(l,q){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?l.addItem(mxResources.get("googleDrive")+
-"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},q):C&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1));null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},q):H&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+
-"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},q):G&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);null!=d.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},q);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},q);null!=d.trello?l.addItem(mxResources.get("trello")+"...",
-null,function(){d.pickLibrary(App.MODE_TRELLO)},q):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},q,null,!1);l.addSeparator(q);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},q);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},q);d.isOffline()||(l.addSeparator(q),
-l.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(d,"",mxResources.get("open"),function(J){if(null!=J&&0<J.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var M=J;d.editor.isCorsEnabledForUrl(J)||(M=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(M,function(E){if(200<=E.getStatus()&&299>=E.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,E.getText(),J))}catch(K){d.handleError(K,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),
-d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(B.container,300,80,!0,!0);B.init()},q));"1"==urlParams.confLib&&(l.addSeparator(q),l.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},q))})));this.put("edit",new Menu(mxUtils.bind(this,function(l,q){this.addMenuItems(l,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
-F=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var l=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(l);this.commentsWindow.refreshCommentsTime();l&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));F.setToggleAction(!0);F.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));F=this.get("viewPanels");var u=F.funct;F.funct=
-function(l,q){u.apply(this,arguments);d.menus.addMenuItems(l,["tags"],q);d.commentsSupported()&&d.menus.addMenuItems(l,["comments"],q)};this.put("view",new Menu(mxUtils.bind(this,function(l,q){this.addMenuItems(l,(null!=this.editorUi.format?["format"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(l,["-","search"],q);if(isLocalStorage||mxClient.IS_CHROMEAPP){var B=this.addMenuItem(l,"scratchpad",q);(!d.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(l,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",l,q);this.addMenuItems(l,"- scrollbars tooltips ruler - grid guides".split(" "),q);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(l,"shadowVisible",q);this.addMenuItems(l,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),q);"1"!=urlParams.sketch&&this.addMenuItems(l,
-["-","fullscreen"],q)})));if(EditorUi.isElectronApp){var D="1"==urlParams.enableSpellCheck;F=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();D=!D;d.alert(mxResources.get("restartForChangeRequired"))});F.setToggleAction(!0);F.setSelectedCallback(function(){return D});var A="1"==urlParams.enableStoreBkp;F=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();A=!A});F.setToggleAction(!0);F.setSelectedCallback(function(){return A});d.actions.addAction("openDevTools",function(){d.openDevTools()});
-d.actions.addAction("drafts...",function(){var l=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(q){q=parseInt(q);0<=q&&(EditorUi.draftSaveDelay=1E3*q,EditorUi.enableDrafts=0<q,mxSettings.setDraftSaveDelay(q),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);d.showDialog(l.container,320,80,!0,!0);l.init()})}var U=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(l,q){var B="simple"==
-Editor.currentTheme||"1"==urlParams.sketch;if(B||"min"==uiTheme){null==U||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",l,q);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",l,q);d.menus.addSubmenu("units",l,q);l.addSeparator(q);B||d.menus.addMenuItems(l,["scrollbars","-","tooltips","copyConnect","collapseExpand"],q);"1"==urlParams.embedInline||B||"1"==urlParams.embed||!isLocalStorage&&!mxClient.IS_CHROMEAPP||d.mode==App.MODE_ATLAS||
-d.menus.addMenuItems(l,["-","showStartScreen","search","scratchpad"],q);l.addSeparator(q);B&&d.menus.addMenuItems(l,["copyConnect","collapseExpand","tooltips","-"],q);EditorUi.isElectronApp&&d.menus.addMenuItems(l,["-","spellCheck","autoBkp","drafts","-"],q);var J=d.getCurrentFile();null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(l,["-","showRemoteCursors","shareCursor","-"],q);Graph.translateDiagram&&d.menus.addMenuItems(l,["diagramLanguage"],q);d.mode!=App.MODE_ATLAS&&
-d.menus.addMenuItem(l,"configuration",q);B||!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(l,"plugins",q);l.addSeparator(q)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",l,q),"1"!=urlParams.embed&&this.addSubmenu("theme",l,q),l.addSeparator(q),"undefined"!==typeof MathJax&&(B=this.addMenuItem(l,"mathematicalTypesetting",q),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/math-typesetting")),
-EditorUi.isElectronApp&&this.addMenuItems(l,["spellCheck","autoBkp","drafts"],q),this.addMenuItems(l,["copyConnect","collapseExpand","-"],q),"1"!=urlParams.embed&&(J=d.getCurrentFile(),null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(l,["showRemoteCursors","shareCursor"],q),this.addMenuItems(l,["autosave"],q)),l.addSeparator(q),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(l,"plugins",q),this.addMenuItems(l,["-","editDiagram"],q),Graph.translateDiagram&&this.addMenuItems(l,
-["diagramLanguage"]),l.addSeparator(q),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(l,["showStartScreen"],q),this.addMenuItems(l,["configuration"],q),l.addSeparator(q),"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function M(K){return{id:K.id,isExt:!0,url:K.downloadUrl,title:K.title,imgUrl:K.thumbnailLink,changedBy:K.lastModifyingUserName,lastModifiedOn:K.modifiedDate}}var E=new TemplatesDialog(d,function(K){console.log(arguments)},null,
-null,null,"user",function(K,P,R){var V=new Date;V.setDate(V.getDate()-7);d.drive.listFiles(null,V,R?!0:!1,function(X){for(var m=[],z=0;z<X.items.length;z++)m.push(M(X.items[z]));K(m)},P)},function(K,P,R,V){d.drive.listFiles(K,null,V?!0:!1,function(X){for(var m=[],z=0;z<X.items.length;z++)m.push(M(X.items[z]));P(m)},R)},function(K,P,R){d.drive.getFile(K.id,function(V){P(V.data)},R)},null,function(K){K({Test:[]},1)},!0,!1);d.showDialog(E.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,
-!0)}),this.addMenuItem(l,"templates",q))})));this.put("diagram",new Menu(mxUtils.bind(this,function(l,q){var B=d.getCurrentFile();d.menus.addSubmenu("extras",l,q,mxResources.get("preferences"));l.addSeparator(q);var J="simple"==Editor.currentTheme||"1"==urlParams.sketch;if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d.menus.addMenuItems(l,"new open - synchronize - save saveAs -".split(" "),q);else if("1"==urlParams.embed||d.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&
-d.menus.addMenuItems(l,["-","save"],q);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(l,["saveAndExit"],q),null!=B&&B.isRevisionHistorySupported()&&d.menus.addMenuItems(l,["revisionHistory"],q);l.addSeparator(q)}else d.mode==App.MODE_ATLAS?d.menus.addMenuItems(l,["save","synchronize","-"],q):"1"!=urlParams.noFileMenu&&(J?d.menus.addSubmenu("file",l,q):(d.menus.addMenuItems(l,["new"],q),d.menus.addSubmenu("openFrom",
-l,q),isLocalStorage&&this.addSubmenu("openRecent",l,q),l.addSeparator(q),null!=B&&(B.constructor==DriveFile&&d.menus.addMenuItems(l,["share"],q),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||B.constructor==LocalFile||d.menus.addMenuItems(l,["synchronize"],q)),l.addSeparator(q),d.menus.addSubmenu("save",l,q)));d.menus.addSubmenu("exportAs",l,q);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(l,["import"],q):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",l,q);d.menus.addMenuItems(l,
-["-","findReplace"],q);d.commentsSupported()&&d.menus.addMenuItems(l,["comments","-"],q);d.menus.addMenuItems(l,["format","layers","tags","-","pageSetup"],q);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(l,["print"],q);J||null==B||null==d.fileNode||"1"==urlParams.embedInline||(B=null!=B.getTitle()?B.getTitle():d.defaultFilename,/(\.html)$/i.test(B)||/(\.svg)$/i.test(B)||this.addMenuItems(l,["-","properties"]));l.addSeparator(q);d.menus.addSubmenu("help",l,
-q);"1"==urlParams.embed||d.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||d.mode==App.MODE_ATLAS)&&d.menus.addMenuItems(l,["-","exit"],q):"1"!=urlParams.noFileMenu&&d.menus.addMenuItems(l,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(l,q){var B=d.getCurrentFile();null!=B&&B.constructor==DriveFile?d.menus.addMenuItems(l,["save","makeCopy","-","rename","moveToFolder"],q):(d.menus.addMenuItems(l,["save","saveAs","-","rename"],q),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
-"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],q):d.menus.addMenuItems(l,["makeCopy"],q));d.menus.addMenuItems(l,["-","autosave"],q);null!=B&&B.isRevisionHistorySupported()&&d.menus.addMenuItems(l,["-","revisionHistory"],q)})));this.put("file",new Menu(mxUtils.bind(this,function(l,q){var B="simple"==Editor.currentTheme||"min"==uiTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",l,q),this.addSubmenu("exportAs",l,q),this.addSubmenu("embed",l,q),"1"==urlParams.libraries&&
-(this.addMenuItems(l,["-"],q),this.addSubmenu("newLibrary",l,q),this.addSubmenu("openLibraryFrom",l,q)),d.isRevisionHistorySupported()&&this.addMenuItems(l,["-","revisionHistory"],q),this.addMenuItems(l,["-","pageSetup","print","-","rename"],q),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(l,["saveAndExit"],q):(this.addMenuItems(l,["save"],q),"1"==urlParams.saveAndExit&&this.addMenuItems(l,["saveAndExit"],q))),"1"!=urlParams.noExitBtn&&this.addMenuItems(l,
-["exit"],q);else if(B){B=d.getCurrentFile();d.menus.addMenuItems(l,["new"],q);d.menus.addSubmenu("openFrom",l,q);isLocalStorage&&this.addSubmenu("openRecent",l,q);l.addSeparator(q);d.menus.addMenuItems(l,["-","save"],q);null!=B&&B.constructor==DriveFile||d.menus.addMenuItems(l,["saveAs"],q);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||d.menus.addMenuItems(l,["synchronize"],q);null!=B&&B.constructor==DriveFile?d.menus.addMenuItems(l,"- rename makeCopy - moveToFolder openFolder".split(" "),
-q):(d.menus.addMenuItems(l,["-","rename"],q),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],q):d.menus.addMenuItems(l,["makeCopy"],q));null!=B&&B.isRevisionHistorySupported()&&d.menus.addMenuItems(l,["-","revisionHistory"],q);if(null!=B){if(null!=d.fileNode&&"1"!=urlParams.embedInline){var J=null!=B.getTitle()?B.getTitle():d.defaultFilename;(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&
-this.addMenuItems(l,["properties"],q)}B.constructor==DriveFile&&d.menus.addMenuItems(l,["share"],q)}d.menus.addMenuItems(l,["-","autosave"],q)}else B=this.editorUi.getCurrentFile(),null!=B&&B.constructor==DriveFile?(B.isRestricted()&&this.addMenuItems(l,["exportOptionsDisabled"],q),this.addMenuItems(l,["save","-","share"],q),J=this.addMenuItem(l,"synchronize",q),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize"),l.addSeparator(q)):
-this.addMenuItems(l,["new"],q),this.addSubmenu("openFrom",l,q),isLocalStorage&&this.addSubmenu("openRecent",l,q),null!=B&&B.constructor==DriveFile?this.addMenuItems(l,"new - rename makeCopy openFolder moveToFolder".split(" "),q):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(l.addSeparator(q),J=this.addMenuItem(l,"synchronize",q),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize")),
-this.addMenuItems(l,["-","save","saveAs","-"],q),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==B||this.addMenuItems(l,["share","-"],q),this.addMenuItems(l,["rename"],q),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],q):(this.addMenuItems(l,["makeCopy"],q),null!=B&&B.constructor==OneDriveFile&&this.addMenuItems(l,["moveToFolder"],q))),l.addSeparator(q),this.addSubmenu("importFrom",
-l,q),this.addSubmenu("exportAs",l,q),l.addSeparator(q),this.addSubmenu("embed",l,q),this.addSubmenu("publish",l,q),l.addSeparator(q),this.addSubmenu("newLibrary",l,q),this.addSubmenu("openLibraryFrom",l,q),d.isRevisionHistorySupported()&&this.addMenuItems(l,["-","revisionHistory"],q),null!=B&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(J=null!=B.getTitle()?B.getTitle():d.defaultFilename,(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&
-this.addMenuItems(l,["-","properties"])),this.addMenuItems(l,["-","pageSetup"],q),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["print"],q),this.addMenuItems(l,["-","close"])})));k.prototype.execute=function(){var l=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 q=l.extFonts,B=0;null!=q&&B<q.length;B++){var J=
-document.getElementById("extFont_"+q[B].name);null!=J&&J.parentNode.removeChild(J)}l.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=q};this.put("fontFamily",new Menu(mxUtils.bind(this,function(l,q){for(var B=mxUtils.bind(this,function(m,z,L,Q,N){var T=d.editor.graph;Q=this.styleChange(l,Q||m,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,
-"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[m,null!=z?encodeURIComponent(z):null,null]:[m],null,q,function(){"1"!=urlParams["ext-fonts"]?T.setFont(m,z):(document.execCommand("fontname",!1,m),T.addExtFont(m,z));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[m,null!=z?encodeURIComponent(z):null,null]:[m],"cells",
-[T.cellEditor.getEditingCell()]))},function(){T.updateLabelElements(T.getSelectionCells(),function(S){S.removeAttribute("face");S.style.fontFamily=null;"PRE"==S.nodeName&&T.replaceElement(S,"div")});"1"==urlParams["ext-fonts"]&&T.addExtFont(m,z)});L&&(L=document.createElement("span"),L.className="geSprite geSprite-delete",L.style.cursor="pointer",L.style.display="inline-block",Q.firstChild.nextSibling.nextSibling.appendChild(L),mxEvent.addListener(L,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,
-function(S){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[m.toLowerCase()];for(var W=0;W<this.customFonts.length;W++)if(this.customFonts[W].name==m&&this.customFonts[W].url==z){this.customFonts.splice(W,1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var Z=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=Z&&0<Z.length)for(W=0;W<Z.length;W++)if(Z[W].name==m){Z.splice(W,1);break}var ba=mxUtils.clone(this.customFonts);for(W=0;W<ba.length;W++)if(ba[W].name==
-m){ba.splice(W,1);break}W=new k(this.editorUi,Z,ba);this.editorUi.editor.graph.model.execute(W)}this.editorUi.hideCurrentMenu();mxEvent.consume(S)})));Graph.addFont(m,z);Q.firstChild.nextSibling.style.fontFamily=m;null!=N&&Q.setAttribute("title",N)}),J={},M=0;M<this.defaultFonts.length;M++){var E=this.defaultFonts[M];"string"===typeof E?B(E):null!=E.fontFamily&&null!=E.fontUrl&&(J[encodeURIComponent(E.fontFamily)+"@"+encodeURIComponent(E.fontUrl)]=!0,B(E.fontFamily,E.fontUrl))}l.addSeparator(q);if("1"!=
-urlParams["ext-fonts"]){E=function(m){var z=encodeURIComponent(m.name)+(null==m.url?"":"@"+encodeURIComponent(m.url));if(!J[z]){for(var L=m.name,Q=0;null!=P[L.toLowerCase()];)L=m.name+" ("+ ++Q+")";null==K[z]&&(R.push({name:m.name,url:m.url,label:L,title:m.url}),P[L.toLowerCase()]=m,K[z]=m)}};var K={},P={},R=[];for(M=0;M<this.customFonts.length;M++)E(this.customFonts[M]);for(var V in Graph.recentCustomFonts)E(Graph.recentCustomFonts[V]);R.sort(function(m,z){return m.label<z.label?-1:m.label>z.label?
-1:0});if(0<R.length){for(M=0;M<R.length;M++)B(R[M].name,R[M].url,!0,R[M].label,R[M].url);l.addSeparator(q)}l.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),q);l.addSeparator(q)}else{V=this.editorUi.editor.graph.extFonts;if(null!=V&&0<V.length){E={};var X=!1;for(M=0;M<this.customFonts.length;M++)E[this.customFonts[M].name]=!0;for(M=0;M<V.length;M++)E[V[M].name]||(this.customFonts.push(V[M]),
-X=!0);X&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(M=0;M<this.customFonts.length;M++)V=this.customFonts[M].name,E=this.customFonts[M].url,B(V,E,!0),this.editorUi.editor.graph.addExtFont(V,E,!0);l.addSeparator(q);l.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var m=new k(this.editorUi,[],[]);d.editor.graph.model.execute(m)}),q);l.addSeparator(q)}}l.addItem(mxResources.get("custom")+"...",null,
-mxUtils.bind(this,function(){var m=this.editorUi.editor.graph,z=m.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],L="s",Q=null;if("1"!=urlParams["ext-fonts"]&&m.isEditing()){var N=m.getSelectedEditingElement();null!=N&&(N=mxUtils.getCurrentStyle(N),null!=N&&(z=Graph.stripQuotes(N.fontFamily),Q=Graph.getFontUrl(z,null),null!=Q&&(Graph.isGoogleFontUrl(Q)?(Q=null,L="g"):L="w")))}else N=m.getView().getState(m.getSelectionCell()),null!=N&&(z=N.style[mxConstants.STYLE_FONTFAMILY]||
-z,"1"!=urlParams["ext-fonts"]?(N=N.style.fontSource,null!=N&&(N=decodeURIComponent(N),Graph.isGoogleFontUrl(N)?L="g":(L="w",Q=N))):(L=N.style.FType||L,"w"==L&&(Q=this.editorUi.editor.graph.extFonts,N=null,null!=Q&&(N=Q.find(function(S){return S.name==z})),Q=null!=N?N.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=Q&&Q.substring(0,PROXY_URL.length)==PROXY_URL&&(Q=decodeURIComponent(Q.substr((PROXY_URL+"?url=").length)));var T=null;document.activeElement==m.cellEditor.textarea&&(T=
-m.cellEditor.saveSelection());L=new FontDialog(this.editorUi,z,Q,L,mxUtils.bind(this,function(S,W,Z){null!=T&&(m.cellEditor.restoreSelection(T),T=null);if(null!=S&&0<S.length)if("1"!=urlParams["ext-fonts"]&&m.isEditing())m.setFont(S,W);else{m.getModel().beginUpdate();try{m.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(m.setCellStyles(mxConstants.STYLE_FONTFAMILY,S),m.setCellStyles("fontSource",null!=W?encodeURIComponent(W):null),m.setCellStyles("FType",null)):(m.setCellStyles(mxConstants.STYLE_FONTFAMILY,
-S),"s"!=Z&&(m.setCellStyles("FType",Z),0==W.indexOf("http://")&&(W=PROXY_URL+"?url="+encodeURIComponent(W)),this.editorUi.editor.graph.addExtFont(S,W)));Z=!0;for(var ba=0;ba<this.customFonts.length;ba++)if(this.customFonts[ba].name==S){Z=!1;break}Z&&(this.customFonts.push({name:S,url:W}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{m.getModel().endUpdate()}}}));this.editorUi.showDialog(L.container,380,Editor.enableWebFonts?250:180,!0,!0);
-L.init()}),q,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
-DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,f,k){this.ui=b;this.page=f;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(b,f,k){this.ui=b;this.oldIndex=f;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(b,f,k){this.ui=b;this.previousPage=this.page=f;this.neverShown=!0;null!=f&&(this.neverShown=null==f.viewState,this.ui.updatePageRoot(f),null!=k&&(f.viewState=k,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var f=this.ui.editor,k=f.graph,d=Graph.compressNode(f.getGraphXml(!0));mxUtils.setTextContent(b.node,d);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
-k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);f.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());f.graph.fireEvent(new mxEventObject(mxEvent.ROOT));f.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,f,k,d,t){SelectPage.call(this,b,k);this.relatedPage=f;this.index=d;this.previousIndex=null;this.noSelect=t}mxUtils.extend(ChangePage,SelectPage);
+mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(u.container,340,96,!0,!0);u.init()}}));E.isEnabled=function(){return this.enabled&&x.apply(this,arguments)};E.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var l=d.getCurrentFile();if(null!=l){var u=d.getCopyFilename(l);l.constructor==DriveFile?(u=new CreateDialog(d,u,mxUtils.bind(this,function(B,J){"_blank"==J?d.editor.editAsNew(d.getFileData(),
+B):("download"==J&&(J=App.MODE_GOOGLE),null!=B&&0<B.length&&(J==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&l.saveAs(B,mxUtils.bind(this,function(M){l.desc=M;l.save(!1,mxUtils.bind(this,function(){d.spinner.stop();l.setModified(!1);l.addAllSavedStatus()}),mxUtils.bind(this,function(F){d.handleError(F)}))}),mxUtils.bind(this,function(M){d.handleError(M)})):d.createFile(B,d.getFileData(!0),null,J)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),
+mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(u.container,420,380,!0,!0),u.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),u)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(l,u){d.appIconClicked(u)}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var l=d.getCurrentFile();if(l.getMode()==App.MODE_GOOGLE||l.getMode()==App.MODE_ONEDRIVE){var u=!1;if(l.getMode()==
+App.MODE_GOOGLE&&null!=l.desc.parents)for(var B=0;B<l.desc.parents.length;B++)if(l.desc.parents[B].isRoot){u=!0;break}d.pickFolder(l.getMode(),mxUtils.bind(this,function(J){d.spinner.spin(document.body,mxResources.get("moving"))&&l.move(J,mxUtils.bind(this,function(M){d.spinner.stop()}),mxUtils.bind(this,function(M){d.handleError(M)}))}),null,!0,u)}}));this.put("publish",new Menu(mxUtils.bind(this,function(l,u){this.addMenuItems(l,["publishLink"],u)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+
+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var l=d.getCurrentFile();null!=l&&l.share()}catch(u){d.handleError(u)}}));this.put("embed",new Menu(mxUtils.bind(this,function(l,u){var B=d.getCurrentFile();null==B||B.getMode()!=App.MODE_GOOGLE&&B.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(B.getTitle())||this.addMenuItems(l,["liveImage","-"],u);this.addMenuItems(l,["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||
+d.isOffline()||this.addMenuItems(l,["embedIframe"],u);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(l,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),u)})));d.addInsertItem=function(l,u,B,J){("plantUml"!=J||EditorUi.enablePlantUml&&!d.isOffline())&&l.addItem(B,null,mxUtils.bind(this,function(){if("fromText"==J||"formatSql"==J||"plantUml"==J||"mermaid"==J){var M=new ParseDialog(d,B,J);d.showDialog(M.container,620,420,!0,!1);d.dialog.container.style.overflow=
+"auto"}else M=new CreateGraphDialog(d,B,J),d.showDialog(M.container,620,420,!0,!1);M.init()}),u,null,x())};var t=function(l){q.getModel().beginUpdate();try{l=q.addCell(l),q.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{q.getModel().endUpdate()}q.scrollCellToVisible(l);q.setSelectionCell(l);q.container.focus();q.editAfterInsert&&q.startEditing(l);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(q.view.getState(l))},0);return l},y=function(l,u,B,J,M){l=new mxCell(l,
+new mxGeometry(0,0,u,B),J);l.vertex=!0;null==M&&(M=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([l],!0)));l.geometry.x=M.x;l.geometry.y=M.y;return t(l)};d.actions.put("insertText",new Action(mxResources.get("text"),function(l){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&q.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||
+!q.isMouseInsertPoint()?null:q.getInsertPoint()))},null,null,Editor.ctrlKey+"+Shift+X/A")).isEnabled=x;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(l){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"D")).isEnabled=x;d.actions.put("insertNote",new Action(mxResources.get("note"),function(l){q.isEnabled()&&
+!q.isCellLocked(q.getDefaultParent())&&y("",140,160,"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;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"S")).isEnabled=x;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(l){q.isEnabled()&&
+!q.isCellLocked(q.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"F")).isEnabled=x;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(l){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!q.isMouseInsertPoint()?null:q.getInsertPoint())})).isEnabled=
+x;d.actions.put("insertEdge",new Action(mxResources.get("line"),function(l){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var u=q.defaultEdgeLength;l=null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!q.isMouseInsertPoint()?null:q.getInsertPoint();null==l&&(l=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([B],!0)));var B=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");B.geometry.setTerminalPoint(l,!0);B.geometry.setTerminalPoint(new mxPoint(l.x+
+B.geometry.width,l.y),!1);B.geometry.points=[];B.geometry.relative=!0;B.edge=!0;t(B)}},null,null,"C")).isEnabled=x;E=d.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=d.sidebarWindow?d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible()):(d.hsplitPosition=0==d.hsplitPosition?EditorUi.prototype.hsplitPosition:0,d.refresh())},null,null,Editor.ctrlKey+"+Shift+K"));E.setToggleAction(!0);E.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&
+d.sidebarWindow.window.isVisible()}));d.addInsertMenuItems=mxUtils.bind(this,function(l,u,B){for(var J=0;J<B.length;J++)"-"==B[J]?l.addSeparator(u):d.addInsertItem(l,u,mxResources.get(B[J])+"...",B[J])});this.put("insert",new Menu(mxUtils.bind(this,function(l,u){"simple"==Editor.currentTheme||"1"==urlParams.sketch?(d.menus.addMenuItems(l,["toggleShapes"],u),d.menus.addSubmenu("table",l,u),l.addSeparator(u),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(l,["insertTemplate"],u),d.menus.addMenuItems(l,
+["insertImage","insertLink","-"],u),d.menus.addSubmenu("insertAdvanced",l,u,mxResources.get("advanced")),d.menus.addSubmenu("layout",l,u)):(this.addMenuItems(l,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),u),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(l,["insertTemplate"],u),l.addSeparator(u),this.addSubmenu("insertLayout",l,u,mxResources.get("layout")),this.addSubmenu("insertAdvanced",
+l,u,mxResources.get("advanced")),"min"==uiTheme&&this.addSubmenu("table",l,u))})));this.put("table",new Menu(mxUtils.bind(this,function(l,u){d.menus.addInsertTableCellItem(l,u)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,u){d.addInsertMenuItems(l,u,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(l,u){d.addInsertMenuItems(l,u,["fromText","plantUml","mermaid","-",
+"formatSql"]);l.addItem(mxResources.get("csv")+"...",null,function(){q.popupMenuHandler.hideMenu();d.showImportCsvDialog()},u,null,x());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(l,["-","createShape","editDiagram"],u)})));this.put("openRecent",new Menu(function(l,u){var B=d.getRecent();if(null!=B){for(var J=0;J<B.length;J++)(function(M){var F=M.mode;F==App.MODE_GOOGLE?F="googleDrive":F==App.MODE_ONEDRIVE&&(F="oneDrive");l.addItem(M.title+" ("+mxResources.get(F)+")",
+null,function(){d.loadFile(M.id)},u)})(B[J]);l.addSeparator(u)}l.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},u)}));this.put("openFrom",new Menu(function(l,u){null!=d.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},u):C&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",
+null,function(){d.pickFile(App.MODE_ONEDRIVE)},u):H&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},u):G&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);l.addSeparator(u);null!=d.gitHub&&l.addItem(mxResources.get("github")+
+"...",null,function(){d.pickFile(App.MODE_GITHUB)},u);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},u);null!=d.trello?l.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},u):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);l.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+
+"...",null,function(){d.pickFile(App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},u);d.isOffline()||(l.addSeparator(u),l.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(d,"",mxResources.get("open"),function(J){null!=J&&0<J.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(J):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+
+"/")+window.location.search+"#U"+encodeURIComponent(J)))},mxResources.get("url"));d.showDialog(B.container,300,80,!0,!0);B.init()},u))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(l,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},u):C&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+
+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},u):H&&"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},u):G&&"function"===
+typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);l.addSeparator(u);null!=d.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},u);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},u);null!=d.trello?l.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,
+null,null,null,App.MODE_TRELLO)},u):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);l.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},u);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},
+u)})),this.put("openLibraryFrom",new Menu(function(l,u){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},u):C&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));null!=d.oneDrive?l.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},u):H&&
+"function"===typeof window.OneDriveClient&&l.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);null!=d.dropbox?l.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},u):G&&"function"===typeof window.DropboxClient&&l.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);l.addSeparator(u);null!=d.gitHub&&l.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},
+u);null!=d.gitLab&&l.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},u);null!=d.trello?l.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},u):I&&"function"===typeof window.TrelloClient&&l.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);l.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&l.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},
+u);"1"!=urlParams.noDevice&&l.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},u);d.isOffline()||(l.addSeparator(u),l.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(d,"",mxResources.get("open"),function(J){if(null!=J&&0<J.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var M=J;d.editor.isCorsEnabledForUrl(J)||(M=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(M,function(F){if(200<=F.getStatus()&&299>=F.getStatus()){d.spinner.stop();
+try{d.loadLibrary(new UrlLibrary(this,F.getText(),J))}catch(K){d.handleError(K,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(B.container,300,80,!0,!0);B.init()},u));"1"==urlParams.confLib&&(l.addSeparator(u),l.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},
+u))})));this.put("edit",new Menu(mxUtils.bind(this,function(l,u){this.addMenuItems(l,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));E=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",
+function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var l=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(l);this.commentsWindow.refreshCommentsTime();l&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));E.setToggleAction(!0);E.setSelectedCallback(mxUtils.bind(this,
+function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));E=this.get("viewPanels");var v=E.funct;E.funct=function(l,u){v.apply(this,arguments);d.menus.addMenuItems(l,["tags"],u);d.commentsSupported()&&d.menus.addMenuItems(l,["comments"],u)};this.put("view",new Menu(mxUtils.bind(this,function(l,u){this.addMenuItems(l,(null!=
+this.editorUi.format?["format"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(l,["-","search"],u);if(isLocalStorage||mxClient.IS_CHROMEAPP){var B=this.addMenuItem(l,"scratchpad",u);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(l,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",l,u);this.addMenuItems(l,"- scrollbars tooltips ruler - grid guides".split(" "),
+u);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(l,"shadowVisible",u);this.addMenuItems(l,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),u);"1"!=urlParams.sketch&&this.addMenuItems(l,["-","fullscreen"],u)})));if(EditorUi.isElectronApp){var D="1"==urlParams.enableSpellCheck;E=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();D=!D;d.alert(mxResources.get("restartForChangeRequired"))});E.setToggleAction(!0);E.setSelectedCallback(function(){return D});
+var A="1"==urlParams.enableStoreBkp;E=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();A=!A});E.setToggleAction(!0);E.setSelectedCallback(function(){return A});d.actions.addAction("openDevTools",function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var l=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),
+mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);d.showDialog(l.container,320,80,!0,!0);l.init()})}var U=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(l,u){var B="simple"==Editor.currentTheme||"1"==urlParams.sketch;if(B||"min"==uiTheme){null==U||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",l,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",l,u);d.menus.addSubmenu("units",
+l,u);l.addSeparator(u);B||d.menus.addMenuItems(l,["scrollbars","-","tooltips","copyConnect","collapseExpand"],u);"1"==urlParams.embedInline||B||"1"==urlParams.embed||!isLocalStorage&&!mxClient.IS_CHROMEAPP||d.mode==App.MODE_ATLAS||d.menus.addMenuItems(l,["-","showStartScreen","search","scratchpad"],u);l.addSeparator(u);B&&d.menus.addMenuItems(l,["copyConnect","collapseExpand","tooltips","-"],u);EditorUi.isElectronApp&&d.menus.addMenuItems(l,["-","spellCheck","autoBkp","drafts","-"],u);var J=d.getCurrentFile();
+null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(l,["-","showRemoteCursors","shareCursor","-"],u);Graph.translateDiagram&&d.menus.addMenuItems(l,["diagramLanguage"],u);d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(l,"configuration",u);B||!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(l,"plugins",u);l.addSeparator(u)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",l,u),"1"!=urlParams.embed&&this.addSubmenu("theme",l,
+u),l.addSeparator(u),"undefined"!==typeof MathJax&&(B=this.addMenuItem(l,"mathematicalTypesetting",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(l,["spellCheck","autoBkp","drafts"],u),this.addMenuItems(l,["copyConnect","collapseExpand","-"],u),"1"!=urlParams.embed&&(J=d.getCurrentFile(),null!=J&&J.isRealtimeEnabled()&&J.isRealtimeSupported()&&this.addMenuItems(l,
+["showRemoteCursors","shareCursor"],u),this.addMenuItems(l,["autosave"],u)),l.addSeparator(u),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(l,"plugins",u),this.addMenuItems(l,["-","editDiagram"],u),Graph.translateDiagram&&this.addMenuItems(l,["diagramLanguage"]),l.addSeparator(u),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(l,["showStartScreen"],u),this.addMenuItems(l,["configuration"],u),l.addSeparator(u),"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",
+function(){function M(K){return{id:K.id,isExt:!0,url:K.downloadUrl,title:K.title,imgUrl:K.thumbnailLink,changedBy:K.lastModifyingUserName,lastModifiedOn:K.modifiedDate}}var F=new TemplatesDialog(d,function(K){console.log(arguments)},null,null,null,"user",function(K,P,R){var V=new Date;V.setDate(V.getDate()-7);d.drive.listFiles(null,V,R?!0:!1,function(X){for(var m=[],z=0;z<X.items.length;z++)m.push(M(X.items[z]));K(m)},P)},function(K,P,R,V){d.drive.listFiles(K,null,V?!0:!1,function(X){for(var m=[],
+z=0;z<X.items.length;z++)m.push(M(X.items[z]));P(m)},R)},function(K,P,R){d.drive.getFile(K.id,function(V){P(V.data)},R)},null,function(K){K({Test:[]},1)},!0,!1);d.showDialog(F.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(l,"templates",u))})));this.put("diagram",new Menu(mxUtils.bind(this,function(l,u){var B=d.getCurrentFile();d.menus.addSubmenu("extras",l,u,mxResources.get("preferences"));l.addSeparator(u);var J="simple"==Editor.currentTheme||"1"==urlParams.sketch;
+if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d.menus.addMenuItems(l,"new open - synchronize - save saveAs -".split(" "),u);else if("1"==urlParams.embed||d.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(l,["-","save"],u);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(l,["saveAndExit"],u),null!=B&&B.isRevisionHistorySupported()&&d.menus.addMenuItems(l,["revisionHistory"],
+u);l.addSeparator(u)}else d.mode==App.MODE_ATLAS?d.menus.addMenuItems(l,["save","synchronize","-"],u):"1"!=urlParams.noFileMenu&&(J?d.menus.addSubmenu("file",l,u):(d.menus.addMenuItems(l,["new"],u),d.menus.addSubmenu("openFrom",l,u),isLocalStorage&&this.addSubmenu("openRecent",l,u),l.addSeparator(u),null!=B&&(B.constructor==DriveFile&&d.menus.addMenuItems(l,["share"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||B.constructor==LocalFile||d.menus.addMenuItems(l,["synchronize"],u)),l.addSeparator(u),
+d.menus.addSubmenu("save",l,u)));d.menus.addSubmenu("exportAs",l,u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(l,["import"],u):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",l,u);d.menus.addMenuItems(l,["-","findReplace"],u);d.commentsSupported()&&d.menus.addMenuItems(l,["comments","-"],u);d.menus.addMenuItems(l,["format","layers","tags","-","pageSetup"],u);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(l,["print"],u);J||
+null==B||null==d.fileNode||"1"==urlParams.embedInline||(B=null!=B.getTitle()?B.getTitle():d.defaultFilename,/(\.html)$/i.test(B)||/(\.svg)$/i.test(B)||this.addMenuItems(l,["-","properties"]));l.addSeparator(u);d.menus.addSubmenu("help",l,u);"1"==urlParams.embed||d.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||d.mode==App.MODE_ATLAS)&&d.menus.addMenuItems(l,["-","exit"],u):"1"!=urlParams.noFileMenu&&d.menus.addMenuItems(l,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(l,u){var B=
+d.getCurrentFile();null!=B&&B.constructor==DriveFile?d.menus.addMenuItems(l,["save","makeCopy","-","rename","moveToFolder"],u):(d.menus.addMenuItems(l,["save","saveAs","-","rename"],u),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],u):d.menus.addMenuItems(l,["makeCopy"],u));d.menus.addMenuItems(l,["-","autosave"],u);null!=B&&B.isRevisionHistorySupported()&&d.menus.addMenuItems(l,["-","revisionHistory"],u)})));this.put("file",new Menu(mxUtils.bind(this,
+function(l,u){var B="simple"==Editor.currentTheme||"min"==uiTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",l,u),this.addSubmenu("exportAs",l,u),this.addSubmenu("embed",l,u),"1"==urlParams.libraries&&(this.addMenuItems(l,["-"],u),this.addSubmenu("newLibrary",l,u),this.addSubmenu("openLibraryFrom",l,u)),d.isRevisionHistorySupported()&&this.addMenuItems(l,["-","revisionHistory"],u),this.addMenuItems(l,["-","pageSetup","print","-","rename"],u),"1"!=urlParams.embedInline&&
+("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(l,["saveAndExit"],u):(this.addMenuItems(l,["save"],u),"1"==urlParams.saveAndExit&&this.addMenuItems(l,["saveAndExit"],u))),"1"!=urlParams.noExitBtn&&this.addMenuItems(l,["exit"],u);else if(B){B=d.getCurrentFile();d.menus.addMenuItems(l,["new"],u);d.menus.addSubmenu("openFrom",l,u);isLocalStorage&&this.addSubmenu("openRecent",l,u);l.addSeparator(u);d.menus.addMenuItems(l,["-","save"],u);null!=B&&B.constructor==DriveFile||d.menus.addMenuItems(l,
+["saveAs"],u);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||d.menus.addMenuItems(l,["synchronize"],u);null!=B&&B.constructor==DriveFile?d.menus.addMenuItems(l,"- rename makeCopy - moveToFolder openFolder".split(" "),u):(d.menus.addMenuItems(l,["-","rename"],u),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],u):d.menus.addMenuItems(l,["makeCopy"],u));null!=B&&B.isRevisionHistorySupported()&&
+d.menus.addMenuItems(l,["-","revisionHistory"],u);if(null!=B){if(null!=d.fileNode&&"1"!=urlParams.embedInline){var J=null!=B.getTitle()?B.getTitle():d.defaultFilename;(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&this.addMenuItems(l,["properties"],u)}B.constructor==DriveFile&&d.menus.addMenuItems(l,["share"],u)}d.menus.addMenuItems(l,["-","autosave"],u)}else B=this.editorUi.getCurrentFile(),null!=B&&B.constructor==DriveFile?(B.isRestricted()&&
+this.addMenuItems(l,["exportOptionsDisabled"],u),this.addMenuItems(l,["save","-","share"],u),J=this.addMenuItem(l,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize"),l.addSeparator(u)):this.addMenuItems(l,["new"],u),this.addSubmenu("openFrom",l,u),isLocalStorage&&this.addSubmenu("openRecent",l,u),null!=B&&B.constructor==DriveFile?this.addMenuItems(l,"new - rename makeCopy openFolder moveToFolder".split(" "),
+u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(l.addSeparator(u),J=this.addMenuItem(l,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(l,["-","save","saveAs","-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==B||this.addMenuItems(l,["share","-"],u),this.addMenuItems(l,
+["rename"],u),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(l,["upload"],u):(this.addMenuItems(l,["makeCopy"],u),null!=B&&B.constructor==OneDriveFile&&this.addMenuItems(l,["moveToFolder"],u))),l.addSeparator(u),this.addSubmenu("importFrom",l,u),this.addSubmenu("exportAs",l,u),l.addSeparator(u),this.addSubmenu("embed",l,u),this.addSubmenu("publish",l,u),l.addSeparator(u),this.addSubmenu("newLibrary",l,u),this.addSubmenu("openLibraryFrom",l,u),
+d.isRevisionHistorySupported()&&this.addMenuItems(l,["-","revisionHistory"],u),null!=B&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(J=null!=B.getTitle()?B.getTitle():d.defaultFilename,(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(J)&&!/(\.svg)$/i.test(J))&&this.addMenuItems(l,["-","properties"])),this.addMenuItems(l,["-","pageSetup"],u),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(l,["print"],u),this.addMenuItems(l,["-","close"])})));k.prototype.execute=
+function(){var l=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 u=l.extFonts,B=0;null!=u&&B<u.length;B++){var J=document.getElementById("extFont_"+u[B].name);null!=J&&J.parentNode.removeChild(J)}l.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=u};this.put("fontFamily",new Menu(mxUtils.bind(this,function(l,u){for(var B=mxUtils.bind(this,function(m,z,L,Q,N){var T=d.editor.graph;Q=this.styleChange(l,Q||m,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[m,null!=z?encodeURIComponent(z):null,null]:[m],null,u,function(){"1"!=urlParams["ext-fonts"]?T.setFont(m,z):(document.execCommand("fontname",!1,m),T.addExtFont(m,
+z));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[m,null!=z?encodeURIComponent(z):null,null]:[m],"cells",[T.cellEditor.getEditingCell()]))},function(){T.updateLabelElements(T.getSelectionCells(),function(S){S.removeAttribute("face");S.style.fontFamily=null;"PRE"==S.nodeName&&T.replaceElement(S,"div")});"1"==urlParams["ext-fonts"]&&T.addExtFont(m,
+z)});L&&(L=document.createElement("span"),L.className="geSprite geSprite-delete",L.style.cursor="pointer",L.style.display="inline-block",Q.firstChild.nextSibling.nextSibling.appendChild(L),mxEvent.addListener(L,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(S){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[m.toLowerCase()];for(var W=0;W<this.customFonts.length;W++)if(this.customFonts[W].name==m&&this.customFonts[W].url==z){this.customFonts.splice(W,1);d.fireEvent(new mxEventObject("customFontsChanged"));
+break}}else{var Z=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=Z&&0<Z.length)for(W=0;W<Z.length;W++)if(Z[W].name==m){Z.splice(W,1);break}var ba=mxUtils.clone(this.customFonts);for(W=0;W<ba.length;W++)if(ba[W].name==m){ba.splice(W,1);break}W=new k(this.editorUi,Z,ba);this.editorUi.editor.graph.model.execute(W)}this.editorUi.hideCurrentMenu();mxEvent.consume(S)})));Graph.addFont(m,z);Q.firstChild.nextSibling.style.fontFamily=m;null!=N&&Q.setAttribute("title",N)}),J={},M=0;M<this.defaultFonts.length;M++){var F=
+this.defaultFonts[M];"string"===typeof F?B(F):null!=F.fontFamily&&null!=F.fontUrl&&(J[encodeURIComponent(F.fontFamily)+"@"+encodeURIComponent(F.fontUrl)]=!0,B(F.fontFamily,F.fontUrl))}l.addSeparator(u);if("1"!=urlParams["ext-fonts"]){F=function(m){var z=encodeURIComponent(m.name)+(null==m.url?"":"@"+encodeURIComponent(m.url));if(!J[z]){for(var L=m.name,Q=0;null!=P[L.toLowerCase()];)L=m.name+" ("+ ++Q+")";null==K[z]&&(R.push({name:m.name,url:m.url,label:L,title:m.url}),P[L.toLowerCase()]=m,K[z]=m)}};
+var K={},P={},R=[];for(M=0;M<this.customFonts.length;M++)F(this.customFonts[M]);for(var V in Graph.recentCustomFonts)F(Graph.recentCustomFonts[V]);R.sort(function(m,z){return m.label<z.label?-1:m.label>z.label?1:0});if(0<R.length){for(M=0;M<R.length;M++)B(R[M].name,R[M].url,!0,R[M].label,R[M].url);l.addSeparator(u)}l.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),u);l.addSeparator(u)}else{V=
+this.editorUi.editor.graph.extFonts;if(null!=V&&0<V.length){F={};var X=!1;for(M=0;M<this.customFonts.length;M++)F[this.customFonts[M].name]=!0;for(M=0;M<V.length;M++)F[V[M].name]||(this.customFonts.push(V[M]),X=!0);X&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(M=0;M<this.customFonts.length;M++)V=this.customFonts[M].name,F=this.customFonts[M].url,B(V,F,!0),this.editorUi.editor.graph.addExtFont(V,F,!0);l.addSeparator(u);
+l.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var m=new k(this.editorUi,[],[]);d.editor.graph.model.execute(m)}),u);l.addSeparator(u)}}l.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var m=this.editorUi.editor.graph,z=m.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],L="s",Q=null;if("1"!=urlParams["ext-fonts"]&&m.isEditing()){var N=m.getSelectedEditingElement();null!=N&&(N=mxUtils.getCurrentStyle(N),null!=N&&(z=Graph.stripQuotes(N.fontFamily),
+Q=Graph.getFontUrl(z,null),null!=Q&&(Graph.isGoogleFontUrl(Q)?(Q=null,L="g"):L="w")))}else N=m.getView().getState(m.getSelectionCell()),null!=N&&(z=N.style[mxConstants.STYLE_FONTFAMILY]||z,"1"!=urlParams["ext-fonts"]?(N=N.style.fontSource,null!=N&&(N=decodeURIComponent(N),Graph.isGoogleFontUrl(N)?L="g":(L="w",Q=N))):(L=N.style.FType||L,"w"==L&&(Q=this.editorUi.editor.graph.extFonts,N=null,null!=Q&&(N=Q.find(function(S){return S.name==z})),Q=null!=N?N.url:mxResources.get("urlNotFound",null,"URL not found"))));
+null!=Q&&Q.substring(0,PROXY_URL.length)==PROXY_URL&&(Q=decodeURIComponent(Q.substr((PROXY_URL+"?url=").length)));var T=null;document.activeElement==m.cellEditor.textarea&&(T=m.cellEditor.saveSelection());L=new FontDialog(this.editorUi,z,Q,L,mxUtils.bind(this,function(S,W,Z){null!=T&&(m.cellEditor.restoreSelection(T),T=null);if(null!=S&&0<S.length)if("1"!=urlParams["ext-fonts"]&&m.isEditing())m.setFont(S,W);else{m.getModel().beginUpdate();try{m.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(m.setCellStyles(mxConstants.STYLE_FONTFAMILY,
+S),m.setCellStyles("fontSource",null!=W?encodeURIComponent(W):null),m.setCellStyles("FType",null)):(m.setCellStyles(mxConstants.STYLE_FONTFAMILY,S),"s"!=Z&&(m.setCellStyles("FType",Z),0==W.indexOf("http://")&&(W=PROXY_URL+"?url="+encodeURIComponent(W)),this.editorUi.editor.graph.addExtFont(S,W)));Z=!0;for(var ba=0;ba<this.customFonts.length;ba++)if(this.customFonts[ba].name==S){Z=!1;break}Z&&(this.customFonts.push({name:S,url:W}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",
+this.customFonts)))}finally{m.getModel().endUpdate()}}}));this.editorUi.showDialog(L.container,380,Editor.enableWebFonts?250:180,!0,!0);L.init()}),u,null,!0)})))}})();function DiagramPage(b,g){this.node=b;null!=g?this.node.setAttribute("id",g):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,g,k){this.ui=b;this.page=g;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(b,g,k){this.ui=b;this.oldIndex=g;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(b,g,k){this.ui=b;this.previousPage=this.page=g;this.neverShown=!0;null!=g&&(this.neverShown=null==g.viewState,this.ui.updatePageRoot(g),null!=k&&(g.viewState=k,this.neverShown=!1))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var g=this.ui.editor,k=g.graph,d=Graph.compressNode(g.getGraphXml(!0));mxUtils.setTextContent(b.node,d);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
+k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);g.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());g.graph.fireEvent(new mxEventObject(mxEvent.ROOT));g.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(b,g,k,d,q){SelectPage.call(this,b,k);this.relatedPage=g;this.index=d;this.previousIndex=null;this.noSelect=q}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){f=k;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var k=0;k<f.length;k++)if(f[k].getId()==b)return f[k];return null};
-EditorUi.prototype.createImageForPageLink=function(b,f,k){var d=b.indexOf(","),t=null;0<d&&(d=this.getPageById(b.substring(d+1)),null!=d&&d!=f&&(t=this.getImageForPage(d,f,k),t.originalSrc=b));null==t&&(t={originalSrc:b});return t};
-EditorUi.prototype.getImageForPage=function(b,f,k){k=null!=k?k:this.editor.graph;var d=k.getGlobalVariable,t=this.createTemporaryGraph(k.getStylesheet());t.defaultPageBackgroundColor=k.defaultPageBackgroundColor;t.shapeBackgroundColor=k.shapeBackgroundColor;t.shapeForegroundColor=k.shapeForegroundColor;var x=this.getPageIndex(null!=f?f:this.currentPage);t.getGlobalVariable=function(G){return"pagenumber"==G?x+1:"page"==G&&null!=f?f.getName():d.apply(this,arguments)};document.body.appendChild(t.container);
-this.updatePageRoot(b);t.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=t.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var C=t.getGraphBounds();document.body.removeChild(t.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),C.width,C.height,C.x,C.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var t=
-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";t!=this.tabContainer.style.height&&this.refresh(!1)}f.apply(b.view,arguments)});var k=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var t=this.currentPage;null!=t&&t!=k&&(null==t.viewState||null==t.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
-(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+t.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+t.viewState.scrollTop),k=t);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,
-x){t=x.getProperty("edit").changes;for(x=0;x<t.length;x++)if(t[x]instanceof SelectPage||t[x]instanceof RenamePage||t[x]instanceof MovePage||t[x]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(b,f,k){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(d.setViewState(f),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+f.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+f.scrollTop,d.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),t=parseFloat(b.getAttribute("pageHeight")),x=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),G=b.getAttribute("extFonts");if(G)try{G=G.split("|").map(function(H){H=H.split("^");return{name:H[0],url:H[1]}})}catch(H){console.log("ExtFonts format error: "+H.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=x&&0<x.length?x:null,backgroundImage:C,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(d)||isNaN(t)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,d,t),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:G||[]}};
-Graph.prototype.saveViewState=function(b,f,k,d){k||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),f.setAttribute("fold",
-null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(f.setAttribute("pageWidth",k.width),f.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,d),null!=d&&f.setAttribute("backgroundImage",
-JSON.stringify(d)));f.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");f.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&f.setAttribute("extFonts",b.extFonts.map(function(t){return t.name+"^"+t.url}).join("|"))};
+EditorUi.prototype.getPageIndex=function(b){var g=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){g=k;break}return g};EditorUi.prototype.getPageById=function(b,g){g=null!=g?g:this.pages;if(null!=g)for(var k=0;k<g.length;k++)if(g[k].getId()==b)return g[k];return null};
+EditorUi.prototype.createImageForPageLink=function(b,g,k){var d=b.indexOf(","),q=null;0<d&&(d=this.getPageById(b.substring(d+1)),null!=d&&d!=g&&(q=this.getImageForPage(d,g,k),q.originalSrc=b));null==q&&(q={originalSrc:b});return q};
+EditorUi.prototype.getImageForPage=function(b,g,k){k=null!=k?k:this.editor.graph;var d=k.getGlobalVariable,q=this.createTemporaryGraph(k.getStylesheet());q.defaultPageBackgroundColor=k.defaultPageBackgroundColor;q.shapeBackgroundColor=k.shapeBackgroundColor;q.shapeForegroundColor=k.shapeForegroundColor;var x=this.getPageIndex(null!=g?g:this.currentPage);q.getGlobalVariable=function(G){return"pagenumber"==G?x+1:"page"==G&&null!=g?g.getName():d.apply(this,arguments)};document.body.appendChild(q.container);
+this.updatePageRoot(b);q.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=q.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var C=q.getGraphBounds();document.body.removeChild(q.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),C.width,C.height,C.x,C.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,g=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var q=
+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";q!=this.tabContainer.style.height&&this.refresh(!1)}g.apply(b.view,arguments)});var k=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var q=this.currentPage;null!=q&&q!=k&&(null==q.viewState||null==q.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+q.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+q.viewState.scrollTop),k=q);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(q,
+x){q=x.getProperty("edit").changes;for(x=0;x<q.length;x++)if(q[x]instanceof SelectPage||q[x]instanceof RenamePage||q[x]instanceof MovePage||q[x]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(b,g,k){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,g):(d.setViewState(g),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+g.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+g.scrollTop,d.restoreSelection(k))};
+Graph.prototype.createViewState=function(b){var g=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),q=parseFloat(b.getAttribute("pageHeight")),x=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),G=b.getAttribute("extFonts");if(G)try{G=G.split("|").map(function(H){H=H.split("^");return{name:H[0],url:H[1]}})}catch(H){console.log("ExtFonts format error: "+H.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=g?"0"!=g:this.defaultPageVisible,background:null!=x&&0<x.length?x:null,backgroundImage:C,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(d)||isNaN(q)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,d,q),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:G||[]}};
+Graph.prototype.saveViewState=function(b,g,k,d){k||(g.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),g.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),g.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),g.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),g.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),g.setAttribute("connect",null==b||b.connect?"1":"0"),g.setAttribute("arrows",null==b||b.arrows?"1":"0"),g.setAttribute("fold",
+null==b||b.foldingEnabled?"1":"0"));g.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(g.setAttribute("pageWidth",k.width),g.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&g.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,d),null!=d&&g.setAttribute("backgroundImage",
+JSON.stringify(d)));g.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");g.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&g.setAttribute("extFonts",b.extFonts.map(function(q){return q.name+"^"+q.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
-Graph.prototype.setViewState=function(b,f){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(f&&null!=k)for(f=0;f<k.length;f++){var d=document.getElementById("extFont_"+k[f].name);null!=d&&d.parentNode.removeChild(d)}for(f=0;f<this.extFonts.length;f++)this.addExtFont(this.extFonts[f].name,this.extFonts[f].url,
+Graph.prototype.setViewState=function(b,g){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(g&&null!=k)for(g=0;g<k.length;g++){var d=document.getElementById("extFont_"+k[g].name);null!=d&&d.parentNode.removeChild(d)}for(g=0;g<this.extFonts.length;g++)this.addExtFont(this.extFonts[g].name,this.extFonts[g].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled=
!0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,f,k){if(b&&f){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:f});var d="extFont_"+b;if(null==document.getElementById(d))if(0==f.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",f,null,d);else{document.getElementsByTagName("head");var t=document.createElement("style");t.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+f+'");\n}'));t.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(t)}if(!k){null==
-this.extFonts&&(this.extFonts=[]);k=this.extFonts;d=!0;for(t=0;t<k.length;t++)if(k[t].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:f})}}};
-EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var k=Editor.extractParserError(f);if(k)throw Error(k);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),k=new mxCodec(f.ownerDocument),b.root=k.decode(f).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(f))throw Error(k);null!=f&&(b.graphModelNode=
-f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,f,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f=null!=f?f:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var t=new SelectPage(this,b,k);t.execute();d.add(t);d.notify();this.editor.graph.tooltipHandler.hide();f||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(x){this.handleError(x)}};
-EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&null!=this.pages&&(f=mxUtils.indexOf(this.pages,f),b?this.selectPage(this.pages[mxUtils.mod(f+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(f-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,f){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,f){f=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var k=this.pages[f].getName();null!=k&&0<k.length&&(b[k]=k)}f=this.pages.length;do k=mxResources.get("pageWithNumber",[++f]);while(null!=b[k]);return k};
-EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,d=this.pages[k]):1>=this.pages.length&&(d=this.insertPage(),f.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,d))}finally{f.model.endUpdate()}}}catch(t){this.handleError(t)}return b};
-EditorUi.prototype.duplicatePage=function(b,f){var k=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var t=b.node.cloneNode(!1);t.removeAttribute("id");var x={},C=d.createCellLookup([d.model.root]);k=new DiagramPage(t);k.root=d.cloneCell(d.model.root,null,x);var G=new mxGraphModel;G.prefix=Editor.guid()+"-";G.setRoot(k.root);d.updateCustomLinks(d.createCellMapping(x,C),[k.root]);k.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(k);
-k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(f);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(H){this.handleError(H)}return k};EditorUi.prototype.initDiagramNode=function(b){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,f);mxUtils.setTextContent(b.node,Graph.compressNode(f))};
-EditorUi.prototype.clonePages=function(b){for(var f=[],k=0;k<b.length;k++)f.push(this.clonePage(b[k]));return f};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);return f};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
+Graph.prototype.addExtFont=function(b,g,k){if(b&&g){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:g});var d="extFont_"+b;if(null==document.getElementById(d))if(0==g.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",g,null,d);else{document.getElementsByTagName("head");var q=document.createElement("style");q.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+g+'");\n}'));q.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(q)}if(!k){null==
+this.extFonts&&(this.extFonts=[]);k=this.extFonts;d=!0;for(q=0;q<k.length;q++)if(k[q].name==b){d=!1;break}d&&this.extFonts.push({name:b,url:g})}}};
+EditorUi.prototype.updatePageRoot=function(b,g){if(null==b.root){g=this.editor.extractGraphModel(b.node,null,g);var k=Editor.extractParserError(g);if(k)throw Error(k);null!=g?(b.graphModelNode=g,b.viewState=this.editor.graph.createViewState(g),k=new mxCodec(g.ownerDocument),b.root=k.decode(g).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){g=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(g))throw Error(k);null!=g&&(b.graphModelNode=
+g)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
+EditorUi.prototype.selectPage=function(b,g,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);g=null!=g?g:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var q=new SelectPage(this,b,k);q.execute();d.add(q);d.notify();this.editor.graph.tooltipHandler.hide();g||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(x){this.handleError(x)}};
+EditorUi.prototype.selectNextPage=function(b){var g=this.currentPage;null!=g&&null!=this.pages&&(g=mxUtils.indexOf(this.pages,g),b?this.selectPage(this.pages[mxUtils.mod(g+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(g-1,this.pages.length)]))};
+EditorUi.prototype.insertPage=function(b,g){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),g=null!=g?g:this.pages.length,g=new ChangePage(this,b,b,g),this.editor.graph.model.execute(g));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,g){g=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),g);g.setName(null!=b?b:this.createPageName());this.initDiagramNode(g);return g};EditorUi.prototype.createPageName=function(){for(var b={},g=0;g<this.pages.length;g++){var k=this.pages[g].getName();null!=k&&0<k.length&&(b[k]=k)}g=this.pages.length;do k=mxResources.get("pageWithNumber",[++g]);while(null!=b[k]);return k};
+EditorUi.prototype.removePage=function(b){try{var g=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(g.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);g.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,d=this.pages[k]):1>=this.pages.length&&(d=this.insertPage(),g.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));g.model.execute(new ChangePage(this,b,d))}finally{g.model.endUpdate()}}}catch(q){this.handleError(q)}return b};
+EditorUi.prototype.duplicatePage=function(b,g){var k=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var q=b.node.cloneNode(!1);q.removeAttribute("id");var x={},C=d.createCellLookup([d.model.root]);k=new DiagramPage(q);k.root=d.cloneCell(d.model.root,null,x);var G=new mxGraphModel;G.prefix=Editor.guid()+"-";G.setRoot(k.root);d.updateCustomLinks(d.createCellMapping(x,C),[k.root]);k.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(k);
+k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(g);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(H){this.handleError(H)}return k};EditorUi.prototype.initDiagramNode=function(b){var g=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,g);mxUtils.setTextContent(b.node,Graph.compressNode(g))};
+EditorUi.prototype.clonePages=function(b){for(var g=[],k=0;k<b.length;k++)g.push(this.clonePage(b[k]));return g};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var g=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;g.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);g.root=this.editor.graph.model.cloneCell(b.root,null,!0);return g};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var g=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(g.container,300,80,!0,!0);g.init()}return b};EditorUi.prototype.movePage=function(b,g){this.editor.graph.model.execute(new MovePage(this,b,g))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,f=document.createElement("div");f.style.position="relative";f.style.display="inline-block";f.style.verticalAlign="top";f.style.height=this.tabContainer.style.height;f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.fontSize="13px";f.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),t=null,x=0;x<this.pages.length;x++)mxUtils.bind(this,function(I,F){this.pages[I]==this.currentPage?(F.className="geActivePage",F.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):F.className="geInactivePage";F.setAttribute("draggable","true");mxEvent.addListener(F,"dragstart",mxUtils.bind(this,function(O){b.isEnabled()?(mxClient.IS_FF&&O.dataTransfer.setData("Text","<diagram/>"),t=I):mxEvent.consume(O)}));mxEvent.addListener(F,"dragend",mxUtils.bind(this,function(O){t=null;O.stopPropagation();
-O.preventDefault()}));mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(O){null!=t&&(O.dataTransfer.dropEffect="move");O.stopPropagation();O.preventDefault()}));mxEvent.addListener(F,"drop",mxUtils.bind(this,function(O){null!=t&&I!=t&&this.movePage(t,I);O.stopPropagation();O.preventDefault()}));f.appendChild(F)})(x,this.createTabForPage(this.pages[x],d,this.pages[x]!=this.currentPage,x+1));this.tabContainer.innerText="";this.tabContainer.appendChild(f);d=this.createPageMenuTab();this.tabContainer.appendChild(d);
-d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(f.clientWidth>this.tabContainer.clientWidth-k){null!=d&&(d.style.position="absolute",d.style.right="0px",f.style.marginRight="30px");var C=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");C.style.position="absolute";C.style.right=this.editor.chromeless?"29px":"55px";C.style.fontSize="13pt";this.tabContainer.appendChild(C);var G=this.createControlTab(4,"&nbsp;&#10095;");G.style.position="absolute";
-G.style.right=this.editor.chromeless?"0px":"29px";G.style.fontSize="13pt";this.tabContainer.appendChild(G);var H=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));f.style.width=H+"px";mxEvent.addListener(C,"click",mxUtils.bind(this,function(I){f.scrollLeft-=Math.max(20,H-20);mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(G,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(I)}));mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(G,
-f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.addListener(G,"click",mxUtils.bind(this,function(I){f.scrollLeft+=Math.max(20,H-20);mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(G,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(I)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(b){var f=document.createElement("div");f.style.display="inline-block";f.style.whiteSpace="nowrap";f.style.boxSizing="border-box";f.style.position="relative";f.style.overflow="hidden";f.style.textAlign="center";f.style.marginLeft="-1px";f.style.height=this.tabContainer.clientHeight+"px";f.style.padding="12px 4px 8px 4px";f.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";f.style.borderTopStyle="none";f.style.borderBottomStyle="none";f.style.backgroundColor=
-this.tabContainer.style.backgroundColor;f.style.cursor="move";f.style.color="gray";b&&(mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(f.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(k){f.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return f};
-EditorUi.prototype.createControlTab=function(b,f,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=f;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
-EditorUi.prototype.createPageMenuTab=function(b,f){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu();
-var t=new mxPopupMenu(mxUtils.bind(this,function(G,H){var I=mxUtils.bind(this,function(){for(var e=0;e<this.pages.length;e++)mxUtils.bind(this,function(g){var n=G.addItem(this.getShortPageName(this.pages[g]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[g])}),H),p=this.pages[g].getId();n.setAttribute("title",this.pages[g].getName()+" ("+(g+1)+"/"+this.pages.length+")"+(null!=p?" ["+p+"]":""));this.pages[g]==this.currentPage&&G.addCheckmark(n,Editor.checkmarkImage)})(e)}),F=mxUtils.bind(this,
-function(){G.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),H)});f||I();if(this.editor.graph.isEnabled()){f||(G.addSeparator(H),F());var O=this.currentPage;if(null!=O){G.addSeparator(H);var c=this.getShortPageName(O);G.addItem(mxResources.get("removeIt",[c]),null,mxUtils.bind(this,function(){this.removePage(O)}),H);G.addItem(mxResources.get("renameIt",[c]),null,mxUtils.bind(this,function(){this.renamePage(O,O.getName())}),H);f||G.addSeparator(H);G.addItem(mxResources.get("duplicateIt",
-[c]),null,mxUtils.bind(this,function(){this.duplicatePage(O,mxResources.get("copyOf",[O.getName()]))}),H)}}f&&(G.addSeparator(H),F(),G.addSeparator(H),I())}));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);t.destroy()});var x=mxEvent.getClientX(d),C=mxEvent.getClientY(d);t.popup(x,C,null,d);this.setCurrentMenu(t);mxEvent.consume(d)}));return b};
-EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.width="21px";f.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,f,k,d){k=this.createTab(k);var t=b.getName()||mxResources.get("untitled"),x=b.getId();k.setAttribute("title",t+(null!=x?" ("+x+")":"")+" ["+d+"]");mxUtils.write(k,t);k.style.maxWidth=f+"px";k.style.width=f+"px";this.addTabListeners(b,k);42<f&&(k.style.textOverflow="ellipsis");return k};
-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var k=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(x){this.renamePage(b);mxEvent.consume(x)}));var d=!1,t=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(x){d=null!=this.currentMenu;t=b==this.currentPage;k.isMouseDown||t||this.selectPage(b)}),null,mxUtils.bind(this,function(x){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(x)&&t||mxEvent.isPopupTrigger(x))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(x)||!d){var C=new mxPopupMenu(this.createPageMenu(b));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);this.resetCurrentMenu();C.destroy()});var G=mxEvent.getClientX(x),H=mxEvent.getClientY(x);C.popup(G,H,null,x);this.setCurrentMenu(C,f)}mxEvent.consume(x)}}))};
-EditorUi.prototype.getLinkForPage=function(b,f,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=this.getCurrentFile();if(null!=d&&d.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var t=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));t+=(0==t.length?"?":"&")+"page-id="+b.getId();null!=f&&(t+="&"+f.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+t+"#"+d.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(k,d){var t=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),d);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,f)}),d);null!=this.getLinkForPage(b)&&(k.addSeparator(d),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(x,C,G,H,I,F){x=this.createUrlParameters(x,C,G,H,I,F);G||x.push("hide-pages=1");t.isSelectionEmpty()||(G=t.getBoundingBox(t.getSelectionCells()),C=t.view.translate,I=t.view.scale,G.width/=I,G.height/=I,G.x=G.x/I-C.x,G.y=G.y/I-C.y,x.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(G.x),y:Math.round(G.y),width:Math.round(G.width),height:Math.round(G.height),border:100}))));
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,g=document.createElement("div");g.style.position="relative";g.style.display="inline-block";g.style.verticalAlign="top";g.style.height=this.tabContainer.style.height;g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.fontSize="13px";g.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
+1),q=null,x=0;x<this.pages.length;x++)mxUtils.bind(this,function(I,E){this.pages[I]==this.currentPage?(E.className="geActivePage",E.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):E.className="geInactivePage";E.setAttribute("draggable","true");mxEvent.addListener(E,"dragstart",mxUtils.bind(this,function(O){b.isEnabled()?(mxClient.IS_FF&&O.dataTransfer.setData("Text","<diagram/>"),q=I):mxEvent.consume(O)}));mxEvent.addListener(E,"dragend",mxUtils.bind(this,function(O){q=null;O.stopPropagation();
+O.preventDefault()}));mxEvent.addListener(E,"dragover",mxUtils.bind(this,function(O){null!=q&&(O.dataTransfer.dropEffect="move");O.stopPropagation();O.preventDefault()}));mxEvent.addListener(E,"drop",mxUtils.bind(this,function(O){null!=q&&I!=q&&this.movePage(q,I);O.stopPropagation();O.preventDefault()}));g.appendChild(E)})(x,this.createTabForPage(this.pages[x],d,this.pages[x]!=this.currentPage,x+1));this.tabContainer.innerText="";this.tabContainer.appendChild(g);d=this.createPageMenuTab();this.tabContainer.appendChild(d);
+d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(g.clientWidth>this.tabContainer.clientWidth-k){null!=d&&(d.style.position="absolute",d.style.right="0px",g.style.marginRight="30px");var C=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");C.style.position="absolute";C.style.right=this.editor.chromeless?"29px":"55px";C.style.fontSize="13pt";this.tabContainer.appendChild(C);var G=this.createControlTab(4,"&nbsp;&#10095;");G.style.position="absolute";
+G.style.right=this.editor.chromeless?"0px":"29px";G.style.fontSize="13pt";this.tabContainer.appendChild(G);var H=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));g.style.width=H+"px";mxEvent.addListener(C,"click",mxUtils.bind(this,function(I){g.scrollLeft-=Math.max(20,H-20);mxUtils.setOpacity(C,0<g.scrollLeft?100:50);mxUtils.setOpacity(G,g.scrollLeft<g.scrollWidth-g.clientWidth?100:50);mxEvent.consume(I)}));mxUtils.setOpacity(C,0<g.scrollLeft?100:50);mxUtils.setOpacity(G,
+g.scrollLeft<g.scrollWidth-g.clientWidth?100:50);mxEvent.addListener(G,"click",mxUtils.bind(this,function(I){g.scrollLeft+=Math.max(20,H-20);mxUtils.setOpacity(C,0<g.scrollLeft?100:50);mxUtils.setOpacity(G,g.scrollLeft<g.scrollWidth-g.clientWidth?100:50);mxEvent.consume(I)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.createTab=function(b){var g=document.createElement("div");g.style.display="inline-block";g.style.whiteSpace="nowrap";g.style.boxSizing="border-box";g.style.position="relative";g.style.overflow="hidden";g.style.textAlign="center";g.style.marginLeft="-1px";g.style.height=this.tabContainer.clientHeight+"px";g.style.padding="12px 4px 8px 4px";g.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";g.style.borderTopStyle="none";g.style.borderBottomStyle="none";g.style.backgroundColor=
+this.tabContainer.style.backgroundColor;g.style.cursor="move";g.style.color="gray";b&&(mxEvent.addListener(g,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(g.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(k){g.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return g};
+EditorUi.prototype.createControlTab=function(b,g,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=g;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
+EditorUi.prototype.createPageMenuTab=function(b,g){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu();
+var q=new mxPopupMenu(mxUtils.bind(this,function(G,H){var I=mxUtils.bind(this,function(){for(var e=0;e<this.pages.length;e++)mxUtils.bind(this,function(f){var n=G.addItem(this.getShortPageName(this.pages[f]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[f])}),H),p=this.pages[f].getId();n.setAttribute("title",this.pages[f].getName()+" ("+(f+1)+"/"+this.pages.length+")"+(null!=p?" ["+p+"]":""));this.pages[f]==this.currentPage&&G.addCheckmark(n,Editor.checkmarkImage)})(e)}),E=mxUtils.bind(this,
+function(){G.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),H)});g||I();if(this.editor.graph.isEnabled()){g||(G.addSeparator(H),E());var O=this.currentPage;if(null!=O){G.addSeparator(H);var c=this.getShortPageName(O);G.addItem(mxResources.get("removeIt",[c]),null,mxUtils.bind(this,function(){this.removePage(O)}),H);G.addItem(mxResources.get("renameIt",[c]),null,mxUtils.bind(this,function(){this.renamePage(O,O.getName())}),H);g||G.addSeparator(H);G.addItem(mxResources.get("duplicateIt",
+[c]),null,mxUtils.bind(this,function(){this.duplicatePage(O,mxResources.get("copyOf",[O.getName()]))}),H)}}g&&(G.addSeparator(H),E(),G.addSeparator(H),I())}));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);q.destroy()});var x=mxEvent.getClientX(d),C=mxEvent.getClientY(d);q.popup(x,C,null,d);this.setCurrentMenu(q);mxEvent.consume(d)}));return b};
+EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var g=b.getElementsByTagName("div")[0];g.style.display="inline-block";g.style.width="21px";g.style.height="21px";return b};
+EditorUi.prototype.createTabForPage=function(b,g,k,d){k=this.createTab(k);var q=b.getName()||mxResources.get("untitled"),x=b.getId();k.setAttribute("title",q+(null!=x?" ("+x+")":"")+" ["+d+"]");mxUtils.write(k,q);k.style.maxWidth=g+"px";k.style.width=g+"px";this.addTabListeners(b,k);42<g&&(k.style.textOverflow="ellipsis");return k};
+EditorUi.prototype.addTabListeners=function(b,g){mxEvent.disableContextMenu(g);var k=this.editor.graph;mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(x){this.renamePage(b);mxEvent.consume(x)}));var d=!1,q=!1;mxEvent.addGestureListeners(g,mxUtils.bind(this,function(x){d=null!=this.currentMenu;q=b==this.currentPage;k.isMouseDown||q||this.selectPage(b)}),null,mxUtils.bind(this,function(x){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(x)&&q||mxEvent.isPopupTrigger(x))){k.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(x)||!d){var C=new mxPopupMenu(this.createPageMenu(b));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);this.resetCurrentMenu();C.destroy()});var G=mxEvent.getClientX(x),H=mxEvent.getClientY(x);C.popup(G,H,null,x);this.setCurrentMenu(C,g)}mxEvent.consume(x)}}))};
+EditorUi.prototype.getLinkForPage=function(b,g,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=this.getCurrentFile();if(null!=d&&d.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var q=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));q+=(0==q.length?"?":"&")+"page-id="+b.getId();null!=g&&(q+="&"+g.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+q+"#"+d.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,g){return mxUtils.bind(this,function(k,d){var q=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),d);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,g)}),d);null!=this.getLinkForPage(b)&&(k.addSeparator(d),k.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(x,C,G,H,I,E){x=this.createUrlParameters(x,C,G,H,I,E);G||x.push("hide-pages=1");q.isSelectionEmpty()||(G=q.getBoundingBox(q.getSelectionCells()),C=q.view.translate,I=q.view.scale,G.width/=I,G.height/=I,G.x=G.x/I-C.x,G.y=G.y/I-C.y,x.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(G.x),y:Math.round(G.y),width:Math.round(G.width),height:Math.round(G.height),border:100}))));
H=new EmbedDialog(this,this.getLinkForPage(b,x,H));this.showDialog(H.container,450,240,!0,!0);H.init()}))})));k.addSeparator(d);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(d),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),d))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){f=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=f;return d};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(f,k,d){d.ui=f.ui;return k};b.afterDecode=function(f,k,d){f=d.previous;d.previous=d.name;d.name=f;return d};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(f,k,d){d.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(d.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(t,x){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,t)?x:void 0})),null!=k.relatedPage.root&&f.encodeCell(k.relatedPage.root,
-d));return d};b.beforeDecode=function(f,k,d){d.ui=f.ui;d.relatedPage=d.ui.getPageById(k.getAttribute("relatedPage"));if(null==d.relatedPage){var t=k.ownerDocument.createElement("diagram");t.setAttribute("id",k.getAttribute("relatedPage"));t.setAttribute("name",k.getAttribute("name"));d.relatedPage=new DiagramPage(t);t=k.getAttribute("viewState");null!=t&&(d.relatedPage.viewState=JSON.parse(t),k.removeAttribute("viewState"));k=k.cloneNode(!0);t=k.firstChild;if(null!=t)for(d.relatedPage.root=f.decodeCell(t,
-!1),d=t.nextSibling,t.parentNode.removeChild(t),t=d;null!=t;){d=t.nextSibling;if(t.nodeType==mxConstants.NODETYPE_ELEMENT){var x=t.getAttribute("id");null==f.lookup(x)&&f.decodeCell(t)}t.parentNode.removeChild(t);t=d}}return k};b.afterDecode=function(f,k,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,t,x,C,G){t=null!=t?t:!1;null==x&&(x=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var H=x.slice(),I=0;I<x.length;I++)"1"==mxUtils.getValue(this.getCurrentCellStyle(x[I]),"treeFolding","0")&&this.foldTreeCell(d,x[I]);x=H;x=b.apply(this,arguments)}finally{this.model.endUpdate()}return x};Graph.prototype.foldTreeCell=
-function(d,t){this.model.beginUpdate();try{var x=[];this.traverse(t,!0,mxUtils.bind(this,function(G,H){var I=null!=H&&this.isTreeEdge(H);I&&x.push(H);G==t||null!=H&&!I||x.push(G);return(null==H||I)&&(G==t||!this.model.isCollapsed(G))}));this.model.setCollapsed(t,d);for(var C=0;C<x.length;C++)this.model.setVisible(x[C],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,t,x,C,G,H){return this.model.filterCells(this.getEdges(d,
-t,x,C,G,H),mxUtils.bind(this,function(I){return this.isTreeEdge(I)}))};Graph.prototype.getIncomingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(E){return n.isVertex(E)&&x(E)}function t(E){var K=
-!1;null!=E&&(K="1"==g.getCurrentCellStyle(E).treeMoving);return K}function x(E){var K=!1;null!=E&&(E=n.getParent(E),K=g.view.getState(E),K="tree"==(null!=K?K.style:g.getCellStyle(E)).containerType);return K}function C(E){var K=!1;null!=E&&(E=n.getParent(E),K=g.view.getState(E),g.view.getState(E),K=null!=(null!=K?K.style:g.getCellStyle(E)).childLayout);return K}function G(E){E=g.view.getState(E);if(null!=E){var K=g.getIncomingTreeEdges(E.cell);if(0<K.length&&(K=g.view.getState(K[0]),null!=K&&(K=K.absolutePoints,
-null!=K&&0<K.length&&(K=K[K.length-1],null!=K)))){if(K.y==E.y&&Math.abs(K.x-E.getCenterX())<E.width/2)return mxConstants.DIRECTION_SOUTH;if(K.y==E.y+E.height&&Math.abs(K.x-E.getCenterX())<E.width/2)return mxConstants.DIRECTION_NORTH;if(K.x>E.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function H(E,K){K=null!=K?K:!0;g.model.beginUpdate();try{var P=g.model.getParent(E),R=g.getIncomingTreeEdges(E),V=g.cloneCells([R[0],E]);g.model.setTerminal(V[0],g.model.getTerminal(R[0],
-!0),!0);var X=G(E),m=P.geometry;X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=K?E.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=K?E.geometry.height+10:-V[1].geometry.height-10;g.view.currentRoot!=P&&(V[1].geometry.x-=m.x,V[1].geometry.y-=m.y);var z=g.view.getState(E),L=g.view.scale;if(null!=z){var Q=mxRectangle.fromRectangle(z);X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH?Q.x+=(K?E.geometry.width+10:-V[1].geometry.width-10)*L:Q.y+=(K?
-E.geometry.height+10:-V[1].geometry.height-10)*L;var N=g.getOutgoingTreeEdges(g.model.getTerminal(R[0],!0));if(null!=N){for(var T=X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH,S=m=R=0;S<N.length;S++){var W=g.model.getTerminal(N[S],!1);if(X==G(W)){var Z=g.view.getState(W);W!=E&&null!=Z&&(T&&K!=Z.getCenterX()<z.getCenterX()||!T&&K!=Z.getCenterY()<z.getCenterY())&&mxUtils.intersects(Q,Z)&&(R=10+Math.max(R,(Math.min(Q.x+Q.width,Z.x+Z.width)-Math.max(Q.x,Z.x))/L),m=10+Math.max(m,(Math.min(Q.y+
-Q.height,Z.y+Z.height)-Math.max(Q.y,Z.y))/L))}}T?m=0:R=0;for(S=0;S<N.length;S++)if(W=g.model.getTerminal(N[S],!1),X==G(W)&&(Z=g.view.getState(W),W!=E&&null!=Z&&(T&&K!=Z.getCenterX()<z.getCenterX()||!T&&K!=Z.getCenterY()<z.getCenterY()))){var ba=[];g.traverse(Z.cell,!0,function(aa,fa){var Y=null!=fa&&g.isTreeEdge(fa);Y&&ba.push(fa);(null==fa||Y)&&ba.push(aa);return null==fa||Y});g.moveCells(ba,(K?1:-1)*R,(K?1:-1)*m)}}}return g.addCells(V,P)}finally{g.model.endUpdate()}}function I(E){g.model.beginUpdate();
-try{var K=G(E),P=g.getIncomingTreeEdges(E),R=g.cloneCells([P[0],E]);g.model.setTerminal(P[0],R[1],!1);g.model.setTerminal(R[0],R[1],!0);g.model.setTerminal(R[0],E,!1);var V=g.model.getParent(E),X=V.geometry,m=[];g.view.currentRoot!=V&&(R[1].geometry.x-=X.x,R[1].geometry.y-=X.y);g.traverse(E,!0,function(Q,N){var T=null!=N&&g.isTreeEdge(N);T&&m.push(N);(null==N||T)&&m.push(Q);return null==N||T});var z=E.geometry.width+40,L=E.geometry.height+40;K==mxConstants.DIRECTION_SOUTH?z=0:K==mxConstants.DIRECTION_NORTH?
-(z=0,L=-L):K==mxConstants.DIRECTION_WEST?(z=-z,L=0):K==mxConstants.DIRECTION_EAST&&(L=0);g.moveCells(m,z,L);return g.addCells(R,V)}finally{g.model.endUpdate()}}function F(E,K){g.model.beginUpdate();try{var P=g.model.getParent(E),R=g.getIncomingTreeEdges(E),V=G(E);0==R.length&&(R=[g.createEdge(P,null,"",null,null,g.createCurrentEdgeStyle())],V=K);var X=g.cloneCells([R[0],E]);g.model.setTerminal(X[0],E,!0);if(null==g.model.getTerminal(X[0],!1)){g.model.setTerminal(X[0],X[1],!1);var m=g.getCellStyle(X[1]).newEdgeStyle;
-if(null!=m)try{var z=JSON.parse(m),L;for(L in z)g.setCellStyles(L,z[L],[X[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==z[L]&&g.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[X[0]])}catch(Z){}}R=g.getOutgoingTreeEdges(E);var Q=P.geometry;K=[];g.view.currentRoot==P&&(Q=new mxRectangle);for(m=0;m<R.length;m++){var N=g.model.getTerminal(R[m],!1);null!=N&&K.push(N)}var T=g.view.getBounds(K),S=g.view.translate,W=g.view.scale;V==mxConstants.DIRECTION_SOUTH?
-(X[1].geometry.x=null==T?E.geometry.x+(E.geometry.width-X[1].geometry.width)/2:(T.x+T.width)/W-S.x-Q.x+10,X[1].geometry.y+=X[1].geometry.height-Q.y+40):V==mxConstants.DIRECTION_NORTH?(X[1].geometry.x=null==T?E.geometry.x+(E.geometry.width-X[1].geometry.width)/2:(T.x+T.width)/W-S.x+-Q.x+10,X[1].geometry.y-=X[1].geometry.height+Q.y+40):(X[1].geometry.x=V==mxConstants.DIRECTION_WEST?X[1].geometry.x-(X[1].geometry.width+Q.x+40):X[1].geometry.x+(X[1].geometry.width-Q.x+40),X[1].geometry.y=null==T?E.geometry.y+
-(E.geometry.height-X[1].geometry.height)/2:(T.y+T.height)/W-S.y+-Q.y+10);return g.addCells(X,P)}finally{g.model.endUpdate()}}function O(E,K,P){E=g.getOutgoingTreeEdges(E);P=g.view.getState(P);var R=[];if(null!=P&&null!=E){for(var V=0;V<E.length;V++){var X=g.view.getState(g.model.getTerminal(E[V],!1));null!=X&&(!K&&Math.min(X.x+X.width,P.x+P.width)>=Math.max(X.x,P.x)||K&&Math.min(X.y+X.height,P.y+P.height)>=Math.max(X.y,P.y))&&R.push(X)}R.sort(function(m,z){return K?m.x+m.width-z.x-z.width:m.y+m.height-
-z.y-z.height})}return R}function c(E,K){var P=G(E),R=K==mxConstants.DIRECTION_EAST||K==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==R&&P!=K?e.actions.get("selectParent").funct():P==K?(K=g.getOutgoingTreeEdges(E),null!=K&&0<K.length&&g.setSelectionCell(g.model.getTerminal(K[0],!1))):(P=g.getIncomingTreeEdges(E),null!=P&&0<P.length&&(R=O(g.model.getTerminal(P[0],!0),R,E),E=g.view.getState(E),null!=E&&(E=mxUtils.indexOf(R,E),0<=E&&(E+=K==mxConstants.DIRECTION_NORTH||
-K==mxConstants.DIRECTION_WEST?-1:1,0<=E&&E<=R.length-1&&g.setSelectionCell(R[E].cell)))))}var e=this,g=e.editor.graph,n=g.getModel(),p=e.menus.createPopupMenu;e.menus.createPopupMenu=function(E,K,P){p.apply(this,arguments);if(1==g.getSelectionCount()){K=g.getSelectionCell();var R=g.getOutgoingTreeEdges(K);E.addSeparator();0<R.length&&(d(g.getSelectionCell())&&this.addMenuItems(E,["selectChildren"],null,P),this.addMenuItems(E,["selectDescendants"],null,P));d(g.getSelectionCell())?(E.addSeparator(),
-0<g.getIncomingTreeEdges(K).length&&this.addMenuItems(E,["selectSiblings","selectParent"],null,P)):0<g.model.getEdgeCount(K)&&this.addMenuItems(E,["selectConnections"],null,P)}};e.actions.addAction("selectChildren",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var E=g.getSelectionCell();E=g.getOutgoingTreeEdges(E);if(null!=E){for(var K=[],P=0;P<E.length;P++)K.push(g.model.getTerminal(E[P],!1));g.setSelectionCells(K)}}},null,null,"Alt+Shift+X");e.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&
-1==g.getSelectionCount()){var E=g.getSelectionCell();E=g.getIncomingTreeEdges(E);if(null!=E&&0<E.length&&(E=g.getOutgoingTreeEdges(g.model.getTerminal(E[0],!0)),null!=E)){for(var K=[],P=0;P<E.length;P++)K.push(g.model.getTerminal(E[P],!1));g.setSelectionCells(K)}}},null,null,"Alt+Shift+S");e.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var E=g.getSelectionCell();E=g.getIncomingTreeEdges(E);null!=E&&0<E.length&&g.setSelectionCell(g.model.getTerminal(E[0],
-!0))}},null,null,"Alt+Shift+P");e.actions.addAction("selectDescendants",function(E,K){E=g.getSelectionCell();if(g.isEnabled()&&g.model.isVertex(E)){if(null!=K&&mxEvent.isAltDown(K))g.setSelectionCells(g.model.getTreeEdges(E,null==K||!mxEvent.isShiftDown(K),null==K||!mxEvent.isControlDown(K)));else{var P=[];g.traverse(E,!0,function(R,V){var X=null!=V&&g.isTreeEdge(V);X&&P.push(V);null!=V&&!X||null!=K&&mxEvent.isShiftDown(K)||P.push(R);return null==V||X})}g.setSelectionCells(P)}},null,null,"Alt+Shift+D");
-var v=g.removeCells;g.removeCells=function(E,K){K=null!=K?K:!0;null==E&&(E=this.getDeletableCells(this.getSelectionCells()));K&&(E=this.getDeletableCells(this.addAllEdges(E)));for(var P=[],R=0;R<E.length;R++){var V=E[R];n.isEdge(V)&&x(V)&&(P.push(V),V=n.getTerminal(V,!1));if(d(V)){var X=[];g.traverse(V,!0,function(m,z){var L=null!=z&&g.isTreeEdge(z);L&&X.push(z);(null==z||L)&&X.push(m);return null==z||L});0<X.length&&(P=P.concat(X),V=g.getIncomingTreeEdges(E[R]),E=E.concat(V))}else null!=V&&P.push(E[R])}E=
-P;return v.apply(this,arguments)};e.hoverIcons.getStateAt=function(E,K,P){return d(E.cell)?null:this.graph.view.getState(this.graph.getCellAt(K,P))};var y=g.duplicateCells;g.duplicateCells=function(E,K){E=null!=E?E:this.getSelectionCells();for(var P=E.slice(0),R=0;R<P.length;R++){var V=g.view.getState(P[R]);if(null!=V&&d(V.cell)){var X=g.getIncomingTreeEdges(V.cell);for(V=0;V<X.length;V++)mxUtils.remove(X[V],E)}}this.model.beginUpdate();try{var m=y.call(this,E,K);if(m.length==E.length)for(R=0;R<E.length;R++)if(d(E[R])){var z=
-g.getIncomingTreeEdges(m[R]);X=g.getIncomingTreeEdges(E[R]);if(0==z.length&&0<X.length){var L=this.cloneCell(X[0]);this.addEdge(L,g.getDefaultParent(),this.model.getTerminal(X[0],!0),m[R])}}}finally{this.model.endUpdate()}return m};var u=g.moveCells;g.moveCells=function(E,K,P,R,V,X,m){var z=null;this.model.beginUpdate();try{var L=V,Q=this.getCurrentCellStyle(V);if(null!=E&&d(V)&&"1"==mxUtils.getValue(Q,"treeFolding","0")){for(var N=0;N<E.length;N++)if(d(E[N])||g.model.isEdge(E[N])&&null==g.model.getTerminal(E[N],
-!0)){V=g.model.getParent(E[N]);break}if(null!=L&&V!=L&&null!=this.view.getState(E[0])){var T=g.getIncomingTreeEdges(E[0]);if(0<T.length){var S=g.view.getState(g.model.getTerminal(T[0],!0));if(null!=S){var W=g.view.getState(L);null!=W&&(K=(W.getCenterX()-S.getCenterX())/g.view.scale,P=(W.getCenterY()-S.getCenterY())/g.view.scale)}}}}z=u.apply(this,arguments);if(null!=z&&null!=E&&z.length==E.length)for(N=0;N<z.length;N++)if(this.model.isEdge(z[N]))d(L)&&0>mxUtils.indexOf(z,this.model.getTerminal(z[N],
-!0))&&this.model.setTerminal(z[N],L,!0);else if(d(E[N])&&(T=g.getIncomingTreeEdges(E[N]),0<T.length))if(!R)d(L)&&0>mxUtils.indexOf(E,this.model.getTerminal(T[0],!0))&&this.model.setTerminal(T[0],L,!0);else if(0==g.getIncomingTreeEdges(z[N]).length){Q=L;if(null==Q||Q==g.model.getParent(E[N]))Q=g.model.getTerminal(T[0],!0);R=this.cloneCell(T[0]);this.addEdge(R,g.getDefaultParent(),Q,z[N])}}finally{this.model.endUpdate()}return z};if(null!=e.sidebar){var D=e.sidebar.dropAndConnect;e.sidebar.dropAndConnect=
-function(E,K,P,R){var V=g.model,X=null;V.beginUpdate();try{if(X=D.apply(this,arguments),d(E))for(var m=0;m<X.length;m++)if(V.isEdge(X[m])&&null==V.getTerminal(X[m],!0)){V.setTerminal(X[m],E,!0);var z=g.getCellGeometry(X[m]);z.points=null;null!=z.getTerminalPoint(!0)&&z.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return X}}var A={88:e.actions.get("selectChildren"),84:e.actions.get("selectSubtree"),80:e.actions.get("selectParent"),83:e.actions.get("selectSiblings")},U=e.onKeyDown;e.onKeyDown=function(E){try{if(g.isEnabled()&&
-!g.isEditing()&&d(g.getSelectionCell())&&1==g.getSelectionCount()){var K=null;0<g.getIncomingTreeEdges(g.getSelectionCell()).length&&(9==E.which?K=mxEvent.isShiftDown(E)?I(g.getSelectionCell()):F(g.getSelectionCell()):13==E.which&&(K=H(g.getSelectionCell(),!mxEvent.isShiftDown(E))));if(null!=K&&0<K.length)1==K.length&&g.model.isEdge(K[0])?g.setSelectionCell(g.model.getTerminal(K[0],!1)):g.setSelectionCell(K[K.length-1]),null!=e.hoverIcons&&e.hoverIcons.update(g.view.getState(g.getSelectionCell())),
-g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(E);else if(mxEvent.isAltDown(E)&&mxEvent.isShiftDown(E)){var P=A[E.keyCode];null!=P&&(P.funct(E),mxEvent.consume(E))}else 37==E.keyCode?(c(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(E)):38==E.keyCode?(c(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(E)):39==E.keyCode?(c(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(E)):40==E.keyCode&&(c(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(E))}}catch(R){e.handleError(R)}mxEvent.isConsumed(E)||U.apply(this,arguments)};var l=g.connectVertex;g.connectVertex=function(E,K,P,R,V,X,m){var z=g.getIncomingTreeEdges(E);if(d(E)){var L=G(E),Q=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,N=K==mxConstants.DIRECTION_EAST||K==mxConstants.DIRECTION_WEST;return L==K||0==z.length?F(E,K):Q==N?I(E):H(E,K!=mxConstants.DIRECTION_NORTH&&K!=mxConstants.DIRECTION_WEST)}return l.apply(this,arguments)};g.getSubtree=function(E){var K=
-[E];!t(E)&&!d(E)||C(E)||g.traverse(E,!0,function(P,R){var V=null!=R&&g.isTreeEdge(R);V&&0>mxUtils.indexOf(K,R)&&K.push(R);(null==R||V)&&0>mxUtils.indexOf(K,P)&&K.push(P);return null==R||V});return K};var q=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){q.apply(this,arguments);(t(this.state.cell)||d(this.state.cell))&&!C(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(E){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(E),mxEvent.getClientY(E),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(E);
-this.graph.isMouseDown=!0;e.hoverIcons.reset();mxEvent.consume(E)})))};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.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 J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(E){J.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=E?"":"none")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(E,K){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=k.apply(this,arguments),t=this.graph;return d.concat([this.addEntry("tree container",
+!0,!0))}),d))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(g,k,d){d.ui=g.ui;return k};b.afterDecode=function(g,k,d){g=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=g;return d};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(g,k,d){d.ui=g.ui;return k};b.afterDecode=function(g,k,d){g=d.previous;d.previous=d.name;d.name=g;return d};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(g,k,d){d.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(d.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(q,x){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,q)?x:void 0})),null!=k.relatedPage.root&&g.encodeCell(k.relatedPage.root,
+d));return d};b.beforeDecode=function(g,k,d){d.ui=g.ui;d.relatedPage=d.ui.getPageById(k.getAttribute("relatedPage"));if(null==d.relatedPage){var q=k.ownerDocument.createElement("diagram");q.setAttribute("id",k.getAttribute("relatedPage"));q.setAttribute("name",k.getAttribute("name"));d.relatedPage=new DiagramPage(q);q=k.getAttribute("viewState");null!=q&&(d.relatedPage.viewState=JSON.parse(q),k.removeAttribute("viewState"));k=k.cloneNode(!0);q=k.firstChild;if(null!=q)for(d.relatedPage.root=g.decodeCell(q,
+!1),d=q.nextSibling,q.parentNode.removeChild(q),q=d;null!=q;){d=q.nextSibling;if(q.nodeType==mxConstants.NODETYPE_ELEMENT){var x=q.getAttribute("id");null==g.lookup(x)&&g.decodeCell(q)}q.parentNode.removeChild(q);q=d}}return k};b.afterDecode=function(g,k,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,q,x,C,G){q=null!=q?q:!1;null==x&&(x=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var H=x.slice(),I=0;I<x.length;I++)"1"==mxUtils.getValue(this.getCurrentCellStyle(x[I]),"treeFolding","0")&&this.foldTreeCell(d,x[I]);x=H;x=b.apply(this,arguments)}finally{this.model.endUpdate()}return x};Graph.prototype.foldTreeCell=
+function(d,q){this.model.beginUpdate();try{var x=[];this.traverse(q,!0,mxUtils.bind(this,function(G,H){var I=null!=H&&this.isTreeEdge(H);I&&x.push(H);G==q||null!=H&&!I||x.push(G);return(null==H||I)&&(G==q||!this.model.isCollapsed(G))}));this.model.setCollapsed(q,d);for(var C=0;C<x.length;C++)this.model.setVisible(x[C],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,q,x,C,G,H){return this.model.filterCells(this.getEdges(d,
+q,x,C,G,H),mxUtils.bind(this,function(I){return this.isTreeEdge(I)}))};Graph.prototype.getIncomingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!1,!0,!1)};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){g.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(F){return n.isVertex(F)&&x(F)}function q(F){var K=
+!1;null!=F&&(K="1"==f.getCurrentCellStyle(F).treeMoving);return K}function x(F){var K=!1;null!=F&&(F=n.getParent(F),K=f.view.getState(F),K="tree"==(null!=K?K.style:f.getCellStyle(F)).containerType);return K}function C(F){var K=!1;null!=F&&(F=n.getParent(F),K=f.view.getState(F),f.view.getState(F),K=null!=(null!=K?K.style:f.getCellStyle(F)).childLayout);return K}function G(F){F=f.view.getState(F);if(null!=F){var K=f.getIncomingTreeEdges(F.cell);if(0<K.length&&(K=f.view.getState(K[0]),null!=K&&(K=K.absolutePoints,
+null!=K&&0<K.length&&(K=K[K.length-1],null!=K)))){if(K.y==F.y&&Math.abs(K.x-F.getCenterX())<F.width/2)return mxConstants.DIRECTION_SOUTH;if(K.y==F.y+F.height&&Math.abs(K.x-F.getCenterX())<F.width/2)return mxConstants.DIRECTION_NORTH;if(K.x>F.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function H(F,K){K=null!=K?K:!0;f.model.beginUpdate();try{var P=f.model.getParent(F),R=f.getIncomingTreeEdges(F),V=f.cloneCells([R[0],F]);f.model.setTerminal(V[0],f.model.getTerminal(R[0],
+!0),!0);var X=G(F),m=P.geometry;X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=K?F.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=K?F.geometry.height+10:-V[1].geometry.height-10;f.view.currentRoot!=P&&(V[1].geometry.x-=m.x,V[1].geometry.y-=m.y);var z=f.view.getState(F),L=f.view.scale;if(null!=z){var Q=mxRectangle.fromRectangle(z);X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH?Q.x+=(K?F.geometry.width+10:-V[1].geometry.width-10)*L:Q.y+=(K?
+F.geometry.height+10:-V[1].geometry.height-10)*L;var N=f.getOutgoingTreeEdges(f.model.getTerminal(R[0],!0));if(null!=N){for(var T=X==mxConstants.DIRECTION_SOUTH||X==mxConstants.DIRECTION_NORTH,S=m=R=0;S<N.length;S++){var W=f.model.getTerminal(N[S],!1);if(X==G(W)){var Z=f.view.getState(W);W!=F&&null!=Z&&(T&&K!=Z.getCenterX()<z.getCenterX()||!T&&K!=Z.getCenterY()<z.getCenterY())&&mxUtils.intersects(Q,Z)&&(R=10+Math.max(R,(Math.min(Q.x+Q.width,Z.x+Z.width)-Math.max(Q.x,Z.x))/L),m=10+Math.max(m,(Math.min(Q.y+
+Q.height,Z.y+Z.height)-Math.max(Q.y,Z.y))/L))}}T?m=0:R=0;for(S=0;S<N.length;S++)if(W=f.model.getTerminal(N[S],!1),X==G(W)&&(Z=f.view.getState(W),W!=F&&null!=Z&&(T&&K!=Z.getCenterX()<z.getCenterX()||!T&&K!=Z.getCenterY()<z.getCenterY()))){var ba=[];f.traverse(Z.cell,!0,function(aa,fa){var Y=null!=fa&&f.isTreeEdge(fa);Y&&ba.push(fa);(null==fa||Y)&&ba.push(aa);return null==fa||Y});f.moveCells(ba,(K?1:-1)*R,(K?1:-1)*m)}}}return f.addCells(V,P)}finally{f.model.endUpdate()}}function I(F){f.model.beginUpdate();
+try{var K=G(F),P=f.getIncomingTreeEdges(F),R=f.cloneCells([P[0],F]);f.model.setTerminal(P[0],R[1],!1);f.model.setTerminal(R[0],R[1],!0);f.model.setTerminal(R[0],F,!1);var V=f.model.getParent(F),X=V.geometry,m=[];f.view.currentRoot!=V&&(R[1].geometry.x-=X.x,R[1].geometry.y-=X.y);f.traverse(F,!0,function(Q,N){var T=null!=N&&f.isTreeEdge(N);T&&m.push(N);(null==N||T)&&m.push(Q);return null==N||T});var z=F.geometry.width+40,L=F.geometry.height+40;K==mxConstants.DIRECTION_SOUTH?z=0:K==mxConstants.DIRECTION_NORTH?
+(z=0,L=-L):K==mxConstants.DIRECTION_WEST?(z=-z,L=0):K==mxConstants.DIRECTION_EAST&&(L=0);f.moveCells(m,z,L);return f.addCells(R,V)}finally{f.model.endUpdate()}}function E(F,K){f.model.beginUpdate();try{var P=f.model.getParent(F),R=f.getIncomingTreeEdges(F),V=G(F);0==R.length&&(R=[f.createEdge(P,null,"",null,null,f.createCurrentEdgeStyle())],V=K);var X=f.cloneCells([R[0],F]);f.model.setTerminal(X[0],F,!0);if(null==f.model.getTerminal(X[0],!1)){f.model.setTerminal(X[0],X[1],!1);var m=f.getCellStyle(X[1]).newEdgeStyle;
+if(null!=m)try{var z=JSON.parse(m),L;for(L in z)f.setCellStyles(L,z[L],[X[0]]),"edgeStyle"==L&&"elbowEdgeStyle"==z[L]&&f.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[X[0]])}catch(Z){}}R=f.getOutgoingTreeEdges(F);var Q=P.geometry;K=[];f.view.currentRoot==P&&(Q=new mxRectangle);for(m=0;m<R.length;m++){var N=f.model.getTerminal(R[m],!1);null!=N&&K.push(N)}var T=f.view.getBounds(K),S=f.view.translate,W=f.view.scale;V==mxConstants.DIRECTION_SOUTH?
+(X[1].geometry.x=null==T?F.geometry.x+(F.geometry.width-X[1].geometry.width)/2:(T.x+T.width)/W-S.x-Q.x+10,X[1].geometry.y+=X[1].geometry.height-Q.y+40):V==mxConstants.DIRECTION_NORTH?(X[1].geometry.x=null==T?F.geometry.x+(F.geometry.width-X[1].geometry.width)/2:(T.x+T.width)/W-S.x+-Q.x+10,X[1].geometry.y-=X[1].geometry.height+Q.y+40):(X[1].geometry.x=V==mxConstants.DIRECTION_WEST?X[1].geometry.x-(X[1].geometry.width+Q.x+40):X[1].geometry.x+(X[1].geometry.width-Q.x+40),X[1].geometry.y=null==T?F.geometry.y+
+(F.geometry.height-X[1].geometry.height)/2:(T.y+T.height)/W-S.y+-Q.y+10);return f.addCells(X,P)}finally{f.model.endUpdate()}}function O(F,K,P){F=f.getOutgoingTreeEdges(F);P=f.view.getState(P);var R=[];if(null!=P&&null!=F){for(var V=0;V<F.length;V++){var X=f.view.getState(f.model.getTerminal(F[V],!1));null!=X&&(!K&&Math.min(X.x+X.width,P.x+P.width)>=Math.max(X.x,P.x)||K&&Math.min(X.y+X.height,P.y+P.height)>=Math.max(X.y,P.y))&&R.push(X)}R.sort(function(m,z){return K?m.x+m.width-z.x-z.width:m.y+m.height-
+z.y-z.height})}return R}function c(F,K){var P=G(F),R=K==mxConstants.DIRECTION_EAST||K==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==R&&P!=K?e.actions.get("selectParent").funct():P==K?(K=f.getOutgoingTreeEdges(F),null!=K&&0<K.length&&f.setSelectionCell(f.model.getTerminal(K[0],!1))):(P=f.getIncomingTreeEdges(F),null!=P&&0<P.length&&(R=O(f.model.getTerminal(P[0],!0),R,F),F=f.view.getState(F),null!=F&&(F=mxUtils.indexOf(R,F),0<=F&&(F+=K==mxConstants.DIRECTION_NORTH||
+K==mxConstants.DIRECTION_WEST?-1:1,0<=F&&F<=R.length-1&&f.setSelectionCell(R[F].cell)))))}var e=this,f=e.editor.graph,n=f.getModel(),p=e.menus.createPopupMenu;e.menus.createPopupMenu=function(F,K,P){p.apply(this,arguments);if(1==f.getSelectionCount()){K=f.getSelectionCell();var R=f.getOutgoingTreeEdges(K);F.addSeparator();0<R.length&&(d(f.getSelectionCell())&&this.addMenuItems(F,["selectChildren"],null,P),this.addMenuItems(F,["selectDescendants"],null,P));d(f.getSelectionCell())?(F.addSeparator(),
+0<f.getIncomingTreeEdges(K).length&&this.addMenuItems(F,["selectSiblings","selectParent"],null,P)):0<f.model.getEdgeCount(K)&&this.addMenuItems(F,["selectConnections"],null,P)}};e.actions.addAction("selectChildren",function(){if(f.isEnabled()&&1==f.getSelectionCount()){var F=f.getSelectionCell();F=f.getOutgoingTreeEdges(F);if(null!=F){for(var K=[],P=0;P<F.length;P++)K.push(f.model.getTerminal(F[P],!1));f.setSelectionCells(K)}}},null,null,"Alt+Shift+X");e.actions.addAction("selectSiblings",function(){if(f.isEnabled()&&
+1==f.getSelectionCount()){var F=f.getSelectionCell();F=f.getIncomingTreeEdges(F);if(null!=F&&0<F.length&&(F=f.getOutgoingTreeEdges(f.model.getTerminal(F[0],!0)),null!=F)){for(var K=[],P=0;P<F.length;P++)K.push(f.model.getTerminal(F[P],!1));f.setSelectionCells(K)}}},null,null,"Alt+Shift+S");e.actions.addAction("selectParent",function(){if(f.isEnabled()&&1==f.getSelectionCount()){var F=f.getSelectionCell();F=f.getIncomingTreeEdges(F);null!=F&&0<F.length&&f.setSelectionCell(f.model.getTerminal(F[0],
+!0))}},null,null,"Alt+Shift+P");e.actions.addAction("selectDescendants",function(F,K){F=f.getSelectionCell();if(f.isEnabled()&&f.model.isVertex(F)){if(null!=K&&mxEvent.isAltDown(K))f.setSelectionCells(f.model.getTreeEdges(F,null==K||!mxEvent.isShiftDown(K),null==K||!mxEvent.isControlDown(K)));else{var P=[];f.traverse(F,!0,function(R,V){var X=null!=V&&f.isTreeEdge(V);X&&P.push(V);null!=V&&!X||null!=K&&mxEvent.isShiftDown(K)||P.push(R);return null==V||X})}f.setSelectionCells(P)}},null,null,"Alt+Shift+D");
+var t=f.removeCells;f.removeCells=function(F,K){K=null!=K?K:!0;null==F&&(F=this.getDeletableCells(this.getSelectionCells()));K&&(F=this.getDeletableCells(this.addAllEdges(F)));for(var P=[],R=0;R<F.length;R++){var V=F[R];n.isEdge(V)&&x(V)&&(P.push(V),V=n.getTerminal(V,!1));if(d(V)){var X=[];f.traverse(V,!0,function(m,z){var L=null!=z&&f.isTreeEdge(z);L&&X.push(z);(null==z||L)&&X.push(m);return null==z||L});0<X.length&&(P=P.concat(X),V=f.getIncomingTreeEdges(F[R]),F=F.concat(V))}else null!=V&&P.push(F[R])}F=
+P;return t.apply(this,arguments)};e.hoverIcons.getStateAt=function(F,K,P){return d(F.cell)?null:this.graph.view.getState(this.graph.getCellAt(K,P))};var y=f.duplicateCells;f.duplicateCells=function(F,K){F=null!=F?F:this.getSelectionCells();for(var P=F.slice(0),R=0;R<P.length;R++){var V=f.view.getState(P[R]);if(null!=V&&d(V.cell)){var X=f.getIncomingTreeEdges(V.cell);for(V=0;V<X.length;V++)mxUtils.remove(X[V],F)}}this.model.beginUpdate();try{var m=y.call(this,F,K);if(m.length==F.length)for(R=0;R<F.length;R++)if(d(F[R])){var z=
+f.getIncomingTreeEdges(m[R]);X=f.getIncomingTreeEdges(F[R]);if(0==z.length&&0<X.length){var L=this.cloneCell(X[0]);this.addEdge(L,f.getDefaultParent(),this.model.getTerminal(X[0],!0),m[R])}}}finally{this.model.endUpdate()}return m};var v=f.moveCells;f.moveCells=function(F,K,P,R,V,X,m){var z=null;this.model.beginUpdate();try{var L=V,Q=this.getCurrentCellStyle(V);if(null!=F&&d(V)&&"1"==mxUtils.getValue(Q,"treeFolding","0")){for(var N=0;N<F.length;N++)if(d(F[N])||f.model.isEdge(F[N])&&null==f.model.getTerminal(F[N],
+!0)){V=f.model.getParent(F[N]);break}if(null!=L&&V!=L&&null!=this.view.getState(F[0])){var T=f.getIncomingTreeEdges(F[0]);if(0<T.length){var S=f.view.getState(f.model.getTerminal(T[0],!0));if(null!=S){var W=f.view.getState(L);null!=W&&(K=(W.getCenterX()-S.getCenterX())/f.view.scale,P=(W.getCenterY()-S.getCenterY())/f.view.scale)}}}}z=v.apply(this,arguments);if(null!=z&&null!=F&&z.length==F.length)for(N=0;N<z.length;N++)if(this.model.isEdge(z[N]))d(L)&&0>mxUtils.indexOf(z,this.model.getTerminal(z[N],
+!0))&&this.model.setTerminal(z[N],L,!0);else if(d(F[N])&&(T=f.getIncomingTreeEdges(F[N]),0<T.length))if(!R)d(L)&&0>mxUtils.indexOf(F,this.model.getTerminal(T[0],!0))&&this.model.setTerminal(T[0],L,!0);else if(0==f.getIncomingTreeEdges(z[N]).length){Q=L;if(null==Q||Q==f.model.getParent(F[N]))Q=f.model.getTerminal(T[0],!0);R=this.cloneCell(T[0]);this.addEdge(R,f.getDefaultParent(),Q,z[N])}}finally{this.model.endUpdate()}return z};if(null!=e.sidebar){var D=e.sidebar.dropAndConnect;e.sidebar.dropAndConnect=
+function(F,K,P,R){var V=f.model,X=null;V.beginUpdate();try{if(X=D.apply(this,arguments),d(F))for(var m=0;m<X.length;m++)if(V.isEdge(X[m])&&null==V.getTerminal(X[m],!0)){V.setTerminal(X[m],F,!0);var z=f.getCellGeometry(X[m]);z.points=null;null!=z.getTerminalPoint(!0)&&z.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return X}}var A={88:e.actions.get("selectChildren"),84:e.actions.get("selectSubtree"),80:e.actions.get("selectParent"),83:e.actions.get("selectSiblings")},U=e.onKeyDown;e.onKeyDown=function(F){try{if(f.isEnabled()&&
+!f.isEditing()&&d(f.getSelectionCell())&&1==f.getSelectionCount()){var K=null;0<f.getIncomingTreeEdges(f.getSelectionCell()).length&&(9==F.which?K=mxEvent.isShiftDown(F)?I(f.getSelectionCell()):E(f.getSelectionCell()):13==F.which&&(K=H(f.getSelectionCell(),!mxEvent.isShiftDown(F))));if(null!=K&&0<K.length)1==K.length&&f.model.isEdge(K[0])?f.setSelectionCell(f.model.getTerminal(K[0],!1)):f.setSelectionCell(K[K.length-1]),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(f.getSelectionCell())),
+f.startEditingAtCell(f.getSelectionCell()),mxEvent.consume(F);else if(mxEvent.isAltDown(F)&&mxEvent.isShiftDown(F)){var P=A[F.keyCode];null!=P&&(P.funct(F),mxEvent.consume(F))}else 37==F.keyCode?(c(f.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(F)):38==F.keyCode?(c(f.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(F)):39==F.keyCode?(c(f.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(F)):40==F.keyCode&&(c(f.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(F))}}catch(R){e.handleError(R)}mxEvent.isConsumed(F)||U.apply(this,arguments)};var l=f.connectVertex;f.connectVertex=function(F,K,P,R,V,X,m){var z=f.getIncomingTreeEdges(F);if(d(F)){var L=G(F),Q=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST,N=K==mxConstants.DIRECTION_EAST||K==mxConstants.DIRECTION_WEST;return L==K||0==z.length?E(F,K):Q==N?I(F):H(F,K!=mxConstants.DIRECTION_NORTH&&K!=mxConstants.DIRECTION_WEST)}return l.apply(this,arguments)};f.getSubtree=function(F){var K=
+[F];!q(F)&&!d(F)||C(F)||f.traverse(F,!0,function(P,R){var V=null!=R&&f.isTreeEdge(R);V&&0>mxUtils.indexOf(K,R)&&K.push(R);(null==R||V)&&0>mxUtils.indexOf(K,P)&&K.push(P);return null==R||V});return K};var u=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){u.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&&!C(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(F){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(F),mxEvent.getClientY(F),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(F);
+this.graph.isMouseDown=!0;e.hoverIcons.reset();mxEvent.consume(F)})))};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.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 J=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(F){J.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=F?"":"none")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(F,K){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=k.apply(this,arguments),q=this.graph;return d.concat([this.addEntry("tree container",
function(){var x=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");x.vertex=!0;var C=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var G=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");H.geometry.relative=!0;H.edge=!0;C.insertEdge(H,!0);G.insertEdge(H,!1);x.insert(H);x.insert(C);x.insert(G);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var x=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
x.vertex=!0;var C=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');C.vertex=!0;var G=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};');
G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");H.geometry.relative=!0;H.edge=!0;C.insertEdge(H,!0);G.insertEdge(H,!1);var I=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-I.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");F.geometry.relative=!0;F.edge=!0;C.insertEdge(F,!0);I.insertEdge(F,!1);var O=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+I.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.relative=!0;E.edge=!0;C.insertEdge(E,!0);I.insertEdge(E,!1);var O=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
O.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;C.insertEdge(c,!0);O.insertEdge(c,!1);var e=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;C.insertEdge(g,!0);e.insertEdge(g,!1);x.insert(H);x.insert(F);x.insert(c);x.insert(g);x.insert(C);x.insert(G);x.insert(I);x.insert(O);x.insert(e);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea",
+e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;C.insertEdge(f,!0);e.insertEdge(f,!1);x.insert(H);x.insert(E);x.insert(c);x.insert(f);x.insert(C);x.insert(G);x.insert(I);x.insert(O);x.insert(e);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');x.vertex=!0;return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var x=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
x.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.setTerminalPoint(new mxPoint(-40,40),!0);C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!1);return sb.createVertexTemplateFromCells([x,C],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var x=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
x.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.setTerminalPoint(new mxPoint(-40,40),!0);C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!1);return sb.createVertexTemplateFromCells([x,C],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree orgchart organization division",function(){var x=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-x.vertex=!0;var C=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;var G=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");H.geometry.relative=!0;H.edge=!0;C.insertEdge(H,!0);G.insertEdge(H,!1);var I=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');I.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-F.geometry.relative=!0;F.edge=!0;C.insertEdge(F,!0);I.insertEdge(F,!1);x.insert(H);x.insert(F);x.insert(C);x.insert(G);x.insert(I);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree root",function(){var x=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(x,"treeRoot",
+x.vertex=!0;var C=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;var G=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");H.geometry.relative=!0;H.edge=!0;C.insertEdge(H,!0);G.insertEdge(H,!1);var I=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');I.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+E.geometry.relative=!0;E.edge=!0;C.insertEdge(E,!0);I.insertEdge(E,!1);x.insert(H);x.insert(E);x.insert(C);x.insert(G);x.insert(I);return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree root",function(){var x=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(x,"treeRoot",
"1");x.vertex=!0;return sb.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree division",function(){var x=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
C.geometry.setTerminalPoint(new mxPoint(0,0),!0);C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!1);return sb.createVertexTemplateFromCells([x,C],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree sub sections",function(){var x=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");x.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
C.geometry.setTerminalPoint(new mxPoint(110,-40),!0);C.geometry.relative=!0;C.edge=!0;x.insertEdge(C,!1);var G=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=
!0;H.edge=!0;G.insertEdge(H,!1);return sb.createVertexTemplateFromCells([C,H,x,G],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(g,n){if(EditorUi.windowed){var p=g.editor.graph;p.popupMenuHandler.hideMenu();if(null==g.formatWindow){n="1"==urlParams.sketch?Math.max(10,g.diagramContainer.clientWidth-244):Math.max(10,g.diagramContainer.clientWidth-248);var v="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;p="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,p.container.clientHeight-10);g.formatWindow=new WrapperWindow(g,mxResources.get("format"),n,v,240,p,
-function(y){g.createFormat(y).init()});g.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){g.formatWindow.window.fit()}));g.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else g.formatWindow.window.setVisible(null!=n?n:!g.formatWindow.window.isVisible())}else null==g.formatElt&&(g.formatElt=g.createSidebarContainer(),g.createFormat(g.formatElt).init(),g.formatElt.style.border="none",g.formatElt.style.width="240px",g.formatElt.style.borderLeft="1px solid gray",
-g.formatElt.style.right="0px"),p=g.diagramContainer.parentNode,null!=g.formatElt.parentNode?(g.formatElt.parentNode.removeChild(g.formatElt),p.style.right="0px"):(p.parentNode.appendChild(g.formatElt),p.style.right=g.formatElt.style.width)}function f(g,n){function p(D,A){var U=g.menus.get(D);D=u.addMenu(A,mxUtils.bind(this,function(){U.funct.apply(this,arguments)}));D.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;";
-D.className="geTitle";n.appendChild(D);return D}var v=document.createElement("div");v.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;";v.className="geTitle";var y=document.createElement("span");y.style.fontSize="18px";y.style.marginRight="5px";y.innerHTML="+";v.appendChild(y);mxUtils.write(v,mxResources.get("moreShapes"));n.appendChild(v);mxEvent.addListener(v,"click",function(){g.actions.get("shapes").funct()});
-var u=new Menubar(g,n);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?v.style.bottom="0":null!=g.actions.get("newLibrary")?(v=document.createElement("div"),v.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",v.className="geTitle",y=document.createElement("span"),y.style.cssText="position:relative;top:6px;",mxUtils.write(y,mxResources.get("newLibrary")),v.appendChild(y),
-n.appendChild(v),mxEvent.addListener(v,"click",g.actions.get("newLibrary").funct),v=document.createElement("div"),v.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;",v.className="geTitle",y=document.createElement("span"),y.style.cssText="position:relative;top:6px;",mxUtils.write(y,mxResources.get("openLibrary")),v.appendChild(y),n.appendChild(v),mxEvent.addListener(v,
-"click",g.actions.get("openLibrary").funct)):(v=p("newLibrary",mxResources.get("newLibrary")),v.style.boxSizing="border-box",v.style.paddingRight="6px",v.style.paddingLeft="6px",v.style.height="32px",v.style.left="0",v=p("openLibraryFrom",mxResources.get("openLibraryFrom")),v.style.borderLeft="1px solid lightgray",v.style.boxSizing="border-box",v.style.paddingRight="6px",v.style.paddingLeft="6px",v.style.height="32px",v.style.left="50%");n.appendChild(g.sidebar.container);n.style.overflow="hidden"}
-function k(g,n){if(EditorUi.windowed){var p=g.editor.graph;p.popupMenuHandler.hideMenu();if(null==g.sidebarWindow){n=Math.min(p.container.clientWidth-10,218);var v="1"==urlParams.embedInline?650:Math.min(p.container.clientHeight-40,650);g.sidebarWindow=new WrapperWindow(g,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(p.container.clientHeight-v)/2):56,n-6,v-6,function(y){f(g,y)});g.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){g.sidebarWindow.window.fit()}));g.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);g.sidebarWindow.window.setVisible(!0);isLocalStorage&&g.getLocalData("sidebar",function(y){g.sidebar.showEntries(y,null,!0)});g.restoreLibraries()}else g.sidebarWindow.window.setVisible(null!=n?n:!g.sidebarWindow.window.isVisible())}else null==g.sidebarElt&&(g.sidebarElt=g.createSidebarContainer(),f(g,g.sidebarElt),g.sidebarElt.style.border="none",g.sidebarElt.style.width="210px",
-g.sidebarElt.style.borderRight="1px solid gray"),p=g.diagramContainer.parentNode,null!=g.sidebarElt.parentNode?(g.sidebarElt.parentNode.removeChild(g.sidebarElt),p.style.left="0px"):(p.parentNode.appendChild(g.sidebarElt),p.style.left=g.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(g){}Menus.prototype.autoPopup=
+EditorUi.initMinimalTheme=function(){function b(f,n){if(EditorUi.windowed){var p=f.editor.graph;p.popupMenuHandler.hideMenu();if(null==f.formatWindow){n="1"==urlParams.sketch?Math.max(10,f.diagramContainer.clientWidth-244):Math.max(10,f.diagramContainer.clientWidth-248);var t="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;p="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,p.container.clientHeight-10);f.formatWindow=new WrapperWindow(f,mxResources.get("format"),n,t,240,p,
+function(y){f.createFormat(y).init()});f.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){f.formatWindow.window.fit()}));f.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else f.formatWindow.window.setVisible(null!=n?n:!f.formatWindow.window.isVisible())}else null==f.formatElt&&(f.formatElt=f.createSidebarContainer(),f.createFormat(f.formatElt).init(),f.formatElt.style.border="none",f.formatElt.style.width="240px",f.formatElt.style.borderLeft="1px solid gray",
+f.formatElt.style.right="0px"),p=f.diagramContainer.parentNode,null!=f.formatElt.parentNode?(f.formatElt.parentNode.removeChild(f.formatElt),p.style.right="0px"):(p.parentNode.appendChild(f.formatElt),p.style.right=f.formatElt.style.width)}function g(f,n){function p(D,A){var U=f.menus.get(D);D=v.addMenu(A,mxUtils.bind(this,function(){U.funct.apply(this,arguments)}));D.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;";
+D.className="geTitle";n.appendChild(D);return D}var t=document.createElement("div");t.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;";t.className="geTitle";var y=document.createElement("span");y.style.fontSize="18px";y.style.marginRight="5px";y.innerHTML="+";t.appendChild(y);mxUtils.write(t,mxResources.get("moreShapes"));n.appendChild(t);mxEvent.addListener(t,"click",function(){f.actions.get("shapes").funct()});
+var v=new Menubar(f,n);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?t.style.bottom="0":null!=f.actions.get("newLibrary")?(t=document.createElement("div"),t.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",t.className="geTitle",y=document.createElement("span"),y.style.cssText="position:relative;top:6px;",mxUtils.write(y,mxResources.get("newLibrary")),t.appendChild(y),
+n.appendChild(t),mxEvent.addListener(t,"click",f.actions.get("newLibrary").funct),t=document.createElement("div"),t.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;",t.className="geTitle",y=document.createElement("span"),y.style.cssText="position:relative;top:6px;",mxUtils.write(y,mxResources.get("openLibrary")),t.appendChild(y),n.appendChild(t),mxEvent.addListener(t,
+"click",f.actions.get("openLibrary").funct)):(t=p("newLibrary",mxResources.get("newLibrary")),t.style.boxSizing="border-box",t.style.paddingRight="6px",t.style.paddingLeft="6px",t.style.height="32px",t.style.left="0",t=p("openLibraryFrom",mxResources.get("openLibraryFrom")),t.style.borderLeft="1px solid lightgray",t.style.boxSizing="border-box",t.style.paddingRight="6px",t.style.paddingLeft="6px",t.style.height="32px",t.style.left="50%");n.appendChild(f.sidebar.container);n.style.overflow="hidden"}
+function k(f,n){if(EditorUi.windowed){var p=f.editor.graph;p.popupMenuHandler.hideMenu();if(null==f.sidebarWindow){n=Math.min(p.container.clientWidth-10,218);var t="1"==urlParams.embedInline?650:Math.min(p.container.clientHeight-40,650);f.sidebarWindow=new WrapperWindow(f,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(p.container.clientHeight-t)/2):56,n-6,t-6,function(y){g(f,y)});f.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){f.sidebarWindow.window.fit()}));f.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);f.sidebarWindow.window.setVisible(!0);isLocalStorage&&f.getLocalData("sidebar",function(y){f.sidebar.showEntries(y,null,!0)});f.restoreLibraries()}else f.sidebarWindow.window.setVisible(null!=n?n:!f.sidebarWindow.window.isVisible())}else null==f.sidebarElt&&(f.sidebarElt=f.createSidebarContainer(),g(f,f.sidebarElt),f.sidebarElt.style.border="none",f.sidebarElt.style.width="210px",
+f.sidebarElt.style.borderRight="1px solid gray"),p=f.diagramContainer.parentNode,null!=f.sidebarElt.parentNode?(f.sidebarElt.parentNode.removeChild(f.sidebarElt),p.style.left="0px"):(p.parentNode.appendChild(f.sidebarElt),p.style.left=f.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(f){}Menus.prototype.autoPopup=
!1;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;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
-Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");t.apply(this,arguments)};var x=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){x.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var C=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(g,n){null!=n.shortcut&&900>d&&!mxClient.IS_IOS?g.firstChild.nextSibling.setAttribute("title",n.shortcut):C.apply(this,arguments)};var G=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(g,n,p){var v=this.editorUi.editor.graph;g.smartSeparators=!0;G.apply(this,arguments);"1"==urlParams.sketch?v.isEnabled()&&(g.addSeparator(),1==v.getSelectionCount()&&this.addMenuItems(g,
-["-","lockUnlock"],null,p)):1==v.getSelectionCount()?(v.isCellFoldable(v.getSelectionCell())&&this.addMenuItems(g,v.isCellCollapsed(n)?["expand"]:["collapse"],null,p),this.addMenuItems(g,["collapsible","-","lockUnlock","enterGroup"],null,p),g.addSeparator(),this.addSubmenu("layout",g)):v.isSelectionEmpty()&&v.isEnabled()?(g.addSeparator(),this.addMenuItems(g,["editData"],null,p),g.addSeparator(),this.addSubmenu("layout",g),this.addSubmenu("insert",g),this.addMenuItems(g,["-","exitGroup"],null,p)):
-v.isEnabled()&&this.addMenuItems(g,["-","lockUnlock"],null,p)};var H=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(g,n,p){H.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(g,["copyAsImage"],null,p)};EditorUi.prototype.toggleFormatPanel=function(g){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=g?g:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=
-this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var I=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();I.apply(this,arguments)};var F=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(g){F.apply(this,arguments);if(g){var n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=n&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&
-this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=n||"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=Menus.prototype.init;Menus.prototype.init=function(){O.apply(this,arguments);var g=this.editorUi,n=g.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),
-function(u){g.setPagesVisible(!Editor.pagesVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return Editor.pagesVisible});g.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(g)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!g.isOffline()&&g.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var u=new ParseDialog(g,mxResources.get("plantUml")+"...","plantUml");g.showDialog(u.container,620,420,!0,!1);u.init()}));
-g.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var u=new ParseDialog(g,mxResources.get("mermaid")+"...","mermaid");g.showDialog(u.container,620,420,!0,!1);u.init()}));var p=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(u,D){var A=this.editorUi.editor.graph,U=A.getSelectionCell();p.call(this,u,U,null,D);this.addMenuItems(u,["editTooltip"],D);A.model.isVertex(U)&&this.addMenuItems(u,["editGeometry"],D);this.addMenuItems(u,["-",
-"edit"],D)})));this.addPopupMenuCellEditItems=function(u,D,A,U){u.addSeparator();this.addSubmenu("editCell",u,U,mxResources.get("edit"))};var v="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),y=function(u,D,A,U){u.addItem(A,null,mxUtils.bind(this,function(){var l=new CreateGraphDialog(g,A,U);g.showDialog(l.container,620,420,!0,!1);l.init()}),D)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(u,D){for(var A=0;A<v.length;A++)"-"==v[A]?
-u.addSeparator(D):y(u,D,mxResources.get(v[A])+"...",v[A])})))};EditorUi.prototype.installFormatToolbar=function(g){var n=this.editor.graph,p=document.createElement("div");p.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%;";n.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,y){0<n.getSelectionCount()?(g.appendChild(p),p.innerHTML=
-"Selected: "+n.getSelectionCount()):null!=p.parentNode&&p.parentNode.removeChild(p)}))};var c=!1;EditorUi.prototype.initFormatWindow=function(){if(!c&&null!=this.formatWindow){c=!0;var g=this.formatWindow.window.toggleMinimized,n=240;this.formatWindow.window.toggleMinimized=function(){g.apply(this,arguments);this.minimized?(n=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+n-140+"px"):(this.div.style.width=
-n+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-n+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(p){mxEvent.getSource(p)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){function g(ha,ea,za){var ka=u.menus.get(ha),oa=l.addMenu(mxResources.get(ha),mxUtils.bind(this,function(){ka.funct.apply(this,
-arguments)}),U);oa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing="border-box";oa.style.top="6px";oa.style.marginRight="6px";oa.style.height="30px";oa.style.paddingTop="6px";oa.style.paddingBottom="6px";oa.style.cursor="pointer";oa.setAttribute("title",mxResources.get(ha));u.menus.menuCreated(ka,oa,"geMenuItem");null!=za?(oa.style.backgroundImage="url("+za+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat="no-repeat",
+Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var q=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");q.apply(this,arguments)};var x=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){x.apply(this,arguments);this.menus.get("save").setEnabled(null!=
+this.getCurrentFile()||"1"==urlParams.embed)};var C=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(f,n){null!=n.shortcut&&900>d&&!mxClient.IS_IOS?f.firstChild.nextSibling.setAttribute("title",n.shortcut):C.apply(this,arguments)};var G=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(f,n,p){var t=this.editorUi.editor.graph;f.smartSeparators=!0;G.apply(this,arguments);"1"==urlParams.sketch?t.isEnabled()&&(f.addSeparator(),1==t.getSelectionCount()&&this.addMenuItems(f,
+["-","lockUnlock"],null,p)):1==t.getSelectionCount()?(t.isCellFoldable(t.getSelectionCell())&&this.addMenuItems(f,t.isCellCollapsed(n)?["expand"]:["collapse"],null,p),this.addMenuItems(f,["collapsible","-","lockUnlock","enterGroup"],null,p),f.addSeparator(),this.addSubmenu("layout",f)):t.isSelectionEmpty()&&t.isEnabled()?(f.addSeparator(),this.addMenuItems(f,["editData"],null,p),f.addSeparator(),this.addSubmenu("layout",f),this.addSubmenu("insert",f),this.addMenuItems(f,["-","exitGroup"],null,p)):
+t.isEnabled()&&this.addMenuItems(f,["-","lockUnlock"],null,p)};var H=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(f,n,p){H.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(f,["copyAsImage"],null,p)};EditorUi.prototype.toggleFormatPanel=function(f){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=f?f:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=
+this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var I=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();I.apply(this,arguments)};var E=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(f){E.apply(this,arguments);if(f){var n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=n&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&
+this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=n||"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=Menus.prototype.init;Menus.prototype.init=function(){O.apply(this,arguments);var f=this.editorUi,n=f.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),
+function(v){f.setPagesVisible(!Editor.pagesVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return Editor.pagesVisible});f.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(f)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!f.isOffline()&&f.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var v=new ParseDialog(f,mxResources.get("plantUml")+"...","plantUml");f.showDialog(v.container,620,420,!0,!1);v.init()}));
+f.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var v=new ParseDialog(f,mxResources.get("mermaid")+"...","mermaid");f.showDialog(v.container,620,420,!0,!1);v.init()}));var p=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(v,D){var A=this.editorUi.editor.graph,U=A.getSelectionCell();p.call(this,v,U,null,D);this.addMenuItems(v,["editTooltip"],D);A.model.isVertex(U)&&this.addMenuItems(v,["editGeometry"],D);this.addMenuItems(v,["-",
+"edit"],D)})));this.addPopupMenuCellEditItems=function(v,D,A,U){v.addSeparator();this.addSubmenu("editCell",v,U,mxResources.get("edit"))};var t="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),y=function(v,D,A,U){v.addItem(A,null,mxUtils.bind(this,function(){var l=new CreateGraphDialog(f,A,U);f.showDialog(l.container,620,420,!0,!1);l.init()}),D)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(v,D){for(var A=0;A<t.length;A++)"-"==t[A]?
+v.addSeparator(D):y(v,D,mxResources.get(t[A])+"...",t[A])})))};EditorUi.prototype.installFormatToolbar=function(f){var n=this.editor.graph,p=document.createElement("div");p.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%;";n.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,y){0<n.getSelectionCount()?(f.appendChild(p),p.innerHTML=
+"Selected: "+n.getSelectionCount()):null!=p.parentNode&&p.parentNode.removeChild(p)}))};var c=!1;EditorUi.prototype.initFormatWindow=function(){if(!c&&null!=this.formatWindow){c=!0;var f=this.formatWindow.window.toggleMinimized,n=240;this.formatWindow.window.toggleMinimized=function(){f.apply(this,arguments);this.minimized?(n=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+n-140+"px"):(this.div.style.width=
+n+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-n+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(p){mxEvent.getSource(p)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){function f(ha,ea,za){var ka=v.menus.get(ha),oa=l.addMenu(mxResources.get(ha),mxUtils.bind(this,function(){ka.funct.apply(this,
+arguments)}),U);oa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing="border-box";oa.style.top="6px";oa.style.marginRight="6px";oa.style.height="30px";oa.style.paddingTop="6px";oa.style.paddingBottom="6px";oa.style.cursor="pointer";oa.setAttribute("title",mxResources.get(ha));v.menus.menuCreated(ka,oa,"geMenuItem");null!=za?(oa.style.backgroundImage="url("+za+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat="no-repeat",
oa.style.backgroundSize="24px 24px",oa.style.width="34px",oa.innerText=""):ea||(oa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",oa.style.backgroundPosition="right 6px center",oa.style.backgroundRepeat="no-repeat",oa.style.paddingRight="22px");return oa}function n(ha,ea,za,ka,oa,sa){var ma=document.createElement("a");ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.height="30px";ma.style.padding=
-"6px";ma.style.position="relative";ma.style.verticalAlign="top";ma.style.top="0px";"1"==urlParams.sketch&&(ma.style.borderStyle="none",ma.style.boxShadow="none",ma.style.padding="6px",ma.style.margin="0px");null!=u.statusContainer?A.insertBefore(ma,u.statusContainer):A.appendChild(ma);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"):mxUtils.write(ma,ha);mxEvent.addListener(ma,
+"6px";ma.style.position="relative";ma.style.verticalAlign="top";ma.style.top="0px";"1"==urlParams.sketch&&(ma.style.borderStyle="none",ma.style.boxShadow="none",ma.style.padding="6px",ma.style.margin="0px");null!=v.statusContainer?A.insertBefore(ma,v.statusContainer):A.appendChild(ma);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"):mxUtils.write(ma,ha);mxEvent.addListener(ma,
mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(na){na.preventDefault()}));mxEvent.addListener(ma,"click",function(na){"disabled"!=ma.getAttribute("disabled")&&ea(na);mxEvent.consume(na)});null==za&&(ma.style.marginRight="4px");null!=ka&&ma.setAttribute("title",ka);null!=oa&&(ha=function(){oa.isEnabled()?(ma.removeAttribute("disabled"),ma.style.cursor="pointer"):(ma.setAttribute("disabled","disabled"),ma.style.cursor="default")},oa.addListener("stateChanged",ha),D.addListener("enabledChanged",
ha),ha());return ma}function p(ha,ea,za){za=document.createElement("div");za.className="geMenuItem";za.style.display="inline-block";za.style.verticalAlign="top";za.style.marginRight="6px";za.style.padding="0 4px 0 4px";za.style.height="30px";za.style.position="relative";za.style.top="0px";"1"==urlParams.sketch&&(za.style.boxShadow="none");for(var ka=0;ka<ha.length;ka++)null!=ha[ka]&&("1"==urlParams.sketch&&(ha[ka].style.padding="10px 8px",ha[ka].style.width="30px"),ha[ka].style.margin="0px",ha[ka].style.boxShadow=
-"none",za.appendChild(ha[ka]));null!=ea&&mxUtils.setOpacity(za,ea);null!=u.statusContainer&&"1"!=urlParams.sketch?A.insertBefore(za,u.statusContainer):A.appendChild(za);return za}function v(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(R.style.left=58>P.offsetTop-P.offsetHeight/2?"70px":"10px");else{for(var ha=A.firstChild;null!=ha;){var ea=ha.nextSibling;"geMenuItem"!=ha.className&&"geItem"!=ha.className||ha.parentNode.removeChild(ha);ha=ea}U=A.firstChild;d=window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth;ha=1E3>d||"1"==urlParams.sketch;var za=null;ha||(za=g("diagram"));ea=ha?g("diagram",null,Editor.menuImage):null;null!=ea&&(za=ea);p([za,n(mxResources.get("shapes"),u.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),u.actions.get("image"),ha?Editor.shapesImage:null),n(mxResources.get("format"),u.actions.get("format").funct,null,mxResources.get("format")+" ("+u.actions.get("format").shortcut+")",u.actions.get("image"),ha?Editor.formatImage:null)],ha?60:null);
-ea=g("insert",!0,ha?E:null);p([ea,n(mxResources.get("delete"),u.actions.get("delete").funct,null,mxResources.get("delete"),u.actions.get("delete"),ha?Editor.trashImage:null)],ha?60:null);411<=d&&(p([Y,ia],60),520<=d&&p([Pa,640<=d?n("",W.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",W,Editor.zoomInImage):null,640<=d?n("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}null!=za&&(mxEvent.disableContextMenu(za),mxEvent.addGestureListeners(za,
-mxUtils.bind(this,function(ka){(mxEvent.isShiftDown(ka)||mxEvent.isAltDown(ka)||mxEvent.isMetaDown(ka)||mxEvent.isControlDown(ka)||mxEvent.isPopupTrigger(ka))&&u.appIconClicked(ka)}),null,null));ea=u.menus.get("language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==Da&&(ea=l.addMenu("",ea.funct),ea.setAttribute("title","language"),ea.className="geToolbarButton",ea.style.backgroundImage="url("+Editor.globeImage+")",ea.style.backgroundPosition=
-"center center",ea.style.backgroundRepeat="no-repeat",ea.style.backgroundSize="22px 22px",ea.style.position="absolute",ea.style.height="24px",ea.style.width="24px",ea.style.zIndex="1",ea.style.right="8px",ea.style.cursor="pointer",ea.style.top="12px",A.appendChild(ea),Da=ea),u.buttonContainer.style.paddingRight="34px"):(u.buttonContainer.style.paddingRight="0px",null!=Da&&(Da.parentNode.removeChild(Da),Da=null))}e.apply(this,arguments);var y=document.createElement("div");y.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+"none",za.appendChild(ha[ka]));null!=ea&&mxUtils.setOpacity(za,ea);null!=v.statusContainer&&"1"!=urlParams.sketch?A.insertBefore(za,v.statusContainer):A.appendChild(za);return za}function t(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(R.style.left=58>P.offsetTop-P.offsetHeight/2?"70px":"10px");else{for(var ha=A.firstChild;null!=ha;){var ea=ha.nextSibling;"geMenuItem"!=ha.className&&"geItem"!=ha.className||ha.parentNode.removeChild(ha);ha=ea}U=A.firstChild;d=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;ha=1E3>d||"1"==urlParams.sketch;var za=null;ha||(za=f("diagram"));ea=ha?f("diagram",null,Editor.menuImage):null;null!=ea&&(za=ea);p([za,n(mxResources.get("shapes"),v.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),v.actions.get("image"),ha?Editor.shapesImage:null),n(mxResources.get("format"),v.actions.get("format").funct,null,mxResources.get("format")+" ("+v.actions.get("format").shortcut+")",v.actions.get("image"),ha?Editor.formatImage:null)],ha?60:null);
+ea=f("insert",!0,ha?F:null);p([ea,n(mxResources.get("delete"),v.actions.get("delete").funct,null,mxResources.get("delete"),v.actions.get("delete"),ha?Editor.trashImage:null)],ha?60:null);411<=d&&(p([Y,ia],60),520<=d&&p([Pa,640<=d?n("",W.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",W,Editor.zoomInImage):null,640<=d?n("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}null!=za&&(mxEvent.disableContextMenu(za),mxEvent.addGestureListeners(za,
+mxUtils.bind(this,function(ka){(mxEvent.isShiftDown(ka)||mxEvent.isAltDown(ka)||mxEvent.isMetaDown(ka)||mxEvent.isControlDown(ka)||mxEvent.isPopupTrigger(ka))&&v.appIconClicked(ka)}),null,null));ea=v.menus.get("language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==Da&&(ea=l.addMenu("",ea.funct),ea.setAttribute("title","language"),ea.className="geToolbarButton",ea.style.backgroundImage="url("+Editor.globeImage+")",ea.style.backgroundPosition=
+"center center",ea.style.backgroundRepeat="no-repeat",ea.style.backgroundSize="22px 22px",ea.style.position="absolute",ea.style.height="24px",ea.style.width="24px",ea.style.zIndex="1",ea.style.right="8px",ea.style.cursor="pointer",ea.style.top="12px",A.appendChild(ea),Da=ea),v.buttonContainer.style.paddingRight="34px"):(v.buttonContainer.style.paddingRight="0px",null!=Da&&(Da.parentNode.removeChild(Da),Da=null))}e.apply(this,arguments);var y=document.createElement("div");y.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
y.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(y);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,
-!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var u=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==u.embedViewport)mxUtils.fit(this.div);else{var ha=parseInt(this.div.offsetLeft),ea=parseInt(this.div.offsetWidth),za=u.embedViewport.x+u.embedViewport.width,ka=parseInt(this.div.offsetTop),oa=parseInt(this.div.offsetHeight),sa=u.embedViewport.y+
-u.embedViewport.height;this.div.style.left=Math.max(u.embedViewport.x,Math.min(ha,za-ea))+"px";this.div.style.top=Math.max(u.embedViewport.y,Math.min(ka,sa-oa))+"px";this.div.style.height=Math.min(u.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(u.embedViewport.width,parseInt(this.div.style.width))+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),y=window.innerHeight||
-document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>y)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));u=this;var D=u.editor.graph;u.toolbar=this.createToolbar(u.createDiv("geToolbar"));u.defaultLibraryName=mxResources.get("untitledLibrary");var A=document.createElement("div");A.className="geMenubarContainer";var U=null,l=new Menubar(u,A);u.statusContainer=u.createStatusContainer();
-u.statusContainer.style.position="relative";u.statusContainer.style.maxWidth="";u.statusContainer.style.color="gray";u.statusContainer.style.cursor="default";var q=u.hideCurrentMenu;u.hideCurrentMenu=function(){q.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var B=u.descriptorChanged;u.descriptorChanged=function(){B.apply(this,arguments);var ha=u.getCurrentFile();if(null!=ha&&null!=ha.getTitle()){var ea=ha.getMode();"google"==ea?ea="googleDrive":"github"==ea?ea="gitHub":"gitlab"==
-ea?ea="gitLab":"onedrive"==ea&&(ea="oneDrive");ea=mxResources.get(ea);A.setAttribute("title",ha.getTitle()+(null!=ea?" ("+ea+")":""))}else A.removeAttribute("title")};u.setStatusText(u.editor.getStatus());A.appendChild(u.statusContainer);u.buttonContainer=document.createElement("div");u.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";A.appendChild(u.buttonContainer);u.menubarContainer=u.buttonContainer;
-u.tabContainer=document.createElement("div");u.tabContainer.className="geTabContainer";u.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";y=u.diagramContainer.parentNode;var J=document.createElement("div");J.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";u.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){J.style.top=
-"20px";u.titlebar=document.createElement("div");u.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var M=document.createElement("div");M.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";u.titlebar.appendChild(M);y.appendChild(u.titlebar)}var E="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,
-K="1"==urlParams.sketch?document.createElement("div"):null,P="1"==urlParams.sketch?document.createElement("div"):null,R="1"==urlParams.sketch?document.createElement("div"):null,V=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)R.style.left="10px",R.style.top="10px",P.style.left="10px",P.style.top="60px",K.style.top="10px",K.style.right="12px",K.style.left="",u.diagramContainer.setAttribute("data-bounds",u.diagramContainer.style.top+" "+u.diagramContainer.style.left+" "+u.diagramContainer.style.width+
-" "+u.diagramContainer.style.height),u.diagramContainer.style.top="0px",u.diagramContainer.style.left="0px",u.diagramContainer.style.bottom="0px",u.diagramContainer.style.right="0px",u.diagramContainer.style.width="",u.diagramContainer.style.height="";else{var ha=u.diagramContainer.getAttribute("data-bounds");if(null!=ha){u.diagramContainer.style.background="transparent";u.diagramContainer.removeAttribute("data-bounds");var ea=D.getGraphBounds();ha=ha.split(" ");u.diagramContainer.style.top=ha[0];
-u.diagramContainer.style.left=ha[1];u.diagramContainer.style.width=ea.width+50+"px";u.diagramContainer.style.height=ea.height+46+"px";u.diagramContainer.style.bottom="";u.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:u.diagramContainer.getBoundingClientRect()}),"*");u.refresh()}R.style.left=u.diagramContainer.offsetLeft+"px";R.style.top=u.diagramContainer.offsetTop-R.offsetHeight-4+"px";P.style.display="";P.style.left=u.diagramContainer.offsetLeft-
-P.offsetWidth-4+"px";P.style.top=u.diagramContainer.offsetTop+"px";K.style.left=u.diagramContainer.offsetLeft+u.diagramContainer.offsetWidth-K.offsetWidth+"px";K.style.top=R.style.top;K.style.right="";u.bottomResizer.style.left=u.diagramContainer.offsetLeft+(u.diagramContainer.offsetWidth-u.bottomResizer.offsetWidth)/2+"px";u.bottomResizer.style.top=u.diagramContainer.offsetTop+u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight/2-1+"px";u.rightResizer.style.left=u.diagramContainer.offsetLeft+
-u.diagramContainer.offsetWidth-u.rightResizer.offsetWidth/2-1+"px";u.rightResizer.style.top=u.diagramContainer.offsetTop+(u.diagramContainer.offsetHeight-u.bottomResizer.offsetHeight)/2+"px"}u.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";u.rightResizer.style.visibility=u.bottomResizer.style.visibility;A.style.display="none";R.style.visibility="";K.style.visibility=""});M=u.actions.get("fullscreen");var X=n("",M.funct,null,mxResources.get(""),M,Editor.fullscreenImage),m=mxUtils.bind(this,
-function(){X.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";V()});M=mxUtils.bind(this,function(){b(u,!0);u.initFormatWindow();var ha=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ha.x+ha.width+4,ha.y);m()});u.addListener("inlineFullscreenChanged",m);u.addListener("editInlineStart",
-M);"1"==urlParams.embedInline&&u.addListener("darkModeChanged",M);u.addListener("editInlineStop",mxUtils.bind(this,function(ha){u.diagramContainer.style.width="10px";u.diagramContainer.style.height="10px";u.diagramContainer.style.border="";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";R.style.visibility="hidden";K.style.visibility="hidden";P.style.display="none"}));if(null!=u.hoverIcons){var z=u.hoverIcons.update;u.hoverIcons.update=function(){D.freehand.isDrawing()||
-z.apply(this,arguments)}}if(null!=D.freehand){var L=D.freehand.createStyle;D.freehand.createStyle=function(ha){return L.apply(this,arguments)+"sketch=0;"}}u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus())}));u.setStatusText(u.editor.getStatus());if("1"==urlParams.sketch){P.className="geToolbarContainer";K.className="geToolbarContainer";R.className="geToolbarContainer";A.className="geToolbarContainer";u.picker=P;u.sketchPickerMenuElt=P;"1"!=urlParams.embed&&
-"atlassian"!=this.getServiceName()&&u.installStatusMinimizer();ca=g("diagram",null,Editor.menuImage);ca.style.boxShadow="none";ca.style.padding="6px";ca.style.margin="0px";R.appendChild(ca);mxEvent.disableContextMenu(ca);mxEvent.addGestureListeners(ca,mxUtils.bind(this,function(ha){(mxEvent.isShiftDown(ha)||mxEvent.isAltDown(ha)||mxEvent.isMetaDown(ha)||mxEvent.isControlDown(ha)||mxEvent.isPopupTrigger(ha))&&this.appIconClicked(ha)}),null,null);u.statusContainer.style.position="";u.statusContainer.style.display=
-"none";u.statusContainer.style.margin="0px";u.statusContainer.style.padding="6px 0px";u.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";u.statusContainer.style.display="inline-block";u.statusContainer.style.textOverflow="ellipsis";"1"==urlParams.embed&&(this.statusContainer.style.marginTop="-2px",this.statusContainer.style.marginRight="8px");u.buttonContainer.style.display="inline-block";u.buttonContainer.style.position="relative";u.buttonContainer.style.paddingRight="0px";u.buttonContainer.style.top=
+!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var v=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==v.embedViewport)mxUtils.fit(this.div);else{var ha=parseInt(this.div.offsetLeft),ea=parseInt(this.div.offsetWidth),za=v.embedViewport.x+v.embedViewport.width,ka=parseInt(this.div.offsetTop),oa=parseInt(this.div.offsetHeight),sa=v.embedViewport.y+
+v.embedViewport.height;this.div.style.left=Math.max(v.embedViewport.x,Math.min(ha,za-ea))+"px";this.div.style.top=Math.max(v.embedViewport.y,Math.min(ka,sa-oa))+"px";this.div.style.height=Math.min(v.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(v.embedViewport.width,parseInt(this.div.style.width))+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),y=window.innerHeight||
+document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>y)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));v=this;var D=v.editor.graph;v.toolbar=this.createToolbar(v.createDiv("geToolbar"));v.defaultLibraryName=mxResources.get("untitledLibrary");var A=document.createElement("div");A.className="geMenubarContainer";var U=null,l=new Menubar(v,A);v.statusContainer=v.createStatusContainer();
+v.statusContainer.style.position="relative";v.statusContainer.style.maxWidth="";v.statusContainer.style.color="gray";v.statusContainer.style.cursor="default";var u=v.hideCurrentMenu;v.hideCurrentMenu=function(){u.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var B=v.descriptorChanged;v.descriptorChanged=function(){B.apply(this,arguments);var ha=v.getCurrentFile();if(null!=ha&&null!=ha.getTitle()){var ea=ha.getMode();"google"==ea?ea="googleDrive":"github"==ea?ea="gitHub":"gitlab"==
+ea?ea="gitLab":"onedrive"==ea&&(ea="oneDrive");ea=mxResources.get(ea);A.setAttribute("title",ha.getTitle()+(null!=ea?" ("+ea+")":""))}else A.removeAttribute("title")};v.setStatusText(v.editor.getStatus());A.appendChild(v.statusContainer);v.buttonContainer=document.createElement("div");v.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";A.appendChild(v.buttonContainer);v.menubarContainer=v.buttonContainer;
+v.tabContainer=document.createElement("div");v.tabContainer.className="geTabContainer";v.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";y=v.diagramContainer.parentNode;var J=document.createElement("div");J.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";v.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){J.style.top=
+"20px";v.titlebar=document.createElement("div");v.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var M=document.createElement("div");M.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;";v.titlebar.appendChild(M);y.appendChild(v.titlebar)}var F="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,
+K="1"==urlParams.sketch?document.createElement("div"):null,P="1"==urlParams.sketch?document.createElement("div"):null,R="1"==urlParams.sketch?document.createElement("div"):null,V=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)R.style.left="10px",R.style.top="10px",P.style.left="10px",P.style.top="60px",K.style.top="10px",K.style.right="12px",K.style.left="",v.diagramContainer.setAttribute("data-bounds",v.diagramContainer.style.top+" "+v.diagramContainer.style.left+" "+v.diagramContainer.style.width+
+" "+v.diagramContainer.style.height),v.diagramContainer.style.top="0px",v.diagramContainer.style.left="0px",v.diagramContainer.style.bottom="0px",v.diagramContainer.style.right="0px",v.diagramContainer.style.width="",v.diagramContainer.style.height="";else{var ha=v.diagramContainer.getAttribute("data-bounds");if(null!=ha){v.diagramContainer.style.background="transparent";v.diagramContainer.removeAttribute("data-bounds");var ea=D.getGraphBounds();ha=ha.split(" ");v.diagramContainer.style.top=ha[0];
+v.diagramContainer.style.left=ha[1];v.diagramContainer.style.width=ea.width+50+"px";v.diagramContainer.style.height=ea.height+46+"px";v.diagramContainer.style.bottom="";v.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:v.diagramContainer.getBoundingClientRect()}),"*");v.refresh()}R.style.left=v.diagramContainer.offsetLeft+"px";R.style.top=v.diagramContainer.offsetTop-R.offsetHeight-4+"px";P.style.display="";P.style.left=v.diagramContainer.offsetLeft-
+P.offsetWidth-4+"px";P.style.top=v.diagramContainer.offsetTop+"px";K.style.left=v.diagramContainer.offsetLeft+v.diagramContainer.offsetWidth-K.offsetWidth+"px";K.style.top=R.style.top;K.style.right="";v.bottomResizer.style.left=v.diagramContainer.offsetLeft+(v.diagramContainer.offsetWidth-v.bottomResizer.offsetWidth)/2+"px";v.bottomResizer.style.top=v.diagramContainer.offsetTop+v.diagramContainer.offsetHeight-v.bottomResizer.offsetHeight/2-1+"px";v.rightResizer.style.left=v.diagramContainer.offsetLeft+
+v.diagramContainer.offsetWidth-v.rightResizer.offsetWidth/2-1+"px";v.rightResizer.style.top=v.diagramContainer.offsetTop+(v.diagramContainer.offsetHeight-v.bottomResizer.offsetHeight)/2+"px"}v.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";v.rightResizer.style.visibility=v.bottomResizer.style.visibility;A.style.display="none";R.style.visibility="";K.style.visibility=""});M=v.actions.get("fullscreen");var X=n("",M.funct,null,mxResources.get(""),M,Editor.fullscreenImage),m=mxUtils.bind(this,
+function(){X.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";V()});M=mxUtils.bind(this,function(){b(v,!0);v.initFormatWindow();var ha=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ha.x+ha.width+4,ha.y);m()});v.addListener("inlineFullscreenChanged",m);v.addListener("editInlineStart",
+M);"1"==urlParams.embedInline&&v.addListener("darkModeChanged",M);v.addListener("editInlineStop",mxUtils.bind(this,function(ha){v.diagramContainer.style.width="10px";v.diagramContainer.style.height="10px";v.diagramContainer.style.border="";v.bottomResizer.style.visibility="hidden";v.rightResizer.style.visibility="hidden";R.style.visibility="hidden";K.style.visibility="hidden";P.style.display="none"}));if(null!=v.hoverIcons){var z=v.hoverIcons.update;v.hoverIcons.update=function(){D.freehand.isDrawing()||
+z.apply(this,arguments)}}if(null!=D.freehand){var L=D.freehand.createStyle;D.freehand.createStyle=function(ha){return L.apply(this,arguments)+"sketch=0;"}}v.editor.addListener("statusChanged",mxUtils.bind(this,function(){v.setStatusText(v.editor.getStatus())}));v.setStatusText(v.editor.getStatus());if("1"==urlParams.sketch){P.className="geToolbarContainer";K.className="geToolbarContainer";R.className="geToolbarContainer";A.className="geToolbarContainer";v.picker=P;v.sketchPickerMenuElt=P;"1"!=urlParams.embed&&
+"atlassian"!=this.getServiceName()&&v.installStatusMinimizer();ca=f("diagram",null,Editor.menuImage);ca.style.boxShadow="none";ca.style.padding="6px";ca.style.margin="0px";R.appendChild(ca);mxEvent.disableContextMenu(ca);mxEvent.addGestureListeners(ca,mxUtils.bind(this,function(ha){(mxEvent.isShiftDown(ha)||mxEvent.isAltDown(ha)||mxEvent.isMetaDown(ha)||mxEvent.isControlDown(ha)||mxEvent.isPopupTrigger(ha))&&this.appIconClicked(ha)}),null,null);v.statusContainer.style.position="";v.statusContainer.style.display=
+"none";v.statusContainer.style.margin="0px";v.statusContainer.style.padding="6px 0px";v.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";v.statusContainer.style.display="inline-block";v.statusContainer.style.textOverflow="ellipsis";"1"==urlParams.embed&&(this.statusContainer.style.marginTop="-2px",this.statusContainer.style.marginRight="8px");v.buttonContainer.style.display="inline-block";v.buttonContainer.style.position="relative";v.buttonContainer.style.paddingRight="0px";v.buttonContainer.style.top=
"0px";var Q=document.createElement("a");Q.style.padding="0px";Q.style.boxShadow="none";Q.className="geMenuItem";Q.style.display="inline-block";Q.style.width="40px";Q.style.height="12px";Q.style.marginBottom="-2px";Q.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Q.style.backgroundPosition="top center";Q.style.backgroundRepeat="no-repeat";Q.setAttribute("title","Minimize");var N=!1,T=mxUtils.bind(this,function(){P.innerText="";if(!N){var ha=function(ea,za,ka,oa){null!=za&&ea.setAttribute("title",
-za);ea.style.cursor=null!=ka?ka:"default";ea.style.margin="2px 0px";P.appendChild(ea);mxUtils.br(P);null!=oa&&(ea.style.position="relative",ea.style.overflow="visible",za=document.createElement("div"),za.style.position="absolute",za.style.left="34px",za.style.top="28px",za.style.fontSize="8px",mxUtils.write(za,oa),ea.appendChild(za));return ea};ha(u.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",
-mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ha(u.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ha(u.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
-160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ha(u.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ea=new mxCell("",new mxGeometry(0,0,D.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ea.geometry.setTerminalPoint(new mxPoint(0,0),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,
-0),!1);ea.geometry.points=[];ea.geometry.relative=!0;ea.edge=!0;ha(u.sidebar.createEdgeTemplateFromCells([ea],ea.geometry.width,ea.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ea=ea.clone();ea.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ea.geometry.width=D.defaultEdgeLength+20;ea.geometry.setTerminalPoint(new mxPoint(0,20),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,
-20),!1);ha(u.sidebar.createEdgeTemplateFromCells([ea],ea.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ea,za,ka,oa){ea=n("",ea.funct,null,za,ea,ka);ea.style.width="40px";ea.style.height="34px";ea.style.opacity="0.7";return ha(ea,null,"pointer",oa)})(u.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");ca=g("insert",null,Editor.plusImage);ca.style.boxShadow="none";ca.style.opacity="0.7";ca.style.padding="6px";
+za);ea.style.cursor=null!=ka?ka:"default";ea.style.margin="2px 0px";P.appendChild(ea);mxUtils.br(P);null!=oa&&(ea.style.position="relative",ea.style.overflow="visible",za=document.createElement("div"),za.style.position="absolute",za.style.left="34px",za.style.top="28px",za.style.fontSize="8px",mxUtils.write(za,oa),ea.appendChild(za));return ea};ha(v.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",
+mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");ha(v.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")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");ha(v.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
+160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");ha(v.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ea=new mxCell("",new mxGeometry(0,0,D.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ea.geometry.setTerminalPoint(new mxPoint(0,0),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,
+0),!1);ea.geometry.points=[];ea.geometry.relative=!0;ea.edge=!0;ha(v.sidebar.createEdgeTemplateFromCells([ea],ea.geometry.width,ea.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ea=ea.clone();ea.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ea.geometry.width=D.defaultEdgeLength+20;ea.geometry.setTerminalPoint(new mxPoint(0,20),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,
+20),!1);ha(v.sidebar.createEdgeTemplateFromCells([ea],ea.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ea,za,ka,oa){ea=n("",ea.funct,null,za,ea,ka);ea.style.width="40px";ea.style.height="34px";ea.style.opacity="0.7";return ha(ea,null,"pointer",oa)})(v.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");ca=f("insert",null,Editor.plusImage);ca.style.boxShadow="none";ca.style.opacity="0.7";ca.style.padding="6px";
ca.style.margin="0px";ca.style.height="34px";ca.style.width="37px";ha(ca,null,"pointer")}"1"!=urlParams.embedInline&&P.appendChild(Q)});mxEvent.addListener(Q,"click",mxUtils.bind(this,function(){N?(mxUtils.setPrefixedStyle(P.style,"transform","translate(0, -50%)"),P.style.padding="8px 6px 4px",P.style.top="50%",P.style.bottom="",P.style.height="",Q.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Q.style.width="40px",Q.style.height="12px",Q.setAttribute("title","Minimize"),N=!1,
-T()):(P.innerText="",P.appendChild(Q),mxUtils.setPrefixedStyle(P.style,"transform","translate(0, 0)"),P.style.top="",P.style.bottom="12px",P.style.padding="0px",P.style.height="24px",Q.style.height="24px",Q.style.backgroundImage="url("+Editor.plusImage+")",Q.setAttribute("title",mxResources.get("insert")),Q.style.width="24px",N=!0)}));T();u.addListener("darkModeChanged",T);u.addListener("sketchModeChanged",T)}M=u.menus.get("viewZoom");if(null!=M){var S=function(ha){if(mxEvent.isAltDown(ha))u.hideCurrentMenu(),
-u.actions.get("customZoom").funct(),mxEvent.consume(ha);else if("geItem"!=mxEvent.getSource(ha).className||mxEvent.isShiftDown(ha))u.hideCurrentMenu(),u.actions.get("smartFit").funct(),mxEvent.consume(ha)},W=u.actions.get("zoomIn"),Z=u.actions.get("zoomOut"),ba=u.actions.get("resetView"),aa=u.actions.get("undo"),fa=u.actions.get("redo"),Y=n("",aa.funct,null,mxResources.get("undo")+" ("+aa.shortcut+")",aa,Editor.undoImage),ia=n("",fa.funct,null,mxResources.get("redo")+" ("+fa.shortcut+")",fa,Editor.redoImage);
-if(null!=K){ba=function(){ta.style.display=null!=u.pages&&("0"!=urlParams.pages||1<u.pages.length||Editor.pagesVisible)?"inline-block":"none"};var da=function(){ta.innerText="";if(null!=u.currentPage){mxUtils.write(ta,u.currentPage.getName());var ha=null!=u.pages?u.pages.length:1,ea=u.getPageIndex(u.currentPage);ea=null!=ea?ea+1:1;var za=u.currentPage.getId();ta.setAttribute("title",u.currentPage.getName()+" ("+ea+"/"+ha+")"+(null!=za?" ["+za+"]":""))}},va=u.actions.get("delete"),Aa=n("",va.funct,
-null,mxResources.get("delete"),va,Editor.trashImage);Aa.style.opacity="0.3";R.appendChild(Aa);va.addListener("stateChanged",function(){Aa.style.opacity=va.enabled?"":"0.3"});var ya=function(){Y.style.display=0<u.editor.undoManager.history.length||D.isEditing()?"inline-block":"none";ia.style.display=Y.style.display;Y.style.opacity=aa.enabled?"":"0.3";ia.style.opacity=fa.enabled?"":"0.3"};R.appendChild(Y);R.appendChild(ia);aa.addListener("stateChanged",ya);fa.addListener("stateChanged",ya);ya();var ta=
-this.createPageMenuTab(!1,!0);ta.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";K.appendChild(ta);u.editor.addListener("pagesPatched",da);u.editor.addListener("pageSelected",da);u.editor.addListener("pageRenamed",da);u.editor.addListener("fileLoaded",da);da();u.addListener("fileDescriptorChanged",ba);u.addListener("pagesVisibleChanged",ba);u.editor.addListener("pagesPatched",ba);ba();ba=n("",Z.funct,!0,mxResources.get("zoomOut")+
+T()):(P.innerText="",P.appendChild(Q),mxUtils.setPrefixedStyle(P.style,"transform","translate(0, 0)"),P.style.top="",P.style.bottom="12px",P.style.padding="0px",P.style.height="24px",Q.style.height="24px",Q.style.backgroundImage="url("+Editor.plusImage+")",Q.setAttribute("title",mxResources.get("insert")),Q.style.width="24px",N=!0)}));T();v.addListener("darkModeChanged",T);v.addListener("sketchModeChanged",T)}M=v.menus.get("viewZoom");if(null!=M){var S=function(ha){if(mxEvent.isAltDown(ha))v.hideCurrentMenu(),
+v.actions.get("customZoom").funct(),mxEvent.consume(ha);else if("geItem"!=mxEvent.getSource(ha).className||mxEvent.isShiftDown(ha))v.hideCurrentMenu(),v.actions.get("smartFit").funct(),mxEvent.consume(ha)},W=v.actions.get("zoomIn"),Z=v.actions.get("zoomOut"),ba=v.actions.get("resetView"),aa=v.actions.get("undo"),fa=v.actions.get("redo"),Y=n("",aa.funct,null,mxResources.get("undo")+" ("+aa.shortcut+")",aa,Editor.undoImage),ia=n("",fa.funct,null,mxResources.get("redo")+" ("+fa.shortcut+")",fa,Editor.redoImage);
+if(null!=K){ba=function(){ta.style.display=null!=v.pages&&("0"!=urlParams.pages||1<v.pages.length||Editor.pagesVisible)?"inline-block":"none"};var da=function(){ta.innerText="";if(null!=v.currentPage){mxUtils.write(ta,v.currentPage.getName());var ha=null!=v.pages?v.pages.length:1,ea=v.getPageIndex(v.currentPage);ea=null!=ea?ea+1:1;var za=v.currentPage.getId();ta.setAttribute("title",v.currentPage.getName()+" ("+ea+"/"+ha+")"+(null!=za?" ["+za+"]":""))}},va=v.actions.get("delete"),Aa=n("",va.funct,
+null,mxResources.get("delete"),va,Editor.trashImage);Aa.style.opacity="0.3";R.appendChild(Aa);va.addListener("stateChanged",function(){Aa.style.opacity=va.enabled?"":"0.3"});var ya=function(){Y.style.display=0<v.editor.undoManager.history.length||D.isEditing()?"inline-block":"none";ia.style.display=Y.style.display;Y.style.opacity=aa.enabled?"":"0.3";ia.style.opacity=fa.enabled?"":"0.3"};R.appendChild(Y);R.appendChild(ia);aa.addListener("stateChanged",ya);fa.addListener("stateChanged",ya);ya();var ta=
+this.createPageMenuTab(!1,!0);ta.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";K.appendChild(ta);v.editor.addListener("pagesPatched",da);v.editor.addListener("pageSelected",da);v.editor.addListener("pageRenamed",da);v.editor.addListener("fileLoaded",da);da();v.addListener("fileDescriptorChanged",ba);v.addListener("pagesVisibleChanged",ba);v.editor.addListener("pagesPatched",ba);ba();ba=n("",Z.funct,!0,mxResources.get("zoomOut")+
" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Z,Editor.zoomOutImage);K.appendChild(ba);var ca=l.addMenu("100%",M.funct);ca.setAttribute("title",mxResources.get("zoom"));ca.innerHTML="100%";ca.style.display="inline-block";ca.style.color="inherit";ca.style.cursor="pointer";ca.style.textAlign="center";ca.style.whiteSpace="nowrap";ca.style.paddingRight="10px";ca.style.textDecoration="none";ca.style.verticalAlign="top";ca.style.padding="6px 0";ca.style.fontSize="14px";ca.style.width="40px";K.appendChild(ca);
-M=n("",W.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",W,Editor.zoomInImage);K.appendChild(M);"1"==urlParams.embedInline?(K.appendChild(X),M=u.actions.get("exit"),K.appendChild(n("",M.funct,null,mxResources.get("exit"),M,Editor.closeImage))):X.parentNode.removeChild(X);u.tabContainer.style.visibility="hidden";A.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+M=n("",W.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",W,Editor.zoomInImage);K.appendChild(M);"1"==urlParams.embedInline?(K.appendChild(X),M=v.actions.get("exit"),K.appendChild(n("",M.funct,null,mxResources.get("exit"),M,Editor.closeImage))):X.parentNode.removeChild(X);v.tabContainer.style.visibility="hidden";A.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
R.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;";K.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";J.appendChild(R);J.appendChild(K);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");J.appendChild(P);window.setTimeout(function(){mxUtils.setPrefixedStyle(P.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(J)}else{var Pa=n("",S,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ba,Editor.zoomFitImage);A.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";ca=l.addMenu("100%",
-M.funct);ca.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ca.style.whiteSpace="nowrap";ca.style.paddingRight="10px";ca.style.textDecoration="none";ca.style.textDecoration="none";ca.style.overflow="hidden";ca.style.visibility="hidden";ca.style.textAlign="center";ca.style.cursor="pointer";ca.style.height=parseInt(u.tabContainerHeight)-1+"px";ca.style.lineHeight=parseInt(u.tabContainerHeight)+1+"px";ca.style.position="absolute";ca.style.display="block";ca.style.fontSize="12px";ca.style.width=
-"59px";ca.style.right="0px";ca.style.bottom="0px";ca.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ca.style.backgroundPosition="right 6px center";ca.style.backgroundRepeat="no-repeat";J.appendChild(ca)}(function(ha){mxEvent.addListener(ha,"click",S);var ea=mxUtils.bind(this,function(){ha.innerText="";mxUtils.write(ha,Math.round(100*u.editor.graph.view.scale)+"%")});u.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);u.editor.addListener("resetGraphView",ea);u.editor.addListener("pageSelected",
-ea)})(ca);var La=u.setGraphEnabled;u.setGraphEnabled=function(){La.apply(this,arguments);null!=this.tabContainer&&(ca.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==K?this.tabContainerHeight+"px":"0px")}}J.appendChild(A);J.appendChild(u.diagramContainer);y.appendChild(J);u.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==K&&J.appendChild(u.tabContainer);
-var Da=null;v();mxEvent.addListener(window,"resize",function(){v();null!=u.sidebarWindow&&u.sidebarWindow.window.fit();null!=u.formatWindow&&u.formatWindow.window.fit();null!=u.actions.outlineWindow&&u.actions.outlineWindow.window.fit();null!=u.actions.layersWindow&&u.actions.layersWindow.window.fit();null!=u.menus.tagsWindow&&u.menus.tagsWindow.window.fit();null!=u.menus.findWindow&&u.menus.findWindow.window.fit();null!=u.menus.findReplaceWindow&&u.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";P.style.transform="";mxEvent.addGestureListeners(u.diagramContainer.parentNode,function(ha){mxEvent.getSource(ha)==u.diagramContainer.parentNode&&(u.embedExitPoint=new mxPoint(mxEvent.getClientX(ha),mxEvent.getClientY(ha)),u.sendEmbeddedSvgExport())});y=document.createElement("div");y.style.position="absolute";y.style.width="10px";y.style.height="10px";y.style.borderRadius="5px";y.style.border="1px solid gray";y.style.background="#ffffff";y.style.cursor=
-"row-resize";u.diagramContainer.parentNode.appendChild(y);u.bottomResizer=y;var Ia=null,qa=null,Na=null,wa=null;mxEvent.addGestureListeners(y,function(ha){wa=parseInt(u.diagramContainer.style.height);qa=mxEvent.getClientY(ha);D.popupMenuHandler.hideMenu();mxEvent.consume(ha)});y=y.cloneNode(!1);y.style.cursor="col-resize";u.diagramContainer.parentNode.appendChild(y);u.rightResizer=y;mxEvent.addGestureListeners(y,function(ha){Na=parseInt(u.diagramContainer.style.width);Ia=mxEvent.getClientX(ha);D.popupMenuHandler.hideMenu();
-mxEvent.consume(ha)});mxEvent.addGestureListeners(document.body,null,function(ha){var ea=!1;null!=Ia&&(u.diagramContainer.style.width=Math.max(20,Na+mxEvent.getClientX(ha)-Ia)+"px",ea=!0);null!=qa&&(u.diagramContainer.style.height=Math.max(20,wa+mxEvent.getClientY(ha)-qa)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:u.diagramContainer.getBoundingClientRect()}),"*"),V(),u.refresh())},function(ha){null==Ia&&null==
-qa||mxEvent.consume(ha);qa=Ia=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";u.bottomResizer.style.visibility="hidden";u.rightResizer.style.visibility="hidden";R.style.visibility="hidden";K.style.visibility="hidden";P.style.display="none"}"1"==urlParams.prefetchFonts&&u.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,t,x,C){var G=t.y,H=t.x,I=!1,F=!1;if(null!=this.states&&null!=d&&null!=t){var O=this,c=new mxCellState,e=this.graph.getView().scale,g=Math.max(2,this.getGuideTolerance()/2);c.x=d.x+H;c.y=d.y+G;c.width=d.width;c.height=d.height;for(var n=[],p=[],v=0;v<this.states.length;v++){var y=this.states[v];y instanceof mxCellState&&(C||!this.graph.isCellSelected(y.cell))&&((c.x>=y.x&&c.x<=y.x+y.width||y.x>=c.x&&y.x<=c.x+c.width)&&(c.y>
-y.y+y.height+4||c.y+c.height+4<y.y)?n.push(y):(c.y>=y.y&&c.y<=y.y+y.height||y.y>=c.y&&y.y<=c.y+c.height)&&(c.x>y.x+y.width+4||c.x+c.width+4<y.x)&&p.push(y))}var u=0,D=0,A=y=0,U=0,l=0,q=0,B=0,J=5*e;if(1<n.length){n.push(c);n.sort(function(P,R){return P.y-R.y});var M=!1;v=c==n[0];e=c==n[n.length-1];if(!v&&!e)for(v=1;v<n.length-1;v++)if(c==n[v]){e=n[v-1];v=n[v+1];y=D=A=(v.y-e.y-e.height-c.height)/2;break}for(v=0;v<n.length-1;v++){e=n[v];var E=n[v+1],K=c==e||c==E;E=E.y-e.y-e.height;M|=c==e;if(0==D&&0==
-u)D=E,u=1;else if(Math.abs(D-E)<=(K||1==v&&M?g:0))u+=1;else if(1<u&&M){n=n.slice(0,v+1);break}else if(3<=n.length-v&&!M)u=0,y=D=0!=A?A:0,n.splice(0,0==v?1:v),v=-1;else break;0!=y||K||(D=y=E)}3==n.length&&n[1]==c&&(y=0)}if(1<p.length){p.push(c);p.sort(function(P,R){return P.x-R.x});M=!1;v=c==p[0];e=c==p[p.length-1];if(!v&&!e)for(v=1;v<p.length-1;v++)if(c==p[v]){e=p[v-1];v=p[v+1];q=l=B=(v.x-e.x-e.width-c.width)/2;break}for(v=0;v<p.length-1;v++){e=p[v];E=p[v+1];K=c==e||c==E;E=E.x-e.x-e.width;M|=c==e;
-if(0==l&&0==U)l=E,U=1;else if(Math.abs(l-E)<=(K||1==v&&M?g:0))U+=1;else if(1<U&&M){p=p.slice(0,v+1);break}else if(3<=p.length-v&&!M)U=0,q=l=0!=B?B:0,p.splice(0,0==v?1:v),v=-1;else break;0!=q||K||(l=q=E)}3==p.length&&p[1]==c&&(q=0)}g=function(P,R,V,X){var m=[];if(X){X=J;var z=0}else X=0,z=J;m.push(new mxPoint(P.x-X,P.y-z));m.push(new mxPoint(P.x+X,P.y+z));m.push(P);m.push(R);m.push(new mxPoint(R.x-X,R.y-z));m.push(new mxPoint(R.x+X,R.y+z));if(null!=V)return V.points=m,V;P=new mxPolyline(m,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);P.dialect=mxConstants.DIALECT_SVG;P.pointerEvents=!1;P.init(O.graph.getView().getOverlayPane());return P};l=function(P,R){if(P&&null!=O.guidesArrHor)for(P=0;P<O.guidesArrHor.length;P++)O.guidesArrHor[P].node.style.visibility="hidden";if(R&&null!=O.guidesArrVer)for(P=0;P<O.guidesArrVer.length;P++)O.guidesArrVer[P].node.style.visibility="hidden"};if(1<U&&U==p.length-1){U=[];B=O.guidesArrHor;I=[];H=0;v=p[0]==c?1:0;M=p[v].y+p[v].height;if(0<q)for(v=0;v<p.length-1;v++)e=
-p[v],E=p[v+1],c==e?(H=E.x-e.width-q,I.push(new mxPoint(H+e.width+J,M)),I.push(new mxPoint(E.x-J,M))):c==E?(I.push(new mxPoint(e.x+e.width+J,M)),H=e.x+e.width+q,I.push(new mxPoint(H-J,M))):(I.push(new mxPoint(e.x+e.width+J,M)),I.push(new mxPoint(E.x-J,M)));else e=p[0],v=p[2],H=e.x+e.width+(v.x-e.x-e.width-c.width)/2,I.push(new mxPoint(e.x+e.width+J,M)),I.push(new mxPoint(H-J,M)),I.push(new mxPoint(H+c.width+J,M)),I.push(new mxPoint(v.x-J,M));for(v=0;v<I.length;v+=2)p=I[v],q=I[v+1],p=g(p,q,null!=B?
-B[v/2]:null),p.node.style.visibility="visible",p.redraw(),U.push(p);for(v=I.length/2;null!=B&&v<B.length;v++)B[v].destroy();O.guidesArrHor=U;H-=d.x;I=!0}else l(!0);if(1<u&&u==n.length-1){U=[];B=O.guidesArrVer;F=[];G=0;v=n[0]==c?1:0;u=n[v].x+n[v].width;if(0<y)for(v=0;v<n.length-1;v++)e=n[v],E=n[v+1],c==e?(G=E.y-e.height-y,F.push(new mxPoint(u,G+e.height+J)),F.push(new mxPoint(u,E.y-J))):c==E?(F.push(new mxPoint(u,e.y+e.height+J)),G=e.y+e.height+y,F.push(new mxPoint(u,G-J))):(F.push(new mxPoint(u,e.y+
-e.height+J)),F.push(new mxPoint(u,E.y-J)));else e=n[0],v=n[2],G=e.y+e.height+(v.y-e.y-e.height-c.height)/2,F.push(new mxPoint(u,e.y+e.height+J)),F.push(new mxPoint(u,G-J)),F.push(new mxPoint(u,G+c.height+J)),F.push(new mxPoint(u,v.y-J));for(v=0;v<F.length;v+=2)p=F[v],q=F[v+1],p=g(p,q,null!=B?B[v/2]:null,!0),p.node.style.visibility="visible",p.redraw(),U.push(p);for(v=F.length/2;null!=B&&v<B.length;v++)B[v].destroy();O.guidesArrVer=U;G-=d.y;F=!0}else l(!1,!0)}if(I||F)return c=new mxPoint(H,G),n=b.call(this,
-d,c,x,C),I&&!F?c.y=n.y:F&&!I&&(c.x=n.x),n.y!=c.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),n.x!=c.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),c;l(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var t=this.guidesArrVer,x=this.guidesArrHor;if(null!=t)for(var C=0;C<t.length;C++)t[C].node.style.visibility=d?"visible":"hidden";if(null!=
-x)for(C=0;C<x.length;C++)x[C].node.style.visibility=d?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var d=this.guidesArrVer,t=this.guidesArrHor;if(null!=d){for(var x=0;x<d.length;x++)d[x].destroy();this.guidesArrVer=null}if(null!=t){for(x=0;x<t.length;x++)t[x].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,k,d){function t(){var u=b.diagramContainer;O.style.top=u.offsetTop-H+"px";O.style.left=u.offsetLeft-H+"px";O.style.width=(k?0:u.offsetWidth)+H+"px";O.style.height=(k?u.offsetHeight:0)+H+"px"}function x(u,D,A){if(null!=C)return u;var U;return function(){var l=this,q=arguments,B=A&&!U;clearTimeout(U);U=setTimeout(function(){U=null;A||u.apply(l,q)},D);B&&u.apply(l,q)}}var C=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
-G=window.cancelAnimationFrame||window.mozCancelAnimationFrame,H=this.RULER_THICKNESS,I=this;this.unit=f;var F=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"},O=document.createElement("div");O.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){F=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"};O.style.background=F.bkgClr;O.style[k?"borderRight":"borderBottom"]="0.5px solid "+F.strokeClr;O.style.borderLeft="0.5px solid "+F.strokeClr});this.updateStyle();document.body.appendChild(O);mxEvent.disableContextMenu(O);this.editorUiRefresh=b.refresh;b.refresh=
-function(u){I.editorUiRefresh.apply(b,arguments);t()};t();var c=document.createElement("canvas");c.width=O.offsetWidth;c.height=O.offsetHeight;O.style.overflow="hidden";c.style.position="relative";O.appendChild(c);var e=c.getContext("2d");this.ui=b;var g=b.editor.graph;this.graph=g;this.container=O;this.canvas=c;var n=function(u,D,A,U,l){u=Math.round(u);D=Math.round(D);A=Math.round(A);U=Math.round(U);e.beginPath();e.moveTo(u+.5,D+.5);e.lineTo(A+.5,U+.5);e.stroke();l&&(k?(e.save(),e.translate(u,D),
-e.rotate(-Math.PI/2),e.fillText(l,0,0),e.restore()):e.fillText(l,u,D))},p=function(){e.clearRect(0,0,c.width,c.height);e.beginPath();e.lineWidth=.7;e.strokeStyle=F.strokeClr;e.setLineDash([]);e.font="9px Arial";e.textAlign="center";var u=g.view.scale,D=g.view.getBackgroundPageBounds(),A=g.view.translate,U=g.pageVisible;A=U?H+(k?D.y-g.container.scrollTop:D.x-g.container.scrollLeft):H+(k?A.y*u-g.container.scrollTop:A.x*u-g.container.scrollLeft);var l=0;U&&(l=g.getPageLayout(),l=k?l.y*g.pageFormat.height:
-l.x*g.pageFormat.width);var q;switch(I.unit){case mxConstants.POINTS:var B=q=10;var J=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:q=10;B=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:q=20;B=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:q=.5>=u||4<=u?8:16,B=mxConstants.PIXELS_PER_INCH/q,J=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var M=B;2<=u?M=B/(2*Math.floor(u/2)):.5>=u&&(M=B*Math.floor(1/u/2)*(I.unit==
-mxConstants.MILLIMETERS?2:1));B=null;D=U?Math.min(A+(k?D.height:D.width),k?c.height:c.width):k?c.height:c.width;if(U)if(e.fillStyle=F.outBkgClr,k){var E=A-H;0<E&&e.fillRect(0,H,H,E);D<c.height&&e.fillRect(0,D,H,c.height)}else E=A-H,0<E&&e.fillRect(H,0,E,H),D<c.width&&e.fillRect(D,0,c.width,H);e.fillStyle=F.fontClr;for(U=U?A:A%(M*u);U<=D;U+=M*u)if(E=Math.round((U-A)/u/M),!(U<H||E==B)){B=E;var K=null;0==E%q&&(K=I.formatText(l+E*M)+"");k?n(H-J[Math.abs(E)%q],U,H,U,K):n(U,H-J[Math.abs(E)%q],U,H,K)}e.lineWidth=
-1;n(k?0:H,k?H:0,H,H);e.fillStyle=F.cornerClr;e.fillRect(0,0,H,H)},v=-1,y=function(){null!=C?(null!=G&&G(v),v=C(p)):p()};this.drawRuler=y;this.sizeListener=f=x(function(){var u=g.container;k?(u=u.offsetHeight+H,c.height!=u&&(c.height=u,O.style.height=u+"px",y())):(u=u.offsetWidth+H,c.width!=u&&(c.width=u,O.style.width=u+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=d=x(function(){var u=k?g.container.scrollTop:g.container.scrollLeft;I.lastScroll!=u&&(I.lastScroll=u,y())},10);
-this.unitListener=function(u,D){I.setUnit(D.getProperty("unit"))};g.addListener(mxEvent.SIZE,f);g.container.addEventListener("scroll",d);g.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(u){F=u;O.style.background=F.bkgClr;p()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(u,D,A,U){if(k&&4<u.height||
-!k&&4<u.width){if(null!=I.guidePart)try{e.putImageData(I.guidePart.imgData1,I.guidePart.x1,I.guidePart.y1),e.putImageData(I.guidePart.imgData2,I.guidePart.x2,I.guidePart.y2),e.putImageData(I.guidePart.imgData3,I.guidePart.x3,I.guidePart.y3)}catch(X){}var l=I.origGuideMove.apply(this,arguments);try{e.lineWidth=.5;e.strokeStyle=F.guideClr;e.setLineDash([2]);if(k){var q=u.y+l.y+H-this.graph.container.scrollTop;var B=0;var J=q+u.height/2;var M=H/2;var E=q+u.height;var K=0;var P=e.getImageData(B,q-1,H,
-3);n(B,q,H,q);q--;var R=e.getImageData(M,J-1,H,3);n(M,J,H,J);J--;var V=e.getImageData(K,E-1,H,3);n(K,E,H,E);E--}else q=0,B=u.x+l.x+H-this.graph.container.scrollLeft,J=H/2,M=B+u.width/2,E=0,K=B+u.width,P=e.getImageData(B-1,q,3,H),n(B,q,B,H),B--,R=e.getImageData(M-1,J,3,H),n(M,J,M,H),M--,V=e.getImageData(K-1,E,3,H),n(K,E,K,H),K--;if(null==I.guidePart||I.guidePart.x1!=B||I.guidePart.y1!=q)I.guidePart={imgData1:P,x1:B,y1:q,imgData2:R,x2:M,y2:J,imgData3:V,x3:K,y3:E}}catch(X){}}else l=I.origGuideMove.apply(this,
-arguments);return l};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var u=I.origGuideDestroy.apply(this,arguments);if(null!=I.guidePart)try{e.putImageData(I.guidePart.imgData1,I.guidePart.x1,I.guidePart.y1),e.putImageData(I.guidePart.imgData2,I.guidePart.x2,I.guidePart.y2),e.putImageData(I.guidePart.imgData3,I.guidePart.x3,I.guidePart.y3),I.guidePart=null}catch(D){}return u}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+M.funct);ca.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ca.style.whiteSpace="nowrap";ca.style.paddingRight="10px";ca.style.textDecoration="none";ca.style.textDecoration="none";ca.style.overflow="hidden";ca.style.visibility="hidden";ca.style.textAlign="center";ca.style.cursor="pointer";ca.style.height=parseInt(v.tabContainerHeight)-1+"px";ca.style.lineHeight=parseInt(v.tabContainerHeight)+1+"px";ca.style.position="absolute";ca.style.display="block";ca.style.fontSize="12px";ca.style.width=
+"59px";ca.style.right="0px";ca.style.bottom="0px";ca.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ca.style.backgroundPosition="right 6px center";ca.style.backgroundRepeat="no-repeat";J.appendChild(ca)}(function(ha){mxEvent.addListener(ha,"click",S);var ea=mxUtils.bind(this,function(){ha.innerText="";mxUtils.write(ha,Math.round(100*v.editor.graph.view.scale)+"%")});v.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);v.editor.addListener("resetGraphView",ea);v.editor.addListener("pageSelected",
+ea)})(ca);var La=v.setGraphEnabled;v.setGraphEnabled=function(){La.apply(this,arguments);null!=this.tabContainer&&(ca.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==K?this.tabContainerHeight+"px":"0px")}}J.appendChild(A);J.appendChild(v.diagramContainer);y.appendChild(J);v.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==K&&J.appendChild(v.tabContainer);
+var Da=null;t();mxEvent.addListener(window,"resize",function(){t();null!=v.sidebarWindow&&v.sidebarWindow.window.fit();null!=v.formatWindow&&v.formatWindow.window.fit();null!=v.actions.outlineWindow&&v.actions.outlineWindow.window.fit();null!=v.actions.layersWindow&&v.actions.layersWindow.window.fit();null!=v.menus.tagsWindow&&v.menus.tagsWindow.window.fit();null!=v.menus.findWindow&&v.menus.findWindow.window.fit();null!=v.menus.findReplaceWindow&&v.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";P.style.transform="";mxEvent.addGestureListeners(v.diagramContainer.parentNode,function(ha){mxEvent.getSource(ha)==v.diagramContainer.parentNode&&(v.embedExitPoint=new mxPoint(mxEvent.getClientX(ha),mxEvent.getClientY(ha)),v.sendEmbeddedSvgExport())});y=document.createElement("div");y.style.position="absolute";y.style.width="10px";y.style.height="10px";y.style.borderRadius="5px";y.style.border="1px solid gray";y.style.background="#ffffff";y.style.cursor=
+"row-resize";v.diagramContainer.parentNode.appendChild(y);v.bottomResizer=y;var Ia=null,qa=null,Na=null,wa=null;mxEvent.addGestureListeners(y,function(ha){wa=parseInt(v.diagramContainer.style.height);qa=mxEvent.getClientY(ha);D.popupMenuHandler.hideMenu();mxEvent.consume(ha)});y=y.cloneNode(!1);y.style.cursor="col-resize";v.diagramContainer.parentNode.appendChild(y);v.rightResizer=y;mxEvent.addGestureListeners(y,function(ha){Na=parseInt(v.diagramContainer.style.width);Ia=mxEvent.getClientX(ha);D.popupMenuHandler.hideMenu();
+mxEvent.consume(ha)});mxEvent.addGestureListeners(document.body,null,function(ha){var ea=!1;null!=Ia&&(v.diagramContainer.style.width=Math.max(20,Na+mxEvent.getClientX(ha)-Ia)+"px",ea=!0);null!=qa&&(v.diagramContainer.style.height=Math.max(20,wa+mxEvent.getClientY(ha)-qa)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:v.diagramContainer.getBoundingClientRect()}),"*"),V(),v.refresh())},function(ha){null==Ia&&null==
+qa||mxEvent.consume(ha);qa=Ia=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";v.bottomResizer.style.visibility="hidden";v.rightResizer.style.visibility="hidden";R.style.visibility="hidden";K.style.visibility="hidden";P.style.display="none"}"1"==urlParams.prefetchFonts&&v.editor.loadFonts()}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var g=EditorUi.initTheme;EditorUi.initTheme=function(){g.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,q,x,C){var G=q.y,H=q.x,I=!1,E=!1;if(null!=this.states&&null!=d&&null!=q){var O=this,c=new mxCellState,e=this.graph.getView().scale,f=Math.max(2,this.getGuideTolerance()/2);c.x=d.x+H;c.y=d.y+G;c.width=d.width;c.height=d.height;for(var n=[],p=[],t=0;t<this.states.length;t++){var y=this.states[t];y instanceof mxCellState&&(C||!this.graph.isCellSelected(y.cell))&&((c.x>=y.x&&c.x<=y.x+y.width||y.x>=c.x&&y.x<=c.x+c.width)&&(c.y>
+y.y+y.height+4||c.y+c.height+4<y.y)?n.push(y):(c.y>=y.y&&c.y<=y.y+y.height||y.y>=c.y&&y.y<=c.y+c.height)&&(c.x>y.x+y.width+4||c.x+c.width+4<y.x)&&p.push(y))}var v=0,D=0,A=y=0,U=0,l=0,u=0,B=0,J=5*e;if(1<n.length){n.push(c);n.sort(function(P,R){return P.y-R.y});var M=!1;t=c==n[0];e=c==n[n.length-1];if(!t&&!e)for(t=1;t<n.length-1;t++)if(c==n[t]){e=n[t-1];t=n[t+1];y=D=A=(t.y-e.y-e.height-c.height)/2;break}for(t=0;t<n.length-1;t++){e=n[t];var F=n[t+1],K=c==e||c==F;F=F.y-e.y-e.height;M|=c==e;if(0==D&&0==
+v)D=F,v=1;else if(Math.abs(D-F)<=(K||1==t&&M?f:0))v+=1;else if(1<v&&M){n=n.slice(0,t+1);break}else if(3<=n.length-t&&!M)v=0,y=D=0!=A?A:0,n.splice(0,0==t?1:t),t=-1;else break;0!=y||K||(D=y=F)}3==n.length&&n[1]==c&&(y=0)}if(1<p.length){p.push(c);p.sort(function(P,R){return P.x-R.x});M=!1;t=c==p[0];e=c==p[p.length-1];if(!t&&!e)for(t=1;t<p.length-1;t++)if(c==p[t]){e=p[t-1];t=p[t+1];u=l=B=(t.x-e.x-e.width-c.width)/2;break}for(t=0;t<p.length-1;t++){e=p[t];F=p[t+1];K=c==e||c==F;F=F.x-e.x-e.width;M|=c==e;
+if(0==l&&0==U)l=F,U=1;else if(Math.abs(l-F)<=(K||1==t&&M?f:0))U+=1;else if(1<U&&M){p=p.slice(0,t+1);break}else if(3<=p.length-t&&!M)U=0,u=l=0!=B?B:0,p.splice(0,0==t?1:t),t=-1;else break;0!=u||K||(l=u=F)}3==p.length&&p[1]==c&&(u=0)}f=function(P,R,V,X){var m=[];if(X){X=J;var z=0}else X=0,z=J;m.push(new mxPoint(P.x-X,P.y-z));m.push(new mxPoint(P.x+X,P.y+z));m.push(P);m.push(R);m.push(new mxPoint(R.x-X,R.y-z));m.push(new mxPoint(R.x+X,R.y+z));if(null!=V)return V.points=m,V;P=new mxPolyline(m,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);P.dialect=mxConstants.DIALECT_SVG;P.pointerEvents=!1;P.init(O.graph.getView().getOverlayPane());return P};l=function(P,R){if(P&&null!=O.guidesArrHor)for(P=0;P<O.guidesArrHor.length;P++)O.guidesArrHor[P].node.style.visibility="hidden";if(R&&null!=O.guidesArrVer)for(P=0;P<O.guidesArrVer.length;P++)O.guidesArrVer[P].node.style.visibility="hidden"};if(1<U&&U==p.length-1){U=[];B=O.guidesArrHor;I=[];H=0;t=p[0]==c?1:0;M=p[t].y+p[t].height;if(0<u)for(t=0;t<p.length-1;t++)e=
+p[t],F=p[t+1],c==e?(H=F.x-e.width-u,I.push(new mxPoint(H+e.width+J,M)),I.push(new mxPoint(F.x-J,M))):c==F?(I.push(new mxPoint(e.x+e.width+J,M)),H=e.x+e.width+u,I.push(new mxPoint(H-J,M))):(I.push(new mxPoint(e.x+e.width+J,M)),I.push(new mxPoint(F.x-J,M)));else e=p[0],t=p[2],H=e.x+e.width+(t.x-e.x-e.width-c.width)/2,I.push(new mxPoint(e.x+e.width+J,M)),I.push(new mxPoint(H-J,M)),I.push(new mxPoint(H+c.width+J,M)),I.push(new mxPoint(t.x-J,M));for(t=0;t<I.length;t+=2)p=I[t],u=I[t+1],p=f(p,u,null!=B?
+B[t/2]:null),p.node.style.visibility="visible",p.redraw(),U.push(p);for(t=I.length/2;null!=B&&t<B.length;t++)B[t].destroy();O.guidesArrHor=U;H-=d.x;I=!0}else l(!0);if(1<v&&v==n.length-1){U=[];B=O.guidesArrVer;E=[];G=0;t=n[0]==c?1:0;v=n[t].x+n[t].width;if(0<y)for(t=0;t<n.length-1;t++)e=n[t],F=n[t+1],c==e?(G=F.y-e.height-y,E.push(new mxPoint(v,G+e.height+J)),E.push(new mxPoint(v,F.y-J))):c==F?(E.push(new mxPoint(v,e.y+e.height+J)),G=e.y+e.height+y,E.push(new mxPoint(v,G-J))):(E.push(new mxPoint(v,e.y+
+e.height+J)),E.push(new mxPoint(v,F.y-J)));else e=n[0],t=n[2],G=e.y+e.height+(t.y-e.y-e.height-c.height)/2,E.push(new mxPoint(v,e.y+e.height+J)),E.push(new mxPoint(v,G-J)),E.push(new mxPoint(v,G+c.height+J)),E.push(new mxPoint(v,t.y-J));for(t=0;t<E.length;t+=2)p=E[t],u=E[t+1],p=f(p,u,null!=B?B[t/2]:null,!0),p.node.style.visibility="visible",p.redraw(),U.push(p);for(t=E.length/2;null!=B&&t<B.length;t++)B[t].destroy();O.guidesArrVer=U;G-=d.y;E=!0}else l(!1,!0)}if(I||E)return c=new mxPoint(H,G),n=b.call(this,
+d,c,x,C),I&&!E?c.y=n.y:E&&!I&&(c.x=n.x),n.y!=c.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),n.x!=c.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),c;l(!0,!0);return b.apply(this,arguments)};var g=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){g.call(this,d);var q=this.guidesArrVer,x=this.guidesArrHor;if(null!=q)for(var C=0;C<q.length;C++)q[C].node.style.visibility=d?"visible":"hidden";if(null!=
+x)for(C=0;C<x.length;C++)x[C].node.style.visibility=d?"visible":"hidden"};var k=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){k.call(this);var d=this.guidesArrVer,q=this.guidesArrHor;if(null!=d){for(var x=0;x<d.length;x++)d[x].destroy();this.guidesArrVer=null}if(null!=q){for(x=0;x<q.length;x++)q[x].destroy();this.guidesArrHor=null}}})();function mxRuler(b,g,k,d){function q(){var v=b.diagramContainer;O.style.top=v.offsetTop-H+"px";O.style.left=v.offsetLeft-H+"px";O.style.width=(k?0:v.offsetWidth)+H+"px";O.style.height=(k?v.offsetHeight:0)+H+"px"}function x(v,D,A){if(null!=C)return v;var U;return function(){var l=this,u=arguments,B=A&&!U;clearTimeout(U);U=setTimeout(function(){U=null;A||v.apply(l,u)},D);B&&v.apply(l,u)}}var C=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+G=window.cancelAnimationFrame||window.mozCancelAnimationFrame,H=this.RULER_THICKNESS,I=this;this.unit=g;var E=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"},O=document.createElement("div");O.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){E=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"};O.style.background=E.bkgClr;O.style[k?"borderRight":"borderBottom"]="0.5px solid "+E.strokeClr;O.style.borderLeft="0.5px solid "+E.strokeClr});this.updateStyle();document.body.appendChild(O);mxEvent.disableContextMenu(O);this.editorUiRefresh=b.refresh;b.refresh=
+function(v){I.editorUiRefresh.apply(b,arguments);q()};q();var c=document.createElement("canvas");c.width=O.offsetWidth;c.height=O.offsetHeight;O.style.overflow="hidden";c.style.position="relative";O.appendChild(c);var e=c.getContext("2d");this.ui=b;var f=b.editor.graph;this.graph=f;this.container=O;this.canvas=c;var n=function(v,D,A,U,l){v=Math.round(v);D=Math.round(D);A=Math.round(A);U=Math.round(U);e.beginPath();e.moveTo(v+.5,D+.5);e.lineTo(A+.5,U+.5);e.stroke();l&&(k?(e.save(),e.translate(v,D),
+e.rotate(-Math.PI/2),e.fillText(l,0,0),e.restore()):e.fillText(l,v,D))},p=function(){e.clearRect(0,0,c.width,c.height);e.beginPath();e.lineWidth=.7;e.strokeStyle=E.strokeClr;e.setLineDash([]);e.font="9px Arial";e.textAlign="center";var v=f.view.scale,D=f.view.getBackgroundPageBounds(),A=f.view.translate,U=f.pageVisible;A=U?H+(k?D.y-f.container.scrollTop:D.x-f.container.scrollLeft):H+(k?A.y*v-f.container.scrollTop:A.x*v-f.container.scrollLeft);var l=0;U&&(l=f.getPageLayout(),l=k?l.y*f.pageFormat.height:
+l.x*f.pageFormat.width);var u;switch(I.unit){case mxConstants.POINTS:var B=u=10;var J=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:u=10;B=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:u=20;B=mxConstants.PIXELS_PER_MM;J=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:u=.5>=v||4<=v?8:16,B=mxConstants.PIXELS_PER_INCH/u,J=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var M=B;2<=v?M=B/(2*Math.floor(v/2)):.5>=v&&(M=B*Math.floor(1/v/2)*(I.unit==
+mxConstants.MILLIMETERS?2:1));B=null;D=U?Math.min(A+(k?D.height:D.width),k?c.height:c.width):k?c.height:c.width;if(U)if(e.fillStyle=E.outBkgClr,k){var F=A-H;0<F&&e.fillRect(0,H,H,F);D<c.height&&e.fillRect(0,D,H,c.height)}else F=A-H,0<F&&e.fillRect(H,0,F,H),D<c.width&&e.fillRect(D,0,c.width,H);e.fillStyle=E.fontClr;for(U=U?A:A%(M*v);U<=D;U+=M*v)if(F=Math.round((U-A)/v/M),!(U<H||F==B)){B=F;var K=null;0==F%u&&(K=I.formatText(l+F*M)+"");k?n(H-J[Math.abs(F)%u],U,H,U,K):n(U,H-J[Math.abs(F)%u],U,H,K)}e.lineWidth=
+1;n(k?0:H,k?H:0,H,H);e.fillStyle=E.cornerClr;e.fillRect(0,0,H,H)},t=-1,y=function(){null!=C?(null!=G&&G(t),t=C(p)):p()};this.drawRuler=y;this.sizeListener=g=x(function(){var v=f.container;k?(v=v.offsetHeight+H,c.height!=v&&(c.height=v,O.style.height=v+"px",y())):(v=v.offsetWidth+H,c.width!=v&&(c.width=v,O.style.width=v+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=d=x(function(){var v=k?f.container.scrollTop:f.container.scrollLeft;I.lastScroll!=v&&(I.lastScroll=v,y())},10);
+this.unitListener=function(v,D){I.setUnit(D.getProperty("unit"))};f.addListener(mxEvent.SIZE,g);f.container.addEventListener("scroll",d);f.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(v){E=v;O.style.background=E.bkgClr;p()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(v,D,A,U){if(k&&4<v.height||
+!k&&4<v.width){if(null!=I.guidePart)try{e.putImageData(I.guidePart.imgData1,I.guidePart.x1,I.guidePart.y1),e.putImageData(I.guidePart.imgData2,I.guidePart.x2,I.guidePart.y2),e.putImageData(I.guidePart.imgData3,I.guidePart.x3,I.guidePart.y3)}catch(X){}var l=I.origGuideMove.apply(this,arguments);try{e.lineWidth=.5;e.strokeStyle=E.guideClr;e.setLineDash([2]);if(k){var u=v.y+l.y+H-this.graph.container.scrollTop;var B=0;var J=u+v.height/2;var M=H/2;var F=u+v.height;var K=0;var P=e.getImageData(B,u-1,H,
+3);n(B,u,H,u);u--;var R=e.getImageData(M,J-1,H,3);n(M,J,H,J);J--;var V=e.getImageData(K,F-1,H,3);n(K,F,H,F);F--}else u=0,B=v.x+l.x+H-this.graph.container.scrollLeft,J=H/2,M=B+v.width/2,F=0,K=B+v.width,P=e.getImageData(B-1,u,3,H),n(B,u,B,H),B--,R=e.getImageData(M-1,J,3,H),n(M,J,M,H),M--,V=e.getImageData(K-1,F,3,H),n(K,F,K,H),K--;if(null==I.guidePart||I.guidePart.x1!=B||I.guidePart.y1!=u)I.guidePart={imgData1:P,x1:B,y1:u,imgData2:R,x2:M,y2:J,imgData3:V,x3:K,y3:F}}catch(X){}}else l=I.origGuideMove.apply(this,
+arguments);return l};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var v=I.origGuideDestroy.apply(this,arguments);if(null!=I.guidePart)try{e.putImageData(I.guidePart.imgData1,I.guidePart.x1,I.guidePart.y1),e.putImageData(I.guidePart.imgData2,I.guidePart.x2,I.guidePart.y2),e.putImageData(I.guidePart.imgData3,I.guidePart.x3,I.guidePart.y3),I.guidePart=null}catch(D){}return v}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
-function mxDualRuler(b,f){var k=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return k};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(d){var t=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
-function(x){t=null!=b.currentMenu;mxEvent.consume(x)}),null,mxUtils.bind(this,function(x){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(x)||mxEvent.isPopupTrigger(x))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(x)||!t){var C=new mxPopupMenu(mxUtils.bind(this,function(I,F){b.menus.addMenuItems(I,["points","inches","millimeters","meters"],F)}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=
-!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);b.resetCurrentMenu();C.destroy()});var G=mxEvent.getClientX(x),H=mxEvent.getClientY(x);C.popup(G,H,null,x);b.setCurrentMenu(C,d)}mxEvent.consume(x)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,t=[],x,C=[],G,H=!1,I=!0,F=!0,O=!0,c=!0,e=[],g=!1,n=!1,p=!1,v={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},y=!0;this.setClosedPath=function(J){H=J};this.setAutoClose=function(J){I=J};this.setAutoInsert=
-function(J){F=J};this.setAutoScroll=function(J){O=J};this.setOpenFill=function(J){c=J};this.setStopClickEnabled=function(J){n=J};this.setSelectInserted=function(J){p=J};this.setSmoothing=function(J){k=J};this.setPerfectFreehandMode=function(J){y=J};this.isPerfectFreehandMode=function(){return y};this.setBrushSize=function(J){v.size=J};this.getBrushSize=function(){return v.size};var u=function(J){g=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);
-b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){u(!0)};this.isDrawing=function(){return g};var D=mxUtils.bind(this,function(J){if(d){var M=G.length,E=n&&0<C.length&&null!=G&&2>G.length;E||C.push.apply(C,G);G=[];C.push(null);t.push(d);d=null;(E||F)&&this.stopDrawing();F&&(!E||2<=M)&&this.startDrawing();mxEvent.consume(J)}}),A=new mxCell;A.edge=!0;var U=function(){var J=b.getCurrentCellStyle(A);J=mxUtils.getValue(b.currentVertexStyle,
-mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==J&&(J=b.shapeForegroundColor);return J};this.createStyle=function(J){var M=";fillColor=none;";y&&(M=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+J+M};this.stopDrawing=function(){if(0<t.length){if(y){for(var J=[],M=0;M<C.length;M++)null!=C[M]&&J.push([C[M].x,C[M].y]);J=PerfectFreehand.getStroke(J,v);C=[];for(M=0;M<J.length;M++)C.push({x:J[M][0],y:J[M][1]});C.push(null)}J=C[0].x;var E=C[0].x,K=
-C[0].y,P=C[0].y;for(M=1;M<C.length;M++)null!=C[M]&&(J=Math.max(J,C[M].x),E=Math.min(E,C[M].x),K=Math.max(K,C[M].y),P=Math.min(P,C[M].y));J-=E;K-=P;if(0<J&&0<K){var R=100/J,V=100/K;C.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-E)*R;Q.y=(Q.y-P)*V;return Q});var X='<shape strokewidth="inherit"><foreground>',m=0;for(M=0;M<C.length;M++){var z=C[M];if(null==z){z=!1;m=C[m];var L=C[M-1];!H&&I&&(z=m.x-L.x,L=m.y-L.y,z=Math.sqrt(z*z+L*L)<=b.tolerance);if(H||z)X+='<line x="'+m.x.toFixed(2)+'" y="'+m.y.toFixed(2)+
-'"/>';X+="</path>"+(c||H||z?"<fillstroke/>":"<stroke/>");m=M+1}else X=M==m?X+('<path><move x="'+z.x.toFixed(2)+'" y="'+z.y.toFixed(2)+'"/>'):X+('<line x="'+z.x.toFixed(2)+'" y="'+z.y.toFixed(2)+'"/>')}X+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){M=this.createStyle("stencil("+Graph.compress(X)+")");X=b.view.scale;m=b.view.translate;M=new mxCell("",new mxGeometry(E/X-m.x,P/X-m.y,J/X,K/X),M);M.vertex=1;b.model.beginUpdate();try{M=b.addCell(M),b.fireEvent(new mxEventObject("cellsInserted",
-"cells",[M])),b.fireEvent(new mxEventObject("freehandInserted","cell",M))}finally{b.model.endUpdate()}p&&b.setSelectionCells([M])}}for(M=0;M<t.length;M++)t[M].parentNode.removeChild(t[M]);d=null;t=[];C=[]}u(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,M){J=M.getProperty("eventName");M=M.getProperty("event");J==mxEvent.MOUSE_MOVE&&g&&(null!=M.sourceState&&M.sourceState.setCursor("crosshair"),M.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(J,M){if(b.isEnabled()&&
-!b.isCellLocked(b.getDefaultParent())&&(J=M.getEvent(),g&&!mxEvent.isPopupTrigger(J)&&!mxEvent.isMultiTouchEvent(J))){var E=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);E=Math.max(1,E*b.view.scale);var K=U();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",y?K:"none");d.setAttribute("stroke",K);d.setAttribute("stroke-width",E);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(K=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
-K=K.split(" ").map(function(P){return parseFloat(P)*E}).join(" "),d.setAttribute("stroke-dasharray",K));e=[];J=l(J);q(J);x="M"+J.x+" "+J.y;C.push(J);G=[];d.setAttribute("d",y?PerfectFreehand.getSvgPathFromStroke([[J.x,J.y]],v):x);f.appendChild(d);M.consume()}}),mouseMove:mxUtils.bind(this,function(J,M){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=M.getEvent();J=l(J);q(J);var E=B(0);if(E)if(C.push(E),y){var K=[];for(E=0;E<C.length;E++)K.push([C[E].x,C[E].y]);G=[];for(var P=2;P<e.length;P+=
-2)E=B(P),K.push([E.x,E.y]),G.push(E);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(K,v))}else{x+=" L"+E.x+" "+E.y;K="";G=[];for(P=2;P<e.length;P+=2)E=B(P),K+=" L"+E.x+" "+E.y,G.push(E);d.setAttribute("d",x+K)}O&&(E=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-E.x,J.y-E.y)).grow(20)));M.consume()}}),mouseUp:mxUtils.bind(this,function(J,M){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(D(M.getEvent()),M.consume())})});var l=function(J){return mxUtils.convertPoint(b.container,
-mxEvent.getClientX(J),mxEvent.getClientY(J))},q=function(J){for(e.push(J);e.length>k;)e.shift()},B=function(J){var M=e.length;if(1===M%2||M>=k){var E=0,K=0,P,R=0;for(P=J;P<M;P++)R++,J=e[P],E+=J.x,K+=J.y;return{x:E/R,y:K/R}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,k,d,t){this.id=b;this.email=f;this.displayName=k;this.pictureUrl=d;this.locale=t};DrawioComment=function(b,f,k,d,t,x,C){this.file=b;this.id=f;this.content=k;this.modifiedDate=d;this.createdDate=t;this.isResolved=x;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,k,d,t){f()};DrawioComment.prototype.editComment=function(b,f,k){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+function mxDualRuler(b,g){var k=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return k};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,g,!0);this.hRuler=new mxRuler(b,g,!1,!0);g=mxUtils.bind(this,function(d){var q=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
+function(x){q=null!=b.currentMenu;mxEvent.consume(x)}),null,mxUtils.bind(this,function(x){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(x)||mxEvent.isPopupTrigger(x))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(x)||!q){var C=new mxPopupMenu(mxUtils.bind(this,function(I,E){b.menus.addMenuItems(I,["points","inches","millimeters","meters"],E)}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=
+!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);b.resetCurrentMenu();C.destroy()});var G=mxEvent.getClientX(x),H=mxEvent.getClientY(x);C.popup(G,H,null,x);b.setCurrentMenu(C,d)}mxEvent.consume(x)}}))});g(this.hRuler.container);g(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 g=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=g){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var k=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,q=[],x,C=[],G,H=!1,I=!0,E=!0,O=!0,c=!0,e=[],f=!1,n=!1,p=!1,t={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},y=!0;this.setClosedPath=function(J){H=J};this.setAutoClose=function(J){I=J};this.setAutoInsert=
+function(J){E=J};this.setAutoScroll=function(J){O=J};this.setOpenFill=function(J){c=J};this.setStopClickEnabled=function(J){n=J};this.setSelectInserted=function(J){p=J};this.setSmoothing=function(J){k=J};this.setPerfectFreehandMode=function(J){y=J};this.isPerfectFreehandMode=function(){return y};this.setBrushSize=function(J){t.size=J};this.getBrushSize=function(){return t.size};var v=function(J){f=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);
+b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){v(!0)};this.isDrawing=function(){return f};var D=mxUtils.bind(this,function(J){if(d){var M=G.length,F=n&&0<C.length&&null!=G&&2>G.length;F||C.push.apply(C,G);G=[];C.push(null);q.push(d);d=null;(F||E)&&this.stopDrawing();E&&(!F||2<=M)&&this.startDrawing();mxEvent.consume(J)}}),A=new mxCell;A.edge=!0;var U=function(){var J=b.getCurrentCellStyle(A);J=mxUtils.getValue(b.currentVertexStyle,
+mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==J&&(J=b.shapeForegroundColor);return J};this.createStyle=function(J){var M=";fillColor=none;";y&&(M=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+J+M};this.stopDrawing=function(){if(0<q.length){if(y){for(var J=[],M=0;M<C.length;M++)null!=C[M]&&J.push([C[M].x,C[M].y]);J=PerfectFreehand.getStroke(J,t);C=[];for(M=0;M<J.length;M++)C.push({x:J[M][0],y:J[M][1]});C.push(null)}J=C[0].x;var F=C[0].x,K=
+C[0].y,P=C[0].y;for(M=1;M<C.length;M++)null!=C[M]&&(J=Math.max(J,C[M].x),F=Math.min(F,C[M].x),K=Math.max(K,C[M].y),P=Math.min(P,C[M].y));J-=F;K-=P;if(0<J&&0<K){var R=100/J,V=100/K;C.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-F)*R;Q.y=(Q.y-P)*V;return Q});var X='<shape strokewidth="inherit"><foreground>',m=0;for(M=0;M<C.length;M++){var z=C[M];if(null==z){z=!1;m=C[m];var L=C[M-1];!H&&I&&(z=m.x-L.x,L=m.y-L.y,z=Math.sqrt(z*z+L*L)<=b.tolerance);if(H||z)X+='<line x="'+m.x.toFixed(2)+'" y="'+m.y.toFixed(2)+
+'"/>';X+="</path>"+(c||H||z?"<fillstroke/>":"<stroke/>");m=M+1}else X=M==m?X+('<path><move x="'+z.x.toFixed(2)+'" y="'+z.y.toFixed(2)+'"/>'):X+('<line x="'+z.x.toFixed(2)+'" y="'+z.y.toFixed(2)+'"/>')}X+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){M=this.createStyle("stencil("+Graph.compress(X)+")");X=b.view.scale;m=b.view.translate;M=new mxCell("",new mxGeometry(F/X-m.x,P/X-m.y,J/X,K/X),M);M.vertex=1;b.model.beginUpdate();try{M=b.addCell(M),b.fireEvent(new mxEventObject("cellsInserted",
+"cells",[M])),b.fireEvent(new mxEventObject("freehandInserted","cell",M))}finally{b.model.endUpdate()}p&&b.setSelectionCells([M])}}for(M=0;M<q.length;M++)q[M].parentNode.removeChild(q[M]);d=null;q=[];C=[]}v(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,M){J=M.getProperty("eventName");M=M.getProperty("event");J==mxEvent.MOUSE_MOVE&&f&&(null!=M.sourceState&&M.sourceState.setCursor("crosshair"),M.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(J,M){if(b.isEnabled()&&
+!b.isCellLocked(b.getDefaultParent())&&(J=M.getEvent(),f&&!mxEvent.isPopupTrigger(J)&&!mxEvent.isMultiTouchEvent(J))){var F=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);F=Math.max(1,F*b.view.scale);var K=U();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",y?K:"none");d.setAttribute("stroke",K);d.setAttribute("stroke-width",F);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(K=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
+K=K.split(" ").map(function(P){return parseFloat(P)*F}).join(" "),d.setAttribute("stroke-dasharray",K));e=[];J=l(J);u(J);x="M"+J.x+" "+J.y;C.push(J);G=[];d.setAttribute("d",y?PerfectFreehand.getSvgPathFromStroke([[J.x,J.y]],t):x);g.appendChild(d);M.consume()}}),mouseMove:mxUtils.bind(this,function(J,M){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){J=M.getEvent();J=l(J);u(J);var F=B(0);if(F)if(C.push(F),y){var K=[];for(F=0;F<C.length;F++)K.push([C[F].x,C[F].y]);G=[];for(var P=2;P<e.length;P+=
+2)F=B(P),K.push([F.x,F.y]),G.push(F);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(K,t))}else{x+=" L"+F.x+" "+F.y;K="";G=[];for(P=2;P<e.length;P+=2)F=B(P),K+=" L"+F.x+" "+F.y,G.push(F);d.setAttribute("d",x+K)}O&&(F=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-F.x,J.y-F.y)).grow(20)));M.consume()}}),mouseUp:mxUtils.bind(this,function(J,M){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(D(M.getEvent()),M.consume())})});var l=function(J){return mxUtils.convertPoint(b.container,
+mxEvent.getClientX(J),mxEvent.getClientY(J))},u=function(J){for(e.push(J);e.length>k;)e.shift()},B=function(J){var M=e.length;if(1===M%2||M>=k){var F=0,K=0,P,R=0;for(P=J;P<M;P++)R++,J=e[P],F+=J.x,K+=J.y;return{x:F/R,y:K/R}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,g,k,d,q){this.id=b;this.email=g;this.displayName=k;this.pictureUrl=d;this.locale=q};DrawioComment=function(b,g,k,d,q,x,C){this.file=b;this.id=g;this.content=k;this.modifiedDate=d;this.createdDate=q;this.isResolved=x;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,g,k,d,q){g()};DrawioComment.prototype.editComment=function(b,g,k){g()};DrawioComment.prototype.deleteComment=function(b,g){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];
LucidImporter={};
(function(){function h(u){if(u&&null!=LucidImporter.imgSrcRepl){var E=LucidImporter.imgSrcRepl.attMap;if(E[u])u=E[u];else{E=LucidImporter.imgSrcRepl.imgRepl;for(var F=0;F<E.length;F++){var t=E[F];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var E=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(E=LucidImporter.advImpConfig.fontMapping[u]);if(E){for(var F in E)lb+=F+"="+E[F]+";";return E.fontFamily?"font-family: "+E.fontFamily:
@@ -17414,7 +17427,12 @@ mxShapeSysMLSubmachineState.prototype.getConstraints=function(a,d,e){a=[];a.push
.75),!1));return a};function mxShapeSysMLUseCaseExtensionPoints(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLUseCaseExtensionPoints,mxShape);mxShapeSysMLUseCaseExtensionPoints.prototype.cst={USE_CASE_EXT_PT:"mxgraph.sysml.useCaseExtPt"};mxShapeSysMLUseCaseExtensionPoints.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeSysMLUseCaseExtensionPoints.prototype.background=function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke()};mxShapeSysMLUseCaseExtensionPoints.prototype.foreground=function(a,d,e,b,c){a.begin();a.moveTo(.02*b,.35*c);a.lineTo(.98*b,.35*c);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLUseCaseExtensionPoints.prototype.cst.USE_CASE_EXT_PT,mxShapeSysMLUseCaseExtensionPoints);
mxShapeSysMLUseCaseExtensionPoints.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,
-.145),!1));return a};function mxShapeUMLInputPin(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLInputPin,mxActor);mxShapeUMLInputPin.prototype.cst={INPUT_PIN:"mxgraph.uml25.inputPin"};
+.145),!1));return a};function mxShapeSysMLPort(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLPort,mxShape);mxShapeSysMLPort.prototype.cst={PORT:"mxgraph.sysml.port"};
+mxShapeSysMLPort.prototype.customProperties=[{name:"sysMLPortType",dispName:"Port Type",type:"enum",enumList:[{val:"empty",dispName:"Empty"},{val:"flowN",dispName:"Flow Up"},{val:"flowE",dispName:"Flow Right"},{val:"flowS",dispName:"Flow Down"},{val:"flowW",dispName:"Flow Left"},{val:"doubleH",dispName:"Double Horizontal"},{val:"doubleV",dispName:"Double Vertical"}]}];
+mxShapeSysMLPort.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();switch(mxUtils.getValue(this.style,"sysMLPortType","empty")){case "flowN":a.begin();a.moveTo(.25*b,.5*c);a.lineTo(.5*b,.25*c);a.lineTo(.75*b,.5*c);a.moveTo(.5*b,.25*c);a.lineTo(.5*b,.75*c);a.stroke();break;case "flowE":a.begin();a.moveTo(.5*b,.25*c);a.lineTo(.75*b,.5*c);a.lineTo(.5*b,.75*c);a.moveTo(.75*b,.5*c);a.lineTo(.25*b,.5*c);a.stroke();break;case "flowS":a.begin();a.moveTo(.25*
+b,.5*c);a.lineTo(.5*b,.75*c);a.lineTo(.75*b,.5*c);a.moveTo(.5*b,.75*c);a.lineTo(.5*b,.25*c);a.stroke();break;case "flowW":a.begin();a.moveTo(.5*b,.25*c);a.lineTo(.25*b,.5*c);a.lineTo(.5*b,.75*c);a.moveTo(.25*b,.5*c);a.lineTo(.75*b,.5*c);a.stroke();break;case "doubleH":a.begin();a.moveTo(.6*b,.25*c);a.lineTo(.85*b,.5*c);a.lineTo(.6*b,.75*c);a.moveTo(.4*b,.25*c);a.lineTo(.15*b,.5*c);a.lineTo(.4*b,.75*c);a.stroke();break;case "doubleV":a.begin(),a.moveTo(.25*b,.6*c),a.lineTo(.5*b,.85*c),a.lineTo(.75*
+b,.6*c),a.moveTo(.25*b,.4*c),a.lineTo(.5*b,.15*c),a.lineTo(.75*b,.4*c),a.stroke()}};mxCellRenderer.registerShape(mxShapeSysMLPort.prototype.cst.PORT,mxShapeSysMLPort);mxShapeSysMLPort.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};
+function mxShapeUMLInputPin(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLInputPin,mxActor);mxShapeUMLInputPin.prototype.cst={INPUT_PIN:"mxgraph.uml25.inputPin"};
mxShapeUMLInputPin.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(.75*b,.5*c);a.lineTo(.25*b,.5*c);a.moveTo(.4*b,.4*c);a.lineTo(.25*b,.5*c);a.lineTo(.4*b,.6*c);a.stroke()};mxCellRenderer.registerShape(mxShapeUMLInputPin.prototype.cst.INPUT_PIN,mxShapeUMLInputPin);mxShapeUMLInputPin.prototype.constraints=null;
function mxShapeUMLBehaviorAction(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLBehaviorAction,mxActor);mxShapeUMLBehaviorAction.prototype.cst={BEHAVIOR_ACTION:"mxgraph.uml25.behaviorAction"};
mxShapeUMLBehaviorAction.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"rounded",!1);e=mxUtils.getValue(this.style,"absoluteArcSize",!1);var f=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(f*=Math.min(b,c));f=Math.min(f,.5*b,.5*c);d||(f=0);a.begin();d?(a.moveTo(0,f),a.arcTo(f,f,0,0,1,f,0),a.lineTo(b-f,0),a.arcTo(f,f,0,0,1,b,f),a.lineTo(b,c-f),a.arcTo(f,f,0,0,1,b-f,c),a.lineTo(f,c),a.arcTo(f,f,0,0,1,0,c-f)):(a.moveTo(0,0),a.lineTo(b,
@@ -17555,7 +17573,15 @@ mxRackRackCabinet.prototype.paintVertexShape=function(a,d,e,b,c){b=parseFloat(mx
2*g,e):a.translate(d,e);c=b*f+42;this.background(a,c);a.setShadow(!1);this.foreground(a,c);h!==mxRackRackCabinet.prototype.cst.OFF&&this.sideText(a,c,b,f,g,h)};mxRackRackCabinet.prototype.background=function(a,d){a.setFillColor("#ffffff");a.rect(0,0,180,d);a.fillAndStroke()};
mxRackRackCabinet.prototype.foreground=function(a,d){a.setFillColor("#f4f4f4");a.rect(0,0,180,21);a.fillAndStroke();a.rect(0,d-21,180,21);a.fillAndStroke();a.rect(0,21,9,d-42);a.fillAndStroke();a.rect(171,21,9,d-42);a.fillAndStroke();a.ellipse(2.5,7.5,6,6);a.stroke();a.ellipse(171.5,7.5,6,6);a.stroke();a.ellipse(2.5,d-13.5,6,6);a.stroke();a.ellipse(171.5,d-13.5,6,6);a.stroke()};
mxRackRackCabinet.prototype.sideText=function(a,d,e,b,c,f){var g=mxUtils.getValue(this.style,mxRackRackCabinet.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,"startUnit",1);a.setFontSize(c);a.setFontColor(g);if(f===mxRackRackCabinet.prototype.cst.DIR_ASC)for(f=0;f<e;f++)a.text(-c,21+.5*b+f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else if(f===mxRackRackCabinet.prototype.cst.DIR_DESC||f===mxRackRackCabinet.prototype.cst.DIR_ON)for(f=0;f<
-e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackHorCableDuct1U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorCableDuct1U,mxShape);mxRackHorCableDuct1U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_1U:"mxgraph.rackGeneral.horCableDuct1U"};
+e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackRackCabinet2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackRackCabinet2,mxShape);
+mxRackRackCabinet2.prototype.cst={SHAPE_RACK_RACK_CABINET:"mxgraph.rackGeneral.rackCabinet2",UNIT_NUM:"unitNum",UNIT_HEIGHT:"rackUnitSize",TEXT_COLOR:"textColor",NUM_DIR:"numDir",NUMBER_DISPLAY:"numDisp",ON:"on",OFF:"off",DIR_ASC:"ascend",DIR_DESC:"descend",TEXT_SIZE:"textSize"};
+mxRackRackCabinet2.prototype.customProperties=[{name:"unitNum",dispName:"Number of units",type:"int",defVal:12},{name:"startUnit",dispName:"Starting unit",type:"int",defVal:1},{name:"rackUnitSize",dispName:"Unit height",type:"float",defVal:14.8},{name:"fillColor2",dispName:"Panel Color",type:"color",defVal:"#ffffff"},{name:"textColor",dispName:"Number text color",type:"color",defVal:"#666666"},{name:"textSize",dispName:"Text size",type:"float",defVal:"12"},{name:"numDisp",dispName:"Display Numbers",
+type:"enum",defVal:"descend",enumList:[{val:"off",dispName:"Off"},{val:"ascend",dispName:"Ascending"},{val:"descend",dispName:"Descending"}],onChange:function(a,d){a.setCellStyles("marginLeft","off"==d?9:33,a.getSelectionCells())}}];
+mxRackRackCabinet2.prototype.paintVertexShape=function(a,d,e,b,c){var f=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.UNIT_NUM,"12")),g=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.UNIT_HEIGHT,"14.8")),h=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.TEXT_SIZE,"12")),k=mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.NUMBER_DISPLAY,mxRackRackCabinet2.prototype.cst.ON);k!==mxRackRackCabinet2.prototype.cst.OFF?
+(a.translate(d+2*h,e),b-=2*h):a.translate(d,e);c=f*g+42;this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c);k!==mxRackRackCabinet2.prototype.cst.OFF&&this.sideText(a,c,f,g,h,k)};mxRackRackCabinet2.prototype.background=function(a,d,e){var b=mxUtils.getValue(this.style,"fillColor2","#ffffff");a.setFillColor(b);a.rect(0,0,d,e);a.fillAndStroke()};
+mxRackRackCabinet2.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#f4f4f4");a.setFillColor(b);a.rect(0,0,d,21);a.fillAndStroke();a.rect(0,e-21,d,21);a.fillAndStroke();a.rect(0,21,9,e-42);a.fillAndStroke();a.rect(d-9,21,9,e-42);a.fillAndStroke();a.ellipse(2.5,7.5,6,6);a.stroke();a.ellipse(d-8.5,7.5,6,6);a.stroke();a.ellipse(2.5,e-13.5,6,6);a.stroke();a.ellipse(d-8.5,e-13.5,6,6);a.stroke()};
+mxRackRackCabinet2.prototype.sideText=function(a,d,e,b,c,f){var g=mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,"startUnit",1);a.setFontSize(c);a.setFontColor(g);if(f===mxRackRackCabinet2.prototype.cst.DIR_ASC)for(f=0;f<e;f++)a.text(-c,21+.5*b+f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else if(f===mxRackRackCabinet2.prototype.cst.DIR_DESC||f===mxRackRackCabinet2.prototype.cst.DIR_ON)for(f=
+0;f<e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackHorCableDuct1U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorCableDuct1U,mxShape);mxRackHorCableDuct1U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_1U:"mxgraph.rackGeneral.horCableDuct1U"};
mxRackHorCableDuct1U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorCableDuct1U.prototype.background=function(a,d,e){a.rect(0,0,160.9,14.8);a.fillAndStroke()};
mxRackHorCableDuct1U.prototype.foreground=function(a,d,e){a.rect(12,0,3,7);a.stroke();a.rect(12,7,3,7.8);a.stroke();a.rect(45.5,0,3,7);a.stroke();a.rect(45.5,7,3,7.8);a.stroke();a.rect(79,0,3,7);a.stroke();a.rect(79,7,3,7.8);a.stroke();a.rect(112.5,0,3,7);a.stroke();a.rect(112.5,7,3,7.8);a.stroke();a.rect(146,0,3,7);a.stroke();a.rect(146,7,3,7.8);a.stroke()};function mxRackHorCableDuct2U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxRackHorCableDuct2U,mxShape);mxRackHorCableDuct2U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_2U:"mxgraph.rackGeneral.horCableDuct2U"};mxRackHorCableDuct2U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorCableDuct2U.prototype.background=function(a,d,e){a.rect(0,0,160.9,29.6);a.fillAndStroke()};
@@ -17573,10 +17599,10 @@ function mxRackChannelBase(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d
mxRackChannelBase.prototype.background=function(a,d,e){a.rect(10,e-15,5,15);a.fillAndStroke();a.rect(d-15,e-15,5,15);a.fillAndStroke();a.rect(0,0,d,e-5);a.fillAndStroke()};mxRackChannelBase.prototype.foreground=function(a,d,e){a.setFillColor("#000000");a.rect(10,e-15,5,15);a.fillAndStroke();a.rect(d-15,e-15,5,15);a.fillAndStroke()};function mxRackCabinetLeg(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackCabinetLeg,mxShape);
mxRackCabinetLeg.prototype.cst={SHAPE_RACK_CABINET_LEG:"mxgraph.rackGeneral.cabinetLeg"};mxRackCabinetLeg.prototype.paintVertexShape=function(a,d,e,b,c){b=Math.max(b,20);c=Math.max(c,20);a.translate(d,e);this.background(a,b,c)};
mxRackCabinetLeg.prototype.background=function(a,d,e){a.begin();a.moveTo(0,e-10);a.lineTo(5,e-10);a.lineTo(5,e-12);a.lineTo(9,e-12);a.lineTo(9,e-10);a.lineTo(d-10,e-10);a.lineTo(d-10,9);a.lineTo(d-12,9);a.lineTo(d-12,5);a.lineTo(d-10,5);a.lineTo(d-10,0);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(0,e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxRackContainer.prototype.cst.SHAPE_RACK_CONTAINER,mxRackContainer);
-mxCellRenderer.registerShape(mxRackHorCableDuct.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT,mxRackHorCableDuct);mxCellRenderer.registerShape(mxRackHorRoutingBank.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK,mxRackHorRoutingBank);mxCellRenderer.registerShape(mxRackNeatPatch.prototype.cst.SHAPE_RACK_NEAT_PATCH,mxRackNeatPatch);mxCellRenderer.registerShape(mxRackShelf.prototype.cst.SHAPE_RACK_SHELF,mxRackShelf);mxCellRenderer.registerShape(mxRackPlate.prototype.cst.SHAPE_RACK_PLATE,mxRackPlate);
-mxCellRenderer.registerShape(mxRackRackNumbering.prototype.cst.SHAPE_RACK_RACK_NUMBERING,mxRackRackNumbering);mxCellRenderer.registerShape(mxRackRackCabinet.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet);mxCellRenderer.registerShape(mxRackHorCableDuct1U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_1U,mxRackHorCableDuct1U);mxCellRenderer.registerShape(mxRackHorCableDuct2U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_2U,mxRackHorCableDuct2U);
-mxCellRenderer.registerShape(mxRackHorRoutingBank1U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_1U,mxRackHorRoutingBank1U);mxCellRenderer.registerShape(mxRackHorRoutingBank2U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_2U,mxRackHorRoutingBank2U);mxCellRenderer.registerShape(mxRackNeatPatch2U.prototype.cst.SHAPE_RACK_NEAT_PATCH_2U,mxRackNeatPatch2U);mxCellRenderer.registerShape(mxRackShelf1U.prototype.cst.SHAPE_RACK_SHELF_1U,mxRackShelf1U);
-mxCellRenderer.registerShape(mxRackShelf2U.prototype.cst.SHAPE_RACK_SHELF_2U,mxRackShelf2U);mxCellRenderer.registerShape(mxRackShelf4U.prototype.cst.SHAPE_RACK_SHELF_4U,mxRackShelf4U);mxCellRenderer.registerShape(mxRackChannelBase.prototype.cst.SHAPE_RACK_CHANNEL_BASE,mxRackChannelBase);mxCellRenderer.registerShape(mxRackCabinetLeg.prototype.cst.SHAPE_RACK_CABINET_LEG,mxRackCabinetLeg);
+mxCellRenderer.registerShape(mxRackRackCabinet2.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet2);mxCellRenderer.registerShape(mxRackHorCableDuct.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT,mxRackHorCableDuct);mxCellRenderer.registerShape(mxRackHorRoutingBank.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK,mxRackHorRoutingBank);mxCellRenderer.registerShape(mxRackNeatPatch.prototype.cst.SHAPE_RACK_NEAT_PATCH,mxRackNeatPatch);mxCellRenderer.registerShape(mxRackShelf.prototype.cst.SHAPE_RACK_SHELF,mxRackShelf);
+mxCellRenderer.registerShape(mxRackPlate.prototype.cst.SHAPE_RACK_PLATE,mxRackPlate);mxCellRenderer.registerShape(mxRackRackNumbering.prototype.cst.SHAPE_RACK_RACK_NUMBERING,mxRackRackNumbering);mxCellRenderer.registerShape(mxRackRackCabinet.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet);mxCellRenderer.registerShape(mxRackHorCableDuct1U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_1U,mxRackHorCableDuct1U);
+mxCellRenderer.registerShape(mxRackHorCableDuct2U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_2U,mxRackHorCableDuct2U);mxCellRenderer.registerShape(mxRackHorRoutingBank1U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_1U,mxRackHorRoutingBank1U);mxCellRenderer.registerShape(mxRackHorRoutingBank2U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_2U,mxRackHorRoutingBank2U);mxCellRenderer.registerShape(mxRackNeatPatch2U.prototype.cst.SHAPE_RACK_NEAT_PATCH_2U,mxRackNeatPatch2U);
+mxCellRenderer.registerShape(mxRackShelf1U.prototype.cst.SHAPE_RACK_SHELF_1U,mxRackShelf1U);mxCellRenderer.registerShape(mxRackShelf2U.prototype.cst.SHAPE_RACK_SHELF_2U,mxRackShelf2U);mxCellRenderer.registerShape(mxRackShelf4U.prototype.cst.SHAPE_RACK_SHELF_4U,mxRackShelf4U);mxCellRenderer.registerShape(mxRackChannelBase.prototype.cst.SHAPE_RACK_CHANNEL_BASE,mxRackChannelBase);mxCellRenderer.registerShape(mxRackCabinetLeg.prototype.cst.SHAPE_RACK_CABINET_LEG,mxRackCabinetLeg);
(function() {
var f = {};
f['azure.xml'] = '7b1pkyW3cTb6Vzp4P7uMfYmwHGGJlvXGtWRbo9f+3Bw2yb4cTk/09Fiif/2tBZl1kAUkqgrnDGmy9YHqqTzYElsilyf/4eN39x8ePt69v//h4Tdf/PC3b5/vP3w33P/Pp+eHL/7xH2bi3f3HDw9vX37zxX/fPz/ef/Xu4Yu7737zhTOD/SIVk+NfH1+en75/+Ovj1y8j8fH9dw/Pjy9f3P31N19EP/7wH//h7dP792Mtj0/vP87/GH9///j+JdXwpy/uPowlfnh4eXj+zRfii7u/jf+dGvhx+tffF0q8YUrIYon/KpVYWhjLlUr8c6GEZEv86Z+L3Yo+lRK6XKzYt+nXbLE3jdbGP4rFGq0txf4+m7Fvnp4fvn1++vT+63/8hw/3L9/94z/88PTfD1PBENdZun9+e/fu/vnbh78b//q7b97dfztX/zz9bJqb5x/THx//+vDwIf1Azu3Py+Tub393/7fHj3/3/PRyPzUMExQWdr97fP+w/nb8bl1nq1PnK23OC/yi0ZDahO8drYpqo8uAoMls8D2jZFi77K53Tx8f/v5iTmGwFR60WWCWDpm8O8tSM/tn2uBEd7XIMcAJMkacaNHVZlRMozAeXNEqNRr6xskNNE0anWu1nBZSXPYnfbRk/iWcsFWCLK4nrTIystrzn5W8/IyVLJ83bViozDZ5qGHDaLphFj7q+rEgY2fdhlsXN+676q3b7ug7nRirr9O4ibdl3NTPW036vN9/or6r0qQ4B7uld1qcvuXAHMu43mnx4qfre3FagrzOpHh/2/U29fNWkxLMT9f38qTgfURubSTY/LPiP2tz+dmH+se8Am/qHw2RYrzgPudVOFvsL37WRChzskXIK7Ke/2xC9lnzn/NKlkuh/llnIoSx/GdSiax/pEPXvsITXR68VvxnWGqwFv9+eXR98/ju3fLSnr5dPsr+fn6rs0/2ePFk99yLPZ58r5vjD3Zz+MU+SGU/z6s9uFRKGXvo2R5SOXno2Y7NeWsPvds98CMcerin50/M5HhYf8bny1ikVZn9+GK6cXuYofDVLhxROjsPbeFjjMXm02+9zD+neuln7ESkzxRK2IhFiSekGOzhQAhGVgh4WrlNiWXXy7z+i48b8Rkad/T2URVCNGUeqoXfoTQzIT8Pswpoj8zCJZWtHPiYzbsGflc+k7NSOeZrXoUs17x+jqUqSh/pFYmdqxKWariT+eHdu8cPHx+mQ3fs33SmqiQSLvtIJ852HedSCDjN/+nt24ePH+9+9/R+rOzdLY72z6iKjcdP9XjkWJ+O16XcIWWsMnyxN63WfDxyqq/NLeWOneo2FqUhUThqKz+dVldp7y+P+SCKhQI5iSwIVvnv7TJx3pJfLxvSk31nYS25ct1OFD/btpJyPC3c8lRY/jqoc1C+v/7649lWrii83OAQKXVALh1ID6GyyoB7ZnF1i6zusoZ3T93XEGlDGAIegp9enn6YW+IOwHDaGuX88TMQ9nA8IN8qsMMYefgkrBSpmaVATg1HDkJt+GJv+Mb8MaMUctAeOQWtGhYuGjWo4qO2Za8yIq1vUbSoqPq+HTRp0KQH/pAJWR7fombwuewI5oe8IjgGYUgbQdENSZUfl5LMwaBQSaJqGiTm3NP5SIIYAihnShL++KjIfh9FmhyZV2PTGlG0miSjxvxzdCiPDZk4HcGCox0hSBDsip/JBI3VJEE6EIIbXHq7E0b4NIKR4MjQkkInblihQIbPqzKpKq/yznqfZtn5vA2vU4nxyeELGiIfyHry6WYmn9XaMHkpJHZsCGbQxarG94MqNm38+jrKHx74bCKD067IDC2LzENTkCWvL61TV+kEKZO4Sqc0HcbjEsh4qmEJG1MjiPzgUcDXcVEq0nQoLmPsLF34ODy6URI7ZCAVuTQPUhNmp/PC5z0ap8fAfqaEdDYRCc2kBkzOVVwyZb3q2G4Aa2jG9PkAm9uRg8mZuHxW5LMrnpgKLblkxSqHyyw3eqb+0B2kFagZqEEyEci4FZwDnhxA2PC4IxzpatqO264ubQQy12raCjNBE2UFMC9Q5ccyuEBOs1E0NWUCrNhAhidhjY9NZ/PgoEtkd8GuDtkI7MqL/AmSWDEyz2xVUJ5sODhAx8nJ12oaFZ1Lm87u8YTJJxN+T/oYi0sLWUCX4nzXlZbuyOak+vFF1RLsgc0mcdBSOhI5kRwudVu+0+V8UVdu9fH+kL31z32t1R+6+6/kT9h/4P81ni2TzXR9tLx5ez99r75Zpqd4l9ZmkNoe1txMCmn783Kkk8wD7E9Mr/Y/UySjtHpTb0Ee19C03h+zleM5KWKKe1nwPl3rUSUuDraOFseTlvGi0mW/HxBgbOE+1eQdoZdzX1OpJqQjXlO5Bk5nQy5NHdIhbOxGvkzSmSYSqVvluezqMiEd24Zq+OHyNzXVPxUNLVz+tHEnobPZ7x3cGOPwPDGzemCIKsrulIUOBJKR5dnwXPlp5ZLg6fObGRtWhhA0yLCCWoRBwtSEFQaequTtCzIpEbithDcmEXeMXwm+OKWS+hTCBMm4WTYWuuvIQvMwvPLSVIYu5TR3wMLNY/3SoHbqyloUEZbzyNKyrcVr1S8YPV5n3byW8KZ9X/h+VeN6WI3r/zS5z9/903gVjJP95ePz+Oun5x85raQ+7yMvj2sl5VnTTDh+u4djphmwuMdDpplGsTeN1g5aZs4ZZlDpkRth0K3FFzUkMZTs8MuPN2cKXJMN5Z9fdo0vau7lDs09ucfhBjzZpN7vm432due6mrScDy41p6NXkxMdTbq6xhj4t70jQI9JRAxUBdvWi4ftEROGEArmuh2BD+zK0rtDLTRISjZ0NTlZKmojpCtLA6dVT4vLlNW2T7y+T9ekFvLk3nn38PzCPycH+TP2A0gi1ZG3JBggamVqJqlwLlBKnQqUmsT+JLcPofUY82A59tRwLNGh3NdX2hCIV9WQfIy8bbftQK5ylVAtNdtCaxE8dsj1zA7aRsrhzbW0K+eKauofkwZWsJdLfLVoTfw+4xrooolKW9ZIFkzBWOHWSwJ+Ml4m+jy/8VDhBq56ZhTDE5gZvf0YJrNYbwuJ560xXFnmn5w2Lw/f392//Y7T5YU4vnw/19FrMKIz/twiYgOUkoe1eZUib7i+RX1UpTd2MRzS6qHf1CBNK0JhNuosqraheNTNNtZqlAI0gRZeMDpMlvlW4yE5NoSikm+2dTOG/9iqXgkYWVEim/U7tVtLkXFp0AZNN05zXJwgWI+Ji749Jp1uJamORfMGlwa0MeoomMj6sNKbQsaB8+JyklsmvbVL1a59o/MNoIJs7gPlIGzZl4Ozh7oAj/Wjx0RMOsUo2osFVN2h1K6u74BYG/UaWeIH0+S642J4OSMdW7vYUbux/PvelEcHTifjSWMMMfGja4Y3Rf1r1PS4gjLjpZzX5tC5hVJ8BF2/Tfv1mhe5siK/xv/PeFHcv3/L3eRTmT6rnPAnjHKVm+x/nU0OTsZbmuXmmJrDljlNIttVIRYdvsrchU1cftwc+tJcBEiiH4ct2OzgI6keayg3kMpoVexp+bPKYyLSPS8tO4C8Kuxs+fP0/4UxKC2uvYvHQ0OEfB//69P913e/vX837eVnNi5i8PJnrBIR9oROJFp7CqwGjqcjovkgJV+sqYJx51QwxzY4PMsnX9lAHHoACGPqU0MeTK6zZfWIXPQ8Ndv8tEZzn9HgM8rphie/2nrDMK4LnZAgzOBe34y8FM08hPrLOx+xGYzPKSfbFdyDHwe1wTsJwPDJQJ/3TICGDkmcFIePuIpCgp0OI0nj2mDjlDSKUt6DoV5VSJMTZk5SMFArEokdje0YzeQNEYjfBMyyIKRxZtJAsVRHv6zmFp/dNC5w1WvC5ZW04bJTF3NDjCMeFIVI6hmN59Rk46rM97ALcGoxpMnNprdfzsya0tq7AVq4cF1JilU9vspqXDbVCZCOOYR3xDalXVE7CR3h1cX+on2afHxxJLJGugKH07HU4vBV1Zfj45+oL/94//z9w8uHd/fs02d8wNnT/gq6ISfwr59wRGhSp6Qmd05qgqgodQwrYC1mT6g1TzyJjgVSaRA9lR1k7gU+LtgmaXKHbrk4TZLjtDFixUvIDZKD0UkNXOxlWemWtTtIcrzWWz2OqcMVBQsTOqXb7GArl1zlYgevMe5r4nrBrBi4Biavdxrg4Socdba6PMarKQU3j4eeyIOYDK43QyZ2OXSSEi7HSXQeSi1H2uZBO0qorgiuoMaLvdJLLXeQxuWnmzwHjheXt156UDPukeFoC15LwDnWobestgbniHmCalM9rjRHxNPafE6Idk0SexLAHSmK0n66IFlGYfVXBsyZXJwuL8g3X/6/DdcKd9a+Z+AprO0Rb33jThj5ptuXva7Kl5xbNQrm0OWosxfubr8+LKYO6RTUOZ1CLmTsduuAgOhIwsPGs1aliElPI7GQQvyxp+Atg/4M9F4zxVhEM6+55FhOVfDBgGa/6f7PGu7Gk57xplIkVCvYaYGUQhGgq5K4fI2MMIhkFru66uQsjDEvVXLzA64afYykObLE/V5pnCMSMadwLXji166wtkCiAhyMO+pyWLfTIFuqzQPPXDhi4/eIk06jAALUpMlCmSIbDbhdKzIvQCGM8xaEVy1IGKDFHruhhj6pYUzEtTECP7TYxDAE7GNRszOOwmG7nowiTbIyZOQGuEiDVKZAQ+yJJ7Yo6D2VUBJHlCWcAn6QoMORkkarKHcNUmTOB48IDMqWuTvWCmPa9lwhH1p+jkl6UGUMxZnVtePANEPx2MrV3Mta5QTsK+AKVSQWc4pbRT5Eak00oAtQZA4T36XPeTcOmXCVO6HSAVX07YjzwqoNT5HpdrAMAdZhixkKDJAkLCfYi7JU65wWkQybo1vmrNmhjy5a75c7oCav6c1cKTBuNc9/dvEsF0mtWbL9Jww1k8UVbbiLd6hM4WptfugiHrjgblDZBTW+bIG6aCwJ1rhGVst9KD81ewM/w/rUPEqAMvds5QTCAwUL0RwTN0vjdDPCQ2D0fHvRZ5f1VB9XqEDQerMPGpg7ekLkjm0pygeMCXgTahKqb2oUjRKgUaSMgA1lwiaaLh09lojSCu8tAL/hVlXigJJlJ2KO/X4btG9K0IF2lTQIjEMsy7fSoQzQPt7YARjFXh+hInFZ4DqNfIirONt+JMxeOIuyLlbuNmb7RIKJYHDCndiEe8JS8AO1HllAathAO6VJmRFpyikCVvl8p+Wx6E84yYr1YY6Vu32VF09zvWiFa0cQDZpGISe4plgyQ83MDQ/FtaUNd0dFtZdpxZCFUfhVbOUUjEWhP1/sCQJS7JJU++5dXfFmZdgVSPT0eogF25asBg/XiK8wk2taNhuYQZuWpaCLS2G8Uetesz4dlCce6RIySTCLwVeipnW8UKl4chOFnNJ2FS4HDcsGY13XuNPBVqu+fSwFxiHCWK7ySGAHVmbGiuxr8BSeHo4kEDNRoiIRNas2LJ46LBB407B8Uj2hiJETAmZc5TNSMdqeI3s3hB62aE6Ag1naBJKiMEa3jfW1DbVSKPKU03DjeHI3u8t28ls7wnoJliiLUK8ZKZoUKm0oJeubK1M2ZbBvQLmmpcAvXiiZpeDTVx/fPj9+aACSTjrR2Jkgb1A3dT6Up7wPgzllRg/nUt7x/gEVjb80pzT+arY/JvV98C2ozXQfKFG5x6Orm4tNijHlXgtJIldFgdzFyU5Yfe+E5IR+ibXsAKbQNQE+0tCsqFjCpeM8s4zvOWbjZKdnvP9kX+8nF6Ydvb9QJEUHevImMopOTesyuKzh5syq9tB4GSSwa25c07osDcQhwXAuwZzEWJLQ9B2zI3ZoKOzsRFd1gHODpsiTKW3G2Dvf1bCZncdrTB8FakV91RzMh2g2XHX+kl9csLa+2GQZ8ENPXutgNOvthGWXnQ5pYi80tnAK9rc9acWYJUmanm5wh/rc3rYnudhxzoLEvqYG5yA/hupt3Amu8Qlw1VcSdHoHcNPdzI/cQa2HHJpmFOzTvMtEaUvh5XMohpmTNU3WjpkVnFd65GqXgtx80QNH5RU2dLTzCm1o5DfPWwPr2oshx6bVHu6XKT2CJ1Gy6fC1nqxVFWGutiQ8OT1gsl9oMSWSAq1QIH6qo92whLTxtorAY2dJd7TEQcR0nFz42QYspVQ55hR/oknFBi/mkZTf2RN625rwp0LacGd63zVJLpAKJ711jbSWUnWSJFfuxZBl5Xow6/ho6QuSb+/iZvZJyZ7eO+4mzro13kvMRp4cBjwRCVxlfsZN0CaNvBKVCjmSu8IFLLlzGFu41JE3VoBDKWUz4HE3tEkAkty24RV1iNPbnhmQJgNKP1/MAXHn46Ds3OgUJ+KOVE/v9FiZ4pWFSNpw2eNP3O5+m3I+Uk4awNP4pPfwlHGCrV15mqACjyzpO/SSnj0fXGgPy7CBb5PLE7tx8kvMOzz8drxWAuOTOrLIscssto/WWBmagKFxCxmeJTse0ZX6PSf043reLPmIG8bsePCB2Wn+o7A+NLcwsYVrKuwuk6fN6rr/evjq4+PLTWG4P0fytBuj9qD/rzyWElOaVsE3rRbDsayYa4up4O7UQfvwuWvaI9lE57Z9VTOotiln2+mqf4o+l7PMYWof3bbFwAFXftuKnvzhBi5rWzH/Mta2osLGFLIPJwxu02dQDZpThlriAKZAArNdHJgzgzBoUa5LBcu4WOhyNI/f5yLFD4oJwFXi5GKEEBYGG7QrikgFTnHXt4UMt4VoSvRsCiqwV02lWWN+GAOo6xqpdEMrw8HpGWIeQkb39Vo1MlRutglk6enb+5LxkjiJQZfE+fpRFkRzMUfwnIllzxkWAcu3DmGXeu7KXi2GEaX7NjibmMaeTGYIaXUYMNeKuq2FiL3PQhiZR2Fzmi0bNuy4SW6jSqfKfc2Hl3lH922rKJgXelNCEJUMLumdFYY21vppCcRx6Rw4jHjcAFB9WYhkVotuzyi/EhnIP7MX8bJs4Nc8z6+OBx5mx4vlafTb+7fff/pw9+bh+b8f3/JPWzno2Jtk6sZeKOfQHOKpdy4gMkl7LA8FOuS4Q69cHzJwht0Rq/5cdtwp5sdhzr/muyOAq+jyV0ECYRXXdnYqbrm8ox5Mlj3Lk2dKHVq//X4CY2QZcdexThdm8Dv4pJBPxZiW8aZmrII4F5vXsABlWxA7pqsyTAQYMqxK3vXVn/pa99/orF9pzu3n1v1H/hemCFLUzmG5LX0oeKJU3PBZ3ybvdiyCRguGNzTYHau91cIMIPETjgHmYaskQGuN6R+msqzpQfcPU/EaerXj4Gu1EDhGfoYxwDyU3P3R40xdYb0wR98ooIrbrvnbj8HK/sXAnz04hoIr2urE0N0Ja9n1sueUb7WgWbua6V/zE2zETzoGVQPzVngA6i1mt1+9VNr9c9A/V8nv53hrtqHhny5n/5Zkd0gQXFhxGnxdU16Gdw+ru+cedHkDyonlr4IYZrkjV8UdiwNMqmWLqmBd6yThb/r50rQwBF4hkWSgOO5YypNCK2WKg92bBkC5SjwNc8OqHQ+Ymre1gBvcskaMHYD7uBFcJVuT4M4CKdsXQ/uBFFlxSLl2OoYpRhnHEStuusyyWjCCzilLMPeBYC8fZ24AgjlB4SWFyePLbz+9/f7h5e53T18/3L15+vTM6k2C+4zZfE6ghvszGhN9OglADdP/ankALqKKDqXslO6y1G41iYDcFnLo9e2TXEIfvwOzAlQwFRdMrzmrRrv+Vv+nvHH1+mUehTdlCUlxmjuPZqkrSOqRiQEtYh+FlEHE+qQUY/MwgcK5MmiGp5bg5ogsCTWn/pfckOcThUEH8QSsKMJgZwJyAVZuPd8eiU4zQ9GPUlrG0tFb+dJLtvJCYj0FGv+mPTY5DUpTg3CoPwZDM76Yr33pZ91rL3bVbh2zL27bd12B1sCJMfJkaDZKSqpnaFzd7MAmBOCOuvWc7egn6Dfw+6oykZ+SJaJM9D9/uX/3PViRPnJZVMKU168zKZL9WblJnrYgmVMWJBRUDgGeBgA89aeEokNZbMcbQUdUEdi2TcSiTaSWLSVELiVguw2LbcSKRovJ/zc9UJtIiKuXdhlWix3DdNPYLhvyBBrBuUqk+gtelGmqAsdG2co4jEE+DBuxhYvoFFgnYsccosZE1jQmLA/GG1FYEktCm78IbwGSIaUmKRdJlgLUplJTwC/FLAWSo20pqHAKbO7nQqqvdhfQSZjiSSJ6AVoioyeSoeOZcMAiIJ+S8RgYD67qC3xWKEXZOk5BwG6IK6wFdinq+lJUdFatq5KmTKgxPyIu0G9CrZTbQdp1qjW5oD17cnoyCXqdBE1JGjtNl4laeUcnXOFmGfmRVzhZlGKlG3h/YKk+LlhuLeCuuwhghb1qKQnXgt2MBzeL2/AOd8TkTW1J4CpUSHmX5u7y5OriQjrqGdcu2xISH969e/zw8WFOhymWDJfgG4ULB463PhclPaO8LLLJ7x6eXx6/eXx7/9LyTxrFlc+raRtFv4owejXRMpwSLRUPkfOnBrx9BYP/TUMdGNUh1yQo5k5k4JSS5JOScgjF7HkTOvLe5HkeNpGvwCAY5gnnBhcI+oVGIIFAsKWTs87QdOxuBVZ7ThtEU1VJ6FKVMKFlkFR8nidMbps9oMeee3FvcsbJ1M8txcBZSfKMpWWBhJMBqoJzCwihLFwD0FmeFcya1KdRVJOtpGAKXcZUxWVsguPmjMh549GC74ugq1WBZ09eIsy25YQrGohUa+F9oQMR5zyUiRSc1aOLdYVtqT1Mp7YjS7eyFfVhYGNv+6qPllOD9fdeMtWP+zH0Vb/wudX7jReHOjA77bc9O0MTilp/EzMSZM8sdY5iAhzsb2Lh++HZcqAM3zPOSnjJjr1kdToATlcfevdSR++V2bHO2OoXPu+dnWtlso4oIr97+vR1A0FSnzZDh8+idz2XwDqcU72C5jUeEY81Jt86jjt5JAtj2rLyIOBk4t+UWkc1rW6orRRlN47JyYcJ6bRtNw4tQFu4/FUEGWRCsIxOOb3YvJDoVlNxMIuCawN59fbT88RHuRSYTgo1Z0SZnjZ/0/jnj3KFyVe4B3/U8Oe1I3UWlJ2LPb4rUGf2Kuw0scQzb2F3ZLfrM69h32VoUYfsLOGMnQWOI38IZVbBe/1YWjkD2I5THp6m/UChx6GqIix6yelMVctAMCXHgHty+bNoqWCiSd2OkUA22Hp+UslBl6o+S8vIPd/Xf7WyqHj2StOYh2b8qERLjfRVx1umDVxPhaxssOTCoKgdI5FGcSonWTukgHKlKckhKaZxXSLGSrAWeFphakuHLSmVMo72UCIWqqUkHNcE42pJ4juokHbDB6yQtjU++hX2UNFsZL4yrotSglaIbW14uPYQOV+A6a+1qf0FQqyn9gCPjz1VIU0O4ZbARirkZa1CS7sxTb9E6LVKDx2tcB2Xo2w29qJCsug09HDT1qRXkqD8J6SIJMoou64sX21L0wVu1qUKFe7Uvk94Dn9NsA4LxJfE1D5b7Xu1oF47YEsFjzvKFoWVj3e/e3r/zeO3n57nQ+bu94/vOAFmAkb9taNogRghTyWKF4f8ZaM7lwvXZMUOq++bruaa9fuUjG+eIAZ7t/06L7KU9tAXCTtyJfFdDPM5XQV/isR6YS8+n25TcKmGylpqn17DwZ3M9Ce+WO0v1axe5AI0F59PNjjlp6yP1uXZ4ZYfLzekJndngxBIymawM4UudgUO+bkMyWMhsy3N5asahEiSTNnsc6Ud40lKF6iuSpis5YV24HOlHUdy/2F1VYIn+YdTRf4WXo6heKHd/fv92+/vv31o3WTB/brvMUwg747HfFTKvOHa8UcusKzMsdsLMihe5Ku0IPC6IiG3gSHGkCtuDJDyA0n77otpcR2oMzXJHD1n1Uw71tQSPsKbQBIJ3oPlOpdYdTL+CHKexwzOb5sgF9iWnRwALk/yYBq4sCPJjocEK4ero73OswGb/enrh39/9/C3nSFeYz9NOLnTTTy81U38Ge/1Qxo23YAFqrdzSJ2O7YRj6rV5Wi936oXXFqFwenDUxeiKLiZVVxNmya7GXlUJatvdmFNOyJdrpszQgIDddsiKCh5AKPN30nWEQo3r980bO9UkSL4Ow36mJ/CVgkUnw8l6kOx47jr/+t79xb53wZrXznXefPGGnS/e8nvXeXjwRl0mja8ko3vfvLFuCI+BNC0VWC2XbdP19OUMllPyqKJkAq5Nrjk77ONXsY9f8hZVSewCwvkHsOMGrMkD2MEVIMk7t0EgUpiE7vtmiOLpB3BZLkbnRddMkMq1POFBcLFy1E09wPM6nEqsgcmMI4cg0ZcO0EjGOUiRpL4G/PlUGHrSK2rW54VmEgZHpPFVojvcMLXkgijbCKJs3Y4P/ozFAbm+1chOnRfbnMoIv9a1YvTshlkHdzMda12xgWiabC+Mceg5TRTnmG0rudQmLKxsh5zm5gSZyO2/npNjgoFiA5lo4mU4x3r46QKzKuH8XbMTpFVpVU+T3Dgt0W3gOHfsPo65MyrCaZjmxqKQzKKYwTJyC6KBLd8jiXBJcoji1jrwpXddx6bjMBrMjshWrnLLOSkbRVJ7o+d4z0K03BUzHlju6r6coyA4Sc3wZvzhw6fx5cE9GeOEmPVrfzKiW+ohty6h+GK1+HlhTyierD3uyWkmBKv5JBhX97l1LC+Sl9cPA5mJFpjq3A7N5CgYTV8BxZmx+Rh9liKZelckhN6Wl51RvUVo0zMkNKSva7WdtHiukiCYGfI4k0HRBMGmQpqR3lKITt+FamedRe2BaNqrqxGeYmbuVdNCJNdafIEKGBhDWk7Cy9fm7GncIG0qVGrTFneNJ39CLSsqz8CyUaq+RxSzYH0gK3Z8RtKFs7XnpxRS4/wbRdIyhybJk/WI1XnS3lWCGPR6671/eRjP0y8f3j3+98Pzj3d/enj569Pz9w2zy2kDq/8c2Hr2VDoCe+Y2xPQAxyJ+lTxhgsHkBwcvw+N3ocRs1+3USpEDeJGaA0VWbQFYInznccxl2U6bwrscWzZVeG50MaDfVpG4xRa/G0wabslT0mP+TmnJa6/43a8ttAYbIKC1EmPNTtXudVAN4WazG9wAKMugbP/l/cv9V/cfOXPQjNL46jVy0BbEFmF9RuJxl5FDCKEL6uZiXFFyL9qkOOzcp2QBalL0NslihmL1BccSi75scudpUMy1wSEwspXLHZU7u6f2QnIIi8pZuTdqtALKojj8UKNTFy5ML7ZB8bU5sfFAt+s4GIC0xcFs9VfvjnDFVLlimlxJAHeG7p+Uo9Ls2LN8NJLyXKgQmUSXf6/gSWw6a2G77eku4gSZSpw5tymsoRx2+fdKl5fQiUxTl39v53U3ZfUtp+BQpa7id+jqVS/7OW1uuuufnz789mm3D1nsDXqAGPMb3/zu+NXvjuUPP+MKIu1xCWB8NIHbSTgRng2lDkRoW1D958oKcYGiQkKi5EXKUVzIgB5EjSJeFH6NaNeOOK0iwRviZhnBP0ENRQ3DmkmGDCMp38n41v4Sz1WFHt2i7CIOKbiJd2pMphJBWkmPUsIVJbJebdQlhUdUjGtwiCRvIlUbo81a3zQDVdKSY1u6yE8P/Bz/MMX5mULLbuC+hrkh//n9uOw/PD+y75UpuO7XbooI8ozyhRv9dTxfjytcIDapBFyfbREth8h8hRo26bpc0WytYUlXCUoRJxYDtvsaQSqybcADqkrQ+Wa3ArZs5TutyGo4gmoE2lkLWZKrhI2BH+GXtgRVnLzE8tqMSHif+oHAu0Xus3R5K1gNEDbtIPtJSQVm6CqBdAFr8mWfPuyKEiQaA8IUat9jZUwqNsZES2LX6wTSh7UqUfZ+w85oXe597Tt4gmxGBYTqqGhJ7HyVQPuAVWndGJUhk4+9r3zPsVKxmjLKNXZji+bKfaZtr4xxjb1kIzmUhsh+d3SJQ0WutsahK7Qkdr5KoH1YmRPLeRvWE0KRiAM4IirfA13jqAqrrXHoCi2Jna8SaB/WQ6Li/GXCEBHAwBFUZwQmjiSaS/EEqGqjfIEfWJGXXAmRuLKEdclUCKK8fbH7zmyi1BRPmGyKRU4A4aq2PzmseAH//LcPzw8fP979+elTE+XX6V5wI3kC3CiEA5Y/5U4Y/rxhC71puMEcynaFXjCHdNkGRd3xrq7nxZUIzqUQnKuc7FrOidXqIDT5UzaYC6QS3d/8+CYTsp2T/MKpYAUvuULz01OR8W0TlTyTY+NOIgZyE4UNg8/KKRumIC3JpR0MrYG2Wkj9bbWwicwYX9QrwExvJ1JtZ9LPX6UFHMPmylMz/6/UiVRbqxM3awHHsDGa6HmrLTrqPBHoSJIo60VH1C0CJS6SjhRdtxacn1wdnk6pcce2EzYLzv5lHAdWhvVfHBEGAXXCDRJRwn35CqHzCqHzCqHzCqHzCqHzCqHzc4fQGbJb607x95Z+vbd+2fdW8Pkah9us7y4TTBzXvrtMw11miwTo9vm7zLBx8fkBmX2+zVXGnSj0fKgeHNWjhhxNGw+xixPP7DojK2fqekIa7sSPQ6gd7KF2FYTSiS/L+tjqHRjAW6x6OZKZuMaZK4WAI/dfHl/+8Omr2QmFzw/wq7fhorO+NMfysZpWwTetFoO1hzzpDSl47ABeMHU4oSs9iW3ZGV3wB+3piudVyyIL3aLPU6s9Vbf6vFHPD2HfiABI3VQyO9ZvE+Jmoz1EKvk+XQgbz+z3Ov3rii7UnZ/8WpwaArYzOTBDG5bHA5R6sXbNRQub5g2uILtXUUfMTLMWzfe/SfNpRBlYgKtbd/Xbc+nnd3BFBsiGVKyde7dOuSi71ktQzDpvr0V2ndvA4Q307U/H5YDPtafLT5ezwnWdQ4t8fJZZfN3MqW27KjZD2HlqX8ulzl/IY3d/fvjw9PHx5en5x1eRjI1pxEz35lBMo+GLvWm0dghFdm3tGJDs7EIyc725Abm4c8uBphAw2hiIr83ZWPfARQgQ4cMa0Mr6roEay+lGPXE0ATcc3TVQTj9OfYM0+OVJghOFkLmqjVRTBkJBQy0DA0QQedCl0bXsfc1QHM1cWK7s5ag9edMbeLqHzt64wCW71bnqZgFlunCV7IhIMhxOkCJuMxr39g1wisfdJxGV/A9f/p/3Hx+//e6FjSw5C02sjkMTq893k/hTCbGlOhFVeiw2XvEeQ2xo6TGEYrR2iNh8CWBCqLJyUnLGFBHzfMBgH+puVnDWJ1HUHHoFvbKxievR2tWCu8naw2s2IAUfYdo/BF1/ZsmY9PM99XvV7n85bMdLsm6kLX93q1eozSEWTZMSBanM6iZlU5tz7PfJFz8Wdbp1ijOEEiNa8solRoGi1oqmDLNNyngF09Gz36c45EjCKCo1Sc1+3/BEVbgoY41XIv+8cZmKmB80XxS17wBOSDsc8+/bnGnlcsbDhBW/V+tLrN70DyOz65RNH1Jdrb5vWKtFjem6Mk0wqsr3CSAg/y7Z79VZxe25aWnlQpWyaQ1rQ0rd0kVWi+G/G/JdYYy5qc5FUraEOeJ0y8PNwQPftzyEmnSq6arZZkcZF/UUf3i4f/fy3Y+NPLOiN2ZZqdsiMJ3xw47mlNlenrLbZ9b+vXLf5PqPVum21hDAhWQZXUiOi0mzuMetFlxqwJXrHxSraTa+S10bud77CaqqBzhKpRzQlSfnIFvVm/SoN6GCESs1J8E1u1/TdEp8MDNzu4P3Cd1CFdEtouOYP8X7dM5tHDSzdmybPT4tTS8q/oUM+53csXrAxiJNxfLIrR/cvps7I0KC7PGOi5lTmteQ0GbCb8/91eb8DcnEYjwJ5QH5g5YaJTmtQY3kPI3nxZA/e3VdRrCTbuzywrn749P7STP++P5bHizD69MJlyyf15stdQz+LzVkwqHb5xT+X0RY23Do/vFZsf0YtRhbKrtskIJDTXddZ4cUnK6w2e+GXZbDvFZN8yZ/aC+AGbVD1Z+22KGZ0Jy2q6lkC1dFW3iwLFe67wLFITjqLjeOEHkQ89B0xIN7oJKhIzI45vM52CNiaY7xvs0bCcyRFdccyZrESUwu2AGAcNj8IlppJAzBeNEIAUYSZmgLkFo9oPpGM8YnR7zbrUrafxrrG+TKl67MOZKxRdD8NRZQZEzb0MiywDYg2QjuWoCNI0mksczwLs6iJjMnQQ7+A2kVzPwKuf6L2WKutz/8ON6vd/959+eHt08zgvEf79/ff9vC8VfdqF/mpi9ozJ146AV9DsM4mFMoXkGeioDWZyKgV4QCP+XhbGEGD+CePf9VPFcd+/KOXY/X+Zhkkme0q0e0wDLusWf779oNaMv13zkuwxnMAAXyu3hDOdAxNDtSA2DGlGFsfq0djAQVTPGRqJjq5Z7qIwSbl1U8ge3/nqUcuGXAyn12R/WeEQM81/cJNK1vai23R7TYwRrLAuiyDwU55DGMy6+Xp72JBPsg+ZdQCpapEqTdv/5lESmXfZHg9roqOohYkTT/9f7Dy9OHhj7g5+ssN72tT9yhqid47FhOHHkqJc6KPBLOQY8cUjmMqxsNpZmwiYT2A7OFfTtex3FnSPR0+9hdQQ+tRqMcdL1R4tOUflxgw6QqzWOh2s+uIqZuNFx/HHlgWWADEE62KrhGa9Fdk39VZVGECz6FCqXJpiS9FTNhT4llLKPsoEhy3l4STjaaBlxVapXtjwrgcS3Jl6YjzB6kgLtAmVIViqO1XdlX2qJK+F+f7r++++39u/v3b8eX1b88vB8Pk7d86oTw2a4BE39ip2k2q4GXx33P/DGkUAhfFBO8z8Z7w8wT2cImgsRLQ9G6xKb+g/pXLyIJ55DNF7leMQiFLFJGmcq2MglEOMYreUU0q7QNpLc61jrlAEzCjUd9mXIN3npOpbVh7vLr0mzbC4h919spy0XeOEOadgqQrSlFxwutT5kyvYgkcZlGiEHdPRDuXTyK8qRTAGIYKd9RfTWW6e6Uslx8kNhuDg+c0mXKhrvyAmHQ04HYnNIzEM4xH9fhbYCX/vjw9eP93ZuH5/9+ZPH8w+mbSB5/kcifcxof5Y57XFfK8FeePXHlnQifVjlYqC28DRJkNQFzSZ8NzbJlLz6zqrIhKWGWvwoiKaeiL2BuGAZ0n4p9EDu0I1dwu6OeS+uzaTlwn73JPxtbgIYS2U838rHNpotTkiQtnio+YVzsSUzP122YA0931q3kT9JvVQE10uAPrh25JC3krsyBz5Ob7tUPfe/WVAh/fPj48f7bRgIX95qS+XOmZL61/un+3Yfv7u/m/yInym+gtsKFy9PMRSPnIEVm2Kdy4lpb8o1w7h+bzCT+rL1aQoi4sJx3AgF4T7Ao3nVxVTDD9BXobAmYPFIQuzVk4tEEjRsSoYoKyDiATRkCKyVh6SiKWw4ER/gS4OXiCFw5EhRJIIOOCCY2NaPNjN6Wd4+xn+HwVa+n76/o9H09aV9P2teT9jOctBM8CZpa//j0FY8sPaVPDL/6k9afO2n1uZPWnztp9cmTVqaX9eDVPreNoi+wHyxz2KaYenzDiWlVXVJOtrosz6oKeQrOzzXqqdmoO9tVs5W/ClQ9bbHMampDTjnZ7jJbdSC4UMx5OHlfpnxr7eYVaGMV1caKLy4qqwZg5SMfjzcdMkpH06myquncFEfvhqQ7koJ0DilBpcjEiwXqmySsb8PvAIMOgRm13MnwwI06qsl1hJiaQk7qaDzVVrMiBMKBq1xQ/sImvFxQoID/yN1UdpqX1zfBL/ZN4OYMOZcpnU4KsONKcUx4AzU0W2h23E+2q13Btbss++zSkCannBbYpeHOj7xZAc3avlYt1yom5aJivaGtX1gUmxRqdV9rA8rmbsDRTsGrZfbXKePdQIz5YkMqeecYcGjOS0+ZcZqkzXytFTIkrHALrgE/GU96TYNs3AqoRXKr7yhlfIXpMkBpQyvW6yyLKsnRFbBWaGttalOtePKar3RnJVm6O9cKsTtXfqWt4Ax//PTu5fHu9/dvX56e7/7p08t3D+9fHt/OG4q5EMeBht7MecKeSJ0Xgz0ScaJOeMsGfwpgUrGhwLXLEd1l3bFMfeCcG/Xts80neSxhYJ48slkfIZr6CtLJi842OcBBRbKAjadNirLWtp0LT2GQRDkhnzZM09ql9zCBFZJmAgw5H8qmHNPoBLGVDRjSYUt7lssJSJFxBRqvgHxqpYQYwjAlXSul5zamnWnNMO6/M3Yjg7UZDQlqdADyZbqa9Uyz0ZD8k9JjhikmVd+OZiWHSB5pqjvIQGJVe4lzrXKQ3CYCWi69mwFRLBJmKAgbCExSQQiRwSiyCkwe5w/iUogjzsKamVx0N8xFtcZKykZlwRnSkd2pAZ/JW8ItjbHCzXyadvCgIC7G4ijDKIhdTBui4FWhYcsEmpLcgrioexk6g9xWGWrJVM6wtQBD3tv0MsJa0+IW6RjH2XQok/345j/+9e7L+5f7r+4/PvBe6urXrZZApCx9AotVH/cMDCc8A8MJz8DxYWhaOBEakklsXOPQL1txoaAmUCwg8A8Wu5v2ZcuT4DyWRTkNPYYY6kmT3lAtItJoMc7TKc6Bvr9+KfbUv4GbXY5VnXRTFwE9sUGxclLy56/SAEmxZNgnvOmaApgFrQrkAV7pEFI2gzBoG61SJokt9EA4WC4rS0zNHo4mA+gQDvtnNljkyhQNcWY5ZdwqK6hoT4ckF9mwZ7QcKz0HzBGLy9roNWxDBhL5JXMK06vIxG07w0yw8+0hc2j4jpMzxkWbbwEHcobxZAtYjBTxk7WgRLGebAELz6E6ZdOOEbUeGEjFMj6uYplidzDLV5wKIJMKE0o1sosM3a2734dT1snULCvXq/YBokDmU+Ury3LYAOMCDJShNqdcWRpEj7U/Pb08fpM0cnd/+PQVn+dlQgH9XAKh+7kaqiyfwPRPDYy9g3lPoZhXhwxVebH9LhUpL4K2eZTyjH97t8Bq7ASZKMet27miqm1FESQJk+k9Tzc76aRZYZUGqCd9q6Kh63JwqpxJfKWYJmAUdxIFlkOBRGuPp6i6JJxtlGUPTRSK3DE5bJg3gAUBlLefnqeFJWfanFZWLT+bBAGNf/4o5yKzalytMega/qQ1zcUVnkhzVfD3VBdUoBJYuIYQjbUWLKpAvT5VkhTtMpVTy0ZIfVn+LMUhwTI1NI9RhBwbdYqT7WSH7NoOnlsw3pBE4aNIqcoUA12KZJVpCQOkZaSGMt50DmNhYv2p4PLjCDgeyZEBa9O6yqJ1srlTkqwYi+Kxm/d5XamlyQmWdgRQTjY7Hi9WcVAXnoJvWGQQBYE3LYpLkHe3Sq6eyRx/efrAQiVMyHPy8wkd5mcqdAA8vNDnkq3rU8nWvT6VbH0pdlAlJdpZy5PDl5QVFF0ddkPiuF1O81JxYGiRQ0qF8Vyc+BJ2l+9qNnCmIG8H6tehywRQJdCU7hOOfLGEhMh43waB5UcguBeeLqrv/KD2RvXWYYySyoVLdeSILOhByQCEjoaD4qDnJMkKku7iWyGhlgF4UP2gabByIiiaNRGW0YagQFuga8HMMKWimW3PDAByvfxVzP7HpWVuoiK3WzAcKAW0cO1wB7gy/208bscG33979+bHjy8PP9z9nx+aQb6/RNuNOW68OWy5OYToyoycsdqccJCJRLQsxYLFQTFfjanjKqd9pgMCmoSKIzvnj5FjGQQ4OoNuyr4aTMl6KEYPRA53NAQCnAbzMu+gy8Pcpx5RQlyTXDSFEETKHcpoa1ze7EDUKuMhqdFRQxWPSWvhAmIQDiS8sLBztgzjO3eAeb30t7D0t9HCZpCYBXZHFxSsleWvwhToriE267ee92soDtFZwIBqd8EALImpmF65VOZXqN/tWSVbh+TdHEYGlzc7m/fhGvWL44MD8DCn+5vn7InXqF/x8m15gAF2IJMoZWcHPKvI6a196Wmj/o1x3MDw+vnrwy1nz7NOU5XZw4vtCrsjsM+j/vq9P3FB4Px5W3+G9c/fNWrn5g/qr+6+8bmpbrf7rlA7u/ug/urpeQX+sqfnNepXvHbF3+CZh0Ht//7014fnN989vHt393s+uj26X7tv3gohLs+pRM0plWh0p1SiS7GDKlHZToekuaTlksu/kz0SFxCbzdPRDRVrJxCCb6sC2S4GbjtHYt2RIsnQQDjdrGATHZbOMHzMuq6USFJxbseSYIMD7G9sGwnZPEyBy15vSoiQJuf8avEtffa5BlkC3K3vyx7FaddVeZYUhHlwNwHqHADAvPySXbzn63AxBGy8iOmiQTCbPSFb/XHQn2LuEqO4eCNDlPvoLKY6VS98Fj5V1teP7RqIPFBt1StqXiuJSRWX08yXQanDDn0937Dj4lBgYNcUBbSYseyXG+U/Pj18etiBJT8ZluQvURSQZ5JaHxIFVp+sY+ZReVjre9HWkiP3AMhNOkCSfvBwPgYIkJSSi2nPbZXY6oYSgTK5HlUKLcv40qQILEPKyVEIbhRTRE/x8aiQhy71+VToZVKAT1Hj1S4EMvIwey8USdFXWbmWmtO8ZEhoOid0jERxzNRT7oySphY67dMPuA6k5sshfoHJlTVpxXOTdAplBsrJVvWcO6KOACTzy3v59WLctD3tjpMfmVVjyCx7GC5STrZrB8Vmg7NlZQskKpRi07GAWTHzJTst7yZJUj+lKdBEQrLg0DPSyS9LcqmIy0eDXMdqB5d3G0lQeOVCzAmbEEYNSPedu0Qbbt3QbTLlr7vKNrGB2510m1icxN5tkgawd5sk7lxhn6QJO7pRtIONKgVZIytpsx+sg2kqkXSlQrNeF51bxRjuEKxuFbMOlm6VKdNSeausbKhVO/m/XudG0dzioXslWNiinXtlcr/dv1fSr5dF1TXccQDiwF5J3LnCXkkTdnSvOIPrly7tlbTZEMHANDGkTYXeXmuveFZuru4Vb/DKo3slIMlv2aDKe+VKamYNT8s/f/3h7s8PPzzNDkUtRbN9xav+FSiaVa+i2e1UNFvgZvYWAkxkSbCUkRBcMyl8Q9HMqbGoc9VyolxSbqFpDnlWwhX1M+4dsmMCTyXnMhUVCVSA8PzYTnfvmFBa3vuJolQDENN0F+Zq5RbBEY0zeKG2lfNc7zl9n1Tl2dLoYJ2NTZk1D50tplCzMR8bljA+d2fDFgyZNEwEB1VVtbAmEOdvkwha5gp9B/pzTZKR2rBWRUtE6AS9zjSgzF0dZE4KOYeLpTPx7XcPX3969/DMpTmbEfLOXWSN4IvKXeaPp1+GQ9yEm3rGjqcbXGnq0J0mEfo6HPKSBQY6f+ROw9Z8Q2X68O7d44ePD3M2br1A6mqEa5KwffVcS7bs8svQopopxGl15VsNX3qySptgrFv+B4sb+Wx1sBWzg+cke5/GwTUxSyxzE/NfBSUm28T4tKiN0PtEgs3MberpH2+f3j09383//c0X/8838/+m8hdTZmcgxb/O+Flq6R6iYkozhdvRabuc71RyDv1ZEi5KPCw9V3IOjvgrQGkvraayk5OL2lUW3DGVg0aXzPbMKjP48pyiLTyJsoDXjmdWEuZnCAClUPTinEJlmIeaJ42nny+rJlCjGuhfJbP82BtWfnGxxWqP9HhgdZ14AAm53hjPjx9edrx97Ovb5xf+9tkBjd14/OgmWPTF6ycUCRHACydPmzIluASsev4JZLh4sEi6lNBt8fstXkAwpI2zDb4XZIc4z7o/RZq0Ouj8+9kXEBedGRzJ5YyRqMqQ7niItqxTaGJo9LsBwtkhsCivZZBq9I+flds5CGbKx0ozLa8UsUXiTli5dIhIMYa2gyhIilCwzHi9RFnR43tEMZAEv1WB+ZakEwfNxIZiFOBSQW0F7HYNo9DlcF3t09a4CETFuP0KxVZrm5xmyxRLzxuvVz4qeQMPl4BqyCk1Bvtm+4UGMR7Mi2HPhf7Lk84tIXdU2X0Jy5MOLsndIPSAI+/MlQehdKKjLTboX+dKEwy9VK5rfJGLqdMib9RkX0+2KFgvm6IlXaH9pxVkCmHyugIBxxqXOiuXqln7xpiDI2sqySF6VpaDZ5nQDGVJRKrKPnc0GtkRK2bEMnY3zo2YQiKp7PNtRgxDqo24nVm9Y8TSEy96lX2+0YjtDRIx+kHH/Ba/+/P92+/5q1zLX/1dHvMUQofTeMhzWTzisYs8K3bYUVX7hJ1+9jJn3RJ1Qn6/uNOT0RxJ5y92xpEDR3WZCVcC+lbXgCPrpecMaRidJZBy9o7nGI2D2t7z0L517RQBzbue68M1GpBqVwvb++BilLb/FmQ7EUgKhrg2vitlRetuaHDAtjig+jvR4IAhaVMuOLAjaU0nB1Qle8bKARPa+Uw6OSBJJpsLDsg92UN6OIDD2wBbvr7NXt9mr2+z17fZ69vss7zNNrK0F4N2t5Kl3Xj1u7IsjaSbyNI4qq0sHXXfgHlZenq3uqIsjZRbyNI4qLosHaccjbeUpa/RAC9LYwt1OSrEwbubylFRJiPwVo5C0s3kKBwewwHb3wmeAxPqXoUDSLodB2B4DAcUsxCvwwEzueOUOQCk23FAkV1wrbzyl+q2x7cPd7/9xKWUD3MS3nPqNiPOKtxmT7/b6dwm05I9lT0XnB3tDcFAZeasuFfbpo09jggqAaB5Cwha+iaI/7FlviqTe/Eq2yJQoOs1yqf0OQ+GSQNxtpK90hY9i7XjPgdF8n3bwmeN137en9JvsR+hKJArfOoRxGT2syXcFNnnWhuxXFn5szHFNuBzpY08bR9UVfpodaF2W4YDURBn0gzGSlLWlIa05BrL5Epr1SxZUHUuAZQlnFx+vNltRvGf87XvY/2j3e376cqimmcgWwRJHma5z7qlqZAJPUaJoqMx99y7QYibLFyTdzOSCntb2um5c/K2lIcvS+0/n3kqHLondSp2zNNEnzNP+VMX5ppk4pCzpwTnUpV7jcHntgKJwyUxg9sZ/6bNYPblnmDRXBzXoMqDo9KPF/2NJAmVFVJUmbK5x9WgWxRV9rILk2gMOCyd+fSMmN4yVQ4Q4Lj062RP6Gw6jaOeySG/F4EpQOhomR2zNbmuWSC3Y3fDyyDqWmdfS+TtQAjKA9cgIogSptQcGElhG5WaXEepFAzY7MB+YzaXZOfXEAh3DZuL9gcJlmTGWIcAlI0opqCsc2RfIsWT1HQWOAcE7s4WSRQqCllyOlqrujtNImXnH/+YkiLnp4GqUiSOrjx+PLFoWb2DEkTOb4OsoRQtYSFGEowpA/SRllGbdjbCrqDju8QlaFFs7IJ6XHSr1TOCPDuswUXa1q67tGpcUdKzy8VW2zXtrGtalCX/JEhG9rxvq+mVYOVU/jqRZEXhDO940dTGJYFtgUn2HZoGF776CfajXr1WzVmpTToiJPJHpSHR2wpP6L48oovEznhUKAr24uD46sy2KLn95Ulc+rpQgPI53jt/fnh3/yPz3PFTyPbn0w1CGXlb1aA5oxl0EI6lj8VBQ2PKn/LIO/jkUTvjoPMnj8JkXiRrJxKo0VPCq58StErhIoJcrGglpS8OwxOC3NzRqkiYj6jiDR1Tl2gJ5eGzLXy2REpD9ILKd0eQExQiTdQIeYZyA7FAoUsmE7sT/olsyjeSlV6BH+LJgzBpGDSDjqx3ZAisjFdAMkfDCRMqf+nE7DsnBcA7p5wmeuCgPbsu4tmBhZEvbE2SBN/WzXs2oWL1Sh+ac16yXex07CTuSBicghSlq0BzOc6lzZ4UCFPtkUvSk0fM0YSZp3e5ZzN7kjMZ14AnRgwk0CPKi7T564TzyagFpAcxrK9pDzoPl1nFkrydFmySBUICstFdIzVcEjDtOvlouCQ842lgbooPdylMzvmZP97dv//67s2nrz7OuAmT5MGp0/0g9VkB84R8qT6HeOm6DM/mXLyHsMfES5vpxo/Ll+5gxIe61DefVbdxCdUFSaYQVbeTsGEbVOQsXX68hKJT3ZFGiq5Qmq9cTpUzKTV2cib9FM2g2BULc2RUOde7JVfBhHxXKjFK8pb/LsUGQ0+2KJR1BoaxJUDWerlJCZOYbWX5O1W1jbxyLYon6Gca+uXbzuLlKUUFPpOdSw2xkijZqb0JgRry3jJbdQfcZvXgIVgW+JbcybVrq60DNAJwq2ppKRX3KogEJgNX8qC7lD6jhCdUU811WtYc70umerpD069/TFAN5w/eYNjVSLbApEVXDcpGq+1h29YpNgyh66k4bhsusXo79zCvGZ4SyjDVKwqhpS6+c6dEatSWleluPr1upUyfsvYoznjq+nT1lr1hK6mbxlHBDUOjZpASyE1iq5RJ06SK2K4Kr/RNGby46xRrr5/ofbrsNv6d//z+6w9Po+jGx1SL2BdTnbDPD3p5OvvTRVY3oCJrYCeNYscwS0axSkTwigy6lXEyuWrJIkpfqqt2Jeshd7Nb5rxBwl5dO0/l+kL8j3+9+/L+5f6r+48cgJ43v3YAPSgizWHX41oZ1vs4HHn5ZWUOwubphBvF3RJ+QLGq7FfiOUQ6bAKFBgAMW5I39DYuuDCGMsyZBFUzO3yZyxVlZZZmsOm6a1/62aq94HCdLmDdxsDjpSZpOdWvTght53H9WM1vH2ggpxK3ZlDUTySAbrOJuSdxRZYXpOTA0ycogFYDyRW3mMZRcnHKE7p3Pi65jitSigcHnOYiaZiQPKdj37FI+IeBMlyicdleJmV2psodr+iOPWuQNRaNwruga3BNPtq7BhWXbNP4tPxPWziWI6a1dTdOfz6tOePbjMUoxrLzpuf3mLph9dj7bXgESKJOnecw2iU8t3ba1UOchDzo0G+6d6w2jE3Z6PYJm2DPi5jncwZeZunFPsaoyB0IccftwLPGt0/Ki/fyagDMKZFSNvkdQY4ea82PGaebFEvbs65JMYpcMNgDpFz7FeNLr5i76R//9D+fnllAcDNlTjj3oNE/xxfN+JaPp/ymEBZcnnjXHIsTCWfwSM9ZtDDrZdN/3HD6Yme5Zw1Uj9sH4xzdIJpurEmjq3TxdHaMZDzZ5v3OaC7pKxYpJpO8T+k9OLapOexnwQqf8y4cdHVSRdUhuq3JdtYEYKAfihy0lns5yXZ+j0b9XJghVl+IB9CIh92eQsgjv8jXRdctxrkgtDM82EFD5glTeX4yV61Ks8g2oDC3hfYVLArLCVoud2zE2yYOtg3ookBErqWaZYG8moeHA4QBN1QSCjBC8tiA64zv4GZnvH2lp4ZU0Hy3155G3unK0rCceLrjAAxMyjMlmc1rdftwaDzKGAi12J4VTPxjK/m4xcD60ge6pD040rXnZYD7aij6REj22bJjxYXBJ9k7TNlFSy8/xZ8J0dcyKcMv5M6gLlPL8MvtKXOzyrHnhVet2r2zZtVQ4m/x5ueW/mSh9h1PJ80lxtN7xAr+bSP4+6h5JnjId1U+FVhdpNrBGuB9HI43YHftnsBOruYuOzw0N072TqSrHJ9/6LwOlI0mAnNy2E16KP47bKGLp2ZsUHBqkWLWvB/CVzQlGqy6qiWKTapcOPeWPwveYJwO0sv2xlQCztblr4KfBbd7prSE7eVhYHmYiv8Im9enLDRPXpoAgiJarHSDRMAJWdwEgdO2Bu6EQzPpjKWwWErnP8tRgFxoqm82ogZMVrT8WWiEO82RWddWSkSqlHjz4/u3nGnVvRpWf6GG1baKO7DeapZ5pWP1aFR1+02qKIRIfy2DKqgqp5dD0+Rp4WltK/EBrNGzt/6lr636NyPEJL2mPbEzwOpymcx/FfQTXEyNN2RyDSQb9mJHFjfWB1Jx8V6WNjwpesqUOZY6PStIcrzB50U2AjMW3eF8IFFJsfxVcIZlRxRIli0DGbI3lDl0MDnw5hQXVvW3J/m3dht1lYSBLH8V1XKs/HwTLbrOLqw/P3x4en55fP8td2NN2ah/gXfWIYglDNH4PPeWPHFp+VOXVmjGgLiBv7Y0c7JhA5s0dWZWPeSp7RymMI8EyM83KMvC7hsIm+9SFl38PQRkj6Jn7HIrUjwT+2r3vGBhi2NToJ03s9no8uCE5JcbiofE9eNPZJmCM4VzCO0gpaBMkqAyU3lcOlCi3a6z0KCMh3jMxxXZ71PSx3L/ItyAgozNwppmKJq0ttYGlIKtF6GpfLlWJymnoNY6BWurjs/NPq/F9uqUQNbIWhtQquMbL+YK17wj7WGtDEW15s9HslbW9qqUoFPq8E17SNmMzyQF4si1fJc4CyqgOoWem2ttoTJ/WHbDz5VCuYa1MpQaP9daKdeQsuEa1lqnYG3XfsKjQPRy//zy6cPdX+4/fs9nF/ev2cV/4dnFd8Bs8MnFOV9XUXjIi2pa8XJWcdvZwXGfRVb5SJxHXUa4UVLx4mkyQFbxHu9gThMfFYGdAhkVCGfzcQc2pXjWJLw4FcHp8wrSVdcIfqDJxOPl97OgDbzIqCoqE5NFxK42z+WC8iRuV6z3oKdwkuBWmUOV+gxr7wJTKIl0OXQQgPhYtwFSUhmq6AYy3G4QB9HdkKhLAshqkgRwI8ER6QDTgRMbCmY1KyYlt55AyaAYGwkkE7gVW9JZtN84Q4K0ISW6c+RzsjoRCCeTFhgFbJdFgMvFwrlB19aIxU2w1zRMJkWC0qCvCYpEeSuQ3wKBFo0rQZMFEKGNfAEo+H0kIFGYaD4SrRgKl6YSmyEveLvHGFrx/jFcbIhr5Yhp1a64MANXzA1iwJPBWrLQQMqju2jytijuIwvQN4YAXRqwiRoy5yYCIFb22YLfgY75UrCoQyAYg9auWE2a6CNsBrmFBJW2sCYgryjdapePAvWJmhyMqA3RdhMED49v8nsMjc/jssOgytH0wCdDzg9v14OIRmt5OIokaQNtzJJUhQkfHBlFWgjZJCUnVBsH8hmeOAS235niLeHApuxI1jOL3tKShB2DWt2RbWzl+m6OZD0pOH5pCQPM0JVHnsUsjR0XseecLDrrtmZH3dd8bYUV9/Ll6fn+W9ZnO7ymnf7lpp0G2M+enHFMzEn2ZgoJbq2nrbp2lpibLr5dPU+o9wXEyNvleN3KMhfYhRf45cxXrWn2oezzRqTwlXJIyJtRof6x1oYXpf6K8jBEpT9esG1EXajMMx9p/VGz9QMbiZyBXK98N744G/C5Ohu03DpNpCFgfflzrR0vyr0WteGISr+8YNtJTKWlgNekFc9+rrWh8P1YnIHad6cK8+IUOyt5GfxMm0jMr3wut+FFubeiNgxR7FOqptxGYnteIn2k9Xv2c7l+Bc/LEmfz3le/ldNCrjNQ5GjpY94LrKCSdlIUygAvK3wvfy7XD5wv8rL0Me9J1IW6ryIdzn6SmXx499t3T1/xUDr61y4mem4kFRlR2aNpErGdI64J0I48roGfbL1EmRcKynMzmIL6HDDGaSX480BQIbF2IGxOE3gVw+P0JP6A5oJFvCCahgCqM9HU9nONeg6Bl762PajZFAGwc2aFjbcEZSsnnMVmMEw0i9IVZPSQplTZNgpiNVFyigeRg9qdTMRBesAqQQsC1hy5z66d4qLV/1nBXp1nX5wz19uo4qCjnS4bdTRoAjVZ8gZ0uZtUYEDQRF+F9vYqwciNhtzwBE31mZ77rBzRp4NXCiXgqFUos8WCJl71GLus4PZR7IS4toJLIBD2QoWHShQvm4sodNTtBKPh3tHvBoA6F5ypYp+ajuOKcpWFZGCltZaSYrBGLXeinMaa2lO37+k1F9ild6TV4+rWXb3mOaK7uH2WI7BGtkFly75z7WxTzOrVgQvuFV27jq87dpwWhrnT1F5+lGtmUy30JXfh6xYds8jww1SyAaKF2rSdRri1a7i4GNt20eD3HF97zylk2DiF2M5nytUtuXD8vlOIr1v1zSXHE1gnm8sM40eITLga4agF0KwlYpFAXUishHCfGiFXVDlM1lL+vKnG1xoGgiHw3NbC53gDRYuiipY52farpuVV01LXtNhjmhYLChVV07SoSmghehOo029TQC3hbvFsuwWD+zwnRND8GIKFjyUUUSZJm33u6b/kIsTK7AMtjd6RPaEFbOq4pBC5zyS4HVJCRE8Wyj4o4QRxNnXZ557+m4HNz1C24IjVa/A8KicC23DXNNE+uDWsw3Q2bDjQRMDCv1B76N3pr1oNc0hm2pKzALzngNDDavZ5X0l1rsB/UxNdpzEXyF0k4giXs61UiVonXfRSnLCs9olQ6jjYZiSWWruqunTZR4+of5ElQNhIY2oFlgqdk2Y58Am6P3xcXWF790fgVGR0fwS8ka+wQTyHJEc3iNVwqvZvEMsBOdU2iLXrBlEknk8WCc6t8mytSl1ckg4JcTjn1YKZXyy3QWhCm1jsDRLoBsH+0w1yJclcU8n8LwuVk8zNq2T+y5TMC74LouisS6VyU5PKPQjfmkjlOaEQDWwgDVAkrvSaJ3giEaITc5Uw5W4ifvwmI2zMSSh9WnKLG+6zIul5sRpViXAxvlISCXlLNqCAU/xca8fJYjlkUOUz7RVWU2sHB2yIL7a5UKCUCRvBSK3oYJLl3UbW8pW2bFgViGVCrS0cOC25OtDXCLR361RU2sIYIGdoRM/qz14m2G0gS8wIVR7SkkigbSGrqoRaWzhwWnLdpjUC7R1WRdu6ypUZBx8u78w3jz98YC9MKUYR6TQMF2asUkeuzcO5blfH6kPpbhGnxMYj92c4Bcs1SAjNVe6QqzmgfKtD92hWanfOLznDxS3L1QUaf0hIHMKGHDBt+vJnwRciDlFzLiy21YqeeZmS9M1/FnEDvWazDDbfZRIRwea/Cg7vozisWZ+hQASLqFskPyduuzyD1OCapCmaJxDXFUFIhTeqw0eqq1Q8XgG6UjFDwgoLKFdQ2k4nUt6mb5KmgMhKm0iqj3M8e12N7QwpTjD95RkB0sY7FUsHXZ3q5VAujnMkuRpJk3Fe436YIzPTyTI/pV5e31J82FHjhvtTIxt57WJspYkIp3KfL8X25z5PJ3479y+XLshwB7Ag1oO0oURHeymHY01flas00o+X55LsaXXpez3tda6+xpNDdfFWcEOFEW2BuGw5snO8x1yLQqNIoK5KiId1g8Fbq21iiaCVi5WMwYYZrtugAcBo9mgi+aZTZXVf5KunIvWo2/rLw/0Pd7+fCs6N3qXsuWw4aG9K0qqQyhby9men63LHdV0C3wVK2EMKL3dc4bU2Fk4g7wQSnQXXJMWCKPpYl43UELhOA78CRs9sXOBTAV1sNNfLxcycmEdn1owoSc1kt/WYUIqXLIOqhwvipu+2bI9X1wcVxdf3X57vv/nm8e3dH+/f33/78HzT3fy/X84K8HiWx1JmG77Ym0ZrwR7KtG2yYnv3MoI60lgHbnuqUNufBNKisL4DxqrqAnRE8aOjkZ2quJHRgcGXI0GjLcD4uFrIqiMhjCk9feVz/obSeI6pYhq/SJTmhY+iwE/0UbckfxBAkJXt3wSdR+niuWMt/1mSkIpiXxRE1FwdwT+4wTk4vv7v+8evH96/PH7z+PD13e+evn64+7ev/r+xzP9arzhUmR1RIYZTMok6AwioAluKx/WX9gRGsrTHJRIvGLUd2KOTR60pZ+6KDQz2UEQzm2DKWg3r+R4AfWEFoTmy8SOpkQs3C5d37PS4F+/A+gOjrNRSAIpkNVEioe+gVYRnRlwAsYUu92fF5Soxos2TVh46NsrQiPac8yncDZvvzFElo7nw2wvtxDwR8/LEYgQi1zg2sUHgx26dHrXj/M6MaC+K1qw5LrTCyPOzJkEP4LgUeCoUY3Q3G8EjtKHeUiQEyjbXsHJgIFj+KqbVYyKKbEV5rMFfeFwLnTM+A5oxQV7tGWeTm1kuMdue6hvrlYsX3MMczGpd9BGMe2qvJumawADDvrx6tUxMmos2812Vc9Ck3ZUHLgJ8B1sa8VmOY4xKRqce91sO1XdXA3z/OR9CZE8hfsddZV3N4Ki3mnrrbrhorb/puuIjhK+wrqzuXbh8/zm07Oq6iquajjHfg6TquBRYls9P58INcOfRKvl/P/K6Mvtz1pWtGiJ36JXp+VI1nRk0psKph2al2DUz8Rzy81R+jSFqxumD90kx/focmMmaJLmqAzwhK+/HyJ2McW/HfSU0nU3nJff2XRZfc54/1YuB7wiCb3Y+f62ohB9ZDhnF7pUgy2A1gUNsVs3aLRhhaycy0/c2hkit7/haY2oPg++SrT2Xh30H3y1chrYcVhY4SN4dnIf9UF41kVMPgA6ai+JPtbuyTd/yOWf1LW46jRai//zDl1ymuckn9RX09xcL+ptO3eGcJJ0OdOYJQPKqDPswhrnW5hVZvT6ICzl4VEfXvMvZNh2jWYmRRBVmX0+2KLi0ycVwEDT2NK9ILpSRu5uZmuWOIEku8XoZrsQDIlrnmOyNhuS5e8FWUQtdli+AV+46VO66CjxRfe+ZttdXuwXFARWaWoqNsKYHdG3H54COz+EweBrXgtzbguIEN2ihEGUCSSeaT3lgcjkTsbZsHGhreK3auWeILg8NsmhqvSOgmG/esOB0TP17h+d31F8AQjLXmTvDyc3dc2dY+LEyRJhdo927B8fdtVz9e4dnuZ0tKxhoes2fYvtnjzEhMfVfY/5qgOUa45zFLfdevfb9O68FI1c4M/W15m4OwL/h3GlOs14Fm49r8LrvHaBi+MvVv3OAKu6ofzODYPA37Ve1AYulKRssWdMIV7/cVz+Py6HKMyjDoGQRhlkB9INtawY9KCx8BdeYVbc4kqFOr9l3ZStaDXPc60qO+zTABvb0ZmFjajGSUcoBqpRoyrNxfqVOfVv+KqLz1KXNSFCJ0PnXmaZK0oAIaCoSoOPQR2L5JoK9HszQk/NFcqirwTSnnM2Sw+ww6PY22UEaV9TNthWsNlVebJ4z43D1i531cyn4oP5rZyd2F7qzuy/vX+7vvnxk8xNPeZk/dxDbyBj1qklbGGHPadLkGU2a7dKk2Z2aNNGvR2PBh0heWw0u0U1oelE2W+2wuVvfPm0C+kCF8pUvHY/wqsmFrrIUr5wOH1p25ehszeJmURx88I10bSBnlfz7VKy4FXFJQgea4HVZ25HAvKghuXkD4epay1ABkk2hn81bQMItUBQbmKu7eX/xNWu+5g1Ch73KeFy82YCcPTYiBUmtDQP+CA8OjS8OXdYmLjliGUfbZibzVgtLfxstFFIC4yCbAJMCtYmiLEuy7nBcC3JvC8o2XGuLg8QUcWHH25iH8dSsr+SOzA2N+hUHGKdD9e2d5xnsGSB7O+r+AUZea2nZt7eW7b3YGiDLYdkN9Mq+vaH+jWoPx987vDk5NcPf3uEZ0ay94Msrr7X/jOnL+LKDffLw/tOo+9I7NMPNDjCaYb1Ds91YnqzuS1csPhCZYWzdw2r//mOOcNv04Nqx/2Kz/sIJ6q41g1pxV33/DCouhKo6g4go55u6RQ0Ko3LaBMFZZtr+Uq36tWrWvhE+k13Et4/PgMBZYSj7g0mOvUETVCQPetHzw8aEc5aNyyvr4SQAJLWmVYNopYdQxlfn4uPijnxwfP3ccw2qLxi8LLznZNugj55yxQ54ydwc0AC+/CX4z+yQeAy06ytpRiynqOPTHbu2/w7EDulBVSCIfVPhfr5643fo868K3HLhrf6fj88vn+7f3f3x/u1348y9pgz5lbvzmabrGY+ktR9IK1wDR4t5aOWmJkxt4m1zv7JtOu4MJhBaOvt+FkGr3qAtSyoI12HMSUdC0ZIjjC/nJXADTaqJmL89TpQMqJZtJ0apKZZBmubqzsOrk6xiCdA9/3mHhyzbQcu9N2yf1cBytktDzLUWsgTQafagkwbCyQXnNe9LR3GyJeQp7lnlnnN0kZYiuUCj9iTf0X+ifufLmnOPWp9YFGnaAdxWKc185bOpebhh0iHiTIDZ0wwBuLGSpCm6AMdWWfqkLeYpaHWys3POFjWX83mFFrHRaYYXD79XFWxVCz00BK/Uwpgc6YIHLtgiQVXQ9Y2EbHK2yAtvNqmCbJkAWklSETh5uXJ2mBxQKKEbujL6oQD3EEP5DLdXjUA9TayFpxQt4SDvOSWAymBTVaz0ysmVU2WCo9D8rvQZwBM8gT2yulyNyKq5Lt55RRK/+/3D/cun54ZEPsp6ryL5TyGS+3BKJPeHMBRHKRlK9onJQvKWuwspOTXoXB/ULNOipxkZrEQIoTIl6A2io2hSyKkdxA5KJMhNre+kJmV3UEiPJ2NKi0I5g5UB4TQ4r+A8ADJYOWjSdj0PreTfh3C0btR0Gtsni6T1PT/J13raR3m+F0cRR8hMPMOmcJ4UlZbS9zzBi8bpU+5gH7D3msAauoB1xholf7OtddmDvRilEgm5X4i0kr5P9yt1t9Sx0Inxe4JvhG5f825dIpzy2/VPDy9/fXr+/hU0ngcA1CcScPkTCbj0iQRc/gQwA4ig85LYomWSZM34c0E8r9LmI7InAJ6SWvD3tuI6gsYPvcOHrJjNXbZdOqBXJ+vWXM5TJfrq5vTqt+w38HvzcIvXmRA2L3rnwJY+3mZCrL3dhLD9rk3IYnnpnxDHwb91Doy1DnVOiOc8Q2/Z7+qEgBrdivwQjJAPl56CWEKTVJ2qkoHcFKvBn8MJfptMBv/5+HGSEt68fPr68enu396/a9jEXtMYYCpN25XHQB7L22lf8xi85jFoBNvAnv6v+6/ffvPt3ZeP99++f/r48vj2493vH/kcvPb1CRDPQIALAHQT5pBWDbIZRHdoR5us2MEdLdsIFxr8xYvuPnJ3xA24iOf7H9T1MuZvEiSEHVmB2C4GPXtoVcFnMq0WaNBj7GqTiePwQyjnoEtWjuBOJrgSMCF1qTtmSscAOACxp8HAId4E4g8VEBuQmC68bBFIDlsJnlWhi12M0bMi/MGxL/P16sBWVydEkkzaZp8r7Rhi+sPqqgRrqdY1+1xpx5FU11hdlUBTXaeKPHFNv1JKC48xo//18NXHx5eHu395eD+ehm8bSXGF++xho+GWcukclXomM486LJl+Fk0WZrE4fnllF0lQJW0VftVtf2k+8jKw7srEnL78+MfZGzbPd58Os9p353MbsLGEcLr/ZjyJPZe4Qm4lZF8JhFpVdpbgLGBydjnQfKiSJ9CqjG4RjMrPH3S/AMJ5XkUOGIV44Kz9qRGsJG4ajhDOd5TDFnNkUWrM3V4jWEnyj3juMx2vgtw8VQJlhHKQ8qFGAOTRi1vf8ARalQS5qkqg62gdYI2gKy6HBhR1s9tbI8zUYZKb9GfJZl2fXNsGlN3RgmGdum1F/aWJCHLaqc9xAEi6jXDUCJa3XASPaTvpsbU7zaMn6XJ4Mzivtc/zWh6idB9JrvG+u2JJuFIPnjmH1YKOhrqn7saksHG9vrxtPYS/zHhcPes5NNDK+q6lKG+3mj3nijmbqEqaMvQadP2Mi00P3NM5u4Lh4dhzxcPuUKzGbHFYJMAwytGg4BrrbT5wipkmLh7PT8cBxzXrbuxgFgakFrgHdpc9Hva8m7nhTvW2rQnzAtiKYGl3L8TFXNe3FtJ8qR3+7QUzcHK7ladveUy0wsSLmN6huYaPHbfM02wZW7GXMtK1rN7w6JXmu5oPnPHei175gTueYHBrdlnw5e5dC47NSiPK2ztYaFz23gOyY7HweSE1l2yn73KOnpup4hM9wmPY29OBNwKuZssNre8FwILRh27GsXknKjH8QV7YF0/vL1YS9X2byHO6qNDGBGTlc8tPiOyUSrilZCreLw4a77vb2USe0HzPa7O91s6fm55FE7h+eHSY32mocb/789O7RhSGew3CALuvOheEoc7FRZ8LwojhTFy063J8D583LppRBWziot1V4qK5IQbiLAaDhO+fLzIaFeXtE3WK7sMcbfOfhSuDA6XcAYSzpw0ld7RRSBUS9yp2FMDk6gpcG+PLqgnWNFqy+9RwWnBqOF+FWNKQwdIUw2NVW4ZvMCMwKjzpO18I2vBpOU0F8V9DSGw8mbZzh0ZcUluUX/095UnNAHqBM6PWZUkVIzJl2xrAj9pJLvO13p8OsVj70s+6A28xLsChDdW3TR1s845pvPbQVapXE83J6LKiUF3XUyAx0OgC7kl4BZw2QDiPAMFmq419ei/PJzk2ldWdM+P8XHC6DtX5qLD8IR1ICHVgT28X+qdzh6JFEfkHIwyU7jzHPJdPCwZVHTVFH/B6hZV1fWcA936yNt9tDnwPba8CwnFXJQyqoM02u2FN+Dcpd/Aa4o+GtwnFtViW+AWhR1trmiAu1UOR9gsJnSYH7TiTw/mLIJ2rml8CZZATBFanICcyW7Gn94Ni0S0Jo7XoXwDii3VcNVZXkFhQpLWuaUHl7yFWct2h227IcJyZBcD5C5KrgnCEvpuIvWQthaRBVxXVRu5jRUfNpiSopP7Dux2avziEEDBK9Z01ksvEaTpHzaZUhEFVRVone22kDMvzm93B6uvkJifOuuvHrcx+m7n28SPn6SsnP8Jfu/5RgyLRHdI/qk5cxmP6R5cl13nVP77qH1/1j6/6x1f946v+8VX/+Kp/fNU/vuofX/WPr/rHV/3jq/7xVf/4qn981T++6h8P6h/RBRoBEbKwT6H2IbiuaYCKEyCF4wTstrzQbEByKeToSzD9egEY6W5acAnVIwGEkJDeAghdg+bBRHrrt5zjtKCIlrFPP5ZUuQwWDEHqiBByMxJM6GqTVQRKsnYEqAL3LFu2WcEFlRCsPAQYKQfSTBtMwQSYDoi/CQWEYUYWcyVBSRXaedggeGco88KyODw5L6axhozS07LkpG6AU1oPjgNKHH7y2QNR3cBB3a6YME/P3z8873BS169WonAuVcBJK1E4l71LncveBeYlO6geO8pcvGoqSva1C2sRGrWE67MYMc3CkC7PTzQa+d4rPw2ifjXmYp2FISOlo23BNY2DK6QcT31QkbBGL0dDSgSdkcbfJpy98S0mc5Ie3KrtcSRxAZDGI8QRs4ZPpDAYRyDujcPHBC0VHAT35qWMgHl1mqy0CVgF5el8XEu/UoWSIvCntka5PW9rkqoRaMVsss84eOvnnR/7pSvjcrgox1I5o7wB0vT2cwSd32BOp02FAucrLzWuDJhlR0p5nErlyVROGTodqnXpuFKFy9rKSylMLkUYFWABSENKWTwZZCTdGOfLYIXR0URIDiDo8lkeeaCwrZwbGhmlJCVZWPOKLoAp4QApVVAQrNsiNpMaT8/m5d2qaKJPfBdbx6l+YvNl3Gwj9bnVxkbTZy+G2jxSW3KY1Y2BetdMocy3kPrbauHajjklqYt3zpmn/NcudyEqrP+sWVM/i3fOr0jump6THkZr+lUtdr6da88muWNoTZ0Ke+JOCbuJKknCpRDCFZoXnmPvcqDk6qR0xyGpq/WBSVYbfP/47C7B+VU8fhWPX8XjV/H4VTz+2YrHaCXD22/H4d3qQ5xXf13/74hsIWC3IK1HEyzMwLhVBUV2Avz+x9Tv3tYld/G76djN9Vnp5KlTljPtbLdQ02V3XNgbc4QC1uwRGnZYB5h1ESU5h0CGuqR1WggEKxWRdSFRwJf2GgvDckKZVJvR4wmNS7ZLJJTsroDpPfxsXv7/4z/+/w==';
diff --git a/src/main/webapp/js/shapes-14-6-5.min.js b/src/main/webapp/js/shapes-14-6-5.min.js
index fee78490..3209fa70 100644
--- a/src/main/webapp/js/shapes-14-6-5.min.js
+++ b/src/main/webapp/js/shapes-14-6-5.min.js
@@ -2879,7 +2879,12 @@ mxShapeSysMLSubmachineState.prototype.getConstraints=function(a,d,e){a=[];a.push
.75),!1));return a};function mxShapeSysMLUseCaseExtensionPoints(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLUseCaseExtensionPoints,mxShape);mxShapeSysMLUseCaseExtensionPoints.prototype.cst={USE_CASE_EXT_PT:"mxgraph.sysml.useCaseExtPt"};mxShapeSysMLUseCaseExtensionPoints.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeSysMLUseCaseExtensionPoints.prototype.background=function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke()};mxShapeSysMLUseCaseExtensionPoints.prototype.foreground=function(a,d,e,b,c){a.begin();a.moveTo(.02*b,.35*c);a.lineTo(.98*b,.35*c);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLUseCaseExtensionPoints.prototype.cst.USE_CASE_EXT_PT,mxShapeSysMLUseCaseExtensionPoints);
mxShapeSysMLUseCaseExtensionPoints.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,
-.145),!1));return a};function mxShapeUMLInputPin(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLInputPin,mxActor);mxShapeUMLInputPin.prototype.cst={INPUT_PIN:"mxgraph.uml25.inputPin"};
+.145),!1));return a};function mxShapeSysMLPort(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLPort,mxShape);mxShapeSysMLPort.prototype.cst={PORT:"mxgraph.sysml.port"};
+mxShapeSysMLPort.prototype.customProperties=[{name:"sysMLPortType",dispName:"Port Type",type:"enum",enumList:[{val:"empty",dispName:"Empty"},{val:"flowN",dispName:"Flow Up"},{val:"flowE",dispName:"Flow Right"},{val:"flowS",dispName:"Flow Down"},{val:"flowW",dispName:"Flow Left"},{val:"doubleH",dispName:"Double Horizontal"},{val:"doubleV",dispName:"Double Vertical"}]}];
+mxShapeSysMLPort.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();switch(mxUtils.getValue(this.style,"sysMLPortType","empty")){case "flowN":a.begin();a.moveTo(.25*b,.5*c);a.lineTo(.5*b,.25*c);a.lineTo(.75*b,.5*c);a.moveTo(.5*b,.25*c);a.lineTo(.5*b,.75*c);a.stroke();break;case "flowE":a.begin();a.moveTo(.5*b,.25*c);a.lineTo(.75*b,.5*c);a.lineTo(.5*b,.75*c);a.moveTo(.75*b,.5*c);a.lineTo(.25*b,.5*c);a.stroke();break;case "flowS":a.begin();a.moveTo(.25*
+b,.5*c);a.lineTo(.5*b,.75*c);a.lineTo(.75*b,.5*c);a.moveTo(.5*b,.75*c);a.lineTo(.5*b,.25*c);a.stroke();break;case "flowW":a.begin();a.moveTo(.5*b,.25*c);a.lineTo(.25*b,.5*c);a.lineTo(.5*b,.75*c);a.moveTo(.25*b,.5*c);a.lineTo(.75*b,.5*c);a.stroke();break;case "doubleH":a.begin();a.moveTo(.6*b,.25*c);a.lineTo(.85*b,.5*c);a.lineTo(.6*b,.75*c);a.moveTo(.4*b,.25*c);a.lineTo(.15*b,.5*c);a.lineTo(.4*b,.75*c);a.stroke();break;case "doubleV":a.begin(),a.moveTo(.25*b,.6*c),a.lineTo(.5*b,.85*c),a.lineTo(.75*
+b,.6*c),a.moveTo(.25*b,.4*c),a.lineTo(.5*b,.15*c),a.lineTo(.75*b,.4*c),a.stroke()}};mxCellRenderer.registerShape(mxShapeSysMLPort.prototype.cst.PORT,mxShapeSysMLPort);mxShapeSysMLPort.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};
+function mxShapeUMLInputPin(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLInputPin,mxActor);mxShapeUMLInputPin.prototype.cst={INPUT_PIN:"mxgraph.uml25.inputPin"};
mxShapeUMLInputPin.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(.75*b,.5*c);a.lineTo(.25*b,.5*c);a.moveTo(.4*b,.4*c);a.lineTo(.25*b,.5*c);a.lineTo(.4*b,.6*c);a.stroke()};mxCellRenderer.registerShape(mxShapeUMLInputPin.prototype.cst.INPUT_PIN,mxShapeUMLInputPin);mxShapeUMLInputPin.prototype.constraints=null;
function mxShapeUMLBehaviorAction(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLBehaviorAction,mxActor);mxShapeUMLBehaviorAction.prototype.cst={BEHAVIOR_ACTION:"mxgraph.uml25.behaviorAction"};
mxShapeUMLBehaviorAction.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"rounded",!1);e=mxUtils.getValue(this.style,"absoluteArcSize",!1);var f=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(f*=Math.min(b,c));f=Math.min(f,.5*b,.5*c);d||(f=0);a.begin();d?(a.moveTo(0,f),a.arcTo(f,f,0,0,1,f,0),a.lineTo(b-f,0),a.arcTo(f,f,0,0,1,b,f),a.lineTo(b,c-f),a.arcTo(f,f,0,0,1,b-f,c),a.lineTo(f,c),a.arcTo(f,f,0,0,1,0,c-f)):(a.moveTo(0,0),a.lineTo(b,
@@ -3020,7 +3025,15 @@ mxRackRackCabinet.prototype.paintVertexShape=function(a,d,e,b,c){b=parseFloat(mx
2*g,e):a.translate(d,e);c=b*f+42;this.background(a,c);a.setShadow(!1);this.foreground(a,c);h!==mxRackRackCabinet.prototype.cst.OFF&&this.sideText(a,c,b,f,g,h)};mxRackRackCabinet.prototype.background=function(a,d){a.setFillColor("#ffffff");a.rect(0,0,180,d);a.fillAndStroke()};
mxRackRackCabinet.prototype.foreground=function(a,d){a.setFillColor("#f4f4f4");a.rect(0,0,180,21);a.fillAndStroke();a.rect(0,d-21,180,21);a.fillAndStroke();a.rect(0,21,9,d-42);a.fillAndStroke();a.rect(171,21,9,d-42);a.fillAndStroke();a.ellipse(2.5,7.5,6,6);a.stroke();a.ellipse(171.5,7.5,6,6);a.stroke();a.ellipse(2.5,d-13.5,6,6);a.stroke();a.ellipse(171.5,d-13.5,6,6);a.stroke()};
mxRackRackCabinet.prototype.sideText=function(a,d,e,b,c,f){var g=mxUtils.getValue(this.style,mxRackRackCabinet.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,"startUnit",1);a.setFontSize(c);a.setFontColor(g);if(f===mxRackRackCabinet.prototype.cst.DIR_ASC)for(f=0;f<e;f++)a.text(-c,21+.5*b+f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else if(f===mxRackRackCabinet.prototype.cst.DIR_DESC||f===mxRackRackCabinet.prototype.cst.DIR_ON)for(f=0;f<
-e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackHorCableDuct1U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorCableDuct1U,mxShape);mxRackHorCableDuct1U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_1U:"mxgraph.rackGeneral.horCableDuct1U"};
+e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackRackCabinet2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackRackCabinet2,mxShape);
+mxRackRackCabinet2.prototype.cst={SHAPE_RACK_RACK_CABINET:"mxgraph.rackGeneral.rackCabinet2",UNIT_NUM:"unitNum",UNIT_HEIGHT:"rackUnitSize",TEXT_COLOR:"textColor",NUM_DIR:"numDir",NUMBER_DISPLAY:"numDisp",ON:"on",OFF:"off",DIR_ASC:"ascend",DIR_DESC:"descend",TEXT_SIZE:"textSize"};
+mxRackRackCabinet2.prototype.customProperties=[{name:"unitNum",dispName:"Number of units",type:"int",defVal:12},{name:"startUnit",dispName:"Starting unit",type:"int",defVal:1},{name:"rackUnitSize",dispName:"Unit height",type:"float",defVal:14.8},{name:"fillColor2",dispName:"Panel Color",type:"color",defVal:"#ffffff"},{name:"textColor",dispName:"Number text color",type:"color",defVal:"#666666"},{name:"textSize",dispName:"Text size",type:"float",defVal:"12"},{name:"numDisp",dispName:"Display Numbers",
+type:"enum",defVal:"descend",enumList:[{val:"off",dispName:"Off"},{val:"ascend",dispName:"Ascending"},{val:"descend",dispName:"Descending"}],onChange:function(a,d){a.setCellStyles("marginLeft","off"==d?9:33,a.getSelectionCells())}}];
+mxRackRackCabinet2.prototype.paintVertexShape=function(a,d,e,b,c){var f=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.UNIT_NUM,"12")),g=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.UNIT_HEIGHT,"14.8")),h=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.TEXT_SIZE,"12")),k=mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.NUMBER_DISPLAY,mxRackRackCabinet2.prototype.cst.ON);k!==mxRackRackCabinet2.prototype.cst.OFF?
+(a.translate(d+2*h,e),b-=2*h):a.translate(d,e);c=f*g+42;this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c);k!==mxRackRackCabinet2.prototype.cst.OFF&&this.sideText(a,c,f,g,h,k)};mxRackRackCabinet2.prototype.background=function(a,d,e){var b=mxUtils.getValue(this.style,"fillColor2","#ffffff");a.setFillColor(b);a.rect(0,0,d,e);a.fillAndStroke()};
+mxRackRackCabinet2.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#f4f4f4");a.setFillColor(b);a.rect(0,0,d,21);a.fillAndStroke();a.rect(0,e-21,d,21);a.fillAndStroke();a.rect(0,21,9,e-42);a.fillAndStroke();a.rect(d-9,21,9,e-42);a.fillAndStroke();a.ellipse(2.5,7.5,6,6);a.stroke();a.ellipse(d-8.5,7.5,6,6);a.stroke();a.ellipse(2.5,e-13.5,6,6);a.stroke();a.ellipse(d-8.5,e-13.5,6,6);a.stroke()};
+mxRackRackCabinet2.prototype.sideText=function(a,d,e,b,c,f){var g=mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,"startUnit",1);a.setFontSize(c);a.setFontColor(g);if(f===mxRackRackCabinet2.prototype.cst.DIR_ASC)for(f=0;f<e;f++)a.text(-c,21+.5*b+f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else if(f===mxRackRackCabinet2.prototype.cst.DIR_DESC||f===mxRackRackCabinet2.prototype.cst.DIR_ON)for(f=
+0;f<e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackHorCableDuct1U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorCableDuct1U,mxShape);mxRackHorCableDuct1U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_1U:"mxgraph.rackGeneral.horCableDuct1U"};
mxRackHorCableDuct1U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorCableDuct1U.prototype.background=function(a,d,e){a.rect(0,0,160.9,14.8);a.fillAndStroke()};
mxRackHorCableDuct1U.prototype.foreground=function(a,d,e){a.rect(12,0,3,7);a.stroke();a.rect(12,7,3,7.8);a.stroke();a.rect(45.5,0,3,7);a.stroke();a.rect(45.5,7,3,7.8);a.stroke();a.rect(79,0,3,7);a.stroke();a.rect(79,7,3,7.8);a.stroke();a.rect(112.5,0,3,7);a.stroke();a.rect(112.5,7,3,7.8);a.stroke();a.rect(146,0,3,7);a.stroke();a.rect(146,7,3,7.8);a.stroke()};function mxRackHorCableDuct2U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxRackHorCableDuct2U,mxShape);mxRackHorCableDuct2U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_2U:"mxgraph.rackGeneral.horCableDuct2U"};mxRackHorCableDuct2U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorCableDuct2U.prototype.background=function(a,d,e){a.rect(0,0,160.9,29.6);a.fillAndStroke()};
@@ -3038,7 +3051,7 @@ function mxRackChannelBase(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d
mxRackChannelBase.prototype.background=function(a,d,e){a.rect(10,e-15,5,15);a.fillAndStroke();a.rect(d-15,e-15,5,15);a.fillAndStroke();a.rect(0,0,d,e-5);a.fillAndStroke()};mxRackChannelBase.prototype.foreground=function(a,d,e){a.setFillColor("#000000");a.rect(10,e-15,5,15);a.fillAndStroke();a.rect(d-15,e-15,5,15);a.fillAndStroke()};function mxRackCabinetLeg(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackCabinetLeg,mxShape);
mxRackCabinetLeg.prototype.cst={SHAPE_RACK_CABINET_LEG:"mxgraph.rackGeneral.cabinetLeg"};mxRackCabinetLeg.prototype.paintVertexShape=function(a,d,e,b,c){b=Math.max(b,20);c=Math.max(c,20);a.translate(d,e);this.background(a,b,c)};
mxRackCabinetLeg.prototype.background=function(a,d,e){a.begin();a.moveTo(0,e-10);a.lineTo(5,e-10);a.lineTo(5,e-12);a.lineTo(9,e-12);a.lineTo(9,e-10);a.lineTo(d-10,e-10);a.lineTo(d-10,9);a.lineTo(d-12,9);a.lineTo(d-12,5);a.lineTo(d-10,5);a.lineTo(d-10,0);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(0,e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxRackContainer.prototype.cst.SHAPE_RACK_CONTAINER,mxRackContainer);
-mxCellRenderer.registerShape(mxRackHorCableDuct.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT,mxRackHorCableDuct);mxCellRenderer.registerShape(mxRackHorRoutingBank.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK,mxRackHorRoutingBank);mxCellRenderer.registerShape(mxRackNeatPatch.prototype.cst.SHAPE_RACK_NEAT_PATCH,mxRackNeatPatch);mxCellRenderer.registerShape(mxRackShelf.prototype.cst.SHAPE_RACK_SHELF,mxRackShelf);mxCellRenderer.registerShape(mxRackPlate.prototype.cst.SHAPE_RACK_PLATE,mxRackPlate);
-mxCellRenderer.registerShape(mxRackRackNumbering.prototype.cst.SHAPE_RACK_RACK_NUMBERING,mxRackRackNumbering);mxCellRenderer.registerShape(mxRackRackCabinet.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet);mxCellRenderer.registerShape(mxRackHorCableDuct1U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_1U,mxRackHorCableDuct1U);mxCellRenderer.registerShape(mxRackHorCableDuct2U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_2U,mxRackHorCableDuct2U);
-mxCellRenderer.registerShape(mxRackHorRoutingBank1U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_1U,mxRackHorRoutingBank1U);mxCellRenderer.registerShape(mxRackHorRoutingBank2U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_2U,mxRackHorRoutingBank2U);mxCellRenderer.registerShape(mxRackNeatPatch2U.prototype.cst.SHAPE_RACK_NEAT_PATCH_2U,mxRackNeatPatch2U);mxCellRenderer.registerShape(mxRackShelf1U.prototype.cst.SHAPE_RACK_SHELF_1U,mxRackShelf1U);
-mxCellRenderer.registerShape(mxRackShelf2U.prototype.cst.SHAPE_RACK_SHELF_2U,mxRackShelf2U);mxCellRenderer.registerShape(mxRackShelf4U.prototype.cst.SHAPE_RACK_SHELF_4U,mxRackShelf4U);mxCellRenderer.registerShape(mxRackChannelBase.prototype.cst.SHAPE_RACK_CHANNEL_BASE,mxRackChannelBase);mxCellRenderer.registerShape(mxRackCabinetLeg.prototype.cst.SHAPE_RACK_CABINET_LEG,mxRackCabinetLeg); \ No newline at end of file
+mxCellRenderer.registerShape(mxRackRackCabinet2.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet2);mxCellRenderer.registerShape(mxRackHorCableDuct.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT,mxRackHorCableDuct);mxCellRenderer.registerShape(mxRackHorRoutingBank.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK,mxRackHorRoutingBank);mxCellRenderer.registerShape(mxRackNeatPatch.prototype.cst.SHAPE_RACK_NEAT_PATCH,mxRackNeatPatch);mxCellRenderer.registerShape(mxRackShelf.prototype.cst.SHAPE_RACK_SHELF,mxRackShelf);
+mxCellRenderer.registerShape(mxRackPlate.prototype.cst.SHAPE_RACK_PLATE,mxRackPlate);mxCellRenderer.registerShape(mxRackRackNumbering.prototype.cst.SHAPE_RACK_RACK_NUMBERING,mxRackRackNumbering);mxCellRenderer.registerShape(mxRackRackCabinet.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet);mxCellRenderer.registerShape(mxRackHorCableDuct1U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_1U,mxRackHorCableDuct1U);
+mxCellRenderer.registerShape(mxRackHorCableDuct2U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_2U,mxRackHorCableDuct2U);mxCellRenderer.registerShape(mxRackHorRoutingBank1U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_1U,mxRackHorRoutingBank1U);mxCellRenderer.registerShape(mxRackHorRoutingBank2U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_2U,mxRackHorRoutingBank2U);mxCellRenderer.registerShape(mxRackNeatPatch2U.prototype.cst.SHAPE_RACK_NEAT_PATCH_2U,mxRackNeatPatch2U);
+mxCellRenderer.registerShape(mxRackShelf1U.prototype.cst.SHAPE_RACK_SHELF_1U,mxRackShelf1U);mxCellRenderer.registerShape(mxRackShelf2U.prototype.cst.SHAPE_RACK_SHELF_2U,mxRackShelf2U);mxCellRenderer.registerShape(mxRackShelf4U.prototype.cst.SHAPE_RACK_SHELF_4U,mxRackShelf4U);mxCellRenderer.registerShape(mxRackChannelBase.prototype.cst.SHAPE_RACK_CHANNEL_BASE,mxRackChannelBase);mxCellRenderer.registerShape(mxRackCabinetLeg.prototype.cst.SHAPE_RACK_CABINET_LEG,mxRackCabinetLeg); \ No newline at end of file
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 4da4f399..02cc5fd5 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -111,7 +111,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.4.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.4.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/"),
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]"!==
@@ -428,7 +428,7 @@ mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGrad
mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement(e==mxConstants.DIRECTION_RADIAL?"radialGradient":"linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");
e=this.createElement("stop");e.setAttribute("offset","0%");e.style.stopColor=a;e.style.stopOpacity=c;f.appendChild(e);e=this.createElement("stop");e.setAttribute("offset","100%");e.style.stopColor=b;e.style.stopOpacity=d;f.appendChild(e);return f};mxSvgCanvas2D.prototype.createFillPatternId=function(a,b,c){c=mxUtils.rgba2hex(c);"#"==c.charAt(0)&&(c=c.substring(1));return("mx-pattern-"+a+"-"+b+"-"+c).toLowerCase()};
mxSvgCanvas2D.prototype.getFillPattern=function(a,b,c,d){var e=this.createFillPatternId(a,b,c),f=this.fillPatterns[e];if(null==f){var g=this.root.ownerSVGElement,k=0,l=e+"-"+k;if(null!=g)for(f=g.ownerDocument.getElementById(l);null!=f&&f.ownerSVGElement!=g;)l=e+"-"+k++,f=g.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;if(null==f){switch(a){case "hatch":f=this.createHatchPattern(b,c,d);break;case "dots":f=this.createDotsPattern(b,c,d);break;case "cross-hatch":f=this.createCrossHatchPattern(b,
-c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return"ERROR"}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
+c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return null}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
mxSvgCanvas2D.prototype.createHatchPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1","0");e.setAttribute("x2","0");e.setAttribute("y2",c);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
a);d.appendChild(e);return d};
mxSvgCanvas2D.prototype.createDashedPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1",c/4);e.setAttribute("x2","0");e.setAttribute("y2",3*c/4);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
@@ -442,7 +442,7 @@ mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(nu
c.setAttribute("transform",d.transform);this.pointerEvents?c.setAttribute("pointer-events",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute("pointer-events","none");d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&(!a||null==d.fillColor)&&this.addTolerance(c);("rect"!=c.nodeName&&"path"!=c.nodeName&&"ellipse"!=c.nodeName||"none"!=c.getAttribute("fill")&&"transparent"!=c.getAttribute("fill")||"none"!=c.getAttribute("stroke")||"none"!=
c.getAttribute("pointer-events"))&&this.root.appendChild(c);this.node=null}};mxSvgCanvas2D.prototype.addTolerance=function(a){this.root.appendChild(this.createTolerance(a))};
mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);var b=!1;if(null!=a.fillColor)if(null!=a.gradientColor&&a.gradientColor!=mxConstants.NONE){b=!0;var c=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection);if(this.root.ownerDocument==document&&this.useAbsoluteIds){var d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");d="url("+d+"#"+c+
-")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();b||null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?this.node.setAttribute("fill",d):(a=this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale),this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")"))};
+")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();a=null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?null:this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale);b||null==a?this.node.setAttribute("fill",d):this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")")};
mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};
mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",String(a.strokeColor).toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);var b=this.getCurrentStrokeWidth();1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern((a.fixDash?1:a.strokeWidth)*a.scale))};
mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null==a.miterLimit||this.styleEnabled&&10==a.miterLimit||this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
@@ -1952,10 +1952,10 @@ 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();
-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,d){b.raw=d;return b};$jscomp.arrayIteratorImpl=function(b){var d=0;return function(){return d<b.length?{done:!1,value:b[d++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var d="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return d?d.call(b):$jscomp.arrayIterator(b)};
-Editor=function(b,d,k,l,B){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=l||this.createGraph(d,k);this.editable=null!=B?B:!b;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(p){this.status=p;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(p,E){p=null!=E?E.getProperty("edit"):null;null!=p&&p.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 b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(d){}})();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;
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)};
+Editor=function(b,e,k,l,C){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=l||this.createGraph(e,k);this.editable=null!=C?C:!b;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(p,E){this.status=p;this.statusFunction=E;this.fireEvent(new mxEventObject("statusChanged"))};
+this.getStatus=function(){return this.status};this.graphChangeListener=function(p,E){p=null!=E?E.getProperty("edit"):null;null!=p&&p.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 b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();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="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=";Editor.lightCheckmarkImage="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=";
Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";
Editor.lightHelpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+";
@@ -1981,85 +1981,85 @@ Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My
Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==";
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==";
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
-Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;
-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.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.compareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE1Ljg1IDQwLTIuMS0yLjEgNi4wNS02LjA1SDR2LTNoMTUuOGwtNi4wNS02LjA1IDIuMS0yLjEgOS42NSA5LjY1Wm0xNi4zLTEyLjctOS42NS05LjY1TDMyLjE1IDhsMi4xIDIuMS02LjA1IDYuMDVINDR2M0gyOC4ybDYuMDUgNi4wNVoiLz48L3N2Zz4=";
+Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;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.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{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.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(b){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};
Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(b){var d=null;try{var k=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(l,mxUtils.bind(this,function(B,p,E){B=l.substring(B+8,B+8+E);"zTXt"==p?(E=B.indexOf(String.fromCharCode(0)),"mxGraphModel"==B.substring(0,E)&&(B=pako.inflateRaw(Graph.stringToArrayBuffer(B.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=B&&0<B.length&&(d=B))):"tEXt"==p&&(B=B.split(String.fromCharCode(0)),1<B.length&&("mxGraphModel"==
-B[0]||"mxfile"==B[0])&&(d=B[1]));if(null!=d||"IDAT"==p)return!0}))}catch(B){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};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.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(l,mxUtils.bind(this,function(C,p,E){C=l.substring(C+8,C+8+E);"zTXt"==p?(E=C.indexOf(String.fromCharCode(0)),"mxGraphModel"==C.substring(0,E)&&(C=pako.inflateRaw(Graph.stringToArrayBuffer(C.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=C&&0<C.length&&(e=C))):"tEXt"==p&&(C=C.split(String.fromCharCode(0)),1<C.length&&("mxGraphModel"==
+C[0]||"mxfile"==C[0])&&(e=C[1]));if(null!=e||"IDAT"==p)return!0}))}catch(C){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";
Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};
Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
-Editor.prototype.editAsNew=function(b,d){d=null!=d?"?title="+encodeURIComponent(d):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,l=mxUtils.bind(this,function(B){"ready"==B.data&&B.source==k&&(mxEvent.removeListener(window,"message",l),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",l);k=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+"client=1"),
-null,!0)}else this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,d){b=new Graph(null,d,null,null,b);b.transparentBackground=!1;var k=b.isCssTransformsSupported,l=this;b.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!l.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(B){return!this.isExternalProtocol(B)});return b};
+Editor.prototype.editAsNew=function(b,e){e=null!=e?"?title="+encodeURIComponent(e):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,l=mxUtils.bind(this,function(C){"ready"==C.data&&C.source==k&&(mxEvent.removeListener(window,"message",l),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",l);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"),
+null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,e){b=new Graph(null,e,null,null,b);b.transparentBackground=!1;var k=b.isCssTransformsSupported,l=this;b.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!l.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(C){return!this.isExternalProtocol(C)});return b};
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(b){var d=b.getAttribute("grid");if(null==d||""==d)d=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=d&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
-"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);d=parseFloat(b.getAttribute("pageScale"));!isNaN(d)&&0<d?this.graph.pageScale=d:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(d=b.getAttribute("page"),this.graph.pageVisible=
-null!=d?"0"!=d:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;d=parseFloat(b.getAttribute("pageWidth"));var k=parseFloat(b.getAttribute("pageHeight"));isNaN(d)||isNaN(k)||(this.graph.pageFormat=new mxRectangle(0,0,d,k));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
-Editor.prototype.setGraphXml=function(b){if(null!=b){var d=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),d.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var k=d.document.createElement("mxGraphModel");k.appendChild(b);d.decode(k,this.graph.getModel());
+Editor.prototype.readGraphState=function(b){var e=b.getAttribute("grid");if(null==e||""==e)e=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=e&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
+"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);e=parseFloat(b.getAttribute("pageScale"));!isNaN(e)&&0<e?this.graph.pageScale=e:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(e=b.getAttribute("page"),this.graph.pageVisible=
+null!=e?"0"!=e:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;e=parseFloat(b.getAttribute("pageWidth"));var k=parseFloat(b.getAttribute("pageHeight"));isNaN(e)||isNaN(k)||(this.graph.pageFormat=new mxRectangle(0,0,e,k));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
+Editor.prototype.setGraphXml=function(b){if(null!=b){var e=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),e.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var k=e.document.createElement("mxGraphModel");k.appendChild(b);e.decode(k,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:b,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)b.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),b.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);b.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");b.setAttribute("gridSize",
this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);
b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};
Editor.prototype.setFilename=function(b){this.filename=b};
-Editor.prototype.createUndoManager=function(){var b=this.graph,d=new mxUndoManager;this.undoListener=function(l,B){d.undoableEditHappened(B.getProperty("edit"))};var k=mxUtils.bind(this,function(l,B){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(l,B){l=b.getSelectionCellsForChanges(B.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<l.length){b.getModel();B=[];for(var p=0;p<l.length;p++)null!=
-b.view.getState(l[p])&&B.push(l[p]);b.setSelectionCells(B)}};d.addListener(mxEvent.UNDO,k);d.addListener(mxEvent.REDO,k);return d};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(l,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(l,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(l,C){l=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<l.length){b.getModel();C=[];for(var p=0;p<l.length;p++)null!=
+b.view.getState(l[p])&&C.push(l[p]);b.setSelectionCells(C)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,d,k,l,B,p,E,M,S,H,K){var Q=S?57:0,e=k,f=l,g=S?0:64,v=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(v.height=window.innerHeight);var y=v.height,C=Math.max(1,Math.round((v.width-k-g)/2)),I=Math.max(1,Math.round((y-l-b.footerHeight)/3));d.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-g):k;l=Math.min(l,y-g);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";C+=v.x;I+=v.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-I+=b.embedViewport.y,C+=b.embedViewport.x);B&&document.body.appendChild(this.bg);var D=b.createDiv(S?"geTransDialog":"geDialog");B=this.getPosition(C,I,k,l);C=B.x;I=B.y;D.style.width=k+"px";D.style.height=l+"px";D.style.left=C+"px";D.style.top=I+"px";D.style.zIndex=this.zIndex;D.appendChild(d);document.body.appendChild(D);!M&&d.clientHeight>D.clientHeight-g&&(d.style.overflowY="auto");d.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
-p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=I+14+"px",p.style.left=C+k+38-Q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!K)){var N=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(G){N=!0}),null,mxUtils.bind(this,function(G){N&&(b.hideDialog(!0),N=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=H){var G=H();
-null!=G&&(e=k=G.w,f=l=G.h)}G=mxUtils.getDocumentSize();y=G.height;this.bg.style.height=y+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");C=Math.max(1,Math.round((G.width-k-g)/2));I=Math.max(1,Math.round((y-l-b.footerHeight)/3));k=null!=document.body?Math.min(e,document.body.scrollWidth-g):e;l=Math.min(f,y-g);G=this.getPosition(C,I,k,l);C=G.x;I=G.y;D.style.left=C+"px";D.style.top=I+"px";D.style.width=k+"px";D.style.height=l+"px";!M&&
-d.clientHeight>D.clientHeight-g&&(d.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=I+14+"px",this.dialogImg.style.left=C+k+38-Q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=D;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,e,k,l,C,p,E,M,S,H,K){var Q=S?57:0,d=k,f=l,g=S?0:64,v=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(v.height=window.innerHeight);var x=v.height,B=Math.max(1,Math.round((v.width-k-g)/2)),I=Math.max(1,Math.round((x-l-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-g):k;l=Math.min(l,x-g);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";B+=v.x;I+=v.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+I+=b.embedViewport.y,B+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var D=b.createDiv(S?"geTransDialog":"geDialog");C=this.getPosition(B,I,k,l);B=C.x;I=C.y;D.style.width=k+"px";D.style.height=l+"px";D.style.left=B+"px";D.style.top=I+"px";D.style.zIndex=this.zIndex;D.appendChild(e);document.body.appendChild(D);!M&&e.clientHeight>D.clientHeight-g&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
+p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=I+14+"px",p.style.left=B+k+38-Q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!K)){var N=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(G){N=!0}),null,mxUtils.bind(this,function(G){N&&(b.hideDialog(!0),N=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=H){var G=H();
+null!=G&&(d=k=G.w,f=l=G.h)}G=mxUtils.getDocumentSize();x=G.height;this.bg.style.height=x+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");B=Math.max(1,Math.round((G.width-k-g)/2));I=Math.max(1,Math.round((x-l-b.footerHeight)/3));k=null!=document.body?Math.min(d,document.body.scrollWidth-g):d;l=Math.min(f,x-g);G=this.getPosition(B,I,k,l);B=G.x;I=G.y;D.style.left=B+"px";D.style.top=I+"px";D.style.width=k+"px";D.style.height=l+"px";!M&&
+e.clientHeight>D.clientHeight-g&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=I+14+"px",this.dialogImg.style.left=B+k+38-Q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=D;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
-"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,d){return new mxPoint(b,d)};Dialog.prototype.close=function(b,d){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,d))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,d,k,l,B,p,E,M,S,H,K){S=null!=S?S:!0;var Q=document.createElement("div");Q.style.textAlign="center";if(null!=d){var e=document.createElement("div");e.style.padding="0px";e.style.margin="0px";e.style.fontSize="18px";e.style.paddingBottom="16px";e.style.marginBottom="10px";e.style.borderBottom="1px solid #c0c0c0";e.style.color="gray";e.style.whiteSpace="nowrap";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,d);e.setAttribute("title",d);Q.appendChild(e)}d=
-document.createElement("div");d.style.lineHeight="1.2em";d.style.padding="6px";d.innerHTML=k;Q.appendChild(d);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),d.className="geBtn",k.appendChild(d),k.style.textAlign="center");null!=H&&(H=mxUtils.button(H,function(){null!=K&&K()}),H.className="geBtn",k.appendChild(H));var f=mxUtils.button(l,function(){S&&b.hideDialog();null!=B&&B()});
-f.className="geBtn";k.appendChild(f);null!=E&&(l=mxUtils.button(E,function(){S&&b.hideDialog();null!=M&&M()}),l.className="geBtn gePrimaryBtn",k.appendChild(l));this.init=function(){f.focus()};Q.appendChild(k);this.container=Q},PrintDialog=function(b,d){this.create(b,d)};
-PrintDialog.prototype.create=function(b){function d(f){var g=E.checked||H.checked,v=parseInt(Q.value)/100;isNaN(v)&&(v=1,Q.value="100%");v*=.75;var y=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/k.pageScale;if(g){var I=E.checked?1:parseInt(K.value);isNaN(I)||(C=mxUtils.getScaleForPageCount(I,k,y))}k.getGraphBounds();var D=I=0;y=mxRectangle.fromRectangle(y);y.width=Math.ceil(y.width*v);y.height=Math.ceil(y.height*v);C*=v;!g&&k.pageVisible?(v=k.getPageLayout(),I-=v.x*y.width,D-=v.y*y.height):
-g=!0;g=PrintDialog.createPrintPreview(k,C,y,0,I,D,g);g.open();f&&PrintDialog.printPreview(g)}var k=b.editor.graph,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var B=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var M=document.createElement("td");M.setAttribute("colspan","2");M.style.fontSize="10pt";M.appendChild(E);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
-M.appendChild(S);mxEvent.addListener(S,"click",function(f){E.checked=!E.checked;H.checked=!E.checked;mxEvent.consume(f)});mxEvent.addListener(E,"change",function(){H.checked=!E.checked});p.appendChild(M);B.appendChild(p);p=p.cloneNode(!1);var H=document.createElement("input");H.setAttribute("type","checkbox");M=document.createElement("td");M.style.fontSize="10pt";M.appendChild(H);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");M.appendChild(S);mxEvent.addListener(S,
-"click",function(f){H.checked=!H.checked;E.checked=!H.checked;mxEvent.consume(f)});p.appendChild(M);var K=document.createElement("input");K.setAttribute("value","1");K.setAttribute("type","number");K.setAttribute("min","1");K.setAttribute("size","4");K.setAttribute("disabled","disabled");K.style.width="50px";M=document.createElement("td");M.style.fontSize="10pt";M.appendChild(K);mxUtils.write(M," "+mxResources.get("pages")+" (max)");p.appendChild(M);B.appendChild(p);mxEvent.addListener(H,"change",
-function(){H.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");E.checked=!H.checked});p=p.cloneNode(!1);M=document.createElement("td");mxUtils.write(M,mxResources.get("pageScale")+":");p.appendChild(M);M=document.createElement("td");var Q=document.createElement("input");Q.setAttribute("value","100 %");Q.setAttribute("size","5");Q.style.width="50px";M.appendChild(Q);p.appendChild(M);B.appendChild(p);p=document.createElement("tr");M=document.createElement("td");M.colSpan=2;
-M.style.paddingTop="20px";M.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&M.appendChild(S);if(PrintDialog.previewEnabled){var e=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)});e.className="geBtn";M.appendChild(e)}e=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();d(!0)});e.className="geBtn gePrimaryBtn";M.appendChild(e);b.editor.cancelFirst||
-M.appendChild(S);p.appendChild(M);B.appendChild(p);l.appendChild(B);this.container=l};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var d=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(d,500):d()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,d,k,l,B,p,E){d=new mxPrintPreview(b,d,k,l,B,p);d.title=mxResources.get("preview");d.printBackgroundImage=!0;d.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";d.backgroundColor=b;var M=d.writeHead;d.writeHead=function(S){M.apply(this,arguments);S.writeln('<style type="text/css">');S.writeln("@media screen {");S.writeln(" body > div { padding:30px;box-sizing:content-box; }");S.writeln("}");S.writeln("</style>")};return d};
+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
+var ErrorDialog=function(b,e,k,l,C,p,E,M,S,H,K){S=null!=S?S:!0;var Q=document.createElement("div");Q.style.textAlign="center";if(null!=e){var d=document.createElement("div");d.style.padding="0px";d.style.margin="0px";d.style.fontSize="18px";d.style.paddingBottom="16px";d.style.marginBottom="10px";d.style.borderBottom="1px solid #c0c0c0";d.style.color="gray";d.style.whiteSpace="nowrap";d.style.textOverflow="ellipsis";d.style.overflow="hidden";mxUtils.write(d,e);d.setAttribute("title",e);Q.appendChild(d)}e=
+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;Q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=H&&(H=mxUtils.button(H,function(){null!=K&&K()}),H.className="geBtn",k.appendChild(H));var f=mxUtils.button(l,function(){S&&b.hideDialog();null!=C&&C()});
+f.className="geBtn";k.appendChild(f);null!=E&&(l=mxUtils.button(E,function(){S&&b.hideDialog();null!=M&&M()}),l.className="geBtn gePrimaryBtn",k.appendChild(l));this.init=function(){f.focus()};Q.appendChild(k);this.container=Q},PrintDialog=function(b,e){this.create(b,e)};
+PrintDialog.prototype.create=function(b){function e(f){var g=E.checked||H.checked,v=parseInt(Q.value)/100;isNaN(v)&&(v=1,Q.value="100%");v*=.75;var x=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,B=1/k.pageScale;if(g){var I=E.checked?1:parseInt(K.value);isNaN(I)||(B=mxUtils.getScaleForPageCount(I,k,x))}k.getGraphBounds();var D=I=0;x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*v);x.height=Math.ceil(x.height*v);B*=v;!g&&k.pageVisible?(v=k.getPageLayout(),I-=v.x*x.width,D-=v.y*x.height):
+g=!0;g=PrintDialog.createPrintPreview(k,B,x,0,I,D,g);g.open();f&&PrintDialog.printPreview(g)}var k=b.editor.graph,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var M=document.createElement("td");M.setAttribute("colspan","2");M.style.fontSize="10pt";M.appendChild(E);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
+M.appendChild(S);mxEvent.addListener(S,"click",function(f){E.checked=!E.checked;H.checked=!E.checked;mxEvent.consume(f)});mxEvent.addListener(E,"change",function(){H.checked=!E.checked});p.appendChild(M);C.appendChild(p);p=p.cloneNode(!1);var H=document.createElement("input");H.setAttribute("type","checkbox");M=document.createElement("td");M.style.fontSize="10pt";M.appendChild(H);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");M.appendChild(S);mxEvent.addListener(S,
+"click",function(f){H.checked=!H.checked;E.checked=!H.checked;mxEvent.consume(f)});p.appendChild(M);var K=document.createElement("input");K.setAttribute("value","1");K.setAttribute("type","number");K.setAttribute("min","1");K.setAttribute("size","4");K.setAttribute("disabled","disabled");K.style.width="50px";M=document.createElement("td");M.style.fontSize="10pt";M.appendChild(K);mxUtils.write(M," "+mxResources.get("pages")+" (max)");p.appendChild(M);C.appendChild(p);mxEvent.addListener(H,"change",
+function(){H.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");E.checked=!H.checked});p=p.cloneNode(!1);M=document.createElement("td");mxUtils.write(M,mxResources.get("pageScale")+":");p.appendChild(M);M=document.createElement("td");var Q=document.createElement("input");Q.setAttribute("value","100 %");Q.setAttribute("size","5");Q.style.width="50px";M.appendChild(Q);p.appendChild(M);C.appendChild(p);p=document.createElement("tr");M=document.createElement("td");M.colSpan=2;
+M.style.paddingTop="20px";M.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&M.appendChild(S);if(PrintDialog.previewEnabled){var d=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});d.className="geBtn";M.appendChild(d)}d=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});d.className="geBtn gePrimaryBtn";M.appendChild(d);b.editor.cancelFirst||
+M.appendChild(S);p.appendChild(M);C.appendChild(p);l.appendChild(C);this.container=l};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
+PrintDialog.createPrintPreview=function(b,e,k,l,C,p,E){e=new mxPrintPreview(b,e,k,l,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var M=e.writeHead;e.writeHead=function(S){M.apply(this,arguments);S.writeln('<style type="text/css">');S.writeln("@media screen {");S.writeln(" body > div { padding:30px;box-sizing:content-box; }");S.writeln("}");S.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function d(){null==K||K==mxConstants.NONE?(H.style.backgroundColor="",H.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(H.style.backgroundColor=K,H.style.backgroundImage="")}function k(){var y=g;null!=y&&Graph.isPageLink(y.src)&&(y=b.createImageForPageLink(y.src,null));null!=y&&null!=y.src?(f.setAttribute("src",y.src),f.style.display=""):(f.removeAttribute("src"),f.style.display="none")}var l=b.editor.graph,B=document.createElement("table");B.style.width=
-"100%";B.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";mxUtils.write(M,mxResources.get("paperSize")+":");E.appendChild(M);M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";var S=PageSetupDialog.addPageFormatPanel(M,"pagesetupdialog",l.pageFormat);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");
-mxUtils.write(M,mxResources.get("background")+":");E.appendChild(M);M=document.createElement("td");M.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var H=document.createElement("button");H.style.width="22px";H.style.height="22px";H.style.cursor="pointer";H.style.marginRight="20px";H.style.backgroundPosition="center center";H.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(H.style.position="relative",H.style.top="-6px");var K=l.background;d();mxEvent.addListener(H,
-"click",function(y){b.pickColor(K||"none",function(C){K=C;d()});mxEvent.consume(y)});M.appendChild(H);mxUtils.write(M,mxResources.get("gridSize")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="6px";Q.value=l.getGridSize();M.appendChild(Q);mxEvent.addListener(Q,"change",function(){var y=parseInt(Q.value);Q.value=Math.max(1,isNaN(y)?l.getGridSize():y)});E.appendChild(M);p.appendChild(E);E=document.createElement("tr");
-M=document.createElement("td");mxUtils.write(M,mxResources.get("image")+":");E.appendChild(M);M=document.createElement("td");var e=document.createElement("button");e.className="geBtn";e.style.margin="0px";mxUtils.write(e,mxResources.get("change")+"...");var f=document.createElement("img");f.setAttribute("valign","middle");f.style.verticalAlign="middle";f.style.border="1px solid lightGray";f.style.borderRadius="4px";f.style.marginRight="14px";f.style.maxWidth="100px";f.style.cursor="pointer";f.style.height=
-"60px";f.style.padding="4px";var g=l.backgroundImage,v=function(y){b.showBackgroundImageDialog(function(C,I){I||(g=C,k())},g);mxEvent.consume(y)};mxEvent.addListener(e,"click",v);mxEvent.addListener(f,"click",v);k();M.appendChild(f);M.appendChild(e);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");M.colSpan=2;M.style.paddingTop="16px";M.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";
-b.editor.cancelFirst&&M.appendChild(e);v=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var y=parseInt(Q.value);isNaN(y)||l.gridSize===y||l.setGridSize(y);y=new ChangePageSetup(b,K,g,S.get());y.ignoreColor=l.background==K;y.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=g?g.src:null);l.pageFormat.width==y.previousFormat.width&&l.pageFormat.height==y.previousFormat.height&&y.ignoreColor&&y.ignoreImage||l.model.execute(y)});v.className="geBtn gePrimaryBtn";
-M.appendChild(v);b.editor.cancelFirst||M.appendChild(e);E.appendChild(M);p.appendChild(E);B.appendChild(p);this.container=B};
-PageSetupDialog.addPageFormatPanel=function(b,d,k,l){function B(G,ia,ka){if(ka||Q!=document.activeElement&&e!=document.activeElement){G=!1;for(ia=0;ia<g.length;ia++)ka=g[ia],I?"custom"==ka.key&&(M.value=ka.key,I=!1):null!=ka.format&&("a4"==ka.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==ka.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
-k.width==ka.format.width&&k.height==ka.format.height?(M.value=ka.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,G=!0):k.width==ka.format.height&&k.height==ka.format.width&&(M.value=ka.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,G=E.checked=!0));G?(S.style.display="",K.style.display="none"):(Q.value=k.width/100,e.value=k.height/100,p.setAttribute("checked",
-"checked"),M.value="custom",S.style.display="none",K.style.display="")}}d="format-"+d;var p=document.createElement("input");p.setAttribute("name",d);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",d);E.setAttribute("type","radio");E.setAttribute("value","landscape");var M=document.createElement("select");M.style.marginBottom="8px";M.style.borderRadius="4px";M.style.border="1px solid rgb(160, 160, 160)";M.style.width="206px";
-var S=document.createElement("div");S.style.marginLeft="4px";S.style.width="210px";S.style.height="24px";p.style.marginRight="6px";S.appendChild(p);d=document.createElement("span");d.style.maxWidth="100px";mxUtils.write(d,mxResources.get("portrait"));S.appendChild(d);E.style.marginLeft="10px";E.style.marginRight="6px";S.appendChild(E);var H=document.createElement("span");H.style.width="100px";mxUtils.write(H,mxResources.get("landscape"));S.appendChild(H);var K=document.createElement("div");K.style.marginLeft=
-"4px";K.style.width="210px";K.style.height="24px";var Q=document.createElement("input");Q.setAttribute("size","7");Q.style.textAlign="right";K.appendChild(Q);mxUtils.write(K," in x ");var e=document.createElement("input");e.setAttribute("size","7");e.style.textAlign="right";K.appendChild(e);mxUtils.write(K," in");S.style.display="none";K.style.display="none";for(var f={},g=PageSetupDialog.getFormats(),v=0;v<g.length;v++){var y=g[v];f[y.key]=y;var C=document.createElement("option");C.setAttribute("value",
-y.key);mxUtils.write(C,y.title);M.appendChild(C)}var I=!1;B();b.appendChild(M);mxUtils.br(b);b.appendChild(S);b.appendChild(K);var D=k,N=function(G,ia){G=f[M.value];null!=G.format?(Q.value=G.format.width/100,e.value=G.format.height/100,K.style.display="none",S.style.display=""):(S.style.display="none",K.style.display="");G=parseFloat(Q.value);if(isNaN(G)||0>=G)Q.value=k.width/100;G=parseFloat(e.value);if(isNaN(G)||0>=G)e.value=k.height/100;G=new mxRectangle(0,0,Math.floor(100*parseFloat(Q.value)),
-Math.floor(100*parseFloat(e.value)));"custom"!=M.value&&E.checked&&(G=new mxRectangle(0,0,G.height,G.width));ia&&I||G.width==D.width&&G.height==D.height||(D=G,null!=l&&l(D))};mxEvent.addListener(d,"click",function(G){p.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(H,"click",function(G){E.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(Q,"blur",N);mxEvent.addListener(Q,"click",N);mxEvent.addListener(e,"blur",N);mxEvent.addListener(e,"click",N);mxEvent.addListener(E,"change",N);
-mxEvent.addListener(p,"change",N);mxEvent.addListener(M,"change",function(G){I="custom"==M.value;N(G,!0)});N();return{set:function(G){k=G;B(null,null,!0)},get:function(){return D},widthInput:Q,heightInput:e}};
+var PageSetupDialog=function(b){function e(){null==K||K==mxConstants.NONE?(H.style.backgroundColor="",H.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(H.style.backgroundColor=K,H.style.backgroundImage="")}function k(){var x=g;null!=x&&Graph.isPageLink(x.src)&&(x=b.createImageForPageLink(x.src,null));null!=x&&null!=x.src?(f.setAttribute("src",x.src),f.style.display=""):(f.removeAttribute("src"),f.style.display="none")}var l=b.editor.graph,C=document.createElement("table");C.style.width=
+"100%";C.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";mxUtils.write(M,mxResources.get("paperSize")+":");E.appendChild(M);M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";var S=PageSetupDialog.addPageFormatPanel(M,"pagesetupdialog",l.pageFormat);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");
+mxUtils.write(M,mxResources.get("background")+":");E.appendChild(M);M=document.createElement("td");M.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var H=document.createElement("button");H.style.width="22px";H.style.height="22px";H.style.cursor="pointer";H.style.marginRight="20px";H.style.backgroundPosition="center center";H.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(H.style.position="relative",H.style.top="-6px");var K=l.background;e();mxEvent.addListener(H,
+"click",function(x){b.pickColor(K||"none",function(B){K=B;e()});mxEvent.consume(x)});M.appendChild(H);mxUtils.write(M,mxResources.get("gridSize")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="6px";Q.value=l.getGridSize();M.appendChild(Q);mxEvent.addListener(Q,"change",function(){var x=parseInt(Q.value);Q.value=Math.max(1,isNaN(x)?l.getGridSize():x)});E.appendChild(M);p.appendChild(E);E=document.createElement("tr");
+M=document.createElement("td");mxUtils.write(M,mxResources.get("image")+":");E.appendChild(M);M=document.createElement("td");var d=document.createElement("button");d.className="geBtn";d.style.margin="0px";mxUtils.write(d,mxResources.get("change")+"...");var f=document.createElement("img");f.setAttribute("valign","middle");f.style.verticalAlign="middle";f.style.border="1px solid lightGray";f.style.borderRadius="4px";f.style.marginRight="14px";f.style.maxWidth="100px";f.style.cursor="pointer";f.style.height=
+"60px";f.style.padding="4px";var g=l.backgroundImage,v=function(x){b.showBackgroundImageDialog(function(B,I){I||(g=B,k())},g);mxEvent.consume(x)};mxEvent.addListener(d,"click",v);mxEvent.addListener(f,"click",v);k();M.appendChild(f);M.appendChild(d);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");M.colSpan=2;M.style.paddingTop="16px";M.setAttribute("align","right");d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";
+b.editor.cancelFirst&&M.appendChild(d);v=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(Q.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,K,g,S.get());x.ignoreColor=l.background==K;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=g?g.src:null);l.pageFormat.width==x.previousFormat.width&&l.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage||l.model.execute(x)});v.className="geBtn gePrimaryBtn";
+M.appendChild(v);b.editor.cancelFirst||M.appendChild(d);E.appendChild(M);p.appendChild(E);C.appendChild(p);this.container=C};
+PageSetupDialog.addPageFormatPanel=function(b,e,k,l){function C(G,ia,ka){if(ka||Q!=document.activeElement&&d!=document.activeElement){G=!1;for(ia=0;ia<g.length;ia++)ka=g[ia],I?"custom"==ka.key&&(M.value=ka.key,I=!1):null!=ka.format&&("a4"==ka.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==ka.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
+k.width==ka.format.width&&k.height==ka.format.height?(M.value=ka.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,G=!0):k.width==ka.format.height&&k.height==ka.format.width&&(M.value=ka.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,G=E.checked=!0));G?(S.style.display="",K.style.display="none"):(Q.value=k.width/100,d.value=k.height/100,p.setAttribute("checked",
+"checked"),M.value="custom",S.style.display="none",K.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var M=document.createElement("select");M.style.marginBottom="8px";M.style.borderRadius="4px";M.style.border="1px solid rgb(160, 160, 160)";M.style.width="206px";
+var S=document.createElement("div");S.style.marginLeft="4px";S.style.width="210px";S.style.height="24px";p.style.marginRight="6px";S.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));S.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";S.appendChild(E);var H=document.createElement("span");H.style.width="100px";mxUtils.write(H,mxResources.get("landscape"));S.appendChild(H);var K=document.createElement("div");K.style.marginLeft=
+"4px";K.style.width="210px";K.style.height="24px";var Q=document.createElement("input");Q.setAttribute("size","7");Q.style.textAlign="right";K.appendChild(Q);mxUtils.write(K," in x ");var d=document.createElement("input");d.setAttribute("size","7");d.style.textAlign="right";K.appendChild(d);mxUtils.write(K," in");S.style.display="none";K.style.display="none";for(var f={},g=PageSetupDialog.getFormats(),v=0;v<g.length;v++){var x=g[v];f[x.key]=x;var B=document.createElement("option");B.setAttribute("value",
+x.key);mxUtils.write(B,x.title);M.appendChild(B)}var I=!1;C();b.appendChild(M);mxUtils.br(b);b.appendChild(S);b.appendChild(K);var D=k,N=function(G,ia){G=f[M.value];null!=G.format?(Q.value=G.format.width/100,d.value=G.format.height/100,K.style.display="none",S.style.display=""):(S.style.display="none",K.style.display="");G=parseFloat(Q.value);if(isNaN(G)||0>=G)Q.value=k.width/100;G=parseFloat(d.value);if(isNaN(G)||0>=G)d.value=k.height/100;G=new mxRectangle(0,0,Math.floor(100*parseFloat(Q.value)),
+Math.floor(100*parseFloat(d.value)));"custom"!=M.value&&E.checked&&(G=new mxRectangle(0,0,G.height,G.width));ia&&I||G.width==D.width&&G.height==D.height||(D=G,null!=l&&l(D))};mxEvent.addListener(e,"click",function(G){p.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(H,"click",function(G){E.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(Q,"blur",N);mxEvent.addListener(Q,"click",N);mxEvent.addListener(d,"blur",N);mxEvent.addListener(d,"click",N);mxEvent.addListener(E,"change",N);
+mxEvent.addListener(p,"change",N);mxEvent.addListener(M,"change",function(G){I="custom"==M.value;N(G,!0)});N();return{set:function(G){k=G;C(null,null,!0)},get:function(){return D},widthInput:Q,heightInput:d}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,d,k,l,B,p,E,M,S,H,K,Q,e){S=null!=S?S:!0;var f=document.createElement("table"),g=document.createElement("tbody");f.style.position="absolute";f.style.top="30px";f.style.left="20px";var v=document.createElement("tr");var y=document.createElement("td");y.style.textOverflow="ellipsis";y.style.textAlign="right";y.style.maxWidth=(e?e+15:100)+"px";y.style.fontSize="10pt";y.style.width=(e?e:84)+"px";mxUtils.write(y,(B||mxResources.get("filename"))+":");v.appendChild(y);var C=
-document.createElement("input");C.setAttribute("value",d||"");C.style.marginLeft="4px";C.style.width=null!=Q?Q+"px":"180px";var I=mxUtils.button(k,function(){if(null==p||p(C.value))S&&b.hideDialog(),l(C.value)});I.className="geBtn gePrimaryBtn";this.init=function(){if(null!=B||null==E)if(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var D=f.parentNode;if(null!=D){var N=null;mxEvent.addListener(D,"dragleave",
-function(G){null!=N&&(N.style.backgroundColor="",N=null);G.stopPropagation();G.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(G){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=C,N.style.backgroundColor="#ebf2f9");G.stopPropagation();G.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(G){null!=N&&(N.style.backgroundColor="",N=null);0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")&&(C.value=decodeURIComponent(G.dataTransfer.getData("text/uri-list")),
-I.click());G.stopPropagation();G.preventDefault()}))}}};y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(C);v.appendChild(y);if(null!=B||null==E)g.appendChild(v),null!=K&&(y.appendChild(FilenameDialog.createTypeHint(b,C,K)),null!=b.editor.diagramFileTypes&&(v=document.createElement("tr"),y=document.createElement("td"),y.style.textOverflow="ellipsis",y.style.textAlign="right",y.style.maxWidth="100px",y.style.fontSize="10pt",y.style.width="84px",mxUtils.write(y,mxResources.get("type")+
-":"),v.appendChild(y),y=document.createElement("td"),y.style.whiteSpace="nowrap",v.appendChild(y),d=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),d.style.marginLeft="4px",d.style.width="198px",y.appendChild(d),C.style.width=null!=Q?Q-40+"px":"190px",v.appendChild(y),g.appendChild(v)));null!=E&&(v=document.createElement("tr"),y=document.createElement("td"),y.colSpan=2,y.appendChild(E),v.appendChild(y),g.appendChild(v));v=document.createElement("tr");y=document.createElement("td");y.colSpan=
-2;y.style.paddingTop=null!=K?"12px":"20px";y.style.whiteSpace="nowrap";y.setAttribute("align","right");K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=H&&H()});K.className="geBtn";b.editor.cancelFirst&&y.appendChild(K);null!=M&&(Q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(M)}),Q.className="geBtn",y.appendChild(Q));mxEvent.addListener(C,"keypress",function(D){13==D.keyCode&&I.click()});y.appendChild(I);b.editor.cancelFirst||y.appendChild(K);
-v.appendChild(y);g.appendChild(v);f.appendChild(g);this.container=f};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(b,d,k){var l=document.createElement("img");l.style.backgroundPosition="center bottom";l.style.backgroundRepeat="no-repeat";l.style.margin="2px 0 0 4px";l.style.verticalAlign="top";l.style.cursor="pointer";l.style.height="16px";l.style.width="16px";mxUtils.setOpacity(l,70);var B=function(){l.setAttribute("src",Editor.helpImage);l.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&d.value.toLowerCase().substring(d.value.length-
-k[p].ext.length-1)=="."+k[p].ext){l.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(d,"keyup",B);mxEvent.addListener(d,"change",B);mxEvent.addListener(l,"click",function(p){var E=l.getAttribute("title");l.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
-B();return l};
-FilenameDialog.createFileTypes=function(b,d,k){var l=document.createElement("select");for(b=0;b<k.length;b++){var B=document.createElement("option");B.setAttribute("value",b);mxUtils.write(B,mxResources.get(k[b].description)+" (."+k[b].extension+")");l.appendChild(B)}mxEvent.addListener(l,"change",function(p){p=k[l.value].extension;var E=d.value.lastIndexOf(".drawio.");E=0<E?E:d.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);d.value=0<E?d.value.substring(0,E+1)+p:d.value+"."+p;"createEvent"in
-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),d.dispatchEvent(p)):d.fireEvent("onchange")});b=function(p){p=d.value.toLowerCase();for(var E=0,M=0;M<k.length;M++){var S=k[M].extension,H=null;"drawio"!=S&&(H=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=H&&p.substring(p.length-H.length-1)=="."+H){E=M;break}}l.value=E};mxEvent.addListener(d,"change",b);mxEvent.addListener(d,"keyup",b);b();return l};
-var WrapperWindow=function(b,d,k,l,B,p,E){var M=b.createSidebarContainer();E(M);this.window=new mxWindow(d,M,k,l,B,p,!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(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};
+var FilenameDialog=function(b,e,k,l,C,p,E,M,S,H,K,Q,d){S=null!=S?S:!0;var f=document.createElement("table"),g=document.createElement("tbody");f.style.position="absolute";f.style.top="30px";f.style.left="20px";var v=document.createElement("tr");var x=document.createElement("td");x.style.textOverflow="ellipsis";x.style.textAlign="right";x.style.maxWidth=(d?d+15:100)+"px";x.style.fontSize="10pt";x.style.width=(d?d:84)+"px";mxUtils.write(x,(C||mxResources.get("filename"))+":");v.appendChild(x);var B=
+document.createElement("input");B.setAttribute("value",e||"");B.style.marginLeft="4px";B.style.width=null!=Q?Q+"px":"180px";var I=mxUtils.button(k,function(){if(null==p||p(B.value))S&&b.hideDialog(),l(B.value)});I.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==E)if(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var D=f.parentNode;if(null!=D){var N=null;mxEvent.addListener(D,"dragleave",
+function(G){null!=N&&(N.style.backgroundColor="",N=null);G.stopPropagation();G.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(G){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=B,N.style.backgroundColor="#ebf2f9");G.stopPropagation();G.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(G){null!=N&&(N.style.backgroundColor="",N=null);0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")&&(B.value=decodeURIComponent(G.dataTransfer.getData("text/uri-list")),
+I.click());G.stopPropagation();G.preventDefault()}))}}};x=document.createElement("td");x.style.whiteSpace="nowrap";x.appendChild(B);v.appendChild(x);if(null!=C||null==E)g.appendChild(v),null!=K&&(x.appendChild(FilenameDialog.createTypeHint(b,B,K)),null!=b.editor.diagramFileTypes&&(v=document.createElement("tr"),x=document.createElement("td"),x.style.textOverflow="ellipsis",x.style.textAlign="right",x.style.maxWidth="100px",x.style.fontSize="10pt",x.style.width="84px",mxUtils.write(x,mxResources.get("type")+
+":"),v.appendChild(x),x=document.createElement("td"),x.style.whiteSpace="nowrap",v.appendChild(x),e=FilenameDialog.createFileTypes(b,B,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",x.appendChild(e),B.style.width=null!=Q?Q-40+"px":"190px",v.appendChild(x),g.appendChild(v)));null!=E&&(v=document.createElement("tr"),x=document.createElement("td"),x.colSpan=2,x.appendChild(E),v.appendChild(x),g.appendChild(v));v=document.createElement("tr");x=document.createElement("td");x.colSpan=
+2;x.style.paddingTop=null!=K?"12px":"20px";x.style.whiteSpace="nowrap";x.setAttribute("align","right");K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=H&&H()});K.className="geBtn";b.editor.cancelFirst&&x.appendChild(K);null!=M&&(Q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(M)}),Q.className="geBtn",x.appendChild(Q));mxEvent.addListener(B,"keypress",function(D){13==D.keyCode&&I.click()});x.appendChild(I);b.editor.cancelFirst||x.appendChild(K);
+v.appendChild(x);g.appendChild(v);f.appendChild(g);this.container=f};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(b,e,k){var l=document.createElement("img");l.style.backgroundPosition="center bottom";l.style.backgroundRepeat="no-repeat";l.style.margin="2px 0 0 4px";l.style.verticalAlign="top";l.style.cursor="pointer";l.style.height="16px";l.style.width="16px";mxUtils.setOpacity(l,70);var C=function(){l.setAttribute("src",Editor.helpImage);l.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length-
+k[p].ext.length-1)=="."+k[p].ext){l.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(l,"click",function(p){var E=l.getAttribute("title");l.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
+C();return l};
+FilenameDialog.createFileTypes=function(b,e,k){var l=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");l.appendChild(C)}mxEvent.addListener(l,"change",function(p){p=k[l.value].extension;var E=e.value.lastIndexOf(".drawio.");E=0<E?E:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<E?e.value.substring(0,E+1)+p:e.value+"."+p;"createEvent"in
+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var E=0,M=0;M<k.length;M++){var S=k[M].extension,H=null;"drawio"!=S&&(H=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=H&&p.substring(p.length-H.length-1)=="."+H){E=M;break}}l.value=E};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return l};
+var WrapperWindow=function(b,e,k,l,C,p,E){var M=b.createSidebarContainer();E(M);this.window=new mxWindow(e,M,k,l,C,p,!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(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var M=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=E.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(M),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(E.container),S.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(H){E.dblClick(H)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(H){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(H))}),mxUtils.bind(this,function(H){null!=
E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(H)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(H))}),mxUtils.bind(this,function(H){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(H))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=M,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
@@ -2068,29 +2068,29 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,M=nul
E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",S.style.backgroundImage="none",S.style.backgroundColor="",Editor.isDarkMode()||"simple"!=Editor.currentTheme?E.container.style.backgroundColor="":E.container.style.backgroundColor=E.simpleBackgroundColor):(E.container.className="geDiagramContainer",S.style.backgroundPosition=K,S.style.backgroundImage=H,null!=E.background&&E.background!=mxConstants.NONE||Editor.isDarkMode()||"simple"!=Editor.currentTheme?S.style.backgroundColor=
M:(S.style.backgroundColor=E.simpleBackgroundColor,E.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(E){for(var M=this.graph.gridSize*this.scale;M<this.minGridSize;)M*=2;for(var S=this.gridSteps*M,H=[],K=1;K<this.gridSteps;K++){var Q=K*M;H.push("M 0 "+Q+" L "+S+" "+Q+" M "+Q+" 0 L "+Q+" "+S)}return'<svg width="'+S+'" height="'+S+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+S+'" height="'+S+'" patternUnits="userSpaceOnUse"><path d="'+H.join(" ")+
'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+S+" 0 L 0 0 0 "+S+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,M){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var H=this.gridSize*this.view.scale*this.view.gridSteps;H=-Math.round(H-mxUtils.mod(this.view.translate.x*
-this.view.scale+E,H))+"px "+-Math.round(H-mxUtils.mod(this.view.translate.y*this.view.scale+M,H))+"px";S.style.backgroundPosition=H}};mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.view.scale,K=this.view.translate,Q=this.pageFormat,e=H*this.pageScale,f=this.view.getBackgroundPageBounds();M=f.width;S=f.height;var g=new mxRectangle(H*K.x,H*K.y,Q.width*e,Q.height*e),v=(E=E&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(S/g.height)-1:0,y=E?Math.ceil(M/g.width)-1:0,C=f.x+M,
-I=f.y+S;null==this.horizontalPageBreaks&&0<v&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<y&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(D){if(null!=D){for(var N=D==this.horizontalPageBreaks?v:y,G=0;G<=N;G++){var ia=D==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(G+1)*g.height)),new mxPoint(Math.round(C),Math.round(f.y+(G+1)*g.height))]:[new mxPoint(Math.round(f.x+(G+1)*g.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(G+1)*g.width),
-Math.round(I))];null!=D[G]?(D[G].points=ia,D[G].redraw()):(ia=new mxPolyline(ia,this.pageBreakColor),ia.dialect=this.dialect,ia.isDashed=this.pageBreakDashed,ia.pointerEvents=!1,ia.init(this.view.backgroundPane),ia.redraw(),D[G]=ia)}for(G=N;G<D.length;G++)D[G].destroy();D.splice(N,D.length-N)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var d=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,M,S){for(var H=0;H<M.length;H++){if(this.graph.isTableCell(M[H])||
-this.graph.isTableRow(M[H]))return!1;if(this.graph.getModel().isVertex(M[H])){var K=this.graph.getCellGeometry(M[H]);if(null!=K&&K.relative)return!1}}return d.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(M,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=
-function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),M=0<E.width?E.x/this.scale-this.translate.x:0,S=0<E.height?E.y/this.scale-this.translate.y:0,H=this.graph.pageFormat,K=this.graph.pageScale,Q=H.width*K;H=H.height*K;K=Math.floor(Math.min(0,M)/Q);var e=Math.floor(Math.min(0,S)/H);return new mxRectangle(this.scale*(this.translate.x+K*Q),this.scale*(this.translate.y+e*H),this.scale*
-(Math.ceil(Math.max(1,M+E.width/this.scale)/Q)-K)*Q,this.scale*(Math.ceil(Math.max(1,S+E.height/this.scale)/H)-e)*H)};var l=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,M){l.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=M+"px")};var B=mxPopupMenu.prototype.addItem;
-mxPopupMenu.prototype.addItem=function(E,M,S,H,K,Q){var e=B.apply(this,arguments);null==Q||Q||mxEvent.addListener(e,"mousedown",function(f){mxEvent.consume(f)});return e};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,M,S){var H=this.graph.model.getParent(E);if(M){var K=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);K=!this.graph.model.isEdge(H)&&!this.graph.isSiblingSelected(E)&&(null!=K&&K.relative||!this.graph.isContainer(H)||
+this.view.scale+E,H))+"px "+-Math.round(H-mxUtils.mod(this.view.translate.y*this.view.scale+M,H))+"px";S.style.backgroundPosition=H}};mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.view.scale,K=this.view.translate,Q=this.pageFormat,d=H*this.pageScale,f=this.view.getBackgroundPageBounds();M=f.width;S=f.height;var g=new mxRectangle(H*K.x,H*K.y,Q.width*d,Q.height*d),v=(E=E&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(S/g.height)-1:0,x=E?Math.ceil(M/g.width)-1:0,B=f.x+M,
+I=f.y+S;null==this.horizontalPageBreaks&&0<v&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(D){if(null!=D){for(var N=D==this.horizontalPageBreaks?v:x,G=0;G<=N;G++){var ia=D==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(G+1)*g.height)),new mxPoint(Math.round(B),Math.round(f.y+(G+1)*g.height))]:[new mxPoint(Math.round(f.x+(G+1)*g.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(G+1)*g.width),
+Math.round(I))];null!=D[G]?(D[G].points=ia,D[G].redraw()):(ia=new mxPolyline(ia,this.pageBreakColor),ia.dialect=this.dialect,ia.isDashed=this.pageBreakDashed,ia.pointerEvents=!1,ia.init(this.view.backgroundPane),ia.redraw(),D[G]=ia)}for(G=N;G<D.length;G++)D[G].destroy();D.splice(N,D.length-N)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,M,S){for(var H=0;H<M.length;H++){if(this.graph.isTableCell(M[H])||
+this.graph.isTableRow(M[H]))return!1;if(this.graph.getModel().isVertex(M[H])){var K=this.graph.getCellGeometry(M[H]);if(null!=K&&K.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(M,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=
+function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),M=0<E.width?E.x/this.scale-this.translate.x:0,S=0<E.height?E.y/this.scale-this.translate.y:0,H=this.graph.pageFormat,K=this.graph.pageScale,Q=H.width*K;H=H.height*K;K=Math.floor(Math.min(0,M)/Q);var d=Math.floor(Math.min(0,S)/H);return new mxRectangle(this.scale*(this.translate.x+K*Q),this.scale*(this.translate.y+d*H),this.scale*
+(Math.ceil(Math.max(1,M+E.width/this.scale)/Q)-K)*Q,this.scale*(Math.ceil(Math.max(1,S+E.height/this.scale)/H)-d)*H)};var l=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,M){l.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=M+"px")};var C=mxPopupMenu.prototype.addItem;
+mxPopupMenu.prototype.addItem=function(E,M,S,H,K,Q){var d=C.apply(this,arguments);null==Q||Q||mxEvent.addListener(d,"mousedown",function(f){mxEvent.consume(f)});return d};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,M,S){var H=this.graph.model.getParent(E);if(M){var K=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);K=!this.graph.model.isEdge(H)&&!this.graph.isSiblingSelected(E)&&(null!=K&&K.relative||!this.graph.isContainer(H)||
this.graph.isPart(E))}else if(K=p.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))K=H,this.graph.isTable(K)||(K=this.graph.model.getParent(K)),K=!this.graph.selectionCellsHandler.isHandled(K)||this.graph.isCellSelected(K)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(H);return K};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();
-for(var M=this.graph.getModel(),S=M.getParent(E),H=this.graph.view.getState(S),K=this.graph.isCellSelected(E);null!=H&&(M.isVertex(S)||M.isEdge(S));){var Q=this.graph.isCellSelected(S);K=K||Q;if(Q||!K&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=S;S=M.getParent(S)}return E}})();EditorUi=function(b,d,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=d||document.body;var l=this.editor.graph;l.lightbox=k;var B=l.getGraphBounds;l.getGraphBounds=function(){var R=B.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var Z=this.view.translate,la=this.view.scale;R=mxRectangle.fromRectangle(R);R.add(new mxRectangle((Z.x+Y.x)*la,(Z.y+Y.y)*la,Y.width*la,Y.height*la))}return R};l.useCssTransforms&&(this.lazyZoomDelay=
+for(var M=this.graph.getModel(),S=M.getParent(E),H=this.graph.view.getState(S),K=this.graph.isCellSelected(E);null!=H&&(M.isVertex(S)||M.isEdge(S));){var Q=this.graph.isCellSelected(S);K=K||Q;if(Q||!K&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=S;S=M.getParent(S)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var l=this.editor.graph;l.lightbox=k;var C=l.getGraphBounds;l.getGraphBounds=function(){var R=C.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var Z=this.view.translate,la=this.view.scale;R=mxRectangle.fromRectangle(R);R.add(new mxRectangle((Z.x+Y.x)*la,(Z.y+Y.y)*la,Y.width*la,Y.height*la))}return R};l.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(R,Y){this.clearSelectionState()});l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
l.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);l.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);l.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);l.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,l.isEnabled=function(){return!1},l.panningHandler.isForcePanningEvent=function(R){return!mxEvent.isPopupTrigger(R.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!l.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
M="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),S=!1,H=!1;this.setDefaultStyle=function(R){try{l.getModel().isEdge(R)?H=!1:S=!1;var Y=l.getCellStyle(R,!1),Z=[],la=[],q;for(q in Y)Z.push(Y[q]),la.push(q);l.getModel().isEdge(R)?l.currentEdgeStyle={}:l.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",Z,"cells",[R]));l.getModel().isEdge(R)?H=!0:S=!0}catch(F){this.handleError(F)}};this.clearDefaultStyle=
-function(){l.currentEdgeStyle=mxUtils.clone(l.defaultEdgeStyle);l.currentVertexStyle=mxUtils.clone(l.defaultVertexStyle);S=H=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var K=["fontFamily","fontSource","fontSize","fontColor"];for(d=0;d<K.length;d++)0>mxUtils.indexOf(p,K[d])&&p.push(K[d]);var Q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),e=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
-"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(d=0;d<e.length;d++)for(k=0;k<e[d].length;k++)p.push(e[d][k]);for(d=0;d<E.length;d++)0>mxUtils.indexOf(p,E[d])&&p.push(E[d]);var f=function(R,Y,Z,la,q,F,T){la=null!=la?la:l.currentVertexStyle;q=null!=q?q:l.currentEdgeStyle;F=null!=F?F:!0;Z=null!=Z?Z:l.getModel();if(T){T=[];for(var aa=0;aa<R.length;aa++)T=T.concat(Z.getDescendants(R[aa]));R=T}Z.beginUpdate();try{for(aa=0;aa<R.length;aa++){var U=R[aa];
-if(Y)var da=["fontSize","fontFamily","fontColor"];else{var fa=Z.getStyle(U),na=null!=fa?fa.split(";"):[];da=p.slice();for(var sa=0;sa<na.length;sa++){var za=na[sa],ua=za.indexOf("=");if(0<=ua){var Ba=za.substring(0,ua),oa=mxUtils.indexOf(da,Ba);0<=oa&&da.splice(oa,1);for(T=0;T<e.length;T++){var Aa=e[T];if(0<=mxUtils.indexOf(Aa,Ba))for(var ya=0;ya<Aa.length;ya++){var La=mxUtils.indexOf(da,Aa[ya]);0<=La&&da.splice(La,1)}}}}}var Oa=Z.isEdge(U);T=Oa?q:la;var Na=Z.getStyle(U);for(sa=0;sa<da.length;sa++){Ba=
+function(){l.currentEdgeStyle=mxUtils.clone(l.defaultEdgeStyle);l.currentVertexStyle=mxUtils.clone(l.defaultVertexStyle);S=H=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var K=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<K.length;e++)0>mxUtils.indexOf(p,K[e])&&p.push(K[e]);var Q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),d=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
+"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<d.length;e++)for(k=0;k<d[e].length;k++)p.push(d[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(p,E[e])&&p.push(E[e]);var f=function(R,Y,Z,la,q,F,T){la=null!=la?la:l.currentVertexStyle;q=null!=q?q:l.currentEdgeStyle;F=null!=F?F:!0;Z=null!=Z?Z:l.getModel();if(T){T=[];for(var aa=0;aa<R.length;aa++)T=T.concat(Z.getDescendants(R[aa]));R=T}Z.beginUpdate();try{for(aa=0;aa<R.length;aa++){var U=R[aa];
+if(Y)var da=["fontSize","fontFamily","fontColor"];else{var fa=Z.getStyle(U),na=null!=fa?fa.split(";"):[];da=p.slice();for(var sa=0;sa<na.length;sa++){var za=na[sa],ua=za.indexOf("=");if(0<=ua){var Ba=za.substring(0,ua),oa=mxUtils.indexOf(da,Ba);0<=oa&&da.splice(oa,1);for(T=0;T<d.length;T++){var Aa=d[T];if(0<=mxUtils.indexOf(Aa,Ba))for(var ya=0;ya<Aa.length;ya++){var La=mxUtils.indexOf(da,Aa[ya]);0<=La&&da.splice(La,1)}}}}}var Oa=Z.isEdge(U);T=Oa?q:la;var Na=Z.getStyle(U);for(sa=0;sa<da.length;sa++){Ba=
da[sa];var Ia=T[Ba];null!=Ia&&"edgeStyle"!=Ba&&("shape"!=Ba||Oa)&&(!Oa||F||0>mxUtils.indexOf(M,Ba))&&(Na=mxUtils.setStyle(Na,Ba,Ia))}Editor.simpleLabels&&(Na=mxUtils.setStyle(mxUtils.setStyle(Na,"html",null),"whiteSpace",null));Z.setStyle(U,Na)}}finally{Z.endUpdate()}return R};l.addListener("cellsInserted",function(R,Y){f(Y.getProperty("cells"),null,null,null,null,!0,!0)});l.addListener("textInserted",function(R,Y){f(Y.getProperty("cells"),!0)});this.insertHandler=f;this.createDivs();this.createUi();
this.refresh();var g=mxUtils.bind(this,function(R){null==R&&(R=window.event);return l.isEditing()||null!=R&&this.isSelectionAllowed(R)});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?(d=function(R){if(null!=R){var Y=mxEvent.getSource(R);if("A"==Y.nodeName)for(;null!=Y;){if("geHint"==Y.className)return!0;Y=Y.parentNode}}return g(R)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-d):this.diagramContainer.oncontextmenu=d):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(d=l.view.getDrawPane().ownerSVGElement,null!=d&&(d.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=l.graphHandler){var v=l.graphHandler.start;l.graphHandler.start=function(){null!=pa.hoverIcons&&pa.hoverIcons.reset();v.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(R){var Y=
-mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(R)-Y.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(R)-Y.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var y=!1,C=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(R,Y){return y||C.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(R){32!=R.which||l.isEditing()?mxEvent.isConsumed(R)||
-27!=R.keyCode||this.hideDialog(null,!0):(y=!0,this.hoverIcons.reset(),l.container.style.cursor="move",l.isEditing()||mxEvent.getSource(R)!=l.container||mxEvent.consume(R))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(R){l.container.style.cursor="";y=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var I=l.panningHandler.isForcePanningEvent;l.panningHandler.isForcePanningEvent=function(R){return I.apply(this,arguments)||y||mxEvent.isMouseEvent(R.getEvent())&&
-(this.usePopupTrigger||!mxEvent.isPopupTrigger(R.getEvent()))&&(!mxEvent.isControlDown(R.getEvent())&&mxEvent.isRightMouseButton(R.getEvent())||mxEvent.isMiddleMouseButton(R.getEvent()))};var D=l.cellEditor.isStopEditingEvent;l.cellEditor.isStopEditingEvent=function(R){return D.apply(this,arguments)||13==R.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(R)||mxClient.IS_MAC&&mxEvent.isMetaDown(R)||mxClient.IS_SF&&mxEvent.isShiftDown(R))};var N=l.isZoomWheelEvent;l.isZoomWheelEvent=function(){return y||
+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?(e=function(R){if(null!=R){var Y=mxEvent.getSource(R);if("A"==Y.nodeName)for(;null!=Y;){if("geHint"==Y.className)return!0;Y=Y.parentNode}}return g(R)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+e):this.diagramContainer.oncontextmenu=e):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(e=l.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=l.graphHandler){var v=l.graphHandler.start;l.graphHandler.start=function(){null!=pa.hoverIcons&&pa.hoverIcons.reset();v.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(R){var Y=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(R)-Y.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(R)-Y.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var x=!1,B=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(R,Y){return x||B.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(R){32!=R.which||l.isEditing()?mxEvent.isConsumed(R)||
+27!=R.keyCode||this.hideDialog(null,!0):(x=!0,this.hoverIcons.reset(),l.container.style.cursor="move",l.isEditing()||mxEvent.getSource(R)!=l.container||mxEvent.consume(R))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(R){l.container.style.cursor="";x=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var I=l.panningHandler.isForcePanningEvent;l.panningHandler.isForcePanningEvent=function(R){return I.apply(this,arguments)||x||mxEvent.isMouseEvent(R.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(R.getEvent()))&&(!mxEvent.isControlDown(R.getEvent())&&mxEvent.isRightMouseButton(R.getEvent())||mxEvent.isMiddleMouseButton(R.getEvent()))};var D=l.cellEditor.isStopEditingEvent;l.cellEditor.isStopEditingEvent=function(R){return D.apply(this,arguments)||13==R.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(R)||mxClient.IS_MAC&&mxEvent.isMetaDown(R)||mxClient.IS_SF&&mxEvent.isShiftDown(R))};var N=l.isZoomWheelEvent;l.isZoomWheelEvent=function(){return x||
N.apply(this,arguments)};var G=!1,ia=null,ka=null,ja=null,ca=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=l.cellEditor.isContentEditing()){for(var R=this.toolbar.container.firstChild,Y=[];null!=R;){var Z=R.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,R)&&(R.parentNode.removeChild(R),Y.push(R));R=Z}R=this.toolbar.fontMenu;Z=this.toolbar.sizeMenu;if(null==ja)this.toolbar.createTextToolbar();else{for(var la=0;la<ja.length;la++)this.toolbar.container.appendChild(ja[la]);this.toolbar.fontMenu=
ia;this.toolbar.sizeMenu=ka}G=l.cellEditor.isContentEditing();ia=R;ka=Z;ja=Y}}),pa=this,ra=l.cellEditor.startEditing;l.cellEditor.startEditing=function(){ra.apply(this,arguments);ca();if(l.cellEditor.isContentEditing()){var R=!1,Y=function(){R||(R=!0,window.setTimeout(function(){var Z=l.getSelectedEditingElement();null!=Z&&(Z=mxUtils.getCurrentStyle(Z),null!=Z&&null!=pa.toolbar&&(pa.toolbar.setFontName(Graph.stripQuotes(Z.fontFamily)),pa.toolbar.setFontSize(parseInt(Z.fontSize))));R=!1},0))};mxEvent.addListener(l.cellEditor.textarea,
"input",Y);mxEvent.addListener(l.cellEditor.textarea,"touchend",Y);mxEvent.addListener(l.cellEditor.textarea,"mouseup",Y);mxEvent.addListener(l.cellEditor.textarea,"keyup",Y);Y()}};var L=l.cellEditor.stopEditing;l.cellEditor.stopEditing=function(R,Y){try{L.apply(this,arguments),ca()}catch(Z){pa.handleError(Z)}};l.container.setAttribute("tabindex","0");l.container.style.cursor="default";if(window.self===window.top&&null!=l.container.parentNode)try{l.container.focus()}catch(R){}var V=l.fireMouseEvent;
@@ -2104,122 +2104,122 @@ l.currentEdgeStyle.edgeStyle||"none"==l.currentEdgeStyle.edgeStyle||null==l.curr
0<R.length&&l.getModel().setVisible(Y,!0)});this.gestureHandler=mxUtils.bind(this,function(R){null!=this.currentMenu&&mxEvent.getSource(R)!=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(){l.view.validateBackground()}));this.addListener("backgroundColorChanged",
mxUtils.bind(this,function(){l.view.validateBackground()}));l.addListener("gridSizeChanged",mxUtils.bind(this,function(){l.isGridEnabled()&&l.view.validateBackground()}));this.editor.resetGraph()}this.init();l.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,d,k){function l(M,S){var H=p;p+=S;return M.substring(H,p)}function B(M){M=l(M,4);return M.charCodeAt(3)+(M.charCodeAt(2)<<8)+(M.charCodeAt(1)<<16)+(M.charCodeAt(0)<<24)}var p=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(l(b,4),"IHDR"!=l(b,4))null!=k&&k();else{l(b,17);do{k=B(b);var E=l(b,4);if(null!=d&&d(p-8,E,k))break;value=l(b,k);l(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+EditorUi.parsePng=function(b,e,k){function l(M,S){var H=p;p+=S;return M.substring(H,p)}function C(M){M=l(M,4);return M.charCodeAt(3)+(M.charCodeAt(2)<<8)+(M.charCodeAt(1)<<16)+(M.charCodeAt(0)<<24)}var p=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(l(b,4),"IHDR"!=l(b,4))null!=k&&k();else{l(b,17);do{k=C(b);var E=l(b,4);if(null!=e&&e(p-8,E,k))break;value=l(b,k);l(b,4);if("IEND"==E)break}while(k)}};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 b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var l=b.getRubberband();null!=l&&l.cancel()}));mxEvent.addListener(b.container,
-"keydown",mxUtils.bind(this,function(l){this.onKeyDown(l)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(l){this.onKeyPress(l)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var d=b.setDefaultParent,k=this;this.editor.graph.setDefaultParent=function(){d.apply(this,
+"keydown",mxUtils.bind(this,function(l){this.onKeyDown(l)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(l){this.onKeyPress(l)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var e=b.setDefaultParent,k=this;this.editor.graph.setDefaultParent=function(){e.apply(this,
arguments);k.updateActionStates()};b.editLink=k.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 b=this.editor.graph,d=b.getSelectionCells(),k=this.initSelectionState(),l=!0,B=0;B<d.length;B++){var p=b.getCurrentCellStyle(d[B]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,d[B],d,l),l=!1)}this.updateSelectionStateForTableCells(k);return k};
+EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),l=!0,C=0;C<e.length;C++){var p=b.getCurrentCellStyle(e[C]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[C],e,l),l=!1)}this.updateSelectionStateForTableCells(k);return k};
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(b){if(1<b.cells.length&&b.cell){for(var d=mxUtils.sortCells(b.cells),k=this.editor.graph.model,l=k.getParent(d[0]),B=k.getParent(l),p=l.getIndex(d[0]),E=B.getIndex(l),M=null,S=1,H=1,K=0,Q=E<B.getChildCount()-1?k.getChildAt(k.getChildAt(B,E+1),p):null;K<d.length-1;){var e=d[++K];null==Q||Q!=e||null!=M&&S!=M||(M=S,S=0,H++,l=k.getParent(Q),Q=E+H<B.getChildCount()?k.getChildAt(k.getChildAt(B,E+H),p):null);var f=this.editor.graph.view.getState(e);
-if(e==k.getChildAt(l,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}K==H*S-1&&(b.mergeCell=d[0],b.colspan=S,b.rowspan=H)}};
-EditorUi.prototype.updateSelectionStateForCell=function(b,d,k,l){k=this.editor.graph;b.cells.push(d);if(k.getModel().isVertex(d)){b.connections=0<k.model.getEdgeCount(d);b.unlocked=b.unlocked&&!k.isCellLocked(d);b.resizable=b.resizable&&k.isCellResizable(d);b.rotatable=b.rotatable&&k.isCellRotatable(d);b.movable=b.movable&&k.isCellMovable(d)&&!k.isTableRow(d)&&!k.isTableCell(d);b.swimlane=b.swimlane||k.isSwimlane(d);b.table=b.table||k.isTable(d);b.cell=b.cell||k.isTableCell(d);b.row=b.row||k.isTableRow(d);
-b.vertices.push(d);var B=k.getCellGeometry(d);if(null!=B&&(0<B.width?null==b.width?b.width=B.width:b.width!=B.width&&(b.width=""):b.containsLabel=!0,0<B.height?null==b.height?b.height=B.height:b.height!=B.height&&(b.height=""):b.containsLabel=!0,!B.relative||null!=B.offset)){var p=B.relative?B.offset.x:B.x;B=B.relative?B.offset.y:B.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=B:b.y!=B&&(b.y="")}}else k.getModel().isEdge(d)&&(b.edges.push(d),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
-!1);d=k.view.getState(d);null!=d&&(b.autoSize=b.autoSize||k.isAutoSizeState(d),b.glass=b.glass&&k.isGlassState(d),b.rounded=b.rounded&&k.isRoundedState(d),b.lineJumps=b.lineJumps&&k.isLineJumpState(d),b.image=b.image&&k.isImageState(d),b.shadow=b.shadow&&k.isShadowState(d),b.fill=b.fill&&k.isFillState(d),b.stroke=b.stroke&&k.isStrokeState(d),p=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(d.style,b.style,l))};
-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,d=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,H){"mouseDown"==H.getProperty("eventName")&&d.hideShapePicker()}));var k=mxUtils.bind(this,function(){d.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var l=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return l.apply(this,arguments)||null!=d.shapePicker};var B=b.dblClick;b.dblClick=function(S,H){if(this.isEnabled())if(null!=H||null==d.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))B.apply(this,arguments);else{var K=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(K.x,K.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){d.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(S,H,K){var Q=K.getEvent();this.graph.isCloneEvent(Q)||mxEvent.isShiftDown(Q)?E.apply(this,arguments):this.graph.connectVertex(S.cell,H,this.graph.defaultEdgeLength,Q,null,null,mxUtils.bind(this,function(e,f,g){var v=b.getCompositeParent(S.cell);e=b.getCellGeometry(v);for(K.consume();null!=v&&b.model.isVertex(v)&&null!=e&&e.relative;)cell=
-v,v=b.model.getParent(cell),e=b.getCellGeometry(v);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(K.getGraphX(),K.getGraphY(),v,mxUtils.bind(this,function(y){g(y);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(y))}),H)}),30)}),mxUtils.bind(this,function(e){this.graph.selectCellsForConnectVertex(e,Q,this)}))};var M=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M);M=window.setTimeout(mxUtils.bind(this,function(){var K=
-H.getProperty("arrow"),Q=H.getProperty("direction"),e=H.getProperty("event");K=K.getBoundingClientRect();var f=mxUtils.getOffset(b.container),g=b.container.scrollLeft+K.x-f.x;f=b.container.scrollTop+K.y-f.y;var v=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),y=d.showShapePicker(g,f,v,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(v,Q,b.defaultEdgeLength,e,!0,!0,function(I,D,N){N(C);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(C))},
-function(I){b.selectCellsForConnectVertex(I)},e,this.hoverIcons)}),Q,!0);this.centerShapePicker(y,K,g,f,Q);mxUtils.setOpacity(y,30);mxEvent.addListener(y,"mouseenter",function(){mxUtils.setOpacity(y,100)});mxEvent.addListener(y,"mouseleave",function(){d.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M)}))}};
-EditorUi.prototype.centerShapePicker=function(b,d,k,l,B){if(B==mxConstants.DIRECTION_EAST||B==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();B==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,l-=p.height+6):B==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,l+=d.height+6):B==mxConstants.DIRECTION_WEST?(k-=p.width+6,l-=p.height/2-10):B==mxConstants.DIRECTION_EAST&&(k+=d.width+6,l-=p.height/2-10);b.style.left=k+"px";b.style.top=l+"px"};
-EditorUi.prototype.showShapePicker=function(b,d,k,l,B,p){b=this.createShapePicker(b,d,k,l,B,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=l,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,d,k,l,B,p,E,M){var S=null;if(null!=E&&0<E.length){var H=this,K=this.editor.graph;S=document.createElement("div");B=K.view.getState(k);var Q=null==k||null!=B&&K.isTransparentState(B)?null:K.copyStyle(k);k=6>E.length?35*E.length:140;S.className="geToolbarContainer geSidebarContainer";S.style.cssText="position:absolute;left:"+b+"px;top:"+d+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";M||mxUtils.setPrefixedStyle(S.style,"transform","translate(-22px,-22px)");null!=K.background&&K.background!=mxConstants.NONE&&(S.style.backgroundColor=K.background);K.container.appendChild(S);k=mxUtils.bind(this,function(e){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";S.appendChild(f);null!=Q&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(Q,[e]):H.insertHandler([e],""!=e.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([e],25,25,f,null,!0,!1,e.geometry.width,e.geometry.height);mxEvent.addListener(f,"click",function(){var g=K.cloneCell(e);if(null!=l)l(g);else{g.geometry.x=K.snap(Math.round(b/K.view.scale)-K.view.translate.x-e.geometry.width/2);g.geometry.y=K.snap(Math.round(d/K.view.scale)-K.view.translate.y-e.geometry.height/2);K.model.beginUpdate();try{K.addCell(g)}finally{K.model.endUpdate()}K.setSelectionCell(g);
-K.scrollCellToVisible(g);K.startEditingAtCell(g);null!=H.hoverIcons&&H.hoverIcons.update(K.view.getState(g))}null!=p&&p()})});for(B=0;B<(M?Math.min(E.length,4):E.length);B++)k(E[B]);E=S.offsetTop+S.clientHeight-(K.container.scrollTop+K.container.offsetHeight);0<E&&(S.style.top=Math.max(K.container.scrollTop+22,d-E)+"px");E=S.offsetLeft+S.clientWidth-(K.container.scrollLeft+K.container.offsetWidth);0<E&&(S.style.left=Math.max(K.container.scrollLeft+22,b-E)+"px")}return S};
-EditorUi.prototype.getCellsForShapePicker=function(b,d){d=mxUtils.bind(this,function(k,l,B,p){return this.editor.graph.createVertex(null,null,p||"",0,0,l||120,B||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):d("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),d("whiteSpace=wrap;html=1;"),d("ellipse;whiteSpace=wrap;html=1;"),d("rhombus;whiteSpace=wrap;html=1;",80,80),d("rounded=1;whiteSpace=wrap;html=1;"),d("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
-d("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),d("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),d("triangle;whiteSpace=wrap;html=1;",60,80),d("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),d("shape=tape;whiteSpace=wrap;html=1;",120,100),d("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
-120,80),d("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),d("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
-EditorUi.prototype.onKeyDown=function(b){var d=this.editor.graph;if(9==b.which&&d.isEnabled()&&!mxEvent.isControlDown(b)){if(d.isEditing())if(mxEvent.isAltDown(b))d.stopEditing(!1);else try{var k=d.cellEditor.isContentEditing()&&d.cellEditor.isTextSelected();if(window.getSelection&&d.cellEditor.isContentEditing()&&!k&&!mxClient.IS_IE&&!mxClient.IS_IE11){var l=window.getSelection(),B=0<l.rangeCount?l.getRangeAt(0).commonAncestorContainer:null;k=null!=B&&("LI"==B.nodeName||null!=B.parentNode&&"LI"==
-B.parentNode.nodeName)}k?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?d.stopEditing(!1):d.cellEditor.insertTab(d.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?d.selectParentCell():d.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
-EditorUi.prototype.onKeyPress=function(b){var d=this.editor.graph;!this.isImmediateEditingEvent(b)||d.isEditing()||d.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(d.escape(),d.startEditing(),mxClient.IS_FF&&(d=d.cellEditor,null!=d.textarea&&(d.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(d.textarea),b.collapse(!1),d=window.getSelection(),d.removeAllRanges(),d.addRange(b))))};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,l=k.getParent(e[0]),C=k.getParent(l),p=l.getIndex(e[0]),E=C.getIndex(l),M=null,S=1,H=1,K=0,Q=E<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,E+1),p):null;K<e.length-1;){var d=e[++K];null==Q||Q!=d||null!=M&&S!=M||(M=S,S=0,H++,l=k.getParent(Q),Q=E+H<C.getChildCount()?k.getChildAt(k.getChildAt(C,E+H),p):null);var f=this.editor.graph.view.getState(d);
+if(d==k.getChildAt(l,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}K==H*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=H)}};
+EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,l){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
+b.vertices.push(e);var C=k.getCellGeometry(e);if(null!=C&&(0<C.width?null==b.width?b.width=C.width:b.width!=C.width&&(b.width=""):b.containsLabel=!0,0<C.height?null==b.height?b.height=C.height:b.height!=C.height&&(b.height=""):b.containsLabel=!0,!C.relative||null!=C.offset)){var p=C.relative?C.offset.x:C.x;C=C.relative?C.offset.y:C.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=C:b.y!=C&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
+!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),p=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(e.style,b.style,l))};
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,H){"mouseDown"==H.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var l=b.popupMenuHandler.isMenuShowing;
+b.popupMenuHandler.isMenuShowing=function(){return l.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(S,H){if(this.isEnabled())if(null!=H||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var K=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(K.x,K.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(S,H,K){var Q=K.getEvent();this.graph.isCloneEvent(Q)||mxEvent.isShiftDown(Q)?E.apply(this,arguments):this.graph.connectVertex(S.cell,H,this.graph.defaultEdgeLength,Q,null,null,mxUtils.bind(this,function(d,f,g){var v=b.getCompositeParent(S.cell);d=b.getCellGeometry(v);for(K.consume();null!=v&&b.model.isVertex(v)&&null!=d&&d.relative;)cell=
+v,v=b.model.getParent(cell),d=b.getCellGeometry(v);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(K.getGraphX(),K.getGraphY(),v,mxUtils.bind(this,function(x){g(x);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(x))}),H)}),30)}),mxUtils.bind(this,function(d){this.graph.selectCellsForConnectVertex(d,Q,this)}))};var M=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M);M=window.setTimeout(mxUtils.bind(this,function(){var K=
+H.getProperty("arrow"),Q=H.getProperty("direction"),d=H.getProperty("event");K=K.getBoundingClientRect();var f=mxUtils.getOffset(b.container),g=b.container.scrollLeft+K.x-f.x;f=b.container.scrollTop+K.y-f.y;var v=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=e.showShapePicker(g,f,v,mxUtils.bind(this,function(B){null!=B&&b.connectVertex(v,Q,b.defaultEdgeLength,d,!0,!0,function(I,D,N){N(B);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(B))},
+function(I){b.selectCellsForConnectVertex(I)},d,this.hoverIcons)}),Q,!0);this.centerShapePicker(x,K,g,f,Q);mxUtils.setOpacity(x,30);mxEvent.addListener(x,"mouseenter",function(){mxUtils.setOpacity(x,100)});mxEvent.addListener(x,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M)}))}};
+EditorUi.prototype.centerShapePicker=function(b,e,k,l,C){if(C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();C==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,l-=p.height+6):C==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,l+=e.height+6):C==mxConstants.DIRECTION_WEST?(k-=p.width+6,l-=p.height/2-10):C==mxConstants.DIRECTION_EAST&&(k+=e.width+6,l-=p.height/2-10);b.style.left=k+"px";b.style.top=l+"px"};
+EditorUi.prototype.showShapePicker=function(b,e,k,l,C,p){b=this.createShapePicker(b,e,k,l,C,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=l,this.shapePicker=b);return b};
+EditorUi.prototype.createShapePicker=function(b,e,k,l,C,p,E,M){var S=null;if(null!=E&&0<E.length){var H=this,K=this.editor.graph;S=document.createElement("div");C=K.view.getState(k);var Q=null==k||null!=C&&K.isTransparentState(C)?null:K.copyStyle(k);k=6>E.length?35*E.length:140;S.className="geToolbarContainer geSidebarContainer";S.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";M||mxUtils.setPrefixedStyle(S.style,"transform","translate(-22px,-22px)");null!=K.background&&K.background!=mxConstants.NONE&&(S.style.backgroundColor=K.background);K.container.appendChild(S);k=mxUtils.bind(this,function(d){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";S.appendChild(f);null!=Q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(Q,[d]):H.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,f,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(f,"click",function(){var g=K.cloneCell(d);if(null!=l)l(g);else{g.geometry.x=K.snap(Math.round(b/K.view.scale)-K.view.translate.x-d.geometry.width/2);g.geometry.y=K.snap(Math.round(e/K.view.scale)-K.view.translate.y-d.geometry.height/2);K.model.beginUpdate();try{K.addCell(g)}finally{K.model.endUpdate()}K.setSelectionCell(g);
+K.scrollCellToVisible(g);K.startEditingAtCell(g);null!=H.hoverIcons&&H.hoverIcons.update(K.view.getState(g))}null!=p&&p()})});for(C=0;C<(M?Math.min(E.length,4):E.length);C++)k(E[C]);E=S.offsetTop+S.clientHeight-(K.container.scrollTop+K.container.offsetHeight);0<E&&(S.style.top=Math.max(K.container.scrollTop+22,e-E)+"px");E=S.offsetLeft+S.clientWidth-(K.container.scrollLeft+K.container.offsetWidth);0<E&&(S.style.left=Math.max(K.container.scrollLeft+22,b-E)+"px")}return S};
+EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,l,C,p){return this.editor.graph.createVertex(null,null,p||"",0,0,l||120,C||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
+120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
+EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&e.isEnabled()&&!mxEvent.isControlDown(b)){if(e.isEditing())if(mxEvent.isAltDown(b))e.stopEditing(!1);else try{var k=e.cellEditor.isContentEditing()&&e.cellEditor.isTextSelected();if(window.getSelection&&e.cellEditor.isContentEditing()&&!k&&!mxClient.IS_IE&&!mxClient.IS_IE11){var l=window.getSelection(),C=0<l.rangeCount?l.getRangeAt(0).commonAncestorContainer:null;k=null!=C&&("LI"==C.nodeName||null!=C.parentNode&&"LI"==
+C.parentNode.nodeName)}k?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
+EditorUi.prototype.onKeyPress=function(b){var e=this.editor.graph;!this.isImmediateEditingEvent(b)||e.isEditing()||e.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(e.escape(),e.startEditing(),mxClient.IS_FF&&(e=e.cellEditor,null!=e.textarea&&(e.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(e.textarea),b.collapse(!1),e=window.getSelection(),e.removeAllRanges(),e.addRange(b))))};
EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};
-EditorUi.prototype.updateCssForMarker=function(b,d,k,l,B){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==k?b.className=null!=l&&l!=mxConstants.NONE?"geSprite geSprite-"+d+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(l,B),null!=k?(l=document.createElement("img"),l.className="geAdaptiveAsset",l.style.position="absolute",l.style.marginTop="0.5px",l.setAttribute("src",k),b.className="","end"==d&&mxUtils.setPrefixedStyle(l.style,
+EditorUi.prototype.updateCssForMarker=function(b,e,k,l,C){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==k?b.className=null!=l&&l!=mxConstants.NONE?"geSprite geSprite-"+e+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(l,C),null!=k?(l=document.createElement("img"),l.className="geAdaptiveAsset",l.style.position="absolute",l.style.marginTop="0.5px",l.setAttribute("src",k),b.className="","end"==e&&mxUtils.setPrefixedStyle(l.style,
"transform","scaleX(-1)"),b.appendChild(l)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))};
-EditorUi.prototype.getImageForMarker=function(b,d){var k=null;b==mxConstants.ARROW_CLASSIC?k="1"!=d?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?k="1"!=d?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?k=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?k=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?k="1"!=d?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
-b==mxConstants.ARROW_BLOCK_THIN?k="1"!=d?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?k="1"!=d?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?k="1"!=d?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?k="1"!=d?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?k="1"!=d?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
-"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=d?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
+EditorUi.prototype.getImageForMarker=function(b,e){var k=null;b==mxConstants.ARROW_CLASSIC?k="1"!=e?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?k="1"!=e?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?k=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?k=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?k="1"!=e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
+b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?k="1"!=e?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?k="1"!=e?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?k="1"!=e?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?k="1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
+"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
-EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,d=this.actions.get("paste"),k=this.actions.get("pasteHere");d.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(d.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,d=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):d.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var M={},S=p.createCellLookup(E),H=p.cloneCells(E,null,M),K=new mxGraphModel,Q=K.getChildAt(K.getRoot(),
-0),e=0;e<H.length;e++){K.add(Q,H[e]);var f=p.view.getState(E[e]);if(null!=f){var g=p.getCellGeometry(H[e]);null!=g&&g.relative&&!K.isEdge(E[e])&&null==S[mxObjectIdentity.get(K.getParent(E[e]))]&&(g.offset=null,g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(M,S),H);mxClipboard.insertCount=1;mxClipboard.setCells(H)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E=
-null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);b.updatePasteActionStates()};var B=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){B.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var M={},S=p.createCellLookup(E),H=p.cloneCells(E,null,M),K=new mxGraphModel,Q=K.getChildAt(K.getRoot(),
+0),d=0;d<H.length;d++){K.add(Q,H[d]);var f=p.view.getState(E[d]);if(null!=f){var g=p.getCellGeometry(H[d]);null!=g&&g.relative&&!K.isEdge(E[d])&&null==S[mxObjectIdentity.get(K.getParent(E[d]))]&&(g.offset=null,g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(M,S),H);mxClipboard.insertCount=1;mxClipboard.setCells(H)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E=
+null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var Z=this.graph.getPageLayout(),la=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+Z.x*la.width),this.scale*(this.translate.y+Z.y*la.height),this.scale*Z.width*la.width,
-this.scale*Z.height*la.height)};b.getPreferredPageSize=function(Z,la,q){Z=this.getPageLayout();la=this.getPageSize();return new mxRectangle(0,0,Z.width*la.width,Z.height*la.height)};var d=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=d=mxUtils.bind(this,function(Z,la,q,F){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;F=null!=F?F:0;var T=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),aa=mxUtils.hasScrollbars(b.container),U=b.view.translate,da=b.view.scale,
+this.scale*Z.height*la.height)};b.getPreferredPageSize=function(Z,la,q){Z=this.getPageLayout();la=this.getPageSize();return new mxRectangle(0,0,Z.width*la.width,Z.height*la.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(Z,la,q,F){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;F=null!=F?F:0;var T=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),aa=mxUtils.hasScrollbars(b.container),U=b.view.translate,da=b.view.scale,
fa=mxRectangle.fromRectangle(T);fa.x=fa.x/da-U.x;fa.y=fa.y/da-U.y;fa.width/=da;fa.height/=da;U=b.container.scrollTop;var na=b.container.scrollLeft,sa=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)sa+=3;var za=b.container.offsetWidth-sa;sa=b.container.offsetHeight-sa;Z=Z?Math.max(.3,Math.min(la||1,za/fa.width)):da;la=(za-Z*fa.width)/2/Z;var ua=0==this.lightboxVerticalDivider?0:(sa-Z*fa.height)/this.lightboxVerticalDivider/Z;aa&&(la=Math.max(la,0),ua=Math.max(ua,
0));if(aa||T.width<za||T.height<sa)b.view.scaleAndTranslate(Z,Math.floor(la-fa.x),Math.floor(ua-fa.y)),b.container.scrollTop=U*Z/da,b.container.scrollLeft=na*Z/da;else if(0!=q||0!=F)T=b.view.translate,b.view.setTranslate(Math.floor(T.x+q/da),Math.floor(T.y+F/da))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var l=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",l);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",l)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(Z){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(Z){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var B=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+"resize",l)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(Z){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(Z){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var Z=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=Z?parseInt(Z["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var E=0;p=mxUtils.bind(this,function(Z,la,q){E++;
-var F=document.createElement("span");F.style.paddingLeft="8px";F.style.paddingRight="8px";F.style.cursor="pointer";mxEvent.addListener(F,"click",Z);null!=q&&F.setAttribute("title",q);Z=document.createElement("img");Z.setAttribute("border","0");Z.setAttribute("src",la);Z.style.width="36px";Z.style.filter="invert(100%)";F.appendChild(Z);this.chromelessToolbar.appendChild(F);return F});if(null!=B.backBtn){var M=Graph.sanitizeLink(B.backBtn.url);null!=M&&p(mxUtils.bind(this,function(Z){window.location.href=
+var F=document.createElement("span");F.style.paddingLeft="8px";F.style.paddingRight="8px";F.style.cursor="pointer";mxEvent.addListener(F,"click",Z);null!=q&&F.setAttribute("title",q);Z=document.createElement("img");Z.setAttribute("border","0");Z.setAttribute("src",la);Z.style.width="36px";Z.style.filter="invert(100%)";F.appendChild(Z);this.chromelessToolbar.appendChild(F);return F});if(null!=C.backBtn){var M=Graph.sanitizeLink(C.backBtn.url);null!=M&&p(mxUtils.bind(this,function(Z){window.location.href=
M;mxEvent.consume(Z)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(Z){this.actions.get("previousPage").funct();mxEvent.consume(Z)}),Editor.previousImage,mxResources.get("previousPage")),H=document.createElement("div");H.style.fontFamily=Editor.defaultHtmlFont;H.style.display="inline-block";H.style.verticalAlign="top";H.style.fontWeight="bold";H.style.marginTop="8px";H.style.fontSize="14px";H.style.color=mxClient.IS_IE||mxClient.IS_IE11?
"#000000":"#ffffff";this.chromelessToolbar.appendChild(H);var K=p(mxUtils.bind(this,function(Z){this.actions.get("nextPage").funct();mxEvent.consume(Z)}),Editor.nextImage,mxResources.get("nextPage")),Q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(H.innerText="",mxUtils.write(H,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});S.style.paddingLeft="0px";S.style.paddingRight="4px";K.style.paddingLeft="4px";K.style.paddingRight=
-"0px";var e=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(K.style.display="",S.style.display="",H.style.display="inline-block"):(K.style.display="none",S.style.display="none",H.style.display="none");Q()});this.editor.addListener("resetGraphView",e);this.editor.addListener("pageSelected",Q)}p(mxUtils.bind(this,function(Z){this.actions.get("zoomOut").funct();mxEvent.consume(Z)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
+"0px";var d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(K.style.display="",S.style.display="",H.style.display="inline-block"):(K.style.display="none",S.style.display="none",H.style.display="none");Q()});this.editor.addListener("resetGraphView",d);this.editor.addListener("pageSelected",Q)}p(mxUtils.bind(this,function(Z){this.actions.get("zoomOut").funct();mxEvent.consume(Z)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
function(Z){this.actions.get("zoomIn").funct();mxEvent.consume(Z)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(Z){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Z)}),Editor.zoomFitImage,mxResources.get("fit"));var f=null,g=null,v=mxUtils.bind(this,function(Z){null!=f&&(window.clearTimeout(f),f=null);null!=g&&(window.clearTimeout(g),g=null);f=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;g=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";g=null}),600)}),Z||200)}),y=mxUtils.bind(this,function(Z){null!=f&&(window.clearTimeout(f),f=null);null!=g&&(window.clearTimeout(g),g=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Z||30)});if("1"==urlParams.layers){this.layersDialog=null;var C=p(mxUtils.bind(this,function(Z){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var la=C.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=
+function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;g=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";g=null}),600)}),Z||200)}),x=mxUtils.bind(this,function(Z){null!=f&&(window.clearTimeout(f),f=null);null!=g&&(window.clearTimeout(g),g=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Z||30)});if("1"==urlParams.layers){this.layersDialog=null;var B=p(mxUtils.bind(this,function(Z){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var la=B.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=la.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));la=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=la.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(Z)}),Editor.layersImage,mxResources.get("layers")),I=b.getModel();I.addListener(mxEvent.CHANGE,function(){C.style.display=1<I.getChildCount(I.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(Z){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(Z)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(e=0;e<this.lightboxToolbarActions.length;e++){var D=this.lightboxToolbarActions[e];D.elem=p(D.fn,D.icon,D.tooltip)}if(null!=B.refreshBtn){var N=null==B.refreshBtn.url?null:Graph.sanitizeLink(B.refreshBtn.url);
-p(mxUtils.bind(this,function(Z){null!=N?window.location.href=N:window.location.reload();mxEvent.consume(Z)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=B.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(Z){B.fullscreenBtn.url?b.openLink(B.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(Z)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(B.closeBtn&&window.self===window.top||b.lightbox&&("1"==
-urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(Z){"1"==urlParams.close||B.closeBtn?window.close():(this.destroy(),mxEvent.consume(Z))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
-function(Z){mxEvent.isTouchEvent(Z)||(mxEvent.isShiftDown(Z)||y(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(Z){mxEvent.consume(Z)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(Z){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(Z)?v():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Z){mxEvent.isShiftDown(Z)?v():y(100);
-mxEvent.consume(Z)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(Z){mxEvent.isTouchEvent(Z)||y(30)}));var G=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Z,la){this.startX=la.getGraphX();this.startY=la.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(Z,la){},mouseUp:function(Z,la){mxEvent.isTouchEvent(la.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
-G&&Math.abs(this.scrollTop-b.container.scrollTop)<G&&Math.abs(this.startX-la.getGraphX())<G&&Math.abs(this.startY-la.getGraphY())<G&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ia=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var Z=this.graph.getPagePadding(),la=this.graph.getPageSize();this.translate.x=Z.x-(this.x0||
+this.layersDialog.style.zIndex=la.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(Z)}),Editor.layersImage,mxResources.get("layers")),I=b.getModel();I.addListener(mxEvent.CHANGE,function(){B.style.display=1<I.getChildCount(I.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(Z){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(Z)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(d=0;d<this.lightboxToolbarActions.length;d++){var D=this.lightboxToolbarActions[d];D.elem=p(D.fn,D.icon,D.tooltip)}if(null!=C.refreshBtn){var N=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url);
+p(mxUtils.bind(this,function(Z){null!=N?window.location.href=N:window.location.reload();mxEvent.consume(Z)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(Z){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(Z)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
+urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(Z){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(Z))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
+function(Z){mxEvent.isTouchEvent(Z)||(mxEvent.isShiftDown(Z)||x(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(Z){mxEvent.consume(Z)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(Z){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(Z)?v():x(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Z){mxEvent.isShiftDown(Z)?v():x(100);
+mxEvent.consume(Z)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(Z){mxEvent.isTouchEvent(Z)||x(30)}));var G=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Z,la){this.startX=la.getGraphX();this.startY=la.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(Z,la){},mouseUp:function(Z,la){mxEvent.isTouchEvent(la.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
+G&&Math.abs(this.scrollTop-b.container.scrollTop)<G&&Math.abs(this.startX-la.getGraphX())<G&&Math.abs(this.startY-la.getGraphY())<G&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?v():x(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ia=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var Z=this.graph.getPagePadding(),la=this.graph.getPageSize();this.translate.x=Z.x-(this.x0||
0)*la.width;this.translate.y=Z.y-(this.y0||0)*la.height}ia.apply(this,arguments)};if(!b.isViewer()){var ka=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var Z=this.getPageLayout(),la=this.getPagePadding(),q=this.getPageSize(),F=Math.ceil(2*la.x+Z.width*q.width),T=Math.ceil(2*la.y+Z.height*q.height),aa=b.minimumGraphSize;if(null==aa||aa.width!=F||aa.height!=T)b.minimumGraphSize=new mxRectangle(0,0,F,T);F=la.x-Z.x*q.width;la=la.y-Z.y*q.height;
this.autoTranslate||this.view.translate.x==F&&this.view.translate.y==la?ka.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=Z.x,this.view.y0=Z.y,Z=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(F,la),b.container.scrollLeft+=Math.round((F-Z)*b.view.scale),b.container.scrollTop+=Math.round((la-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=b.view.getBackgroundPane(),ca=b.view.getDrawPane();b.cumulativeZoomFactor=
1;var pa=null,ra=null,L=null,V=null,R=null,Y=function(Z){null!=pa&&window.clearTimeout(pa);0<=Z&&window.setTimeout(function(){if(!b.isMouseDown||V)pa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ca.style.transformOrigin="",ja.style.transformOrigin=
"",mxClient.IS_SF?(ca.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){ca.style.transform="";ja.style.transform=""},0)):(ca.style.transform="",ja.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var la=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),F=b.view.scale,T=0,aa=0;null!=ra&&(T=b.container.offsetWidth/2-ra.x+q.x,aa=b.container.offsetHeight/2-ra.y+q.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=F&&(null!=L&&(T+=la.x-L.x,aa+=la.y-L.y),null!=d&&k.chromelessResize(!1,null,T*(b.cumulativeZoomFactor-1),aa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==T&&0==aa||(b.container.scrollLeft-=T*(b.cumulativeZoomFactor-1),b.container.scrollTop-=aa*(b.cumulativeZoomFactor-1)));null!=R&&ca.setAttribute("filter",R);b.cumulativeZoomFactor=1;R=V=ra=L=pa=null}),null!=Z?Z:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=F&&(null!=L&&(T+=la.x-L.x,aa+=la.y-L.y),null!=e&&k.chromelessResize(!1,null,T*(b.cumulativeZoomFactor-1),aa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==T&&0==aa||(b.container.scrollLeft-=T*(b.cumulativeZoomFactor-1),b.container.scrollTop-=aa*(b.cumulativeZoomFactor-1)));null!=R&&ca.setAttribute("filter",R);b.cumulativeZoomFactor=1;R=V=ra=L=pa=null}),null!=Z?Z:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
function(Z,la,q,F){F=null!=F?F:this.zoomFactor;(la=la||!b.scrollbars)&&(ra=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));Z?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=F,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/=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==R&&""!=ca.getAttribute("filter")&&(R=ca.getAttribute("filter"),ca.removeAttribute("filter")),L=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Z=la||null==ra?b.container.scrollLeft+
b.container.clientWidth/2:ra.x+b.container.scrollLeft-b.container.offsetLeft,F=la||null==ra?b.container.scrollTop+b.container.clientHeight/2:ra.y+b.container.scrollTop-b.container.offsetTop,ca.style.transformOrigin=Z+"px "+F+"px",ca.style.transform="scale("+this.cumulativeZoomFactor+")",ja.style.transformOrigin=Z+"px "+F+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(Z=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(Z.style,
"transform-origin",(la||null==ra?b.container.clientWidth/2+b.container.scrollLeft-Z.offsetLeft+"px":ra.x+b.container.scrollLeft-Z.offsetLeft-b.container.offsetLeft+"px")+" "+(la||null==ra?b.container.clientHeight/2+b.container.scrollTop-Z.offsetTop+"px":ra.y+b.container.scrollTop-Z.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(Z.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
k.hoverIcons.reset());Y(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(Z){null!=pa&&window.clearTimeout(pa)},null,function(Z){1!=b.cumulativeZoomFactor&&Y(0)});mxEvent.addListener(b.container,"scroll",function(Z){null==pa||b.isMouseDown||1==b.cumulativeZoomFactor||Y(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(Z,la,q,F,T){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(Z))q=
b.view.getTranslate(),F=40/b.view.scale,mxEvent.isShiftDown(Z)?b.view.setTranslate(q.x+(la?-F:F),q.y):b.view.setTranslate(q.x,q.y+(la?F:-F));else if(q||b.isZoomWheelEvent(Z))for(var aa=mxEvent.getSource(Z);null!=aa;){if(aa==b.container)return b.tooltipHandler.hideTooltip(),ra=null!=F&&null!=T?new mxPoint(F,T):new mxPoint(mxEvent.getClientX(Z),mxEvent.getClientY(Z)),V=q,q=b.zoomFactor,F=null,Z.ctrlKey&&null!=Z.deltaY&&40>Math.abs(Z.deltaY)&&Math.round(Z.deltaY)!=Z.deltaY?q=1+Math.abs(Z.deltaY)/20*
-(q-1):null!=Z.movementY&&"pointermove"==Z.type&&(q=1+Math.max(1,Math.abs(Z.movementY))/20*(q-1),F=-1),b.lazyZoom(la,null,F,q),mxEvent.consume(Z),!1;aa=aa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(Z){b.cumulativeZoomFactor=Z.scale;b.lazyZoom(0<Z.scale,!0);mxEvent.consume(Z)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(d){this.actions.get("print").funct();mxEvent.consume(d)}),Editor.printImage,mxResources.get("print"))};
+(q-1):null!=Z.movementY&&"pointermove"==Z.type&&(q=1+Math.max(1,Math.abs(Z.movementY))/20*(q-1),F=-1),b.lazyZoom(la,null,F,q),mxEvent.consume(Z),!1;aa=aa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(Z){b.cumulativeZoomFactor=Z.scale;b.lazyZoom(0<Z.scale,!0);mxEvent.consume(Z)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
-EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var d=urlParams.border,k=60;null!=d&&(k=parseInt(d));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
+EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};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(b,d){try{var k=mxUtils.parseXml(b);this.editor.setGraphXml(k.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=d&&(this.editor.setFilename(d),this.updateDocumentTitle())}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,d,k,l){this.editor.graph.popupMenuHandler.hideMenu();var B=new mxPopupMenu(b);B.div.className+=" geMenubarMenu";B.smartSeparators=!0;B.showDisabled=!0;B.autoExpand=!0;B.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(B,arguments);B.destroy()});B.popup(d,k,null,l);this.setCurrentMenu(B)};
-EditorUi.prototype.setCurrentMenu=function(b,d){this.currentMenuElt=d;this.currentMenu=b;this.hideShapePicker()};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 b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
-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(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var d=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);d==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(k){}};
-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(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0,k;for(k in urlParams)b=0==d?b+"?":b+"&",b+=k+"="+urlParams[k],d++;return b};
-EditorUi.prototype.setScrollbars=function(b){var d=this.editor.graph,k=d.container.style.overflow;d.scrollbars=b;this.editor.updateGraphComponents();k!=d.container.style.overflow&&(d.container.scrollTop=0,d.container.scrollLeft=0,d.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 b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var d=b.getPagePadding();b.container.scrollTop=Math.floor(d.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(d.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
-1;d=b.getGraphBounds();0<d.width&&0<d.height&&(d.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(d.x+d.width-b.container.clientWidth,d.x-10)),d.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(d.y+d.height-b.container.clientHeight,d.y-10)))}else{d=b.getGraphBounds();var k=Math.max(d.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,d.y-Math.max(20,(b.container.clientHeight-Math.max(d.height,
-b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,d.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{d=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var l=b.view.scale;d.x=d.x/l-k.x;d.y=d.y/l-k.y;d.width/=l;d.height/=l;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-d.width)/2)-d.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-d.height)/4))-d.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var d=this.editor.graph,k=mxUtils.hasScrollbars(d.container),l=0,B=0;k&&(l=d.view.translate.x*d.view.scale-d.container.scrollLeft,B=d.view.translate.y*d.view.scale-d.container.scrollTop);d.pageVisible=b;d.pageBreaksVisible=b;d.preferPageSize=b;d.view.validateBackground();if(k){var p=d.getSelectionCells();d.clearSelection();d.setSelectionCells(p)}d.sizeDidChange();k&&(d.container.scrollLeft=d.view.translate.x*d.view.scale-l,d.container.scrollTop=d.view.translate.y*
-d.view.scale-B);d.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
-EditorUi.prototype.installResizeHandler=function(b,d,k){d&&(b.window.setSize=function(B,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;B=Math.min(B,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(B,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-M=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),H=parseInt(this.div.style.height);B=Math.max(0,Math.min(B,E-S));p=Math.max(0,Math.min(p,M-H));this.getX()==B&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);d&&!this.minimized&&this.setSize(S,H)};var l=mxUtils.bind(this,function(){var B=b.window.getX(),p=b.window.getY();b.window.setLocation(B,p)});mxEvent.addListener(window,"resize",l);b.destroy=function(){mxEvent.removeListener(window,
-"resize",l);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,d){this.ui=b;this.color=d}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
-function ChangePageSetup(b,d,k,l,B){this.ui=b;this.previousColor=this.color=d;this.previousImage=this.image=k;this.previousFormat=this.format=l;this.previousPageScale=this.pageScale=B;this.ignoreImage=this.ignoreColor=!1}
-ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var d=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=d}if(!this.ignoreImage){this.image=this.previousImage;d=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=d}null!=this.previousFormat&&
-(this.format=this.previousFormat,d=b.pageFormat,this.previousFormat.width!=d.width||this.previousFormat.height!=d.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=d);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
-this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(d,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;l.previousPageScale=l.pageScale;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);return l};mxCodecRegistry.register(b)})();
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,e){try{var k=mxUtils.parseXml(b);this.editor.setGraphXml(k.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=e&&(this.editor.setFilename(e),this.updateDocumentTitle())}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,e,k,l){this.editor.graph.popupMenuHandler.hideMenu();var C=new mxPopupMenu(b);C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});C.popup(e,k,null,l);this.setCurrentMenu(C)};
+EditorUi.prototype.setCurrentMenu=function(b,e){this.currentMenuElt=e;this.currentMenu=b;this.hideShapePicker()};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 b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
+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(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var e=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);e==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(k){}};
+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(b){b=null!=b?b:window.location.pathname;var e=0<b.indexOf("?")?1:0,k;for(k in urlParams)b=0==e?b+"?":b+"&",b+=k+"="+urlParams[k],e++;return b};
+EditorUi.prototype.setScrollbars=function(b){var e=this.editor.graph,k=e.container.style.overflow;e.scrollbars=b;this.editor.updateGraphComponents();k!=e.container.style.overflow&&(e.container.scrollTop=0,e.container.scrollLeft=0,e.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 b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var e=b.getPagePadding();b.container.scrollTop=Math.floor(e.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(e.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
+1;e=b.getGraphBounds();0<e.width&&0<e.height&&(e.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(e.x+e.width-b.container.clientWidth,e.x-10)),e.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(e.y+e.height-b.container.clientHeight,e.y-10)))}else{e=b.getGraphBounds();var k=Math.max(e.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,e.y-Math.max(20,(b.container.clientHeight-Math.max(e.height,
+b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,e.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{e=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var l=b.view.scale;e.x=e.x/l-k.x;e.y=e.y/l-k.y;e.width/=l;e.height/=l;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-e.width)/2)-e.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-e.height)/4))-e.y+1))}};
+EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),l=0,C=0;k&&(l=e.view.translate.x*e.view.scale-e.container.scrollLeft,C=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-l,e.container.scrollTop=e.view.translate.y*
+e.view.scale-C);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
+EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+M=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),H=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,E-S));p=Math.max(0,Math.min(p,M-H));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(S,H)};var l=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",l);b.destroy=function(){mxEvent.removeListener(window,
+"resize",l);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
+function ChangePageSetup(b,e,k,l,C){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=l;this.previousPageScale=this.pageScale=C;this.ignoreImage=this.ignoreColor=!1}
+ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
+(this.format=this.previousFormat,e=b.pageFormat,this.previousFormat.width!=e.width||this.previousFormat.height!=e.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=e);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
+this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(e,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;l.previousPageScale=l.pageScale;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);return l};mxCodecRegistry.register(b)})();
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
-EditorUi.prototype.setPageFormat=function(b,d){d=null!=d?d:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;d||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
+EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),d=this.actions.get("redo"),k=this.editor.undoManager,l=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());d.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,l);k.addListener(mxEvent.UNDO,l);k.addListener(mxEvent.REDO,l);k.addListener(mxEvent.CLEAR,l);var B=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){B.apply(this,arguments);l()};var p=this.editor.graph.cellEditor.stopEditing;
+EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,l=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,l);k.addListener(mxEvent.UNDO,l);k.addListener(mxEvent.REDO,l);k.addListener(mxEvent.CLEAR,l);var C=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){C.apply(this,arguments);l()};var p=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(E,M){p.apply(this,arguments);l()};l()};
-EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,d=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),l="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(" "),B=0;B<l.length;B++)this.actions.get(l[B]).setEnabled(0<d.cells.length);
-this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<d.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<d.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==d.cells.length);this.actions.get("sendBackward").setEnabled(1==
-d.cells.length);this.actions.get("rotation").setEnabled(1==d.vertices.length);this.actions.get("wordWrap").setEnabled(1==d.vertices.length);this.actions.get("autosize").setEnabled(0<d.vertices.length);this.actions.get("copySize").setEnabled(1==d.vertices.length);this.actions.get("clearWaypoints").setEnabled(d.connections);this.actions.get("curved").setEnabled(0<d.edges.length);this.actions.get("turn").setEnabled(0<d.cells.length);this.actions.get("group").setEnabled(!d.row&&!d.cell&&(1<d.cells.length||
-1==d.vertices.length&&0==b.model.getChildCount(d.cells[0])&&!b.isContainer(d.vertices[0])));this.actions.get("ungroup").setEnabled(!d.row&&!d.cell&&!d.table&&0<d.vertices.length&&(b.isContainer(d.vertices[0])||0<b.getModel().getChildCount(d.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==d.cells.length&&b.getModel().isVertex(b.getModel().getParent(d.cells[0])));this.actions.get("collapsible").setEnabled(1==d.vertices.length&&(0<b.model.getChildCount(d.vertices[0])||b.isContainer(d.vertices[0])));
-this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==d.cells.length&&b.isValidRoot(d.cells[0]));this.actions.get("editLink").setEnabled(1==d.cells.length);this.actions.get("openLink").setEnabled(1==d.cells.length&&null!=b.getLinkForCell(d.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
-this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);l=1==d.vertices.length&&b.isCellFoldable(d.vertices[0]);this.actions.get("expand").setEnabled(l);this.actions.get("collapse").setEnabled(l);this.menus.get("navigation").setEnabled(0<d.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(d.unlocked&&1==d.vertices.length);this.menus.get("distribute").setEnabled(d.unlocked&&
-1<d.vertices.length);this.menus.get("align").setEnabled(d.unlocked&&0<d.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var d=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(d=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var B=Math.max(0,Math.min(this.hsplitPosition,
-d-this.splitSize-20));d=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",d+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",d+=this.toolbarHeight);0<d&&(d+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+l;p=Math.max(0,Math.min(k-d-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=B+"px";this.sidebarFooterContainer.style.height=
-p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=d+"px";this.sidebarContainer.style.width=B+"px";this.formatContainer.style.top=d+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var M=null!=this.hsplit.parentNode?B+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+l+"px";this.hsplit.style.left=B+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=M+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px");B=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=k+"px",B=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+l+"px";this.formatContainer.style.bottom=
-this.footerHeight+l+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=M+E.x+"px",this.diagramContainer.style.top=d+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+l+B+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),l="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(" "),C=0;C<l.length;C++)this.actions.get(l[C]).setEnabled(0<e.cells.length);
+this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
+e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
+1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0])));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));
+this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("openLink").setEnabled(1==e.cells.length&&null!=b.getLinkForCell(e.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
+this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);l=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(l);this.actions.get("collapse").setEnabled(l);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&
+1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,
+e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+l;p=Math.max(0,Math.min(k-e-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=
+p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var M=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+l+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=M+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+l+"px";this.formatContainer.style.bottom=
+this.footerHeight+l+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=M+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+l+C+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2227,61 +2227,65 @@ EditorUi.prototype.createSidebarContainer=function(){var b=document.createElemen
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var b=this.editor.chromeless?null:this.createFooter();null!=b&&(this.footerContainer.appendChild(b),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
-!0,0,mxUtils.bind(this,function(d){this.hsplitPosition=d;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
-EditorUi.prototype.createStatusDiv=function(b){var d=document.createElement("div");d.setAttribute("title",b);d.innerHTML=b;return d};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
-EditorUi.prototype.createDiv=function(b){var d=document.createElement("div");d.className=b;return d};
-EditorUi.prototype.addSplitHandler=function(b,d,k,l){function B(Q){if(null!=E){var e=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q));l(Math.max(0,M+(d?e.x-E.x:E.y-e.y)-k));mxEvent.consume(Q);M!=K()&&(S=!0,H=null)}}function p(Q){B(Q);E=M=null}var E=null,M=null,S=!0,H=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var K=mxUtils.bind(this,function(){var Q=parseInt(d?b.style.left:b.style.bottom);d||(Q=Q+k-this.footerHeight);return Q});mxEvent.addGestureListeners(b,function(Q){E=new mxPoint(mxEvent.getClientX(Q),
-mxEvent.getClientY(Q));M=K();S=!1;mxEvent.consume(Q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(Q){if(!S&&this.hsplitClickEnabled){var e=null!=H?H-k:0;H=K();l(e);mxEvent.consume(Q)}}));mxEvent.addGestureListeners(document,null,B,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,B,p)})};
-EditorUi.prototype.prompt=function(b,d,k){b=new FilenameDialog(this,d,mxResources.get("apply"),function(l){k(parseFloat(l))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
-EditorUi.prototype.handleError=function(b,d,k,l,B){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=d){B=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");d=null!=d?d:mxResources.get("error");null!=b&&null!=b.message&&(B=mxUtils.htmlEntities(b.message));this.showError(d,B,p,k,null,null,null,null,null,null,null,null,l?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,d,k,l,B,p,E,M,S,H,K,Q,e){b=new ErrorDialog(this,b,d,k||mxResources.get("ok"),l,B,p,E,Q,M,S);d=Math.ceil(null!=d?d.length/50:1);this.showDialog(b.container,H||340,K||100+20*d,!0,!1,e);b.init()};EditorUi.prototype.showDialog=function(b,d,k,l,B,p,E,M,S,H){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,d,k,l,B,p,E,M,S,H);this.dialogs.push(this.dialog)};
-EditorUi.prototype.hideDialog=function(b,d,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,d)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var d=b.getSelectionCells(),k=new mxDictionary,l=[],B=0;B<d.length;B++){var p=b.isTableCell(d[B])?b.model.getParent(d[B]):d[B];null==p||k.get(p)||(k.put(p,!0),l.push(p))}b.setSelectionCells(b.duplicateCells(l,!1))}catch(E){this.handleError(E)}};
-EditorUi.prototype.pickColor=function(b,d){var k=this.editor.graph,l=k.cellEditor.saveSelection(),B=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(l);d(p)},function(){k.cellEditor.restoreSelection(l)});this.showDialog(b.container,230,B,!0,!1);b.init()};
+!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};
+EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){var k=mxEvent.getSource(e),l=k.getAttribute("data-action");if("statusFunction"==l&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=l)k=this.actions.get(l),null!=k&&k.funct();else{l=k.getAttribute("data-title");var C=k.getAttribute("data-message");null!=l&&null!=C?this.showError(l,C):(k=k.getAttribute("data-link"),
+null!=k&&this.editor.graph.openLink(k))}mxEvent.consume(e)}));return b};
+EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var e=0;e<b.length;e++)(function(k){mxUtils.setOpacity(k,0);mxUtils.setPrefixedStyle(k.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(k.style,"transition","all 0.2s ease");
+window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(k,100);mxUtils.setPrefixedStyle(k.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(k.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(k.style,"transform","scaleX(0)");mxUtils.setOpacity(k,0);window.setTimeout(mxUtils.bind(this,function(){null!=k.parentNode&&k.parentNode.removeChild(k)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};
+EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
+EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
+EditorUi.prototype.addSplitHandler=function(b,e,k,l){function C(Q){if(null!=E){var d=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q));l(Math.max(0,M+(e?d.x-E.x:E.y-d.y)-k));mxEvent.consume(Q);M!=K()&&(S=!0,H=null)}}function p(Q){C(Q);E=M=null}var E=null,M=null,S=!0,H=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var K=mxUtils.bind(this,function(){var Q=parseInt(e?b.style.left:b.style.bottom);e||(Q=Q+k-this.footerHeight);return Q});mxEvent.addGestureListeners(b,function(Q){E=new mxPoint(mxEvent.getClientX(Q),
+mxEvent.getClientY(Q));M=K();S=!1;mxEvent.consume(Q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(Q){if(!S&&this.hsplitClickEnabled){var d=null!=H?H-k:0;H=K();l(d);mxEvent.consume(Q)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
+EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(l){k(parseFloat(l))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
+EditorUi.prototype.handleError=function(b,e,k,l,C){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){C=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(C=mxUtils.htmlEntities(b.message));this.showError(e,C,p,k,null,null,null,null,null,null,null,null,l?k:null)}else null!=k&&k()};
+EditorUi.prototype.showError=function(b,e,k,l,C,p,E,M,S,H,K,Q,d){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),l,C,p,E,Q,M,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,H||340,K||100+20*e,!0,!1,d);b.init()};EditorUi.prototype.showDialog=function(b,e,k,l,C,p,E,M,S,H){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,l,C,p,E,M,S,H);this.dialogs.push(this.dialog)};
+EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,l=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),l.push(p))}b.setSelectionCells(b.duplicateCells(l,!1))}catch(E){this.handleError(E)}};
+EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,l=k.cellEditor.saveSelection(),C=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(l);e(p)},function(){k.cellEditor.restoreSelection(l)});this.showDialog(b.container,230,C,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var l=b.lastIndexOf("&lt;/mxGraphModel&gt;");l>k&&(d=b.substring(k,l+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(B){}return d};
-EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(d){null!=d?b(d):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var l=decodeURIComponent(k);this.isCompatibleString(l)&&(k=l)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,d){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==d&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(l){l.text().then(mxUtils.bind(this,function(B){try{var p=this.parseHtmlData(B),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var M=E.lastIndexOf("%3E");
-0<=M&&M<E.length-3&&(E=E.substring(0,M+3))}catch(K){}try{var S=p.getElementsByTagName("span"),H=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(E);this.isCompatibleString(H)&&(E=H)}catch(K){}}catch(K){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(B){b(null)})}))["catch"](function(l){b(null)});else if(null!=k&&0<k.length&&"text"==d&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(l){l.text().then(function(B){b(B)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var l=b.lastIndexOf("&lt;/mxGraphModel&gt;");l>k&&(e=b.substring(k,l+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(C){}return e};
+EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var l=decodeURIComponent(k);this.isCompatibleString(l)&&(k=l)}b(k)}),"text")}),"html")};
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(l){l.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var M=E.lastIndexOf("%3E");
+0<=M&&M<E.length-3&&(E=E.substring(0,M+3))}catch(K){}try{var S=p.getElementsByTagName("span"),H=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(E);this.isCompatibleString(H)&&(E=H)}catch(K){}}catch(K){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(C){b(null)})}))["catch"](function(l){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(l){l.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(k){b(null)})};
-EditorUi.prototype.parseHtmlData=function(b){var d=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);d=document.createElement("div");d.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=d.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=d.firstChild&&d.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=d.firstChild.nextSibling&&d.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
-d.firstChild.nodeName&&"A"==d.firstChild.nextSibling.nodeName&&null==d.firstChild.nextSibling.nextSibling&&(b=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,b==d.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(d,b),asHtml=!1));k=k&&null!=d.firstChild?d.firstChild.nextSibling:d.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
-null!=b&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(d,b),asHtml=!1)):(k=d.getElementsByTagName("img"),1==k.length&&(k=k[0],b=k.getAttribute("src"),null!=b&&k.parentNode==d&&1==d.children.length&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(d,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(d)}asHtml||d.setAttribute("data-type","text/plain");return d};
-EditorUi.prototype.extractGraphModelFromEvent=function(b){var d=null,k=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?k=b.getData("Text"):(k=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==k||0==k.length)&&(k=b.getData("text/plain"))),null!=k&&(k=Graph.zapGremlins(mxUtils.trim(k)),b=this.extractGraphModelFromHtml(k),null!=b&&(k=b))));null!=k&&this.isCompatibleString(k)&&
-(d=k);return d};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(d){this.save(d)}),null,mxUtils.bind(this,function(d){if(null!=d&&0<d.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
-EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,d);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(d.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(d))).simulate(document,
-"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(d);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayouts=function(b,d){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),l=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==l.length?null:l)}),!0,d)};
-EditorUi.prototype.executeLayout=function(b,d,k){var l=this.editor.graph;l.getModel().beginUpdate();try{b()}catch(B){throw B;}finally{this.allowAnimation&&d&&l.isEnabled()?(b=new mxMorphing(l),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(l.getModel().endUpdate(),null!=k&&k())}};
-EditorUi.prototype.showImageDialog=function(b,d,k,l){l=this.editor.graph.cellEditor;var B=l.saveSelection(),p=mxUtils.prompt(b,d);l.restoreSelection(B);if(null!=p&&0<p.length){var E=new Image;E.onload=function(){k(p,E.width,E.height)};E.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,d,k){b=new LinkDialog(this,b,d,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
+e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
+null!=b&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)):(k=e.getElementsByTagName("img"),1==k.length&&(k=k[0],b=k.getAttribute("src"),null!=b&&k.parentNode==e&&1==e.children.length&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(e)}asHtml||e.setAttribute("data-type","text/plain");return e};
+EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,k=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?k=b.getData("Text"):(k=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==k||0==k.length)&&(k=b.getData("text/plain"))),null!=k&&(k=Graph.zapGremlins(mxUtils.trim(k)),b=this.extractGraphModelFromHtml(k),null!=b&&(k=b))));null!=k&&this.isCompatibleString(k)&&
+(e=k);return e};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(e){this.save(e)}),null,mxUtils.bind(this,function(e){if(null!=e&&0<e.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
+EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,
+"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
+EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),l=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==l.length?null:l)}),!0,e)};
+EditorUi.prototype.executeLayout=function(b,e,k){var l=this.editor.graph;l.getModel().beginUpdate();try{b()}catch(C){throw C;}finally{this.allowAnimation&&e&&l.isEnabled()?(b=new mxMorphing(l),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(l.getModel().endUpdate(),null!=k&&k())}};
+EditorUi.prototype.showImageDialog=function(b,e,k,l){l=this.editor.graph.cellEditor;var C=l.saveSelection(),p=mxUtils.prompt(b,e);l.restoreSelection(C);if(null!=p&&0<p.length){var E=new Image;E.onload=function(){k(p,E.width,E.height)};E.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(b,d){b=null!=b?b:mxUtils.bind(this,function(l){l=new ChangePageSetup(this,null,l);l.ignoreColor=!0;this.editor.graph.model.execute(l)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=d?d.src:"");null!=k&&0<k.length?(d=new Image,d.onload=function(){b(new mxImage(k,d.width,d.height),!1)},d.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},d.src=k):b(null)};
-EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,d,k){mxUtils.confirm(b)?null!=d&&d():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var d=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){d.update(!1)});return d};
+EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(l){l=new ChangePageSetup(this,null,l);l.ignoreColor=!0;this.editor.graph.model.execute(l)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
+EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function d(Q,e,f){if(!l.isSelectionEmpty()&&l.isEnabled()){e=null!=e?e:1;var g=l.getCompositeParents(l.getSelectionCells()),v=0<g.length?g[0]:null;if(null!=v)if(f){l.getModel().beginUpdate();try{for(v=0;v<g.length;v++)if(l.getModel().isVertex(g[v])&&l.isCellResizable(g[v])){var y=l.getCellGeometry(g[v]);null!=y&&(y=y.clone(),37==Q?y.width=Math.max(0,y.width-e):38==Q?y.height=Math.max(0,y.height-e):39==Q?y.width+=e:40==Q&&(y.height+=e),l.getModel().setGeometry(g[v],
-y))}}finally{l.getModel().endUpdate()}}else{y=l.model.getParent(v);var C=l.getView().scale;f=null;1==l.getSelectionCount()&&l.model.isVertex(v)&&null!=l.layoutManager&&!l.isCellLocked(v)&&(f=l.layoutManager.getLayout(y));if(null!=f&&f.constructor==mxStackLayout)e=y.getIndex(v),37==Q||38==Q?l.model.add(y,v,Math.max(0,e-1)):(39==Q||40==Q)&&l.model.add(y,v,Math.min(l.model.getChildCount(y),e+1));else{var I=l.graphHandler;null!=I&&(null==I.first&&I.start(v,0,0,g),null!=I.first&&(v=g=0,37==Q?g=-e:38==
-Q?v=-e:39==Q?g=e:40==Q&&(v=e),I.currentDx+=g*C,I.currentDy+=v*C,I.checkPreview(),I.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=I.first){var D=I.roundLength(I.currentDx/C),N=I.roundLength(I.currentDy/C);I.moveCells(I.cells,D,N);I.reset()}},400))}}}}var k=this,l=this.editor.graph,B=new mxKeyHandler(l),p=B.isEventIgnored;B.isEventIgnored=function(Q){return!(mxEvent.isShiftDown(Q)&&9==Q.keyCode)&&(!this.isControlDown(Q)||mxEvent.isShiftDown(Q)||90!=Q.keyCode&&
-89!=Q.keyCode&&188!=Q.keyCode&&190!=Q.keyCode&&85!=Q.keyCode)&&(66!=Q.keyCode&&73!=Q.keyCode||!this.isControlDown(Q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};B.isEnabledForEvent=function(Q){return!mxEvent.isConsumed(Q)&&this.isGraphEvent(Q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};B.isControlDown=function(Q){return mxEvent.isControlDown(Q)||mxClient.IS_MAC&&Q.metaKey};var E=null,M={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=B.getFunction;mxKeyHandler.prototype.getFunction=function(Q){if(l.isEnabled()){if(mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){var e=k.actions.get(k.altShiftActions[Q.keyCode]);if(null!=e)return e.funct}if(null!=M[Q.keyCode]&&!l.isSelectionEmpty())if(!this.isControlDown(Q)&&mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){if(l.model.isVertex(l.getSelectionCell()))return function(){var f=l.connectVertex(l.getSelectionCell(),M[Q.keyCode],
-l.defaultEdgeLength,Q,!0);null!=f&&0<f.length&&(1==f.length&&l.model.isEdge(f[0])?l.setSelectionCell(l.model.getTerminal(f[0],!1)):l.setSelectionCell(f[f.length-1]),l.scrollCellToVisible(l.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(l.view.getState(l.getSelectionCell())))}}else return this.isControlDown(Q)?function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null,!0)}:function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null)}}return S.apply(this,arguments)};B.bindAction=mxUtils.bind(this,
-function(Q,e,f,g){var v=this.actions.get(f);null!=v&&(f=function(){v.isEnabled()&&v.funct.apply(this,arguments)},e?g?B.bindControlShiftKey(Q,f):B.bindControlKey(Q,f):g?B.bindShiftKey(Q,f):B.bindKey(Q,f))});var H=this,K=B.escape;B.escape=function(Q){K.apply(this,arguments)};B.enter=function(){};B.bindControlShiftKey(36,function(){l.exitGroup()});B.bindControlShiftKey(35,function(){l.enterGroup()});B.bindShiftKey(36,function(){l.home()});B.bindKey(35,function(){l.refresh()});B.bindAction(107,!0,"zoomIn");
-B.bindAction(109,!0,"zoomOut");B.bindAction(80,!0,"print");B.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)B.bindControlKey(36,function(){l.isEnabled()&&l.foldCells(!0)}),B.bindControlKey(35,function(){l.isEnabled()&&l.foldCells(!1)}),B.bindControlKey(13,function(){H.ctrlEnter()}),B.bindAction(8,!1,"delete"),B.bindAction(8,!0,"deleteAll"),B.bindAction(8,!1,"deleteLabels",!0),B.bindAction(46,!1,"delete"),B.bindAction(46,!0,"deleteAll"),B.bindAction(46,!1,"deleteLabels",
-!0),B.bindAction(36,!1,"resetView"),B.bindAction(72,!0,"fitWindow",!0),B.bindAction(74,!0,"fitPage"),B.bindAction(74,!0,"fitTwoPages",!0),B.bindAction(48,!0,"customZoom"),B.bindAction(82,!0,"turn"),B.bindAction(82,!0,"clearDefaultStyle",!0),B.bindAction(83,!0,"save"),B.bindAction(83,!0,"saveAs",!0),B.bindAction(65,!0,"selectAll"),B.bindAction(65,!0,"selectNone",!0),B.bindAction(73,!0,"selectVertices",!0),B.bindAction(69,!0,"selectEdges",!0),B.bindAction(69,!0,"editStyle"),B.bindAction(66,!0,"bold"),
-B.bindAction(66,!0,"toBack",!0),B.bindAction(70,!0,"toFront",!0),B.bindAction(68,!0,"duplicate"),B.bindAction(68,!0,"setAsDefaultStyle",!0),B.bindAction(90,!0,"undo"),B.bindAction(89,!0,"autosize",!0),B.bindAction(88,!0,"cut"),B.bindAction(67,!0,"copy"),B.bindAction(86,!0,"paste"),B.bindAction(71,!0,"group"),B.bindAction(77,!0,"editData"),B.bindAction(71,!0,"grid",!0),B.bindAction(73,!0,"italic"),B.bindAction(76,!0,"lockUnlock"),B.bindAction(76,!0,"layers",!0),B.bindAction(80,!0,"format",!0),B.bindAction(85,
-!0,"underline"),B.bindAction(85,!0,"ungroup",!0),B.bindAction(190,!0,"superscript"),B.bindAction(188,!0,"subscript"),B.bindAction(13,!1,"keyPressEnter"),B.bindKey(113,function(){l.isEnabled()&&l.startEditingAtCell()});mxClient.IS_WIN?B.bindAction(89,!0,"redo"):B.bindAction(90,!0,"redo",!0);return B};
+EditorUi.prototype.createKeyHandler=function(b){function e(Q,d,f){if(!l.isSelectionEmpty()&&l.isEnabled()){d=null!=d?d:1;var g=l.getCompositeParents(l.getSelectionCells()),v=0<g.length?g[0]:null;if(null!=v)if(f){l.getModel().beginUpdate();try{for(v=0;v<g.length;v++)if(l.getModel().isVertex(g[v])&&l.isCellResizable(g[v])){var x=l.getCellGeometry(g[v]);null!=x&&(x=x.clone(),37==Q?x.width=Math.max(0,x.width-d):38==Q?x.height=Math.max(0,x.height-d):39==Q?x.width+=d:40==Q&&(x.height+=d),l.getModel().setGeometry(g[v],
+x))}}finally{l.getModel().endUpdate()}}else{x=l.model.getParent(v);var B=l.getView().scale;f=null;1==l.getSelectionCount()&&l.model.isVertex(v)&&null!=l.layoutManager&&!l.isCellLocked(v)&&(f=l.layoutManager.getLayout(x));if(null!=f&&f.constructor==mxStackLayout)d=x.getIndex(v),37==Q||38==Q?l.model.add(x,v,Math.max(0,d-1)):(39==Q||40==Q)&&l.model.add(x,v,Math.min(l.model.getChildCount(x),d+1));else{var I=l.graphHandler;null!=I&&(null==I.first&&I.start(v,0,0,g),null!=I.first&&(v=g=0,37==Q?g=-d:38==
+Q?v=-d:39==Q?g=d:40==Q&&(v=d),I.currentDx+=g*B,I.currentDy+=v*B,I.checkPreview(),I.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=I.first){var D=I.roundLength(I.currentDx/B),N=I.roundLength(I.currentDy/B);I.moveCells(I.cells,D,N);I.reset()}},400))}}}}var k=this,l=this.editor.graph,C=new mxKeyHandler(l),p=C.isEventIgnored;C.isEventIgnored=function(Q){return!(mxEvent.isShiftDown(Q)&&9==Q.keyCode)&&(!this.isControlDown(Q)||mxEvent.isShiftDown(Q)||90!=Q.keyCode&&
+89!=Q.keyCode&&188!=Q.keyCode&&190!=Q.keyCode&&85!=Q.keyCode)&&(66!=Q.keyCode&&73!=Q.keyCode||!this.isControlDown(Q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(Q){return!mxEvent.isConsumed(Q)&&this.isGraphEvent(Q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(Q){return mxEvent.isControlDown(Q)||mxClient.IS_MAC&&Q.metaKey};var E=null,M={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=C.getFunction;mxKeyHandler.prototype.getFunction=function(Q){if(l.isEnabled()){if(mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){var d=k.actions.get(k.altShiftActions[Q.keyCode]);if(null!=d)return d.funct}if(null!=M[Q.keyCode]&&!l.isSelectionEmpty())if(!this.isControlDown(Q)&&mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){if(l.model.isVertex(l.getSelectionCell()))return function(){var f=l.connectVertex(l.getSelectionCell(),M[Q.keyCode],
+l.defaultEdgeLength,Q,!0);null!=f&&0<f.length&&(1==f.length&&l.model.isEdge(f[0])?l.setSelectionCell(l.model.getTerminal(f[0],!1)):l.setSelectionCell(f[f.length-1]),l.scrollCellToVisible(l.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(l.view.getState(l.getSelectionCell())))}}else return this.isControlDown(Q)?function(){e(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null,!0)}:function(){e(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null)}}return S.apply(this,arguments)};C.bindAction=mxUtils.bind(this,
+function(Q,d,f,g){var v=this.actions.get(f);null!=v&&(f=function(){v.isEnabled()&&v.funct.apply(this,arguments)},d?g?C.bindControlShiftKey(Q,f):C.bindControlKey(Q,f):g?C.bindShiftKey(Q,f):C.bindKey(Q,f))});var H=this,K=C.escape;C.escape=function(Q){K.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){l.exitGroup()});C.bindControlShiftKey(35,function(){l.enterGroup()});C.bindShiftKey(36,function(){l.home()});C.bindKey(35,function(){l.refresh()});C.bindAction(107,!0,"zoomIn");
+C.bindAction(109,!0,"zoomOut");C.bindAction(80,!0,"print");C.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)C.bindControlKey(36,function(){l.isEnabled()&&l.foldCells(!0)}),C.bindControlKey(35,function(){l.isEnabled()&&l.foldCells(!1)}),C.bindControlKey(13,function(){H.ctrlEnter()}),C.bindAction(8,!1,"delete"),C.bindAction(8,!0,"deleteAll"),C.bindAction(8,!1,"deleteLabels",!0),C.bindAction(46,!1,"delete"),C.bindAction(46,!0,"deleteAll"),C.bindAction(46,!1,"deleteLabels",
+!0),C.bindAction(36,!1,"resetView"),C.bindAction(72,!0,"fitWindow",!0),C.bindAction(74,!0,"fitPage"),C.bindAction(74,!0,"fitTwoPages",!0),C.bindAction(48,!0,"customZoom"),C.bindAction(82,!0,"turn"),C.bindAction(82,!0,"clearDefaultStyle",!0),C.bindAction(83,!0,"save"),C.bindAction(83,!0,"saveAs",!0),C.bindAction(65,!0,"selectAll"),C.bindAction(65,!0,"selectNone",!0),C.bindAction(73,!0,"selectVertices",!0),C.bindAction(69,!0,"selectEdges",!0),C.bindAction(69,!0,"editStyle"),C.bindAction(66,!0,"bold"),
+C.bindAction(66,!0,"toBack",!0),C.bindAction(70,!0,"toFront",!0),C.bindAction(68,!0,"duplicate"),C.bindAction(68,!0,"setAsDefaultStyle",!0),C.bindAction(90,!0,"undo"),C.bindAction(89,!0,"autosize",!0),C.bindAction(88,!0,"cut"),C.bindAction(67,!0,"copy"),C.bindAction(86,!0,"paste"),C.bindAction(71,!0,"group"),C.bindAction(77,!0,"editData"),C.bindAction(71,!0,"grid",!0),C.bindAction(73,!0,"italic"),C.bindAction(76,!0,"lockUnlock"),C.bindAction(76,!0,"layers",!0),C.bindAction(80,!0,"format",!0),C.bindAction(85,
+!0,"underline"),C.bindAction(85,!0,"ungroup",!0),C.bindAction(190,!0,"superscript"),C.bindAction(188,!0,"subscript"),C.bindAction(13,!1,"keyPressEnter"),C.bindKey(113,function(){l.isEnabled()&&l.startEditingAtCell()});mxClient.IS_WIN?C.bindAction(89,!0,"redo"):C.bindAction(90,!0,"redo",!0);return C};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),b.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),
-this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var d=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<d.length;b++)null!=d[b]&&null!=d[b].parentNode&&d[b].parentNode.removeChild(d[b])};(function(){var b=[["nbsp","160"],["shy","173"]],d=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var l=0;l<b.length;l++)k=k.replace(new RegExp("&"+b[l][0]+";","g"),"&#"+b[l][1]+";");return d(k)}})();
-Date.prototype.toISOString||function(){function b(d){d=String(d);1===d.length&&(d="0"+d);return d}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,d=function(l){return"function"===typeof l||"[object Function]"===b.call(l)},k=Math.pow(2,53)-1;return function(l){var B=Object(l);if(null==l)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!d(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
-arguments[2])}var M=Number(B.length);M=isNaN(M)?0:0!==M&&isFinite(M)?(0<M?1:-1)*Math.floor(Math.abs(M)):M;M=Math.min(Math.max(M,0),k);for(var S=d(this)?Object(new this(M)):Array(M),H=0,K;H<M;)K=B[H],S[H]=p?"undefined"===typeof E?p(K,H):p.call(E,K,H):K,H+=1;S.length=M;return S}}());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";
+this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var l=0;l<b.length;l++)k=k.replace(new RegExp("&"+b[l][0]+";","g"),"&#"+b[l][1]+";");return e(k)}})();
+Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(l){return"function"===typeof l||"[object Function]"===b.call(l)},k=Math.pow(2,53)-1;return function(l){var C=Object(l);if(null==l)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
+arguments[2])}var M=Number(C.length);M=isNaN(M)?0:0!==M&&isFinite(M)?(0<M?1:-1)*Math.floor(Math.abs(M)):M;M=Math.min(Math.max(M,0),k);for(var S=e(this)?Object(new this(M)):Array(M),H=0,K;H<M;)K=C[H],S[H]=p?"undefined"===typeof E?p(K,H):p.call(E,K,H):K,H+=1;S.length=M;return S}}());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 b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(d){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
+(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
-mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,d,k){return null};
+mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,d,k,l,B,p){mxGraph.call(this,b,d,k,l);this.themes=B||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;d=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<d&&(d=b.indexOf("/",d+2),0<d&&(this.domainUrl=b.substring(0,d)),d=b.lastIndexOf("/"),0<d&&(this.domainPathUrl=b.substring(0,d+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
+Graph=function(b,e,k,l,C,p){mxGraph.call(this,b,e,k,l);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
return null!=L?"1"==L.html||"wrap"==L[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,M=null,S=null,H=null,K=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){L=V.getProperty("event");var R=L.getState();V=this.view.scale;if(!mxEvent.isAltDown(L.getEvent())&&null!=R)if(this.model.isEdge(R.cell))if(E=new mxPoint(L.getGraphX(),L.getGraphY()),K=this.isCellSelected(R.cell),S=R,M=L,null!=R.text&&null!=
R.text.boundingBox&&mxUtils.contains(R.text.boundingBox,L.getGraphX(),L.getGraphY()))H=mxEvent.LABEL_HANDLE;else{var Y=this.selectionCellsHandler.getHandler(R.cell);null!=Y&&null!=Y.bends&&0<Y.bends.length&&(H=Y.getHandleForEvent(L))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(L.getEvent())&&(Y=this.selectionCellsHandler.getHandler(R.cell),null==Y||null==Y.getHandleForEvent(L))){var Z=new mxRectangle(L.getGraphX()-1,L.getGraphY()-1),la=mxEvent.isTouchEvent(L.getEvent())?mxShape.prototype.svgStrokeTolerance-
1:(mxShape.prototype.svgStrokeTolerance+2)/2;Y=la+2;Z.grow(la);if(this.isTableCell(R.cell)&&!this.isCellSelected(R.cell)&&!(mxUtils.contains(R,L.getGraphX()-Y,L.getGraphY()-Y)&&mxUtils.contains(R,L.getGraphX()-Y,L.getGraphY()+Y)&&mxUtils.contains(R,L.getGraphX()+Y,L.getGraphY()+Y)&&mxUtils.contains(R,L.getGraphX()+Y,L.getGraphY()-Y))){var q=this.model.getParent(R.cell);Y=this.model.getParent(q);if(!this.isCellSelected(Y)){la*=V;var F=2*la;if(this.model.getChildAt(Y,0)!=q&&mxUtils.intersects(Z,new mxRectangle(R.x,
@@ -2298,9 +2302,9 @@ this.isOrthogonal(R)&&(V=mxUtils.findNearestSegment(R,V.getGraphX(),V.getGraphY(
(V=1!=L.style.html?mxUtils.htmlEntities(V,!1):L.view.graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;
this.connectionHandler.isValidSource=function(L,V){return!1};this.alternateEdgeStyle="vertical";null==l&&this.loadStylesheet();var Q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=Q.apply(this,arguments);if(this.graph.pageVisible){var V=[],R=this.graph.pageFormat,Y=this.graph.pageScale,Z=R.width*Y;R=R.height*Y;Y=this.graph.view.translate;for(var la=this.graph.view.scale,q=this.graph.getPageLayout(),F=0;F<q.width;F++)V.push(new mxRectangle(((q.x+F)*Z+Y.x)*la,(q.y*
R+Y.y)*la,Z*la,R*la));for(F=1;F<q.height;F++)V.push(new mxRectangle((q.x*Z+Y.x)*la,((q.y+F)*R+Y.y)*la,Z*la,R*la));L=V.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,V){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
-arguments)};var e=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var V=e.apply(this,arguments),R=new mxDictionary,Y=[],Z=0;Z<V.length;Z++){var la=this.graph.isTableCell(L)&&this.graph.isTableCell(V[Z])&&this.graph.isCellSelected(V[Z])?this.graph.model.getParent(V[Z]):this.graph.isTableRow(L)&&this.graph.isTableRow(V[Z])&&this.graph.isCellSelected(V[Z])?V[Z]:this.graph.getCompositeParent(V[Z]);null==la||R.get(la)||(R.put(la,!0),Y.push(la))}return Y};var f=this.graphHandler.start;
+arguments)};var d=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var V=d.apply(this,arguments),R=new mxDictionary,Y=[],Z=0;Z<V.length;Z++){var la=this.graph.isTableCell(L)&&this.graph.isTableCell(V[Z])&&this.graph.isCellSelected(V[Z])?this.graph.model.getParent(V[Z]):this.graph.isTableRow(L)&&this.graph.isTableRow(V[Z])&&this.graph.isCellSelected(V[Z])?V[Z]:this.graph.getCompositeParent(V[Z]);null==la||R.get(la)||(R.put(la,!0),Y.push(la))}return Y};var f=this.graphHandler.start;
this.graphHandler.start=function(L,V,R,Y){var Z=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?Z=!0:L=this.graph.model.getParent(L));Z||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));f.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this);this.getRubberband=function(){return g};
-var v=(new Date).getTime(),y=0,C=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;C.apply(this,arguments);L!=this.currentState?(v=(new Date).getTime(),y=0):y=(new Date).getTime()-v};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<y||(null==this.currentState||
+var v=(new Date).getTime(),x=0,B=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;B.apply(this,arguments);L!=this.currentState?(v=(new Date).getTime(),x=0):x=(new Date).getTime()-v};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<x||(null==this.currentState||
"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&I.apply(this,arguments)};var D=this.isToggleEvent;this.isToggleEvent=function(L){return D.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var N=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(L){return N.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.getEvent())};
var G=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(G=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=G)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var ia=this.click;this.click=function(L){var V=null==L.state&&null!=
L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!V||L.isConsumed())return ia.apply(this,arguments);var R=V?L.sourceState.cell:L.getCell();null!=R&&(R=this.getClickableLinkForCell(R),null!=R&&(this.isCustomLink(R)?this.customLinkClicked(R):this.openLink(R)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var ka=this.tooltipHandler.show;this.tooltipHandler.show=function(){ka.apply(this,arguments);if(null!=
@@ -2313,29 +2317,29 @@ this.initTouch();var ra=this.updateMouseEvent;this.updateMouseEvent=function(L){
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(b){var d=new Graph(document.createElement("div"));d.stylesheet.styles=mxUtils.clone(b.styles);d.resetViewOnRootChange=!1;d.setConnectable(!1);d.gridEnabled=!1;d.autoScroll=!1;d.setTooltips(!1);d.setEnabled(!1);d.container.style.visibility="hidden";d.container.style.position="absolute";d.container.style.overflow="hidden";d.container.style.height="1px";d.container.style.width="1px";return d};
-Graph.createSvgImage=function(b,d,k,l,B){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+d+'px" '+(null!=l&&null!=B?'viewBox="0 0 '+l+" "+B+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,d)};
-Graph.createSvgNode=function(b,d,k,l,B){var p=mxUtils.createXmlDocument(),E=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=B&&(null!=E.style?E.style.backgroundColor=B:E.setAttribute("style","background-color:"+B));null==p.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
-E.setAttribute("width",k+"px");E.setAttribute("height",l+"px");E.setAttribute("viewBox",b+" "+d+" "+k+" "+l);p.appendChild(E);return E};Graph.htmlToPng=function(b,d,k,l){var B=document.createElement("canvas");B.width=d;B.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){B.getContext("2d").drawImage(p,0,0);l(B.toDataURL())});p.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(b){for(var d=0,k=[],l=0;l<b.length;l++){var B=b.charCodeAt(l);(32<=B||9==B||10==B||13==B)&&65535!=B&&65534!=B||(k.push(b.substring(d,l)),d=l+1)}0<d&&d<b.length&&k.push(b.substring(d));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var d=Array(b.length),k=0;k<b.length;k++)d[k]=b.charCodeAt(k);return d};Graph.bytesToString=function(b){for(var d=Array(b.length),k=0;k<b.length;k++)d[k]=String.fromCharCode(b[k]);return d.join("")};
-Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(d,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(d){return"%"+("00"+d.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,d){b=mxUtils.getXml(b);return Graph.compress(d?b:Graph.zapGremlins(b))};
-Graph.arrayBufferToString=function(b){var d="";b=new Uint8Array(b);for(var k=b.byteLength,l=0;l<k;l++)d+=String.fromCharCode(b[l]);return d};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(d){return d.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(b,d,k){var l=d.charCodeAt(0),B=1,p=-1;for(k=k||0;k<b.byteLength;k++)if(b[k]==l){p=k;break}for(k=p+1;-1<p&&k<b.byteLength&&k<p+d.length-1;k++){if(b[k]!=d.charCodeAt(B))return Graph.arrayBufferIndexOfString(b,d,p+1);B++}return B==d.length-1?p:-1};Graph.compress=function(b,d){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=d?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
-Graph.decompress=function(b,d,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));d=decodeURIComponent(d?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?d:Graph.zapGremlins(d)};
-Graph.fadeNodes=function(b,d,k,l,B){B=null!=B?B:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,d);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+B+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=l&&l()},B)},0)};Graph.removeKeys=function(b,d){for(var k in b)d(k)&&delete b[k]};
-Graph.setTransitionForNodes=function(b,d){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",d)};Graph.setOpacityForNodes=function(b,d){for(var k=0;k<b.length;k++)b[k].style.opacity=d};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
-Graph.sanitizeHtml=function(b,d){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var d=document.createElement("a");d.setAttribute("href",b);Graph.sanitizeNode(d);return d.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};
-DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(b,d){"svg"==b.nodeName&&"content"==d.attrName&&(d.forceKeepAttr=!0);return b});Graph.domPurify=function(b,d){window.DOM_PURIFY_CONFIG.IN_PLACE=d;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(b,d){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),B=l.indexOf("<svg");if(0<=B){k.innerHTML=Graph.sanitizeHtml(l.substring(B));var p=k.getElementsByTagName("svg");if(0<p.length){if(d||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{l=d=
-1;var E=p[0].getAttribute("width"),M=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;M=null!=M&&"%"!=M.charAt(M.length-1)?parseFloat(M):NaN;var S=p[0].getAttribute("viewBox");if(null!=S&&!isNaN(E)&&!isNaN(M)){var H=S.split(" ");4<=S.length&&(d=parseFloat(H[2])/E,l=parseFloat(H[3])/M)}var K=p[0].getBBox();0<K.width&&0<K.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",K.x+" "+K.y+" "+K.width+" "+K.height),k.getElementsByTagName("svg")[0].setAttribute("width",
-K.width/d),k.getElementsByTagName("svg")[0].setAttribute("height",K.height/l))}catch(Q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(Q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
-Graph.createRemoveIcon=function(b,d){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",d);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
+Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};
+Graph.createSvgImage=function(b,e,k,l,C){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=l&&null!=C?'viewBox="0 0 '+l+" "+C+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)};
+Graph.createSvgNode=function(b,e,k,l,C){var p=mxUtils.createXmlDocument(),E=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=C&&(null!=E.style?E.style.backgroundColor=C:E.setAttribute("style","background-color:"+C));null==p.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
+E.setAttribute("width",k+"px");E.setAttribute("height",l+"px");E.setAttribute("viewBox",b+" "+e+" "+k+" "+l);p.appendChild(E);return E};Graph.htmlToPng=function(b,e,k,l){var C=document.createElement("canvas");C.width=e;C.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){C.getContext("2d").drawImage(p,0,0);l(C.toDataURL())});p.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(b){for(var e=0,k=[],l=0;l<b.length;l++){var C=b.charCodeAt(l);(32<=C||9==C||10==C||13==C)&&65535!=C&&65534!=C||(k.push(b.substring(e,l)),e=l+1)}0<e&&e<b.length&&k.push(b.substring(e));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=b.charCodeAt(k);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=String.fromCharCode(b[k]);return e.join("")};
+Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};
+Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var k=b.byteLength,l=0;l<k;l++)e+=String.fromCharCode(b[l]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(b,e,k){var l=e.charCodeAt(0),C=1,p=-1;for(k=k||0;k<b.byteLength;k++)if(b[k]==l){p=k;break}for(k=p+1;-1<p&&k<b.byteLength&&k<p+e.length-1;k++){if(b[k]!=e.charCodeAt(C))return Graph.arrayBufferIndexOfString(b,e,p+1);C++}return C==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
+Graph.decompress=function(b,e,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?e:Graph.zapGremlins(e)};
+Graph.fadeNodes=function(b,e,k,l,C){C=null!=C?C:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+C+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=l&&l()},C)},0)};Graph.removeKeys=function(b,e){for(var k in b)e(k)&&delete b[k]};
+Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var k=0;k<b.length;k++)b[k].style.opacity=e};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
+Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};
+DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(b,e){"svg"==b.nodeName&&"content"==e.attrName&&(e.forceKeepAttr=!0);return b});Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
+Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),C=l.indexOf("<svg");if(0<=C){k.innerHTML=Graph.sanitizeHtml(l.substring(C));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{l=e=
+1;var E=p[0].getAttribute("width"),M=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;M=null!=M&&"%"!=M.charAt(M.length-1)?parseFloat(M):NaN;var S=p[0].getAttribute("viewBox");if(null!=S&&!isNaN(E)&&!isNaN(M)){var H=S.split(" ");4<=S.length&&(e=parseFloat(H[2])/E,l=parseFloat(H[3])/M)}var K=p[0].getBBox();0<K.width&&0<K.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",K.x+" "+K.y+" "+K.width+" "+K.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+K.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",K.height/l))}catch(Q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(Q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
+Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=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.simpleBackgroundColor="#f0f0f0";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(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,l){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var B=k.view.graph.tolerance,p=!0,E=null,M=mxUtils.bind(this,function(K){p=!0;E=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K))}),S=mxUtils.bind(this,function(K){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(K))<B&&Math.abs(E.y-mxEvent.getClientY(K))<B}),H=mxUtils.bind(this,function(K){if(p)for(var Q=mxEvent.getSource(K);null!=
-Q&&Q!=l.node;){if("a"==Q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,Q,K);break}Q=Q.parentNode}});mxEvent.addGestureListeners(l.node,M,S,H);mxEvent.addListener(l.node,"click",function(K){mxEvent.consume(K)})};if(null!=this.tooltipHandler){var d=this.tooltipHandler.init;this.tooltipHandler.init=function(){d.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var l=mxEvent.getSource(k);"A"==l.nodeName&&(l=l.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,l){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,E=null,M=mxUtils.bind(this,function(K){p=!0;E=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K))}),S=mxUtils.bind(this,function(K){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(K))<C&&Math.abs(E.y-mxEvent.getClientY(K))<C}),H=mxUtils.bind(this,function(K){if(p)for(var Q=mxEvent.getSource(K);null!=
+Q&&Q!=l.node;){if("a"==Q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,Q,K);break}Q=Q.parentNode}});mxEvent.addGestureListeners(l.node,M,S,H);mxEvent.addListener(l.node,"click",function(K){mxEvent.consume(K)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var l=mxEvent.getSource(k);"A"==l.nodeName&&(l=l.getAttribute("href"),null!=
l&&this.graph.isCustomLink(l)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(l)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,l){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||
@@ -2345,86 +2349,86 @@ function(E){for(var M={},S=0;S<E.length;S++){var H=this.view.getState(E[S]);this
0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),M=this.getCellStyle(E),M=parseInt(mxUtils.getValue(M,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==M)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(M=0;M<this.model.getChildCount(E);M++){var S=this.model.getChildAt(E,M);if(this.isCellEditable(S)){E=S;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,M,S){S=null!=S?S:Graph.pasteStyles;
Graph.removeKeys(E,function(H){return 0>mxUtils.indexOf(S,H)});this.updateCellStyles(E,M)};Graph.prototype.updateCellStyles=function(E,M){this.model.beginUpdate();try{for(var S=0;S<M.length;S++)if(this.model.isVertex(M[S])||this.model.isEdge(M[S])){var H=this.getCellStyle(M[S],!1),K;for(K in E){var Q=E[K];H[K]!=Q&&this.setCellStyles(K,Q,[M[S]])}}}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(E,M,S,H,K,Q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,M=M/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,M,S,H,K,Q){H=null!=H?H:!0;K=null!=K?K:!0;
-null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var e=this.model.getChildCount(S)-1;0<=e;e--){var f=this.model.getChildAt(S,e),g=this.getScaledCellAt(E,M,f,H,K,Q);if(null!=g)return g;if(this.isCellVisible(f)&&(K&&this.model.isEdge(f)||H&&this.model.isVertex(f))&&(g=this.view.getState(f),null!=g&&(null==Q||!Q(g,E,M))&&this.intersects(g,E,M)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
+null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var d=this.model.getChildCount(S)-1;0<=d;d--){var f=this.model.getChildAt(S,d),g=this.getScaledCellAt(E,M,f,H,K,Q);if(null!=g)return g;if(this.isCellVisible(f)&&(K&&this.model.isEdge(f)||H&&this.model.isVertex(f))&&(g=this.view.getState(f),null!=g&&(null==Q||!Q(g,E,M))&&this.intersects(g,E,M)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var M=this.getCellGeometry(E);null!=M&&M.relative;)E=this.getModel().getParent(E),M=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var M=
new mxDictionary,S=[],H=0;H<E.length;H++){var K=this.getCompositeParent(E[H]);this.isTableCell(K)&&(K=this.graph.model.getParent(K));this.isTableRow(K)&&(K=this.graph.model.getParent(K));null==K||M.get(K)||(M.put(K,!0),S.push(K))}return S};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var M=this.model.getParent(E);if(!this.model.isVertex(M))break;E=M}return E};Graph.prototype.filterSelectionCells=function(E){var M=this.getSelectionCells();if(null!=E){for(var S=[],H=0;H<M.length;H++)E(M[H])||
S.push(M[H]);M=S}return M};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var M=this.currentScale,S=this.currentTranslate;E=new mxRectangle((E.x+2*S.x)*M-S.x,(E.y+2*S.y)*M-S.y,E.width*M,E.height*M)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;
-if(this.graph.useCssTransforms){var M=this.graph.currentTranslate,S=this.graph.currentScale;E=new mxRectangle((E.x+M.x)*S,(E.y+M.y)*S,E.width*S,E.height*S)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var d=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){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);d.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 k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var M=[],S=0;S<E.length;S++)this.isTableRow(E[S])||this.isTableCell(E[S])||M.push(E[S]);return M};var l=
+if(this.graph.useCssTransforms){var M=this.graph.currentTranslate,S=this.graph.currentScale;E=new mxRectangle((E.x+M.x)*S,(E.y+M.y)*S,E.width*S,E.height*S)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){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);e.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 k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var M=[],S=0;S<E.length;S++)this.isTableRow(E[S])||this.isTableCell(E[S])||M.push(E[S]);return M};var l=
mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=l.apply(this,arguments);for(var M=[],S=0;S<E.length;S++)this.isTable(E[S])||this.isTableRow(E[S])||this.isTableCell(E[S])||M.push(E[S]);return M};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var M=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;E.setAttribute("transform",
-"scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");M!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var B=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,M=this.scale,S=this.translate;
-E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);B.apply(this,arguments);E&&(this.scale=M,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.useCssTransforms,K=this.view.scale,Q=this.view.translate;H&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);H&&(this.view.scale=K,this.view.translate=Q,this.useCssTransforms=!0)}})();
-Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,d,k){var l=d.getAttribute("href");l!=Graph.sanitizeLink(l)&&Graph.sanitizeNode(d);if(null!=l&&!this.isCustomLink(l)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(l)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(l),b);mxEvent.consume(k)}};
-Graph.prototype.openLink=function(b,d,k){var l=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==d&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top){var B=b.split("#")[1];window.location.hash=="#"+B&&(window.location.hash="");window.location.hash=B}else l=window.open(b,null!=d?d:"_blank"),null==l||k||(l.opener=null)}catch(p){}return l};
+"scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");M!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,M=this.scale,S=this.translate;
+E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);E&&(this.scale=M,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.useCssTransforms,K=this.view.scale,Q=this.view.translate;H&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);H&&(this.view.scale=K,this.view.translate=Q,this.useCssTransforms=!0)}})();
+Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){var l=e.getAttribute("href");l!=Graph.sanitizeLink(l)&&Graph.sanitizeNode(e);if(null!=l&&!this.isCustomLink(l)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(l)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(l),b);mxEvent.consume(k)}};
+Graph.prototype.openLink=function(b,e,k){var l=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var C=b.split("#")[1];window.location.hash=="#"+C&&(window.location.hash="");window.location.hash=C}else l=window.open(b,null!=e?e:"_blank"),null==l||k||(l.opener=null)}catch(p){}return l};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,d){var k=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(d!=mxEvent.BEGIN_UPDATE||this.hasLayout(k,d))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return d=new mxStackLayout(this.graph,!0),d.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
-"1"),d.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),d.spacing=b.stackSpacing||d.spacing,d.border=b.stackBorder||d.border,d.marginLeft=b.marginLeft||0,d.marginRight=b.marginRight||0,d.marginTop=b.marginTop||0,d.marginBottom=b.marginBottom||0,d.allowGaps=b.allowGaps||0,d.fill=!0,d.allowGaps&&(d.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),d;if("treeLayout"==
-b.childLayout)return d=new mxCompactTreeLayout(this.graph),d.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.groupPadding=mxUtils.getValue(b,"parentPadding",20),d.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),d.maintainParentLocation=!0,d.edgeRouting=!1,d.resetEdges=!1,d;if("flowLayout"==b.childLayout)return d=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),d.resizeParent=
-"1"==mxUtils.getValue(b,"resizeParent","1"),d.parentBorder=mxUtils.getValue(b,"parentPadding",20),d.maintainParentLocation=!0,d.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),d.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),d.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),d.parallelEdgeSpacing=mxUtils.getValue(b,
-"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),d;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(l){null!=window.console&&console.error(l)}}return null}};
-Graph.prototype.createLayouts=function(b){for(var d=[],k=0;k<b.length;k++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[k].layout)){var l=new window[b[k].layout](this);if(null!=b[k].config)for(var B in b[k].config)l[B]=b[k].config[B];d.push(l)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[k].layout]));return d};
-Graph.prototype.getDataForCells=function(b){for(var d=[],k=0;k<b.length;k++){var l=null!=b[k].value?b[k].value.attributes:null,B={};B.id=b[k].id;if(null!=l)for(var p=0;p<l.length;p++)B[l[p].nodeName]=l[p].nodeValue;else B.label=this.convertValueToString(b[k]);d.push(B)}return d};
-Graph.prototype.getNodesForCells=function(b){for(var d=[],k=0;k<b.length;k++){var l=this.view.getState(b[k]);if(null!=l){for(var B=this.cellRenderer.getShapesForState(l),p=0;p<B.length;p++)null!=B[p]&&null!=B[p].node&&d.push(B[p].node);null!=l.control&&null!=l.control.node&&d.push(l.control.node)}}return d};
-Graph.prototype.createWipeAnimations=function(b,d){for(var k=[],l=0;l<b.length;l++){var B=this.view.getState(b[l]);null!=B&&null!=B.shape&&(this.model.isEdge(B.cell)&&null!=B.absolutePoints&&1<B.absolutePoints.length?k.push(this.createEdgeWipeAnimation(B,d)):this.model.isVertex(B.cell)&&null!=B.shape.bounds&&k.push(this.createVertexWipeAnimation(B,d)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,d){var k=b.absolutePoints.slice(),l=b.segments,B=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,M){if(null!=b.shape){var S=[k[0]];M=E/M;d||(M=1-M);for(var H=B*M,K=1;K<p;K++)if(H<=l[K-1]){S.push(new mxPoint(k[K-1].x+(k[K].x-k[K-1].x)*H/l[K-1],k[K-1].y+(k[K].y-k[K-1].y)*H/l[K-1]));break}else H-=l[K-1],S.push(k[K]);b.shape.points=S;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=M)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),d?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,d){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(l,B){null!=b.shape&&(B=l/B,d||(B=1-B),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*B,k.height),b.shape.redraw(),0==l&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=B))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),d?1:0))})}};Graph.prototype.executeAnimations=function(b,d,k,l){k=null!=k?k:30;l=null!=l?l:30;var B=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(B);for(var M=0;M<b.length;M++)b[M].stop();null!=d&&d()}else for(M=0;M<b.length;M++)b[M].execute(p,k);p++});B=window.setInterval(E,l);E()};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,e){var k=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(e!=mxEvent.BEGIN_UPDATE||this.hasLayout(k,e))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return e=new mxStackLayout(this.graph,!0),e.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
+"1"),e.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),e.spacing=b.stackSpacing||e.spacing,e.border=b.stackBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.allowGaps=b.allowGaps||0,e.fill=!0,e.allowGaps&&(e.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),e;if("treeLayout"==
+b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.groupPadding=mxUtils.getValue(b,"parentPadding",20),e.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==b.childLayout)return e=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent=
+"1"==mxUtils.getValue(b,"resizeParent","1"),e.parentBorder=mxUtils.getValue(b,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(b,
+"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(l){null!=window.console&&console.error(l)}}return null}};
+Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[k].layout)){var l=new window[b[k].layout](this);if(null!=b[k].config)for(var C in b[k].config)l[C]=b[k].config[C];e.push(l)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[k].layout]));return e};
+Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var l=null!=b[k].value?b[k].value.attributes:null,C={};C.id=b[k].id;if(null!=l)for(var p=0;p<l.length;p++)C[l[p].nodeName]=l[p].nodeValue;else C.label=this.convertValueToString(b[k]);e.push(C)}return e};
+Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var l=this.view.getState(b[k]);if(null!=l){for(var C=this.cellRenderer.getShapesForState(l),p=0;p<C.length;p++)null!=C[p]&&null!=C[p].node&&e.push(C[p].node);null!=l.control&&null!=l.control.node&&e.push(l.control.node)}}return e};
+Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],l=0;l<b.length;l++){var C=this.view.getState(b[l]);null!=C&&null!=C.shape&&(this.model.isEdge(C.cell)&&null!=C.absolutePoints&&1<C.absolutePoints.length?k.push(this.createEdgeWipeAnimation(C,e)):this.model.isVertex(C.cell)&&null!=C.shape.bounds&&k.push(this.createVertexWipeAnimation(C,e)))}return k};
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),l=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,M){if(null!=b.shape){var S=[k[0]];M=E/M;e||(M=1-M);for(var H=C*M,K=1;K<p;K++)if(H<=l[K-1]){S.push(new mxPoint(k[K-1].x+(k[K].x-k[K-1].x)*H/l[K-1],k[K-1].y+(k[K].y-k[K-1].y)*H/l[K-1]));break}else H-=l[K-1],S.push(k[K]);b.shape.points=S;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=M)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
+Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(l,C){null!=b.shape&&(C=l/C,e||(C=1-C),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*C,k.height),b.shape.redraw(),0==l&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=C))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,l){k=null!=k?k:30;l=null!=l?l:30;var C=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var M=0;M<b.length;M++)b[M].stop();null!=e&&e()}else for(M=0;M<b.length;M++)b[M].execute(p,k);p++});C=window.setInterval(E,l);E()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),d=this.getGraphBounds();if(0==d.width||0==d.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(d.x/this.view.scale-this.view.translate.x)/b.width),l=Math.floor(Math.ceil(d.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,l,Math.ceil((Math.floor((d.x+d.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((d.y+d.height)/this.view.scale)-this.view.translate.y)/b.height)-
-l)};Graph.prototype.sanitizeHtml=function(b,d){return Graph.sanitizeHtml(b,d)};Graph.prototype.updatePlaceholders=function(){var b=!1,d;for(d in this.model.cells){var k=this.model.cells[d];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),l=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,l,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
+l)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(b){return Graph.zoomWheel&&!mxEvent.isShiftDown(b)&&!mxEvent.isMetaDown(b)&&!mxEvent.isAltDown(b)&&(!mxEvent.isControlDown(b)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(b)||mxEvent.isControlDown(b))};Graph.prototype.isScrollWheelEvent=function(b){return!this.isZoomWheelEvent(b)};Graph.prototype.isTransparentClickEvent=function(b){return mxEvent.isAltDown(b)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};
-Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var d=!1;null!=b&&(b=this.getCurrentCellStyle(b),d="1"==mxUtils.getValue(b,"ignoreEdge","0"));return d};Graph.prototype.isSplitTarget=function(b,d,k){return!this.model.isEdge(d[0])&&!mxEvent.isAltDown(k)&&!mxEvent.isShiftDown(k)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
-Graph.prototype.getLabel=function(b){var d=mxGraph.prototype.getLabel.apply(this,arguments);null!=d&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(d=this.replacePlaceholders(b,d));return d};Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(d,"labelMovable","0")))};
-Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var d=this.getLinkForCell(b);if(null!=d)return d;b=this.model.getParent(b)}while(null!=b);return null};
-Graph.prototype.getGlobalVariable=function(b){var d=null;"date"==b?d=(new Date).toLocaleDateString():"time"==b?d=(new Date).toLocaleTimeString():"timestamp"==b?d=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),d=this.formatDate(new Date,b));return d};
-Graph.prototype.formatDate=function(b,d,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var l=this.dateFormatCache,B=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(C,I){C=String(C);for(I=I||2;C.length<I;)C="0"+C;return C};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(d=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");d=String(l.masks[d]||d||l.masks["default"]);"UTC:"==d.slice(0,4)&&(d=d.slice(4),k=!0);var M=k?"getUTC":"get",S=b[M+"Date"](),H=b[M+"Day"](),K=b[M+"Month"](),Q=b[M+"FullYear"](),e=b[M+"Hours"](),f=b[M+"Minutes"](),g=b[M+"Seconds"]();M=b[M+"Milliseconds"]();var v=k?0:b.getTimezoneOffset(),y={d:S,dd:E(S),ddd:l.i18n.dayNames[H],dddd:l.i18n.dayNames[H+7],m:K+1,mm:E(K+1),mmm:l.i18n.monthNames[K],mmmm:l.i18n.monthNames[K+
-12],yy:String(Q).slice(2),yyyy:Q,h:e%12||12,hh:E(e%12||12),H:e,HH:E(e),M:f,MM:E(f),s:g,ss:E(g),l:E(M,3),L:E(99<M?Math.round(M/10):M),t:12>e?"a":"p",tt:12>e?"am":"pm",T:12>e?"A":"P",TT:12>e?"AM":"PM",Z:k?"UTC":(String(b).match(B)||[""]).pop().replace(p,""),o:(0<v?"-":"+")+E(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return d.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in y?y[C]:C.slice(1,
-C.length-1)})};Graph.prototype.getLayerForCells=function(b){var d=null;if(0<b.length){for(d=b[0];!this.model.isLayer(d);)d=this.model.getParent(d);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(d,b[k])){d=null;break}}return d};
-Graph.prototype.createLayersDialog=function(b,d){var k=document.createElement("div");k.style.position="absolute";for(var l=this.getModel(),B=l.getChildCount(l.root),p=0;p<B;p++)mxUtils.bind(this,function(E){function M(){l.isVisible(E)?(K.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(H,75)):(K.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(H,25))}var S=this.convertValueToString(E)||mxResources.get("background")||"Background",H=document.createElement("div");H.style.overflow=
-"hidden";H.style.textOverflow="ellipsis";H.style.padding="2px";H.style.whiteSpace="nowrap";H.style.cursor="pointer";H.setAttribute("title",mxResources.get(l.isVisible(E)?"hideIt":"show",[S]));var K=document.createElement("img");K.setAttribute("draggable","false");K.setAttribute("align","absmiddle");K.setAttribute("border","0");K.style.position="relative";K.style.width="16px";K.style.padding="0px 6px 0 4px";d&&(K.style.filter="invert(100%)",K.style.top="-2px");H.appendChild(K);mxUtils.write(H,S);k.appendChild(H);
+Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var e=!1;null!=b&&(b=this.getCurrentCellStyle(b),e="1"==mxUtils.getValue(b,"ignoreEdge","0"));return e};Graph.prototype.isSplitTarget=function(b,e,k){return!this.model.isEdge(e[0])&&!mxEvent.isAltDown(k)&&!mxEvent.isShiftDown(k)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
+Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this,arguments);null!=e&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(e=this.replacePlaceholders(b,e));return e};Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(e,"labelMovable","0")))};
+Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
+Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
+Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var l=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(B,I){B=String(B);for(I=I||2;B.length<I;)B="0"+B;return B};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(l.masks[e]||e||l.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var M=k?"getUTC":"get",S=b[M+"Date"](),H=b[M+"Day"](),K=b[M+"Month"](),Q=b[M+"FullYear"](),d=b[M+"Hours"](),f=b[M+"Minutes"](),g=b[M+"Seconds"]();M=b[M+"Milliseconds"]();var v=k?0:b.getTimezoneOffset(),x={d:S,dd:E(S),ddd:l.i18n.dayNames[H],dddd:l.i18n.dayNames[H+7],m:K+1,mm:E(K+1),mmm:l.i18n.monthNames[K],mmmm:l.i18n.monthNames[K+
+12],yy:String(Q).slice(2),yyyy:Q,h:d%12||12,hh:E(d%12||12),H:d,HH:E(d),M:f,MM:E(f),s:g,ss:E(g),l:E(M,3),L:E(99<M?Math.round(M/10):M),t:12>d?"a":"p",tt:12>d?"am":"pm",T:12>d?"A":"P",TT:12>d?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<v?"-":"+")+E(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(B){return B in x?x[B]:B.slice(1,
+B.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var l=this.getModel(),C=l.getChildCount(l.root),p=0;p<C;p++)mxUtils.bind(this,function(E){function M(){l.isVisible(E)?(K.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(H,75)):(K.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(H,25))}var S=this.convertValueToString(E)||mxResources.get("background")||"Background",H=document.createElement("div");H.style.overflow=
+"hidden";H.style.textOverflow="ellipsis";H.style.padding="2px";H.style.whiteSpace="nowrap";H.style.cursor="pointer";H.setAttribute("title",mxResources.get(l.isVisible(E)?"hideIt":"show",[S]));var K=document.createElement("img");K.setAttribute("draggable","false");K.setAttribute("align","absmiddle");K.setAttribute("border","0");K.style.position="relative";K.style.width="16px";K.style.padding="0px 6px 0 4px";e&&(K.style.filter="invert(100%)",K.style.top="-2px");H.appendChild(K);mxUtils.write(H,S);k.appendChild(H);
mxEvent.addListener(H,"click",function(){l.setVisible(E,!l.isVisible(E));M();null!=b&&b(E)});M()})(l.getChildAt(l.root,p));return k};
-Graph.prototype.replacePlaceholders=function(b,d,k,l){l=[];if(null!=d){for(var B=0;match=this.placeholderPattern.exec(d);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>B&&"%"==d.charAt(match.index-1))E=p.substring(1);else{var M=p.substring(1,p.length-1);if("id"==M)E=b.id;else if(0>M.indexOf("{"))for(var S=b;null==E&&null!=S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=S.getAttribute(M+"_"+Graph.diagramLanguage)),
-null==E&&(E=S.hasAttribute(M)?null!=S.getAttribute(M)?S.getAttribute(M):"":null)),S=this.model.getParent(S);null==E&&(E=this.getGlobalVariable(M));null==E&&null!=k&&(E=k[M])}l.push(d.substring(B,match.index)+(null!=E?E:p));B=match.index+p.length}}l.push(d.substring(B))}return l.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var d=[],k=0;k<b.length;k++){var l=this.model.getCell(b[k].id);null!=l&&d.push(l)}this.setSelectionCells(d)}else this.clearSelection()};
-Graph.prototype.selectCellForEvent=function(b,d){mxEvent.isShiftDown(d)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,d){var k=!1;if(this.isTableCell(b)&&this.isTableCell(d)){var l=this.model.getParent(b),B=this.model.getParent(l),p=this.model.getParent(d);if(B==this.model.getParent(p)){b=l.getIndex(b);l=B.getIndex(l);var E=p.getIndex(d),M=B.getIndex(p);p=Math.max(l,M);d=Math.min(b,E);b=Math.max(b,E);E=[];for(l=Math.min(l,M);l<=p;l++){M=this.model.getChildAt(B,l);for(var S=d;S<=b;S++)E.push(this.model.getChildAt(M,S))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
+Graph.prototype.replacePlaceholders=function(b,e,k,l){l=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>C&&"%"==e.charAt(match.index-1))E=p.substring(1);else{var M=p.substring(1,p.length-1);if("id"==M)E=b.id;else if(0>M.indexOf("{"))for(var S=b;null==E&&null!=S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=S.getAttribute(M+"_"+Graph.diagramLanguage)),
+null==E&&(E=S.hasAttribute(M)?null!=S.getAttribute(M)?S.getAttribute(M):"":null)),S=this.model.getParent(S);null==E&&(E=this.getGlobalVariable(M));null==E&&null!=k&&(E=k[M])}l.push(e.substring(C,match.index)+(null!=E?E:p));C=match.index+p.length}}l.push(e.substring(C))}return l.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var l=this.model.getCell(b[k].id);null!=l&&e.push(l)}this.setSelectionCells(e)}else this.clearSelection()};
+Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
+Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var l=this.model.getParent(b),C=this.model.getParent(l),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=l.getIndex(b);l=C.getIndex(l);var E=p.getIndex(e),M=C.getIndex(p);p=Math.max(l,M);e=Math.min(b,E);b=Math.max(b,E);E=[];for(l=Math.min(l,M);l<=p;l++){M=this.model.getChildAt(C,l);for(var S=e;S<=b;S++)E.push(this.model.getChildAt(M,S))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),k=!0)}}return k};
-Graph.prototype.snapCellsToGrid=function(b,d){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var l=b[k],B=this.getCellGeometry(l);if(null!=B){B=B.clone();if(this.getModel().isVertex(l))B.x=Math.round(B.x/d)*d,B.y=Math.round(B.y/d)*d,B.width=Math.round(B.width/d)*d,B.height=Math.round(B.height/d)*d;else if(this.getModel().isEdge(l)&&null!=B.points)for(var p=0;p<B.points.length;p++)B.points[p].x=Math.round(B.points[p].x/d)*d,B.points[p].y=Math.round(B.points[p].y/d)*d;this.getModel().setGeometry(l,
-B)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,d,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(d)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
-Graph.prototype.isCloneConnectSource=function(b){var d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=d&&d.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,d,k,l,B,p,E,M){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),H=S?b:this.getCompositeParent(b),K=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(H.geometry.x,H.geometry.y);d==mxConstants.DIRECTION_NORTH?(K.x+=H.geometry.width/2,K.y-=k):d==
-mxConstants.DIRECTION_SOUTH?(K.x+=H.geometry.width/2,K.y+=H.geometry.height+k):(K.x=d==mxConstants.DIRECTION_WEST?K.x-k:K.x+(H.geometry.width+k),K.y+=H.geometry.height/2);var Q=this.view.getState(this.model.getParent(b));k=this.view.scale;var e=this.view.translate;H=e.x*k;e=e.y*k;null!=Q&&this.model.isVertex(Q.cell)&&(H=Q.x,e=Q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(K.x+=b.parent.geometry.x,K.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(H+K.x*k,e+K.y*k)).grow(40*k);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;Q=this.view.getState(b);var f=null,g=null;if(null!=p){p=p.reverse();for(var v=0;v<p.length;v++)if(!this.isCellLocked(p[v])&&!this.model.isEdge(p[v])&&p[v]!=b)if(!this.model.isAncestor(b,p[v])&&this.isContainer(p[v])&&(null==f||p[v]==this.model.getParent(b)))f=p[v];else if(null==g&&this.isCellConnectable(p[v])&&!this.model.isAncestor(p[v],b)&&!this.isSwimlane(p[v])){var y=this.view.getState(p[v]);null==Q||null==y||mxUtils.intersects(Q,y)||(g=p[v])}}var C=
-!mxEvent.isShiftDown(l)||mxEvent.isControlDown(l)||B;C&&("1"!=urlParams.sketch||B)&&(d==mxConstants.DIRECTION_NORTH?K.y-=b.geometry.height/2:d==mxConstants.DIRECTION_SOUTH?K.y+=b.geometry.height/2:K.x=d==mxConstants.DIRECTION_WEST?K.x-b.geometry.width/2:K.x+b.geometry.width/2);var I=[],D=g;g=f;B=mxUtils.bind(this,function(N){if(null==E||null!=N||null==g&&S){this.model.beginUpdate();try{if(null==D&&C){var G=this.getAbsoluteParent(null!=N?N:b);G=S?b:this.getCompositeParent(G);D=null!=N?N:this.duplicateCells([G],
-!1)[0];null!=N&&this.addCells([D],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(D);null!=ia&&(null!=N&&"1"==urlParams.sketch&&(d==mxConstants.DIRECTION_NORTH?K.y-=ia.height/2:d==mxConstants.DIRECTION_SOUTH?K.y+=ia.height/2:K.x=d==mxConstants.DIRECTION_WEST?K.x-ia.width/2:K.x+ia.width/2),ia.x=K.x-ia.width/2,ia.y=K.y-ia.height/2);null!=f?(this.addCells([D],f,null,null,null,!0),g=null):C&&!S&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var ka=mxEvent.isControlDown(l)&&
-mxEvent.isShiftDown(l)&&C||null==g&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,D,this.createCurrentEdgeStyle());if(null!=ka&&this.connectionHandler.insertBeforeSource){var ja=null;for(N=b;null!=N.parent&&null!=N.geometry&&N.geometry.relative&&N.parent!=ka.parent;)N=this.model.getParent(N);null!=N&&null!=N.parent&&N.parent==ka.parent&&(ja=N.parent.getIndex(N),this.model.add(N.parent,ka,ja))}null==g&&null!=D&&null!=b.parent&&S&&d==mxConstants.DIRECTION_WEST&&(ja=b.parent.getIndex(b),this.model.add(b.parent,
-D,ja));null!=ka&&I.push(ka);null==g&&null!=D&&I.push(D);null==D&&null!=ka&&ka.geometry.setTerminalPoint(K,!1);null!=ka&&this.fireEvent(new mxEventObject("cellsInserted","cells",[ka]))}finally{this.model.endUpdate()}}if(null!=M)M(I);else return I});if(null==E||null!=D||!C||null==g&&S)return B(D);E(H+K.x*k,e+K.y*k,B)};
-Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var d=document.createElement("div"),k=[],l,B=0;B<b.length;B++)if(l=b[B],this.model.isVertex(l)||this.model.isEdge(l))this.isHtmlLabel(l)?(d.innerHTML=Graph.sanitizeHtml(this.getLabel(l)),l=mxUtils.extractTextWithWhitespace([d])):l=this.getLabel(l),l=mxUtils.trim(l.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<l.length&&k.push(l);return k.join(" ")};
-Graph.prototype.convertValueToString=function(b){var d=this.model.getValue(b);if(null!=d&&"object"==typeof d){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){d=b.getAttribute("placeholder");for(var l=b;null==k&&null!=l;)null!=l.value&&"object"==typeof l.value&&(k=l.hasAttribute(d)?null!=l.getAttribute(d)?l.getAttribute(d):"":null),l=this.model.getParent(l)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=d.getAttribute("label_"+Graph.diagramLanguage)),
-null==k&&(k=d.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
-Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,d){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
-Graph.prototype.updateHorizontalStyle=function(b,d){if(null!=b&&null!=d&&null!=this.layoutManager){var k=this.model.getParent(b);this.model.isVertex(k)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(k),null!=b&&b.constructor==mxStackLayout&&(d[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return d};
-Graph.prototype.replaceDefaultColors=function(b,d){if(null!=d){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(d,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(d,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BACKGROUND,
-b,k);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return d};Graph.prototype.replaceDefaultColor=function(b,d,k,l){null!=b&&"default"==b[d]&&null!=k&&(b[d]=this.getDefaultColor(b,d,k,l))};Graph.prototype.getDefaultColor=function(b,d,k,l){d="default"+d.charAt(0).toUpperCase()+d.substring(1);"invert"==b[d]&&(k=l);return k};
-Graph.prototype.updateAlternateBounds=function(b,d,k){if(null!=b&&null!=d&&null!=this.layoutManager&&null!=d.alternateBounds){var l=this.layoutManager.getLayout(this.model.getParent(b));null!=l&&l.constructor==mxStackLayout&&(l.horizontal?d.alternateBounds.height=0:d.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,d){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(d.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,d,k,l,B){d=null!=d?d:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),M=this.getCellGeometry(k[p]);if(null!=E&&null!=M){var S=Math.round(M.width-E.width/this.view.scale),H=Math.round(M.height-E.height/this.view.scale);if(0!=H||0!=S){var K=this.model.getParent(k[p]),Q=this.layoutManager.getLayout(K);
-null==Q?null!=B&&this.isMoveCellsEvent(B,E)&&this.moveSiblings(E,K,S,H):null!=B&&mxEvent.isAltDown(B)||Q.constructor!=mxStackLayout||Q.resizeLast||this.resizeParentStacks(K,Q,S,H)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
-Graph.prototype.moveSiblings=function(b,d,k,l){this.model.beginUpdate();try{var B=this.getCellsBeyond(b.x,b.y,d,!0,!0);for(d=0;d<B.length;d++)if(B[d]!=b.cell){var p=this.view.getState(B[d]),E=this.getCellGeometry(B[d]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(l*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(B[d],E))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,d,k,l){if(null!=this.layoutManager&&null!=d&&d.constructor==mxStackLayout&&!d.resizeLast){this.model.beginUpdate();try{for(var B=d.horizontal;null!=b&&null!=d&&d.constructor==mxStackLayout&&d.horizontal==B&&!d.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),d.horizontal?p.width+=k+Math.min(0,E.width/this.view.scale-p.width):p.height+=l+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b,
-p));b=this.model.getParent(b);d=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var d=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=d.container:"1"==d.container};Graph.prototype.isCellConnectable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.connectable?"0"!=d.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
-Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.movableLabel?"0"!=d.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,d,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(b,d,k){var l=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(l)&&(l=null);return l};Graph.prototype.isCellFoldable=function(b){var d=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(d,mxConstants.STYLE_RESIZABLE,"1")&&("1"==d.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=d.collapsible||!this.isContainer(b)&&"1"==d.collapsible))};
-Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,d){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
+Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var l=b[k],C=this.getCellGeometry(l);if(null!=C){C=C.clone();if(this.getModel().isVertex(l))C.x=Math.round(C.x/e)*e,C.y=Math.round(C.y/e)*e,C.width=Math.round(C.width/e)*e,C.height=Math.round(C.height/e)*e;else if(this.getModel().isEdge(l)&&null!=C.points)for(var p=0;p<C.points.length;p++)C.points[p].x=Math.round(C.points[p].x/e)*e,C.points[p].y=Math.round(C.points[p].y/e)*e;this.getModel().setGeometry(l,
+C)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
+Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
+Graph.prototype.connectVertex=function(b,e,k,l,C,p,E,M){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),H=S?b:this.getCompositeParent(b),K=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(H.geometry.x,H.geometry.y);e==mxConstants.DIRECTION_NORTH?(K.x+=H.geometry.width/2,K.y-=k):e==
+mxConstants.DIRECTION_SOUTH?(K.x+=H.geometry.width/2,K.y+=H.geometry.height+k):(K.x=e==mxConstants.DIRECTION_WEST?K.x-k:K.x+(H.geometry.width+k),K.y+=H.geometry.height/2);var Q=this.view.getState(this.model.getParent(b));k=this.view.scale;var d=this.view.translate;H=d.x*k;d=d.y*k;null!=Q&&this.model.isVertex(Q.cell)&&(H=Q.x,d=Q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(K.x+=b.parent.geometry.x,K.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(H+K.x*k,d+K.y*k)).grow(40*k);p=null!=p?
+this.getCells(0,0,0,0,null,null,p,null,!0):null;Q=this.view.getState(b);var f=null,g=null;if(null!=p){p=p.reverse();for(var v=0;v<p.length;v++)if(!this.isCellLocked(p[v])&&!this.model.isEdge(p[v])&&p[v]!=b)if(!this.model.isAncestor(b,p[v])&&this.isContainer(p[v])&&(null==f||p[v]==this.model.getParent(b)))f=p[v];else if(null==g&&this.isCellConnectable(p[v])&&!this.model.isAncestor(p[v],b)&&!this.isSwimlane(p[v])){var x=this.view.getState(p[v]);null==Q||null==x||mxUtils.intersects(Q,x)||(g=p[v])}}var B=
+!mxEvent.isShiftDown(l)||mxEvent.isControlDown(l)||C;B&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?K.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?K.y+=b.geometry.height/2:K.x=e==mxConstants.DIRECTION_WEST?K.x-b.geometry.width/2:K.x+b.geometry.width/2);var I=[],D=g;g=f;C=mxUtils.bind(this,function(N){if(null==E||null!=N||null==g&&S){this.model.beginUpdate();try{if(null==D&&B){var G=this.getAbsoluteParent(null!=N?N:b);G=S?b:this.getCompositeParent(G);D=null!=N?N:this.duplicateCells([G],
+!1)[0];null!=N&&this.addCells([D],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(D);null!=ia&&(null!=N&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?K.y-=ia.height/2:e==mxConstants.DIRECTION_SOUTH?K.y+=ia.height/2:K.x=e==mxConstants.DIRECTION_WEST?K.x-ia.width/2:K.x+ia.width/2),ia.x=K.x-ia.width/2,ia.y=K.y-ia.height/2);null!=f?(this.addCells([D],f,null,null,null,!0),g=null):B&&!S&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var ka=mxEvent.isControlDown(l)&&
+mxEvent.isShiftDown(l)&&B||null==g&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,D,this.createCurrentEdgeStyle());if(null!=ka&&this.connectionHandler.insertBeforeSource){var ja=null;for(N=b;null!=N.parent&&null!=N.geometry&&N.geometry.relative&&N.parent!=ka.parent;)N=this.model.getParent(N);null!=N&&null!=N.parent&&N.parent==ka.parent&&(ja=N.parent.getIndex(N),this.model.add(N.parent,ka,ja))}null==g&&null!=D&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST&&(ja=b.parent.getIndex(b),this.model.add(b.parent,
+D,ja));null!=ka&&I.push(ka);null==g&&null!=D&&I.push(D);null==D&&null!=ka&&ka.geometry.setTerminalPoint(K,!1);null!=ka&&this.fireEvent(new mxEventObject("cellsInserted","cells",[ka]))}finally{this.model.endUpdate()}}if(null!=M)M(I);else return I});if(null==E||null!=D||!B||null==g&&S)return C(D);E(H+K.x*k,d+K.y*k,C)};
+Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],l,C=0;C<b.length;C++)if(l=b[C],this.model.isVertex(l)||this.model.isEdge(l))this.isHtmlLabel(l)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(l)),l=mxUtils.extractTextWithWhitespace([e])):l=this.getLabel(l),l=mxUtils.trim(l.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<l.length&&k.push(l);return k.join(" ")};
+Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var l=b;null==k&&null!=l;)null!=l.value&&"object"==typeof l.value&&(k=l.hasAttribute(e)?null!=l.getAttribute(e)?l.getAttribute(e):"":null),l=this.model.getParent(l)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
+null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
+Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,e){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
+Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=this.layoutManager){var k=this.model.getParent(b);this.model.isVertex(k)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(k),null!=b&&b.constructor==mxStackLayout&&(e[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return e};
+Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,
+b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,l){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,l))};Graph.prototype.getDefaultColor=function(b,e,k,l){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=l);return k};
+Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var l=this.layoutManager.getLayout(this.model.getParent(b));null!=l&&l.constructor==mxStackLayout&&(l.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
+Graph.prototype.foldCells=function(b,e,k,l,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),M=this.getCellGeometry(k[p]);if(null!=E&&null!=M){var S=Math.round(M.width-E.width/this.view.scale),H=Math.round(M.height-E.height/this.view.scale);if(0!=H||0!=S){var K=this.model.getParent(k[p]),Q=this.layoutManager.getLayout(K);
+null==Q?null!=C&&this.isMoveCellsEvent(C,E)&&this.moveSiblings(E,K,S,H):null!=C&&mxEvent.isAltDown(C)||Q.constructor!=mxStackLayout||Q.resizeLast||this.resizeParentStacks(K,Q,S,H)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
+Graph.prototype.moveSiblings=function(b,e,k,l){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),E=this.getCellGeometry(C[e]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(l*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],E))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,e,k,l){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,E.width/this.view.scale-p.width):p.height+=l+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b,
+p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)};
+Graph.prototype.getSwimlaneAt=function(b,e,k){var l=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(l)&&(l=null);return l};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))};
+Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,e){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(b,d){d=null!=d?d:10;var k=this.container.clientWidth-d,l=this.container.clientHeight-d,B=Math.floor(20*Math.min(k/b.width,l/b.height))/20;this.zoomTo(B);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*B-Math.max((l-b.height*B)/2+d/2,0);this.container.scrollLeft=(b.x+p.x)*B-Math.max((k-b.width*B)/2+d/2,0)}};
-Graph.prototype.getTooltipForCell=function(b){var d="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),d=Graph.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var l=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var B=0;B<b.length;B++)(Graph.translateDiagram&&
-"label"==b[B].nodeName||0>mxUtils.indexOf(k,b[B].nodeName))&&0<b[B].nodeValue.length&&l.push({name:b[B].nodeName,value:b[B].nodeValue});l.sort(function(p,E){return p.name<E.name?-1:p.name>E.name?1:0});for(B=0;B<l.length;B++)"link"==l[B].name&&this.isCustomLink(l[B].value)||(d+=("link"!=l[B].name?"<b>"+mxUtils.htmlEntities(l[B].name)+":</b> ":"")+mxUtils.htmlEntities(l[B].value)+"\n");0<d.length&&(d=d.substring(0,d.length-1),mxClient.IS_SVG&&(d='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
-d+"</div>"))}}return d};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var d=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(d);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
-Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,d){return Graph.compress(b,d)};
-Graph.prototype.decompress=function(b,d){return Graph.decompress(b,d)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
+Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var k=this.container.clientWidth-e,l=this.container.clientHeight-e,C=Math.floor(20*Math.min(k/b.width,l/b.height))/20;this.zoomTo(C);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*C-Math.max((l-b.height*C)/2+e/2,0);this.container.scrollLeft=(b.x+p.x)*C-Math.max((k-b.width*C)/2+e/2,0)}};
+Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=Graph.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var l=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var C=0;C<b.length;C++)(Graph.translateDiagram&&
+"label"==b[C].nodeName||0>mxUtils.indexOf(k,b[C].nodeName))&&0<b[C].nodeValue.length&&l.push({name:b[C].nodeName,value:b[C].nodeValue});l.sort(function(p,E){return p.name<E.name?-1:p.name>E.name?1:0});for(C=0;C<l.length;C++)"link"==l[C].name&&this.isCustomLink(l[C].value)||(e+=("link"!=l[C].name?"<b>"+mxUtils.htmlEntities(l[C].name)+":</b> ":"")+mxUtils.htmlEntities(l[C].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
+e+"</div>"))}}return e};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
+Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)};
+Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
@@ -2433,216 +2437,216 @@ IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUC
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"),mxConstants.DIRECTION_NORTH);this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"),mxConstants.DIRECTION_EAST);this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"),mxConstants.DIRECTION_SOUTH);this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"),mxConstants.DIRECTION_WEST);this.elts=[this.arrowUp,this.arrowRight,
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(k){null!=k.relatedTarget&&
-mxEvent.getSource(k)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(k){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(k){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(k.getEvent())||this.graph.model.isVertex(k.getCell())||this.reset()});var d=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(k,
-l){d=!1;k=l.getEvent();this.isResetEvent(k)?this.reset():this.isActive()||(l=this.getState(l.getState()),null==l&&mxEvent.isTouchEvent(k)||this.update(l));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(k,l){k=l.getEvent();this.isResetEvent(k)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(k)||this.update(this.getState(l.getState()),l.getGraphX(),l.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(d=!0)}),mouseUp:mxUtils.bind(this,
-function(k,l){k=l.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(k),mxEvent.getClientY(k));this.isResetEvent(k)?this.reset():this.isActive()&&!d&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),l):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(l.getGraphX(),l.getGraphY())))):mxEvent.isTouchEvent(k)||null!=
-this.bbox&&mxUtils.contains(this.bbox,l.getGraphX(),l.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(k)||this.reset();d=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,d){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
-HoverIcons.prototype.createArrow=function(b,d,k){var l=null;l=mxUtils.createImage(b.src);l.style.width=b.width+"px";l.style.height=b.height+"px";l.style.padding=this.tolerance+"px";null!=d&&l.setAttribute("title",d);l.style.position="absolute";l.style.cursor=this.cssCursor;mxEvent.addGestureListeners(l,mxUtils.bind(this,function(B){null==this.currentState||this.isResetEvent(B)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(B),mxEvent.getClientY(B)),this.drag(B,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=l,this.setDisplay("none"),mxEvent.consume(B))}));mxEvent.redirectMouseEvents(l,this.graph,this.currentState);mxEvent.addListener(l,"mouseenter",mxUtils.bind(this,function(B){mxEvent.isMouseEvent(B)&&(null!=this.activeArrow&&this.activeArrow!=l&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(l,100),this.activeArrow=l,this.fireEvent(new mxEventObject("focus",
-"arrow",l,"direction",k,"event",B)))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(B){mxEvent.isMouseEvent(B)&&this.fireEvent(new mxEventObject("blur","arrow",l,"direction",k,"event",B));this.graph.isMouseDown||this.resetActiveArrow()}));return l};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
-HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var d=0;d<this.elts.length;d++)null!=this.elts[d]&&b(this.elts[d])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
-HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(d){d.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
-HoverIcons.prototype.drag=function(b,d,k){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,d,k),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=d&&d.setHandlesVisible(!1),d=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=d&&"orthogonalEdgeStyle"===
-mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),d.cell.style=mxUtils.setStyle(d.cell.style,"sourcePortConstraint",b),d.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,d,k){return this.graph.view.getState(this.graph.getCellAt(d,k))};
-HoverIcons.prototype.click=function(b,d,k){var l=k.getEvent(),B=k.getGraphX(),p=k.getGraphY();B=this.getStateAt(b,B,p);null==B||!this.graph.model.isEdge(B.cell)||this.graph.isCloneEvent(l)||B.getVisibleTerminalState(!0)!=b&&B.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,d,k):(this.graph.setSelectionCell(B.cell),this.reset());k.consume()};
-HoverIcons.prototype.execute=function(b,d,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,d,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
+mxEvent.getSource(k)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(k){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(k){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(k.getEvent())||this.graph.model.isVertex(k.getCell())||this.reset()});var e=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(k,
+l){e=!1;k=l.getEvent();this.isResetEvent(k)?this.reset():this.isActive()||(l=this.getState(l.getState()),null==l&&mxEvent.isTouchEvent(k)||this.update(l));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(k,l){k=l.getEvent();this.isResetEvent(k)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(k)||this.update(this.getState(l.getState()),l.getGraphX(),l.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(e=!0)}),mouseUp:mxUtils.bind(this,
+function(k,l){k=l.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(k),mxEvent.getClientY(k));this.isResetEvent(k)?this.reset():this.isActive()&&!e&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),l):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(l.getGraphX(),l.getGraphY())))):mxEvent.isTouchEvent(k)||null!=
+this.bbox&&mxUtils.contains(this.bbox,l.getGraphX(),l.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(k)||this.reset();e=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,e){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
+HoverIcons.prototype.createArrow=function(b,e,k){var l=null;l=mxUtils.createImage(b.src);l.style.width=b.width+"px";l.style.height=b.height+"px";l.style.padding=this.tolerance+"px";null!=e&&l.setAttribute("title",e);l.style.position="absolute";l.style.cursor=this.cssCursor;mxEvent.addGestureListeners(l,mxUtils.bind(this,function(C){null==this.currentState||this.isResetEvent(C)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(C),mxEvent.getClientY(C)),this.drag(C,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=l,this.setDisplay("none"),mxEvent.consume(C))}));mxEvent.redirectMouseEvents(l,this.graph,this.currentState);mxEvent.addListener(l,"mouseenter",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&(null!=this.activeArrow&&this.activeArrow!=l&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(l,100),this.activeArrow=l,this.fireEvent(new mxEventObject("focus",
+"arrow",l,"direction",k,"event",C)))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&this.fireEvent(new mxEventObject("blur","arrow",l,"direction",k,"event",C));this.graph.isMouseDown||this.resetActiveArrow()}));return l};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var e=0;e<this.elts.length;e++)null!=this.elts[e]&&b(this.elts[e])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
+HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(e){e.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
+HoverIcons.prototype.drag=function(b,e,k){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,e,k),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=e&&e.setHandlesVisible(!1),e=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=e&&"orthogonalEdgeStyle"===
+mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),e.cell.style=mxUtils.setStyle(e.cell.style,"sourcePortConstraint",b),e.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,e,k){return this.graph.view.getState(this.graph.getCellAt(e,k))};
+HoverIcons.prototype.click=function(b,e,k){var l=k.getEvent(),C=k.getGraphX(),p=k.getGraphY();C=this.getStateAt(b,C,p);null==C||!this.graph.model.isEdge(C.cell)||this.graph.isCloneEvent(l)||C.getVisibleTerminalState(!0)!=b&&C.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,e,k):(this.graph.setSelectionCell(C.cell),this.reset());k.consume()};
+HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
-var d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(d=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=d&&(b.x-=d.horizontalOffset/2,b.y-=d.verticalOffset/2,b.width+=d.horizontalOffset,b.height+=d.verticalOffset,null!=d.rotationShape&&null!=d.rotationShape.node&&"hidden"!=d.rotationShape.node.style.visibility&&"none"!=d.rotationShape.node.style.display&&null!=d.rotationShape.boundingBox&&
-(k=d.rotationShape.boundingBox));d=mxUtils.bind(this,function(M,S,H){if(null!=k){var K=new mxRectangle(S,H,M.clientWidth,M.clientHeight);mxUtils.intersects(K,k)&&(M==this.arrowUp?H-=K.y+K.height-k.y:M==this.arrowRight?S+=k.x+k.width-K.x:M==this.arrowDown?H+=k.y+k.height-K.y:M==this.arrowLeft&&(S-=K.x+K.width-k.x))}M.style.left=S+"px";M.style.top=H+"px";mxUtils.setOpacity(M,this.inactiveOpacity)});d(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
-this.triangleUp.height-this.tolerance));d(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));d(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));d(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){d=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var l=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),B=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=d&&d==l&&l==B&&B==b&&(b=B=l=d=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(M,S){var H=this.graph.model.isVertex(M)&&this.graph.getCellGeometry(M);null==M||this.graph.model.isAncestor(M,
-this.currentState.cell)||this.graph.isSwimlane(M)||!(null==H||null==p||H.height<3*p.height&&H.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});E(d,this.arrowRight);E(l,this.arrowLeft);E(B,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(M,S,H){if(null!=k){var K=new mxRectangle(S,H,M.clientWidth,M.clientHeight);mxUtils.intersects(K,k)&&(M==this.arrowUp?H-=K.y+K.height-k.y:M==this.arrowRight?S+=k.x+k.width-K.x:M==this.arrowDown?H+=k.y+k.height-K.y:M==this.arrowLeft&&(S-=K.x+K.width-k.x))}M.style.left=S+"px";M.style.top=H+"px";mxUtils.setOpacity(M,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
+var l=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==l&&l==C&&C==b&&(b=C=l=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(M,S){var H=this.graph.model.isVertex(M)&&this.graph.getCellGeometry(M);null==M||this.graph.model.isAncestor(M,
+this.currentState.cell)||this.graph.isSwimlane(M)||!(null==H||null==p||H.height<3*p.height&&H.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});E(e,this.arrowRight);E(l,this.arrowLeft);E(C,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
-HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(d){null!=d.parentNode&&(d=new mxRectangle(d.offsetLeft,d.offsetTop,d.offsetWidth,d.offsetHeight),null==b?b=d:b.add(d))});return b};
-HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var d=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(d)&&this.graph.isCellConnectable(d)&&(b=d)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
-HoverIcons.prototype.update=function(b,d,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var l=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,l=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
-window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,d,k))}),this.updateDelay+10))):null!=this.startTime&&(l=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&l<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,d,k)?this.reset(!1):(null!=this.currentState||l>this.activationDelay)&&this.currentState!=b&&(l>this.updateDelay&&null!=
-b||null==this.bbox||null==d||null==k||!mxUtils.contains(this.bbox,d,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,d,k,l,B){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(d),M=this.getCellGeometry(E);null!=M&&(M.x+=p*l,M.y+=p*B);b.insert(E)}return b};
-Graph.prototype.createTable=function(b,d,k,l,B,p,E,M,S){k=null!=k?k:60;l=null!=l?l:40;p=null!=p?p:30;M=null!=M?M:"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;";S=null!=S?S:"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!=B?B:"",0,0,d*k,b*l+(null!=B?p:0),null!=E?E:"shape=table;startSize="+(null!=B?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,d*k,l,M),this.createVertex(null,null,"",0,0,k,l,S),d,k,0),b,0,l)};
-Graph.prototype.setTableValues=function(b,d,k){for(var l=this.model.getChildCells(b,!0),B=0;B<l.length;B++)if(null!=k&&(l[B].value=k[B]),null!=d)for(var p=this.model.getChildCells(l[B],!0),E=0;E<p.length;E++)null!=d[B][E]&&(p[E].value=d[B][E]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,d,k,l,B,p,E,M,S){k=null!=k?k:120;l=null!=l?l:120;E=null!=E?E:"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;";M=null!=M?M:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";B=this.createVertex(null,null,null!=B?B:"",0,0,d*k,b*l,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==B?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(B),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);B.geometry.width+=p;B.geometry.height+=p;E=this.createVertex(null,
-null,"",0,p,d*k+p,l,E);B.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,l,M),d,k,0));return 1<b?(E.geometry.y=l+p,this.createParent(B,this.createParent(E,this.createVertex(null,null,"",p,0,k,l,S),d,k,0),b-1,0,l)):B};
-Graph.prototype.visitTableCells=function(b,d){var k=null,l=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var B=0;B<l.length;B++){for(var p=this.getActualStartSize(l[B],!0),E=this.model.getChildCells(l[B],!0),M=this.getCellStyle(l[B],!0),S=null,H=[],K=0;K<E.length;K++){var Q=this.getCellGeometry(E[K]),e={cell:E[K],rospan:1,colspan:1,row:B,col:K,geo:Q};Q=null!=Q.alternateBounds?Q.alternateBounds:Q;e.point=new mxPoint(Q.width+(null!=S?S.point.x:b.x+p.x),Q.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+p.y));e.actual=e;null!=k&&null!=k[K]&&1<k[K].rowspan?(e.rowspan=k[K].rowspan-1,e.colspan=k[K].colspan,e.actual=k[K].actual):null!=S&&1<S.colspan?(e.rowspan=S.rowspan,e.colspan=S.colspan-1,e.actual=S.actual):(S=this.getCurrentCellStyle(E[K],!0),null!=S&&(e.rowspan=parseInt(S.rowspan||1),e.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(M,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(M,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;d(e,E.length,
-l.length,b.x+(S?p.x:0),b.y+(S?p.y:0));H.push(e);S=e}k=H}};Graph.prototype.getTableLines=function(b,d,k){var l=[],B=[];(d||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,M,S,H){d&&p.row<M-1&&(null==l[p.row]&&(l[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&l[p.row].push(null),l[p.row].push(p.point));k&&p.col<E-1&&(null==B[p.col]&&(B[p.col]=[new mxPoint(p.point.x,H)]),1<p.colspan&&B[p.col].push(null),B[p.col].push(p.point))}));return l.concat(B)};
+HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
+HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
+HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var l=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,l=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
+window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(l=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&l<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||l>this.activationDelay)&&this.currentState!=b&&(l>this.updateDelay&&null!=
+b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,l,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(e),M=this.getCellGeometry(E);null!=M&&(M.x+=p*l,M.y+=p*C);b.insert(E)}return b};
+Graph.prototype.createTable=function(b,e,k,l,C,p,E,M,S){k=null!=k?k:60;l=null!=l?l:40;p=null!=p?p:30;M=null!=M?M:"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;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=C?C:"",0,0,e*k,b*l+(null!=C?p:0),null!=E?E:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,l,M),this.createVertex(null,null,"",0,0,k,l,S),e,k,0),b,0,l)};
+Graph.prototype.setTableValues=function(b,e,k){for(var l=this.model.getChildCells(b,!0),C=0;C<l.length;C++)if(null!=k&&(l[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(l[C],!0),E=0;E<p.length;E++)null!=e[C][E]&&(p[E].value=e[C][E]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,l,C,p,E,M,S){k=null!=k?k:120;l=null!=l?l:120;E=null!=E?E:"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;";M=null!=M?M:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*l,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;E=this.createVertex(null,
+null,"",0,p,e*k+p,l,E);C.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,l,M),e,k,0));return 1<b?(E.geometry.y=l+p,this.createParent(C,this.createParent(E,this.createVertex(null,null,"",p,0,k,l,S),e,k,0),b-1,0,l)):C};
+Graph.prototype.visitTableCells=function(b,e){var k=null,l=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<l.length;C++){for(var p=this.getActualStartSize(l[C],!0),E=this.model.getChildCells(l[C],!0),M=this.getCellStyle(l[C],!0),S=null,H=[],K=0;K<E.length;K++){var Q=this.getCellGeometry(E[K]),d={cell:E[K],rospan:1,colspan:1,row:C,col:K,geo:Q};Q=null!=Q.alternateBounds?Q.alternateBounds:Q;d.point=new mxPoint(Q.width+(null!=S?S.point.x:b.x+p.x),Q.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+p.y));d.actual=d;null!=k&&null!=k[K]&&1<k[K].rowspan?(d.rowspan=k[K].rowspan-1,d.colspan=k[K].colspan,d.actual=k[K].actual):null!=S&&1<S.colspan?(d.rowspan=S.rowspan,d.colspan=S.colspan-1,d.actual=S.actual):(S=this.getCurrentCellStyle(E[K],!0),null!=S&&(d.rowspan=parseInt(S.rowspan||1),d.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(M,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(M,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(d,E.length,
+l.length,b.x+(S?p.x:0),b.y+(S?p.y:0));H.push(d);S=d}k=H}};Graph.prototype.getTableLines=function(b,e,k){var l=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,M,S,H){e&&p.row<M-1&&(null==l[p.row]&&(l[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&l[p.row].push(null),l[p.row].push(p.point));k&&p.col<E-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,H)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return l.concat(C)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,d,k){k=null!=k?k:!0;var l=this.getModel();l.beginUpdate();try{var B=this.getCellGeometry(b);if(null!=B){B=B.clone();B.height+=d;l.setGeometry(b,B);var p=l.getParent(b),E=l.getChildCells(p,!0);if(!k){var M=mxUtils.indexOf(E,b);if(M<E.length-1){var S=E[M+1],H=this.getCellGeometry(S);null!=H&&(H=H.clone(),H.y+=d,H.height-=d,l.setGeometry(S,H))}}var K=this.getCellGeometry(p);null!=K&&(k||(k=b==E[E.length-1]),k&&(K=K.clone(),K.height+=d,l.setGeometry(p,K)))}}finally{l.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,d,k){k=null!=k?k:!1;var l=this.getModel(),B=l.getParent(b),p=l.getParent(B),E=l.getChildCells(B,!0);b=mxUtils.indexOf(E,b);var M=b==E.length-1;l.beginUpdate();try{for(var S=l.getChildCells(p,!0),H=0;H<S.length;H++){B=S[H];E=l.getChildCells(B,!0);var K=E[b],Q=this.getCellGeometry(K);null!=Q&&(Q=Q.clone(),Q.width+=d,null!=Q.alternateBounds&&(Q.alternateBounds.width+=d),l.setGeometry(K,Q));b<E.length-1&&(K=E[b+1],Q=this.getCellGeometry(K),null!=Q&&(Q=Q.clone(),
-Q.x+=d,k||(Q.width-=d,null!=Q.alternateBounds&&(Q.alternateBounds.width-=d)),l.setGeometry(K,Q)))}if(M||k){var e=this.getCellGeometry(p);null!=e&&(e=e.clone(),e.width+=d,l.setGeometry(p,e))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{l.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
-TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,d){for(var k=0,l=0;l<b.length;l++)if(!this.isVertexIgnored(b[l])){var B=this.graph.getCellGeometry(b[l]);null!=B&&(k+=d?B.width:B.height)}return k};
-TableLayout.prototype.getRowLayout=function(b,d){var k=this.graph.model.getChildCells(b,!0),l=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);d=d-l.x-l.width;var B=[];l=l.x;for(var p=0;p<k.length;p++){var E=this.graph.getCellGeometry(k[p]);null!=E&&(l+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*d/b,B.push(Math.round(l)))}return B};
-TableLayout.prototype.layoutRow=function(b,d,k,l){var B=this.graph.getModel(),p=B.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,M=0;null!=d&&(d=d.slice(),d.splice(0,0,b.x));for(var S=0;S<p.length;S++){var H=this.graph.getCellGeometry(p[S]);null!=H&&(H=H.clone(),H.y=b.y,H.height=k-b.y-b.height,null!=d?(H.x=d[S],H.width=d[S+1]-H.x,S==p.length-1&&S<d.length-2&&(H.width=l-H.x-b.x-b.width)):(H.x=E,E+=H.width,S==p.length-1?H.width=l-b.x-b.width-M:M+=H.width),H.alternateBounds=new mxRectangle(0,
-0,H.width,H.height),B.setGeometry(p[S],H))}return M};
-TableLayout.prototype.execute=function(b){if(null!=b){var d=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),l=this.graph.getCellStyle(b),B="1"==mxUtils.getValue(l,"resizeLastRow","0"),p="1"==mxUtils.getValue(l,"resizeLast","0");l="1"==mxUtils.getValue(l,"fixedRows","0");var E=this.graph.getModel(),M=0;E.beginUpdate();try{for(var S=k.height-d.y-d.height,H=k.width-d.x-d.width,K=E.getChildCells(b,!0),Q=0;Q<K.length;Q++)E.setVisible(K[Q],!0);var e=this.getSize(K,!1);if(0<S&&0<H&&0<
-K.length&&0<e){if(B){var f=this.graph.getCellGeometry(K[K.length-1]);null!=f&&(f=f.clone(),f.height=S-e+f.height,E.setGeometry(K[K.length-1],f))}var g=p?null:this.getRowLayout(K[0],H),v=[],y=d.y;for(Q=0;Q<K.length;Q++)f=this.graph.getCellGeometry(K[Q]),null!=f&&(f=f.clone(),f.x=d.x,f.width=H,f.y=Math.round(y),y=B||l?y+f.height:y+f.height/e*S,f.height=Math.round(y)-f.y,E.setGeometry(K[Q],f)),M=Math.max(M,this.layoutRow(K[Q],g,f.height,H,v));l&&S<e&&(k=k.clone(),k.height=y+d.height,E.setGeometry(b,
-k));p&&H<M+Graph.minTableColumnWidth&&(k=k.clone(),k.width=M+d.width+d.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){E.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var I=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=I.width}C.actual.col==C.col&&(I=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=I.height)}}))}else for(Q=0;Q<K.length;Q++)E.setVisible(K[Q],
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var l=this.getModel();l.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;l.setGeometry(b,C);var p=l.getParent(b),E=l.getChildCells(p,!0);if(!k){var M=mxUtils.indexOf(E,b);if(M<E.length-1){var S=E[M+1],H=this.getCellGeometry(S);null!=H&&(H=H.clone(),H.y+=e,H.height-=e,l.setGeometry(S,H))}}var K=this.getCellGeometry(p);null!=K&&(k||(k=b==E[E.length-1]),k&&(K=K.clone(),K.height+=e,l.setGeometry(p,K)))}}finally{l.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var l=this.getModel(),C=l.getParent(b),p=l.getParent(C),E=l.getChildCells(C,!0);b=mxUtils.indexOf(E,b);var M=b==E.length-1;l.beginUpdate();try{for(var S=l.getChildCells(p,!0),H=0;H<S.length;H++){C=S[H];E=l.getChildCells(C,!0);var K=E[b],Q=this.getCellGeometry(K);null!=Q&&(Q=Q.clone(),Q.width+=e,null!=Q.alternateBounds&&(Q.alternateBounds.width+=e),l.setGeometry(K,Q));b<E.length-1&&(K=E[b+1],Q=this.getCellGeometry(K),null!=Q&&(Q=Q.clone(),
+Q.x+=e,k||(Q.width-=e,null!=Q.alternateBounds&&(Q.alternateBounds.width-=e)),l.setGeometry(K,Q)))}if(M||k){var d=this.getCellGeometry(p);null!=d&&(d=d.clone(),d.width+=e,l.setGeometry(p,d))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{l.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,l=0;l<b.length;l++)if(!this.isVertexIgnored(b[l])){var C=this.graph.getCellGeometry(b[l]);null!=C&&(k+=e?C.width:C.height)}return k};
+TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),l=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-l.x-l.width;var C=[];l=l.x;for(var p=0;p<k.length;p++){var E=this.graph.getCellGeometry(k[p]);null!=E&&(l+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*e/b,C.push(Math.round(l)))}return C};
+TableLayout.prototype.layoutRow=function(b,e,k,l){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,M=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<p.length;S++){var H=this.graph.getCellGeometry(p[S]);null!=H&&(H=H.clone(),H.y=b.y,H.height=k-b.y-b.height,null!=e?(H.x=e[S],H.width=e[S+1]-H.x,S==p.length-1&&S<e.length-2&&(H.width=l-H.x-b.x-b.width)):(H.x=E,E+=H.width,S==p.length-1?H.width=l-b.x-b.width-M:M+=H.width),H.alternateBounds=new mxRectangle(0,
+0,H.width,H.height),C.setGeometry(p[S],H))}return M};
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),l=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(l,"resizeLastRow","0"),p="1"==mxUtils.getValue(l,"resizeLast","0");l="1"==mxUtils.getValue(l,"fixedRows","0");var E=this.graph.getModel(),M=0;E.beginUpdate();try{for(var S=k.height-e.y-e.height,H=k.width-e.x-e.width,K=E.getChildCells(b,!0),Q=0;Q<K.length;Q++)E.setVisible(K[Q],!0);var d=this.getSize(K,!1);if(0<S&&0<H&&0<
+K.length&&0<d){if(C){var f=this.graph.getCellGeometry(K[K.length-1]);null!=f&&(f=f.clone(),f.height=S-d+f.height,E.setGeometry(K[K.length-1],f))}var g=p?null:this.getRowLayout(K[0],H),v=[],x=e.y;for(Q=0;Q<K.length;Q++)f=this.graph.getCellGeometry(K[Q]),null!=f&&(f=f.clone(),f.x=e.x,f.width=H,f.y=Math.round(x),x=C||l?x+f.height:x+f.height/d*S,f.height=Math.round(x)-f.y,E.setGeometry(K[Q],f)),M=Math.max(M,this.layoutRow(K[Q],g,f.height,H,v));l&&S<d&&(k=k.clone(),k.height=x+e.height,E.setGeometry(b,
+k));p&&H<M+Graph.minTableColumnWidth&&(k=k.clone(),k.width=M+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(B){E.setVisible(B.cell,B.actual.cell==B.cell);if(B.actual.cell!=B.cell){if(B.actual.row==B.row){var I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo;B.actual.geo.width+=I.width}B.actual.col==B.col&&(I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo,B.actual.geo.height+=I.height)}}))}else for(Q=0;Q<K.length;Q++)E.setVisible(K[Q],
!1)}finally{E.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var d=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(K,Q){Q=null!=Q?Q:!0;var e=this.getState(K);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&!e.invalid&&this.updateLineJumps(e)&&this.graph.cellRenderer.redraw(e,!1,this.isRendering());e=d.apply(this,
-arguments);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var K=this.node.getElementsByTagName("path");if(1<K.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&K[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var Q=this.state.view.graph.getFlowAnimationStyle();null!=Q&&K[1].setAttribute("class",Q.getAttribute("id"))}}};var l=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(K,Q){return l.apply(this,arguments)||null!=K.routedPoints&&null!=Q.routedPoints&&!mxUtils.equalPoints(Q.routedPoints,K.routedPoints)};var B=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(K){B.apply(this,arguments);this.graph.model.isEdge(K.cell)&&1!=K.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(K)};mxGraphView.prototype.updateLineJumps=function(K){var Q=K.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=K.routedPoints,f=null;if(null!=Q&&null!=this.validEdges&&"none"!==mxUtils.getValue(K.style,"jumpStyle","none")){var g=function(pa,ra,L){var V=new mxPoint(ra,L);V.type=pa;f.push(V);V=null!=K.routedPoints?K.routedPoints[f.length-1]:null;return null==V||V.type!=
-pa||V.x!=ra||V.y!=L},v=.5*this.scale;e=!1;f=[];for(var y=0;y<Q.length-1;y++){for(var C=Q[y+1],I=Q[y],D=[],N=Q[y+2];y<Q.length-2&&mxUtils.ptSegDistSq(I.x,I.y,N.x,N.y,C.x,C.y)<1*this.scale*this.scale;)C=N,y++,N=Q[y+2];e=g(0,I.x,I.y)||e;for(var G=0;G<this.validEdges.length;G++){var ia=this.validEdges[G],ka=ia.absolutePoints;if(null!=ka&&mxUtils.intersects(K,ia)&&"1"!=ia.style.noJump)for(ia=0;ia<ka.length-1;ia++){var ja=ka[ia+1],ca=ka[ia];for(N=ka[ia+2];ia<ka.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,N.x,
-N.y,ja.x,ja.y)<1*this.scale*this.scale;)ja=N,ia++,N=ka[ia+2];N=mxUtils.intersection(I.x,I.y,C.x,C.y,ca.x,ca.y,ja.x,ja.y);if(null!=N&&(Math.abs(N.x-I.x)>v||Math.abs(N.y-I.y)>v)&&(Math.abs(N.x-C.x)>v||Math.abs(N.y-C.y)>v)&&(Math.abs(N.x-ca.x)>v||Math.abs(N.y-ca.y)>v)&&(Math.abs(N.x-ja.x)>v||Math.abs(N.y-ja.y)>v)){ja=N.x-I.x;ca=N.y-I.y;N={distSq:ja*ja+ca*ca,x:N.x,y:N.y};for(ja=0;ja<D.length;ja++)if(D[ja].distSq>N.distSq){D.splice(ja,0,N);N=null;break}null==N||0!=D.length&&D[D.length-1].x===N.x&&D[D.length-
-1].y===N.y||D.push(N)}}}for(ia=0;ia<D.length;ia++)e=g(1,D[ia].x,D[ia].y)||e}N=Q[Q.length-1];e=g(0,N.x,N.y)||e}K.routedPoints=f;return e}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(K,Q,e){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,v=mxUtils.getValue(this.style,"jumpStyle","none"),y=!0,C=null,I=null,D=[],N=null;K.begin();for(var G=0;G<this.state.routedPoints.length;G++){var ia=this.state.routedPoints[G],ka=new mxPoint(ia.x/this.scale,ia.y/this.scale);0==G?ka=Q[0]:G==this.state.routedPoints.length-1&&(ka=Q[Q.length-1]);var ja=!1;if(null!=C&&1==ia.type){var ca=this.state.routedPoints[G+1];ia=ca.x/this.scale-
-ka.x;ca=ca.y/this.scale-ka.y;ia=ia*ia+ca*ca;null==N&&(N=new mxPoint(ka.x-C.x,ka.y-C.y),I=Math.sqrt(N.x*N.x+N.y*N.y),0<I?(N.x=N.x*g/I,N.y=N.y*g/I):N=null);ia>g*g&&0<I&&(ia=C.x-ka.x,ca=C.y-ka.y,ia=ia*ia+ca*ca,ia>g*g&&(ja=new mxPoint(ka.x-N.x,ka.y-N.y),ia=new mxPoint(ka.x+N.x,ka.y+N.y),D.push(ja),this.addPoints(K,D,e,f,!1,null,y),D=0>Math.round(N.x)||0==Math.round(N.x)&&0>=Math.round(N.y)?1:-1,y=!1,"sharp"==v?(K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.lineTo(ia.x-N.y*D,ia.y+N.x*D),K.lineTo(ia.x,ia.y)):"line"==
-v?(K.moveTo(ja.x+N.y*D,ja.y-N.x*D),K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.moveTo(ia.x-N.y*D,ia.y+N.x*D),K.lineTo(ia.x+N.y*D,ia.y-N.x*D),K.moveTo(ia.x,ia.y)):"arc"==v?(D*=1.3,K.curveTo(ja.x-N.y*D,ja.y+N.x*D,ia.x-N.y*D,ia.y+N.x*D,ia.x,ia.y)):(K.moveTo(ia.x,ia.y),y=!0),D=[ia],ja=!0))}else N=null;ja||(D.push(ka),C=ka)}this.addPoints(K,D,e,f,!1,null,y);K.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(K,Q,e,f){return null!=Q&&"centerPerimeter"==
-Q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(Q.getCenterX(),Q.getCenterY()):E.apply(this,arguments)};var M=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(K,Q,e,f){if(null==Q||null==K||"1"!=Q.style.snapToPoint&&"1"!=K.style.snapToPoint)M.apply(this,arguments);else{Q=this.getTerminalPort(K,Q,f);var g=this.getNextPoint(K,e,f),v=this.graph.isOrthogonal(K),y=mxUtils.toRadians(Number(Q.style[mxConstants.STYLE_ROTATION]||"0")),C=new mxPoint(Q.getCenterX(),
-Q.getCenterY());if(0!=y){var I=Math.cos(-y),D=Math.sin(-y);g=mxUtils.getRotatedPoint(g,I,D,C)}I=parseFloat(K.style[mxConstants.STYLE_PERIMETER_SPACING]||0);I+=parseFloat(K.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(Q,g,0==y&&v,I);0!=y&&(I=Math.cos(y),D=Math.sin(y),g=mxUtils.getRotatedPoint(g,I,D,C));K.setAbsoluteTerminalPoint(this.snapToAnchorPoint(K,Q,e,f,g),f)}};mxGraphView.prototype.snapToAnchorPoint=function(K,Q,
-e,f,g){if(null!=Q&&null!=K){K=this.graph.getAllConnectionConstraints(Q);f=e=null;if(null!=K)for(var v=0;v<K.length;v++){var y=this.graph.getConnectionPoint(Q,K[v]);if(null!=y){var C=(y.x-g.x)*(y.x-g.x)+(y.y-g.y)*(y.y-g.y);if(null==f||C<f)e=y,f=C}}null!=e&&(g=e)}return g};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(K,Q,e){var f=S.apply(this,arguments);"1"==K.getAttribute("placeholders")&&null!=e.state&&(f=e.state.view.graph.replacePlaceholders(e.state.cell,
-f));return f};var H=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(K){if(null!=K.style&&"undefined"!==typeof pako){var Q=mxUtils.getValue(K.style,mxConstants.STYLE_SHAPE,null);if(null!=Q&&"string"===typeof Q&&"stencil("==Q.substring(0,8))try{var e=Q.substring(8,Q.length-1),f=mxUtils.parseXml(Graph.decompress(e));return new mxShape(new mxStencil(f.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return H.apply(this,arguments)}})();
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(K,Q){Q=null!=Q?Q:!0;var d=this.getState(K);null!=d&&Q&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=e.apply(this,
+arguments);null!=d&&Q&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var K=this.node.getElementsByTagName("path");if(1<K.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&K[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var Q=this.state.view.graph.getFlowAnimationStyle();null!=Q&&K[1].setAttribute("class",Q.getAttribute("id"))}}};var l=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(K,Q){return l.apply(this,arguments)||null!=K.routedPoints&&null!=Q.routedPoints&&!mxUtils.equalPoints(Q.routedPoints,K.routedPoints)};var C=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(K){C.apply(this,arguments);this.graph.model.isEdge(K.cell)&&1!=K.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(K)};mxGraphView.prototype.updateLineJumps=function(K){var Q=K.absolutePoints;if(Graph.lineJumpsEnabled){var d=null!=K.routedPoints,f=null;if(null!=Q&&null!=this.validEdges&&"none"!==mxUtils.getValue(K.style,"jumpStyle","none")){var g=function(pa,ra,L){var V=new mxPoint(ra,L);V.type=pa;f.push(V);V=null!=K.routedPoints?K.routedPoints[f.length-1]:null;return null==V||V.type!=
+pa||V.x!=ra||V.y!=L},v=.5*this.scale;d=!1;f=[];for(var x=0;x<Q.length-1;x++){for(var B=Q[x+1],I=Q[x],D=[],N=Q[x+2];x<Q.length-2&&mxUtils.ptSegDistSq(I.x,I.y,N.x,N.y,B.x,B.y)<1*this.scale*this.scale;)B=N,x++,N=Q[x+2];d=g(0,I.x,I.y)||d;for(var G=0;G<this.validEdges.length;G++){var ia=this.validEdges[G],ka=ia.absolutePoints;if(null!=ka&&mxUtils.intersects(K,ia)&&"1"!=ia.style.noJump)for(ia=0;ia<ka.length-1;ia++){var ja=ka[ia+1],ca=ka[ia];for(N=ka[ia+2];ia<ka.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,N.x,
+N.y,ja.x,ja.y)<1*this.scale*this.scale;)ja=N,ia++,N=ka[ia+2];N=mxUtils.intersection(I.x,I.y,B.x,B.y,ca.x,ca.y,ja.x,ja.y);if(null!=N&&(Math.abs(N.x-I.x)>v||Math.abs(N.y-I.y)>v)&&(Math.abs(N.x-B.x)>v||Math.abs(N.y-B.y)>v)&&(Math.abs(N.x-ca.x)>v||Math.abs(N.y-ca.y)>v)&&(Math.abs(N.x-ja.x)>v||Math.abs(N.y-ja.y)>v)){ja=N.x-I.x;ca=N.y-I.y;N={distSq:ja*ja+ca*ca,x:N.x,y:N.y};for(ja=0;ja<D.length;ja++)if(D[ja].distSq>N.distSq){D.splice(ja,0,N);N=null;break}null==N||0!=D.length&&D[D.length-1].x===N.x&&D[D.length-
+1].y===N.y||D.push(N)}}}for(ia=0;ia<D.length;ia++)d=g(1,D[ia].x,D[ia].y)||d}N=Q[Q.length-1];d=g(0,N.x,N.y)||d}K.routedPoints=f;return d}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(K,Q,d){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,v=mxUtils.getValue(this.style,"jumpStyle","none"),x=!0,B=null,I=null,D=[],N=null;K.begin();for(var G=0;G<this.state.routedPoints.length;G++){var ia=this.state.routedPoints[G],ka=new mxPoint(ia.x/this.scale,ia.y/this.scale);0==G?ka=Q[0]:G==this.state.routedPoints.length-1&&(ka=Q[Q.length-1]);var ja=!1;if(null!=B&&1==ia.type){var ca=this.state.routedPoints[G+1];ia=ca.x/this.scale-
+ka.x;ca=ca.y/this.scale-ka.y;ia=ia*ia+ca*ca;null==N&&(N=new mxPoint(ka.x-B.x,ka.y-B.y),I=Math.sqrt(N.x*N.x+N.y*N.y),0<I?(N.x=N.x*g/I,N.y=N.y*g/I):N=null);ia>g*g&&0<I&&(ia=B.x-ka.x,ca=B.y-ka.y,ia=ia*ia+ca*ca,ia>g*g&&(ja=new mxPoint(ka.x-N.x,ka.y-N.y),ia=new mxPoint(ka.x+N.x,ka.y+N.y),D.push(ja),this.addPoints(K,D,d,f,!1,null,x),D=0>Math.round(N.x)||0==Math.round(N.x)&&0>=Math.round(N.y)?1:-1,x=!1,"sharp"==v?(K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.lineTo(ia.x-N.y*D,ia.y+N.x*D),K.lineTo(ia.x,ia.y)):"line"==
+v?(K.moveTo(ja.x+N.y*D,ja.y-N.x*D),K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.moveTo(ia.x-N.y*D,ia.y+N.x*D),K.lineTo(ia.x+N.y*D,ia.y-N.x*D),K.moveTo(ia.x,ia.y)):"arc"==v?(D*=1.3,K.curveTo(ja.x-N.y*D,ja.y+N.x*D,ia.x-N.y*D,ia.y+N.x*D,ia.x,ia.y)):(K.moveTo(ia.x,ia.y),x=!0),D=[ia],ja=!0))}else N=null;ja||(D.push(ka),B=ka)}this.addPoints(K,D,d,f,!1,null,x);K.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(K,Q,d,f){return null!=Q&&"centerPerimeter"==
+Q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(Q.getCenterX(),Q.getCenterY()):E.apply(this,arguments)};var M=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(K,Q,d,f){if(null==Q||null==K||"1"!=Q.style.snapToPoint&&"1"!=K.style.snapToPoint)M.apply(this,arguments);else{Q=this.getTerminalPort(K,Q,f);var g=this.getNextPoint(K,d,f),v=this.graph.isOrthogonal(K),x=mxUtils.toRadians(Number(Q.style[mxConstants.STYLE_ROTATION]||"0")),B=new mxPoint(Q.getCenterX(),
+Q.getCenterY());if(0!=x){var I=Math.cos(-x),D=Math.sin(-x);g=mxUtils.getRotatedPoint(g,I,D,B)}I=parseFloat(K.style[mxConstants.STYLE_PERIMETER_SPACING]||0);I+=parseFloat(K.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(Q,g,0==x&&v,I);0!=x&&(I=Math.cos(x),D=Math.sin(x),g=mxUtils.getRotatedPoint(g,I,D,B));K.setAbsoluteTerminalPoint(this.snapToAnchorPoint(K,Q,d,f,g),f)}};mxGraphView.prototype.snapToAnchorPoint=function(K,Q,
+d,f,g){if(null!=Q&&null!=K){K=this.graph.getAllConnectionConstraints(Q);f=d=null;if(null!=K)for(var v=0;v<K.length;v++){var x=this.graph.getConnectionPoint(Q,K[v]);if(null!=x){var B=(x.x-g.x)*(x.x-g.x)+(x.y-g.y)*(x.y-g.y);if(null==f||B<f)d=x,f=B}}null!=d&&(g=d)}return g};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(K,Q,d){var f=S.apply(this,arguments);"1"==K.getAttribute("placeholders")&&null!=d.state&&(f=d.state.view.graph.replacePlaceholders(d.state.cell,
+f));return f};var H=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(K){if(null!=K.style&&"undefined"!==typeof pako){var Q=mxUtils.getValue(K.style,mxConstants.STYLE_SHAPE,null);if(null!=Q&&"string"===typeof Q&&"stencil("==Q.substring(0,8))try{var d=Q.substring(8,Q.length-1),f=mxUtils.parseXml(Graph.decompress(d));return new mxShape(new mxStencil(f.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return H.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(b){var d=mxStencilRegistry.stencils[b];if(null==d&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){d=mxStencilRegistry.libraries[k];if(null!=d){if(null==mxStencilRegistry.packages[k]){for(var l=0;l<d.length;l++){var B=d[l];if(!mxStencilRegistry.filesLoaded[B])if(mxStencilRegistry.filesLoaded[B]=!0,".xml"==B.toLowerCase().substring(B.length-4,B.length))mxStencilRegistry.loadStencilSet(B,
-null);else if(".js"==B.toLowerCase().substring(B.length-3,B.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(B);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,d,B,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);d=mxStencilRegistry.stencils[b]}}return d};
-mxStencilRegistry.getBasenameForStencil=function(b){var d=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){d=b[1];for(var k=2;k<b.length-1;k++)d+="/"+b[k]}return d};
-mxStencilRegistry.loadStencilSet=function(b,d,k,l){var B=mxStencilRegistry.packages[b];if(null!=k&&k||null==B){var p=!1;if(null==B)try{if(l){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,d,p))}));return}B=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=B;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=B&&null!=
-B.documentElement&&mxStencilRegistry.parseStencilSet(B.documentElement,d,p)}};mxStencilRegistry.loadStencil=function(b,d){if(null!=d)mxUtils.get(b,mxUtils.bind(this,function(k){d(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var d=0;d<b.length;d++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[d]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,d,k){if("stencils"==b.nodeName)for(var l=b.firstChild;null!=l;)"shapes"==l.nodeName&&mxStencilRegistry.parseStencilSet(l,d,k),l=l.nextSibling;else{k=null!=k?k:!0;l=b.firstChild;var B="";b=b.getAttribute("name");for(null!=b&&(B=b+".");null!=l;){if(l.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=l.getAttribute("name"),null!=b)){B=B.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(B+p.toLowerCase(),new mxStencil(l));if(null!=d){var E=l.getAttribute("w"),
-M=l.getAttribute("h");E=null==E?80:parseInt(E,10);M=null==M?80:parseInt(M,10);d(B,p,b,E,M)}}l=l.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function d(x,O){switch(O){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var l=0;l<e.length;l++){var C=e[l];if(!mxStencilRegistry.filesLoaded[C])if(mxStencilRegistry.filesLoaded[C]=!0,".xml"==C.toLowerCase().substring(C.length-4,C.length))mxStencilRegistry.loadStencilSet(C,
+null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,C,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
+mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
+mxStencilRegistry.loadStencilSet=function(b,e,k,l){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(l){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=C&&null!=
+C.documentElement&&mxStencilRegistry.parseStencilSet(C.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var l=b.firstChild;null!=l;)"shapes"==l.nodeName&&mxStencilRegistry.parseStencilSet(l,e,k),l=l.nextSibling;else{k=null!=k?k:!0;l=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=l;){if(l.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=l.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(l));if(null!=e){var E=l.getAttribute("w"),
+M=l.getAttribute("h");E=null==E?80:parseInt(E,10);M=null==M?80:parseInt(M,10);e(C,p,b,E,M)}}l=l.nextSibling}}};
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var y=document.createElement("div");y.className="geHint";y.style.whiteSpace="nowrap";y.style.position="absolute";return y}function e(y,O){switch(O){case mxConstants.POINTS:return y;case mxConstants.MILLIMETERS:return(y/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(y/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(y/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(x){return!mxEvent.isAltDown(x)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(x){return k.apply(this,arguments)||this.graph.isTableRow(x)||this.graph.isTableCell(x)};var l=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(x){return l.apply(this,arguments)||
-this.graph.isEdgeIgnored(x)};var B=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(x){return this.graph.isCloneEvent(x)!=B.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var x=new mxEllipse(null,this.highlightColor,this.highlightColor,0);x.opacity=mxConstants.HIGHLIGHT_OPACITY;return x};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,null,null,null,null,x);x=new mxCellState(this.graph.view,x,this.graph.getCellStyle(x));for(var O in this.graph.currentEdgeStyle)x.style[O]=this.graph.currentEdgeStyle[O];x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return x};mxConnectionHandler.prototype.updatePreview=function(x){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=E.apply(this,arguments),O=x.getCell;x.getCell=mxUtils.bind(this,function(P){var X=O.apply(this,arguments);this.error=null;return X});return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",O="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),P=0;P<O.length;P++)null!=this.currentEdgeStyle[O[P]]&&(x+=O[P]+"="+this.currentEdgeStyle[O[P]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
-(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(x+="elbow="+this.currentEdgeStyle.elbow+";");return x=null!=this.currentEdgeStyle.html?x+("html="+this.currentEdgeStyle.html+";"):x+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var x=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,O){O=null!=O?O:{};for(var P=0;P<x.length;P++){var X=x[P];O[mxObjectIdentity.get(X)]=X.getId();for(var ba=this.model.getChildCount(X),
-W=0;W<ba;W++)this.createCellLookup([this.model.getChildAt(X,W)],O)}return O};Graph.prototype.createCellMapping=function(x,O,P){P=null!=P?P:{};for(var X in x){var ba=O[X];null==P[ba]&&(P[ba]=x[X].getId()||"")}return P};Graph.prototype.importGraphModel=function(x,O,P,X){O=null!=O?O:0;P=null!=P?P:0;var ba=new mxCodec(x.ownerDocument),W=new mxGraphModel;ba.decode(x,W);x=[];ba={};var ea={},ta=W.getChildren(this.cloneCell(W.root,this.isCloneInvalidEdges(),ba));if(null!=ta){var qa=this.createCellLookup([W.root]);
-ta=ta.slice();this.model.beginUpdate();try{if(1!=ta.length||this.isCellLocked(this.getDefaultParent()))for(W=0;W<ta.length;W++)va=this.model.getChildren(this.moveCells([ta[W]],O,P,!1,this.model.getRoot())[0]),null!=va&&(x=x.concat(va));else{var va=W.getChildren(ta[0]);null!=va&&(x=this.moveCells(va,O,P,!1,this.getDefaultParent()),ea[W.getChildAt(W.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(ba,qa,ea),this.updateCustomLinks(ea,x),X)){this.isGridEnabled()&&
-(O=this.snap(O),P=this.snap(P));var Ea=this.getBoundingBoxFromGeometry(x,!0);null!=Ea&&this.moveCells(x,O-Ea.x,P-Ea.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var O={},P=this.cloneCells(x,null,O),X=new mxDictionary,ba=0;ba<x.length;ba++)X.put(x[ba],!0);var W=new mxCodec,ea=new mxGraphModel,ta=ea.getChildAt(ea.getRoot(),0);for(ba=0;ba<P.length;ba++){ea.add(ta,P[ba]);var qa=this.view.getState(x[ba]);if(null!=qa){var va=this.getCellGeometry(P[ba]);null!=
-va&&va.relative&&!this.model.isEdge(x[ba])&&null==X.get(this.model.getParent(x[ba]))&&(va.offset=null,va.relative=!1,va.x=qa.x/qa.view.scale-qa.view.translate.x,va.y=qa.y/qa.view.scale-qa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(O,this.createCellLookup(x)),P);return W.encode(ea)};Graph.prototype.isSwimlane=function(x,O){var P=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(P=this.getCurrentCellStyle(x,O)[mxConstants.STYLE_SHAPE]);return P==
-mxConstants.SHAPE_SWIMLANE||"table"==P||"tableRow"==P};var M=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var O=this.model.getParent(x);if(null!=O){var P=this.getCurrentCellStyle(O);if(null!=P.expand)return"0"!=P.expand}return M.apply(this,arguments)&&(null==O||!this.isTable(O))};var S=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(x,O,P,X,ba,W,ea,ta){null==ta&&(ta=this.model.getParent(x),this.isTable(ta)||this.isTableRow(ta))&&(ta=this.getCellAt(W,ea,null,
-!0,!1));P=null;this.model.beginUpdate();try{P=S.apply(this,[x,O,P,X,ba,W,ea,ta]);this.model.setValue(P,"");var qa=this.getChildCells(P,!0);for(O=0;O<qa.length;O++){var va=this.getCellGeometry(qa[O]);null!=va&&va.relative&&0<va.x&&this.model.remove(qa[O])}var Ea=this.getChildCells(x,!0);for(O=0;O<Ea.length;O++)va=this.getCellGeometry(Ea[O]),null!=va&&va.relative&&0>=va.x&&this.model.remove(Ea[O]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[P]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
-mxConstants.NONE,[P]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[x]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[x]);var Ca=this.model.getTerminal(P,!1);if(null!=Ca){var Ma=this.getCurrentCellStyle(Ca);null!=Ma&&"1"==Ma.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[P]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[P]))}}finally{this.model.endUpdate()}return P};
-var H=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,O,P){if(O||P)H.apply(this,arguments);else{var X=this.getSelectionCell(),ba=null,W=[],ea=mxUtils.bind(this,function(ta){if(null!=this.view.getState(ta)&&(this.model.isVertex(ta)||this.model.isEdge(ta)))if(W.push(ta),ta==X)ba=W.length-1;else if(x&&null==X&&0<W.length||null!=ba&&x&&W.length>ba||!x&&0<ba)return;for(var qa=0;qa<this.model.getChildCount(ta);qa++)ea(this.model.getChildAt(ta,qa))});ea(this.model.root);0<W.length&&(ba=
-null!=ba?mxUtils.mod(ba+(x?1:-1),W.length):0,this.setSelectionCell(W[ba]))}};Graph.prototype.swapShapes=function(x,O,P,X,ba,W,ea){O=!1;if(!X&&null!=ba&&1==x.length&&(X=this.view.getState(ba),P=this.view.getState(x[0]),null!=X&&null!=P&&(null!=W&&mxEvent.isShiftDown(W)||"umlLifeline"==X.style.shape&&"umlLifeline"==P.style.shape)&&(X=this.getCellGeometry(ba),W=this.getCellGeometry(x[0]),null!=X&&null!=W))){O=X.clone();X=W.clone();X.x=O.x;X.y=O.y;O.x=W.x;O.y=W.y;this.model.beginUpdate();try{this.model.setGeometry(ba,
-O),this.model.setGeometry(x[0],X)}finally{this.model.endUpdate()}O=!0}return O};var K=Graph.prototype.moveCells;Graph.prototype.moveCells=function(x,O,P,X,ba,W,ea){if(this.swapShapes(x,O,P,X,ba,W,ea))return x;ea=null!=ea?ea:{};if(this.isTable(ba)){for(var ta=[],qa=0;qa<x.length;qa++)this.isTable(x[qa])?ta=ta.concat(this.model.getChildCells(x[qa],!0).reverse()):ta.push(x[qa]);x=ta}this.model.beginUpdate();try{ta=[];for(qa=0;qa<x.length;qa++)if(null!=ba&&this.isTableRow(x[qa])){var va=this.model.getParent(x[qa]),
-Ea=this.getCellGeometry(x[qa]);this.isTable(va)&&ta.push(va);if(null!=va&&null!=Ea&&this.isTable(va)&&this.isTable(ba)&&(X||va!=ba)){if(!X){var Ca=this.getCellGeometry(va);null!=Ca&&(Ca=Ca.clone(),Ca.height-=Ea.height,this.model.setGeometry(va,Ca))}Ca=this.getCellGeometry(ba);null!=Ca&&(Ca=Ca.clone(),Ca.height+=Ea.height,this.model.setGeometry(ba,Ca));var Ma=this.model.getChildCells(ba,!0);if(0<Ma.length){x[qa]=X?this.cloneCell(x[qa]):x[qa];var Sa=this.model.getChildCells(x[qa],!0),Qa=this.model.getChildCells(Ma[0],
-!0),Fa=Qa.length-Sa.length;if(0<Fa)for(var Ka=0;Ka<Fa;Ka++){var Pa=this.cloneCell(Sa[Sa.length-1]);null!=Pa&&(Pa.value="",this.model.add(x[qa],Pa))}else if(0>Fa)for(Ka=0;Ka>Fa;Ka--)this.model.remove(Sa[Sa.length+Ka-1]);Sa=this.model.getChildCells(x[qa],!0);for(Ka=0;Ka<Qa.length;Ka++){var $a=this.getCellGeometry(Qa[Ka]),eb=this.getCellGeometry(Sa[Ka]);null!=$a&&null!=eb&&(eb=eb.clone(),eb.width=$a.width,this.model.setGeometry(Sa[Ka],eb))}}}}var cb=K.apply(this,arguments);for(qa=0;qa<ta.length;qa++)!X&&
-this.model.contains(ta[qa])&&0==this.model.getChildCount(ta[qa])&&this.model.remove(ta[qa]);X&&this.updateCustomLinks(this.createCellMapping(ea,this.createCellLookup(x)),cb)}finally{this.model.endUpdate()}return cb};var Q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,O){var P=[];this.model.beginUpdate();try{for(var X=0;X<x.length;X++)if(this.isTableCell(x[X])){var ba=this.model.getParent(x[X]),W=this.model.getParent(ba);1==this.model.getChildCount(ba)&&1==this.model.getChildCount(W)?
-0>mxUtils.indexOf(x,W)&&0>mxUtils.indexOf(P,W)&&P.push(W):this.labelChanged(x[X],"")}else{if(this.isTableRow(x[X])&&(W=this.model.getParent(x[X]),0>mxUtils.indexOf(x,W)&&0>mxUtils.indexOf(P,W))){for(var ea=this.model.getChildCells(W,!0),ta=0,qa=0;qa<ea.length;qa++)0<=mxUtils.indexOf(x,ea[qa])&&ta++;ta==ea.length&&P.push(W)}P.push(x[X])}P=Q.apply(this,[P,O])}finally{this.model.endUpdate()}return P};Graph.prototype.updateCustomLinks=function(x,O,P){P=null!=P?P:new Graph;for(var X=0;X<O.length;X++)null!=
-O[X]&&P.updateCustomLinksForCell(x,O[X],P)};Graph.prototype.updateCustomLinksForCell=function(x,O){this.doUpdateCustomLinksForCell(x,O);for(var P=this.model.getChildCount(O),X=0;X<P;X++)this.updateCustomLinksForCell(x,this.model.getChildAt(O,X))};Graph.prototype.doUpdateCustomLinksForCell=function(x,O){};Graph.prototype.getAllConnectionConstraints=function(x,O){if(null!=x){O=mxUtils.getValue(x.style,"points",null);if(null!=O){x=[];try{var P=JSON.parse(O);for(O=0;O<P.length;O++){var X=P[O];x.push(new mxConnectionConstraint(new mxPoint(X[0],
-X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(W){}return x}if(null!=x.shape&&null!=x.shape.bounds){X=x.shape.direction;O=x.shape.bounds;var ba=x.shape.scale;P=O.width/ba;O=O.height/ba;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=P,P=O,O=X;O=x.shape.getConstraints(x.style,P,O);if(null!=O)return O;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};
-Graph.prototype.flipEdge=function(x){if(null!=x){var O=this.getCurrentCellStyle(x);O=mxUtils.getValue(O,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,O,[x])}};Graph.prototype.isValidRoot=function(x){for(var O=this.model.getChildCount(x),P=0,X=0;X<O;X++){var ba=this.model.getChildAt(x,X);this.model.isVertex(ba)&&(ba=this.getCellGeometry(ba),null==ba||ba.relative||
-P++)}return 0<P||this.isContainer(x)};Graph.prototype.isValidDropTarget=function(x,O,P){for(var X=this.getCurrentCellStyle(x),ba=!0,W=!0,ea=0;ea<O.length&&W;ea++)ba=ba&&this.isTable(O[ea]),W=W&&this.isTableRow(O[ea]);return(1==O.length&&null!=P&&mxEvent.isShiftDown(P)&&!mxEvent.isControlDown(P)&&!mxEvent.isAltDown(P)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&
-!this.isTableRow(x)&&(!this.isTable(x)||W||ba))&&!this.isCellLocked(x)};Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var O=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(O&&null!=x&&null!=this.layoutManager){var P=this.model.getParent(x);null!=P&&(P=this.layoutManager.getLayout(P),null!=P&&P.constructor==mxStackLayout&&(O=!1))}return O};Graph.prototype.getPreferredSizeForCell=
-function(x){var O=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=O&&(O.width+=10,O.height+=4,this.gridEnabled&&(O.width=this.snap(O.width),O.height=this.snap(O.height)));return O};Graph.prototype.turnShapes=function(x,O){var P=this.getModel(),X=[];P.beginUpdate();try{for(var ba=0;ba<x.length;ba++){var W=x[ba];if(P.isEdge(W)){var ea=P.getTerminal(W,!0),ta=P.getTerminal(W,!1);P.setTerminal(W,ta,!0);P.setTerminal(W,ea,!1);var qa=P.getGeometry(W);if(null!=qa){qa=qa.clone();null!=
+!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(y){return!mxEvent.isAltDown(y)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(y){return k.apply(this,arguments)||this.graph.isTableRow(y)||this.graph.isTableCell(y)};var l=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(y){return l.apply(this,arguments)||
+this.graph.isEdgeIgnored(y)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(y){return this.graph.isCloneEvent(y)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var y=new mxEllipse(null,this.highlightColor,this.highlightColor,0);y.opacity=mxConstants.HIGHLIGHT_OPACITY;return y};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
+function(y){y=this.graph.createCurrentEdgeStyle();y=this.graph.createEdge(null,null,null,null,null,y);y=new mxCellState(this.graph.view,y,this.graph.getCellStyle(y));for(var O in this.graph.currentEdgeStyle)y.style[O]=this.graph.currentEdgeStyle[O];y.style=this.graph.postProcessCellStyle(y.cell,y.style);return y};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var y=p.apply(this,arguments);y.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+return y};mxConnectionHandler.prototype.updatePreview=function(y){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=E.apply(this,arguments),O=y.getCell;y.getCell=mxUtils.bind(this,function(P){var X=O.apply(this,arguments);this.error=null;return X});return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var y="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",O="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),P=0;P<O.length;P++)null!=this.currentEdgeStyle[O[P]]&&(y+=O[P]+"="+this.currentEdgeStyle[O[P]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+(y+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?y+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(y+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(y+="elbow="+this.currentEdgeStyle.elbow+";");return y=null!=this.currentEdgeStyle.html?y+("html="+this.currentEdgeStyle.html+";"):y+"html=1;"};
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var y=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,O){O=null!=O?O:{};for(var P=0;P<y.length;P++){var X=y[P];O[mxObjectIdentity.get(X)]=X.getId();for(var ba=this.model.getChildCount(X),
+W=0;W<ba;W++)this.createCellLookup([this.model.getChildAt(X,W)],O)}return O};Graph.prototype.createCellMapping=function(y,O,P){P=null!=P?P:{};for(var X in y){var ba=O[X];null==P[ba]&&(P[ba]=y[X].getId()||"")}return P};Graph.prototype.importGraphModel=function(y,O,P,X){O=null!=O?O:0;P=null!=P?P:0;var ba=new mxCodec(y.ownerDocument),W=new mxGraphModel;ba.decode(y,W);y=[];ba={};var ea={},ta=W.getChildren(this.cloneCell(W.root,this.isCloneInvalidEdges(),ba));if(null!=ta){var qa=this.createCellLookup([W.root]);
+ta=ta.slice();this.model.beginUpdate();try{if(1!=ta.length||this.isCellLocked(this.getDefaultParent()))for(W=0;W<ta.length;W++)va=this.model.getChildren(this.moveCells([ta[W]],O,P,!1,this.model.getRoot())[0]),null!=va&&(y=y.concat(va));else{var va=W.getChildren(ta[0]);null!=va&&(y=this.moveCells(va,O,P,!1,this.getDefaultParent()),ea[W.getChildAt(W.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(ba,qa,ea),this.updateCustomLinks(ea,y),X)){this.isGridEnabled()&&
+(O=this.snap(O),P=this.snap(P));var Ea=this.getBoundingBoxFromGeometry(y,!0);null!=Ea&&this.moveCells(y,O-Ea.x,P-Ea.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var O={},P=this.cloneCells(y,null,O),X=new mxDictionary,ba=0;ba<y.length;ba++)X.put(y[ba],!0);var W=new mxCodec,ea=new mxGraphModel,ta=ea.getChildAt(ea.getRoot(),0);for(ba=0;ba<P.length;ba++){ea.add(ta,P[ba]);var qa=this.view.getState(y[ba]);if(null!=qa){var va=this.getCellGeometry(P[ba]);null!=
+va&&va.relative&&!this.model.isEdge(y[ba])&&null==X.get(this.model.getParent(y[ba]))&&(va.offset=null,va.relative=!1,va.x=qa.x/qa.view.scale-qa.view.translate.x,va.y=qa.y/qa.view.scale-qa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(O,this.createCellLookup(y)),P);return W.encode(ea)};Graph.prototype.isSwimlane=function(y,O){var P=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(P=this.getCurrentCellStyle(y,O)[mxConstants.STYLE_SHAPE]);return P==
+mxConstants.SHAPE_SWIMLANE||"table"==P||"tableRow"==P};var M=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var O=this.model.getParent(y);if(null!=O){var P=this.getCurrentCellStyle(O);if(null!=P.expand)return"0"!=P.expand}return M.apply(this,arguments)&&(null==O||!this.isTable(O))};var S=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(y,O,P,X,ba,W,ea,ta){null==ta&&(ta=this.model.getParent(y),this.isTable(ta)||this.isTableRow(ta))&&(ta=this.getCellAt(W,ea,null,
+!0,!1));P=null;this.model.beginUpdate();try{P=S.apply(this,[y,O,P,X,ba,W,ea,ta]);this.model.setValue(P,"");var qa=this.getChildCells(P,!0);for(O=0;O<qa.length;O++){var va=this.getCellGeometry(qa[O]);null!=va&&va.relative&&0<va.x&&this.model.remove(qa[O])}var Ea=this.getChildCells(y,!0);for(O=0;O<Ea.length;O++)va=this.getCellGeometry(Ea[O]),null!=va&&va.relative&&0>=va.x&&this.model.remove(Ea[O]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[P]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
+mxConstants.NONE,[P]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[y]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[y]);var Ca=this.model.getTerminal(P,!1);if(null!=Ca){var Ma=this.getCurrentCellStyle(Ca);null!=Ma&&"1"==Ma.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[P]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[P]))}}finally{this.model.endUpdate()}return P};
+var H=Graph.prototype.selectCell;Graph.prototype.selectCell=function(y,O,P){if(O||P)H.apply(this,arguments);else{var X=this.getSelectionCell(),ba=null,W=[],ea=mxUtils.bind(this,function(ta){if(null!=this.view.getState(ta)&&(this.model.isVertex(ta)||this.model.isEdge(ta)))if(W.push(ta),ta==X)ba=W.length-1;else if(y&&null==X&&0<W.length||null!=ba&&y&&W.length>ba||!y&&0<ba)return;for(var qa=0;qa<this.model.getChildCount(ta);qa++)ea(this.model.getChildAt(ta,qa))});ea(this.model.root);0<W.length&&(ba=
+null!=ba?mxUtils.mod(ba+(y?1:-1),W.length):0,this.setSelectionCell(W[ba]))}};Graph.prototype.swapShapes=function(y,O,P,X,ba,W,ea){O=!1;if(!X&&null!=ba&&1==y.length&&(X=this.view.getState(ba),P=this.view.getState(y[0]),null!=X&&null!=P&&(null!=W&&mxEvent.isShiftDown(W)||"umlLifeline"==X.style.shape&&"umlLifeline"==P.style.shape)&&(X=this.getCellGeometry(ba),W=this.getCellGeometry(y[0]),null!=X&&null!=W))){O=X.clone();X=W.clone();X.x=O.x;X.y=O.y;O.x=W.x;O.y=W.y;this.model.beginUpdate();try{this.model.setGeometry(ba,
+O),this.model.setGeometry(y[0],X)}finally{this.model.endUpdate()}O=!0}return O};var K=Graph.prototype.moveCells;Graph.prototype.moveCells=function(y,O,P,X,ba,W,ea){if(this.swapShapes(y,O,P,X,ba,W,ea))return y;ea=null!=ea?ea:{};if(this.isTable(ba)){for(var ta=[],qa=0;qa<y.length;qa++)this.isTable(y[qa])?ta=ta.concat(this.model.getChildCells(y[qa],!0).reverse()):ta.push(y[qa]);y=ta}this.model.beginUpdate();try{ta=[];for(qa=0;qa<y.length;qa++)if(null!=ba&&this.isTableRow(y[qa])){var va=this.model.getParent(y[qa]),
+Ea=this.getCellGeometry(y[qa]);this.isTable(va)&&ta.push(va);if(null!=va&&null!=Ea&&this.isTable(va)&&this.isTable(ba)&&(X||va!=ba)){if(!X){var Ca=this.getCellGeometry(va);null!=Ca&&(Ca=Ca.clone(),Ca.height-=Ea.height,this.model.setGeometry(va,Ca))}Ca=this.getCellGeometry(ba);null!=Ca&&(Ca=Ca.clone(),Ca.height+=Ea.height,this.model.setGeometry(ba,Ca));var Ma=this.model.getChildCells(ba,!0);if(0<Ma.length){y[qa]=X?this.cloneCell(y[qa]):y[qa];var Sa=this.model.getChildCells(y[qa],!0),Qa=this.model.getChildCells(Ma[0],
+!0),Fa=Qa.length-Sa.length;if(0<Fa)for(var Ka=0;Ka<Fa;Ka++){var Pa=this.cloneCell(Sa[Sa.length-1]);null!=Pa&&(Pa.value="",this.model.add(y[qa],Pa))}else if(0>Fa)for(Ka=0;Ka>Fa;Ka--)this.model.remove(Sa[Sa.length+Ka-1]);Sa=this.model.getChildCells(y[qa],!0);for(Ka=0;Ka<Qa.length;Ka++){var $a=this.getCellGeometry(Qa[Ka]),eb=this.getCellGeometry(Sa[Ka]);null!=$a&&null!=eb&&(eb=eb.clone(),eb.width=$a.width,this.model.setGeometry(Sa[Ka],eb))}}}}var cb=K.apply(this,arguments);for(qa=0;qa<ta.length;qa++)!X&&
+this.model.contains(ta[qa])&&0==this.model.getChildCount(ta[qa])&&this.model.remove(ta[qa]);X&&this.updateCustomLinks(this.createCellMapping(ea,this.createCellLookup(y)),cb)}finally{this.model.endUpdate()}return cb};var Q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,O){var P=[];this.model.beginUpdate();try{for(var X=0;X<y.length;X++)if(this.isTableCell(y[X])){var ba=this.model.getParent(y[X]),W=this.model.getParent(ba);1==this.model.getChildCount(ba)&&1==this.model.getChildCount(W)?
+0>mxUtils.indexOf(y,W)&&0>mxUtils.indexOf(P,W)&&P.push(W):this.labelChanged(y[X],"")}else{if(this.isTableRow(y[X])&&(W=this.model.getParent(y[X]),0>mxUtils.indexOf(y,W)&&0>mxUtils.indexOf(P,W))){for(var ea=this.model.getChildCells(W,!0),ta=0,qa=0;qa<ea.length;qa++)0<=mxUtils.indexOf(y,ea[qa])&&ta++;ta==ea.length&&P.push(W)}P.push(y[X])}P=Q.apply(this,[P,O])}finally{this.model.endUpdate()}return P};Graph.prototype.updateCustomLinks=function(y,O,P){P=null!=P?P:new Graph;for(var X=0;X<O.length;X++)null!=
+O[X]&&P.updateCustomLinksForCell(y,O[X],P)};Graph.prototype.updateCustomLinksForCell=function(y,O){this.doUpdateCustomLinksForCell(y,O);for(var P=this.model.getChildCount(O),X=0;X<P;X++)this.updateCustomLinksForCell(y,this.model.getChildAt(O,X))};Graph.prototype.doUpdateCustomLinksForCell=function(y,O){};Graph.prototype.getAllConnectionConstraints=function(y,O){if(null!=y){O=mxUtils.getValue(y.style,"points",null);if(null!=O){y=[];try{var P=JSON.parse(O);for(O=0;O<P.length;O++){var X=P[O];y.push(new mxConnectionConstraint(new mxPoint(X[0],
+X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(W){}return y}if(null!=y.shape&&null!=y.shape.bounds){X=y.shape.direction;O=y.shape.bounds;var ba=y.shape.scale;P=O.width/ba;O=O.height/ba;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=P,P=O,O=X;O=y.shape.getConstraints(y.style,P,O);if(null!=O)return O;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};
+Graph.prototype.flipEdge=function(y){if(null!=y){var O=this.getCurrentCellStyle(y);O=mxUtils.getValue(O,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,O,[y])}};Graph.prototype.isValidRoot=function(y){for(var O=this.model.getChildCount(y),P=0,X=0;X<O;X++){var ba=this.model.getChildAt(y,X);this.model.isVertex(ba)&&(ba=this.getCellGeometry(ba),null==ba||ba.relative||
+P++)}return 0<P||this.isContainer(y)};Graph.prototype.isValidDropTarget=function(y,O,P){for(var X=this.getCurrentCellStyle(y),ba=!0,W=!0,ea=0;ea<O.length&&W;ea++)ba=ba&&this.isTable(O[ea]),W=W&&this.isTableRow(O[ea]);return(1==O.length&&null!=P&&mxEvent.isShiftDown(P)&&!mxEvent.isControlDown(P)&&!mxEvent.isAltDown(P)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(y))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&
+!this.isTableRow(y)&&(!this.isTable(y)||W||ba))&&!this.isCellLocked(y)};Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var O=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(O&&null!=y&&null!=this.layoutManager){var P=this.model.getParent(y);null!=P&&(P=this.layoutManager.getLayout(P),null!=P&&P.constructor==mxStackLayout&&(O=!1))}return O};Graph.prototype.getPreferredSizeForCell=
+function(y){var O=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=O&&(O.width+=10,O.height+=4,this.gridEnabled&&(O.width=this.snap(O.width),O.height=this.snap(O.height)));return O};Graph.prototype.turnShapes=function(y,O){var P=this.getModel(),X=[];P.beginUpdate();try{for(var ba=0;ba<y.length;ba++){var W=y[ba];if(P.isEdge(W)){var ea=P.getTerminal(W,!0),ta=P.getTerminal(W,!1);P.setTerminal(W,ta,!0);P.setTerminal(W,ea,!1);var qa=P.getGeometry(W);if(null!=qa){qa=qa.clone();null!=
qa.points&&qa.points.reverse();var va=qa.getTerminalPoint(!0),Ea=qa.getTerminalPoint(!1);qa.setTerminalPoint(va,!1);qa.setTerminalPoint(Ea,!0);P.setGeometry(W,qa);var Ca=this.view.getState(W),Ma=this.view.getState(ea),Sa=this.view.getState(ta);if(null!=Ca){var Qa=null!=Ma?this.getConnectionConstraint(Ca,Ma,!0):null,Fa=null!=Sa?this.getConnectionConstraint(Ca,Sa,!1):null;this.setConnectionConstraint(W,ea,!0,Fa);this.setConnectionConstraint(W,ta,!1,Qa);var Ka=mxUtils.getValue(Ca.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);
this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ca.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[W]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ka,[W])}X.push(W)}}else if(P.isVertex(W)&&(qa=this.getCellGeometry(W),null!=qa)){if(!(this.isTable(W)||this.isTableRow(W)||this.isTableCell(W)||this.isSwimlane(W))){qa=qa.clone();qa.x+=qa.width/2-qa.height/2;qa.y+=qa.height/2-qa.width/2;var Pa=qa.width;qa.width=qa.height;qa.height=Pa;P.setGeometry(W,qa)}var $a=
-this.view.getState(W);if(null!=$a){var eb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],cb=mxUtils.getValue($a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,eb[mxUtils.mod(mxUtils.indexOf(eb,cb)+(O?-1:1),eb.length)],[W])}X.push(W)}}}finally{P.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=
-x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;x=x.nextSibling}return!1};var e=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var O=x.cell;this.isTableCell(O)&&(O=this.model.getParent(O));this.isTableRow(O)&&(O=this.model.getParent(O));var P=this.view.getState(O);null!=P&&null!=
-P.shape&&(this.view.invalidate(O),P.shape.bounds=null)}e.apply(this,arguments);x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var O=0;O<x.length;O++){var P=this.view.getState(x[O]);null!=P&&null!=P.shape&&null!=P.shape.stencil&&this.stencilHasPlaceholders(P.shape.stencil)?this.removeStateForCell(x[O]):
-this.isReplacePlaceholders(x[O])&&this.view.invalidate(x[O],!1,!1)}};Graph.prototype.replaceElement=function(x,O){O=x.ownerDocument.createElement(null!=O?O:"span");for(var P=Array.prototype.slice.call(x.attributes);attr=P.pop();)O.setAttribute(attr.nodeName,attr.nodeValue);O.innerHTML=x.innerHTML;x.parentNode.replaceChild(O,x)};Graph.prototype.processElements=function(x,O){if(null!=x){x=x.getElementsByTagName("*");for(var P=0;P<x.length;P++)O(x[P])}};Graph.prototype.updateLabelElements=function(x,
-O,P){x=null!=x?x:this.getSelectionCells();for(var X=document.createElement("div"),ba=0;ba<x.length;ba++)if(this.isHtmlLabel(x[ba])){var W=this.convertValueToString(x[ba]);if(null!=W&&0<W.length){X.innerHTML=W;for(var ea=X.getElementsByTagName(null!=P?P:"*"),ta=0;ta<ea.length;ta++)O(ea[ta]);X.innerHTML!=W&&this.cellLabelChanged(x[ba],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,O,P){O=Graph.zapGremlins(O);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&
-null!=x.getAttribute("placeholder"))for(var X=x.getAttribute("placeholder"),ba=x;null!=ba;){if(ba==this.model.getRoot()||null!=ba.value&&"object"==typeof ba.value&&ba.hasAttribute(X)){this.setAttributeForCell(ba,X,O);break}ba=this.model.getParent(ba)}var W=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&W.hasAttribute("label_"+Graph.diagramLanguage)?W.setAttribute("label_"+Graph.diagramLanguage,O):W.setAttribute("label",O);O=W}mxGraph.prototype.cellLabelChanged.apply(this,
-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=x){for(var O=new mxDictionary,P=0;P<x.length;P++)O.put(x[P],!0);var X=[];for(P=0;P<x.length;P++){var ba=this.model.getParent(x[P]);null==ba||O.get(ba)||(O.put(ba,!0),X.push(ba))}for(P=0;P<X.length;P++)if(ba=this.view.getState(X[P]),null!=ba&&(this.model.isEdge(ba.cell)||this.model.isVertex(ba.cell))&&this.isCellDeletable(ba.cell)&&this.isTransparentState(ba)){for(var W=!0,ea=0;ea<this.model.getChildCount(ba.cell)&&
-W;ea++)O.get(this.model.getChildAt(ba.cell,ea))||(W=!1);W&&x.push(ba.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var O=[],P=0;P<x.length;P++)this.isCellDeletable(x[P])&&this.isTransparentState(this.view.getState(x[P]))&&O.push(x[P]);x=O;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,O){this.setAttributeForCell(x,"link",O)};Graph.prototype.setTooltipForCell=function(x,
-O){var P="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(P="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,P,O)};Graph.prototype.getAttributeForCell=function(x,O,P){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(O):null;return null!=x?x:P};Graph.prototype.setAttributeForCell=function(x,O,P){if(null!=x.value&&"object"==typeof x.value)var X=x.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),
-X.setAttribute("label",x.value||"");null!=P?X.setAttribute(O,P):X.removeAttribute(O);this.model.setValue(x,X)};var f=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,O,P,X){this.getModel();if(mxEvent.isAltDown(O))return null;for(var ba=0;ba<x.length;ba++){var W=this.model.getParent(x[ba]);if(this.model.isEdge(W)&&0>mxUtils.indexOf(x,W))return null}W=f.apply(this,arguments);var ea=!0;for(ba=0;ba<x.length&&ea;ba++)ea=ea&&this.isTableRow(x[ba]);ea&&(this.isTableCell(W)&&(W=this.model.getParent(W)),
-this.isTableRow(W)&&(W=this.model.getParent(W)),this.isTable(W)||(W=null));return W};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};Graph.prototype.dblClick=function(x,O){this.isEnabled()&&(O=this.insertTextForEvent(x,O),mxGraph.prototype.dblClick.call(this,x,O))};Graph.prototype.insertTextForEvent=function(x,O){var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=
-x&&!this.model.isVertex(O)){var X=this.model.isEdge(O)?this.view.getState(O):null,ba=mxEvent.getSource(x);this.firstClickState!=X||this.firstClickSource!=ba||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,P.x,P.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(x)))||(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ba==this.view.getCanvas().ownerSVGElement)||(null==
-X&&(X=this.view.getState(this.getCellAt(P.x,P.y))),O=this.addText(P.x,P.y,X))}return O};Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),O=this.container.scrollLeft/this.view.scale-this.view.translate.x,P=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),ba=this.getPageSize();O=Math.max(O,X.x*ba.width);P=Math.max(P,X.y*ba.height)}return new mxPoint(this.snap(O+x),this.snap(P+x))};Graph.prototype.getFreeInsertPoint=function(){var x=
-this.view,O=this.getGraphBounds(),P=this.getInsertPoint(),X=this.snap(Math.round(Math.max(P.x,O.x/x.scale-x.translate.x+(0==O.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(P.y,(O.y+O.height)/x.scale-x.translate.y+2*this.gridSize)));return new mxPoint(X,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x: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-
-x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(x,O,P){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,
-0,0,0);X.vertex=!0;if(null!=P&&this.model.isEdge(P.cell)){X.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";X.geometry.relative=!0;X.connectable=!1;var ba=this.view.getRelativePoint(P,x,O);X.geometry.x=Math.round(1E4*ba.x)/1E4;X.geometry.y=Math.round(ba.y);X.geometry.offset=new mxPoint(0,0);ba=this.view.getPoint(P,X.geometry);var W=this.view.scale;X.geometry.offset=new mxPoint(Math.round((x-ba.x)/W),Math.round((O-ba.y)/W))}else ba=this.view.translate,X.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
-X.geometry.width=40,X.geometry.height=20,X.geometry.x=Math.round(x/this.view.scale)-ba.x-(null!=P?P.origin.x:0),X.geometry.y=Math.round(O/this.view.scale)-ba.y-(null!=P?P.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=P?P.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(x,O,P){var X=mxUtils.bind(this,function(){var qa=this.container.getElementsByTagName("a");
-if(null!=qa)for(var va=0;va<qa.length;va++){var Ea=this.getAbsoluteUrl(qa[va].getAttribute("href"));null!=Ea&&(qa[va].setAttribute("rel",this.linkRelation),qa[va].setAttribute("href",Ea),null!=O&&mxEvent.addGestureListeners(qa[va],null,null,O))}});this.model.addListener(mxEvent.CHANGE,X);X();var ba=this.container.style.cursor,W=this.getTolerance(),ea=this,ta={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&x!=mxConstants.NONE?new mxCellHighlight(ea,x,4):null,startX:0,
+this.view.getState(W);if(null!=$a){var eb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],cb=mxUtils.getValue($a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,eb[mxUtils.mod(mxUtils.indexOf(eb,cb)+(O?-1:1),eb.length)],[W])}X.push(W)}}}finally{P.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=
+y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0;y=y.nextSibling}return!1};var d=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var O=y.cell;this.isTableCell(O)&&(O=this.model.getParent(O));this.isTableRow(O)&&(O=this.model.getParent(O));var P=this.view.getState(O);null!=P&&null!=
+P.shape&&(this.view.invalidate(O),P.shape.bounds=null)}d.apply(this,arguments);y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var O=0;O<y.length;O++){var P=this.view.getState(y[O]);null!=P&&null!=P.shape&&null!=P.shape.stencil&&this.stencilHasPlaceholders(P.shape.stencil)?this.removeStateForCell(y[O]):
+this.isReplacePlaceholders(y[O])&&this.view.invalidate(y[O],!1,!1)}};Graph.prototype.replaceElement=function(y,O){O=y.ownerDocument.createElement(null!=O?O:"span");for(var P=Array.prototype.slice.call(y.attributes);attr=P.pop();)O.setAttribute(attr.nodeName,attr.nodeValue);O.innerHTML=y.innerHTML;y.parentNode.replaceChild(O,y)};Graph.prototype.processElements=function(y,O){if(null!=y){y=y.getElementsByTagName("*");for(var P=0;P<y.length;P++)O(y[P])}};Graph.prototype.updateLabelElements=function(y,
+O,P){y=null!=y?y:this.getSelectionCells();for(var X=document.createElement("div"),ba=0;ba<y.length;ba++)if(this.isHtmlLabel(y[ba])){var W=this.convertValueToString(y[ba]);if(null!=W&&0<W.length){X.innerHTML=W;for(var ea=X.getElementsByTagName(null!=P?P:"*"),ta=0;ta<ea.length;ta++)O(ea[ta]);X.innerHTML!=W&&this.cellLabelChanged(y[ba],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,O,P){O=Graph.zapGremlins(O);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&
+null!=y.getAttribute("placeholder"))for(var X=y.getAttribute("placeholder"),ba=y;null!=ba;){if(ba==this.model.getRoot()||null!=ba.value&&"object"==typeof ba.value&&ba.hasAttribute(X)){this.setAttributeForCell(ba,X,O);break}ba=this.model.getParent(ba)}var W=y.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&W.hasAttribute("label_"+Graph.diagramLanguage)?W.setAttribute("label_"+Graph.diagramLanguage,O):W.setAttribute("label",O);O=W}mxGraph.prototype.cellLabelChanged.apply(this,
+arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(y){if(null!=y){for(var O=new mxDictionary,P=0;P<y.length;P++)O.put(y[P],!0);var X=[];for(P=0;P<y.length;P++){var ba=this.model.getParent(y[P]);null==ba||O.get(ba)||(O.put(ba,!0),X.push(ba))}for(P=0;P<X.length;P++)if(ba=this.view.getState(X[P]),null!=ba&&(this.model.isEdge(ba.cell)||this.model.isVertex(ba.cell))&&this.isCellDeletable(ba.cell)&&this.isTransparentState(ba)){for(var W=!0,ea=0;ea<this.model.getChildCount(ba.cell)&&
+W;ea++)O.get(this.model.getChildAt(ba.cell,ea))||(W=!1);W&&y.push(ba.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var O=[],P=0;P<y.length;P++)this.isCellDeletable(y[P])&&this.isTransparentState(this.view.getState(y[P]))&&O.push(y[P]);y=O;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,O){this.setAttributeForCell(y,"link",O)};Graph.prototype.setTooltipForCell=function(y,
+O){var P="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(P="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,P,O)};Graph.prototype.getAttributeForCell=function(y,O,P){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(O):null;return null!=y?y:P};Graph.prototype.setAttributeForCell=function(y,O,P){if(null!=y.value&&"object"==typeof y.value)var X=y.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),
+X.setAttribute("label",y.value||"");null!=P?X.setAttribute(O,P):X.removeAttribute(O);this.model.setValue(y,X)};var f=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,O,P,X){this.getModel();if(mxEvent.isAltDown(O))return null;for(var ba=0;ba<y.length;ba++){var W=this.model.getParent(y[ba]);if(this.model.isEdge(W)&&0>mxUtils.indexOf(y,W))return null}W=f.apply(this,arguments);var ea=!0;for(ba=0;ba<y.length&&ea;ba++)ea=ea&&this.isTableRow(y[ba]);ea&&(this.isTableCell(W)&&(W=this.model.getParent(W)),
+this.isTableRow(W)&&(W=this.model.getParent(W)),this.isTable(W)||(W=null));return W};Graph.prototype.click=function(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};Graph.prototype.dblClick=function(y,O){this.isEnabled()&&(O=this.insertTextForEvent(y,O),mxGraph.prototype.dblClick.call(this,y,O))};Graph.prototype.insertTextForEvent=function(y,O){var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=
+y&&!this.model.isVertex(O)){var X=this.model.isEdge(O)?this.view.getState(O):null,ba=mxEvent.getSource(y);this.firstClickState!=X||this.firstClickSource!=ba||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,P.x,P.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(y)))||(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ba==this.view.getCanvas().ownerSVGElement)||(null==
+X&&(X=this.view.getState(this.getCellAt(P.x,P.y))),O=this.addText(P.x,P.y,X))}return O};Graph.prototype.getInsertPoint=function(){var y=this.getGridSize(),O=this.container.scrollLeft/this.view.scale-this.view.translate.x,P=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),ba=this.getPageSize();O=Math.max(O,X.x*ba.width);P=Math.max(P,X.y*ba.height)}return new mxPoint(this.snap(O+y),this.snap(P+y))};Graph.prototype.getFreeInsertPoint=function(){var y=
+this.view,O=this.getGraphBounds(),P=this.getInsertPoint(),X=this.snap(Math.round(Math.max(P.x,O.x/y.scale-y.translate.x+(0==O.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(P.y,(O.y+O.height)/y.scale-y.translate.y+2*this.gridSize)));return new mxPoint(X,y)};Graph.prototype.getCenterInsertPoint=function(y){y=null!=y?y: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-
+y.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-y.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(y,O,P){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,
+0,0,0);X.vertex=!0;if(null!=P&&this.model.isEdge(P.cell)){X.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";X.geometry.relative=!0;X.connectable=!1;var ba=this.view.getRelativePoint(P,y,O);X.geometry.x=Math.round(1E4*ba.x)/1E4;X.geometry.y=Math.round(ba.y);X.geometry.offset=new mxPoint(0,0);ba=this.view.getPoint(P,X.geometry);var W=this.view.scale;X.geometry.offset=new mxPoint(Math.round((y-ba.x)/W),Math.round((O-ba.y)/W))}else ba=this.view.translate,X.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
+X.geometry.width=40,X.geometry.height=20,X.geometry.x=Math.round(y/this.view.scale)-ba.x-(null!=P?P.origin.x:0),X.geometry.y=Math.round(O/this.view.scale)-ba.y-(null!=P?P.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=P?P.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(y,O,P){var X=mxUtils.bind(this,function(){var qa=this.container.getElementsByTagName("a");
+if(null!=qa)for(var va=0;va<qa.length;va++){var Ea=this.getAbsoluteUrl(qa[va].getAttribute("href"));null!=Ea&&(qa[va].setAttribute("rel",this.linkRelation),qa[va].setAttribute("href",Ea),null!=O&&mxEvent.addGestureListeners(qa[va],null,null,O))}});this.model.addListener(mxEvent.CHANGE,X);X();var ba=this.container.style.cursor,W=this.getTolerance(),ea=this,ta={currentState:null,currentLink:null,currentTarget:null,highlight:null!=y&&""!=y&&y!=mxConstants.NONE?new mxCellHighlight(ea,y,4):null,startX:0,
startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(qa){var va=qa.sourceState;if(null==va||null==ea.getLinkForCell(va.cell))qa=ea.getCellAt(qa.getGraphX(),qa.getGraphY(),null,null,null,function(Ea,Ca,Ma){return null==ea.getLinkForCell(Ea.cell)}),va=null==va||ea.model.isAncestor(qa,va.cell)?ea.view.getState(qa):null;va!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=va,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(qa,va){this.startX=
va.getGraphX();this.startY=va.getGraphY();this.scrollLeft=ea.container.scrollLeft;this.scrollTop=ea.container.scrollTop;null==this.currentLink&&"auto"==ea.container.style.overflow&&(ea.container.style.cursor="move");this.updateCurrentState(va)},mouseMove:function(qa,va){if(ea.isMouseDown)null!=this.currentLink&&(qa=Math.abs(this.startX-va.getGraphX()),va=Math.abs(this.startY-va.getGraphY()),(qa>W||va>W)&&this.clear());else{for(qa=va.getSource();null!=qa&&"a"!=qa.nodeName.toLowerCase();)qa=qa.parentNode;
null!=qa?this.clear():(null!=ea.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&ea.tooltipHandler.reset(va,!0,this.currentState),(null==this.currentState||va.getState()!=this.currentState&&null!=va.sourceState||!ea.intersects(this.currentState,va.getGraphX(),va.getGraphY()))&&this.updateCurrentState(va))}},mouseUp:function(qa,va){var Ea=va.getSource();for(qa=va.getEvent();null!=Ea&&"a"!=Ea.nodeName.toLowerCase();)Ea=Ea.parentNode;null==Ea&&Math.abs(this.scrollLeft-ea.container.scrollLeft)<
W&&Math.abs(this.scrollTop-ea.container.scrollTop)<W&&(null==va.sourceState||!va.isSource(va.sourceState.control))&&((mxEvent.isLeftMouseButton(qa)||mxEvent.isMiddleMouseButton(qa))&&!mxEvent.isPopupTrigger(qa)||mxEvent.isTouchEvent(qa))&&(null!=this.currentLink?(Ea=ea.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ea||null==O||O(qa,this.currentLink),mxEvent.isConsumed(qa)||(qa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(qa)?"_blank":Ea?ea.linkTarget:
"_top",ea.openLink(this.currentLink,qa),va.consume())):null!=P&&!va.isConsumed()&&Math.abs(this.scrollLeft-ea.container.scrollLeft)<W&&Math.abs(this.scrollTop-ea.container.scrollTop)<W&&Math.abs(this.startX-va.getGraphX())<W&&Math.abs(this.startY-va.getGraphY())<W&&P(va.getEvent()));this.clear()},activate:function(qa){this.currentLink=ea.getAbsoluteUrl(ea.getLinkForCell(qa.cell));null!=this.currentLink&&(this.currentTarget=ea.getLinkTargetForCell(qa.cell),ea.container.style.cursor="pointer",null!=
-this.highlight&&this.highlight.highlight(qa))},clear:function(){null!=ea.container&&(ea.container.style.cursor=ba);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ea.tooltipHandler&&ea.tooltipHandler.hide()}};ea.click=function(qa){};ea.addMouseListener(ta);mxEvent.addListener(document,"mouseleave",function(qa){ta.clear()})};Graph.prototype.duplicateCells=function(x,O){x=null!=x?x:this.getSelectionCells();O=null!=O?O:!0;for(var P=0;P<x.length;P++)this.isTableCell(x[P])&&
-(x[P]=this.model.getParent(x[P]));x=this.model.getTopmostCells(x);var X=this.getModel(),ba=this.gridSize,W=[];X.beginUpdate();try{var ea={},ta=this.createCellLookup(x),qa=this.cloneCells(x,!1,ea,!0);for(P=0;P<x.length;P++){var va=X.getParent(x[P]);if(null!=va){var Ea=this.moveCells([qa[P]],ba,ba,!1)[0];W.push(Ea);if(O)X.add(va,qa[P]);else{var Ca=va.getIndex(x[P]);X.add(va,qa[P],Ca+1)}if(this.isTable(va)){var Ma=this.getCellGeometry(qa[P]),Sa=this.getCellGeometry(va);null!=Ma&&null!=Sa&&(Sa=Sa.clone(),
-Sa.height+=Ma.height,X.setGeometry(va,Sa))}}else W.push(qa[P])}this.updateCustomLinks(this.createCellMapping(ea,ta),qa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",qa))}finally{X.endUpdate()}return W};Graph.prototype.insertImage=function(x,O,P){if(null!=x&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ba=[],W=0;W<X.length;W++)ba.push(X[W]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");
-if(x.length==ba.length+1)for(W=x.length-1;0<=W;W--)if(0==W||x[W]!=ba[W-1]){x[W].setAttribute("width",O);x[W].setAttribute("height",P);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var O=this.cellEditor.textarea.getElementsByTagName("a"),P=[],X=0;X<O.length;X++)P.push(O[X]);document.execCommand("createlink",!1,mxUtils.trim(x));O=this.cellEditor.textarea.getElementsByTagName("a");if(O.length==
-P.length+1)for(X=O.length-1;0<=X;X--)if(O[X]!=P[X-1]){for(O=O[X].getElementsByTagName("a");0<O.length;){for(P=O[0].parentNode;null!=O[0].firstChild;)P.insertBefore(O[0].firstChild,O[0]);P.removeChild(O[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var O=mxGraph.prototype.isCellResizable.apply(this,arguments),P=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(O||"0"!=mxUtils.getValue(P,mxConstants.STYLE_RESIZABLE,
-"1")&&"wrap"==P[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,O,P){null==O&&(O=this.getSelectionCells());if(null!=O&&1<O.length){for(var X=[],ba=null,W=null,ea=0,ta=0;ta<O.length;ta++)if(this.getModel().isVertex(O[ta])){var qa=this.view.getState(O[ta]);if(null!=qa){var va=x?qa.getCenterX():qa.getCenterY();ba=null!=ba?Math.max(ba,va):va;W=null!=W?Math.min(W,va):va;P&&(ea+=x?qa.width:qa.height);X.push(qa)}}if(2<X.length){X.sort(function(Qa,Fa){return x?Qa.x-Fa.x:Qa.y-Fa.y});
-P&&(ea-=x?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);qa=this.view.translate;va=this.view.scale;W=W/va-(x?qa.x:qa.y);ba=ba/va-(x?qa.x:qa.y);this.getModel().beginUpdate();try{var Ea=(ba-W-ea)/(X.length-1),Ca=W+(P?x?X[0].width/2:X[0].height/2:0);for(ta=1;ta<X.length-1;ta++){var Ma=this.view.getState(this.model.getParent(X[ta].cell)),Sa=this.getCellGeometry(X[ta].cell);Ca+=Ea;null!=Sa&&null!=Ma&&(Sa=Sa.clone(),x?Sa.x=Math.round(Ca-(P?0:Sa.width/2))-Ma.origin.x:Sa.y=Math.round(Ca-
-(P?0:Sa.height/2))-Ma.origin.y,this.getModel().setGeometry(X[ta].cell,Sa));P&&(Ca+=x?X[ta].width:X[ta].height)}}finally{this.getModel().endUpdate()}}}return O};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=function(){var x=new mxImageExport;x.getLinkForCellState=mxUtils.bind(this,function(O,P){return this.getLinkForCell(O.cell)});return x};Graph.prototype.parseBackgroundImage=function(x){var O=
-null;null!=x&&0<x.length&&(x=JSON.parse(x),O=new mxImage(x.src,x.width,x.height));return O};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,O,P,X,ba,W,ea,ta,qa,va,Ea,Ca,Ma,Sa){var Qa=null;if(null!=Sa)for(Qa=new mxDictionary,Ea=0;Ea<Sa.length;Ea++)Qa.put(Sa[Ea],!0);if(Sa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{O=null!=O?O:1;P=null!=P?P:0;ba=null!=ba?ba:!0;W=null!=W?W:!0;ea=null!=ea?ea:!0;va=null!=
+this.highlight&&this.highlight.highlight(qa))},clear:function(){null!=ea.container&&(ea.container.style.cursor=ba);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ea.tooltipHandler&&ea.tooltipHandler.hide()}};ea.click=function(qa){};ea.addMouseListener(ta);mxEvent.addListener(document,"mouseleave",function(qa){ta.clear()})};Graph.prototype.duplicateCells=function(y,O){y=null!=y?y:this.getSelectionCells();O=null!=O?O:!0;for(var P=0;P<y.length;P++)this.isTableCell(y[P])&&
+(y[P]=this.model.getParent(y[P]));y=this.model.getTopmostCells(y);var X=this.getModel(),ba=this.gridSize,W=[];X.beginUpdate();try{var ea={},ta=this.createCellLookup(y),qa=this.cloneCells(y,!1,ea,!0);for(P=0;P<y.length;P++){var va=X.getParent(y[P]);if(null!=va){var Ea=this.moveCells([qa[P]],ba,ba,!1)[0];W.push(Ea);if(O)X.add(va,qa[P]);else{var Ca=va.getIndex(y[P]);X.add(va,qa[P],Ca+1)}if(this.isTable(va)){var Ma=this.getCellGeometry(qa[P]),Sa=this.getCellGeometry(va);null!=Ma&&null!=Sa&&(Sa=Sa.clone(),
+Sa.height+=Ma.height,X.setGeometry(va,Sa))}}else W.push(qa[P])}this.updateCustomLinks(this.createCellMapping(ea,ta),qa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",qa))}finally{X.endUpdate()}return W};Graph.prototype.insertImage=function(y,O,P){if(null!=y&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ba=[],W=0;W<X.length;W++)ba.push(X[W]);document.execCommand("insertimage",!1,y);y=this.cellEditor.textarea.getElementsByTagName("img");
+if(y.length==ba.length+1)for(W=y.length-1;0<=W;W--)if(0==W||y[W]!=ba[W-1]){y[W].setAttribute("width",O);y[W].setAttribute("height",P);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var O=this.cellEditor.textarea.getElementsByTagName("a"),P=[],X=0;X<O.length;X++)P.push(O[X]);document.execCommand("createlink",!1,mxUtils.trim(y));O=this.cellEditor.textarea.getElementsByTagName("a");if(O.length==
+P.length+1)for(X=O.length-1;0<=X;X--)if(O[X]!=P[X-1]){for(O=O[X].getElementsByTagName("a");0<O.length;){for(P=O[0].parentNode;null!=O[0].firstChild;)P.insertBefore(O[0].firstChild,O[0]);P.removeChild(O[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(y))};Graph.prototype.isCellResizable=function(y){var O=mxGraph.prototype.isCellResizable.apply(this,arguments),P=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(O||"0"!=mxUtils.getValue(P,mxConstants.STYLE_RESIZABLE,
+"1")&&"wrap"==P[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,O,P){null==O&&(O=this.getSelectionCells());if(null!=O&&1<O.length){for(var X=[],ba=null,W=null,ea=0,ta=0;ta<O.length;ta++)if(this.getModel().isVertex(O[ta])){var qa=this.view.getState(O[ta]);if(null!=qa){var va=y?qa.getCenterX():qa.getCenterY();ba=null!=ba?Math.max(ba,va):va;W=null!=W?Math.min(W,va):va;P&&(ea+=y?qa.width:qa.height);X.push(qa)}}if(2<X.length){X.sort(function(Qa,Fa){return y?Qa.x-Fa.x:Qa.y-Fa.y});
+P&&(ea-=y?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);qa=this.view.translate;va=this.view.scale;W=W/va-(y?qa.x:qa.y);ba=ba/va-(y?qa.x:qa.y);this.getModel().beginUpdate();try{var Ea=(ba-W-ea)/(X.length-1),Ca=W+(P?y?X[0].width/2:X[0].height/2:0);for(ta=1;ta<X.length-1;ta++){var Ma=this.view.getState(this.model.getParent(X[ta].cell)),Sa=this.getCellGeometry(X[ta].cell);Ca+=Ea;null!=Sa&&null!=Ma&&(Sa=Sa.clone(),y?Sa.x=Math.round(Ca-(P?0:Sa.width/2))-Ma.origin.x:Sa.y=Math.round(Ca-
+(P?0:Sa.height/2))-Ma.origin.y,this.getModel().setGeometry(X[ta].cell,Sa));P&&(Ca+=y?X[ta].width:X[ta].height)}}finally{this.getModel().endUpdate()}}}return O};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport=function(){var y=new mxImageExport;y.getLinkForCellState=mxUtils.bind(this,function(O,P){return this.getLinkForCell(O.cell)});return y};Graph.prototype.parseBackgroundImage=function(y){var O=
+null;null!=y&&0<y.length&&(y=JSON.parse(y),O=new mxImage(y.src,y.width,y.height));return O};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,O,P,X,ba,W,ea,ta,qa,va,Ea,Ca,Ma,Sa){var Qa=null;if(null!=Sa)for(Qa=new mxDictionary,Ea=0;Ea<Sa.length;Ea++)Qa.put(Sa[Ea],!0);if(Sa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{O=null!=O?O:1;P=null!=P?P:0;ba=null!=ba?ba:!0;W=null!=W?W:!0;ea=null!=ea?ea:!0;va=null!=
va?va:!1;var Fa="page"==Ma?this.view.getBackgroundPageBounds():W&&null==Qa||X||"diagram"==Ma?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.view.scale;"diagram"==Ma&&null!=this.backgroundImage&&(Fa=mxRectangle.fromRectangle(Fa),Fa.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Ka,(this.view.translate.y+this.backgroundImage.y)*Ka,this.backgroundImage.width*Ka,this.backgroundImage.height*Ka)));if(null==Fa)throw Error(mxResources.get("drawingEmpty"));
-X=O/Ka;Ma=ba?-.5:0;var Pa=Graph.createSvgNode(Ma,Ma,Math.max(1,Math.ceil(Fa.width*X)+2*P)+(va&&0==P?5:0),Math.max(1,Math.ceil(Fa.height*X)+2*P)+(va&&0==P?5:0),x),$a=Pa.ownerDocument,eb=null!=$a.createElementNS?$a.createElementNS(mxConstants.NS_SVG,"g"):$a.createElement("g");Pa.appendChild(eb);var cb=this.createSvgCanvas(eb);cb.foOffset=ba?-.5:0;cb.textOffset=ba?-.5:0;cb.imageOffset=ba?-.5:0;cb.translate(Math.floor(P/O-Fa.x/Ka),Math.floor(P/O-Fa.y/Ka));var db=document.createElement("div"),rb=cb.getAlternateText;
+X=O/Ka;Ma=ba?-.5:0;var Pa=Graph.createSvgNode(Ma,Ma,Math.max(1,Math.ceil(Fa.width*X)+2*P)+(va&&0==P?5:0),Math.max(1,Math.ceil(Fa.height*X)+2*P)+(va&&0==P?5:0),y),$a=Pa.ownerDocument,eb=null!=$a.createElementNS?$a.createElementNS(mxConstants.NS_SVG,"g"):$a.createElement("g");Pa.appendChild(eb);var cb=this.createSvgCanvas(eb);cb.foOffset=ba?-.5:0;cb.textOffset=ba?-.5:0;cb.imageOffset=ba?-.5:0;cb.translate(Math.floor(P/O-Fa.x/Ka),Math.floor(P/O-Fa.y/Ka));var db=document.createElement("div"),rb=cb.getAlternateText;
cb.getAlternateText=function(Za,fb,hb,qb,kb,ib,ub,ob,nb,wb,lb,gb,tb){if(null!=ib&&0<this.state.fontSize)try{mxUtils.isNode(ib)?ib=ib.innerText:(db.innerHTML=ib,ib=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,pb=0;(0==Cb||zb<Cb)&&pb<ib.length;){var yb=ib.charCodeAt(pb);if(10==yb||13==yb){if(0<zb)break}else xb.push(ib.charAt(pb)),255>yb&&zb++;pb++}xb.length<ib.length&&1<ib.length-xb.length&&(ib=mxUtils.trim(xb.join(""))+"...");return ib}catch(Ab){return rb.apply(this,
-arguments)}else return rb.apply(this,arguments)};var mb=this.backgroundImage;if(null!=mb){x=Ka/O;var vb=this.view.translate;Ma=new mxRectangle((mb.x+vb.x)*x,(mb.y+vb.y)*x,mb.width*x,mb.height*x);mxUtils.intersects(Fa,Ma)&&cb.image(mb.x+vb.x,mb.y+vb.y,mb.width,mb.height,mb.src,!0)}cb.scale(X);cb.textEnabled=ea;ta=null!=ta?ta:this.createSvgImageExport();var Bb=ta.drawCellState,Xa=ta.getLinkForCellState;ta.getLinkForCellState=function(Za,fb){var hb=Xa.apply(this,arguments);return null==hb||Za.view.graph.isCustomLink(hb)?
+arguments)}else return rb.apply(this,arguments)};var mb=this.backgroundImage;if(null!=mb){y=Ka/O;var vb=this.view.translate;Ma=new mxRectangle((mb.x+vb.x)*y,(mb.y+vb.y)*y,mb.width*y,mb.height*y);mxUtils.intersects(Fa,Ma)&&cb.image(mb.x+vb.x,mb.y+vb.y,mb.width,mb.height,mb.src,!0)}cb.scale(X);cb.textEnabled=ea;ta=null!=ta?ta:this.createSvgImageExport();var Bb=ta.drawCellState,Xa=ta.getLinkForCellState;ta.getLinkForCellState=function(Za,fb){var hb=Xa.apply(this,arguments);return null==hb||Za.view.graph.isCustomLink(hb)?
null:hb};ta.getLinkTargetForCellState=function(Za,fb){return Za.view.graph.getLinkTargetForCell(Za.cell)};ta.drawCellState=function(Za,fb){for(var hb=Za.view.graph,qb=null!=Qa?Qa.get(Za.cell):hb.isCellSelected(Za.cell),kb=hb.model.getParent(Za.cell);!(W&&null==Qa||qb)&&null!=kb;)qb=null!=Qa?Qa.get(kb):hb.isCellSelected(kb),kb=hb.model.getParent(kb);if(W&&null==Qa||qb)hb.view.redrawEnumerationState(Za),Bb.apply(this,arguments),this.doDrawShape(Za.secondLabel,fb)};ta.drawState(this.getView().getState(this.model.root),
-cb);this.updateSvgLinks(Pa,qa,!0);this.addForeignObjectWarning(cb,Pa);return Pa}finally{Sa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,O){if("0"!=urlParams["svg-warning"]&&0<O.getElementsByTagName("foreignObject").length){var P=x.createElement("switch"),X=x.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ba=x.createElement("a");ba.setAttribute("transform","translate(0,-5)");
-null==ba.setAttributeNS||O.ownerDocument!=document&&null==document.documentMode?(ba.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ba.setAttribute("target","_blank")):(ba.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ba.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);
-P.appendChild(X);ba.appendChild(x);P.appendChild(ba);O.appendChild(P)}};Graph.prototype.updateSvgLinks=function(x,O,P){x=x.getElementsByTagName("a");for(var X=0;X<x.length;X++)if(null==x[X].getAttribute("target")){var ba=x[X].getAttribute("href");null==ba&&(ba=x[X].getAttribute("xlink:href"));null!=ba&&(null!=O&&/^https?:\/\//.test(ba)?x[X].setAttribute("target",O):P&&this.isCustomLink(ba)&&x[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);
-x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var O=window.getSelection();O.getRangeAt&&O.rangeCount&&(x=O.getRangeAt(0).commonAncestorContainer)}else document.selection&&(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){for(var x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=x.parentNode;
-null!=x&&x==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(x=this.cellEditor.textarea.firstChild);return x};Graph.prototype.getParentByName=function(x,O,P){for(;null!=x&&x.nodeName!=O;){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,O,P){for(;null!=x&&!(0<=mxUtils.indexOf(O,x.nodeName));){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.selectNode=
-function(x){var O=null;if(window.getSelection){if(O=window.getSelection(),O.getRangeAt&&O.rangeCount){var P=document.createRange();P.selectNode(x);O.removeAllRanges();O.addRange(P)}}else(O=document.selection)&&"Control"!=O.type&&(x=O.createRange(),x.collapse(!0),P=O.createRange(),P.setEndPoint("StartToStart",x),P.select())};Graph.prototype.flipEdgePoints=function(x,O,P){var X=this.getCellGeometry(x);if(null!=X){X=X.clone();if(null!=X.points)for(var ba=0;ba<X.points.length;ba++)O?X.points[ba].x=P+
-(P-X.points[ba].x):X.points[ba].y=P+(P-X.points[ba].y);ba=function(W){null!=W&&(O?W.x=P+(P-W.x):W.y=P+(P-W.y))};ba(X.getTerminalPoint(!0));ba(X.getTerminalPoint(!1));this.model.setGeometry(x,X)}};Graph.prototype.flipChildren=function(x,O,P){this.model.beginUpdate();try{for(var X=this.model.getChildCount(x),ba=0;ba<X;ba++){var W=this.model.getChildAt(x,ba);if(this.model.isEdge(W))this.flipEdgePoints(W,O,P);else{var ea=this.getCellGeometry(W);null!=ea&&(ea=ea.clone(),O?ea.x=P+(P-ea.x-ea.width):ea.y=
-P+(P-ea.y-ea.height),this.model.setGeometry(W,ea))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,O){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);for(var P=[],X=0;X<x.length;X++)if(this.model.isEdge(x[X])){var ba=this.view.getState(x[X]);null!=ba&&this.flipEdgePoints(x[X],O,(O?ba.getCenterX():ba.getCenterY())/this.view.scale-(O?ba.origin.x:ba.origin.y)-(O?this.view.translate.x:this.view.translate.y))}else{var W=this.getCellGeometry(x[X]);null!=W&&this.flipChildren(x[X],
-O,O?W.getCenterX()-W.x:W.getCenterY()-W.y);P.push(x[X])}this.toggleCellStyles(O?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,P)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(x,O){var P=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var X=0;X<x.length;X++){var ba=this.model.getParent(x[X]);if(this.isTable(ba)){var W=this.getCellGeometry(x[X]),ea=this.getCellGeometry(ba);null!=W&&null!=ea&&(ea=ea.clone(),ea.height-=W.height,this.model.setGeometry(ba,ea))}}var ta=
-this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,O)}finally{this.model.endUpdate()}if(null!=ta)for(P=[],X=0;X<ta.length;X++)this.model.contains(ta[X])&&(this.model.isVertex(ta[X])||this.model.isEdge(ta[X]))&&P.push(ta[X])}return P};Graph.prototype.insertTableColumn=function(x,O){var P=this.getModel();P.beginUpdate();try{var X=x,ba=0;if(this.isTableCell(x)){var W=P.getParent(x);X=P.getParent(W);ba=mxUtils.indexOf(P.getChildCells(W,!0),x)}else this.isTableRow(x)?X=P.getParent(x):
-x=P.getChildCells(X,!0)[0],O||(ba=P.getChildCells(x,!0).length-1);var ea=P.getChildCells(X,!0),ta=Graph.minTableColumnWidth;for(x=0;x<ea.length;x++){var qa=P.getChildCells(ea[x],!0)[ba],va=P.cloneCell(qa,!1),Ea=this.getCellGeometry(va);va.value=null;va.style=mxUtils.setStyle(mxUtils.setStyle(va.style,"rowspan",null),"colspan",null);if(null!=Ea){null!=Ea.alternateBounds&&(Ea.width=Ea.alternateBounds.width,Ea.height=Ea.alternateBounds.height,Ea.alternateBounds=null);ta=Ea.width;var Ca=this.getCellGeometry(ea[x]);
-null!=Ca&&(Ea.height=Ca.height)}P.add(ea[x],va,ba+(O?0:1))}var Ma=this.getCellGeometry(X);null!=Ma&&(Ma=Ma.clone(),Ma.width+=ta,P.setGeometry(X,Ma))}finally{P.endUpdate()}};Graph.prototype.deleteLane=function(x){var O=this.getModel();O.beginUpdate();try{var P=null;P="stackLayout"==this.getCurrentCellStyle(x).childLayout?x:O.getParent(x);var X=O.getChildCells(P,!0);0==X.length?O.remove(P):(P==x&&(x=X[X.length-1]),O.remove(x))}finally{O.endUpdate()}};Graph.prototype.insertLane=function(x,O){var P=this.getModel();
-P.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){X=x;var ba=P.getChildCells(X,!0);x=ba[O?0:ba.length-1]}else X=P.getParent(x);var W=X.getIndex(x);x=P.cloneCell(x,!1);x.value=null;P.add(X,x,W+(O?0:1))}finally{P.endUpdate()}};Graph.prototype.insertTableRow=function(x,O){var P=this.getModel();P.beginUpdate();try{var X=x,ba=x;if(this.isTableCell(x))ba=P.getParent(x),X=P.getParent(ba);else if(this.isTableRow(x))X=P.getParent(x);else{var W=P.getChildCells(X,!0);
-ba=W[O?0:W.length-1]}var ea=P.getChildCells(ba,!0),ta=X.getIndex(ba);ba=P.cloneCell(ba,!1);ba.value=null;var qa=this.getCellGeometry(ba);if(null!=qa){for(W=0;W<ea.length;W++){x=P.cloneCell(ea[W],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var va=this.getCellGeometry(x);null!=va&&(null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null),va.height=qa.height);ba.insert(x)}P.add(X,ba,
-ta+(O?0:1));var Ea=this.getCellGeometry(X);null!=Ea&&(Ea=Ea.clone(),Ea.height+=qa.height,P.setGeometry(X,Ea))}}finally{P.endUpdate()}};Graph.prototype.deleteTableColumn=function(x){var O=this.getModel();O.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(X=O.getParent(x));this.isTableRow(X)&&(P=O.getParent(X));var ba=O.getChildCells(P,!0);if(0==ba.length)O.remove(P);else{this.isTableRow(X)||(X=ba[0]);var W=O.getChildCells(X,!0);if(1>=W.length)O.remove(P);else{var ea=W.length-1;this.isTableCell(x)&&
-(ea=mxUtils.indexOf(W,x));for(X=x=0;X<ba.length;X++){var ta=O.getChildCells(ba[X],!0)[ea];O.remove(ta);var qa=this.getCellGeometry(ta);null!=qa&&(x=Math.max(x,qa.width))}var va=this.getCellGeometry(P);null!=va&&(va=va.clone(),va.width-=x,O.setGeometry(P,va))}}}finally{O.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var O=this.getModel();O.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(x=X=O.getParent(x));this.isTableRow(x)&&(P=O.getParent(X));var ba=O.getChildCells(P,!0);if(1>=ba.length)O.remove(P);
-else{this.isTableRow(X)||(X=ba[ba.length-1]);O.remove(X);x=0;var W=this.getCellGeometry(X);null!=W&&(x=W.height);var ea=this.getCellGeometry(P);null!=ea&&(ea=ea.clone(),ea.height-=x,O.setGeometry(P,ea))}}finally{O.endUpdate()}};Graph.prototype.insertRow=function(x,O){for(var P=x.tBodies[0],X=P.rows[0].cells,ba=x=0;ba<X.length;ba++){var W=X[ba].getAttribute("colspan");x+=null!=W?parseInt(W):1}O=P.insertRow(O);for(ba=0;ba<x;ba++)mxUtils.br(O.insertCell(-1));return O.cells[0]};Graph.prototype.deleteRow=
-function(x,O){x.tBodies[0].deleteRow(O)};Graph.prototype.insertColumn=function(x,O){var P=x.tHead;if(null!=P)for(var X=0;X<P.rows.length;X++){var ba=document.createElement("th");P.rows[X].appendChild(ba);mxUtils.br(ba)}x=x.tBodies[0];for(P=0;P<x.rows.length;P++)X=x.rows[P].insertCell(O),mxUtils.br(X);return x.rows[0].cells[0<=O?O:x.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(x,O){if(0<=O){x=x.tBodies[0].rows;for(var P=0;P<x.length;P++)x[P].cells.length>O&&x[P].deleteCell(O)}};Graph.prototype.pasteHtmlAtCaret=
-function(x){if(window.getSelection){var O=window.getSelection();if(O.getRangeAt&&O.rangeCount){O=O.getRangeAt(0);O.deleteContents();var P=document.createElement("div");P.innerHTML=x;x=document.createDocumentFragment();for(var X;X=P.firstChild;)lastNode=x.appendChild(X);O.insertNode(x)}}else(O=document.selection)&&"Control"!=O.type&&O.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,O){function P(ba,W){ba.length>W&&(ba=ba.substring(0,Math.round(W/2))+"..."+ba.substring(ba.length-
-Math.round(W/4)));return ba}x=null!=x?x:"javascript:void(0);";if(null==O||0==O.length)O=this.isCustomLink(x)?this.getLinkTitle(x):x;var X=document.createElement("a");X.setAttribute("rel",this.linkRelation);X.setAttribute("href",this.getAbsoluteUrl(x));X.setAttribute("title",P(this.isCustomLink(x)?this.getLinkTitle(x):x,80));null!=this.linkTarget&&X.setAttribute("target",this.linkTarget);mxUtils.write(X,P(O,40));this.isCustomLink(x)&&mxEvent.addListener(X,"click",mxUtils.bind(this,function(ba){this.customLinkClicked(x);
-mxEvent.consume(ba)}));return X};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(W,ea){this.popupMenuHandler.hideMenu()});var x=this.updateMouseEvent;this.updateMouseEvent=function(W){W=x.apply(this,arguments);if(mxEvent.isTouchEvent(W.getEvent())&&null==W.getState()){var ea=this.getCellAt(W.graphX,W.graphY);null!=ea&&this.isSwimlane(ea)&&this.hitsSwimlaneContent(ea,
+cb);this.updateSvgLinks(Pa,qa,!0);this.addForeignObjectWarning(cb,Pa);return Pa}finally{Sa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(y,O){if("0"!=urlParams["svg-warning"]&&0<O.getElementsByTagName("foreignObject").length){var P=y.createElement("switch"),X=y.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ba=y.createElement("a");ba.setAttribute("transform","translate(0,-5)");
+null==ba.setAttributeNS||O.ownerDocument!=document&&null==document.documentMode?(ba.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ba.setAttribute("target","_blank")):(ba.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ba.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));y=y.createElement("text");y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x","50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);
+P.appendChild(X);ba.appendChild(y);P.appendChild(ba);O.appendChild(P)}};Graph.prototype.updateSvgLinks=function(y,O,P){y=y.getElementsByTagName("a");for(var X=0;X<y.length;X++)if(null==y[X].getAttribute("target")){var ba=y[X].getAttribute("href");null==ba&&(ba=y[X].getAttribute("xlink:href"));null!=ba&&(null!=O&&/^https?:\/\//.test(ba)?y[X].setAttribute("target",O):P&&this.isCustomLink(ba)&&y[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);
+y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;y.pointerEvents=!0;return y};Graph.prototype.getSelectedElement=function(){var y=null;if(window.getSelection){var O=window.getSelection();O.getRangeAt&&O.rangeCount&&(y=O.getRangeAt(0).commonAncestorContainer)}else document.selection&&(y=document.selection.createRange().parentElement());return y};Graph.prototype.getSelectedEditingElement=function(){for(var y=this.getSelectedElement();null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=y.parentNode;
+null!=y&&y==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(y=this.cellEditor.textarea.firstChild);return y};Graph.prototype.getParentByName=function(y,O,P){for(;null!=y&&y.nodeName!=O;){if(y==P)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=function(y,O,P){for(;null!=y&&!(0<=mxUtils.indexOf(O,y.nodeName));){if(y==P)return null;y=y.parentNode}return y};Graph.prototype.selectNode=
+function(y){var O=null;if(window.getSelection){if(O=window.getSelection(),O.getRangeAt&&O.rangeCount){var P=document.createRange();P.selectNode(y);O.removeAllRanges();O.addRange(P)}}else(O=document.selection)&&"Control"!=O.type&&(y=O.createRange(),y.collapse(!0),P=O.createRange(),P.setEndPoint("StartToStart",y),P.select())};Graph.prototype.flipEdgePoints=function(y,O,P){var X=this.getCellGeometry(y);if(null!=X){X=X.clone();if(null!=X.points)for(var ba=0;ba<X.points.length;ba++)O?X.points[ba].x=P+
+(P-X.points[ba].x):X.points[ba].y=P+(P-X.points[ba].y);ba=function(W){null!=W&&(O?W.x=P+(P-W.x):W.y=P+(P-W.y))};ba(X.getTerminalPoint(!0));ba(X.getTerminalPoint(!1));this.model.setGeometry(y,X)}};Graph.prototype.flipChildren=function(y,O,P){this.model.beginUpdate();try{for(var X=this.model.getChildCount(y),ba=0;ba<X;ba++){var W=this.model.getChildAt(y,ba);if(this.model.isEdge(W))this.flipEdgePoints(W,O,P);else{var ea=this.getCellGeometry(W);null!=ea&&(ea=ea.clone(),O?ea.x=P+(P-ea.x-ea.width):ea.y=
+P+(P-ea.y-ea.height),this.model.setGeometry(W,ea))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(y,O){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);for(var P=[],X=0;X<y.length;X++)if(this.model.isEdge(y[X])){var ba=this.view.getState(y[X]);null!=ba&&this.flipEdgePoints(y[X],O,(O?ba.getCenterX():ba.getCenterY())/this.view.scale-(O?ba.origin.x:ba.origin.y)-(O?this.view.translate.x:this.view.translate.y))}else{var W=this.getCellGeometry(y[X]);null!=W&&this.flipChildren(y[X],
+O,O?W.getCenterX()-W.x:W.getCenterY()-W.y);P.push(y[X])}this.toggleCellStyles(O?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,P)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(y,O){var P=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var X=0;X<y.length;X++){var ba=this.model.getParent(y[X]);if(this.isTable(ba)){var W=this.getCellGeometry(y[X]),ea=this.getCellGeometry(ba);null!=W&&null!=ea&&(ea=ea.clone(),ea.height-=W.height,this.model.setGeometry(ba,ea))}}var ta=
+this.selectParentAfterDelete?this.model.getParents(y):null;this.removeCells(y,O)}finally{this.model.endUpdate()}if(null!=ta)for(P=[],X=0;X<ta.length;X++)this.model.contains(ta[X])&&(this.model.isVertex(ta[X])||this.model.isEdge(ta[X]))&&P.push(ta[X])}return P};Graph.prototype.insertTableColumn=function(y,O){var P=this.getModel();P.beginUpdate();try{var X=y,ba=0;if(this.isTableCell(y)){var W=P.getParent(y);X=P.getParent(W);ba=mxUtils.indexOf(P.getChildCells(W,!0),y)}else this.isTableRow(y)?X=P.getParent(y):
+y=P.getChildCells(X,!0)[0],O||(ba=P.getChildCells(y,!0).length-1);var ea=P.getChildCells(X,!0),ta=Graph.minTableColumnWidth;for(y=0;y<ea.length;y++){var qa=P.getChildCells(ea[y],!0)[ba],va=P.cloneCell(qa,!1),Ea=this.getCellGeometry(va);va.value=null;va.style=mxUtils.setStyle(mxUtils.setStyle(va.style,"rowspan",null),"colspan",null);if(null!=Ea){null!=Ea.alternateBounds&&(Ea.width=Ea.alternateBounds.width,Ea.height=Ea.alternateBounds.height,Ea.alternateBounds=null);ta=Ea.width;var Ca=this.getCellGeometry(ea[y]);
+null!=Ca&&(Ea.height=Ca.height)}P.add(ea[y],va,ba+(O?0:1))}var Ma=this.getCellGeometry(X);null!=Ma&&(Ma=Ma.clone(),Ma.width+=ta,P.setGeometry(X,Ma))}finally{P.endUpdate()}};Graph.prototype.deleteLane=function(y){var O=this.getModel();O.beginUpdate();try{var P=null;P="stackLayout"==this.getCurrentCellStyle(y).childLayout?y:O.getParent(y);var X=O.getChildCells(P,!0);0==X.length?O.remove(P):(P==y&&(y=X[X.length-1]),O.remove(y))}finally{O.endUpdate()}};Graph.prototype.insertLane=function(y,O){var P=this.getModel();
+P.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){X=y;var ba=P.getChildCells(X,!0);y=ba[O?0:ba.length-1]}else X=P.getParent(y);var W=X.getIndex(y);y=P.cloneCell(y,!1);y.value=null;P.add(X,y,W+(O?0:1))}finally{P.endUpdate()}};Graph.prototype.insertTableRow=function(y,O){var P=this.getModel();P.beginUpdate();try{var X=y,ba=y;if(this.isTableCell(y))ba=P.getParent(y),X=P.getParent(ba);else if(this.isTableRow(y))X=P.getParent(y);else{var W=P.getChildCells(X,!0);
+ba=W[O?0:W.length-1]}var ea=P.getChildCells(ba,!0),ta=X.getIndex(ba);ba=P.cloneCell(ba,!1);ba.value=null;var qa=this.getCellGeometry(ba);if(null!=qa){for(W=0;W<ea.length;W++){y=P.cloneCell(ea[W],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var va=this.getCellGeometry(y);null!=va&&(null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null),va.height=qa.height);ba.insert(y)}P.add(X,ba,
+ta+(O?0:1));var Ea=this.getCellGeometry(X);null!=Ea&&(Ea=Ea.clone(),Ea.height+=qa.height,P.setGeometry(X,Ea))}}finally{P.endUpdate()}};Graph.prototype.deleteTableColumn=function(y){var O=this.getModel();O.beginUpdate();try{var P=y,X=y;this.isTableCell(y)&&(X=O.getParent(y));this.isTableRow(X)&&(P=O.getParent(X));var ba=O.getChildCells(P,!0);if(0==ba.length)O.remove(P);else{this.isTableRow(X)||(X=ba[0]);var W=O.getChildCells(X,!0);if(1>=W.length)O.remove(P);else{var ea=W.length-1;this.isTableCell(y)&&
+(ea=mxUtils.indexOf(W,y));for(X=y=0;X<ba.length;X++){var ta=O.getChildCells(ba[X],!0)[ea];O.remove(ta);var qa=this.getCellGeometry(ta);null!=qa&&(y=Math.max(y,qa.width))}var va=this.getCellGeometry(P);null!=va&&(va=va.clone(),va.width-=y,O.setGeometry(P,va))}}}finally{O.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var O=this.getModel();O.beginUpdate();try{var P=y,X=y;this.isTableCell(y)&&(y=X=O.getParent(y));this.isTableRow(y)&&(P=O.getParent(X));var ba=O.getChildCells(P,!0);if(1>=ba.length)O.remove(P);
+else{this.isTableRow(X)||(X=ba[ba.length-1]);O.remove(X);y=0;var W=this.getCellGeometry(X);null!=W&&(y=W.height);var ea=this.getCellGeometry(P);null!=ea&&(ea=ea.clone(),ea.height-=y,O.setGeometry(P,ea))}}finally{O.endUpdate()}};Graph.prototype.insertRow=function(y,O){for(var P=y.tBodies[0],X=P.rows[0].cells,ba=y=0;ba<X.length;ba++){var W=X[ba].getAttribute("colspan");y+=null!=W?parseInt(W):1}O=P.insertRow(O);for(ba=0;ba<y;ba++)mxUtils.br(O.insertCell(-1));return O.cells[0]};Graph.prototype.deleteRow=
+function(y,O){y.tBodies[0].deleteRow(O)};Graph.prototype.insertColumn=function(y,O){var P=y.tHead;if(null!=P)for(var X=0;X<P.rows.length;X++){var ba=document.createElement("th");P.rows[X].appendChild(ba);mxUtils.br(ba)}y=y.tBodies[0];for(P=0;P<y.rows.length;P++)X=y.rows[P].insertCell(O),mxUtils.br(X);return y.rows[0].cells[0<=O?O:y.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(y,O){if(0<=O){y=y.tBodies[0].rows;for(var P=0;P<y.length;P++)y[P].cells.length>O&&y[P].deleteCell(O)}};Graph.prototype.pasteHtmlAtCaret=
+function(y){if(window.getSelection){var O=window.getSelection();if(O.getRangeAt&&O.rangeCount){O=O.getRangeAt(0);O.deleteContents();var P=document.createElement("div");P.innerHTML=y;y=document.createDocumentFragment();for(var X;X=P.firstChild;)lastNode=y.appendChild(X);O.insertNode(y)}}else(O=document.selection)&&"Control"!=O.type&&O.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=function(y,O){function P(ba,W){ba.length>W&&(ba=ba.substring(0,Math.round(W/2))+"..."+ba.substring(ba.length-
+Math.round(W/4)));return ba}y=null!=y?y:"javascript:void(0);";if(null==O||0==O.length)O=this.isCustomLink(y)?this.getLinkTitle(y):y;var X=document.createElement("a");X.setAttribute("rel",this.linkRelation);X.setAttribute("href",this.getAbsoluteUrl(y));X.setAttribute("title",P(this.isCustomLink(y)?this.getLinkTitle(y):y,80));null!=this.linkTarget&&X.setAttribute("target",this.linkTarget);mxUtils.write(X,P(O,40));this.isCustomLink(y)&&mxEvent.addListener(X,"click",mxUtils.bind(this,function(ba){this.customLinkClicked(y);
+mxEvent.consume(ba)}));return X};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(W,ea){this.popupMenuHandler.hideMenu()});var y=this.updateMouseEvent;this.updateMouseEvent=function(W){W=y.apply(this,arguments);if(mxEvent.isTouchEvent(W.getEvent())&&null==W.getState()){var ea=this.getCellAt(W.graphX,W.graphY);null!=ea&&this.isSwimlane(ea)&&this.hitsSwimlaneContent(ea,
W.graphX,W.graphY)||(W.state=this.view.getState(ea),null!=W.state&&null!=W.state.shape&&(this.container.style.cursor=W.state.shape.node.style.cursor))}null==W.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return W};var O=!1,P=!1,X=!1,ba=this.fireMouseEvent;this.fireMouseEvent=function(W,ea,ta){W==mxEvent.MOUSE_DOWN&&(ea=this.updateMouseEvent(ea),O=this.isCellSelected(ea.getCell()),P=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ba.apply(this,arguments)};
this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(W,ea){var ta=mxEvent.isMouseEvent(ea.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ea.getState()||!ea.isSource(ea.getState().control))&&(this.popupMenuHandler.popupTrigger||!X&&!ta&&(P&&null==ea.getCell()&&this.isSelectionEmpty()||O&&this.isCellSelected(ea.getCell())));ta=!O||ta?null:mxUtils.bind(this,function(qa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var va=mxUtils.getScrollOrigin();
-this.popupMenuHandler.popup(ea.getX()+va.x+1,ea.getY()+va.y+1,qa,ea.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[W,ea,ta])})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);return null!=x&&1==x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x=
-"";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var O=this.textarea.ownerDocument.defaultView.getSelection(),P=O.getRangeAt(0),X="\t";if(null!=x)for(X="";0<x;)X+=" ",x--;x=document.createElement("span");x.style.whiteSpace="pre";x.appendChild(document.createTextNode(X));P.insertNode(x);P.setStartAfter(x);P.setEndAfter(x);O.removeAllRanges();
-O.addRange(P)};mxCellEditor.prototype.alignText=function(x,O){var P=null!=O&&mxEvent.isShiftDown(O);if(P||null!=window.getSelection&&null!=window.getSelection().containsNode){var X=!0;this.graph.processElements(this.textarea,function(ba){P||window.getSelection().containsNode(ba,!0)?(ba.removeAttribute("align"),ba.style.textAlign=null):X=!1});X&&this.graph.cellEditor.setAlign(x)}document.execCommand("justify"+x.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=
-window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var O=[],P=0,X=x.rangeCount;P<X;++P)O.push(x.getRangeAt(P));return O}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(x){try{if(x)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var O=0,P=x.length;O<P;++O)sel.addRange(x[O])}else document.selection&&x.select&&x.select()}catch(X){}};var g=mxCellRenderer.prototype.initializeLabel;
-mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));g.apply(this,arguments)};var v=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,O){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?v.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
-!1;var y=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,O){x=this.graph.getStartEditingCell(x,O);y.apply(this,arguments);var P=this.graph.view.getState(x);this.textarea.className=null!=P&&1==P.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x);P=this.graph.getModel().getParent(x);var X=this.graph.getCellGeometry(x);if(this.graph.getModel().isEdge(P)&&null!=
-X&&X.relative||this.graph.getModel().isEdge(x))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(x){function O(ba,W){W.originalNode=ba;ba=ba.firstChild;for(var ea=W.firstChild;null!=ba&&null!=ea;)O(ba,ea),ba=ba.nextSibling,ea=ea.nextSibling;return W}function P(ba,W){if(null!=ba)if(W.originalNode!=ba)X(ba);else for(ba=ba.firstChild,W=W.firstChild;null!=
+this.popupMenuHandler.popup(ea.getX()+va.x+1,ea.getY()+va.y+1,qa,ea.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[W,ea,ta])})};mxCellEditor.prototype.isContentEditing=function(){var y=this.graph.view.getState(this.editingCell);return null!=y&&1==y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y=
+"";window.getSelection?y=window.getSelection():document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var O=this.textarea.ownerDocument.defaultView.getSelection(),P=O.getRangeAt(0),X="\t";if(null!=y)for(X="";0<y;)X+=" ",y--;y=document.createElement("span");y.style.whiteSpace="pre";y.appendChild(document.createTextNode(X));P.insertNode(y);P.setStartAfter(y);P.setEndAfter(y);O.removeAllRanges();
+O.addRange(P)};mxCellEditor.prototype.alignText=function(y,O){var P=null!=O&&mxEvent.isShiftDown(O);if(P||null!=window.getSelection&&null!=window.getSelection().containsNode){var X=!0;this.graph.processElements(this.textarea,function(ba){P||window.getSelection().containsNode(ba,!0)?(ba.removeAttribute("align"),ba.style.textAlign=null):X=!1});X&&this.graph.cellEditor.setAlign(y)}document.execCommand("justify"+y.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=
+window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var O=[],P=0,X=y.rangeCount;P<X;++P)O.push(y.getRangeAt(P));return O}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var O=0,P=y.length;O<P;++O)sel.addRange(y[O])}else document.selection&&y.select&&y.select()}catch(X){}};var g=mxCellRenderer.prototype.initializeLabel;
+mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));g.apply(this,arguments)};var v=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,O){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?v.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
+!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,O){y=this.graph.getStartEditingCell(y,O);x.apply(this,arguments);var P=this.graph.view.getState(y);this.textarea.className=null!=P&&1==P.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y);P=this.graph.getModel().getParent(y);var X=this.graph.getCellGeometry(y);if(this.graph.getModel().isEdge(P)&&null!=
+X&&X.relative||this.graph.getModel().isEdge(y))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var B=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(y){function O(ba,W){W.originalNode=ba;ba=ba.firstChild;for(var ea=W.firstChild;null!=ba&&null!=ea;)O(ba,ea),ba=ba.nextSibling,ea=ea.nextSibling;return W}function P(ba,W){if(null!=ba)if(W.originalNode!=ba)X(ba);else for(ba=ba.firstChild,W=W.firstChild;null!=
ba;){var ea=ba.nextSibling;null==W?X(ba):(P(ba,W),W=W.nextSibling);ba=ea}}function X(ba){for(var W=ba.firstChild;null!=W;){var ea=W.nextSibling;X(W);W=ea}1==ba.nodeType&&("BR"===ba.nodeName||null!=ba.firstChild)||3==ba.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(ba)).length?(3==ba.nodeType&&mxUtils.setTextContent(ba,mxUtils.getTextContent(ba).replace(/\n|\r/g,"")),1==ba.nodeType&&(ba.removeAttribute("style"),ba.removeAttribute("class"),ba.removeAttribute("width"),ba.removeAttribute("cellpadding"),
-ba.removeAttribute("cellspacing"),ba.removeAttribute("border"))):ba.parentNode.removeChild(ba)}C.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ba){var W=O(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]>")?P(this.textarea,
-W):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var O=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),P=this.saveSelection();if(this.codeViewMode){ta=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ta.length&&"\n"==ta.charAt(ta.length-1)&&(ta=ta.substring(0,ta.length-1));ta=this.graph.sanitizeHtml(O?ta.replace(/\n/g,"<br/>"):ta,!0);this.textarea.className="mxCellEditor geContentEditable";
-qa=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);O=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ba=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,W=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ea=[];(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ea.push("underline");(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ea.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration=ea.join(" ");this.textarea.style.fontWeight=ba?"bold":"normal";
+ba.removeAttribute("cellspacing"),ba.removeAttribute("border"))):ba.parentNode.removeChild(ba)}B.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ba){var W=O(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]>")?P(this.textarea,
+W):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);if(null!=y){var O=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),P=this.saveSelection();if(this.codeViewMode){ta=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ta.length&&"\n"==ta.charAt(ta.length-1)&&(ta=ta.substring(0,ta.length-1));ta=this.graph.sanitizeHtml(O?ta.replace(/\n/g,"<br/>"):ta,!0);this.textarea.className="mxCellEditor geContentEditable";
+qa=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);O=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ba=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,W=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ea=[];(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ea.push("underline");(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ea.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration=ea.join(" ");this.textarea.style.fontWeight=ba?"bold":"normal";
this.textarea.style.fontStyle=W?"italic":"";this.textarea.style.fontFamily=O;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta,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 ta=mxUtils.htmlEntities(this.textarea.innerHTML);
8!=document.documentMode&&(ta=mxUtils.replaceTrailingNewlines(ta,"<div><br></div>"));ta=this.graph.sanitizeHtml(O?ta.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ta,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var qa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"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!=ta&&(this.textarea.innerHTML=ta);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=P;this.resize()}};var I=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,
-O){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var P=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*P;this.bounds.height=60*P;var X=null!=x.text?x.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
+"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!=ta&&(this.textarea.innerHTML=ta);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=P;this.resize()}};var I=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,
+O){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var P=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*P;this.bounds.height=60*P;var X=null!=y.text?y.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/P)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/P)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/P)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*P);this.textarea.clientWidth<
this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/P)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*P);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("+P+","+P+")")}else this.textarea.style.height="",this.textarea.style.overflow="",I.apply(this,arguments)};mxCellEditorGetInitialValue=
-mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,O){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var P=this.graph.getEditingValue(x.cell,O);"1"==mxUtils.getValue(x.style,"nl2Br","1")&&(P=P.replace(/\n/g,"<br/>"));return P=this.graph.sanitizeHtml(P,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,
-"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var O=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return O="1"==mxUtils.getValue(x.style,"nl2Br","1")?O.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):O.replace(/\r\n/g,"").replace(/\n/g,"")};var D=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();D.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};
-var N=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,O){this.graph.getModel().beginUpdate();try{N.apply(this,arguments),""==O&&this.graph.isCellDeletable(x.cell)&&0==this.graph.model.getChildCount(x.cell)&&this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){var O=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=O&&O!=mxConstants.NONE||
-!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(x.style,mxConstants.STYLE_FILLCOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getBorderColor=function(x){var O=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=O&&O!=mxConstants.NONE||!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,
-mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(x.style,mxConstants.STYLE_STROKECOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getMinimumSize=function(x){var O=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*O+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,O){return mxGraphHandlerIsValidDropTarget.apply(this,
-arguments)&&!mxEvent.isAltDown(O.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?d(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var O=this.graph.view.translate,P=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/P-O.x);O=this.roundLength((this.bounds.y+this.currentDy)/P-O.y);P=this.graph.view.unit;
-this.hint.innerHTML=d(x,P)+", "+d(O,P);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 G=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,O){G.apply(this,arguments);var P=this.graph.getCellStyle(x);
-if(null==P.childLayout){var X=this.graph.model.getParent(x),ba=null!=X?this.graph.getCellGeometry(X):null;if(null!=ba&&(P=this.graph.getCellStyle(X),"stackLayout"==P.childLayout)){var W=parseFloat(mxUtils.getValue(P,"stackBorder",mxStackLayout.prototype.border));P="1"==mxUtils.getValue(P,"horizontalStack","1");var ea=this.graph.getActualStartSize(X);ba=ba.clone();P?ba.height=O.height+ea.y+ea.height+2*W:ba.width=O.width+ea.x+ea.width+2*W;this.graph.model.setGeometry(X,ba)}}};var ia=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
-mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(ta){P.get(ta)||(P.put(ta,!0),ba.push(ta))}for(var O=ia.apply(this,arguments),P=new mxDictionary,X=this.graph.model,ba=[],W=0;W<O.length;W++){var ea=O[W];this.graph.isTableCell(ea)?x(X.getParent(X.getParent(ea))):this.graph.isTableRow(ea)&&x(X.getParent(ea));x(ea)}return ba};var ka=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var O=ka.apply(this,
-arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};var ja=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(x){var O=ja.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-
-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,O){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(O.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(x,O){return mxEvent.isControlDown(O.getEvent())||mxEvent.isMetaDown(O.getEvent())};var ca=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ca.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&
+mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,O){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var P=this.graph.getEditingValue(y.cell,O);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(P=P.replace(/\n/g,"<br/>"));return P=this.graph.sanitizeHtml(P,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,
+"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var O=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return O="1"==mxUtils.getValue(y.style,"nl2Br","1")?O.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):O.replace(/\r\n/g,"").replace(/\n/g,"")};var D=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();D.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};
+var N=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,O){this.graph.getModel().beginUpdate();try{N.apply(this,arguments),""==O&&this.graph.isCellDeletable(y.cell)&&0==this.graph.model.getChildCount(y.cell)&&this.graph.isTransparentState(y)&&this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(y){var O=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=O&&O!=mxConstants.NONE||
+!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(y.style,mxConstants.STYLE_FILLCOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getBorderColor=function(y){var O=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=O&&O!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,
+mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(y.style,mxConstants.STYLE_STROKECOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getMinimumSize=function(y){var O=this.graph.getView().scale;return new mxRectangle(0,0,null==y.text?30:y.text.size*O+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(y,O){return mxGraphHandlerIsValidDropTarget.apply(this,
+arguments)&&!mxEvent.isAltDown(O.getEvent)};mxGraphView.prototype.formatUnitText=function(y){return y?e(y,this.unit):y};mxGraphHandler.prototype.updateHint=function(y){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var O=this.graph.view.translate,P=this.graph.view.scale;y=this.roundLength((this.bounds.x+this.currentDx)/P-O.x);O=this.roundLength((this.bounds.y+this.currentDy)/P-O.y);P=this.graph.view.unit;
+this.hint.innerHTML=e(y,P)+", "+e(O,P);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 G=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,O){G.apply(this,arguments);var P=this.graph.getCellStyle(y);
+if(null==P.childLayout){var X=this.graph.model.getParent(y),ba=null!=X?this.graph.getCellGeometry(X):null;if(null!=ba&&(P=this.graph.getCellStyle(X),"stackLayout"==P.childLayout)){var W=parseFloat(mxUtils.getValue(P,"stackBorder",mxStackLayout.prototype.border));P="1"==mxUtils.getValue(P,"horizontalStack","1");var ea=this.graph.getActualStartSize(X);ba=ba.clone();P?ba.height=O.height+ea.y+ea.height+2*W:ba.width=O.width+ea.x+ea.width+2*W;this.graph.model.setGeometry(X,ba)}}};var ia=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
+mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(ta){P.get(ta)||(P.put(ta,!0),ba.push(ta))}for(var O=ia.apply(this,arguments),P=new mxDictionary,X=this.graph.model,ba=[],W=0;W<O.length;W++){var ea=O[W];this.graph.isTableCell(ea)?y(X.getParent(X.getParent(ea))):this.graph.isTableRow(ea)&&y(X.getParent(ea));y(ea)}return ba};var ka=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var O=ka.apply(this,
+arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};var ja=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(y){var O=ja.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-
+y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,O){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(O.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(y,O){return mxEvent.isControlDown(O.getEvent())||mxEvent.isMetaDown(O.getEvent())};var ca=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ca.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 pa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return pa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ra=mxVertexHandler.prototype.isCustomHandleVisible;
-mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||ra.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};
-var V=null,R=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var x=R.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var O=function(Qa,Fa,Ka){for(var Pa=[],$a=0;$a<Qa.length;$a++){var eb=Qa[$a];Pa.push(null==eb?null:new mxPoint((qa+eb.x+Fa)*W,(va+eb.y+Ka)*W))}return Pa},P=this,X=this.graph,ba=X.model,W=X.view.scale,ea=this.state,ta=this.selectionBorder,qa=this.state.origin.x+X.view.translate.x,
-va=this.state.origin.y+X.view.translate.y;null==x&&(x=[]);var Ea=X.view.getCellStates(ba.getChildCells(this.state.cell,!0));if(0<Ea.length){var Ca=ba.getChildCells(Ea[0].cell,!0),Ma=X.getTableLines(this.state.cell,!1,!0),Sa=X.getTableLines(this.state.cell,!0,!1);for(ba=0;ba<Ea.length;ba++)mxUtils.bind(this,function(Qa){var Fa=Ea[Qa],Ka=Qa<Ea.length-1?Ea[Qa+1]:null;Ka=null!=Ka?X.getCellGeometry(Ka.cell):null;var Pa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Sa[Qa]?new V(Sa[Qa],
+mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||ra.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&(y=2);return y};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};
+var V=null,R=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var y=R.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var O=function(Qa,Fa,Ka){for(var Pa=[],$a=0;$a<Qa.length;$a++){var eb=Qa[$a];Pa.push(null==eb?null:new mxPoint((qa+eb.x+Fa)*W,(va+eb.y+Ka)*W))}return Pa},P=this,X=this.graph,ba=X.model,W=X.view.scale,ea=this.state,ta=this.selectionBorder,qa=this.state.origin.x+X.view.translate.x,
+va=this.state.origin.y+X.view.translate.y;null==y&&(y=[]);var Ea=X.view.getCellStates(ba.getChildCells(this.state.cell,!0));if(0<Ea.length){var Ca=ba.getChildCells(Ea[0].cell,!0),Ma=X.getTableLines(this.state.cell,!1,!0),Sa=X.getTableLines(this.state.cell,!0,!1);for(ba=0;ba<Ea.length;ba++)mxUtils.bind(this,function(Qa){var Fa=Ea[Qa],Ka=Qa<Ea.length-1?Ea[Qa+1]:null;Ka=null!=Ka?X.getCellGeometry(Ka.cell):null;var Pa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Sa[Qa]?new V(Sa[Qa],
mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ka.isDashed=ta.isDashed;Ka.svgStrokeTolerance++;Fa=new mxHandle(Fa,"row-resize",null,Ka);Fa.tableHandle=!0;var $a=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==$a?mxConstants.NONE:ta.stroke;if(this.shape.constructor==V)this.shape.line=O(Sa[Qa],0,$a),this.shape.updateBoundsFromLine();else{var cb=X.getActualStartSize(ea.cell,
!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+$a*W;this.shape.bounds.x=ea.x+(Qa==Ea.length-1?0:cb.x*W);this.shape.bounds.width=ea.width-(Qa==Ea.length-1?0:cb.width+cb.x+W)}this.shape.redraw()}};var eb=!1;Fa.setPosition=function(cb,db,rb){$a=Math.max(Graph.minTableRowHeight-cb.height,db.y-cb.y-cb.height);eb=mxEvent.isShiftDown(rb.getEvent());null!=Pa&&eb&&($a=Math.min($a,Pa.height-Graph.minTableRowHeight))};Fa.execute=function(cb){if(0!=$a)X.setTableRowHeight(this.state.cell,
-$a,!eb);else if(!P.blockDelayedSelection){var db=X.getCellAt(cb.getGraphX(),cb.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(db,cb)}$a=0};Fa.reset=function(){$a=0};x.push(Fa)})(ba);for(ba=0;ba<Ca.length;ba++)mxUtils.bind(this,function(Qa){var Fa=X.view.getState(Ca[Qa]),Ka=X.getCellGeometry(Ca[Qa]),Pa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Fa&&(Fa=new mxCellState(X.view,Ca[Qa],X.getCellStyle(Ca[Qa])),Fa.x=ea.x+Ka.x*W,Fa.y=ea.y+Ka.y*W,Fa.width=Pa.width*W,Fa.height=Pa.height*
+$a,!eb);else if(!P.blockDelayedSelection){var db=X.getCellAt(cb.getGraphX(),cb.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(db,cb)}$a=0};Fa.reset=function(){$a=0};y.push(Fa)})(ba);for(ba=0;ba<Ca.length;ba++)mxUtils.bind(this,function(Qa){var Fa=X.view.getState(Ca[Qa]),Ka=X.getCellGeometry(Ca[Qa]),Pa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Fa&&(Fa=new mxCellState(X.view,Ca[Qa],X.getCellStyle(Ca[Qa])),Fa.x=ea.x+Ka.x*W,Fa.y=ea.y+Ka.y*W,Fa.width=Pa.width*W,Fa.height=Pa.height*
W,Fa.updateCachedBounds());Ka=Qa<Ca.length-1?Ca[Qa+1]:null;Ka=null!=Ka?X.getCellGeometry(Ka):null;var $a=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Ma[Qa]?new V(Ma[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ka.isDashed=ta.isDashed;Ka.svgStrokeTolerance++;Fa=new mxHandle(Fa,"col-resize",null,Ka);Fa.tableHandle=!0;var eb=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=
0==eb?mxConstants.NONE:ta.stroke;if(this.shape.constructor==V)this.shape.line=O(Ma[Qa],eb,0),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(ea.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Pa.width+eb)*W;this.shape.bounds.y=ea.y+(Qa==Ca.length-1?0:db.y*W);this.shape.bounds.height=ea.height-(Qa==Ca.length-1?0:(db.height+db.y)*W)}this.shape.redraw()}};var cb=!1;Fa.setPosition=function(db,rb,mb){eb=Math.max(Graph.minTableColumnWidth-Pa.width,rb.x-db.x-Pa.width);
-cb=mxEvent.isShiftDown(mb.getEvent());null==$a||cb||(eb=Math.min(eb,$a.width-Graph.minTableColumnWidth))};Fa.execute=function(db){if(0!=eb)X.setTableColumnWidth(this.state.cell,eb,cb);else if(!P.blockDelayedSelection){var rb=X.getCellAt(db.getGraphX(),db.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(rb,db)}eb=0};Fa.positionChanged=function(){};Fa.reset=function(){eb=0};x.push(Fa)})(ba)}}return null!=x?x.reverse():null};var Y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
-function(x){Y.apply(this,arguments);if(null!=this.moveHandles)for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].style.visibility=x?"":"hidden";if(null!=this.cornerHandles)for(O=0;O<this.cornerHandles.length;O++)this.cornerHandles[O].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.graph.model;if(null!=this.moveHandles){for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].parentNode.removeChild(this.moveHandles[O]);this.moveHandles=
-null}this.moveHandles=[];for(O=0;O<x.getChildCount(this.state.cell);O++)mxUtils.bind(this,function(P){if(null!=P&&x.isVertex(P.cell)){var X=mxUtils.createImage(Editor.rowMoveImage);X.style.position="absolute";X.style.cursor="pointer";X.style.width="7px";X.style.height="4px";X.style.padding="4px 2px 4px 2px";X.rowState=P;mxEvent.addGestureListeners(X,mxUtils.bind(this,function(ba){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(ba)&&this.graph.isCellSelected(P.cell)||
+cb=mxEvent.isShiftDown(mb.getEvent());null==$a||cb||(eb=Math.min(eb,$a.width-Graph.minTableColumnWidth))};Fa.execute=function(db){if(0!=eb)X.setTableColumnWidth(this.state.cell,eb,cb);else if(!P.blockDelayedSelection){var rb=X.getCellAt(db.getGraphX(),db.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(rb,db)}eb=0};Fa.positionChanged=function(){};Fa.reset=function(){eb=0};y.push(Fa)})(ba)}}return null!=y?y.reverse():null};var Y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
+function(y){Y.apply(this,arguments);if(null!=this.moveHandles)for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].style.visibility=y?"":"hidden";if(null!=this.cornerHandles)for(O=0;O<this.cornerHandles.length;O++)this.cornerHandles[O].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var y=this.graph.model;if(null!=this.moveHandles){for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].parentNode.removeChild(this.moveHandles[O]);this.moveHandles=
+null}this.moveHandles=[];for(O=0;O<y.getChildCount(this.state.cell);O++)mxUtils.bind(this,function(P){if(null!=P&&y.isVertex(P.cell)){var X=mxUtils.createImage(Editor.rowMoveImage);X.style.position="absolute";X.style.cursor="pointer";X.style.width="7px";X.style.height="4px";X.style.padding="4px 2px 4px 2px";X.rowState=P;mxEvent.addGestureListeners(X,mxUtils.bind(this,function(ba){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(ba)&&this.graph.isCellSelected(P.cell)||
this.graph.selectCellForEvent(P.cell,ba);mxEvent.isPopupTrigger(ba)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(ba),mxEvent.getClientY(ba),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(ba),this.graph.isMouseDown=!0);mxEvent.consume(ba)}),null,mxUtils.bind(this,function(ba){mxEvent.isPopupTrigger(ba)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(ba),mxEvent.getClientY(ba),P.cell,ba),mxEvent.consume(ba))}));
-this.moveHandles.push(X);this.graph.container.appendChild(X)}})(this.graph.view.getState(x.getChildAt(this.state.cell,O)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var x=0;x<this.customHandles.length;x++)this.customHandles[x].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var Z=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,
+this.moveHandles.push(X);this.graph.container.appendChild(X)}})(this.graph.view.getState(y.getChildAt(this.state.cell,O)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var y=0;y<this.customHandles.length;y++)this.customHandles[y].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var Z=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,
0),O=this.tolerance,P=this.state.style.shape;null==mxCellRenderer.defaultShapes[P]&&mxStencilRegistry.getStencil(P);P=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!P&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ba=this.customHandles[X].shape.bounds,W=ba.getCenterX(),ea=ba.getCenterY();if(Math.abs(this.state.x-W)<ba.width/2||Math.abs(this.state.y-
-ea)<ba.height/2||Math.abs(this.state.x+this.state.width-W)<ba.width/2||Math.abs(this.state.y+this.state.height-ea)<ba.height/2){P=!0;break}}P&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(O/=2,this.graph.isTable(this.state.cell)&&(O+=7),x.x=this.sizers[0].bounds.width+O,x.y=this.sizers[0].bounds.height+O):x=Z.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
-if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{x=this.state.view.scale;var O=this.state.view.unit;this.hint.innerHTML=d(this.roundLength(this.bounds.width/x),O)+" x "+d(this.roundLength(this.bounds.height/x),O)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
-x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,O){la.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display=
-"none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,O){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,O){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var P=this.graph.view.translate,X=this.graph.view.scale,ba=this.roundLength(O.x/X-P.x);P=this.roundLength(O.y/X-P.y);X=this.graph.view.unit;this.hint.innerHTML=
-d(ba,X)+", "+d(P,X);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(ba=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*ba.x)+"%, "+Math.round(100*ba.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),O.y)+Editor.hintOffset+
+ea)<ba.height/2||Math.abs(this.state.x+this.state.width-W)<ba.width/2||Math.abs(this.state.y+this.state.height-ea)<ba.height/2){P=!0;break}}P&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(O/=2,this.graph.isTable(this.state.cell)&&(O+=7),y.x=this.sizers[0].bounds.width+O,y.y=this.sizers[0].bounds.height+O):y=Z.apply(this,arguments);return y};mxVertexHandler.prototype.updateHint=function(y){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
+if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{y=this.state.view.scale;var O=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/y),O)+" x "+e(this.roundLength(this.bounds.height/y),O)}y=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==y&&(y=this.bounds);this.hint.style.left=y.x+Math.round((y.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
+y.y+y.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,O){la.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display=
+"none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,O){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(y,O){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var P=this.graph.view.translate,X=this.graph.view.scale,ba=this.roundLength(O.x/X-P.x);P=this.roundLength(O.y/X-P.y);X=this.graph.view.unit;this.hint.innerHTML=
+e(ba,X)+", "+e(P,X);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(ba=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*ba.x)+"%, "+Math.round(100*ba.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.getGraphY(),O.y)+Editor.hintOffset+
"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,
9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
@@ -2652,78 +2656,78 @@ HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" f
mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=
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(x){return!mxEvent.isShiftDown(x.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(x){return!mxEvent.isShiftDown(x.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(x){return mxEvent.isMouseEvent(x.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(x){var O=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(O)||mxEvent.isPopupTrigger(O)&&(null==x.getState()||mxEvent.isControlDown(O)||mxEvent.isShiftDown(O))};var F=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
-function(x,O){F.apply(this,arguments);mxEvent.isTouchEvent(O.getEvent())&&this.graph.isCellSelected(O.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var O=x.getEvent();return mxEvent.isLeftMouseButton(O)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(O)&&!mxEvent.isShiftDown(O))||this.usePopupTrigger&&mxEvent.isPopupTrigger(O)};mxRubberband.prototype.isSpaceEvent=function(x){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,O){if(this.cancelled)this.cancelled=!1,O.consume();else{var P=null!=this.div&&"none"!=this.div.style.display,X=null,ba=null,W=x=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ba=this.first.y,x=(this.currentX-X)/this.graph.view.scale,W=(this.currentY-ba)/this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(x=this.graph.snap(x),W=this.graph.snap(W),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(W)<this.graph.tolerance&&(W=0))));this.reset();if(P){if(this.isSpaceEvent(O)){this.graph.model.beginUpdate();try{var ea=this.graph.getCellsBeyond(X,ba,this.graph.getDefaultParent(),
-!0,!0);for(P=0;P<ea.length;P++)if(this.graph.isCellMovable(ea[P])){var ta=this.graph.view.getState(ea[P]),qa=this.graph.getCellGeometry(ea[P]);null!=ta&&null!=qa&&(qa=qa.clone(),qa.translate(x,W),this.graph.model.setGeometry(ea[P],qa))}}finally{this.graph.model.endUpdate()}}else ea=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ea,O.getEvent());O.consume()}}};mxRubberband.prototype.mouseMove=function(x,O){if(!O.isConsumed()&&null!=this.first){var P=mxUtils.getScrollOrigin(this.graph.container);
-x=mxUtils.getOffset(this.graph.container);P.x-=x.x;P.y-=x.y;x=O.getX()+P.x;P=O.getY()+P.y;var X=this.first.x-x,ba=this.first.y-P,W=this.graph.tolerance;if(null!=this.div||Math.abs(X)>W||Math.abs(ba)>W)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,P),this.isSpaceEvent(O)?(x=this.x+this.width,P=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,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=x-this.width),this.y<this.first.y&&(this.y=P-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",
+!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(y){return!mxEvent.isShiftDown(y.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(y){return!mxEvent.isShiftDown(y.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(y){return mxEvent.isMouseEvent(y.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(y){var O=y.getEvent();return null==y.getState()&&!mxEvent.isMouseEvent(O)||mxEvent.isPopupTrigger(O)&&(null==y.getState()||mxEvent.isControlDown(O)||mxEvent.isShiftDown(O))};var F=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(y,O){F.apply(this,arguments);mxEvent.isTouchEvent(O.getEvent())&&this.graph.isCellSelected(O.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(y){var O=y.getEvent();return mxEvent.isLeftMouseButton(O)&&(this.useLeftButtonForPanning&&null==y.getState()||mxEvent.isControlDown(O)&&!mxEvent.isShiftDown(O))||this.usePopupTrigger&&mxEvent.isPopupTrigger(O)};mxRubberband.prototype.isSpaceEvent=function(y){return this.graph.isEnabled()&&
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,O){if(this.cancelled)this.cancelled=!1,O.consume();else{var P=null!=this.div&&"none"!=this.div.style.display,X=null,ba=null,W=y=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ba=this.first.y,y=(this.currentX-X)/this.graph.view.scale,W=(this.currentY-ba)/this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(y=this.graph.snap(y),W=this.graph.snap(W),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=0),Math.abs(W)<this.graph.tolerance&&(W=0))));this.reset();if(P){if(this.isSpaceEvent(O)){this.graph.model.beginUpdate();try{var ea=this.graph.getCellsBeyond(X,ba,this.graph.getDefaultParent(),
+!0,!0);for(P=0;P<ea.length;P++)if(this.graph.isCellMovable(ea[P])){var ta=this.graph.view.getState(ea[P]),qa=this.graph.getCellGeometry(ea[P]);null!=ta&&null!=qa&&(qa=qa.clone(),qa.translate(y,W),this.graph.model.setGeometry(ea[P],qa))}}finally{this.graph.model.endUpdate()}}else ea=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ea,O.getEvent());O.consume()}}};mxRubberband.prototype.mouseMove=function(y,O){if(!O.isConsumed()&&null!=this.first){var P=mxUtils.getScrollOrigin(this.graph.container);
+y=mxUtils.getOffset(this.graph.container);P.x-=y.x;P.y-=y.y;y=O.getX()+P.x;P=O.getY()+P.y;var X=this.first.x-y,ba=this.first.y-P,W=this.graph.tolerance;if(null!=this.div||Math.abs(X)>W||Math.abs(ba)>W)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(y,P),this.isSpaceEvent(O)?(y=this.x+this.width,P=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,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=y-this.width),this.y<this.first.y&&(this.y=P-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)),O.consume()}};var T=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);T.apply(this,arguments)};var aa=(new Date).getTime(),U=0,da=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(x,O,P,X){da.apply(this,arguments);P!=this.currentTerminalState?(aa=(new Date).getTime(),
-U=0):U=(new Date).getTime()-aa;this.currentTerminalState=P};var fa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<U||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&fa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(x,O,P){O=null!=x&&0==x;var X=this.state.getVisibleTerminalState(O);x=null!=x&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,X,O):null;P=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(O),x):null)?P?this.endFixedHandleImage:this.fixedHandleImage:null!=x&&null!=X?P?this.endTerminalHandleImage:this.terminalHandleImage:P?this.endHandleImage:this.handleImage;if(null!=P)return P=
-new mxImageShape(new mxRectangle(0,0,P.width,P.height),P.src),P.preserveImageAspect=!1,P;P=mxConstants.HANDLE_SIZE;this.preferHtml&&--P;return new mxRectangleShape(new mxRectangle(0,0,P,P),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,O,P){this.handleImage=O==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:O==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return na.apply(this,arguments)};var sa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var O=this.graph.getModel(),P=O.getParent(x[0]),X=this.graph.getCellGeometry(x[0]);if(O.isEdge(P)&&null!=X&&X.relative&&(O=this.graph.view.getState(x[0]),null!=O&&2>O.width&&2>O.height&&null!=O.text&&null!=O.text.boundingBox))return mxRectangle.fromRectangle(O.text.boundingBox)}return sa.apply(this,arguments)};var za=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var x=za.apply(this,arguments),O=[],P=0;P<x.length;P++)"1"!=mxUtils.getValue(x[P].style,"part","0")&&O.push(x[P]);return O};var ua=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var O=this.graph.getModel(),P=O.getParent(x.cell),X=this.graph.getCellGeometry(x.cell);return O.isEdge(P)&&null!=X&&X.relative&&2>x.width&&2>x.height&&null!=x.text&&null!=x.text.boundingBox?(O=x.text.unrotatedBoundingBox||
-x.text.boundingBox,new mxRectangle(Math.round(O.x),Math.round(O.y),Math.round(O.width),Math.round(O.height))):ua.apply(this,arguments)};var Ba=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,O){var P=this.graph.getModel(),X=P.getParent(this.state.cell),ba=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(O)==mxEvent.ROTATION_HANDLE||!P.isEdge(X)||null==ba||!ba.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ba.apply(this,
-arguments)};mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),O=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&O==mxConstants.NONE?(x=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,x,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var oa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,O){oa.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 Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(x,O){Aa.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 ya=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ya.apply(this,arguments);var x=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),O.consume()}};var T=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);T.apply(this,arguments)};var aa=(new Date).getTime(),U=0,da=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(y,O,P,X){da.apply(this,arguments);P!=this.currentTerminalState?(aa=(new Date).getTime(),
+U=0):U=(new Date).getTime()-aa;this.currentTerminalState=P};var fa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<U||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&fa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(y,O,P){O=null!=y&&0==y;var X=this.state.getVisibleTerminalState(O);y=null!=y&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,X,O):null;P=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(O),y):null)?P?this.endFixedHandleImage:this.fixedHandleImage:null!=y&&null!=X?P?this.endTerminalHandleImage:this.terminalHandleImage:P?this.endHandleImage:this.handleImage;if(null!=P)return P=
+new mxImageShape(new mxRectangle(0,0,P.width,P.height),P.src),P.preserveImageAspect=!1,P;P=mxConstants.HANDLE_SIZE;this.preferHtml&&--P;return new mxRectangleShape(new mxRectangle(0,0,P,P),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(y,O,P){this.handleImage=O==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:O==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return na.apply(this,arguments)};var sa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(y){if(null!=y&&1==y.length){var O=this.graph.getModel(),P=O.getParent(y[0]),X=this.graph.getCellGeometry(y[0]);if(O.isEdge(P)&&null!=X&&X.relative&&(O=this.graph.view.getState(y[0]),null!=O&&2>O.width&&2>O.height&&null!=O.text&&null!=O.text.boundingBox))return mxRectangle.fromRectangle(O.text.boundingBox)}return sa.apply(this,arguments)};var za=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var y=za.apply(this,arguments),O=[],P=0;P<y.length;P++)"1"!=mxUtils.getValue(y[P].style,"part","0")&&O.push(y[P]);return O};var ua=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var O=this.graph.getModel(),P=O.getParent(y.cell),X=this.graph.getCellGeometry(y.cell);return O.isEdge(P)&&null!=X&&X.relative&&2>y.width&&2>y.height&&null!=y.text&&null!=y.text.boundingBox?(O=y.text.unrotatedBoundingBox||
+y.text.boundingBox,new mxRectangle(Math.round(O.x),Math.round(O.y),Math.round(O.width),Math.round(O.height))):ua.apply(this,arguments)};var Ba=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(y,O){var P=this.graph.getModel(),X=P.getParent(this.state.cell),ba=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(O)==mxEvent.ROTATION_HANDLE||!P.isEdge(X)||null==ba||!ba.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ba.apply(this,
+arguments)};mxVertexHandler.prototype.rotateClick=function(){var y=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),O=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&y==mxConstants.NONE&&O==mxConstants.NONE?(y=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,y,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
+var oa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,O){oa.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 Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(y,O){Aa.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 ya=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ya.apply(this,arguments);var y=!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 O=0;4>O;O++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}var X=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(ba,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));X()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(ba,W){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-O=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(O,P);if(null!=O||null!=P&&0<P.length)x=!0;x&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(x,O){try{if(null==x&&(null==O||0==O.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=x||null!=O&&0<O.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
-"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x&&(this.linkHint.appendChild(this.graph.createLinkForHint(x)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var P=document.createElement("img");P.className="geAdaptiveAsset";P.setAttribute("src",Editor.editImage);
+O=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(O,P);if(null!=O||null!=P&&0<P.length)y=!0;y&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(y,O){try{if(null==y&&(null==O||0==O.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=y||null!=O&&0<O.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=y&&(this.linkHint.appendChild(this.graph.createLinkForHint(y)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var P=document.createElement("img");P.className="geAdaptiveAsset";P.setAttribute("src",Editor.editImage);
P.setAttribute("title",mxResources.get("editLink"));P.setAttribute("width","11");P.setAttribute("height","11");P.style.marginLeft="10px";P.style.marginBottom="-1px";P.style.cursor="pointer";this.linkHint.appendChild(P);mxEvent.addListener(P,"click",mxUtils.bind(this,function(W){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(W)}));var X=P.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-X.style.marginLeft="4px";this.linkHint.appendChild(X);mxEvent.addListener(X,"click",mxUtils.bind(this,function(W){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(W)}))}if(null!=O)for(P=0;P<O.length;P++){var ba=document.createElement("div");ba.style.marginTop=null!=x||0<P?"6px":"0px";ba.appendChild(this.graph.createLinkForHint(O[P].getAttribute("href"),mxUtils.getTextContent(O[P])));this.linkHint.appendChild(ba)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(W){}};mxEdgeHandler.prototype.updateLinkHint=
-mxVertexHandler.prototype.updateLinkHint;var La=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){La.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var x=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(X,ba){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));x();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var O=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);if(null!=O||null!=P&&0<P.length)this.updateLinkHint(O,
-P),this.redrawHandles()};var Oa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Oa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Na=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)this.moveHandles[x].style.left=this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-
-5+"px",this.moveHandles[x].style.top=this.moveHandles[x].rowState.y+this.moveHandles[x].rowState.height/2-6+"px";if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var O=this.cornerHandles,P=O[0].bounds.height/2;O[0].bounds.x=this.state.x-O[0].bounds.width/2+x;O[0].bounds.y=this.state.y-P+x;O[0].redraw();O[1].bounds.x=O[0].bounds.x+this.state.width-2*x;O[1].bounds.y=O[0].bounds.y;O[1].redraw();O[2].bounds.x=O[0].bounds.x;O[2].bounds.y=this.state.y+this.state.height-2*x;O[2].redraw();O[3].bounds.x=
-O[1].bounds.x;O[3].bounds.y=O[2].bounds.y;O[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Na.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
-O=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),P=mxUtils.getBoundingBox(O,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=P?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,O=null!=this.state.text?this.state.text.boundingBox:null,null==P&&(P=this.state),P=P.y+P.height,null!=O&&(P=Math.max(P,O.y+O.height)),this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px",
-this.linkHint.style.top=Math.round(P+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ia.apply(this,arguments);if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&null!=this.moveHandles[x].parentNode&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}if(null!=this.cornerHandles){for(x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&
-null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
-(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var wa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(wa.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
-Math.round(x.y+x.height+Editor.hintOffset)+"px"}};var ab=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ab.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ya=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ya.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,m,u){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=u?u:1;this.updateBoundsFromLine()}function d(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function l(){mxCylinder.call(this)}function B(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function K(){mxShape.call(this)}function Q(){mxShape.call(this)}
-function e(c,m,u,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=u;this.strokewidth=null!=n?n:1}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function v(){mxCylinder.call(this)}function y(){mxActor.call(this)}function C(){mxActor.call(this)}function I(){mxActor.call(this)}function D(){mxActor.call(this)}function N(){mxActor.call(this)}function G(){mxActor.call(this)}function ia(){mxActor.call(this)}function ka(c,m){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+X.style.marginLeft="4px";this.linkHint.appendChild(X);mxEvent.addListener(X,"click",mxUtils.bind(this,function(W){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(W)}))}if(null!=O)for(P=0;P<O.length;P++){var ba=document.createElement("div");ba.style.marginTop=null!=y||0<P?"6px":"0px";ba.appendChild(this.graph.createLinkForHint(O[P].getAttribute("href"),mxUtils.getTextContent(O[P])));this.linkHint.appendChild(ba)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(W){}};mxEdgeHandler.prototype.updateLinkHint=
+mxVertexHandler.prototype.updateLinkHint;var La=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){La.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var y=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(X,ba){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));y();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var O=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);if(null!=O||null!=P&&0<P.length)this.updateLinkHint(O,
+P),this.redrawHandles()};var Oa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Oa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Na=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var y=0;y<this.moveHandles.length;y++)this.moveHandles[y].style.left=this.moveHandles[y].rowState.x+this.moveHandles[y].rowState.width-
+5+"px",this.moveHandles[y].style.top=this.moveHandles[y].rowState.y+this.moveHandles[y].rowState.height/2-6+"px";if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var O=this.cornerHandles,P=O[0].bounds.height/2;O[0].bounds.x=this.state.x-O[0].bounds.width/2+y;O[0].bounds.y=this.state.y-P+y;O[0].redraw();O[1].bounds.x=O[0].bounds.x+this.state.width-2*y;O[1].bounds.y=O[0].bounds.y;O[1].redraw();O[2].bounds.x=O[0].bounds.x;O[2].bounds.y=this.state.y+this.state.height-2*y;O[2].redraw();O[3].bounds.x=
+O[1].bounds.x;O[3].bounds.y=O[2].bounds.y;O[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Na.apply(this);null!=this.state&&null!=this.linkHint&&(y=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
+O=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),P=mxUtils.getBoundingBox(O,this.state.style[mxConstants.STYLE_ROTATION]||"0",y),y=null!=P?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,O=null!=this.state.text?this.state.text.boundingBox:null,null==P&&(P=this.state),P=P.y+P.height,null!=O&&(P=Math.max(P,O.y+O.height)),this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px",
+this.linkHint.style.top=Math.round(P+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ia.apply(this,arguments);if(null!=this.moveHandles){for(var y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&null!=this.moveHandles[y].parentNode&&this.moveHandles[y].parentNode.removeChild(this.moveHandles[y]);this.moveHandles=null}if(null!=this.cornerHandles){for(y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&&
+null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
+(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var wa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(wa.apply(this),null!=this.state&&null!=this.linkHint)){var y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
+Math.round(y.y+y.height+Editor.hintOffset)+"px"}};var ab=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ab.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ya=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ya.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
+this.changeHandler=null)}}();(function(){function b(c,m,u){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=u?u:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function l(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function K(){mxShape.call(this)}function Q(){mxShape.call(this)}
+function d(c,m,u,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=u;this.strokewidth=null!=n?n:1}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function v(){mxCylinder.call(this)}function x(){mxActor.call(this)}function B(){mxActor.call(this)}function I(){mxActor.call(this)}function D(){mxActor.call(this)}function N(){mxActor.call(this)}function G(){mxActor.call(this)}function ia(){mxActor.call(this)}function ka(c,m){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
this.defaultVariation=m;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ka.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ka.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ka.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ka.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,ka.prototype.curveTo);
this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ka.prototype.arcTo)}function ja(){mxRectangleShape.call(this)}function ca(){mxRectangleShape.call(this)}function pa(){mxActor.call(this)}function ra(){mxActor.call(this)}function L(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function R(){mxRectangleShape.call(this)}function Y(){mxCylinder.call(this)}function Z(){mxShape.call(this)}function la(){mxShape.call(this)}function q(){mxEllipse.call(this)}function F(){mxShape.call(this)}
function T(){mxShape.call(this)}function aa(){mxRectangleShape.call(this)}function U(){mxShape.call(this)}function da(){mxShape.call(this)}function fa(){mxShape.call(this)}function na(){mxShape.call(this)}function sa(){mxShape.call(this)}function za(){mxCylinder.call(this)}function ua(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function oa(){mxDoubleEllipse.call(this)}function Aa(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);this.spacing=0}function La(){mxArrowConnector.call(this);
-this.spacing=0}function Oa(){mxActor.call(this)}function Na(){mxRectangleShape.call(this)}function Ia(){mxActor.call(this)}function wa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Ya(){mxActor.call(this)}function x(){mxActor.call(this)}function O(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxActor.call(this)}function ba(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}
+this.spacing=0}function Oa(){mxActor.call(this)}function Na(){mxRectangleShape.call(this)}function Ia(){mxActor.call(this)}function wa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Ya(){mxActor.call(this)}function y(){mxActor.call(this)}function O(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxActor.call(this)}function ba(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}
function va(){mxRhombus.call(this)}function Ea(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Sa(){mxEllipse.call(this)}function Qa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Pa(c,m,u,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=u;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function $a(){mxConnector.call(this)}
function eb(c,m,u,n,t,z,A,ha,J,xa){A+=J;var ma=n.clone();n.x-=t*(2*A+J);n.y-=z*(2*A+J);t*=A+J;z*=A+J;return function(){c.ellipse(ma.x-t-A,ma.y-z-A,2*A,2*A);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var m=0;m<this.line.length;m++){var u=this.line[m];null!=u&&(u=new mxRectangle(u.x,u.y,this.strokewidth,this.strokewidth),null==c?c=u:c.add(u))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
function(c,m,u,n,t){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,m,u,n){if(null!=m){var t=null;c.begin();for(var z=0;z<m.length;z++){var A=m[z];null!=A&&(null==t?c.moveTo(A.x+u,A.y+n):null!=t&&c.lineTo(A.x+u,A.y+n));t=A}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var m=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var u=null,n=0;n<this.line.length&&!m;n++){var t=this.line[n];null!=t&&null!=u&&(m=mxUtils.rectangleIntersectsSegment(c,
-u,t));u=t}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(d,mxSwimlane);d.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};d.prototype.paintVertexShape=function(c,m,u,n,t){var z=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,A=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Ma.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-u));z||this.outline||!(A&&ha<t||!A&&ha<n)||this.paintForeground(c,m,u,n,t)};d.prototype.paintForeground=function(c,m,u,n,t){if(null!=this.state){var z=this.flipH,A=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=z;z=A;A=ha}c.rotate(-this.getShapeRotation(),z,A,m+n/2,u+t/2);s=this.scale;m=this.bounds.x/s;u=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/
-s;this.paintTableForeground(c,m,u,n,t)}};d.prototype.paintTableForeground=function(c,m,u,n,t){n=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(t=0;t<n.length;t++)b.prototype.paintTableLine(c,n[t],m,u)};d.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-d);mxUtils.extend(k,d);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(l,mxCylinder);l.prototype.size=20;l.prototype.darkOpacity=0;l.prototype.darkOpacity2=0;l.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),A=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+u,t));u=t}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,m,u,n,t){var z=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,A=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Ma.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-u));z||this.outline||!(A&&ha<t||!A&&ha<n)||this.paintForeground(c,m,u,n,t)};e.prototype.paintForeground=function(c,m,u,n,t){if(null!=this.state){var z=this.flipH,A=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=z;z=A;A=ha}c.rotate(-this.getShapeRotation(),z,A,m+n/2,u+t/2);s=this.scale;m=this.bounds.x/s;u=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/
+s;this.paintTableForeground(c,m,u,n,t)}};e.prototype.paintTableForeground=function(c,m,u,n,t){n=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(t=0;t<n.length;t++)b.prototype.paintTableLine(c,n[t],m,u)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
+e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(l,mxCylinder);l.prototype.size=20;l.prototype.darkOpacity=0;l.prototype.darkOpacity2=0;l.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),A=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"darkOpacity2",this.darkOpacity2))));c.translate(m,u);c.begin();c.moveTo(0,0);c.lineTo(n-z,0);c.lineTo(n,z);c.lineTo(n,t);c.lineTo(z,t);c.lineTo(0,t-z);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=A&&(c.setFillAlpha(Math.abs(A)),c.setFillColor(0>A?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-z,0),c.lineTo(n,z),c.lineTo(z,z),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(z,
-z),c.lineTo(z,t),c.lineTo(0,t-z),c.close(),c.fill()),c.begin(),c.moveTo(z,t),c.lineTo(z,z),c.lineTo(0,0),c.moveTo(z,z),c.lineTo(n,z),c.end(),c.stroke())};l.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",l);var cb=Math.tan(mxUtils.toRadians(30)),db=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(B,
-mxCylinder);B.prototype.size=6;B.prototype.paintVertexShape=function(c,m,u,n,t){c.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(n-z),u+.5*(t-z),z,z);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,u,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",B);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,m,u,n,t){m=Math.min(n,t/cb);c.translate((n-m)/2,(t-m)/2+m/4);c.moveTo(0,
+z),c.lineTo(z,t),c.lineTo(0,t-z),c.close(),c.fill()),c.begin(),c.moveTo(z,t),c.lineTo(z,z),c.lineTo(0,0),c.moveTo(z,z),c.lineTo(n,z),c.end(),c.stroke())};l.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",l);var cb=Math.tan(mxUtils.toRadians(30)),db=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C,
+mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,m,u,n,t){c.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(n-z),u+.5*(t-z),z,z);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,u,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,m,u,n,t){m=Math.min(n,t/cb);c.translate((n-m)/2,(t-m)/2+m/4);c.moveTo(0,
.25*m);c.lineTo(.5*m,m*db);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-db)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,m,u,n,t,z){m=Math.min(n,t/(.5+cb));z?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-db)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-db)*m),c.lineTo(.5*m,(1-db)*m)):(c.translate((n-m)/2,(t-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*db),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*
m,(1-db)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(M,mxCylinder);M.prototype.redrawPath=function(c,m,u,n,t,z){m=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(z&&null!=this.fill||!z&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,
-m);z||(c.moveTo(0,m),c.curveTo(0,-m/3,n,-m/3,n,m),c.lineTo(n,t-m),c.curveTo(n,t+m/3,0,t+m/3,0,t-m),c.close())};M.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",M);mxUtils.extend(S,mxCylinder);S.prototype.size=30;S.prototype.darkOpacity=0;S.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",
this.size))))),A=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,u);c.begin();c.moveTo(0,0);c.lineTo(n-z,0);c.lineTo(n,z);c.lineTo(n,t);c.lineTo(0,t);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=A&&(c.setFillAlpha(Math.abs(A)),c.setFillColor(0>A?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-z,0),c.lineTo(n-z,z),c.lineTo(n,z),c.close(),c.fill()),c.begin(),c.moveTo(n-z,0),c.lineTo(n-z,z),c.lineTo(n,z),
c.end(),c.stroke())};mxCellRenderer.registerShape("note",S);mxUtils.extend(H,S);mxCellRenderer.registerShape("note2",H);H.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(K,mxShape);K.prototype.isoAngle=15;K.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
"isoAngle",this.isoAngle))))*Math.PI/200;z=Math.min(n*Math.tan(z),.5*t);c.translate(m,u);c.begin();c.moveTo(.5*n,0);c.lineTo(n,z);c.lineTo(n,t-z);c.lineTo(.5*n,t);c.lineTo(0,t-z);c.lineTo(0,z);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,z);c.lineTo(.5*n,2*z);c.lineTo(n,z);c.moveTo(.5*n,2*z);c.lineTo(.5*n,t);c.stroke()};mxCellRenderer.registerShape("isoCube2",K);mxUtils.extend(Q,mxShape);Q.prototype.size=15;Q.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(.5*
-t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,u);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke())};mxCellRenderer.registerShape("cylinder2",Q);mxUtils.extend(e,mxCylinder);e.prototype.size=
-15;e.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),A=mxUtils.getValue(this.style,"lid",!0);c.translate(m,u);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),A?(c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z)):(c.moveTo(0,0),c.arcTo(.5*n,z,0,0,0,.5*n,z),c.arcTo(.5*n,z,0,0,0,n,0)),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),
-A&&(c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke()))};mxCellRenderer.registerShape("cylinder3",e);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(c,m,u,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(g,mxCylinder);g.prototype.tabWidth=60;g.prototype.tabHeight=20;g.prototype.tabPosition="right";g.prototype.arcSize=.1;
+t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,u);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke())};mxCellRenderer.registerShape("cylinder2",Q);mxUtils.extend(d,mxCylinder);d.prototype.size=
+15;d.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),A=mxUtils.getValue(this.style,"lid",!0);c.translate(m,u);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),A?(c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z)):(c.moveTo(0,0),c.arcTo(.5*n,z,0,0,0,.5*n,z),c.arcTo(.5*n,z,0,0,0,n,0)),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),
+A&&(c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke()))};mxCellRenderer.registerShape("cylinder3",d);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(c,m,u,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",f);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,m,u,n,t){c.translate(m,u);m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));u=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),A=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),J=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(J*=Math.min(n,t));
J=Math.min(J,.5*n,.5*(t-u));m=Math.max(m,J);m=Math.min(n-J,m);A||(J=0);c.begin();"left"==z?(c.moveTo(Math.max(J,0),u),c.lineTo(Math.max(J,0),0),c.lineTo(m,0),c.lineTo(m,u)):(c.moveTo(n-m,u),c.lineTo(n-m,0),c.lineTo(n-Math.max(J,0),0),c.lineTo(n-Math.max(J,0),u));A?(c.moveTo(0,J+u),c.arcTo(J,J,0,0,1,J,u),c.lineTo(n-J,u),c.arcTo(J,J,0,0,1,n,J+u),c.lineTo(n,t-J),c.arcTo(J,J,0,0,1,n-J,t),c.lineTo(J,t),c.arcTo(J,J,0,0,1,0,t-J)):(c.moveTo(0,u),c.lineTo(n,u),c.lineTo(n,t),c.lineTo(0,t));c.close();c.fillAndStroke();
c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,u+20),c.lineTo(n-20,u+10),c.lineTo(n-10,u+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var u=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(z*=Math.min(c.width,c.height));z=Math.min(z,.5*c.width,.5*(c.height-m));n||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(c.width,c.width-u),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-u),0,z,Math.min(c.height,c.height-
m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(v,mxCylinder);v.prototype.arcSize=.1;v.prototype.paintVertexShape=function(c,m,u,n,t){c.translate(m,u);var z=mxUtils.getValue(this.style,"rounded",!1),A=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u=mxUtils.getValue(this.style,"umlStateConnection",null);A||(m*=Math.min(n,t));m=Math.min(m,.5*n,.5*t);z||(m=0);z=0;null!=u&&(z=10);c.begin();c.moveTo(z,
m);c.arcTo(m,m,0,0,1,z+m,0);c.lineTo(n-m,0);c.arcTo(m,m,0,0,1,n,m);c.lineTo(n,t-m);c.arcTo(m,m,0,0,1,n-m,t);c.lineTo(z+m,t);c.arcTo(m,m,0,0,1,z,t-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,t-20,10,10,3,3),c.stroke(),c.roundrect(n-20,t-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,t-15),c.lineTo(n-20,t-15),c.stroke());"connPointRefEntry"==u?(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-u&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};v.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",v);mxUtils.extend(y,mxActor);y.prototype.size=30;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
-function(c,m,u,n,t){m=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,m)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("card",y);mxUtils.extend(C,mxActor);C.prototype.size=.4;C.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,m/2);c.quadTo(n/4,1.4*m,n/2,m/2);c.quadTo(3*n/4,m*(1-1.4),n,m/2);c.lineTo(n,t-m/2);c.quadTo(3*n/4,t-1.4*m,n/2,t-m/2);c.quadTo(n/4,t-m*(1-1.4),0,t-m/2);c.lineTo(0,m/2);c.close();c.end()};C.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),u=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return m*=
-n,new mxRectangle(c.x,c.y+m,u,n-2*m);m*=u;return new mxRectangle(c.x+m,c.y,u-2*m,n)}return c};mxCellRenderer.registerShape("tape",C);mxUtils.extend(I,mxActor);I.prototype.size=.3;I.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};I.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+u&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};v.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",v);mxUtils.extend(x,mxActor);x.prototype.size=30;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=
+function(c,m,u,n,t){m=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,m)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("card",x);mxUtils.extend(B,mxActor);B.prototype.size=.4;B.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,m/2);c.quadTo(n/4,1.4*m,n/2,m/2);c.quadTo(3*n/4,m*(1-1.4),n,m/2);c.lineTo(n,t-m/2);c.quadTo(3*n/4,t-1.4*m,n/2,t-m/2);c.quadTo(n/4,t-m*(1-1.4),0,t-m/2);c.lineTo(0,m/2);c.close();c.end()};B.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),u=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return m*=
+n,new mxRectangle(c.x,c.y+m,u,n-2*m);m*=u;return new mxRectangle(c.x+m,c.y,u-2*m,n)}return c};mxCellRenderer.registerShape("tape",B);mxUtils.extend(I,mxActor);I.prototype.size=.3;I.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};I.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
0);c.lineTo(n,0);c.lineTo(n,t-m/2);c.quadTo(3*n/4,t-1.4*m,n/2,t-m/2);c.quadTo(n/4,t-m*(1-1.4),0,t-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",I);var rb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,u,n){var t=mxUtils.getValue(this.style,"size");return null!=t?n*Math.max(0,Math.min(1,t)):rb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};e.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var u=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(z*=Math.min(c.width,c.height));z=Math.min(z,.5*c.width,.5*(c.height-m));n||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(z,0,Math.min(c.width,c.width-u),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-u),0,z,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};v.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};H.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(c,m,u,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
@@ -2787,8 +2791,8 @@ mxUtils.extend(Ia,mxActor);Ia.prototype.dx=20;Ia.prototype.dy=20;Ia.prototype.re
new mxPoint(m,t),new mxPoint(0,t)],this.isRounded,z,!0);c.end()};mxCellRenderer.registerShape("corner",Ia);mxUtils.extend(wa,mxActor);wa.prototype.redrawPath=function(c,m,u,n,t){c.moveTo(0,0);c.lineTo(0,t);c.end();c.moveTo(n,0);c.lineTo(n,t);c.end();c.moveTo(0,t/2);c.lineTo(n,t/2);c.end()};mxCellRenderer.registerShape("crossbar",wa);mxUtils.extend(ab,mxActor);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.redrawPath=function(c,m,u,n,t){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
"dx",this.dx))));u=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint((n+m)/2,u),new mxPoint((n+m)/2,t),new mxPoint((n-m)/2,t),new mxPoint((n-m)/2,u),new mxPoint(0,u)],this.isRounded,z,!0);c.end()};mxCellRenderer.registerShape("tee",ab);mxUtils.extend(Ya,
mxActor);Ya.prototype.arrowWidth=.3;Ya.prototype.arrowSize=.2;Ya.prototype.redrawPath=function(c,m,u,n,t){var z=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));u=(t-z)/2;z=u+z;var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(n-m,u),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-
-m,t),new mxPoint(n-m,z),new mxPoint(0,z)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Ya);mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(c,m,u,n,t){var z=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));u=(t-z)/2;z=u+z;var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(m,0),new mxPoint(m,u),new mxPoint(n-m,u),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-m,t),new mxPoint(n-m,z),new mxPoint(m,z),new mxPoint(m,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",x);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.fixedSize=20;O.prototype.redrawPath=function(c,m,u,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+m,t),new mxPoint(n-m,z),new mxPoint(0,z)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Ya);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,m,u,n,t){var z=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));u=(t-z)/2;z=u+z;var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(m,0),new mxPoint(m,u),new mxPoint(n-m,u),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-m,t),new mxPoint(n-m,z),new mxPoint(m,z),new mxPoint(m,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",y);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.fixedSize=20;O.prototype.redrawPath=function(c,m,u,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(m,0);c.lineTo(n,0);c.quadTo(n-2*m,t/2,n,t);c.lineTo(m,t);c.quadTo(m-2*m,t/2,m,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",O);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(c,m,u,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.close();c.end()};mxCellRenderer.registerShape("or",P);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(c,
m,u,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.quadTo(n/2,t/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",X);mxUtils.extend(ba,mxActor);ba.prototype.size=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,m,u,n,t){m=Math.min(n/2,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n-m,0),
new mxPoint(n,.8*m),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,.8*m)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ba);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,
@@ -2895,11 +2899,11 @@ Math.min(u.width,n.x-u.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(u
Math.min(m.width,u.x-m.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,u.y-m.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(m){var u=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",ab.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",ab.prototype.dy)));return new mxPoint(m.x+(m.width+u)/2,m.y+n)},function(m,u){this.state.style.dx=Math.round(Math.max(0,2*Math.min(m.width/2,u.x-m.x-m.width/2)));this.state.style.dy=
Math.round(Math.max(0,Math.min(m.height,u.y-m.y)))},!1)]},singleArrow:kb(1),doubleArrow:kb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(m){var u=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,
"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(u=m.width-u);return new mxPoint(m.x+u,m.y+n)},function(m,u){var n=Math.max(0,Math.min(m.width,u.x-m.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=m.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(m.height,u.y-m.y)))},!1)]},document:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",I.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-u)*m.height)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-u.y)/m.height))},!1)]},tape:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(m.getCenterX(),m.y+u*m.height/2)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(u.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[gb(c,
-["isoAngle"],function(m){var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",K.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(u),.5*m.height))},function(m,u){this.state.style.isoAngle=Math.max(0,50*(u.y-m.y)/m.height)},!0)]},cylinder2:ib(Q.prototype.size),cylinder3:ib(e.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));
+"size",I.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-u)*m.height)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-u.y)/m.height))},!1)]},tape:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(m.getCenterX(),m.y+u*m.height/2)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(u.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[gb(c,
+["isoAngle"],function(m){var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",K.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(u),.5*m.height))},function(m,u){this.state.style.isoAngle=Math.max(0,50*(u.y-m.y)/m.height)},!0)]},cylinder2:ib(Q.prototype.size),cylinder3:ib(d.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));
return new mxPoint(m.getCenterX(),m.y+(1-u)*m.height)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-u.y)/m.height))},!1)]},"mxgraph.basic.rect":function(c){var m=[Graph.createHandle(c,["size"],function(u){var n=Math.max(0,Math.min(u.width/2,u.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(u.x+n,u.y+n)},function(u,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(u.height/2,u.width/2,n.x-u.x)))/100})];c=Graph.createHandle(c,
["indent"],function(u){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(u.x+.75*u.width,u.y+n*u.height/200)},function(u,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-u.y)/u.height)))/100});m.push(c);return m},step:ob(ra.prototype.size,!0,null,!0,ra.prototype.fixedSize),hexagon:ob(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:ob(G.prototype.size,!1),display:ob(Ka.prototype.size,!1),cube:ub(1,
-l.prototype.size,!1),card:ub(.5,y.prototype.size,!0),loopLimit:ub(.5,ba.prototype.size,!0),trapezoid:nb(.5,N.prototype.size,N.prototype.fixedSize),parallelogram:nb(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
+l.prototype.size,!1),card:ub(.5,x.prototype.size,!0),loopLimit:ub(.5,ba.prototype.size,!0),trapezoid:nb(.5,N.prototype.size,N.prototype.fixedSize),parallelogram:nb(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
null==mxStencilRegistry.getStencil(m)?m=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(m=mxConstants.SHAPE_SWIMLANE);m=tb[m];null==m&&null!=this.state.shape&&this.state.shape.isRoundable()&&(m=tb[mxConstants.SHAPE_RECTANGLE]);null!=m&&(m=m(this.state),null!=m&&(c=null==c?m:c.concat(m)))}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=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),pb=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(pb),Math.sin(pb));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,m,u,n,t){var z=c.view;n=null!=n&&0<n.length?n[0]:null;var A=c.absolutePoints,ha=A[0];A=A[A.length-1];null!=n&&(n=z.transformControlPoint(c,n));
null==ha&&null!=m&&(ha=new mxPoint(m.getCenterX(),m.getCenterY()));null==A&&null!=u&&(A=new mxPoint(u.getCenterX(),u.getCenterY()));var J=xb.x,xa=xb.y,ma=zb.x,Wa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=A&&null!=ha){c=function(Da,Ja,Ha){Da-=bb.x;var Ga=Ja-bb.y;Ja=(Wa*Da-ma*Ga)/(J*Wa-xa*ma);Da=(xa*Da-J*Ga)/(xa*ma-J*Wa);jb?(Ha&&(bb=new mxPoint(bb.x+J*Ja,bb.y+xa*Ja),t.push(bb)),bb=new mxPoint(bb.x+ma*Da,bb.y+Wa*Da)):(Ha&&(bb=new mxPoint(bb.x+ma*Da,bb.y+Wa*Da),t.push(bb)),
@@ -2913,10 +2917,10 @@ Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))))
1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ma.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,Math.min(u,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*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(u+n)));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));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};y.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,Math.min(u,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*(m+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};x.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,Math.min(u,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*(m+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(u+n)));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));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};l.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,Math.min(u,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*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(u+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,u-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(u-n)));return c};e.prototype.getConstraints=function(c,m,u){c=[];m=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,u-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(u-n)));return c};d.prototype.getConstraints=function(c,m,u){c=[];m=Math.max(0,Math.min(u,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,m));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(1,
0),!1,null,0,m+.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,u-m-.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-m-.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};g.prototype.getConstraints=
function(c,m,u){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),t=Math.max(0,Math.min(u,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*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2932,7 +2936,7 @@ qa.prototype.constraints=mxEllipse.prototype.constraints;Sa.prototype.constraint
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];C.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,
+.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)];B.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)];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(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
@@ -2946,7 +2950,7 @@ qa.prototype.constraints=mxEllipse.prototype.constraints;Sa.prototype.constraint
0),!1,null,m,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(u+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return c};wa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Ya.prototype.getConstraints=
function(c,m,u){c=[];var n=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),t=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(u-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-t),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-t),u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));return c};x.prototype.getConstraints=function(c,m,u){c=[];var n=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth)))),t=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));n=(u-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-t),u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));return c};y.prototype.getConstraints=function(c,m,u){c=[];var n=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth)))),t=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));n=(u-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,u));return c};Fa.prototype.getConstraints=
function(c,m,u){c=[];var n=Math.min(u,m),t=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(u-t)/2;var z=n+t,A=(m-t)/2;t=A+t;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,t,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,u-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,u));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,u-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+t),n));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2954,18 +2958,18 @@ function(c,m,u){c=[];var n=Math.min(u,m),t=Math.max(0,Math.min(n,n*parseFloat(mx
0),!1,null,0,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*A,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,n));return c};aa.prototype.constraints=null;P.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)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(H){p.escape();H=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),H);null!=H&&p.setSelectionCells(H)}function d(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var H=p.getSelectionCells(),K=0;K<H.length;K++)p.cellLabelChanged(H[K],"")}finally{p.getModel().endUpdate()}}}function k(H,K,Q,e,f){f.getModel().beginUpdate();try{var g=f.getCellGeometry(H);null!=g&&Q&&e&&(Q/=e,g=g.clone(),1<Q?g.height=g.width/Q:g.width=g.height*Q,f.getModel().setGeometry(H,
-g));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,K,[H]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[H])}finally{f.getModel().endUpdate()}}var l=this.editorUi,B=l.editor,p=B.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(l.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";l.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var H=p.view.scale,
+Actions.prototype.init=function(){function b(H){p.escape();H=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),H);null!=H&&p.setSelectionCells(H)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var H=p.getSelectionCells(),K=0;K<H.length;K++)p.cellLabelChanged(H[K],"")}finally{p.getModel().endUpdate()}}}function k(H,K,Q,d,f){f.getModel().beginUpdate();try{var g=f.getCellGeometry(H);null!=g&&Q&&d&&(Q/=d,g=g.clone(),1<Q?g.height=g.width/Q:g.width=g.height*Q,f.getModel().setGeometry(H,
+g));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,K,[H]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[H])}finally{f.getModel().endUpdate()}}var l=this.editorUi,C=l.editor,p=C.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(l.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";l.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var H=p.view.scale,
K=p.view.translate.x,Q=p.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(H-p.view.scale)&&K==p.view.translate.x&&Q==p.view.translate.y&&l.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?l.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){l.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(H,K){try{var Q=mxUtils.parseXml(H);B.graph.setSelectionCells(B.graph.importGraphModel(Q.documentElement))}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}));l.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){l.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){l.saveFile(!0)},null,
+window.openFile.setConsumer(mxUtils.bind(this,function(H,K){try{var Q=mxUtils.parseXml(H);C.graph.setSelectionCells(C.graph.importGraphModel(Q.documentElement))}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}));l.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){l.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){l.saveFile(!0)},null,
null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){l.showDialog((new ExportDialog(l)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var H=new EditDiagramDialog(l);l.showDialog(H.container,620,420,!0,!1);H.init()});this.addAction("pageSetup...",function(){l.showDialog((new PageSetupDialog(l)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){l.showDialog((new PrintDialog(l)).container,300,180,!0,!0)},null,"sprite-print",
Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){l.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){l.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var H=null;try{H=l.copyXml(),null!=H&&p.removeCells(H,!1)}catch(K){}null==H&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{l.copyXml()}catch(H){}try{mxClipboard.copy(p)}catch(H){l.handleError(H)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var H=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(K){if(null!=K){p.getModel().beginUpdate();try{l.pasteXml(K,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),H=!0)}catch(K){}H||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(H){function K(e){if(null!=e){for(var f=!0,g=0;g<
-e.length&&f;g++)f=f&&p.model.isEdge(e[g]);var v=p.view.translate;g=p.view.scale;var y=v.x,C=v.y;v=null;if(1==e.length&&f){var I=p.getCellGeometry(e[0]);null!=I&&(v=I.getTerminalPoint(!0))}v=null!=v?v:p.getBoundingBoxFromGeometry(e,f);null!=v&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/g-y)),g=Math.round(p.snap(p.popupMenuHandler.triggerY/g-C)),p.cellsMoved(e,f-v.x,g-v.y))}}function Q(){p.getModel().beginUpdate();try{K(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())){H=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(e){if(null!=e){p.getModel().beginUpdate();try{K(l.pasteXml(e,!0))}finally{p.getModel().endUpdate()}}else Q()}),H=!0)}catch(e){}H||Q()}});this.addAction("copySize",function(){var H=p.getSelectionCell();p.isEnabled()&&null!=H&&p.getModel().isVertex(H)&&(H=p.getCellGeometry(H),null!=H&&(l.copiedSize=new mxRectangle(H.x,H.y,H.width,H.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var H=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(K){if(null!=K){p.getModel().beginUpdate();try{l.pasteXml(K,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),H=!0)}catch(K){}H||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(H){function K(d){if(null!=d){for(var f=!0,g=0;g<
+d.length&&f;g++)f=f&&p.model.isEdge(d[g]);var v=p.view.translate;g=p.view.scale;var x=v.x,B=v.y;v=null;if(1==d.length&&f){var I=p.getCellGeometry(d[0]);null!=I&&(v=I.getTerminalPoint(!0))}v=null!=v?v:p.getBoundingBoxFromGeometry(d,f);null!=v&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/g-x)),g=Math.round(p.snap(p.popupMenuHandler.triggerY/g-B)),p.cellsMoved(d,f-v.x,g-v.y))}}function Q(){p.getModel().beginUpdate();try{K(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())){H=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(d){if(null!=d){p.getModel().beginUpdate();try{K(l.pasteXml(d,!0))}finally{p.getModel().endUpdate()}}else Q()}),H=!0)}catch(d){}H||Q()}});this.addAction("copySize",function(){var H=p.getSelectionCell();p.isEnabled()&&null!=H&&p.getModel().isVertex(H)&&(H=p.getCellGeometry(H),null!=H&&(l.copiedSize=new mxRectangle(H.x,H.y,H.width,H.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedSize){p.getModel().beginUpdate();try{for(var H=p.getResizableCells(p.getSelectionCells()),K=0;K<H.length;K++)if(p.getModel().isVertex(H[K])){var Q=p.getCellGeometry(H[K]);null!=Q&&(Q=Q.clone(),Q.width=l.copiedSize.width,Q.height=l.copiedSize.height,p.getModel().setGeometry(H[K],Q))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var H=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
-null!=H&&(H=H.cloneValue(),null==H||isNaN(H.nodeType)||(l.copiedValue=H))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(H,K){function Q(g,v){var y=e.getValue(g);v=g.cloneValue(v);v.removeAttribute("placeholders");null==y||isNaN(y.nodeType)||v.setAttribute("placeholders",y.getAttribute("placeholders"));null!=H&&mxEvent.isShiftDown(H)||v.setAttribute("label",p.convertValueToString(g));e.setValue(g,v)}H=null!=K?K:H;var e=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedValue){e.beginUpdate();
-try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)Q(e.getRoot(),l.copiedValue);else for(K=0;K<f.length;K++)Q(f[K],l.copiedValue)}finally{e.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(H,K){H=null!=K?K:H;null!=H&&mxEvent.isShiftDown(H)?d():b(null!=H&&(mxEvent.isControlDown(H)||mxEvent.isMetaDown(H)||mxEvent.isAltDown(H)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){d()},null,null,Editor.ctrlKey+
+null!=H&&(H=H.cloneValue(),null==H||isNaN(H.nodeType)||(l.copiedValue=H))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(H,K){function Q(g,v){var x=d.getValue(g);v=g.cloneValue(v);v.removeAttribute("placeholders");null==x||isNaN(x.nodeType)||v.setAttribute("placeholders",x.getAttribute("placeholders"));null!=H&&mxEvent.isShiftDown(H)||v.setAttribute("label",p.convertValueToString(g));d.setValue(g,v)}H=null!=K?K:H;var d=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedValue){d.beginUpdate();
+try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)Q(d.getRoot(),l.copiedValue);else for(K=0;K<f.length;K++)Q(f[K],l.copiedValue)}finally{d.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(H,K){H=null!=K?K:H;null!=H&&mxEvent.isShiftDown(H)?e():b(null!=H&&(mxEvent.isControlDown(H)||mxEvent.isMetaDown(H)||mxEvent.isAltDown(H)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(H){l.handleError(H)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var H=l.getSelectionState();if(null!=H.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",H.rowspan,[H.mergeCell]),p.setCellStyles("colspan",H.colspan,[H.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
new Action(mxResources.get("unmerge"),function(){var H=l.getSelectionState();if(0<H.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,H.cells),p.setCellStyles("colspan",null,H.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(H,K){H=null!=K?K:H;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=H?mxEvent.isShiftDown(H):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(H){H=p.getSelectionCell();p.isEnabled()&&null!=H&&p.addSelectionCells(p.getEdges(H))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},
@@ -2974,15 +2978,15 @@ Q,H);p.setCellStyles("connectable",Q,H)}finally{p.getModel().endUpdate()}}},null
null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(H){p.orderCells(!1,null,!0)});this.addAction("sendBackward",function(H){p.orderCells(!0,null,!0)});this.addAction("group",function(){if(p.isEnabled()){var H=mxUtils.sortCells(p.getSelectionCells(),!0);1!=H.length||p.isTable(H[0])||p.isTableRow(H[0])?
(H=p.getCellsForGroup(H),1<H.length&&p.setSelectionCell(p.groupCells(null,0,H))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(p.isEnabled()){var H=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var K=p.ungroupCells();if(null!=H)for(var Q=0;Q<H.length;Q++)p.model.contains(H[Q])&&(0==p.model.getChildCount(H[Q])&&p.model.isVertex(H[Q])&&p.setCellStyles("container","0",[H[Q]]),K.push(H[Q]))}finally{p.model.endUpdate()}0<
K.length&&p.setSelectionCells(K)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var H=p.getSelectionCells();if(null!=H){for(var K=[],Q=0;Q<H.length;Q++)p.isTableRow(H[Q])||p.isTableCell(H[Q])||K.push(H[Q]);p.removeCellsFromParent(K)}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var H=p.getSelectionCell()||p.getModel().getRoot();l.showDataDialog(H)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K="";if(mxUtils.isNode(H.value)){var Q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&H.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q=H.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==Q&&(Q=H.value.getAttribute("tooltip"));null!=Q&&(K=Q)}K=new TextareaDialog(l,mxResources.get("editTooltip")+":",K,function(e){p.setTooltipForCell(H,
-e)});l.showDialog(K.container,320,200,!0,!0);K.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var H=p.getLinkForCell(p.getSelectionCell());null!=H&&p.openLink(H)});this.addAction("editLink...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K=p.getLinkForCell(H)||"";l.showLinkDialog(K,mxResources.get("apply"),function(Q,e,f){Q=mxUtils.trim(Q);p.setLinkForCell(H,0<Q.length?Q:null);p.setAttributeForCell(H,"linkTarget",f)},!0,p.getLinkTargetForCell(H))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),l.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&l.showLinkDialog("",mxResources.get("insert"),function(H,K,Q){H=mxUtils.trim(H);if(0<H.length){var e=null,f=p.getLinkTitle(H);null!=K&&0<K.length&&(e=K[0].iconUrl,
-f=K[0].name||K[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));K=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));K.vertex=!0;e=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([K],!0));K.geometry.x=e.x;K.geometry.y=e.y;p.setAttributeForCell(K,"linkTarget",Q);p.setLinkForCell(K,H);p.cellSizeUpdated(K,
-!0);p.getModel().beginUpdate();try{K=p.addCell(K),p.fireEvent(new mxEventObject("cellsInserted","cells",[K]))}finally{p.getModel().endUpdate()}p.setSelectionCell(K);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var H=p.getSelectedElement(),K=p.getParentByName(H,"A",p.cellEditor.textarea),Q="";if(null==K&&null!=H&&null!=H.getElementsByTagName)for(var e=H.getElementsByTagName("a"),
-f=0;f<e.length&&null==K;f++)e[f].textContent==H.textContent&&(K=e[f]);null!=K&&"A"==K.nodeName&&(Q=K.getAttribute("href")||"",p.selectNode(K));var g=p.cellEditor.saveSelection();l.showLinkDialog(Q,mxResources.get("apply"),mxUtils.bind(this,function(v){p.cellEditor.restoreSelection(g);null!=v&&p.insertLink(v)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var H=p.getSelectionCells();if(null!=H){p.getModel().beginUpdate();
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K="";if(mxUtils.isNode(H.value)){var Q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&H.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q=H.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==Q&&(Q=H.value.getAttribute("tooltip"));null!=Q&&(K=Q)}K=new TextareaDialog(l,mxResources.get("editTooltip")+":",K,function(d){p.setTooltipForCell(H,
+d)});l.showDialog(K.container,320,200,!0,!0);K.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var H=p.getLinkForCell(p.getSelectionCell());null!=H&&p.openLink(H)});this.addAction("editLink...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K=p.getLinkForCell(H)||"";l.showLinkDialog(K,mxResources.get("apply"),function(Q,d,f){Q=mxUtils.trim(Q);p.setLinkForCell(H,0<Q.length?Q:null);p.setAttributeForCell(H,"linkTarget",f)},!0,p.getLinkTargetForCell(H))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),l.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&l.showLinkDialog("",mxResources.get("insert"),function(H,K,Q){H=mxUtils.trim(H);if(0<H.length){var d=null,f=p.getLinkTitle(H);null!=K&&0<K.length&&(d=K[0].iconUrl,
+f=K[0].name||K[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));K=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));K.vertex=!0;d=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([K],!0));K.geometry.x=d.x;K.geometry.y=d.y;p.setAttributeForCell(K,"linkTarget",Q);p.setLinkForCell(K,H);p.cellSizeUpdated(K,
+!0);p.getModel().beginUpdate();try{K=p.addCell(K),p.fireEvent(new mxEventObject("cellsInserted","cells",[K]))}finally{p.getModel().endUpdate()}p.setSelectionCell(K);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var H=p.getSelectedElement(),K=p.getParentByName(H,"A",p.cellEditor.textarea),Q="";if(null==K&&null!=H&&null!=H.getElementsByTagName)for(var d=H.getElementsByTagName("a"),
+f=0;f<d.length&&null==K;f++)d[f].textContent==H.textContent&&(K=d[f]);null!=K&&"A"==K.nodeName&&(Q=K.getAttribute("href")||"",p.selectNode(K));var g=p.cellEditor.saveSelection();l.showLinkDialog(Q,mxResources.get("apply"),mxUtils.bind(this,function(v){p.cellEditor.restoreSelection(g);null!=v&&p.insertLink(v)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var H=p.getSelectionCells();if(null!=H){p.getModel().beginUpdate();
try{for(var K=0;K<H.length;K++){var Q=H[K];p.getModel().isVertex(Q)&&(0<p.getModel().getChildCount(Q)?p.updateGroupBounds([Q],0,!0):p.updateCellSize(Q))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var H=p.getCommonStyle(p.getSelectionCells());H="1"==mxUtils.getValue(H,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var K=
-p.getEditableCells(p.getSelectionCells()),Q=0;Q<K.length;Q++)if(state=p.getView().getState(K[Q]),null!=state){var e=mxUtils.getValue(state.style,"html","0");if("1"==e&&null==H){var f=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=p.sanitizeHtml(f);f=mxUtils.extractTextWithWhitespace(g.childNodes);p.cellLabelChanged(state.cell,f);p.setCellStyles("html",H,[K[Q]])}else"0"==
-e&&"1"==H&&(f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(f)),p.setCellStyles("html",H,[K[Q]]))}l.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=H?H:"0"],"cells",K))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var H=p.getView().getState(p.getSelectionCell()),K="wrap";p.stopEditing();null!=H&&"wrap"==H.style[mxConstants.STYLE_WHITE_SPACE]&&
+p.getEditableCells(p.getSelectionCells()),Q=0;Q<K.length;Q++)if(state=p.getView().getState(K[Q]),null!=state){var d=mxUtils.getValue(state.style,"html","0");if("1"==d&&null==H){var f=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=p.sanitizeHtml(f);f=mxUtils.extractTextWithWhitespace(g.childNodes);p.cellLabelChanged(state.cell,f);p.setCellStyles("html",H,[K[Q]])}else"0"==
+d&&"1"==H&&(f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(f)),p.setCellStyles("html",H,[K[Q]]))}l.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=H?H:"0"],"cells",K))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var H=p.getView().getState(p.getSelectionCell()),K="wrap";p.stopEditing();null!=H&&"wrap"==H.style[mxConstants.STYLE_WHITE_SPACE]&&
(K=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,K)});this.addAction("rotation",function(){var H="0",K=p.getView().getState(p.getSelectionCell());null!=K&&(H=K.style[mxConstants.STYLE_ROTATION]||H);H=new FilenameDialog(l,H,mxResources.get("apply"),function(Q){null!=Q&&0<Q.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,Q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");l.showDialog(H.container,375,80,!0,!0);H.init()});this.addAction("resetView",function(){p.zoomTo(1);
l.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(H){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,l.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(H){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,l.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var H=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),K=p.view.translate,
Q=p.view.scale;H.x=H.x/Q-K.x;H.y=H.y/Q-K.y;H.width/=Q;H.height/=Q;null!=p.backgroundImage&&(H=mxRectangle.fromRectangle(H),H.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==H.width||0==H.height?(p.zoomTo(1),l.resetScrollbars()):(K=Editor.fitWindowBorders,null!=K&&(H.x-=K.x,H.y-=K.y,H.width+=K.width+K.x,H.height+=K.height+K.y),p.fitWindow(H))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
@@ -2995,9 +2999,9 @@ M.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});M.setEnab
M.setToggleAction(!0);M.setSelectedCallback(function(){return p.foldingEnabled});M.isEnabled=E;M=this.addAction("scrollbars",function(){l.setScrollbars(!l.hasScrollbars())});M.setToggleAction(!0);M.setSelectedCallback(function(){return p.scrollbars});M=this.addAction("pageView",mxUtils.bind(this,function(){l.setPageVisible(!p.pageVisible)}));M.setToggleAction(!0);M.setSelectedCallback(function(){return p.pageVisible});M=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
l.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");M.setToggleAction(!0);M.setSelectedCallback(function(){return p.connectionArrowsEnabled});M=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());l.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");M.setToggleAction(!0);M.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});M=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
l.fireEvent(new mxEventObject("copyConnectChanged"))});M.setToggleAction(!0);M.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});M.isEnabled=E;M=this.addAction("autosave",function(){l.editor.setAutosave(!l.editor.autosave)});M.setToggleAction(!0);M.setSelectedCallback(function(){return l.editor.autosave});M.isEnabled=E;M.visible=!1;this.addAction("help",function(){var H="";mxResources.isLanguageSupported(mxClient.language)&&(H="_"+mxClient.language);p.openLink(RESOURCES_PATH+
-"/help"+H+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(l.showDialog((new AboutDialog(l)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));M=mxUtils.bind(this,function(H,K,Q,e){return this.addAction(H,function(){if(null!=Q&&p.cellEditor.isContentEditing())Q();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,K,f);(K&mxConstants.FONT_BOLD)==
+"/help"+H+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(l.showDialog((new AboutDialog(l)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));M=mxUtils.bind(this,function(H,K,Q,d){return this.addAction(H,function(){if(null!=Q&&p.cellEditor.isContentEditing())Q();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,K,f);(K&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD?p.updateLabelElements(f,function(v){v.style.fontWeight=null;"B"==v.nodeName&&p.replaceElement(v)}):(K&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(v){v.style.fontStyle=null;"I"==v.nodeName&&p.replaceElement(v)}):(K&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(v){v.style.textDecoration=null;"U"==v.nodeName&&p.replaceElement(v)});for(var g=0;g<f.length;g++)0==p.model.getChildCount(f[g])&&p.autoSizeCell(f[g],
-!1)}finally{p.getModel().endUpdate()}}},null,null,e)});M("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");M("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");M("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){l.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+!1)}finally{p.getModel().endUpdate()}}},null,null,d)});M("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");M("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");M("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){l.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){l.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){l.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){l.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){l.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){l.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),l.fireEvent(new mxEventObject("styleChanged",
@@ -3006,110 +3010,107 @@ this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyl
Q="1"==mxUtils.getValue(K,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,Q);p.setCellStyles(mxConstants.STYLE_CURVED,null);l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[Q,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,
"1"),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var H=p.view.getState(p.getSelectionCell()),K="1";null!=H&&null!=p.getFoldingImage(H)&&(K="0");p.setCellStyles("collapsible",K);l.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[K],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
mxUtils.bind(this,function(){var H=p.getEditableCells(p.getSelectionCells());if(null!=H&&0<H.length){var K=p.getModel();K=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",K.getStyle(H[0])||"",function(Q){null!=Q&&p.setCellStyle(mxUtils.trim(Q),H)},null,null,400,220);this.editorUi.showDialog(K.container,420,300,!0,!0);K.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&l.setDefaultStyle(p.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&l.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var H=p.getSelectionCell();if(null!=H&&p.getModel().isEdge(H)){var K=B.graph.selectionCellsHandler.getHandler(H);if(K instanceof mxEdgeHandler){var Q=p.view.translate,e=p.view.scale,f=Q.x;Q=Q.y;H=p.getModel().getParent(H);for(var g=p.getCellGeometry(H);p.getModel().isVertex(H)&&null!=g;)f+=g.x,Q+=g.y,H=
-p.getModel().getParent(H),g=p.getCellGeometry(H);f=Math.round(p.snap(p.popupMenuHandler.triggerX/e-f));e=Math.round(p.snap(p.popupMenuHandler.triggerY/e-Q));K.addPointAt(K.state,f,e)}}});this.addAction("removeWaypoint",function(){var H=l.actions.get("removeWaypoint");null!=H.handler&&H.handler.removePoint(H.handler.state,H.index)});this.addAction("clearWaypoints",function(H,K){H=null!=K?K:H;var Q=p.getSelectionCells();if(null!=Q){Q=p.getEditableCells(p.addAllEdges(Q));p.getModel().beginUpdate();try{for(var e=
-0;e<Q.length;e++){var f=Q[e];if(p.getModel().isEdge(f)){var g=p.getCellGeometry(f);null!=K&&mxEvent.isShiftDown(H)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[f]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[f])):null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,p.getModel().setGeometry(f,g))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");M=this.addAction("subscript",
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&l.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var H=p.getSelectionCell();if(null!=H&&p.getModel().isEdge(H)){var K=C.graph.selectionCellsHandler.getHandler(H);if(K instanceof mxEdgeHandler){var Q=p.view.translate,d=p.view.scale,f=Q.x;Q=Q.y;H=p.getModel().getParent(H);for(var g=p.getCellGeometry(H);p.getModel().isVertex(H)&&null!=g;)f+=g.x,Q+=g.y,H=
+p.getModel().getParent(H),g=p.getCellGeometry(H);f=Math.round(p.snap(p.popupMenuHandler.triggerX/d-f));d=Math.round(p.snap(p.popupMenuHandler.triggerY/d-Q));K.addPointAt(K.state,f,d)}}});this.addAction("removeWaypoint",function(){var H=l.actions.get("removeWaypoint");null!=H.handler&&H.handler.removePoint(H.handler.state,H.index)});this.addAction("clearWaypoints",function(H,K){H=null!=K?K:H;var Q=p.getSelectionCells();if(null!=Q){Q=p.getEditableCells(p.addAllEdges(Q));p.getModel().beginUpdate();try{for(var d=
+0;d<Q.length;d++){var f=Q[d];if(p.getModel().isEdge(f)){var g=p.getCellGeometry(f);null!=K&&mxEvent.isShiftDown(H)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[f]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[f])):null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,p.getModel().setGeometry(f,g))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");M=this.addAction("subscript",
mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");M=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var H=mxResources.get("image")+" ("+mxResources.get("url")+"):",K=p.getView().getState(p.getSelectionCell()),
-Q="",e=null;null!=K&&(Q=K.style[mxConstants.STYLE_IMAGE]||Q,e=K.style[mxConstants.STYLE_CLIP_PATH]||e);var f=p.cellEditor.saveSelection();l.showImageDialog(H,Q,function(g,v,y,C,I,D){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(g,v,y);else{var N=p.getSelectionCells();if(null!=g&&(0<g.length||0<N.length)){var G=null;p.getModel().beginUpdate();try{if(0==N.length){N=[p.insertVertex(p.getDefaultParent(),null,"",0,0,v,y,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var ia=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=ia.x;N[0].geometry.y=ia.y;null!=C&&k(N[0],C,I,D,p);G=N;p.fireEvent(new mxEventObject("cellsInserted","cells",G))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<g.length?g:null,N);var ka=p.getCurrentCellStyle(N[0]);"image"!=ka[mxConstants.STYLE_SHAPE]&&"label"!=ka[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==g.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,N);if(null!=v&&null!=y)for(g=0;g<N.length;g++){var ja=N[g];if("0"!=p.getCurrentCellStyle(ja).expand){var ca=p.getModel().getGeometry(ja);null!=ca&&(ca=ca.clone(),ca.width=v,ca.height=y,p.getModel().setGeometry(ja,ca))}null!=C&&k(ja,C,I,D,p)}}finally{p.getModel().endUpdate()}null!=G&&(p.setSelectionCells(G),p.scrollCellToVisible(G[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,e)}}).isEnabled=E;this.addAction("crop...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=p.getCurrentCellStyle(H),Q=K[mxConstants.STYLE_IMAGE],e=K[mxConstants.STYLE_SHAPE];Q&&"image"==e&&(K=new CropImageDialog(l,Q,K[mxConstants.STYLE_CLIP_PATH],function(f,g,v){k(H,f,g,v,p)}),l.showDialog(K.container,300,390,!0,!0))}}).isEnabled=E;M=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(l,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
+Q="",d=null;null!=K&&(Q=K.style[mxConstants.STYLE_IMAGE]||Q,d=K.style[mxConstants.STYLE_CLIP_PATH]||d);var f=p.cellEditor.saveSelection();l.showImageDialog(H,Q,function(g,v,x,B,I,D){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(g,v,x);else{var N=p.getSelectionCells();if(null!=g&&(0<g.length||0<N.length)){var G=null;p.getModel().beginUpdate();try{if(0==N.length){N=[p.insertVertex(p.getDefaultParent(),null,"",0,0,v,x,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var ia=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=ia.x;N[0].geometry.y=ia.y;null!=B&&k(N[0],B,I,D,p);G=N;p.fireEvent(new mxEventObject("cellsInserted","cells",G))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<g.length?g:null,N);var ka=p.getCurrentCellStyle(N[0]);"image"!=ka[mxConstants.STYLE_SHAPE]&&"label"!=ka[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==g.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==B&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,N);if(null!=v&&null!=x)for(g=0;g<N.length;g++){var ja=N[g];if("0"!=p.getCurrentCellStyle(ja).expand){var ca=p.getModel().getGeometry(ja);null!=ca&&(ca=ca.clone(),ca.width=v,ca.height=x,p.getModel().setGeometry(ja,ca))}null!=B&&k(ja,B,I,D,p)}}finally{p.getModel().endUpdate()}null!=G&&(p.setSelectionCells(G),p.scrollCellToVisible(G[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,d)}}).isEnabled=E;this.addAction("crop...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=p.getCurrentCellStyle(H),Q=K[mxConstants.STYLE_IMAGE],d=K[mxConstants.STYLE_SHAPE];Q&&"image"==d&&(K=new CropImageDialog(l,Q,K[mxConstants.STYLE_CLIP_PATH],function(f,g,v){k(H,f,g,v,p)}),l.showDialog(K.container,300,390,!0,!0))}}).isEnabled=E;M=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(l,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");M.setToggleAction(!0);M.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
M=this.addAction("format",mxUtils.bind(this,function(){l.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");M.setToggleAction(!0);M.setSelectedCallback(mxUtils.bind(this,function(){return l.isFormatPanelVisible()}));M=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(l,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("outline"))})),
this.outlineWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");M.setToggleAction(!0);M.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var H=
-p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=new ConnectionPointsDialog(l,H);l.showDialog(K.container,350,450,!0,!1,function(){K.destroy()});K.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,d,k,l,B){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,d,k,l,B))};Actions.prototype.put=function(b,d){return this.actions[b]=d};
-Actions.prototype.get=function(b){return this.actions[b]};function Action(b,d,k,l,B){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(d);this.enabled=null!=k?k:!0;this.iconCls=l;this.shortcut=B;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
-Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,d){mxEventSource.call(this);this.ui=b;this.setData(d||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=new ConnectionPointsDialog(l,H);l.showDialog(K.container,350,450,!0,!1,function(){K.destroy()});K.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,l,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,l,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e};
+Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,l,C){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=l;this.shortcut=C;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
-DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,d,k)}),d):this.updateFile(b,d)};
-DrawioFile.prototype.updateFile=function(b,d,k,l){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(B){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[B]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=B?this.mergeFile(B,b,d,l):this.reloadFile(b,
-d))}catch(p){null!=d&&d(p)}}),d))};
-DrawioFile.prototype.mergeFile=function(b,d,k,l){var B=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var M=[this.ui.diffPages(null!=l?l:p,E)],S=this.ignorePatches(M);this.setShadowPages(E);if(S)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;l={};S={};var H=this.ui.patchPages(p,M[0]),K=this.ui.getHashValueForPages(H,
-l),Q=this.ui.getHashValueForPages(E,S);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",M,"backup",this.backupPatch,"checksum",K,"current",Q,"valid",K==Q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=K&&K!=Q){var e=this.compressReportData(this.getAnonymizedXmlForPages(E)),f=this.compressReportData(this.getAnonymizedXmlForPages(H)),g=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,M,"Shadow Details: "+JSON.stringify(l)+"\nChecksum: "+K+"\nCurrent: "+Q+"\nCurrent Details: "+JSON.stringify(S)+"\nFrom: "+g+"\nTo: "+v+"\n\nFile Data:\n"+e+"\nPatched Shadow:\n"+f,null,"mergeFile",K,Q,b.getCurrentRevisionId());return}if(null!=this.sync){var y=this.sync.patchRealtime(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==y||mxUtils.isEmptyObject(y)||M.push(y)}this.patch(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw B=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(D);try{if(B)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var C=this.getCurrentUser(),I=null!=C?C.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),I,D)}}catch(N){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var d=new mxCodec(mxUtils.createXmlDocument()),k=d.document.createElement("mxfile");if(null!=b)for(var l=0;l<b.length;l++){var B=d.encode(new mxGraphModel(b[l].root));"1"!=urlParams.dev&&(B=this.ui.anonymizeNode(B,!0));B.setAttribute("id",b[l].getId());b[l].viewState&&this.ui.editor.graph.saveViewState(b[l].viewState,B,!0);k.appendChild(B)}return mxUtils.getPrettyXml(k)};
-DrawioFile.prototype.compressReportData=function(b,d,k){d=null!=d?d:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>d&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,d,k,l,B,p,E,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!=d)for(var S=0;S<d.length;S++)this.ui.anonymizePatch(d[S]);var H=mxUtils.bind(this,function(v){var y=this.compressReportData(JSON.stringify(d,null,2));v=null==v?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(v.data)),
-25E3);this.sendErrorReport("Checksum Error in "+B+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+y+(null!=v?"\n\nRemote:\n"+v:""),null,7E4)});null==l?H(null):this.getLatestVersion(mxUtils.bind(this,function(v){null!=v&&v.getCurrentEtag()==l?H(v):H(null)}),function(){})}else{var K=this.getCurrentUser(),Q=null!=K?K.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(d).length,g=null;if(null!=d&&this.constructor==DriveFile&&400>f){for(S=0;S<d.length;S++)this.ui.anonymizePatch(d[S]);
-g=JSON.stringify(d);g=null!=g&&250>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(v){try{var y=null!=g?"Report":"Error",C=this.ui.getHashValueForPages(v.getShadowPages());EditorUi.logError("Checksum "+y+" in "+B+" "+e,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=M?
-"-rev_"+this.ui.hashValue(M):"")+(null!=C?"-latest_"+C:"")+(null!=v?"-latestRev_"+this.ui.hashValue(v.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+e,action:B,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+"-size_"+this.getSize()})}catch(I){}}),b)}}catch(v){}};
-DrawioFile.prototype.sendErrorReport=function(b,d,k,l){try{var B=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),M=null!=E?this.ui.hashValue(E.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),K=H.lastIndexOf(".");E="xml";0<K&&(E=H.substring(K));var Q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+M+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=d?"\n\n"+d:
-"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+B+"\n\nData:\n"+p,l)}catch(e){}};
-DrawioFile.prototype.reloadFile=function(b,d){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),d);else{var l=this.ui.editor.graph,B=l.getSelectionCells(),p=l.getViewState(),E=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,B);null!=this.backupPatch&&this.patch([this.backupPatch]);var M=this.ui.getCurrentFile();null!=M&&(M.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
-k()}catch(l){null!=d&&d(l)}};DrawioFile.prototype.mergeLatestVersion=function(b,d,k){this.getLatestVersion(mxUtils.bind(this,function(l){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(l.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(l.getDescriptor());this.descriptorChanged();null!=d&&d()}),k)};
-DrawioFile.prototype.copyFile=function(b,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var d=!0;if(null!=b)for(var k=0;k<b.length&&d;k++)d=d&&mxUtils.isEmptyObject(b[k]);return d};
-DrawioFile.prototype.patch=function(b,d,k){if(null!=b){var l=this.ui.editor.undoManager,B=l.history.slice(),p=l.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var M=this.changeListenerEnabled;this.changeListenerEnabled=k;var S=E.foldingEnabled,H=E.mathEnabled,K=E.cellRenderer.redraw;E.cellRenderer.redraw=function(Q){Q.view.graph.isEditing(Q.cell)&&(Q.view.graph.scrollCellToVisible(Q.cell),Q.view.graph.cellEditor.resize());K.apply(this,arguments)};E.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,d,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=K;this.changeListenerEnabled=M;k||(l.history=B,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)H!=E.mathEnabled?
-(this.ui.editor.updateGraphComponents(),E.refresh()):(S!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",d,"undoable",k)}return b};
-DrawioFile.prototype.save=function(b,d,k,l,B,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",l,"overwrite",B,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!B&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=k)k({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var d=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=d&&(d.viewState=this.ui.editor.graph.getViewState(),d.needsUpdate=!0)}d=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return d};
-DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,d,k){};
-DrawioFile.prototype.saveFile=function(b,d,k,l){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
-DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,d,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,d,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
+DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
+DrawioFile.prototype.updateFile=function(b,e,k,l){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(C){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[C]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=C?this.mergeFile(C,b,e,l):this.reloadFile(b,
+e))}catch(p){null!=e&&e(p)}}),e))};
+DrawioFile.prototype.mergeFile=function(b,e,k,l){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var M=[this.ui.diffPages(null!=l?l:p,E)],S=this.ignorePatches(M);this.setShadowPages(E);if(S)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;l={};S={};var H=this.ui.patchPages(p,M[0]),K=this.ui.getHashValueForPages(H,
+l),Q=this.ui.getHashValueForPages(E,S);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",M,"backup",this.backupPatch,"checksum",K,"current",Q,"valid",K==Q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=K&&K!=Q){var d=this.compressReportData(this.getAnonymizedXmlForPages(E)),f=this.compressReportData(this.getAnonymizedXmlForPages(H)),g=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,M,"Shadow Details: "+JSON.stringify(l)+"\nChecksum: "+K+"\nCurrent: "+Q+"\nCurrent Details: "+JSON.stringify(S)+"\nFrom: "+g+"\nTo: "+v+"\n\nFile Data:\n"+d+"\nPatched Shadow:\n"+f,null,"mergeFile",K,Q,b.getCurrentRevisionId());return}if(null!=this.sync){var x=this.sync.patchRealtime(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==x||mxUtils.isEmptyObject(x)||M.push(x)}this.patch(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(D);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var B=this.getCurrentUser(),I=null!=B?B.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),I,D)}}catch(N){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var l=0;l<b.length;l++){var C=e.encode(new mxGraphModel(b[l].root));"1"!=urlParams.dev&&(C=this.ui.anonymizeNode(C,!0));C.setAttribute("id",b[l].getId());b[l].viewState&&this.ui.editor.graph.saveViewState(b[l].viewState,C,!0);k.appendChild(C)}return mxUtils.getPrettyXml(k)};
+DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,e,k,l,C,p,E,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(var S=0;S<e.length;S++)this.ui.anonymizePatch(e[S]);var H=mxUtils.bind(this,function(v){var x=this.compressReportData(JSON.stringify(e,null,2));v=null==v?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(v.data)),
+25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+x+(null!=v?"\n\nRemote:\n"+v:""),null,7E4)});null==l?H(null):this.getLatestVersion(mxUtils.bind(this,function(v){null!=v&&v.getCurrentEtag()==l?H(v):H(null)}),function(){})}else{var K=this.getCurrentUser(),Q=null!=K?K.id:"unknown",d=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(e).length,g=null;if(null!=e&&this.constructor==DriveFile&&400>f){for(S=0;S<e.length;S++)this.ui.anonymizePatch(e[S]);
+g=JSON.stringify(e);g=null!=g&&250>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(v){try{var x=null!=g?"Report":"Error",B=this.ui.getHashValueForPages(v.getShadowPages());EditorUi.logError("Checksum "+x+" in "+C+" "+d,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+e.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=M?
+"-rev_"+this.ui.hashValue(M):"")+(null!=B?"-latest_"+B:"")+(null!=v?"-latestRev_"+this.ui.hashValue(v.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+d,action:C,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+e.length+"-size_"+this.getSize()})}catch(I){}}),b)}}catch(v){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,k,l){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),M=null!=E?this.ui.hashValue(E.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),K=H.lastIndexOf(".");E="xml";0<K&&(E=H.substring(K));var Q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+M+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+C+"\n\nData:\n"+p,l)}catch(d){}};
+DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var l=this.ui.editor.graph,C=l.getSelectionCells(),p=l.getViewState(),E=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var M=this.ui.getCurrentFile();null!=M&&(M.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+k()}catch(l){null!=e&&e(l)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(l){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(l.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(l.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
+DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var l=this.ui.editor.undoManager,C=l.history.slice(),p=l.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var M=this.changeListenerEnabled;this.changeListenerEnabled=k;var S=E.foldingEnabled,H=E.mathEnabled,K=E.cellRenderer.redraw;E.cellRenderer.redraw=function(Q){Q.view.graph.isEditing(Q.cell)&&(Q.view.graph.scrollCellToVisible(Q.cell),Q.view.graph.cellEditor.resize());K.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=K;this.changeListenerEnabled=M;k||(l.history=C,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)H!=E.mathEnabled?
+(this.ui.editor.updateGraphComponents(),E.refresh()):(S!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
+DrawioFile.prototype.save=function(b,e,k,l,C,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",l,"overwrite",C,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!C&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
+DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,k){};
+DrawioFile.prototype.saveFile=function(b,e,k,l){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
+DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var d=function(k){for(var l=0;null!=k&&l<k.length;l++){var B=k[l];null!=B.id&&0==B.id.indexOf("extFont_")&&B.parentNode.removeChild(B)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var e=function(k){for(var l=0;null!=k&&l<k.length;l++){var C=k[l];null!=C.id&&0==C.id.indexOf("extFont_")&&C.parentNode.removeChild(C)}};e(document.querySelectorAll("head > style[id]"));e(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
-DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,d){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,d){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,d){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),d)};DrawioFile.prototype.patchDescriptor=function(b,d){this.setDescriptorEtag(b,this.getDescriptorEtag(d));this.descriptorChanged()};
+DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,e){b(null)};
+DrawioFile.prototype.loadDescriptor=function(b,e){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,e){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),e)};DrawioFile.prototype.patchDescriptor=function(b,e){this.setDescriptorEtag(b,this.getDescriptorEtag(e));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
-DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,d){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,d){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
+DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,e){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,e){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.getPullingInterval=function(){return 1E4};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};
-DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,d){this.setDescriptorEtag(b,d)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,d){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,d){b=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
+DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,e){this.setDescriptorEtag(b,e)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,e){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,e){b=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
-DrawioFile.prototype.addAllSavedStatus=function(b){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+b+'">'+b+"</div>"),b=this.ui.statusContainer.getElementsByTagName("div"),0<b.length&&this.isRevisionHistorySupported()&&(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(d){this.removeDraft()}};
+DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var e=this.isRevisionHistorySupported()?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+e+'title="'+b+'">'+b+"</div>")}};
+DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(e){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
-DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var d=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>");d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length&&(d[0].style.cursor="pointer",mxEvent.addListener(d[0],
-"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{d=this.getErrorMessage(b);if(null==d&&null!=this.lastSaved){var k=this.ui.timeSince(new Date(this.lastSaved));null!=k&&(d=mxResources.get("lastSaved",[k]))}null!=d&&60<d.length&&(d=d.substring(0,60)+"...");d=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":"");this.ui.editor.setStatus('<div title="'+
-d+'" class="geStatusAlertOrange">'+d+' <img src="'+Editor.saveImage+'"/></div>');d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(d=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
-EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
-0))}};
-DrawioFile.prototype.addConflictStatus=function(b,d){this.invalidChecksum&&null==d&&(d=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":""));this.ui.spinner.stop();this.clearAutosave();d=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(k){"IMG"!=mxEvent.getSource(k).nodeName&&
-b()}))):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),b)};DrawioFile.prototype.setConflictStatus=function(b){this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert">'+b+' <a href="https://www.diagrams.net/doc/faq/synchronize" title="'+mxResources.get("help")+'" target="_blank"><img src="'+Editor.helpImage+'"/></a></div>')};
-DrawioFile.prototype.showRefreshDialog=function(b,d,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,d)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,d)}),k),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
-d)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,d)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,d,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,d)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
-DrawioFile.prototype.showConflictDialog=function(b,d){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),l=mxResources.get("redirectToNewApp");null!=d&&(l+=" ("+d+")");d=mxUtils.bind(this,function(){var B=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
-k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),B,mxResources.get("cancel"),mxResources.get("discardChanges")):B()});null!=b?this.isModified()?this.ui.confirm(l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(l,d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-d)}};
+DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var e=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+e+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+")</div>")}else e=
+this.getErrorMessage(b),null==e&&null!=this.lastSaved&&(b=this.ui.timeSince(new Date(this.lastSaved)),null!=b&&(e=mxResources.get("lastSaved",[b]))),null!=e&&60<e.length&&(e=e.substring(0,60)+"..."),e=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":""),b='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"',this.ui.editor.setStatus("<div "+b+' title="'+e+'" class="geStatusAlertOrange">'+e+' <img src="'+Editor.saveImage+
+'"/></div>'),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
+0))};DrawioFile.prototype.addConflictStatus=function(b,e){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),e);this.ui.spinner.stop();this.clearAutosave()};
+DrawioFile.prototype.setConflictStatus=function(b,e){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=e?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.diagrams.net/doc/faq/synchronize" src="'+Editor.helpImage+'" style="cursor:help;"/></div>',e)};
+DrawioFile.prototype.showRefreshDialog=function(b,e,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,e)})):(this.addConflictStatus(k,mxUtils.bind(this,function(){this.showRefreshDialog(b,e)})),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
+e)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,e)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
+DrawioFile.prototype.showCopyDialog=function(b,e,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
+DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),l=mxResources.get("redirectToNewApp");null!=e&&(l+=" ("+e+")");e=mxUtils.bind(this,function(){var C=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
+k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()});null!=b?this.isModified()?this.ui.confirm(l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(l,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+e)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
-DrawioFile.prototype.handleFileError=function(b,d){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,d):(this.isModified()&&this.addUnsavedStatus(b),d?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
+DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,d){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),l=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),B=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,l,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,l,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),l)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,l,B):this.invalidChecksum?this.showRefreshDialog(k,l,this.getErrorMessage(b)):d?this.showConflictDialog(B,p):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(k,l)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var d=null!=b?null!=b.error?b.error.message:b.message:null;null==d&&null!=b&&b.code==App.ERROR_TIMEOUT&&(d=mxResources.get("timeout"));return d};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(d){this.ui.stopSanityCheck();
-null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(d){this.handleFileError(d)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var d=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(d):this.sync.createToken(d,mxUtils.bind(this,function(k){b(d,k)}),mxUtils.bind(this,function(){b(d)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,d,k,l,B){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,d,k,l,B)}catch(S){this.invalidChecksum=this.inConflictState=
+DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),l=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),C=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,l,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,l,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),l)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,l,C):this.invalidChecksum?this.showRefreshDialog(k,l,this.getErrorMessage(b)):e?this.showConflictDialog(C,p):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(k,l)}))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck();
+null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
+DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,e,k,l,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,l,C)}catch(S){this.invalidChecksum=this.inConflictState=
!0;this.descriptorChanged();null!=l&&l(S);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,S);else{var E=this.getCurrentUser(),M=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),M,S)}}catch(H){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,d,k,l){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<d?b:0;this.clearAutosave();var B=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==B&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",B,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
-p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=l&&l(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",B,"delay",b,"saving",this.savingFile);this.autosaveThread=B};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+DrawioFile.prototype.autosave=function(b,e,k,l){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var C=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==C&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
+p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=l&&l(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}catch(E){null!=l&&l(E)}}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
-DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,d){if(null!=b&&null!=d){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=d.lastIndexOf(".");return b===(0<k?d.substring(k):"")}return b==d};
+DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=e.lastIndexOf(".");return b===(0<k?e.substring(k):"")}return b==e};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,d){b([])};DrawioFile.prototype.addComment=function(b,d,k){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,d){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,d)};LocalFile=function(b,d,k,l,B,p){DrawioFile.call(this,b,d);this.title=k;this.mode=l?null:App.MODE_DEVICE;this.fileHandle=B;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
-LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,d,k){this.saveAs(this.title,d,k)};LocalFile.prototype.saveAs=function(b,d,k){this.saveFile(b,!1,d,k)};LocalFile.prototype.saveAs=function(b,d,k){this.saveFile(b,!1,d,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
-LocalFile.prototype.getLatestVersion=function(b,d){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,d)};
-LocalFile.prototype.saveFile=function(b,d,k,l,B){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;B||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),M=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),S=mxUtils.bind(this,function(H){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var K=mxUtils.bind(this,
-function(e){this.savingFile=!1;null!=l&&l({error:e})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(e){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[f],"conflict",this.desc.lastModified!=f.lastModified);this.desc.lastModified==f.lastModified?e.write(p?this.ui.base64ToBlob(H,"image/png"):H).then(mxUtils.bind(this,function(){e.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){try{var v=this.desc;this.savingFile=!1;this.desc=g;this.fileSaved(E,v,M,K);this.removeDraft()}catch(y){K(y)}}),K)}),K)}),K):(this.inConflictState=!0,K())}),mxUtils.bind(this,function(f){this.invalidFileHandle=!0;K(f)}))}),K)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(H,b,p?"image/png":"text/xml",p);else if(H.length<MAX_REQUEST_SIZE){var Q=b.lastIndexOf(".");Q=0<Q?b.substring(Q+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+Q+"&xml="+encodeURIComponent(H)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(H)}));M()}});p?(d=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){S(H)}),l,this.ui.getCurrentFile()!=this?E:null,d.scale,d.border)):S(E)};
-LocalFile.prototype.rename=function(b,d,k){this.title=b;this.descriptorChanged();null!=d&&d()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
-{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,
-fontUrl:decodeURIComponent(Editor.sketchFontSource)}];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"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",
-gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},
-{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,l,C,p){DrawioFile.call(this,b,e);this.title=k;this.mode=l?null:App.MODE_DEVICE;this.fileHandle=C;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
+LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
+LocalFile.prototype.saveFile=function(b,e,k,l,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),M=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),S=mxUtils.bind(this,function(H){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var K=mxUtils.bind(this,
+function(d){this.savingFile=!1;null!=l&&l({error:d})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(d){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[f],"conflict",this.desc.lastModified!=f.lastModified);this.desc.lastModified==f.lastModified?d.write(p?this.ui.base64ToBlob(H,"image/png"):H).then(mxUtils.bind(this,function(){d.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){try{var v=this.desc;this.savingFile=!1;this.desc=g;this.fileSaved(E,v,M,K);this.removeDraft()}catch(x){K(x)}}),K)}),K)}),K):(this.inConflictState=!0,K())}),mxUtils.bind(this,function(f){this.invalidFileHandle=!0;K(f)}))}),K)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(H,b,p?"image/png":"text/xml",p);else if(H.length<MAX_REQUEST_SIZE){var Q=b.lastIndexOf(".");Q=0<Q?b.substring(Q+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+Q+"&xml="+encodeURIComponent(H)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(H)}));M()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){S(H)}),l,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):S(E)};
+LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];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"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},
+commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",
+fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.userImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+";
Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==";
@@ -3127,31 +3128,31 @@ Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP/////
Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=";
Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
-Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
-"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
-F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==
-mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
-{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
-dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
-dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&
-0==q.edges.length&&F.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},
-isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"fillOpacity",
-dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
-defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,F){return F.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,F){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
-{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,F){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=q&&(F.isSwimlane(q)||0<F.model.getChildCount(q))},
-isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,F){var T=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=T&&(F.isContainer(T)&&"0"!=q.style.collapsible||!F.isContainer(T)&&"1"==q.style.collapsible)},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length&&!F.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,F){F=F.editorUi.editor.graph.model;return 0<q.vertices.length?F.isVertex(F.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,F){q=0<q.vertices.length?F.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{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(q,F){var T=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return F.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==T||T==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,F){return 0<q.vertices.length&&
-F.editorUi.editor.graph.isContainer(q.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.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.enableSimpleTheme="1"==urlParams["live-ui"];
+Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=
+null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",
+type:"float",min:0,defVal:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
+"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==
+mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",
+type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},
+{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},
+{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==
+mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",
+dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",
+dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,
+F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:
+null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&
+0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",
+defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},
+{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,F){return F.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,F){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",
+dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",
+dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,F){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;
+return null!=q&&(F.isSwimlane(q)||0<F.model.getChildCount(q))},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,F){var T=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=T&&(F.isContainer(T)&&"0"!=q.style.collapsible||!F.isContainer(T)&&"1"==q.style.collapsible)},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",
+dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length&&!F.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,F){F=F.editorUi.editor.graph.model;return 0<q.vertices.length?F.isVertex(F.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",
+defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,F){q=0<q.vertices.length?F.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{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(q,F){var T=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return F.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==T||T==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,
+F){return 0<q.vertices.length&&F.editorUi.editor.graph.isContainer(q.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(q){var F=rough.canvas({getContext:function(){return q}});F.draw=function(T){var aa=T.sets||[];T=T.options||this.getDefaultOptions();for(var U=0;U<aa.length;U++){var da=aa[U];switch(da.type){case "path":null!=T.stroke&&this._drawToContext(q,da,T);break;case "fillPath":this._drawToContext(q,da,T);break;case "fillSketch":this.fillSketch(q,da,T)}}};F.fillSketch=function(T,aa,U){var da=q.state.strokeColor,fa=q.state.strokeWidth,na=q.state.strokeAlpha,sa=q.state.dashed,
za=U.fillWeight;0>za&&(za=U.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(U.fill||"");q.setStrokeWidth(za);q.setDashed(!1);this._drawToContext(T,aa,U);q.setDashed(sa);q.setStrokeWidth(fa);q.setStrokeColor(da);q.setStrokeAlpha(na)};F._drawToContext=function(T,aa,U){T.begin();for(var da=0;da<aa.ops.length;da++){var fa=aa.ops[da],na=fa.data;switch(fa.op){case "move":T.moveTo(na[0],na[1]);break;case "bcurveTo":T.curveTo(na[0],na[1],na[2],na[3],na[4],na[5]);break;case "lineTo":T.lineTo(na[0],
na[1])}}T.end();"fillPath"===aa.type&&U.filled?T.fill():T.stroke()};return F};(function(){function q(da,fa,na){this.canvas=da;this.rc=fa;this.shape=na;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=
@@ -3190,101 +3191,103 @@ new mxRectangle(0,0,F,T),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultP
q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(F=parseInt(q.sidebarTitleSize),!isNaN(F)&&0<F?Sidebar.prototype.sidebarTitleSize=F:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(F=parseInt(q.autosaveDelay),!isNaN(F)&&0<F?DrawioFile.prototype.autosaveDelay=F:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var F=document.getElementsByTagName("script")[0];if(null!=F&&null!=F.parentNode){var T=document.createElement("style");
T.setAttribute("type","text/css");T.appendChild(document.createTextNode(q));F.parentNode.insertBefore(T,F);q=q.split("url(");for(T=1;T<q.length;T++){var aa=q[T].indexOf(")");aa=Editor.trimCssUrl(q[T].substring(0,aa));var U=document.createElement("link");U.setAttribute("rel","preload");U.setAttribute("href",aa);U.setAttribute("as","font");U.setAttribute("crossorigin","");F.parentNode.insertBefore(U,F)}}}};Editor.trimCssUrl=function(q){return q.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(q){q=null!=q?q:Editor.GUID_LENGTH;for(var F=[],T=0;T<q;T++)F.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return F.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(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var F=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(F)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[F]),Error(mxResources.get("notADiagramFile")+" ("+F+")");if("mxGraphModel"==q.nodeName){F=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=F&&""!=
-F)F!=this.graph.currentStyle&&(T=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=T&&(aa=new mxCodec(T.ownerDocument),aa.decode(T,this.graph.getStylesheet())));else{var T=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=T){var aa=new mxCodec(T.ownerDocument);aa.decode(T,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||
-"1"==q.getAttribute("math");F=q.getAttribute("backgroundImage");null!=F?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(F)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(F=q.getAttribute("extFonts"))try{for(F=F.split("|").map(function(U){U=U.split("^");return{name:U[0],url:U[1]}}),T=0;T<F.length;T++)this.graph.addExtFont(F[T].name,
-F[T].url)}catch(U){console.log("ExtFonts format error: "+U.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 d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,F){q=null!=q?q:!0;var T=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&T.setAttribute("style",
-this.graph.currentStyle);var aa=this.graph.getBackgroundImageObject(this.graph.backgroundImage,F);null!=aa&&T.setAttribute("backgroundImage",JSON.stringify(aa));T.setAttribute("math",this.graph.mathEnabled?"1":"0");T.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(aa=this.graph.extFonts.map(function(U){return U.name+"^"+U.url}),T.setAttribute("extFonts",aa.join("|")));return T};Editor.prototype.isDataSvg=function(q){try{var F=mxUtils.parseXml(q).documentElement.getAttribute("content");
-if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var T=mxUtils.parseXml(F).documentElement;return"mxfile"==T.nodeName||"mxGraphModel"==T.nodeName}}catch(aa){}return!1};Editor.prototype.extractGraphModel=function(q,F,T){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
-"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var l=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){l.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
-function(q,F){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(U){try{MathJax.typesetClear([U]),MathJax.typeset([U]),Editor.onMathJaxDone()}catch(da){MathJax.typesetClear([U]),null!=da.retry?da.retry.then(function(){MathJax.typesetPromise([U]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+da.toString())}};window.MathJax=null!=F?F:{options:{skipHtmlTags:{"[+]":["text"]}},
-loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var T=Editor.prototype.init;
-Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(da,fa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};F=document.getElementsByTagName("script");if(null!=F&&0<F.length){var aa=document.createElement("script");aa.setAttribute("type","text/javascript");aa.setAttribute("src",q);F[0].parentNode.appendChild(aa)}}};
-Editor.prototype.csvToArray=function(q){if(0<q.length){var F="",T=[""],aa=0,U=!0,da;q=$jscomp.makeIterator(q);for(da=q.next();!da.done;da=q.next())da=da.value,'"'===da?(U&&da===F&&(T[aa]+=da),U=!U):","===da&&U?da=T[++aa]="":T[aa]+=da,F=da;return T}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var F=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);
-F=/\.png$/i.test(q)||/\.pdf$/i.test(q)||F;var T="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+T+(F?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.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(q)||"https://raw.githubusercontent.com/"===
-q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var F=q.convert,T=this;q.convert=function(aa){if(null!=aa){var U="http://"==aa.substring(0,7)||"https://"==aa.substring(0,8);U&&!navigator.onLine?aa=Editor.svgBrokenImage.src:!U||aa.substring(0,q.baseUrl.length)==q.baseUrl||T.crossOriginImages&&T.isCorsEnabledForUrl(aa)?"chrome-extension://"==
-aa.substring(0,19)||mxClient.IS_CHROMEAPP||(aa=F.apply(this,arguments)):aa=PROXY_URL+"?url="+encodeURIComponent(aa)}return aa};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,F){try{var T=!0,aa=window.setTimeout(mxUtils.bind(this,function(){T=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(da){window.clearTimeout(aa);
-T&&F(Editor.createSvgDataUri(da.getText()))}),function(){window.clearTimeout(aa);T&&F(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(aa);if(T)try{var da=document.createElement("canvas"),fa=da.getContext("2d");da.height=U.height;da.width=U.width;fa.drawImage(U,0,0);F(da.toDataURL())}catch(na){F(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(aa);T&&F(Editor.svgBrokenImage.src)};U.src=
-q}}catch(da){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,F,T,aa){null==aa&&(aa=this.createImageUrlConverter());var U=0,da=T||{};T=mxUtils.bind(this,function(fa,na){fa=q.getElementsByTagName(fa);for(var sa=0;sa<fa.length;sa++)mxUtils.bind(this,function(za){try{if(null!=za){var ua=aa.convert(za.getAttribute(na));if(null!=ua&&"data:"!=ua.substring(0,5)){var Ba=da[ua];null==Ba?(U++,this.convertImageToDataUri(ua,function(oa){null!=oa&&(da[ua]=oa,za.setAttribute(na,oa));U--;
-0==U&&F(q)})):za.setAttribute(na,Ba)}else null!=ua&&za.setAttribute(na,ua)}}catch(oa){}})(fa[sa])});T("image","xlink:href");T("img","src");0==U&&F(q)};Editor.base64Encode=function(q){for(var F="",T=0,aa=q.length,U,da,fa;T<aa;){U=q.charCodeAt(T++)&255;if(T==aa){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4);F+="==";break}da=q.charCodeAt(T++);if(T==aa){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
-2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(da&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2);F+="=";break}fa=q.charCodeAt(T++);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(da&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2|(fa&192)>>
-6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(fa&63)}return F};Editor.prototype.loadUrl=function(q,F,T,aa,U,da,fa,na){try{var sa=!fa&&(aa||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));U=null!=U?U:!0;var za=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(ua){if(200<=ua.getStatus()&&299>=ua.getStatus()){if(null!=F){var Ba=ua.getText();if(sa){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){ua=mxUtilsBinaryToArray(ua.request.responseBody).toArray();Ba=Array(ua.length);for(var oa=0;oa<ua.length;oa++)Ba[oa]=String.fromCharCode(ua[oa]);Ba=Ba.join("")}da=null!=da?da:"data:image/png;base64,";Ba=da+Editor.base64Encode(Ba)}F(Ba)}}else null!=T&&(0==ua.getStatus()?T({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?T({code:ua.getStatus()},ua):T({message:mxResources.get("error")+" "+ua.getStatus()},ua))}),function(ua){null!=T&&
-T({message:mxResources.get("error")+" "+ua.getStatus()})},sa,this.timeout,function(){U&&null!=T&&T({code:App.ERROR_TIMEOUT,retry:za})},na)});za()}catch(ua){null!=T&&T(ua)}};Editor.prototype.absoluteCssFonts=function(q){var F=null;if(null!=q){var T=q.split("url(");if(0<T.length){F=[T[0]];q=window.location.pathname;var aa=null!=q?q.lastIndexOf("/"):-1;0<=aa&&(q=q.substring(0,aa+1));aa=document.getElementsByTagName("base");var U=null;null!=aa&&0<aa.length&&(U=aa[0].getAttribute("href"));for(var da=1;da<
-T.length;da++)if(aa=T[da].indexOf(")"),0<aa){var fa=Editor.trimCssUrl(T[da].substring(0,aa));this.graph.isRelativeUrl(fa)&&(fa=null!=U?U+fa:window.location.protocol+"//"+window.location.hostname+("/"==fa.charAt(0)?"":q)+fa);F.push('url("'+fa+'"'+T[da].substring(aa))}else F.push(T[da])}else F=[q]}return null!=F?F.join(""):null};Editor.prototype.mapFontUrl=function(q,F,T){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));T(q,F)};Editor.prototype.embedCssFonts=
-function(q,F){var T=q.split("url("),aa=0;null==this.cachedFonts&&(this.cachedFonts={});var U=mxUtils.bind(this,function(){if(0==aa){for(var sa=[T[0]],za=1;za<T.length;za++){var ua=T[za].indexOf(")");sa.push('url("');sa.push(this.cachedFonts[Editor.trimCssUrl(T[za].substring(0,ua))]);sa.push('"'+T[za].substring(ua))}F(sa.join(""))}});if(0<T.length){for(q=1;q<T.length;q++){var da=T[q].indexOf(")"),fa=null,na=T[q].indexOf("format(",da);0<na&&(fa=Editor.trimCssUrl(T[q].substring(na+7,T[q].indexOf(")",
-na))));mxUtils.bind(this,function(sa){if(null==this.cachedFonts[sa]){this.cachedFonts[sa]=sa;aa++;var za="application/x-font-ttf";if("svg"==fa||/(\.svg)($|\?)/i.test(sa))za="image/svg+xml";else if("otf"==fa||"embedded-opentype"==fa||/(\.otf)($|\?)/i.test(sa))za="application/x-font-opentype";else if("woff"==fa||/(\.woff)($|\?)/i.test(sa))za="application/font-woff";else if("woff2"==fa||/(\.woff2)($|\?)/i.test(sa))za="application/font-woff2";else if("eot"==fa||/(\.eot)($|\?)/i.test(sa))za="application/vnd.ms-fontobject";
-else if("sfnt"==fa||/(\.sfnt)($|\?)/i.test(sa))za="application/font-sfnt";this.mapFontUrl(za,sa,mxUtils.bind(this,function(ua,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(oa){this.cachedFonts[sa]=oa;aa--;U()}),mxUtils.bind(this,function(oa){aa--;U()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(T[q].substring(0,da)),fa)}U()}else F(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss=
-F;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(q[F]=Graph.fontMapping[F]);return q};Editor.prototype.embedExtFonts=function(q){var F=this.graph.getCustomFonts();if(0<F.length){var T=[],aa=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var U=mxUtils.bind(this,function(){0==aa&&this.embedCssFonts(T.join(""),q)}),da=0;da<F.length;da++)mxUtils.bind(this,function(fa,
-na){Graph.isCssFontUrl(na)?null==this.cachedGoogleFonts[na]?(aa++,this.loadUrl(na,mxUtils.bind(this,function(sa){this.cachedGoogleFonts[na]=sa;T.push(sa+"\n");aa--;U()}),mxUtils.bind(this,function(sa){aa--;T.push("@import url("+na+");\n");U()}))):T.push(this.cachedGoogleFonts[na]+"\n"):T.push('@font-face {font-family: "'+fa+'";src: url("'+na+'")}\n')})(F[da].name,F[da].url);U()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var F=document.getElementsByTagName("style"),
-T=0;T<F.length;T++){var aa=mxUtils.getTextContent(F[T]);0>aa.indexOf("mxPageSelector")&&0<aa.indexOf("MathJax")&&q[0].appendChild(F[T].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,F){F=null!=F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var T=q.getElementsByTagName("defs"),aa=q.ownerDocument;0==T.length?(T=null!=aa.createElementNS?aa.createElementNS(mxConstants.NS_SVG,"defs"):aa.createElement("defs"),null!=q.firstChild?q.insertBefore(T,q.firstChild):q.appendChild(T)):T=T[0];q=null!=
-aa.createElementNS?aa.createElementNS(mxConstants.NS_SVG,"style"):aa.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,F);T.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,F,T){var aa=mxClient.IS_FF?8192:16384;return Math.min(T,Math.min(aa/q,aa/F))};Editor.prototype.exportToCanvas=function(q,F,T,aa,U,da,fa,na,sa,za,ua,Ba,oa,Aa,ya,La,Oa,Na){try{da=null!=
-da?da:!0;fa=null!=fa?fa:!0;Ba=null!=Ba?Ba:this.graph;oa=null!=oa?oa:0;var Ia=sa?null:Ba.background;Ia==mxConstants.NONE&&(Ia=null);null==Ia&&(Ia=aa);null==Ia&&0==sa&&(Ia=La?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,oa,Aa,null,fa,null,null,null,za,null,La,Oa,Na),mxUtils.bind(this,function(wa){try{var ab=new Image;ab.onload=mxUtils.bind(this,function(){try{var x=function(){mxClient.IS_SF?window.setTimeout(function(){ba.drawImage(ab,0,0);q(O,wa)},0):(ba.drawImage(ab,
-0,0),q(O,wa))},O=document.createElement("canvas"),P=parseInt(wa.getAttribute("width")),X=parseInt(wa.getAttribute("height"));na=null!=na?na:1;null!=F&&(na=da?Math.min(1,Math.min(3*F/(4*X),F/P)):F/P);na=this.getMaxCanvasScale(P,X,na);P=Math.ceil(na*P);X=Math.ceil(na*X);O.setAttribute("width",P);O.setAttribute("height",X);var ba=O.getContext("2d");null!=Ia&&(ba.beginPath(),ba.rect(0,0,P,X),ba.fillStyle=Ia,ba.fill());1!=na&&ba.scale(na,na);if(ya){var W=Ba.view,ea=W.scale;W.scale=1;var ta=btoa(unescape(encodeURIComponent(W.createSvgGrid(W.gridColor))));
-W.scale=ea;ta="data:image/svg+xml;base64,"+ta;var qa=Ba.gridSize*W.gridSteps*na,va=Ba.getGraphBounds(),Ea=W.translate.x*ea,Ca=W.translate.y*ea,Ma=Ea+(va.x-Ea)/ea-oa,Sa=Ca+(va.y-Ca)/ea-oa,Qa=new Image;Qa.onload=function(){try{for(var Fa=-Math.round(qa-mxUtils.mod((Ea-Ma)*na,qa)),Ka=-Math.round(qa-mxUtils.mod((Ca-Sa)*na,qa));Fa<P;Fa+=qa)for(var Pa=Ka;Pa<X;Pa+=qa)ba.drawImage(Qa,Fa/na,Pa/na);x()}catch($a){null!=U&&U($a)}};Qa.onerror=function(Fa){null!=U&&U(Fa)};Qa.src=ta}else x()}catch(Fa){null!=U&&
-U(Fa)}});ab.onerror=function(x){null!=U&&U(x)};za&&this.graph.addSvgShadow(wa);this.graph.mathEnabled&&this.addMathCss(wa);var Ya=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(wa,this.resolvedFontCss),ab.src=Editor.createSvgDataUri(mxUtils.getXml(wa))}catch(x){null!=U&&U(x)}});this.embedExtFonts(mxUtils.bind(this,function(x){try{null!=x&&this.addFontCss(wa,x),this.loadFonts(Ya)}catch(O){null!=U&&U(O)}}))}catch(x){null!=U&&U(x)}}),T,ua)}catch(wa){null!=U&&U(wa)}};Editor.crcTable=
-[];for(var B=0;256>B;B++)for(var p=B,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[B]=p;Editor.updateCRC=function(q,F,T,aa){for(var U=0;U<aa;U++)q=Editor.crcTable[(q^F.charCodeAt(T+U))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,T=0;T<q.length;T++)F=F>>>8^Editor.crcTable[(F^q.charCodeAt(T))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,T,aa,U){function da(ua,Ba){var oa=sa;sa+=Ba;return ua.substring(oa,sa)}function fa(ua){ua=da(ua,4);return ua.charCodeAt(3)+
-(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function na(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var sa=0;if(da(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=U&&U();else if(da(q,4),"IHDR"!=da(q,4))null!=U&&U();else{da(q,17);U=q.substring(0,sa);do{var za=fa(q);if("IDAT"==da(q,4)){U=q.substring(0,sa-8);"pHYs"==F&&"dpi"==T?(T=Math.round(aa/.0254),
-T=na(T)+na(T)+String.fromCharCode(1)):T=T+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+aa;aa=4294967295;aa=Editor.updateCRC(aa,F,0,4);aa=Editor.updateCRC(aa,T,0,T.length);U+=na(T.length)+F+T+na(aa^4294967295);U+=q.substring(sa-8,q.length);break}U+=q.substring(sa-8,sa-4+za);da(q,za);da(q,4)}while(za);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var M=
-ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,F){M.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var T=null;null!=q.editor.graph.getModel().getParent(F)?T=F.getId():null!=q.currentPage&&(T=
-q.currentPage.getId());return T});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var K=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?K.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();
-return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var Q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=Q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,T=F.editor.graph,aa=this.createOption(mxResources.get("shadow"),function(){return T.shadowVisible},function(U){var da=new ChangePageSetup(F);da.ignoreColor=!0;
-da.ignoreImage=!0;da.shadowVisible=U;T.model.execute(da)},{install:function(U){this.listener=function(){U(T.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(aa.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(aa,60));q.appendChild(aa)}return q};var e=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=e.apply(this,arguments);
-var F=this.editorUi,T=F.editor.graph;if(T.isEnabled()){var aa=F.getCurrentFile();if(null!=aa&&aa.isAutosaveOptional()){var U=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(fa){F.editor.setAutosave(fa);F.editor.autosave&&aa.isModified()&&aa.fileChanged()},{install:function(fa){this.listener=function(){fa(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});q.appendChild(U)}}if(this.isMathOptionVisible()&&
-T.isEnabled()&&"undefined"!==typeof MathJax){U=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return T.mathEnabled},function(fa){F.actions.get("mathematicalTypesetting").funct()},{install:function(fa){this.listener=function(){fa(T.mathEnabled)};F.addListener("mathEnabledChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});U.style.paddingTop="5px";q.appendChild(U);var da=F.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");da.style.position=
-"relative";da.style.marginLeft="6px";da.style.top="2px";U.appendChild(da)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
-[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
-dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
-type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
-min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
-{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
-type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
-{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
-{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
-font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
-stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,F,T){if(null!=F){var aa=function(da){if(null!=da)if(T)for(var fa=0;fa<da.length;fa++)F[da[fa].name]=da[fa];else for(var na in F){var sa=!1;for(fa=0;fa<da.length;fa++)if(da[fa].name==na&&da[fa].type==F[na].type){sa=!0;break}sa||
-delete F[na]}},U=this.editorUi.editor.graph.view.getState(q);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),aa(U.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{aa(JSON.parse(q))}catch(da){}}};var f=
-StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var F={},T=q.vertices,aa=q.edges,U=0;U<T.length;U++)this.findCommonProperties(T[U],F,0==U);for(U=0;U<aa.length;U++)this.findCommonProperties(aa[U],F,0==T.length&&0==U);null!=Object.getOwnPropertyNames&&
-0<Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,q))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,F,T){function aa(ba,W,ea,ta){Ba.getModel().beginUpdate();try{var qa=[],va=[];if(null!=ea.index){for(var Ea=[],Ca=ea.parentRow.nextSibling;Ca&&
-Ca.getAttribute("data-pName")==ba;)Ea.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;ea.index<Ea.length?null!=ta?Ea.splice(ta,1):Ea[ea.index]=W:Ea.push(W);null!=ea.size&&Ea.length>ea.size&&(Ea=Ea.slice(0,ea.size));W=Ea.join(",");null!=ea.countProperty&&(Ba.setCellStyles(ea.countProperty,Ea.length,Ba.getSelectionCells()),qa.push(ea.countProperty),va.push(Ea.length))}Ba.setCellStyles(ba,W,Ba.getSelectionCells());qa.push(ba);va.push(W);if(null!=ea.dependentProps)for(ba=0;ba<ea.dependentProps.length;ba++){var Ma=
-ea.dependentPropsDefVal[ba],Sa=ea.dependentPropsVals[ba];if(Sa.length>W)Sa=Sa.slice(0,W);else for(var Qa=Sa.length;Qa<W;Qa++)Sa.push(Ma);Sa=Sa.join(",");Ba.setCellStyles(ea.dependentProps[ba],Sa,Ba.getSelectionCells());qa.push(ea.dependentProps[ba]);va.push(Sa)}if("function"==typeof ea.onChange)ea.onChange(Ba,W);ua.editorUi.fireEvent(new mxEventObject("styleChanged","keys",qa,"values",va,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function U(ba,W,ea){var ta=mxUtils.getOffset(q,
-!0),qa=mxUtils.getOffset(ba,!0);W.style.position="absolute";W.style.left=qa.x-ta.x+"px";W.style.top=qa.y-ta.y+"px";W.style.width=ba.offsetWidth+"px";W.style.height=ba.offsetHeight-(ea?4:0)+"px";W.style.zIndex=5}function da(ba,W,ea){var ta=document.createElement("div");ta.style.width="32px";ta.style.height="4px";ta.style.margin="2px";ta.style.border="1px solid black";ta.style.background=W&&"none"!=W?W:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ua,function(qa){this.editorUi.pickColor(W,
-function(va){ta.style.background="none"==va?"url('"+Dialog.prototype.noColorImage+"')":va;aa(ba,va,ea)});mxEvent.consume(qa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ta);return btn}function fa(ba,W,ea,ta,qa,va,Ea){null!=W&&(W=W.split(","),oa.push({name:ba,values:W,type:ea,defVal:ta,countProperty:qa,parentRow:va,isDeletable:!0,flipBkg:Ea}));btn=mxUtils.button("+",mxUtils.bind(ua,function(Ca){for(var Ma=va,Sa=0;null!=Ma.nextSibling;)if(Ma.nextSibling.getAttribute("data-pName")==
-ba)Ma=Ma.nextSibling,Sa++;else break;var Qa={type:ea,parentRow:va,index:Sa,isDeletable:!0,defVal:ta,countProperty:qa};Sa=za(ba,"",Qa,0==Sa%2,Ea);aa(ba,ta,Qa);Ma.parentNode.insertBefore(Sa,Ma.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function na(ba,W,ea,ta,qa,va,Ea){if(0<qa){var Ca=Array(qa);W=null!=W?W.split(","):[];for(var Ma=0;Ma<qa;Ma++)Ca[Ma]=null!=W[Ma]?W[Ma]:null!=ta?ta:"";oa.push({name:ba,values:Ca,type:ea,defVal:ta,
-parentRow:va,flipBkg:Ea,size:qa})}return document.createElement("div")}function sa(ba,W,ea){var ta=document.createElement("input");ta.type="checkbox";ta.checked="1"==W;mxEvent.addListener(ta,"change",function(){aa(ba,ta.checked?"1":"0",ea)});return ta}function za(ba,W,ea,ta,qa){var va=ea.dispName,Ea=ea.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(qa?"Dark":"")+(ta?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",ba);Ca.setAttribute("data-pValue",W);ta=!1;null!=ea.index&&
-(Ca.setAttribute("data-index",ea.index),va=(null!=va?va:"")+"["+ea.index+"]",ta=!0);var Ma=document.createElement("td");Ma.className="gePropRowCell";va=mxResources.get(va,null,va);mxUtils.write(Ma,va);Ma.setAttribute("title",va);ta&&(Ma.style.textAlign="right");Ca.appendChild(Ma);Ma=document.createElement("td");Ma.className="gePropRowCell";if("color"==Ea)Ma.appendChild(da(ba,W,ea));else if("bool"==Ea||"boolean"==Ea)Ma.appendChild(sa(ba,W,ea));else if("enum"==Ea){var Sa=ea.enumList;for(qa=0;qa<Sa.length;qa++)if(va=
-Sa[qa],va.val==W){mxUtils.write(Ma,mxResources.get(va.dispName,null,va.dispName));break}mxEvent.addListener(Ma,"click",mxUtils.bind(ua,function(){var Qa=document.createElement("select");U(Ma,Qa);for(var Fa=0;Fa<Sa.length;Fa++){var Ka=Sa[Fa],Pa=document.createElement("option");Pa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Pa,mxResources.get(Ka.dispName,null,Ka.dispName));Qa.appendChild(Pa)}Qa.value=W;q.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var $a=mxUtils.htmlEntities(Qa.value);
-aa(ba,$a,ea)});Qa.focus();mxEvent.addListener(Qa,"blur",function(){q.removeChild(Qa)})}))}else"dynamicArr"==Ea?Ma.appendChild(fa(ba,W,ea.subType,ea.subDefVal,ea.countProperty,Ca,qa)):"staticArr"==Ea?Ma.appendChild(na(ba,W,ea.subType,ea.subDefVal,ea.size,Ca,qa)):"readOnly"==Ea?(qa=document.createElement("input"),qa.setAttribute("readonly",""),qa.value=W,qa.style.width="96px",qa.style.borderWidth="0px",Ma.appendChild(qa)):(Ma.innerHTML=mxUtils.htmlEntities(decodeURIComponent(W)),mxEvent.addListener(Ma,
-"click",mxUtils.bind(ua,function(){function Qa(){var Ka=Fa.value;Ka=0==Ka.length&&"string"!=Ea?0:Ka;ea.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",Ea="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ea.min&&Ka<ea.min?Ka=ea.min:null!=ea.max&&Ka>ea.max&&(Ka=ea.max);Ka=encodeURIComponent(("int"==Ea?parseInt(Ka):Ka)+"");aa(ba,Ka,ea)}var Fa=document.createElement("input");U(Ma,Fa,!0);Fa.value=decodeURIComponent(W);Fa.className="gePropEditor";"int"!=Ea&&"float"!=Ea||ea.allowAuto||
-(Fa.type="number",Fa.step="int"==Ea?"1":"any",null!=ea.min&&(Fa.min=parseFloat(ea.min)),null!=ea.max&&(Fa.max=parseFloat(ea.max)));q.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ka){13==Ka.keyCode&&Qa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Qa()})})));ea.isDeletable&&(qa=mxUtils.button("-",mxUtils.bind(ua,function(Qa){aa(ba,"",ea,ea.index);mxEvent.consume(Qa)})),qa.style.height="16px",qa.style.width="25px",qa.style.float="right",qa.className="geColorBtn",Ma.appendChild(qa));
-Ca.appendChild(Ma);return Ca}var ua=this,Ba=this.editorUi.editor.graph,oa=[];q.style.position="relative";q.style.padding="0";var Aa=document.createElement("table");Aa.className="geProperties";Aa.style.whiteSpace="nowrap";Aa.style.width="100%";var ya=document.createElement("tr");ya.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";var Oa=document.createElement("img");Oa.src=Sidebar.prototype.expandedImage;Oa.style.verticalAlign="middle";La.appendChild(Oa);
-mxUtils.write(La,mxResources.get("property"));ya.style.cursor="pointer";var Na=function(){var ba=Aa.querySelectorAll(".gePropNonHeaderRow");if(ua.editorUi.propertiesCollapsed){Oa.src=Sidebar.prototype.collapsedImage;var W="none";for(var ea=q.childNodes.length-1;0<=ea;ea--)try{var ta=q.childNodes[ea],qa=ta.nodeName.toUpperCase();"INPUT"!=qa&&"SELECT"!=qa||q.removeChild(ta)}catch(va){}}else Oa.src=Sidebar.prototype.expandedImage,W="";for(ea=0;ea<ba.length;ea++)ba[ea].style.display=W};mxEvent.addListener(ya,
-"click",function(){ua.editorUi.propertiesCollapsed=!ua.editorUi.propertiesCollapsed;Na()});ya.appendChild(La);La=document.createElement("th");La.className="gePropHeaderCell";La.innerHTML=mxResources.get("value");ya.appendChild(La);Aa.appendChild(ya);var Ia=!1,wa=!1;ya=null;1==T.vertices.length&&0==T.edges.length?ya=T.vertices[0].id:0==T.vertices.length&&1==T.edges.length&&(ya=T.edges[0].id);null!=ya&&Aa.appendChild(za("id",mxUtils.htmlEntities(ya),{dispName:"ID",type:"readOnly"},!0,!1));for(var ab in F)if(ya=
-F[ab],"function"!=typeof ya.isVisible||ya.isVisible(T,this)){var Ya=null!=T.style[ab]?mxUtils.htmlEntities(T.style[ab]+""):null!=ya.getDefaultValue?ya.getDefaultValue(T,this):ya.defVal;if("separator"==ya.type)wa=!wa;else{if("staticArr"==ya.type)ya.size=parseInt(T.style[ya.sizeProperty]||F[ya.sizeProperty].defVal)||0;else if(null!=ya.dependentProps){var x=ya.dependentProps,O=[],P=[];for(La=0;La<x.length;La++){var X=T.style[x[La]];P.push(F[x[La]].subDefVal);O.push(null!=X?X.split(","):[])}ya.dependentPropsDefVal=
-P;ya.dependentPropsVals=O}Aa.appendChild(za(ab,Ya,ya,Ia,wa));Ia=!Ia}}for(La=0;La<oa.length;La++)for(ya=oa[La],F=ya.parentRow,T=0;T<ya.values.length;T++)ab=za(ya.name,ya.values[T],{type:ya.type,parentRow:ya.parentRow,isDeletable:ya.isDeletable,index:T,defVal:ya.defVal,countProperty:ya.countProperty,size:ya.size},0==T%2,ya.flipBkg),F.parentNode.insertBefore(ab,F.nextSibling),F=ab;q.appendChild(Aa);Na();return q};StyleFormatPanel.prototype.addStyles=function(q){function F(ya){mxEvent.addListener(ya,
-"mouseenter",function(){ya.style.opacity="1"});mxEvent.addListener(ya,"mouseleave",function(){ya.style.opacity="0.5"})}var T=this.editorUi,aa=T.editor.graph,U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.paddingLeft="24px";U.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(U);var da="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
-fa=document.createElement("div");fa.style.whiteSpace="nowrap";fa.style.position="relative";fa.style.textAlign="center";fa.style.width="210px";for(var na=[],sa=0;sa<this.defaultColorSchemes.length;sa++){var za=document.createElement("div");za.style.display="inline-block";za.style.width="6px";za.style.height="6px";za.style.marginLeft="4px";za.style.marginRight="3px";za.style.borderRadius="3px";za.style.cursor="pointer";za.style.background="transparent";za.style.border="1px solid #b5b6b7";mxUtils.bind(this,
-function(ya){mxEvent.addListener(za,"click",mxUtils.bind(this,function(){ua(ya)}))})(sa);na.push(za);fa.appendChild(za)}var ua=mxUtils.bind(this,function(ya){null!=na[ya]&&(null!=this.format.currentScheme&&null!=na[this.format.currentScheme]&&(na[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ya,Ba(this.defaultColorSchemes[this.format.currentScheme]),na[this.format.currentScheme].style.background="#84d7ff")}),Ba=mxUtils.bind(this,function(ya){var La=mxUtils.bind(this,
-function(Na){var Ia=mxUtils.button("",mxUtils.bind(this,function(Ya){aa.getModel().beginUpdate();try{for(var x=T.getSelectionState().cells,O=0;O<x.length;O++){for(var P=aa.getModel().getStyle(x[O]),X=0;X<da.length;X++)P=mxUtils.removeStylename(P,da[X]);var ba=aa.getModel().isVertex(x[O])?aa.defaultVertexStyle:aa.defaultEdgeStyle;null!=Na?(mxEvent.isShiftDown(Ya)||(P=""==Na.fill?mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,Na.fill||mxUtils.getValue(ba,
-mxConstants.STYLE_FILLCOLOR,null)),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,Na.gradient||mxUtils.getValue(ba,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ya)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ya)||!aa.getModel().isVertex(x[O])||(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,Na.font||mxUtils.getValue(ba,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ya)||(P=""==Na.stroke?mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,
-Na.stroke||mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,null)))):(P=mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_FILLCOLOR,"#ffffff")),P=mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,"#000000")),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_GRADIENTCOLOR,null)),aa.getModel().isVertex(x[O])&&(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ba,
-mxConstants.STYLE_FONTCOLOR,null))));aa.getModel().setStyle(x[O],P)}}finally{aa.getModel().endUpdate()}}));Ia.className="geStyleButton";Ia.style.width="36px";Ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ia.style.margin="0px 6px 6px 0px";if(null!=Na){var wa="1"==urlParams.sketch?"2px solid":"1px solid";null!=Na.border&&(wa=Na.border);null!=Na.gradient?mxClient.IS_IE&&10>document.documentMode?Ia.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Na.fill+"', EndColorStr='"+
-Na.gradient+"', GradientType=0)":Ia.style.backgroundImage="linear-gradient("+Na.fill+" 0px,"+Na.gradient+" 100%)":Na.fill==mxConstants.NONE?Ia.style.background="url('"+Dialog.prototype.noColorImage+"')":Ia.style.backgroundColor=""==Na.fill?mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Na.fill||mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ia.style.border=Na.stroke==
-mxConstants.NONE?wa+" transparent":""==Na.stroke?wa+" "+mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):wa+" "+(Na.stroke||mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Na.title&&Ia.setAttribute("title",Na.title)}else{wa=mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ab=mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
-"#000000");Ia.style.backgroundColor=wa;Ia.style.border="1px solid "+ab}Ia.style.borderRadius="0";U.appendChild(Ia)});U.innerText="";for(var Oa=0;Oa<ya.length;Oa++)0<Oa&&0==mxUtils.mod(Oa,4)&&mxUtils.br(U),La(ya[Oa])});null==this.format.currentScheme?ua(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ua(this.format.currentScheme);sa=10>=this.defaultColorSchemes.length?28:8;var oa=document.createElement("div");oa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+sa+"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=);";
+"g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var F=[],T=0;T<q;T++)F.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return F.join("")};Editor.updateStatusInterval=1E4;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.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(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var F=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(F)throw EditorUi.debug("Editor.setGraphXml ParserError",
+[this],"node",[q],"cause",[F]),Error(mxResources.get("notADiagramFile")+" ("+F+")");if("mxGraphModel"==q.nodeName){F=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=F&&""!=F)F!=this.graph.currentStyle&&(T=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=T&&(aa=new mxCodec(T.ownerDocument),aa.decode(T,this.graph.getStylesheet())));else{var T=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
+"/default-old.xml").getDocumentElement();if(null!=T){var aa=new mxCodec(T.ownerDocument);aa.decode(T,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||"1"==q.getAttribute("math");F=q.getAttribute("backgroundImage");null!=F?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(F)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(F=q.getAttribute("extFonts"))try{for(F=F.split("|").map(function(U){U=U.split("^");return{name:U[0],url:U[1]}}),T=0;T<F.length;T++)this.graph.addExtFont(F[T].name,F[T].url)}catch(U){console.log("ExtFonts format error: "+U.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(q,F){q=null!=q?q:!0;var T=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&T.setAttribute("style",this.graph.currentStyle);var aa=this.graph.getBackgroundImageObject(this.graph.backgroundImage,F);null!=aa&&T.setAttribute("backgroundImage",JSON.stringify(aa));T.setAttribute("math",this.graph.mathEnabled?"1":"0");T.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=
+this.graph.extFonts&&0<this.graph.extFonts.length&&(aa=this.graph.extFonts.map(function(U){return U.name+"^"+U.url}),T.setAttribute("extFonts",aa.join("|")));return T};Editor.prototype.isDataSvg=function(q){try{var F=mxUtils.parseXml(q).documentElement.getAttribute("content");if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var T=mxUtils.parseXml(F).documentElement;
+return"mxfile"==T.nodeName||"mxGraphModel"==T.nodeName}}catch(aa){}return!1};Editor.prototype.extractGraphModel=function(q,F,T){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};
+var l=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){l.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(q,F){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(U){try{MathJax.typesetClear([U]),MathJax.typeset([U]),
+Editor.onMathJaxDone()}catch(da){MathJax.typesetClear([U]),null!=da.retry?da.retry.then(function(){MathJax.typesetPromise([U]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+da.toString())}};window.MathJax=null!=F?F:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};
+Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(da,fa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
+U);this.graph.addListener(mxEvent.REFRESH,U)};F=document.getElementsByTagName("script");if(null!=F&&0<F.length){var aa=document.createElement("script");aa.setAttribute("type","text/javascript");aa.setAttribute("src",q);F[0].parentNode.appendChild(aa)}}};Editor.prototype.csvToArray=function(q){if(0<q.length){var F="",T=[""],aa=0,U=!0,da;q=$jscomp.makeIterator(q);for(da=q.next();!da.done;da=q.next())da=da.value,'"'===da?(U&&da===F&&(T[aa]+=da),U=!U):","===da&&U?da=T[++aa]="":T[aa]+=da,F=da;return T}return[]};
+Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var F=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);F=/\.png$/i.test(q)||/\.pdf$/i.test(q)||F;var T="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+T+(F?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
+q.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(q)||"https://raw.githubusercontent.com/"===q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var F=
+q.convert,T=this;q.convert=function(aa){if(null!=aa){var U="http://"==aa.substring(0,7)||"https://"==aa.substring(0,8);U&&!navigator.onLine?aa=Editor.svgBrokenImage.src:!U||aa.substring(0,q.baseUrl.length)==q.baseUrl||T.crossOriginImages&&T.isCorsEnabledForUrl(aa)?"chrome-extension://"==aa.substring(0,19)||mxClient.IS_CHROMEAPP||(aa=F.apply(this,arguments)):aa=PROXY_URL+"?url="+encodeURIComponent(aa)}return aa};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};
+Editor.prototype.convertImageToDataUri=function(q,F){try{var T=!0,aa=window.setTimeout(mxUtils.bind(this,function(){T=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(da){window.clearTimeout(aa);T&&F(Editor.createSvgDataUri(da.getText()))}),function(){window.clearTimeout(aa);T&&F(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(aa);if(T)try{var da=
+document.createElement("canvas"),fa=da.getContext("2d");da.height=U.height;da.width=U.width;fa.drawImage(U,0,0);F(da.toDataURL())}catch(na){F(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(aa);T&&F(Editor.svgBrokenImage.src)};U.src=q}}catch(da){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,F,T,aa){null==aa&&(aa=this.createImageUrlConverter());var U=0,da=T||{};T=mxUtils.bind(this,function(fa,na){fa=q.getElementsByTagName(fa);for(var sa=0;sa<fa.length;sa++)mxUtils.bind(this,
+function(za){try{if(null!=za){var ua=aa.convert(za.getAttribute(na));if(null!=ua&&"data:"!=ua.substring(0,5)){var Ba=da[ua];null==Ba?(U++,this.convertImageToDataUri(ua,function(oa){null!=oa&&(da[ua]=oa,za.setAttribute(na,oa));U--;0==U&&F(q)})):za.setAttribute(na,Ba)}else null!=ua&&za.setAttribute(na,ua)}}catch(oa){}})(fa[sa])});T("image","xlink:href");T("img","src");0==U&&F(q)};Editor.base64Encode=function(q){for(var F="",T=0,aa=q.length,U,da,fa;T<aa;){U=q.charCodeAt(T++)&255;if(T==aa){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
+2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4);F+="==";break}da=q.charCodeAt(T++);if(T==aa){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(da&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2);F+="=";break}fa=q.charCodeAt(T++);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
+2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(da&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2|(fa&192)>>6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(fa&63)}return F};Editor.prototype.loadUrl=function(q,F,T,aa,U,da,fa,na){try{var sa=!fa&&(aa||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));U=null!=U?U:!0;var za=
+mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(ua){if(200<=ua.getStatus()&&299>=ua.getStatus()){if(null!=F){var Ba=ua.getText();if(sa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){ua=mxUtilsBinaryToArray(ua.request.responseBody).toArray();Ba=Array(ua.length);for(var oa=0;oa<ua.length;oa++)Ba[oa]=String.fromCharCode(ua[oa]);Ba=Ba.join("")}da=null!=da?da:"data:image/png;base64,";Ba=da+Editor.base64Encode(Ba)}F(Ba)}}else null!=
+T&&(0==ua.getStatus()?T({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?T({code:ua.getStatus()},ua):T({message:mxResources.get("error")+" "+ua.getStatus()},ua))}),function(ua){null!=T&&T({message:mxResources.get("error")+" "+ua.getStatus()})},sa,this.timeout,function(){U&&null!=T&&T({code:App.ERROR_TIMEOUT,retry:za})},na)});za()}catch(ua){null!=T&&T(ua)}};Editor.prototype.absoluteCssFonts=function(q){var F=null;if(null!=q){var T=q.split("url(");if(0<T.length){F=[T[0]];q=window.location.pathname;
+var aa=null!=q?q.lastIndexOf("/"):-1;0<=aa&&(q=q.substring(0,aa+1));aa=document.getElementsByTagName("base");var U=null;null!=aa&&0<aa.length&&(U=aa[0].getAttribute("href"));for(var da=1;da<T.length;da++)if(aa=T[da].indexOf(")"),0<aa){var fa=Editor.trimCssUrl(T[da].substring(0,aa));this.graph.isRelativeUrl(fa)&&(fa=null!=U?U+fa:window.location.protocol+"//"+window.location.hostname+("/"==fa.charAt(0)?"":q)+fa);F.push('url("'+fa+'"'+T[da].substring(aa))}else F.push(T[da])}else F=[q]}return null!=F?
+F.join(""):null};Editor.prototype.mapFontUrl=function(q,F,T){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));T(q,F)};Editor.prototype.embedCssFonts=function(q,F){var T=q.split("url("),aa=0;null==this.cachedFonts&&(this.cachedFonts={});var U=mxUtils.bind(this,function(){if(0==aa){for(var sa=[T[0]],za=1;za<T.length;za++){var ua=T[za].indexOf(")");sa.push('url("');sa.push(this.cachedFonts[Editor.trimCssUrl(T[za].substring(0,ua))]);sa.push('"'+T[za].substring(ua))}F(sa.join(""))}});
+if(0<T.length){for(q=1;q<T.length;q++){var da=T[q].indexOf(")"),fa=null,na=T[q].indexOf("format(",da);0<na&&(fa=Editor.trimCssUrl(T[q].substring(na+7,T[q].indexOf(")",na))));mxUtils.bind(this,function(sa){if(null==this.cachedFonts[sa]){this.cachedFonts[sa]=sa;aa++;var za="application/x-font-ttf";if("svg"==fa||/(\.svg)($|\?)/i.test(sa))za="image/svg+xml";else if("otf"==fa||"embedded-opentype"==fa||/(\.otf)($|\?)/i.test(sa))za="application/x-font-opentype";else if("woff"==fa||/(\.woff)($|\?)/i.test(sa))za=
+"application/font-woff";else if("woff2"==fa||/(\.woff2)($|\?)/i.test(sa))za="application/font-woff2";else if("eot"==fa||/(\.eot)($|\?)/i.test(sa))za="application/vnd.ms-fontobject";else if("sfnt"==fa||/(\.sfnt)($|\?)/i.test(sa))za="application/font-sfnt";this.mapFontUrl(za,sa,mxUtils.bind(this,function(ua,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(oa){this.cachedFonts[sa]=oa;aa--;U()}),mxUtils.bind(this,function(oa){aa--;U()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(T[q].substring(0,
+da)),fa)}U()}else F(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss=F;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(q[F]=Graph.fontMapping[F]);return q};Editor.prototype.embedExtFonts=function(q){var F=this.graph.getCustomFonts();if(0<F.length){var T=[],aa=0;null==this.cachedGoogleFonts&&
+(this.cachedGoogleFonts=this.createGoogleFontCache());for(var U=mxUtils.bind(this,function(){0==aa&&this.embedCssFonts(T.join(""),q)}),da=0;da<F.length;da++)mxUtils.bind(this,function(fa,na){Graph.isCssFontUrl(na)?null==this.cachedGoogleFonts[na]?(aa++,this.loadUrl(na,mxUtils.bind(this,function(sa){this.cachedGoogleFonts[na]=sa;T.push(sa+"\n");aa--;U()}),mxUtils.bind(this,function(sa){aa--;T.push("@import url("+na+");\n");U()}))):T.push(this.cachedGoogleFonts[na]+"\n"):T.push('@font-face {font-family: "'+
+fa+'";src: url("'+na+'")}\n')})(F[da].name,F[da].url);U()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var F=document.getElementsByTagName("style"),T=0;T<F.length;T++){var aa=mxUtils.getTextContent(F[T]);0>aa.indexOf("mxPageSelector")&&0<aa.indexOf("MathJax")&&q[0].appendChild(F[T].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,F){F=null!=F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var T=q.getElementsByTagName("defs"),
+aa=q.ownerDocument;0==T.length?(T=null!=aa.createElementNS?aa.createElementNS(mxConstants.NS_SVG,"defs"):aa.createElement("defs"),null!=q.firstChild?q.insertBefore(T,q.firstChild):q.appendChild(T)):T=T[0];q=null!=aa.createElementNS?aa.createElementNS(mxConstants.NS_SVG,"style"):aa.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,F);T.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=
+function(q,F,T){var aa=mxClient.IS_FF?8192:16384;return Math.min(T,Math.min(aa/q,aa/F))};Editor.prototype.exportToCanvas=function(q,F,T,aa,U,da,fa,na,sa,za,ua,Ba,oa,Aa,ya,La,Oa,Na){try{da=null!=da?da:!0;fa=null!=fa?fa:!0;Ba=null!=Ba?Ba:this.graph;oa=null!=oa?oa:0;var Ia=sa?null:Ba.background;Ia==mxConstants.NONE&&(Ia=null);null==Ia&&(Ia=aa);null==Ia&&0==sa&&(Ia=La?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,oa,Aa,null,fa,null,null,null,za,null,La,Oa,Na),
+mxUtils.bind(this,function(wa){try{var ab=new Image;ab.onload=mxUtils.bind(this,function(){try{var y=function(){mxClient.IS_SF?window.setTimeout(function(){ba.drawImage(ab,0,0);q(O,wa)},0):(ba.drawImage(ab,0,0),q(O,wa))},O=document.createElement("canvas"),P=parseInt(wa.getAttribute("width")),X=parseInt(wa.getAttribute("height"));na=null!=na?na:1;null!=F&&(na=da?Math.min(1,Math.min(3*F/(4*X),F/P)):F/P);na=this.getMaxCanvasScale(P,X,na);P=Math.ceil(na*P);X=Math.ceil(na*X);O.setAttribute("width",P);
+O.setAttribute("height",X);var ba=O.getContext("2d");null!=Ia&&(ba.beginPath(),ba.rect(0,0,P,X),ba.fillStyle=Ia,ba.fill());1!=na&&ba.scale(na,na);if(ya){var W=Ba.view,ea=W.scale;W.scale=1;var ta=btoa(unescape(encodeURIComponent(W.createSvgGrid(W.gridColor))));W.scale=ea;ta="data:image/svg+xml;base64,"+ta;var qa=Ba.gridSize*W.gridSteps*na,va=Ba.getGraphBounds(),Ea=W.translate.x*ea,Ca=W.translate.y*ea,Ma=Ea+(va.x-Ea)/ea-oa,Sa=Ca+(va.y-Ca)/ea-oa,Qa=new Image;Qa.onload=function(){try{for(var Fa=-Math.round(qa-
+mxUtils.mod((Ea-Ma)*na,qa)),Ka=-Math.round(qa-mxUtils.mod((Ca-Sa)*na,qa));Fa<P;Fa+=qa)for(var Pa=Ka;Pa<X;Pa+=qa)ba.drawImage(Qa,Fa/na,Pa/na);y()}catch($a){null!=U&&U($a)}};Qa.onerror=function(Fa){null!=U&&U(Fa)};Qa.src=ta}else y()}catch(Fa){null!=U&&U(Fa)}});ab.onerror=function(y){null!=U&&U(y)};za&&this.graph.addSvgShadow(wa);this.graph.mathEnabled&&this.addMathCss(wa);var Ya=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(wa,this.resolvedFontCss),ab.src=Editor.createSvgDataUri(mxUtils.getXml(wa))}catch(y){null!=
+U&&U(y)}});this.embedExtFonts(mxUtils.bind(this,function(y){try{null!=y&&this.addFontCss(wa,y),this.loadFonts(Ya)}catch(O){null!=U&&U(O)}}))}catch(y){null!=U&&U(y)}}),T,ua)}catch(wa){null!=U&&U(wa)}};Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,F,T,aa){for(var U=0;U<aa;U++)q=Editor.crcTable[(q^F.charCodeAt(T+U))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,T=0;T<q.length;T++)F=F>>>
+8^Editor.crcTable[(F^q.charCodeAt(T))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,T,aa,U){function da(ua,Ba){var oa=sa;sa+=Ba;return ua.substring(oa,sa)}function fa(ua){ua=da(ua,4);return ua.charCodeAt(3)+(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function na(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var sa=0;if(da(q,8)!=String.fromCharCode(137)+"PNG"+
+String.fromCharCode(13,10,26,10))null!=U&&U();else if(da(q,4),"IHDR"!=da(q,4))null!=U&&U();else{da(q,17);U=q.substring(0,sa);do{var za=fa(q);if("IDAT"==da(q,4)){U=q.substring(0,sa-8);"pHYs"==F&&"dpi"==T?(T=Math.round(aa/.0254),T=na(T)+na(T)+String.fromCharCode(1)):T=T+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+aa;aa=4294967295;aa=Editor.updateCRC(aa,F,0,4);aa=Editor.updateCRC(aa,T,0,T.length);U+=na(T.length)+F+T+na(aa^4294967295);U+=q.substring(sa-8,q.length);break}U+=q.substring(sa-
+8,sa-4+za);da(q,za);da(q,4)}while(za);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var M=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,F){M.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var T=null;null!=q.editor.graph.getModel().getParent(F)?T=F.getId():null!=q.currentPage&&(T=q.currentPage.getId());return T});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var K=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
+"1"==urlParams.embed||this.editorUi.editor.chromeless?K.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var Q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=Q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=
+this.editorUi,T=F.editor.graph,aa=this.createOption(mxResources.get("shadow"),function(){return T.shadowVisible},function(U){var da=new ChangePageSetup(F);da.ignoreColor=!0;da.ignoreImage=!0;da.shadowVisible=U;T.model.execute(da)},{install:function(U){this.listener=function(){U(T.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(aa.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),
+mxUtils.setOpacity(aa,60));q.appendChild(aa)}return q};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=d.apply(this,arguments);var F=this.editorUi,T=F.editor.graph;if(T.isEnabled()){var aa=F.getCurrentFile();if(null!=aa&&aa.isAutosaveOptional()){var U=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(fa){F.editor.setAutosave(fa);F.editor.autosave&&aa.isModified()&&aa.fileChanged()},{install:function(fa){this.listener=
+function(){fa(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});q.appendChild(U)}}if(this.isMathOptionVisible()&&T.isEnabled()&&"undefined"!==typeof MathJax){U=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return T.mathEnabled},function(fa){F.actions.get("mathematicalTypesetting").funct()},{install:function(fa){this.listener=function(){fa(T.mathEnabled)};F.addListener("mathEnabledChanged",
+this.listener)},destroy:function(){F.removeListener(this.listener)}});U.style.paddingTop="5px";q.appendChild(U);var da=F.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");da.style.position="relative";da.style.marginLeft="6px";da.style.top="2px";U.appendChild(da)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
+type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",
+type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},
+{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,
+defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",
+min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",
+dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",
+min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",
+type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",
+dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];
+mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
+type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
+type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
+type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
+font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
+{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
+function(q,F,T){if(null!=F){var aa=function(da){if(null!=da)if(T)for(var fa=0;fa<da.length;fa++)F[da[fa].name]=da[fa];else for(var na in F){var sa=!1;for(fa=0;fa<da.length;fa++)if(da[fa].name==na&&da[fa].type==F[na].type){sa=!0;break}sa||delete F[na]}},U=this.editorUi.editor.graph.view.getState(q);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,
+Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),aa(U.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{aa(JSON.parse(q))}catch(da){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var F=
+{},T=q.vertices,aa=q.edges,U=0;U<T.length;U++)this.findCommonProperties(T[U],F,0==U);for(U=0;U<aa.length;U++)this.findCommonProperties(aa[U],F,0==T.length&&0==U);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,q))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(q,F,T){function aa(ba,W,ea,ta){Ba.getModel().beginUpdate();try{var qa=[],va=[];if(null!=ea.index){for(var Ea=[],Ca=ea.parentRow.nextSibling;Ca&&Ca.getAttribute("data-pName")==ba;)Ea.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;ea.index<Ea.length?null!=ta?Ea.splice(ta,1):Ea[ea.index]=W:Ea.push(W);null!=ea.size&&Ea.length>ea.size&&(Ea=Ea.slice(0,ea.size));W=Ea.join(",");null!=ea.countProperty&&(Ba.setCellStyles(ea.countProperty,Ea.length,
+Ba.getSelectionCells()),qa.push(ea.countProperty),va.push(Ea.length))}Ba.setCellStyles(ba,W,Ba.getSelectionCells());qa.push(ba);va.push(W);if(null!=ea.dependentProps)for(ba=0;ba<ea.dependentProps.length;ba++){var Ma=ea.dependentPropsDefVal[ba],Sa=ea.dependentPropsVals[ba];if(Sa.length>W)Sa=Sa.slice(0,W);else for(var Qa=Sa.length;Qa<W;Qa++)Sa.push(Ma);Sa=Sa.join(",");Ba.setCellStyles(ea.dependentProps[ba],Sa,Ba.getSelectionCells());qa.push(ea.dependentProps[ba]);va.push(Sa)}if("function"==typeof ea.onChange)ea.onChange(Ba,
+W);ua.editorUi.fireEvent(new mxEventObject("styleChanged","keys",qa,"values",va,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function U(ba,W,ea){var ta=mxUtils.getOffset(q,!0),qa=mxUtils.getOffset(ba,!0);W.style.position="absolute";W.style.left=qa.x-ta.x+"px";W.style.top=qa.y-ta.y+"px";W.style.width=ba.offsetWidth+"px";W.style.height=ba.offsetHeight-(ea?4:0)+"px";W.style.zIndex=5}function da(ba,W,ea){var ta=document.createElement("div");ta.style.width="32px";ta.style.height=
+"4px";ta.style.margin="2px";ta.style.border="1px solid black";ta.style.background=W&&"none"!=W?W:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ua,function(qa){this.editorUi.pickColor(W,function(va){ta.style.background="none"==va?"url('"+Dialog.prototype.noColorImage+"')":va;aa(ba,va,ea)});mxEvent.consume(qa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ta);return btn}function fa(ba,W,ea,ta,qa,va,Ea){null!=W&&(W=W.split(","),
+oa.push({name:ba,values:W,type:ea,defVal:ta,countProperty:qa,parentRow:va,isDeletable:!0,flipBkg:Ea}));btn=mxUtils.button("+",mxUtils.bind(ua,function(Ca){for(var Ma=va,Sa=0;null!=Ma.nextSibling;)if(Ma.nextSibling.getAttribute("data-pName")==ba)Ma=Ma.nextSibling,Sa++;else break;var Qa={type:ea,parentRow:va,index:Sa,isDeletable:!0,defVal:ta,countProperty:qa};Sa=za(ba,"",Qa,0==Sa%2,Ea);aa(ba,ta,Qa);Ma.parentNode.insertBefore(Sa,Ma.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function na(ba,W,ea,ta,qa,va,Ea){if(0<qa){var Ca=Array(qa);W=null!=W?W.split(","):[];for(var Ma=0;Ma<qa;Ma++)Ca[Ma]=null!=W[Ma]?W[Ma]:null!=ta?ta:"";oa.push({name:ba,values:Ca,type:ea,defVal:ta,parentRow:va,flipBkg:Ea,size:qa})}return document.createElement("div")}function sa(ba,W,ea){var ta=document.createElement("input");ta.type="checkbox";ta.checked="1"==W;mxEvent.addListener(ta,"change",function(){aa(ba,ta.checked?"1":"0",ea)});return ta}function za(ba,
+W,ea,ta,qa){var va=ea.dispName,Ea=ea.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(qa?"Dark":"")+(ta?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",ba);Ca.setAttribute("data-pValue",W);ta=!1;null!=ea.index&&(Ca.setAttribute("data-index",ea.index),va=(null!=va?va:"")+"["+ea.index+"]",ta=!0);var Ma=document.createElement("td");Ma.className="gePropRowCell";va=mxResources.get(va,null,va);mxUtils.write(Ma,va);Ma.setAttribute("title",va);ta&&(Ma.style.textAlign="right");Ca.appendChild(Ma);
+Ma=document.createElement("td");Ma.className="gePropRowCell";if("color"==Ea)Ma.appendChild(da(ba,W,ea));else if("bool"==Ea||"boolean"==Ea)Ma.appendChild(sa(ba,W,ea));else if("enum"==Ea){var Sa=ea.enumList;for(qa=0;qa<Sa.length;qa++)if(va=Sa[qa],va.val==W){mxUtils.write(Ma,mxResources.get(va.dispName,null,va.dispName));break}mxEvent.addListener(Ma,"click",mxUtils.bind(ua,function(){var Qa=document.createElement("select");U(Ma,Qa);for(var Fa=0;Fa<Sa.length;Fa++){var Ka=Sa[Fa],Pa=document.createElement("option");
+Pa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Pa,mxResources.get(Ka.dispName,null,Ka.dispName));Qa.appendChild(Pa)}Qa.value=W;q.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var $a=mxUtils.htmlEntities(Qa.value);aa(ba,$a,ea)});Qa.focus();mxEvent.addListener(Qa,"blur",function(){q.removeChild(Qa)})}))}else"dynamicArr"==Ea?Ma.appendChild(fa(ba,W,ea.subType,ea.subDefVal,ea.countProperty,Ca,qa)):"staticArr"==Ea?Ma.appendChild(na(ba,W,ea.subType,ea.subDefVal,ea.size,Ca,qa)):"readOnly"==
+Ea?(qa=document.createElement("input"),qa.setAttribute("readonly",""),qa.value=W,qa.style.width="96px",qa.style.borderWidth="0px",Ma.appendChild(qa)):(Ma.innerHTML=mxUtils.htmlEntities(decodeURIComponent(W)),mxEvent.addListener(Ma,"click",mxUtils.bind(ua,function(){function Qa(){var Ka=Fa.value;Ka=0==Ka.length&&"string"!=Ea?0:Ka;ea.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",Ea="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ea.min&&Ka<ea.min?Ka=ea.min:null!=ea.max&&
+Ka>ea.max&&(Ka=ea.max);Ka=encodeURIComponent(("int"==Ea?parseInt(Ka):Ka)+"");aa(ba,Ka,ea)}var Fa=document.createElement("input");U(Ma,Fa,!0);Fa.value=decodeURIComponent(W);Fa.className="gePropEditor";"int"!=Ea&&"float"!=Ea||ea.allowAuto||(Fa.type="number",Fa.step="int"==Ea?"1":"any",null!=ea.min&&(Fa.min=parseFloat(ea.min)),null!=ea.max&&(Fa.max=parseFloat(ea.max)));q.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ka){13==Ka.keyCode&&Qa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Qa()})})));
+ea.isDeletable&&(qa=mxUtils.button("-",mxUtils.bind(ua,function(Qa){aa(ba,"",ea,ea.index);mxEvent.consume(Qa)})),qa.style.height="16px",qa.style.width="25px",qa.style.float="right",qa.className="geColorBtn",Ma.appendChild(qa));Ca.appendChild(Ma);return Ca}var ua=this,Ba=this.editorUi.editor.graph,oa=[];q.style.position="relative";q.style.padding="0";var Aa=document.createElement("table");Aa.className="geProperties";Aa.style.whiteSpace="nowrap";Aa.style.width="100%";var ya=document.createElement("tr");
+ya.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";var Oa=document.createElement("img");Oa.src=Sidebar.prototype.expandedImage;Oa.style.verticalAlign="middle";La.appendChild(Oa);mxUtils.write(La,mxResources.get("property"));ya.style.cursor="pointer";var Na=function(){var ba=Aa.querySelectorAll(".gePropNonHeaderRow");if(ua.editorUi.propertiesCollapsed){Oa.src=Sidebar.prototype.collapsedImage;var W="none";for(var ea=q.childNodes.length-1;0<=ea;ea--)try{var ta=
+q.childNodes[ea],qa=ta.nodeName.toUpperCase();"INPUT"!=qa&&"SELECT"!=qa||q.removeChild(ta)}catch(va){}}else Oa.src=Sidebar.prototype.expandedImage,W="";for(ea=0;ea<ba.length;ea++)ba[ea].style.display=W};mxEvent.addListener(ya,"click",function(){ua.editorUi.propertiesCollapsed=!ua.editorUi.propertiesCollapsed;Na()});ya.appendChild(La);La=document.createElement("th");La.className="gePropHeaderCell";La.innerHTML=mxResources.get("value");ya.appendChild(La);Aa.appendChild(ya);var Ia=!1,wa=!1;ya=null;1==
+T.vertices.length&&0==T.edges.length?ya=T.vertices[0].id:0==T.vertices.length&&1==T.edges.length&&(ya=T.edges[0].id);null!=ya&&Aa.appendChild(za("id",mxUtils.htmlEntities(ya),{dispName:"ID",type:"readOnly"},!0,!1));for(var ab in F)if(ya=F[ab],"function"!=typeof ya.isVisible||ya.isVisible(T,this)){var Ya=null!=T.style[ab]?mxUtils.htmlEntities(T.style[ab]+""):null!=ya.getDefaultValue?ya.getDefaultValue(T,this):ya.defVal;if("separator"==ya.type)wa=!wa;else{if("staticArr"==ya.type)ya.size=parseInt(T.style[ya.sizeProperty]||
+F[ya.sizeProperty].defVal)||0;else if(null!=ya.dependentProps){var y=ya.dependentProps,O=[],P=[];for(La=0;La<y.length;La++){var X=T.style[y[La]];P.push(F[y[La]].subDefVal);O.push(null!=X?X.split(","):[])}ya.dependentPropsDefVal=P;ya.dependentPropsVals=O}Aa.appendChild(za(ab,Ya,ya,Ia,wa));Ia=!Ia}}for(La=0;La<oa.length;La++)for(ya=oa[La],F=ya.parentRow,T=0;T<ya.values.length;T++)ab=za(ya.name,ya.values[T],{type:ya.type,parentRow:ya.parentRow,isDeletable:ya.isDeletable,index:T,defVal:ya.defVal,countProperty:ya.countProperty,
+size:ya.size},0==T%2,ya.flipBkg),F.parentNode.insertBefore(ab,F.nextSibling),F=ab;q.appendChild(Aa);Na();return q};StyleFormatPanel.prototype.addStyles=function(q){function F(ya){mxEvent.addListener(ya,"mouseenter",function(){ya.style.opacity="1"});mxEvent.addListener(ya,"mouseleave",function(){ya.style.opacity="0.5"})}var T=this.editorUi,aa=T.editor.graph,U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.paddingLeft="24px";U.style.paddingRight="20px";q.style.paddingLeft="16px";
+q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(U);var da="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),fa=document.createElement("div");fa.style.whiteSpace="nowrap";fa.style.position="relative";fa.style.textAlign="center";fa.style.width="210px";for(var na=[],sa=0;sa<this.defaultColorSchemes.length;sa++){var za=document.createElement("div");za.style.display=
+"inline-block";za.style.width="6px";za.style.height="6px";za.style.marginLeft="4px";za.style.marginRight="3px";za.style.borderRadius="3px";za.style.cursor="pointer";za.style.background="transparent";za.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ya){mxEvent.addListener(za,"click",mxUtils.bind(this,function(){ua(ya)}))})(sa);na.push(za);fa.appendChild(za)}var ua=mxUtils.bind(this,function(ya){null!=na[ya]&&(null!=this.format.currentScheme&&null!=na[this.format.currentScheme]&&(na[this.format.currentScheme].style.background=
+"transparent"),this.format.currentScheme=ya,Ba(this.defaultColorSchemes[this.format.currentScheme]),na[this.format.currentScheme].style.background="#84d7ff")}),Ba=mxUtils.bind(this,function(ya){var La=mxUtils.bind(this,function(Na){var Ia=mxUtils.button("",mxUtils.bind(this,function(Ya){aa.getModel().beginUpdate();try{for(var y=T.getSelectionState().cells,O=0;O<y.length;O++){for(var P=aa.getModel().getStyle(y[O]),X=0;X<da.length;X++)P=mxUtils.removeStylename(P,da[X]);var ba=aa.getModel().isVertex(y[O])?
+aa.defaultVertexStyle:aa.defaultEdgeStyle;null!=Na?(mxEvent.isShiftDown(Ya)||(P=""==Na.fill?mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,Na.fill||mxUtils.getValue(ba,mxConstants.STYLE_FILLCOLOR,null)),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,Na.gradient||mxUtils.getValue(ba,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ya)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ya)||!aa.getModel().isVertex(y[O])||(P=mxUtils.setStyle(P,
+mxConstants.STYLE_FONTCOLOR,Na.font||mxUtils.getValue(ba,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ya)||(P=""==Na.stroke?mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,Na.stroke||mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,null)))):(P=mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_FILLCOLOR,"#ffffff")),P=mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,
+"#000000")),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_GRADIENTCOLOR,null)),aa.getModel().isVertex(y[O])&&(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_FONTCOLOR,null))));aa.getModel().setStyle(y[O],P)}}finally{aa.getModel().endUpdate()}}));Ia.className="geStyleButton";Ia.style.width="36px";Ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ia.style.margin="0px 6px 6px 0px";if(null!=Na){var wa=
+"1"==urlParams.sketch?"2px solid":"1px solid";null!=Na.border&&(wa=Na.border);null!=Na.gradient?mxClient.IS_IE&&10>document.documentMode?Ia.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Na.fill+"', EndColorStr='"+Na.gradient+"', GradientType=0)":Ia.style.backgroundImage="linear-gradient("+Na.fill+" 0px,"+Na.gradient+" 100%)":Na.fill==mxConstants.NONE?Ia.style.background="url('"+Dialog.prototype.noColorImage+"')":Ia.style.backgroundColor=""==Na.fill?mxUtils.getValue(aa.defaultVertexStyle,
+mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Na.fill||mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ia.style.border=Na.stroke==mxConstants.NONE?wa+" transparent":""==Na.stroke?wa+" "+mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):wa+" "+(Na.stroke||mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?
+"#ffffff":Editor.darkColor));null!=Na.title&&Ia.setAttribute("title",Na.title)}else{wa=mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ab=mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ia.style.backgroundColor=wa;Ia.style.border="1px solid "+ab}Ia.style.borderRadius="0";U.appendChild(Ia)});U.innerText="";for(var Oa=0;Oa<ya.length;Oa++)0<Oa&&0==mxUtils.mod(Oa,4)&&mxUtils.br(U),La(ya[Oa])});null==this.format.currentScheme?ua(Editor.isDarkMode()?
+1:"1"==urlParams.sketch?5:0):ua(this.format.currentScheme);sa=10>=this.defaultColorSchemes.length?28:8;var oa=document.createElement("div");oa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+sa+"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(oa,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+sa+"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&&(q.appendChild(oa),q.appendChild(Aa));mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));F(oa);F(Aa);Ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(fa);return q};StyleFormatPanel.prototype.addEditOps=function(q){var F=this.editorUi.getSelectionState(),T=this.editorUi.editor.graph,aa=null;1==F.cells.length&&(aa=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(U){this.editorUi.actions.get("editStyle").funct()})),aa.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),aa.style.width="210px",aa.style.marginBottom="2px",q.appendChild(aa));T=1==F.cells.length?T.view.getState(F.cells[0]):null;null!=T&&null!=T.shape&&null!=T.shape.stencil?(F=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(U){this.editorUi.actions.get("editShape").funct()})),F.setAttribute("title",
@@ -3296,14 +3299,14 @@ T();return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowe
mxConstants.STYLE_FONTFAMILY,null);null!=T&&Graph.addFont(T,decodeURIComponent(F))}}return q};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 v=Graph.prototype.init;Graph.prototype.init=function(){function q(U){F=U}v.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(U){F=null});this.isMouseInsertPoint=function(){return null!=
F};var T=this.getInsertPoint;this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):T.apply(this,arguments)};var aa=this.layoutManager.getLayout;this.layoutManager.getLayout=function(U){var da=this.graph.getCellStyle(U);if(null!=da&&"rack"==da.childLayout){var fa=new mxStackLayout(this.graph,!1);fa.gridSize=null!=da.rackUnitSize?parseFloat(da.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;fa.marginLeft=da.marginLeft||0;fa.marginRight=da.marginRight||
-0;fa.marginTop=da.marginTop||0;fa.marginBottom=da.marginBottom||0;fa.allowGaps=da.allowGaps||0;fa.horizontal="1"==mxUtils.getValue(da,"horizontalRack","0");fa.resizeParent=!1;fa.fill=!0;return fa}return aa.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(y.apply(this,arguments))};var C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,
-F,T,aa,U,da,fa,na,sa,za,ua){C.apply(this,arguments);Graph.processFontAttributes(ua)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,T){function aa(){for(var ya=fa.getSelectionCells(),La=[],Oa=0;Oa<ya.length;Oa++)fa.isCellVisible(ya[Oa])&&La.push(ya[Oa]);fa.setSelectionCells(La)}function U(ya){fa.setHiddenTags(ya?[]:na.slice());
-aa();fa.refresh()}function da(ya,La){za.innerText="";if(0<ya.length){var Oa=document.createElement("table");Oa.setAttribute("cellpadding","2");Oa.style.boxSizing="border-box";Oa.style.tableLayout="fixed";Oa.style.width="100%";var Na=document.createElement("tbody");if(null!=ya&&0<ya.length)for(var Ia=0;Ia<ya.length;Ia++)(function(wa){var ab=0>mxUtils.indexOf(fa.hiddenTags,wa),Ya=document.createElement("tr"),x=document.createElement("td");x.style.align="center";x.style.width="16px";var O=document.createElement("img");
-O.setAttribute("src",ab?Editor.visibleImage:Editor.hiddenImage);O.setAttribute("title",mxResources.get(ab?"hideIt":"show",[wa]));mxUtils.setOpacity(O,ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";x.appendChild(O);mxEvent.addListener(O,"click",function(X){mxEvent.isShiftDown(X)?U(0<=mxUtils.indexOf(fa.hiddenTags,wa)):(fa.toggleHiddenTag(wa),aa(),fa.refresh());mxEvent.consume(X)});Ya.appendChild(x);x=document.createElement("td");
-x.style.overflow="hidden";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.verticalAlign="middle";x.style.cursor="pointer";x.setAttribute("title",wa);a=document.createElement("a");mxUtils.write(a,wa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ab?100:40);x.appendChild(a);mxEvent.addListener(x,"click",function(X){if(mxEvent.isShiftDown(X)){U(!0);var ba=fa.getCellsForTags([wa],null,null,!0);fa.isEnabled()?fa.setSelectionCells(ba):fa.highlightCells(ba)}else if(ab&&
-0<fa.hiddenTags.length)U(!0);else{ba=na.slice();var W=mxUtils.indexOf(ba,wa);ba.splice(W,1);fa.setHiddenTags(ba);aa();fa.refresh()}mxEvent.consume(X)});Ya.appendChild(x);if(fa.isEnabled()){x=document.createElement("td");x.style.verticalAlign="middle";x.style.textAlign="center";x.style.width="18px";if(null==La){x.style.align="center";x.style.width="16px";O=document.createElement("img");O.setAttribute("src",Editor.crossImage);O.setAttribute("title",mxResources.get("removeIt",[wa]));mxUtils.setOpacity(O,
-ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";mxEvent.addListener(O,"click",function(X){var ba=mxUtils.indexOf(na,wa);0<=ba&&na.splice(ba,1);fa.removeTagsForCells(fa.model.getDescendants(fa.model.getRoot()),[wa]);fa.refresh();mxEvent.consume(X)});x.appendChild(O)}else{var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px";P.defaultChecked=null!=La&&0<=mxUtils.indexOf(La,
-wa);P.checked=P.defaultChecked;P.style.background="transparent";P.setAttribute("title",mxResources.get(P.defaultChecked?"removeIt":"add",[wa]));mxEvent.addListener(P,"change",function(X){P.checked?fa.addTagsForCells(fa.getSelectionCells(),[wa]):fa.removeTagsForCells(fa.getSelectionCells(),[wa]);mxEvent.consume(X)});x.appendChild(P)}Ya.appendChild(x)}Na.appendChild(Ya)})(ya[Ia]);Oa.appendChild(Na);za.appendChild(Oa)}}var fa=this,na=fa.hiddenTags.slice(),sa=document.createElement("div");sa.style.userSelect=
+0;fa.marginTop=da.marginTop||0;fa.marginBottom=da.marginBottom||0;fa.allowGaps=da.allowGaps||0;fa.horizontal="1"==mxUtils.getValue(da,"horizontalRack","0");fa.resizeParent=!1;fa.fill=!0;return fa}return aa.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(x.apply(this,arguments))};var B=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,
+F,T,aa,U,da,fa,na,sa,za,ua){B.apply(this,arguments);Graph.processFontAttributes(ua)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,T){function aa(){for(var ya=fa.getSelectionCells(),La=[],Oa=0;Oa<ya.length;Oa++)fa.isCellVisible(ya[Oa])&&La.push(ya[Oa]);fa.setSelectionCells(La)}function U(ya){fa.setHiddenTags(ya?[]:na.slice());
+aa();fa.refresh()}function da(ya,La){za.innerText="";if(0<ya.length){var Oa=document.createElement("table");Oa.setAttribute("cellpadding","2");Oa.style.boxSizing="border-box";Oa.style.tableLayout="fixed";Oa.style.width="100%";var Na=document.createElement("tbody");if(null!=ya&&0<ya.length)for(var Ia=0;Ia<ya.length;Ia++)(function(wa){var ab=0>mxUtils.indexOf(fa.hiddenTags,wa),Ya=document.createElement("tr"),y=document.createElement("td");y.style.align="center";y.style.width="16px";var O=document.createElement("img");
+O.setAttribute("src",ab?Editor.visibleImage:Editor.hiddenImage);O.setAttribute("title",mxResources.get(ab?"hideIt":"show",[wa]));mxUtils.setOpacity(O,ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";y.appendChild(O);mxEvent.addListener(O,"click",function(X){mxEvent.isShiftDown(X)?U(0<=mxUtils.indexOf(fa.hiddenTags,wa)):(fa.toggleHiddenTag(wa),aa(),fa.refresh());mxEvent.consume(X)});Ya.appendChild(y);y=document.createElement("td");
+y.style.overflow="hidden";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.verticalAlign="middle";y.style.cursor="pointer";y.setAttribute("title",wa);a=document.createElement("a");mxUtils.write(a,wa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ab?100:40);y.appendChild(a);mxEvent.addListener(y,"click",function(X){if(mxEvent.isShiftDown(X)){U(!0);var ba=fa.getCellsForTags([wa],null,null,!0);fa.isEnabled()?fa.setSelectionCells(ba):fa.highlightCells(ba)}else if(ab&&
+0<fa.hiddenTags.length)U(!0);else{ba=na.slice();var W=mxUtils.indexOf(ba,wa);ba.splice(W,1);fa.setHiddenTags(ba);aa();fa.refresh()}mxEvent.consume(X)});Ya.appendChild(y);if(fa.isEnabled()){y=document.createElement("td");y.style.verticalAlign="middle";y.style.textAlign="center";y.style.width="18px";if(null==La){y.style.align="center";y.style.width="16px";O=document.createElement("img");O.setAttribute("src",Editor.crossImage);O.setAttribute("title",mxResources.get("removeIt",[wa]));mxUtils.setOpacity(O,
+ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";mxEvent.addListener(O,"click",function(X){var ba=mxUtils.indexOf(na,wa);0<=ba&&na.splice(ba,1);fa.removeTagsForCells(fa.model.getDescendants(fa.model.getRoot()),[wa]);fa.refresh();mxEvent.consume(X)});y.appendChild(O)}else{var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px";P.defaultChecked=null!=La&&0<=mxUtils.indexOf(La,
+wa);P.checked=P.defaultChecked;P.style.background="transparent";P.setAttribute("title",mxResources.get(P.defaultChecked?"removeIt":"add",[wa]));mxEvent.addListener(P,"change",function(X){P.checked?fa.addTagsForCells(fa.getSelectionCells(),[wa]):fa.removeTagsForCells(fa.getSelectionCells(),[wa]);mxEvent.consume(X)});y.appendChild(P)}Ya.appendChild(y)}Na.appendChild(Ya)})(ya[Ia]);Oa.appendChild(Na);za.appendChild(Oa)}}var fa=this,na=fa.hiddenTags.slice(),sa=document.createElement("div");sa.style.userSelect=
"none";sa.style.overflow="hidden";sa.style.padding="10px";sa.style.height="100%";var za=document.createElement("div");za.style.boxSizing="border-box";za.style.borderRadius="4px";za.style.userSelect="none";za.style.overflow="auto";za.style.position="absolute";za.style.left="10px";za.style.right="10px";za.style.top="10px";za.style.border=fa.isEnabled()?"1px solid #808080":"none";za.style.bottom=fa.isEnabled()?"48px":"10px";sa.appendChild(za);var ua=mxUtils.button(mxResources.get("reset"),function(ya){fa.setHiddenTags([]);
mxEvent.isShiftDown(ya)||(na=fa.hiddenTags.slice());aa();fa.refresh()});ua.setAttribute("title",mxResources.get("reset"));ua.className="geBtn";ua.style.margin="0 4px 0 0";var Ba=mxUtils.button(mxResources.get("add"),function(){null!=T&&T(na,function(ya){na=ya;oa()})});Ba.setAttribute("title",mxResources.get("add"));Ba.className="geBtn";Ba.style.margin="0";fa.addListener(mxEvent.ROOT,function(){na=fa.hiddenTags.slice()});var oa=mxUtils.bind(this,function(ya,La){if(q()){ya=fa.getAllTags();for(La=0;La<
ya.length;La++)0>mxUtils.indexOf(na,ya[La])&&na.push(ya[La]);na.sort();fa.isSelectionEmpty()?da(na):da(na,fa.getCommonTagsForCells(fa.getSelectionCells()))}});fa.selectionModel.addListener(mxEvent.CHANGE,oa);fa.model.addListener(mxEvent.CHANGE,oa);fa.addListener(mxEvent.REFRESH,oa);var Aa=document.createElement("div");Aa.style.boxSizing="border-box";Aa.style.whiteSpace="nowrap";Aa.style.position="absolute";Aa.style.overflow="hidden";Aa.style.bottom="0px";Aa.style.height="42px";Aa.style.right="10px";
@@ -3311,8 +3314,8 @@ Aa.style.left="10px";fa.isEnabled()&&(Aa.appendChild(ua),Aa.appendChild(Ba),sa.a
F);for(var aa=0;aa<T.length;aa++)T[aa].getAttribute("face")==q&&T[aa].getAttribute("data-font-src")!=F&&T[aa].setAttribute("data-font-src",F)}};var D=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return D.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));
if(null!=q)for(var F in q)this.globalVars[F]=q[F]}catch(T){null!=window.console&&console.log("Error in vars URL parameter: "+T)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var F=N.apply(this,arguments);null==F&&null!=this.globalVars&&(F=this.globalVars[q]);return F};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=
this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var G=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,F,T,aa,U,da,fa,na,sa,za,ua,Ba,oa,Aa){var ya=null,La=null,Oa=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ya=this.stylesheet,La=this.shapeForegroundColor,Oa=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 Na=G.apply(this,arguments),Ia=this.getCustomFonts();if(ua&&0<Ia.length){var wa=Na.ownerDocument,ab=null!=wa.createElementNS?wa.createElementNS(mxConstants.NS_SVG,"style"):wa.createElement("style");null!=wa.setAttributeNS?ab.setAttributeNS("type","text/css"):ab.setAttribute("type","text/css");for(var Ya="",x="",O=0;O<Ia.length;O++){var P=
-Ia[O].name,X=Ia[O].url;Graph.isCssFontUrl(X)?Ya+="@import url("+X+");\n":x+='@font-face {\nfont-family: "'+P+'";\nsrc: url("'+X+'");\n}\n'}ab.appendChild(wa.createTextNode(Ya+x));Na.getElementsByTagName("defs")[0].appendChild(ab)}this.mathEnabled&&(document.body.appendChild(Na),Editor.MathJaxRender(Na),Na.parentNode.removeChild(Na));null!=ya&&(this.shapeBackgroundColor=Oa,this.shapeForegroundColor=La,this.stylesheet=ya,this.refresh());return Na};var ia=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
+"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Na=G.apply(this,arguments),Ia=this.getCustomFonts();if(ua&&0<Ia.length){var wa=Na.ownerDocument,ab=null!=wa.createElementNS?wa.createElementNS(mxConstants.NS_SVG,"style"):wa.createElement("style");null!=wa.setAttributeNS?ab.setAttributeNS("type","text/css"):ab.setAttribute("type","text/css");for(var Ya="",y="",O=0;O<Ia.length;O++){var P=
+Ia[O].name,X=Ia[O].url;Graph.isCssFontUrl(X)?Ya+="@import url("+X+");\n":y+='@font-face {\nfont-family: "'+P+'";\nsrc: url("'+X+'");\n}\n'}ab.appendChild(wa.createTextNode(Ya+y));Na.getElementsByTagName("defs")[0].appendChild(ab)}this.mathEnabled&&(document.body.appendChild(Na),Editor.MathJaxRender(Na),Na.parentNode.removeChild(Na));null!=ya&&(this.shapeBackgroundColor=Oa,this.shapeForegroundColor=La,this.stylesheet=ya,this.refresh());return Na};var ia=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
function(q){ia.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var ka=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ka.apply(this,arguments);this.enumerationState=0};var ja=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ja.apply(this,
arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var F="1"==mxUtils.getValue(q.style,"enumerate",0);F&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):F||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);F=q.secondLabel;if(null!=F){var T=q.view.scale,aa=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*T,q.y+4*T,0,0):mxRectangle.fromPoint(q.view.getPoint(q));F.bounds.equals(q)&&F.value==aa&&F.scale==T||(F.bounds=q,F.value=aa,F.scale=
@@ -3372,590 +3375,594 @@ fa.appendChild(F);var oa=Ba.cloneNode(!0);fa.appendChild(oa);mxEvent.addListener
!0):ua.checked=!0;mxUtils.br(fa);var Aa=document.createElement("input");Aa.setAttribute("value","all");Aa.setAttribute("type","radio");Aa.style.marginRight="8px";U.isSelectionEmpty()&&Aa.setAttribute("disabled","disabled");var ya=document.createElement("div");ya.style.marginBottom="10px";1==na?(Aa.setAttribute("type","checkbox"),Aa.style.marginBottom="12px",ya.appendChild(Aa)):(Aa.setAttribute("name","pages-printdialog"),Aa.style.marginBottom="8px",fa.appendChild(Aa));F=document.createElement("span");
mxUtils.write(F,mxResources.get("selectionOnly"));Aa.parentNode.appendChild(F);1==na&&mxUtils.br(Aa.parentNode);var La=document.createElement("input");La.style.marginRight="8px";La.setAttribute("value","adjust");La.setAttribute("type","radio");La.setAttribute("name","printZoom");ya.appendChild(La);F=document.createElement("span");mxUtils.write(F,mxResources.get("adjustTo"));ya.appendChild(F);var Oa=document.createElement("input");Oa.style.cssText="margin:0 8px 0 8px;";Oa.setAttribute("value","100 %");
Oa.style.width="50px";ya.appendChild(Oa);mxEvent.addListener(Oa,"focus",function(){La.checked=!0});da.appendChild(ya);fa=fa.cloneNode(!1);var Na=La.cloneNode(!0);Na.setAttribute("value","fit");La.setAttribute("checked","checked");F=document.createElement("div");F.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";F.appendChild(Na);fa.appendChild(F);ya=document.createElement("table");ya.style.display="inline-block";var Ia=document.createElement("tbody"),wa=document.createElement("tr"),
-ab=wa.cloneNode(!0),Ya=document.createElement("td"),x=Ya.cloneNode(!0),O=Ya.cloneNode(!0),P=Ya.cloneNode(!0),X=Ya.cloneNode(!0),ba=Ya.cloneNode(!0);Ya.style.textAlign="right";P.style.textAlign="right";mxUtils.write(Ya,mxResources.get("fitTo"));var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","1");W.setAttribute("min","1");W.setAttribute("type","number");W.style.width="40px";x.appendChild(W);F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsAcross"));
-O.appendChild(F);mxUtils.write(P,mxResources.get("fitToBy"));var ea=W.cloneNode(!0);X.appendChild(ea);mxEvent.addListener(W,"focus",function(){Na.checked=!0});mxEvent.addListener(ea,"focus",function(){Na.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));ba.appendChild(F);wa.appendChild(Ya);wa.appendChild(x);wa.appendChild(O);ab.appendChild(P);ab.appendChild(X);ab.appendChild(ba);Ia.appendChild(wa);Ia.appendChild(ab);ya.appendChild(Ia);fa.appendChild(ya);
+ab=wa.cloneNode(!0),Ya=document.createElement("td"),y=Ya.cloneNode(!0),O=Ya.cloneNode(!0),P=Ya.cloneNode(!0),X=Ya.cloneNode(!0),ba=Ya.cloneNode(!0);Ya.style.textAlign="right";P.style.textAlign="right";mxUtils.write(Ya,mxResources.get("fitTo"));var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","1");W.setAttribute("min","1");W.setAttribute("type","number");W.style.width="40px";y.appendChild(W);F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsAcross"));
+O.appendChild(F);mxUtils.write(P,mxResources.get("fitToBy"));var ea=W.cloneNode(!0);X.appendChild(ea);mxEvent.addListener(W,"focus",function(){Na.checked=!0});mxEvent.addListener(ea,"focus",function(){Na.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));ba.appendChild(F);wa.appendChild(Ya);wa.appendChild(y);wa.appendChild(O);ab.appendChild(P);ab.appendChild(X);ab.appendChild(ba);Ia.appendChild(wa);Ia.appendChild(ab);ya.appendChild(Ia);fa.appendChild(ya);
da.appendChild(fa);fa=document.createElement("div");F=document.createElement("div");F.style.fontWeight="bold";F.style.marginBottom="12px";mxUtils.write(F,mxResources.get("paperSize"));fa.appendChild(F);F=document.createElement("div");F.style.marginBottom="12px";var ta=PageSetupDialog.addPageFormatPanel(F,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);fa.appendChild(F);F=document.createElement("span");mxUtils.write(F,mxResources.get("pageScale"));fa.appendChild(F);var qa=
document.createElement("input");qa.style.cssText="margin:0 8px 0 8px;";qa.setAttribute("value","100 %");qa.style.width="60px";fa.appendChild(qa);da.appendChild(fa);F=document.createElement("div");F.style.cssText="text-align:right;margin:48px 0 0 0;";fa=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});fa.className="geBtn";q.editor.cancelFirst&&F.appendChild(fa);q.isOffline()||(ya=mxUtils.button(mxResources.get("help"),function(){U.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
ya.className="geBtn",F.appendChild(ya));PrintDialog.previewEnabled&&(ya=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();aa(!1)}),ya.className="geBtn",F.appendChild(ya));ya=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();aa(!0)});ya.className="geBtn gePrimaryBtn";F.appendChild(ya);q.editor.cancelFirst||F.appendChild(fa);da.appendChild(F);this.container=da};var Y=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 q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}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 Y.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 Z=document.createElement("canvas"),la=new Image;la.onload=function(){try{Z.getContext("2d").drawImage(la,
0,0);var q=Z.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};la.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
-(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(d,k,l){l.ui=d.ui;return k};b.afterDecode=function(d,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);null!=l.mathEnabled&&(l.mathEnabled=!l.mathEnabled);null!=l.shadowVisible&&(l.shadowVisible=!l.shadowVisible);return l};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,k,l){l.ui=d.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.4.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};b.afterDecode=function(e,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);null!=l.mathEnabled&&(l.mathEnabled=!l.mathEnabled);null!=l.shadowVisible&&(l.shadowVisible=!l.shadowVisible);return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.4.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=
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(e,f,g,v,y,C,I){C=null!=C?C:0<=e.indexOf("NetworkError")||0<=e.indexOf("SecurityError")||0<=e.indexOf("NS_ERROR_FAILURE")||0<=e.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(e!=EditorUi.lastErrorMessage&&(null==e||null==f||-1==e.indexOf("Script error")&&-1==e.indexOf("extension"))&&null!=e&&0>e.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=e;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(e);(new Image).src=D+"/log?severity="+C+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(e)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=v?":colno:"+
-encodeURIComponent(v):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(N){}try{I||null==window.console||console.error(C,e,f,g,v,y)}catch(N){}};EditorUi.logEvent=function(e){if("1"==urlParams.dev)EditorUi.debug("logEvent",e);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=e?"&data="+encodeURIComponent(JSON.stringify(e)):"")}catch(g){}};EditorUi.sendReport=
-function(e,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",e);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,e.length>f&&(e=e.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(e))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var e=[(new Date).toISOString()],f=0;f<arguments.length;f++)e.push(arguments[f]);console.log.apply(console,
-e)}}catch(g){}};EditorUi.removeChildNodes=function(e){for(;null!=e.firstChild;)e.removeChild(e.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,v,x,B,I){B=null!=B?B: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&&
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";x=null!=x?x:Error(d);(new Image).src=D+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=v?":colno:"+
+encodeURIComponent(v):"")+(null!=x&&null!=x.stack?"&stack="+encodeURIComponent(x.stack):"")}}catch(N){}try{I||null==window.console||console.error(B,d,f,g,v,x)}catch(N){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
+function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
+d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var e=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!e.getContext||!e.getContext("2d"))}catch(y){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var y=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(C){}};g.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(y){}try{f=document.createElement("canvas");f.width=f.height=1;var v=f.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==v.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(e,f,g){return this.editor.graph.openLink(e,f,g)};EditorUi.prototype.showSplash=function(e){};EditorUi.prototype.getLocalData=function(e,f){f(localStorage.getItem(e))};EditorUi.prototype.setLocalData=function(e,f,g){localStorage.setItem(e,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(e,f){localStorage.removeItem(e);f()};EditorUi.prototype.setShareCursorPosition=function(e){this.shareCursorPosition=
-e;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(e){this.showRemoteCursors=e;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(e){this.editor.graph.mathEnabled=e;this.editor.updateGraphComponents();this.editor.graph.refresh();
-this.editor.graph.defaultMathEnabled=e;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(e){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(e){return this.isOfflineApp()||!navigator.onLine||!e&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(e,f,g){var v=null==e||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=y.spin;y.spin=function(D,N){var G=!1;this.active||(C.call(this,D),this.active=!0,null!=N&&(v&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,e=document.body.clientWidth/2-2),G=document.createElement("div"),
-G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,e)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=N.substring(N.length-3,N.length)&&"!"!=N.charAt(N.length-1)&&(N+="..."),G.innerHTML=N,D.appendChild(G),y.status=G),this.pause=mxUtils.bind(this,function(){var ia=function(){};this.active&&(ia=mxUtils.bind(this,function(){this.spin(D,N)}));this.stop();return ia}),G=!0);return G};var I=y.stop;y.stop=function(){I.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
-return y};EditorUi.prototype.isCompatibleString=function(e){try{var f=mxUtils.parseXml(e),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(v){}return!1};EditorUi.prototype.isVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&
-3==e.charCodeAt(2)&&4==e.charCodeAt(3)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&3==e.charCodeAt(2)&&6==e.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||60==e.charCodeAt(0)&&63==e.charCodeAt(1)&&120==e.charCodeAt(2)&&109==e.charCodeAt(3)&&108==e.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(e){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,v=this.editor.graph,y=this;f.getFunction=function(C){if(v.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var I=y.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<I&&y.movePage(I,I-1)};if(38==C.keyCode)return function(){0<I&&y.movePage(I,0)};if(39==C.keyCode)return function(){I<y.pages.length-1&&y.movePage(I,
-I+1)};if(40==C.keyCode)return function(){I<y.pages.length-1&&y.movePage(I,y.pages.length-1)}}else if(mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)){if(37==C.keyCode)return function(){0<I&&y.selectNextPage(!1)};if(38==C.keyCode)return function(){0<I&&y.selectPage(y.pages[0])};if(39==C.keyCode)return function(){I<y.pages.length-1&&y.selectNextPage(!0)};if(40==C.keyCode)return function(){I<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=C.keyCode&&90>=C.keyCode)||
-v.isSelectionEmpty()||mxEvent.isAltDown(C)||mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)?g.apply(this,arguments):null}}return f};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(e){var f=d.apply(this,arguments);if(null==f)try{var g=e.indexOf("&lt;mxfile ");if(0<=g){var v=e.lastIndexOf("&lt;/mxfile&gt;");v>g&&(f=e.substring(g,v+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var y=mxUtils.parseXml(e),C=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(I){}return f};EditorUi.prototype.validateFileData=function(e){if(null!=e&&0<e.length){var f=e.indexOf('<meta charset="utf-8">');0<=f&&(e=e.slice(0,f)+'<meta charset="utf-8"/>'+e.slice(f+23-1,e.length));e=Graph.zapGremlins(e)}return e};EditorUi.prototype.replaceFileData=function(e){e=this.validateFileData(e);
-e=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null;var f=null!=e?this.editor.extractGraphModel(e,!0):null;null!=f&&(e=f);if(null!=e){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,v=e.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<v.length||1==v.length&&v[0].hasAttribute("name")){this.fileNode=e;this.pages=null!=this.pages?this.pages:[];for(var y=v.length-1;0<=y;y--){var C=this.updatePageRoot(new DiagramPage(v[y]));null==C.getName()&&
-C.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,C,0==y?C:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(e),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(e,f,g,v,y,C,I,D,N,G,ia){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;N=null!=N?N:!0;var ka=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ja="_blank";else ka=ja=v;if(null==e)return"";var ca=e;if("mxfile"!=ca.nodeName.toLowerCase()){if(ia){var pa=e.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());
-pa.appendChild(e)}else{pa=Graph.zapGremlins(mxUtils.getXml(e));ca=Graph.compress(pa);if(Graph.decompress(ca)!=pa)return pa;pa=e.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());mxUtils.setTextContent(pa,ca)}ca=e.ownerDocument.createElement("mxfile");ca.appendChild(pa)}G?(ca=ca.cloneNode(!0),ca.removeAttribute("modified"),ca.removeAttribute("host"),ca.removeAttribute("agent"),ca.removeAttribute("etag"),ca.removeAttribute("userAgent"),ca.removeAttribute("version"),ca.removeAttribute("editor"),
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(x){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var x=
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=x&&6<x.length}catch(B){}};g.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(x){}try{f=document.createElement("canvas");f.width=f.height=1;var v=f.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==v.match("image/jpeg")}catch(x){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
+d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
+EditorUi.prototype.createSpinner=function(d,f,g){var v=null==d||null==f;g=null!=g?g:24;var x=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),B=x.spin;x.spin=function(D,N){var G=!1;this.active||(B.call(this,D),this.active=!0,null!=N&&(v&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
+G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=N.substring(N.length-3,N.length)&&"!"!=N.charAt(N.length-1)&&(N+="..."),G.innerHTML=N,D.appendChild(G),x.status=G),this.pause=mxUtils.bind(this,function(){var ia=function(){};this.active&&(ia=mxUtils.bind(this,function(){this.spin(D,N)}));this.stop();return ia}),G=!0);return G};var I=x.stop;x.stop=function(){I.call(this);this.active=!1;null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status);x.status=null};x.pause=function(){return function(){}};
+return x};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(v){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
+3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
+EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,v=this.editor.graph,x=this;f.getFunction=function(B){if(v.isSelectionEmpty()&&null!=x.pages&&0<x.pages.length){var I=x.getSelectedPageIndex();if(mxEvent.isShiftDown(B)){if(37==B.keyCode)return function(){0<I&&x.movePage(I,I-1)};if(38==B.keyCode)return function(){0<I&&x.movePage(I,0)};if(39==B.keyCode)return function(){I<x.pages.length-1&&x.movePage(I,
+I+1)};if(40==B.keyCode)return function(){I<x.pages.length-1&&x.movePage(I,x.pages.length-1)}}else if(mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)){if(37==B.keyCode)return function(){0<I&&x.selectNextPage(!1)};if(38==B.keyCode)return function(){0<I&&x.selectPage(x.pages[0])};if(39==B.keyCode)return function(){I<x.pages.length-1&&x.selectNextPage(!0)};if(40==B.keyCode)return function(){I<x.pages.length-1&&x.selectPage(x.pages[x.pages.length-1])}}}return!(65<=B.keyCode&&90>=B.keyCode)||
+v.isSelectionEmpty()||mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)||mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var v=d.lastIndexOf("&lt;/mxfile&gt;");v>g&&(f=d.substring(g,v+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var x=mxUtils.parseXml(d),B=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=B?mxUtils.getXml(B):""}}catch(I){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
+d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,v=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<v.length||1==v.length&&v[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var x=v.length-1;0<=x;x--){var B=this.updatePageRoot(new DiagramPage(v[x]));null==B.getName()&&
+B.setName(mxResources.get("pageWithNumber",[x+1]));f.model.execute(new ChangePage(this,B,0==x?B:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=g)for(x=0;x<g.length;x++)f.model.execute(new ChangePage(this,g[x],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,v,x,B,I,D,N,G,ia){f=null!=f?f:this.editor.graph;x=null!=x?x:!1;N=null!=N?N:!0;var ka=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ja="_blank";else ka=ja=v;if(null==d)return"";var ca=d;if("mxfile"!=ca.nodeName.toLowerCase()){if(ia){var pa=d.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());
+pa.appendChild(d)}else{pa=Graph.zapGremlins(mxUtils.getXml(d));ca=Graph.compress(pa);if(Graph.decompress(ca)!=pa)return pa;pa=d.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());mxUtils.setTextContent(pa,ca)}ca=d.ownerDocument.createElement("mxfile");ca.appendChild(pa)}G?(ca=ca.cloneNode(!0),ca.removeAttribute("modified"),ca.removeAttribute("host"),ca.removeAttribute("agent"),ca.removeAttribute("etag"),ca.removeAttribute("userAgent"),ca.removeAttribute("version"),ca.removeAttribute("editor"),
ca.removeAttribute("type")):(ca.removeAttribute("userAgent"),ca.removeAttribute("version"),ca.removeAttribute("editor"),ca.removeAttribute("pages"),ca.removeAttribute("type"),mxClient.IS_CHROMEAPP?ca.setAttribute("host","Chrome"):EditorUi.isElectronApp?ca.setAttribute("host","Electron"):ca.setAttribute("host",window.location.hostname),ca.setAttribute("modified",(new Date).toISOString()),ca.setAttribute("agent",navigator.appVersion),ca.setAttribute("version",EditorUi.VERSION),ca.setAttribute("etag",
-Editor.guid()),e=null!=g?g.getMode():this.mode,null!=e&&ca.setAttribute("type",e),1<ca.getElementsByTagName("diagram").length&&null!=this.pages&&ca.setAttribute("pages",this.pages.length));ia=ia?mxUtils.getPrettyXml(ca):mxUtils.getXml(ca);if(!C&&!y&&(I||null!=g&&/(\.html)$/i.test(g.getTitle())))ia=this.getHtml2(mxUtils.getXml(ca),f,null!=g?g.getTitle():null,ja,ka);else if(C||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(v=null),
-ia=this.getEmbeddedSvg(ia,f,v,null,D,N,ka);return ia};EditorUi.prototype.getXmlFileData=function(e,f,g,v){e=null!=e?e:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(e,v);if(e&&null!=this.fileNode&&null!=this.currentPage)if(e=function(N){var G=N.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(N)),N=N.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&N.appendChild(mxUtils.parseXml(G).documentElement))):
-null==G||g?N=N.cloneNode(!0):(N=N.cloneNode(!1),mxUtils.setTextContent(N,Graph.compressNode(G)));y.appendChild(N)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)e(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],I=C.node;if(C!=this.currentPage)if(C.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,
-D,null,v);EditorUi.removeChildNodes(I);mxUtils.setTextContent(I,Graph.compressNode(D));delete C.needsUpdate}else v&&(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&
-null!=C.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(C.root)),this.editor.graph.saveViewState(C.viewState,D,null,v),I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(D))));e(I)}return y};EditorUi.prototype.anonymizeString=function(e,f){for(var g=[],v=0;v<e.length;v++){var y=e.charAt(v);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
-Math.random()))):y.toUpperCase()!=y?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(y)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(e){if(null!=e[EditorUi.DIFF_INSERT])for(var f=0;f<e[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(e[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
-e[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(C){e[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=e[EditorUi.DIFF_UPDATE]){for(var v in e[EditorUi.DIFF_UPDATE]){var y=e[EditorUi.DIFF_UPDATE][v];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(C){var I=y.cells[C];if(null!=I){for(var D in I)null!=I[D].value&&(I[D].value="["+I[D].value.length+"]"),null!=I[D].xmlValue&&(I[D].xmlValue="["+I[D].xmlValue.length+"]"),null!=I[D].style&&(I[D].style=
-"["+I[D].style.length+"]"),mxUtils.isEmptyObject(I[D])&&delete I[D];mxUtils.isEmptyObject(I)&&delete y.cells[C]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete e[EditorUi.DIFF_UPDATE][v]}mxUtils.isEmptyObject(e[EditorUi.DIFF_UPDATE])&&delete e[EditorUi.DIFF_UPDATE]}return e};EditorUi.prototype.anonymizeAttributes=function(e,f){if(null!=e.attributes)for(var g=0;g<e.attributes.length;g++)"as"!=e.attributes[g].name&&
-e.setAttribute(e.attributes[g].name,this.anonymizeString(e.attributes[g].value,f));if(null!=e.childNodes)for(g=0;g<e.childNodes.length;g++)this.anonymizeAttributes(e.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(e,f){f=e.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
-"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return e};EditorUi.prototype.synchronizeCurrentFile=function(e){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!e&&f.invalidChecksum?
-f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),e?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(e,f,g,v,y,C,I,
-D,N,G,ia){y=null!=y?y:!0;C=null!=C?C:!1;var ka=this.editor.graph;if(f||!e&&null!=N&&/(\.svg)$/i.test(N.getTitle())){var ja=null!=ka.themes&&"darkTheme"==ka.defaultThemeName;G=!1;if(ja||null!=this.pages&&this.currentPage!=this.pages[0]){var ca=ka.getGlobalVariable;ka=this.createTemporaryGraph(ja?ka.getDefaultStylesheet():ka.getStylesheet());ka.setBackgroundImage=this.editor.graph.setBackgroundImage;ka.background=this.editor.graph.background;var pa=this.pages[0];this.currentPage==pa?ka.setBackgroundImage(this.editor.graph.backgroundImage):
-null!=pa.viewState&&null!=pa.viewState&&ka.setBackgroundImage(pa.viewState.backgroundImage);ka.getGlobalVariable=function(ra){return"page"==ra?pa.getName():"pagenumber"==ra?1:ca.apply(this,arguments)};document.body.appendChild(ka.container);ka.model.setRoot(pa.root)}}I=null!=I?I:this.getXmlFileData(y,C,G,ia);N=null!=N?N:this.getCurrentFile();e=this.createFileData(I,ka,N,window.location.href,e,f,g,v,y,D,G);ka!=this.editor.graph&&ka.container.parentNode.removeChild(ka.container);return e};EditorUi.prototype.getHtml=
-function(e,f,g,v,y,C){C=null!=C?C:!0;var I=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var N=f.view.scale;C=Math.floor(I.x/N-f.view.translate.x);N=Math.floor(I.y/N-f.view.translate.y);I=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));e.setAttribute("x0",C);e.setAttribute("y0",N)}null!=e&&(e.setAttribute("pan","1"),e.setAttribute("zoom","1"),e.setAttribute("resize",
-"0"),e.setAttribute("fit","0"),e.setAttribute("border","20"),e.setAttribute("links","1"),null!=v&&e.setAttribute("edit",v));null!=y&&(y=y.replace(/&/g,"&amp;"));e=null!=e?Graph.zapGremlins(mxUtils.getXml(e)):"";v=Graph.compress(e);Graph.decompress(v)!=e&&(v=encodeURIComponent(e));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?
-"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+v+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(e,f,g,v,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.replace(/&/g,"&amp;"));e={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(e),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage));
-return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(e))+'"></div>\n'+(null==y?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(e){e=this.validateFileData(e);this.pages=this.fileNode=this.currentPage=null;var f=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:
-null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[e],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");e=null!=f?this.editor.extractGraphModel(f,!0):null;null!=e&&(f=e);if(null!=f&&"mxfile"==f.nodeName&&(e=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var v=0;v<e.length;v++)null==
-e[v].getAttribute("id")&&e[v].setAttribute("id",v),f=new DiagramPage(e[v]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[v+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(v=0;v<y.length;v++)f[y[v]]=!0;var C=this.editor.graph.getModel(),I=C.getChildren(C.root);for(v=0;v<I.length;v++){var D=I[v];C.setVisible(D,f[D.id]||!1)}}catch(N){}};EditorUi.prototype.getBaseFilename=function(e){var f=
-this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!e&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(e,f,g,v,y,C,I,D,N,G,ia,ka){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var ja=this.getBaseFilename("remoteSvg"==e?!1:!y),ca=ja+("xml"==e||"pdf"==e&&ia?".drawio":"")+"."+e;if("xml"==e){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,v,y,null,null,null,f);this.saveData(ca,e,pa,"text/xml")}else if("html"==e)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,ja),this.saveData(ca,e,pa,"text/html");else if("svg"!=e&&"xmlsvg"!=e||!this.spinner.spin(document.body,
-mxResources.get("export"))){if("xmlpng"==e)ca=ja+".png";else if("jpeg"==e)ca=ja+".jpg";else if("remoteSvg"==e){ca=ja+".svg";e="svg";var ra=parseInt(N);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<ra){var L=this.editor.graph,V=L.getGraphBounds();var R=Math.ceil(V.width*D/L.view.scale+2*ra);var Y=Math.ceil(V.height*D/L.view.scale+2*ra)}}this.saveRequest(ca,e,mxUtils.bind(this,function(T,aa){try{var U=this.editor.graph.pageVisible;0==C&&(this.editor.graph.pageVisible=C);var da=this.createDownloadRequest(T,
-e,v,aa,I,y,D,N,G,ia,ka,R,Y);this.editor.graph.pageVisible=U;return da}catch(fa){this.handleError(fa)}}))}else{var Z=null,la=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(ca,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==e){var q=this.editor.graph.background;if(I||q==mxConstants.NONE)q=null;var F=this.editor.graph.getSvg(q,null,null,null,null,v);g&&
-this.editor.graph.addSvgShadow(F);this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();la(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else ca=ja+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();la(T)}),v)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){var ca=this.editor.graph,pa=ca.getGraphBounds();g=this.getFileData(!0,null,null,
-null,g,0==C?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var ra="",L="";if(pa.width*pa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=ia?L="&from="+ia.from+"&to="+ia.to:0==C&&(L="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){ra="&from="+C;break}C=ca.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?
-y||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;y={globalVars:ca.getExportVariables()};N&&(y.grid={size:ca.gridSize,steps:ca.view.gridSteps,color:ca.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+L+"&bg="+(null!=C?C:mxConstants.NONE)+"&base64="+v+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=e?"&filename="+encodeURIComponent(e):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=I?
-"&scale="+I:"")+(null!=D?"&border="+D:"")+(ka&&isFinite(ka)?"&w="+ka:"")+(ja&&isFinite(ja)?"&h="+ja:""))};EditorUi.prototype.setMode=function(e,f){this.mode=e};EditorUi.prototype.loadDescriptor=function(e,f,g){var v=window.location.hash,y=mxUtils.bind(this,function(I){var D=null!=e.data?e.data:"";null!=I&&0<I.length&&(0<D.length&&(D+="\n"),D+=I);I=new LocalFile(this,"csv"!=e.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);
-I.getHash=function(){return v};this.fileLoaded(I);"csv"==e.format&&this.importCsv(D,mxUtils.bind(this,function(ja){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=e.update){var N=null!=e.interval?parseInt(e.interval):6E4,G=null,ia=mxUtils.bind(this,function(){var ja=this.currentPage;mxUtils.post(e.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ca){ja===this.currentPage&&(200<=ca.getStatus()&&
-300>=ca.getStatus()?(this.updateDiagram(ca.getText()),ka()):this.handleError({message:mxResources.get("error")+" "+ca.getStatus()}))}),mxUtils.bind(this,function(ca){this.handleError(ca)}))}),ka=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(ia,N)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ka();ia()}));ka();ia()}null!=f&&f()});if(null!=e.url&&0<e.url.length){var C=this.editor.getProxiedUrl(e.url);this.editor.loadUrl(C,mxUtils.bind(this,function(I){y(I)}),
-mxUtils.bind(this,function(I){null!=g&&g(I)}))}else y("")};EditorUi.prototype.updateDiagram=function(e){function f(Y){var Z=new mxCellOverlay(Y.image||y.warningImage,Y.tooltip,Y.align,Y.valign,Y.offset);Z.addListener(mxEvent.CLICK,function(la,q){v.alert(Y.tooltip)});return Z}var g=null,v=this;if(null!=e&&0<e.length&&(g=mxUtils.parseXml(e),e=null!=g?g.documentElement:null,null!=e&&"updates"==e.nodeName)){var y=this.editor.graph,C=y.getModel();C.beginUpdate();var I=null;try{for(e=e.firstChild;null!=
-e;){if("update"==e.nodeName){var D=C.getCell(e.getAttribute("id"));if(null!=D){try{var N=e.getAttribute("value");if(null!=N){var G=mxUtils.parseXml(N).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))C.setValue(D,G);else for(var ia=G.attributes,ka=0;ka<ia.length;ka++)y.setAttributeForCell(D,ia[ka].nodeName,0<ia[ka].nodeValue.length?ia[ka].nodeValue:null)}}catch(Y){null!=window.console&&console.log("Error in value for "+D.id+": "+Y)}try{var ja=e.getAttribute("style");null!=ja&&y.model.setStyle(D,
-ja)}catch(Y){null!=window.console&&console.log("Error in style for "+D.id+": "+Y)}try{var ca=e.getAttribute("icon");if(null!=ca){var pa=0<ca.length?JSON.parse(ca):null;null!=pa&&pa.append||y.removeCellOverlays(D);null!=pa&&y.addCellOverlay(D,f(pa))}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}try{var ra=e.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var L=y.getCellGeometry(D);if(null!=L){L=L.clone();for(key in ra){var V=parseFloat(ra[key]);"dx"==key?L.x+=
-V:"dy"==key?L.y+=V:"dw"==key?L.width+=V:"dh"==key?L.height+=V:L[key]=parseFloat(ra[key])}y.model.setGeometry(D,L)}}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}}}else if("model"==e.nodeName){for(var R=e.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(new mxCodec(e.firstChild)).decode(R,C)}else if("view"==e.nodeName){if(e.hasAttribute("scale")&&(y.view.scale=parseFloat(e.getAttribute("scale"))),e.hasAttribute("dx")||e.hasAttribute("dy"))y.view.translate=
-new mxPoint(parseFloat(e.getAttribute("dx")||0),parseFloat(e.getAttribute("dy")||0))}else"fit"==e.nodeName&&(I=e.hasAttribute("max-scale")?parseFloat(e.getAttribute("max-scale")):1);e=e.nextSibling}}finally{C.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return g};EditorUi.prototype.getCopyFilename=function(e,f){var g=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;e="";var v=g.lastIndexOf(".");0<=v&&(e=g.substring(v),g=g.substring(0,v));if(f){f=g;var y=new Date;
-g=y.getFullYear();v=y.getMonth()+1;var C=y.getDate(),I=y.getHours(),D=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+v+"-"+C+"-"+I+"-"+D+"-"+y))}return g=mxResources.get("copyOf",[g])+e};EditorUi.prototype.fileLoaded=function(e,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var v=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
-var y=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});
-if(null!=e)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(e);e.addListener("descriptorChanged",this.descriptorChangedListener);e.addListener("contentChanged",this.descriptorChangedListener);e.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(e.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();e.isEditable()?e.isModified()?(e.addUnsavedStatus(),
-null!=e.backupPatch&&e.patch([e.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
-v=!0;if(!this.isOffline()&&null!=e.getMode()){var C="1"==urlParams.sketch?"sketch":uiTheme;if(null==C)C="default";else if("sketch"==C||"min"==C)C+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:e.getMode().toUpperCase()+"-OPEN-FILE-"+e.getHash(),action:"size_"+e.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+C})}EditorUi.debug("File.opened",[e]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
-e.getMode()&&e.getMode()!=App.MODE_DEVICE&&null!=e.getMode())try{this.addRecent({id:e.getHash(),title:e.getTitle(),mode:e.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=e)try{e.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=e?e.getHash():"none"),action:"message_"+I.message,label:"stack_"+I.stack})}catch(D){}e=mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?e():this.handleError(I,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else y();return v};EditorUi.prototype.getHashValueForPages=function(e,f){var g=0,v=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<e.length;C++){this.updatePageRoot(e[C]);var I=
-e[C].node.cloneNode(!1);I.removeAttribute("name");v.root=e[C].root;var D=y.encode(v);this.editor.graph.saveViewState(e[C].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");I.appendChild(D);null!=f&&(f.eltCount+=I.getElementsByTagName("*").length,f.nodeCount+=I.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(I,function(N,G,ia,ka){return!ka||"mxGeometry"!=N.nodeName&&"mxPoint"!=N.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ka&&"mxCell"==N.nodeName&&
-"previous"==G?null:ia:Math.round(ia)},f)<<0}return g};EditorUi.prototype.hashValue=function(e,f,g){var v=0;if(null!=e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName&&"function"===typeof e.getAttribute){null!=e.nodeName&&(v^=this.hashValue(e.nodeName,f,g));if(null!=e.attributes){null!=g&&(g.attrCount+=e.attributes.length);for(var y=0;y<e.attributes.length;y++){var C=e.attributes[y].name,I=null!=f?f(e,C,e.attributes[y].value,!0):e.attributes[y].value;null!=I&&(v^=this.hashValue(C,
-f,g)+this.hashValue(I,f,g))}}if(null!=e.childNodes)for(y=0;y<e.childNodes.length;y++)v=(v<<5)-v+this.hashValue(e.childNodes[y],f,g)<<0}else if(null!=e&&"function"!==typeof e){e=String(e);f=0;null!=g&&(g.byteCount+=e.length);for(y=0;y<e.length;y++)f=(f<<5)-f+e.charCodeAt(y)<<0;v^=f}return v};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(e,f,g,v,y,C,I){};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(e){null==e&&(e=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,e,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(e){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(e));f.appendChild(g);
-return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(e){null!=e&&(this.removeLibrarySidebar(e.getHash()),e.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(e.getHash()),".scratchpad"==e.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(e){var f=this.sidebar.palettes[e];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[e]}};EditorUi.prototype.repositionLibrary=function(e){var f=this.sidebar.container;
-if(null==e){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(e=g[g.length-1].nextSibling)}e=null!=e?e:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var v=g.previousSibling;f.insertBefore(g,e);f.insertBefore(v,g)};EditorUi.prototype.loadLibrary=function(e,f){var g=mxUtils.parseXml(e.getData());if("mxlibrary"==g.documentElement.nodeName){var v=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(e,v,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(e){return""};EditorUi.prototype.libraryLoaded=function(e,f,g,v){if(null!=this.sidebar){e.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(e.getHash());".scratchpad"==e.title&&(this.scratchpad=e);var y=this.sidebar.palettes[e.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(e.getHash());var C=null,I=mxUtils.bind(this,function(R,Y){0==R.length&&e.isEditable()?
-(null==C&&(C=document.createElement("div"),C.className="geDropTarget",mxUtils.write(C,mxResources.get("dragElementsHere"))),Y.appendChild(C)):this.addLibraryEntries(R,Y)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=e.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(e.getHash(),g,null!=v?v:!0,mxUtils.bind(this,function(R){I(f,R)}));this.repositionLibrary(y);var N=D.parentNode.previousSibling;v=N.getAttribute("title");
-null!=v&&0<v.length&&".scratchpad"!=e.title&&N.setAttribute("title",this.getLibraryStorageHint(e)+"\n"+v);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";N.style.position="relative";var ia=document.createElement("img");ia.className="geAdaptiveAsset";ia.setAttribute("src",Editor.crossImage);ia.setAttribute("title",mxResources.get("close"));ia.setAttribute("valign","absmiddle");ia.setAttribute("border",
-"0");ia.style.position="relative";ia.style.top="2px";ia.style.width="14px";ia.style.cursor="pointer";ia.style.margin="0 3px";var ka=null;if(".scratchpad"!=e.title||this.closableScratchpad)G.appendChild(ia),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(R){if(!mxEvent.isConsumed(R)){var Y=mxUtils.bind(this,function(){this.closeLibrary(e)});null!=ka?this.confirm(mxResources.get("allChangesLost"),null,Y,mxResources.get("cancel"),mxResources.get("discardChanges")):Y();mxEvent.consume(R)}}));
-if(e.isEditable()){var ja=this.editor.graph,ca=null,pa=mxUtils.bind(this,function(R){this.showLibraryDialog(e.getTitle(),D,f,e,e.getMode());mxEvent.consume(R)}),ra=mxUtils.bind(this,function(R){e.setModified(!0);e.isAutosave()?(null!=ca&&null!=ca.parentNode&&ca.parentNode.removeChild(ca),ca=ia.cloneNode(!1),ca.setAttribute("src",Editor.spinImage),ca.setAttribute("title",mxResources.get("saving")),ca.style.cursor="default",ca.style.marginRight="2px",ca.style.marginTop="-2px",G.insertBefore(ca,G.firstChild),
-N.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(e.getTitle(),f,e,e.getMode(),!0,!0,function(){null!=ca&&null!=ca.parentNode&&(ca.parentNode.removeChild(ca),N.style.paddingRight=18*G.childNodes.length+"px")})):null==ka&&(ka=ia.cloneNode(!1),ka.setAttribute("src",Editor.saveImage),ka.setAttribute("title",mxResources.get("save")),G.insertBefore(ka,G.firstChild),mxEvent.addListener(ka,"click",mxUtils.bind(this,function(Y){this.saveLibrary(e.getTitle(),f,e,e.getMode(),e.constructor==
-LocalLibrary,!0,function(){null==ka||e.isModified()||(N.style.paddingRight=18*G.childNodes.length+"px",ka.parentNode.removeChild(ka),ka=null)});mxEvent.consume(Y)})),N.style.paddingRight=18*G.childNodes.length+"px")}),L=mxUtils.bind(this,function(R,Y,Z,la){R=ja.cloneCells(mxUtils.sortCells(ja.model.getTopmostCells(R)));for(var q=0;q<R.length;q++){var F=ja.getCellGeometry(R[q]);null!=F&&F.translate(-Y.x,-Y.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(R,Y.width,Y.height,la||"",!0,null,
-!1));R={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(R))),w:Y.width,h:Y.height};null!=la&&(R.title=la);f.push(R);ra(Z);null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null)}),V=mxUtils.bind(this,function(R){if(ja.isSelectionEmpty())ja.getRubberband().isActive()?(ja.getRubberband().execute(R),ja.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Y=ja.getSelectionCells(),Z=ja.view.getBounds(Y),
+Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&ca.setAttribute("type",d),1<ca.getElementsByTagName("diagram").length&&null!=this.pages&&ca.setAttribute("pages",this.pages.length));ia=ia?mxUtils.getPrettyXml(ca):mxUtils.getXml(ca);if(!B&&!x&&(I||null!=g&&/(\.html)$/i.test(g.getTitle())))ia=this.getHtml2(mxUtils.getXml(ca),f,null!=g?g.getTitle():null,ja,ka);else if(B||!x&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(v=null),
+ia=this.getEmbeddedSvg(ia,f,v,null,D,N,ka);return ia};EditorUi.prototype.getXmlFileData=function(d,f,g,v){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var x=this.editor.getGraphXml(d,v);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(N){var G=N.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(N)),N=N.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&N.appendChild(mxUtils.parseXml(G).documentElement))):
+null==G||g?N=N.cloneNode(!0):(N=N.cloneNode(!1),mxUtils.setTextContent(N,Graph.compressNode(G)));x.appendChild(N)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(x)),x=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var B=this.pages[f],I=B.node;if(B!=this.currentPage)if(B.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(B.root));this.editor.graph.saveViewState(B.viewState,
+D,null,v);EditorUi.removeChildNodes(I);mxUtils.setTextContent(I,Graph.compressNode(D));delete B.needsUpdate}else v&&(this.updatePageRoot(B),null!=B.viewState.backgroundImage&&(null!=B.viewState.backgroundImage.originalSrc?B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.originalSrc,B):Graph.isPageLink(B.viewState.backgroundImage.src)&&(B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.src,B))),null!=B.viewState.backgroundImage&&
+null!=B.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(B.root)),this.editor.graph.saveViewState(B.viewState,D,null,v),I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(D))));d(I)}return x};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],v=0;v<d.length;v++){var x=d.charAt(v);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?g.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?g.push(String.fromCharCode(65+Math.round(25*
+Math.random()))):x.toUpperCase()!=x?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
+d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(B){d[EditorUi.DIFF_INSERT][f].data=B.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var v in d[EditorUi.DIFF_UPDATE]){var x=d[EditorUi.DIFF_UPDATE][v];null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(f=mxUtils.bind(this,function(B){var I=x.cells[B];if(null!=I){for(var D in I)null!=I[D].value&&(I[D].value="["+I[D].value.length+"]"),null!=I[D].xmlValue&&(I[D].xmlValue="["+I[D].xmlValue.length+"]"),null!=I[D].style&&(I[D].style=
+"["+I[D].style.length+"]"),mxUtils.isEmptyObject(I[D])&&delete I[D];mxUtils.isEmptyObject(I)&&delete x.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete d[EditorUi.DIFF_UPDATE][v]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
+d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
+"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
+f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,v,x,B,I,
+D,N,G,ia){x=null!=x?x:!0;B=null!=B?B:!1;var ka=this.editor.graph;if(f||!d&&null!=N&&/(\.svg)$/i.test(N.getTitle())){var ja=null!=ka.themes&&"darkTheme"==ka.defaultThemeName;G=!1;if(ja||null!=this.pages&&this.currentPage!=this.pages[0]){var ca=ka.getGlobalVariable;ka=this.createTemporaryGraph(ja?ka.getDefaultStylesheet():ka.getStylesheet());ka.setBackgroundImage=this.editor.graph.setBackgroundImage;ka.background=this.editor.graph.background;var pa=this.pages[0];this.currentPage==pa?ka.setBackgroundImage(this.editor.graph.backgroundImage):
+null!=pa.viewState&&null!=pa.viewState&&ka.setBackgroundImage(pa.viewState.backgroundImage);ka.getGlobalVariable=function(ra){return"page"==ra?pa.getName():"pagenumber"==ra?1:ca.apply(this,arguments)};document.body.appendChild(ka.container);ka.model.setRoot(pa.root)}}I=null!=I?I:this.getXmlFileData(x,B,G,ia);N=null!=N?N:this.getCurrentFile();d=this.createFileData(I,ka,N,window.location.href,d,f,g,v,x,D,G);ka!=this.editor.graph&&ka.container.parentNode.removeChild(ka.container);return d};EditorUi.prototype.getHtml=
+function(d,f,g,v,x,B){B=null!=B?B:!0;var I=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=B?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var N=f.view.scale;B=Math.floor(I.x/N-f.view.translate.x);N=Math.floor(I.y/N-f.view.translate.y);I=f.background;null==x&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",B);d.setAttribute("y0",N)}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!=v&&d.setAttribute("edit",v));null!=x&&(x=x.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";v=Graph.compress(d);Graph.decompress(v)!=d&&(v=encodeURIComponent(d));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=g?
+"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+v+"</div>\n</div>\n"+(null==x?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,v,x){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));
+return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==x?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:
+null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var v=0;v<d.length;v++)null==
+d[v].getAttribute("id")&&d[v].setAttribute("id",v),f=new DiagramPage(d[v]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[v+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var x=urlParams["layer-ids"].split(" ");f={};for(v=0;v<x.length;v++)f[x[v]]=!0;var B=this.editor.graph.getModel(),I=B.getChildren(B.root);for(v=0;v<I.length;v++){var D=I[v];B.setVisible(D,f[D.id]||!1)}}catch(N){}};EditorUi.prototype.getBaseFilename=function(d){var f=
+this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
+function(d,f,g,v,x,B,I,D,N,G,ia,ka){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var ja=this.getBaseFilename("remoteSvg"==d?!1:!x),ca=ja+("xml"==d||"pdf"==d&&ia?".drawio":"")+"."+d;if("xml"==d){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,v,x,null,null,null,f);this.saveData(ca,d,pa,"text/xml")}else if("html"==d)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,ja),this.saveData(ca,d,pa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,
+mxResources.get("export"))){if("xmlpng"==d)ca=ja+".png";else if("jpeg"==d)ca=ja+".jpg";else if("remoteSvg"==d){ca=ja+".svg";d="svg";var ra=parseInt(N);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<ra){var L=this.editor.graph,V=L.getGraphBounds();var R=Math.ceil(V.width*D/L.view.scale+2*ra);var Y=Math.ceil(V.height*D/L.view.scale+2*ra)}}this.saveRequest(ca,d,mxUtils.bind(this,function(T,aa){try{var U=this.editor.graph.pageVisible;0==B&&(this.editor.graph.pageVisible=B);var da=this.createDownloadRequest(T,
+d,v,aa,I,x,D,N,G,ia,ka,R,Y);this.editor.graph.pageVisible=U;return da}catch(fa){this.handleError(fa)}}))}else{var Z=null,la=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(ca,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==d){var q=this.editor.graph.background;if(I||q==mxConstants.NONE)q=null;var F=this.editor.graph.getSvg(q,null,null,null,null,v);g&&
+this.editor.graph.addSvgShadow(F);this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();la(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else ca=ja+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();la(T)}),v)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja){var ca=this.editor.graph,pa=ca.getGraphBounds();g=this.getFileData(!0,null,null,
+null,g,0==B?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var ra="",L="";if(pa.width*pa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=ia?L="&from="+ia.from+"&to="+ia.to:0==B&&(L="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(B=0;B<this.pages.length;B++)if(this.pages[B]==this.currentPage){ra="&from="+B;break}B=ca.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!x?
+x||null!=B&&B!=mxConstants.NONE||(B="#ffffff"):B=mxConstants.NONE;x={globalVars:ca.getExportVariables()};N&&(x.grid={size:ca.gridSize,steps:ca.view.gridSteps,color:ca.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+L+"&bg="+(null!=B?B:mxConstants.NONE)+"&base64="+v+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(x))+(null!=I?
+"&scale="+I:"")+(null!=D?"&border="+D:"")+(ka&&isFinite(ka)?"&w="+ka:"")+(ja&&isFinite(ja)?"&h="+ja:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var v=window.location.hash,x=mxUtils.bind(this,function(I){var D=null!=d.data?d.data:"";null!=I&&0<I.length&&(0<D.length&&(D+="\n"),D+=I);I=new LocalFile(this,"csv"!=d.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);
+I.getHash=function(){return v};this.fileLoaded(I);"csv"==d.format&&this.importCsv(D,mxUtils.bind(this,function(ja){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var N=null!=d.interval?parseInt(d.interval):6E4,G=null,ia=mxUtils.bind(this,function(){var ja=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ca){ja===this.currentPage&&(200<=ca.getStatus()&&
+300>=ca.getStatus()?(this.updateDiagram(ca.getText()),ka()):this.handleError({message:mxResources.get("error")+" "+ca.getStatus()}))}),mxUtils.bind(this,function(ca){this.handleError(ca)}))}),ka=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(ia,N)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ka();ia()}));ka();ia()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var B=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(B,mxUtils.bind(this,function(I){x(I)}),
+mxUtils.bind(this,function(I){null!=g&&g(I)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function f(Y){var Z=new mxCellOverlay(Y.image||x.warningImage,Y.tooltip,Y.align,Y.valign,Y.offset);Z.addListener(mxEvent.CLICK,function(la,q){v.alert(Y.tooltip)});return Z}var g=null,v=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,B=x.getModel();B.beginUpdate();var I=null;try{for(d=d.firstChild;null!=
+d;){if("update"==d.nodeName){var D=B.getCell(d.getAttribute("id"));if(null!=D){try{var N=d.getAttribute("value");if(null!=N){var G=mxUtils.parseXml(N).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))B.setValue(D,G);else for(var ia=G.attributes,ka=0;ka<ia.length;ka++)x.setAttributeForCell(D,ia[ka].nodeName,0<ia[ka].nodeValue.length?ia[ka].nodeValue:null)}}catch(Y){null!=window.console&&console.log("Error in value for "+D.id+": "+Y)}try{var ja=d.getAttribute("style");null!=ja&&x.model.setStyle(D,
+ja)}catch(Y){null!=window.console&&console.log("Error in style for "+D.id+": "+Y)}try{var ca=d.getAttribute("icon");if(null!=ca){var pa=0<ca.length?JSON.parse(ca):null;null!=pa&&pa.append||x.removeCellOverlays(D);null!=pa&&x.addCellOverlay(D,f(pa))}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}try{var ra=d.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var L=x.getCellGeometry(D);if(null!=L){L=L.clone();for(key in ra){var V=parseFloat(ra[key]);"dx"==key?L.x+=
+V:"dy"==key?L.y+=V:"dw"==key?L.width+=V:"dh"==key?L.height+=V:L[key]=parseFloat(ra[key])}x.model.setGeometry(D,L)}}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}}}else if("model"==d.nodeName){for(var R=d.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(new mxCodec(d.firstChild)).decode(R,B)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(x.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))x.view.translate=
+new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(I=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{B.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var v=g.lastIndexOf(".");0<=v&&(d=g.substring(v),g=g.substring(0,v));if(f){f=g;var x=new Date;
+g=x.getFullYear();v=x.getMonth()+1;var B=x.getDate(),I=x.getHours(),D=x.getMinutes();x=x.getSeconds();g=f+(" "+(g+"-"+v+"-"+B+"-"+I+"-"+D+"-"+x))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var v=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
+var x=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});
+if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),
+null!=d.backupPatch&&d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
+v=!0;if(!this.isOffline()&&null!=d.getMode()){var B="1"==urlParams.sketch?"sketch":uiTheme;if(null==B)B="default";else if("sketch"==B||"min"==B)B+=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_"+B})}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(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=d)try{d.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+I.message,label:"stack_"+I.stack})}catch(D){}d=mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||x():x()});f?d():this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else x();return v};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,v=new mxGraphModel,x=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var B=0;B<d.length;B++){this.updatePageRoot(d[B]);var I=
+d[B].node.cloneNode(!1);I.removeAttribute("name");v.root=d[B].root;var D=x.encode(v);this.editor.graph.saveViewState(d[B].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");I.appendChild(D);null!=f&&(f.eltCount+=I.getElementsByTagName("*").length,f.nodeCount+=I.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(I,function(N,G,ia,ka){return!ka||"mxGeometry"!=N.nodeName&&"mxPoint"!=N.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ka&&"mxCell"==N.nodeName&&
+"previous"==G?null:ia:Math.round(ia)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var v=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(v^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var x=0;x<d.attributes.length;x++){var B=d.attributes[x].name,I=null!=f?f(d,B,d.attributes[x].value,!0):d.attributes[x].value;null!=I&&(v^=this.hashValue(B,
+f,g)+this.hashValue(I,f,g))}}if(null!=d.childNodes)for(x=0;x<d.childNodes.length;x++)v=(v<<5)-v+this.hashValue(d.childNodes[x],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(x=0;x<d.length;x++)f=(f<<5)-f+d.charCodeAt(x)<<0;v^=f}return v};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,v,x,B,I){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
+return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
+if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var v=g.previousSibling;f.insertBefore(g,d);f.insertBefore(v,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var v=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,v,g.documentElement.getAttribute("title"),
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,v){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var B=null,I=mxUtils.bind(this,function(R,Y){0==R.length&&d.isEditable()?
+(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),Y.appendChild(B)):this.addLibraryEntries(R,Y)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),g,null!=v?v:!0,mxUtils.bind(this,function(R){I(f,R)}));this.repositionLibrary(x);var N=D.parentNode.previousSibling;v=N.getAttribute("title");
+null!=v&&0<v.length&&".scratchpad"!=d.title&&N.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+v);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";N.style.position="relative";var ia=document.createElement("img");ia.className="geAdaptiveAsset";ia.setAttribute("src",Editor.crossImage);ia.setAttribute("title",mxResources.get("close"));ia.setAttribute("valign","absmiddle");ia.setAttribute("border",
+"0");ia.style.position="relative";ia.style.top="2px";ia.style.width="14px";ia.style.cursor="pointer";ia.style.margin="0 3px";var ka=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(ia),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(R){if(!mxEvent.isConsumed(R)){var Y=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=ka?this.confirm(mxResources.get("allChangesLost"),null,Y,mxResources.get("cancel"),mxResources.get("discardChanges")):Y();mxEvent.consume(R)}}));
+if(d.isEditable()){var ja=this.editor.graph,ca=null,pa=mxUtils.bind(this,function(R){this.showLibraryDialog(d.getTitle(),D,f,d,d.getMode());mxEvent.consume(R)}),ra=mxUtils.bind(this,function(R){d.setModified(!0);d.isAutosave()?(null!=ca&&null!=ca.parentNode&&ca.parentNode.removeChild(ca),ca=ia.cloneNode(!1),ca.setAttribute("src",Editor.spinImage),ca.setAttribute("title",mxResources.get("saving")),ca.style.cursor="default",ca.style.marginRight="2px",ca.style.marginTop="-2px",G.insertBefore(ca,G.firstChild),
+N.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=ca&&null!=ca.parentNode&&(ca.parentNode.removeChild(ca),N.style.paddingRight=18*G.childNodes.length+"px")})):null==ka&&(ka=ia.cloneNode(!1),ka.setAttribute("src",Editor.saveImage),ka.setAttribute("title",mxResources.get("save")),G.insertBefore(ka,G.firstChild),mxEvent.addListener(ka,"click",mxUtils.bind(this,function(Y){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==
+LocalLibrary,!0,function(){null==ka||d.isModified()||(N.style.paddingRight=18*G.childNodes.length+"px",ka.parentNode.removeChild(ka),ka=null)});mxEvent.consume(Y)})),N.style.paddingRight=18*G.childNodes.length+"px")}),L=mxUtils.bind(this,function(R,Y,Z,la){R=ja.cloneCells(mxUtils.sortCells(ja.model.getTopmostCells(R)));for(var q=0;q<R.length;q++){var F=ja.getCellGeometry(R[q]);null!=F&&F.translate(-Y.x,-Y.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(R,Y.width,Y.height,la||"",!0,null,
+!1));R={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(R))),w:Y.width,h:Y.height};null!=la&&(R.title=la);f.push(R);ra(Z);null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)}),V=mxUtils.bind(this,function(R){if(ja.isSelectionEmpty())ja.getRubberband().isActive()?(ja.getRubberband().execute(R),ja.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Y=ja.getSelectionCells(),Z=ja.view.getBounds(Y),
la=ja.view.scale;Z.x/=la;Z.y/=la;Z.width/=la;Z.height/=la;Z.x-=ja.view.translate.x;Z.y-=ja.view.translate.y;L(Y,Z)}mxEvent.consume(R)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(R){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler.first&&(ja.graphHandler.suspend(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="#f1f3f4",D.style.cursor="copy",ja.panningManager.stop(),ja.autoScroll=!1,mxEvent.consume(R))}),
mxUtils.bind(this,function(R){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,ja.panningManager.stop(),ja.graphHandler.reset(),ja.isMouseDown=!1,ja.autoScroll=!0,V(R),mxEvent.consume(R))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(R){ja.isMouseDown&&null!=ja.graphHandler.first&&(ja.graphHandler.resume(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="visible"),
D.style.backgroundColor="",D.style.cursor="",ja.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){D.style.backgroundColor="#f1f3f4";R.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();R.stopPropagation();R.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){D.style.cursor="";D.style.backgroundColor="";0<R.dataTransfer.files.length&&this.importFiles(R.dataTransfer.files,0,0,this.maxImageSize,
-mxUtils.bind(this,function(Y,Z,la,q,F,T,aa,U,da){if(null!=Y&&"image/"==Z.substring(0,6))Y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Y),Y=[new mxCell("",new mxGeometry(0,0,F,T),Y)],Y[0].vertex=!0,L(Y,new mxRectangle(0,0,F,T),R,mxEvent.isAltDown(R)?null:aa.substring(0,aa.lastIndexOf(".")).replace(/_/g," ")),null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null);else{var fa=!1,na=mxUtils.bind(this,function(sa,
+mxUtils.bind(this,function(Y,Z,la,q,F,T,aa,U,da){if(null!=Y&&"image/"==Z.substring(0,6))Y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Y),Y=[new mxCell("",new mxGeometry(0,0,F,T),Y)],Y[0].vertex=!0,L(Y,new mxRectangle(0,0,F,T),R,mxEvent.isAltDown(R)?null:aa.substring(0,aa.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null);else{var fa=!1,na=mxUtils.bind(this,function(sa,
za){null!=sa&&"application/pdf"==za&&(za=Editor.extractGraphModelFromPdf(sa),null!=za&&0<za.length&&(sa=za));if(null!=sa)if(sa=mxUtils.parseXml(sa),"mxlibrary"==sa.documentElement.nodeName)try{var ua=JSON.parse(mxUtils.getTextContent(sa.documentElement));I(ua,D);f=f.concat(ua);ra(R);this.spinner.stop();fa=!0}catch(ya){}else if("mxfile"==sa.documentElement.nodeName)try{var Ba=sa.documentElement.getElementsByTagName("diagram");for(ua=0;ua<Ba.length;ua++){var oa=this.stringToCells(Editor.getDiagramNodeXml(Ba[ua])),
-Aa=this.editor.graph.getBoundingBoxFromGeometry(oa);L(oa,new mxRectangle(0,0,Aa.width,Aa.height),R)}fa=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null)});null!=da&&null!=aa&&(/(\.v(dx|sdx?))($|\?)/i.test(aa)||/(\.vs(x|sx?))($|\?)/i.test(aa))?this.importVisio(da,function(sa){na(sa,"text/xml")},null,aa):(new XMLHttpRequest).upload&&
+Aa=this.editor.graph.getBoundingBoxFromGeometry(oa);L(oa,new mxRectangle(0,0,Aa.width,Aa.height),R)}fa=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)});null!=da&&null!=aa&&(/(\.v(dx|sdx?))($|\?)/i.test(aa)||/(\.vs(x|sx?))($|\?)/i.test(aa))?this.importVisio(da,function(sa){na(sa,"text/xml")},null,aa):(new XMLHttpRequest).upload&&
this.isRemoteFileFormat(Y,aa)&&null!=da?this.isExternalDataComms()?this.parseFile(da,mxUtils.bind(this,function(sa){4==sa.readyState&&(this.spinner.stop(),200<=sa.status&&299>=sa.status?na(sa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==sa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(Y,Z)}}));R.stopPropagation();R.preventDefault()})),
mxEvent.addListener(D,"dragleave",function(R){D.style.cursor="";D.style.backgroundColor="";R.stopPropagation();R.preventDefault()}));ia=ia.cloneNode(!1);ia.setAttribute("src",Editor.editImage);ia.setAttribute("title",mxResources.get("edit"));G.insertBefore(ia,G.firstChild);mxEvent.addListener(ia,"click",pa);mxEvent.addListener(D,"dblclick",function(R){mxEvent.getSource(R)==D&&pa(R)});v=ia.cloneNode(!1);v.setAttribute("src",Editor.plusImage);v.setAttribute("title",mxResources.get("add"));G.insertBefore(v,
-G.firstChild);mxEvent.addListener(v,"click",V);this.isOffline()||".scratchpad"!=e.title||null==EditorUi.scratchpadHelpLink||(v=document.createElement("span"),v.setAttribute("title",mxResources.get("help")),v.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(v,"?"),mxEvent.addGestureListeners(v,mxUtils.bind(this,function(R){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(R)})),G.insertBefore(v,G.firstChild))}N.appendChild(G);N.style.paddingRight=
-18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(e,f){for(var g=0;g<e.length;g++){var v=e[g],y=v.data;if(null!=y){y=this.convertDataUri(y);var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==v.aspect&&(C+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(C+"image="+y,v.w,v.h,"",v.title||"",!1,null,!0))}else null!=v.xml&&(y=this.stringToCells(Graph.decompress(v.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,
-v.w,v.h,v.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(e){return null!=e?e[mxLanguage]||e.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=
+G.firstChild);mxEvent.addListener(v,"click",V);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(v=document.createElement("span"),v.setAttribute("title",mxResources.get("help")),v.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(v,"?"),mxEvent.addGestureListeners(v,mxUtils.bind(this,function(R){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(R)})),G.insertBefore(v,G.firstChild))}N.appendChild(G);N.style.paddingRight=
+18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var v=d[g],x=v.data;if(null!=x){x=this.convertDataUri(x);var B="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==v.aspect&&(B+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(B+"image="+x,v.w,v.h,"",v.title||"",!1,null,!0))}else null!=v.xml&&(x=this.stringToCells(Graph.decompress(v.xml)),0<x.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(x,
+v.w,v.h,v.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);"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",
-targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(e,f,g,v,y,C,I){e=new ImageDialog(this,e,f,g,v,y,C,I);this.showDialog(e.container,Graph.fileSupport?480:360,Graph.fileSupport?
-200:90,!0,!0);e.init()};EditorUi.prototype.showBackgroundImageDialog=function(e,f){e=null!=e?e:mxUtils.bind(this,function(g,v){v||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});e=new BackgroundImageDialog(this,e,f);this.showDialog(e.container,400,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(e,f,g,v,y){e=new LibraryDialog(this,e,f,g,v,y);this.showDialog(e.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.showSplash()}));e.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(e){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var e=this.createDiv("geSidebarContainer geSidebarFooter");e.style.position="absolute";e.style.overflow="hidden";var f=document.createElement("a");
+targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,v,x,B,I){d=new ImageDialog(this,d,f,g,v,x,B,I);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?
+200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,v){v||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,v,x){d=new LibraryDialog(this,d,f,g,v,x);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(B){B&&null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");
f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(v){v.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(v){this.actions.get("shapes").funct();
-mxEvent.consume(v)}));e.appendChild(f);return e};EditorUi.prototype.handleError=function(e,f,g,v,y,C,I){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=null!=e&&null!=e.error?e.error:e;if(null!=e&&("1"==urlParams.test||null!=e.stack)&&null!=e.message)try{I?null!=window.console&&console.error("EditorUi.handleError:",e):EditorUi.logError("Caught: "+(""==e.message&&null!=e.name)?e.name:e.message,e.filename,e.lineNumber,e.columnNumber,e,"INFO")}catch(ca){}if(null!=
-N||null!=f){I=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),ia=null;f=null!=f?f:mxResources.get("error");if(null!=N){null!=N.retry&&(G=mxResources.get("cancel"),ia=function(){D();N.retry()});if(404==N.code||404==N.status||403==N.code){I=403==N.code?null!=N.message?mxUtils.htmlEntities(N.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
-this.drive.user.displayName+", "+this.drive.user.email+")":""));var ka=null!=y?null:null!=C?C:window.location.hash;if(null!=ka&&("#G"==ka.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ka.substring(0,45))&&(null!=e&&null!=e.error&&(null!=e.error.errors&&0<e.error.errors.length&&"fileAccess"==e.error.errors[0].reason||null!=e.error.data&&0<e.error.data.length&&"fileAccess"==e.error.data[0].reason)||404==N.code||404==N.status)){ka="#U"==ka.substring(0,2)?ka.substring(45,ka.lastIndexOf("%26ex")):
-ka.substring(2);this.showError(f,I,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ka);this.handleError(e,f,g,v,y)}),ia,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){V.innerText="";for(var R=0;R<pa.length;R++){var Y=document.createElement("option");mxUtils.write(Y,pa[R].displayName);Y.value=R;V.appendChild(Y);Y=document.createElement("option");Y.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(Y,
+mxEvent.consume(v)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,v,x,B,I){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{I?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(ca){}if(null!=
+N||null!=f){I=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),ia=null;f=null!=f?f:mxResources.get("error");if(null!=N){null!=N.retry&&(G=mxResources.get("cancel"),ia=function(){D();N.retry()});if(404==N.code||404==N.status||403==N.code){I=403==N.code?null!=N.message?mxUtils.htmlEntities(N.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
+this.drive.user.displayName+", "+this.drive.user.email+")":""));var ka=null!=x?null:null!=B?B:window.location.hash;if(null!=ka&&("#G"==ka.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ka.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==N.code||404==N.status)){ka="#U"==ka.substring(0,2)?ka.substring(45,ka.lastIndexOf("%26ex")):
+ka.substring(2);this.showError(f,I,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ka);this.handleError(d,f,g,v,x)}),ia,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){V.innerText="";for(var R=0;R<pa.length;R++){var Y=document.createElement("option");mxUtils.write(Y,pa[R].displayName);Y.value=R;V.appendChild(Y);Y=document.createElement("option");Y.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(Y,
"<"+pa[R].email+">");Y.setAttribute("disabled","disabled");V.appendChild(Y)}Y=document.createElement("option");mxUtils.write(Y,mxResources.get("addAccount"));Y.value=pa.length;V.appendChild(Y)}var pa=this.drive.getUsersList(),ra=document.createElement("div"),L=document.createElement("span");L.style.marginTop="6px";mxUtils.write(L,mxResources.get("changeUser")+": ");ra.appendChild(L);var V=document.createElement("select");V.style.width="200px";ca();mxEvent.addListener(V,"change",mxUtils.bind(this,
function(){var R=V.value,Y=pa.length!=R;Y&&this.drive.setUser(pa[R]);this.drive.authorize(Y,mxUtils.bind(this,function(){Y||(pa=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ra.appendChild(V);ra=new CustomDialog(this,ra,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ra.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=
-N.message?I=""==N.message&&null!=N.name?mxUtils.htmlEntities(N.name):mxUtils.htmlEntities(N.message):null!=N.response&&null!=N.response.error?I=mxUtils.htmlEntities(N.response.error):"undefined"!==typeof window.App&&(N.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout")):N.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof N&&0<N.length&&(I=mxUtils.htmlEntities(N)))}var ja=C=null;null!=N&&null!=N.helpLink?(C=mxResources.get("help"),ja=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(N.helpLink)})):null!=N&&null!=N.ownerEmail&&(C=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+C+": "+N.ownerEmail+")"),ja=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(N.ownerEmail))}));this.showError(f,I,G,g,ia,null,null,C,ja,null,null,null,v?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(e,f,g){e=new ErrorDialog(this,null,e,mxResources.get("ok"),f);this.showDialog(e.container,g||340,100,!0,
-!1);e.init()};EditorUi.prototype.confirm=function(e,f,g,v,y,C){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(e.length/50));e=new ConfirmDialog(this,e,function(){I();null!=f&&f()},function(){I();null!=g&&g()},v,y,null,null,null,null,D);this.showDialog(e.container,340,46+D,!0,C);e.init()};EditorUi.prototype.showBanner=function(e,f,g,v){var y=!1;if(!(this.bannerShowing||this["hideBanner"+e]||isLocalStorage&&null!=mxSettings.settings&&
-null!=mxSettings.settings["close"+e])){var C=document.createElement("div");C.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(C.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(C.style,"transition","all 1s ease");C.className="geBtn gePrimaryBtn";
-y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";C.appendChild(y);y=document.createElement("img");y.setAttribute("src",Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(v?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
-C.appendChild(y);mxUtils.write(C,f);document.body.appendChild(C);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("id","geDoNotShowAgainCheckbox");I.style.marginRight="6px";if(!v){f.appendChild(I);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);
-C.style.paddingBottom="30px";C.appendChild(f)}var N=mxUtils.bind(this,function(){null!=C.parentNode&&(C.parentNode.removeChild(C),this.bannerShowing=!1,I.checked||v)&&(this["hideBanner"+e]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+e]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(ia){mxEvent.consume(ia);N()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){N()}),1E3)});mxEvent.addListener(C,"click",mxUtils.bind(this,function(ia){var ka=mxEvent.getSource(ia);ka!=I&&ka!=D?(null!=g&&g(),N(),mxEvent.consume(ia)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(e){null!=e&&(e.opened=new Date);this.currentFile=e};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
-function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(e,f,g,v){e=e.toDataURL("image/"+g);if(null!=e&&6<e.length)null!=f&&(e=Editor.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f))),0<v&&(e=Editor.writeGraphModelToPng(e,"pHYs","dpi",v));else throw{message:mxResources.get("unknownError")};return e};EditorUi.prototype.saveCanvas=function(e,f,g,v,y){var C="jpeg"==g?"jpg":g;v=this.getBaseFilename(v)+(null!=f?".drawio":"")+"."+C;e=this.createImageDataUri(e,
-f,g,y);this.saveData(v,C,e.substring(e.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(e,f){e=new TextareaDialog(this,e,f,null,null,mxResources.get("close"));this.showDialog(e.container,620,460,
-!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(e,f,g,v,y,C){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)e=v?this.base64ToBlob(e,g):new Blob([e],{type:g}),navigator.msSaveOrOpenBlob(e,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(e,!0):(g.document.write(e),
-g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",e):this.openInNewWindow(e,g,v);else{var I=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(D?parseInt(D[2],10):
-!1)?!1:C}if(C||this.isOffline()){I.href=URL.createObjectURL(v?this.base64ToBlob(e,g):new Blob([e],{type:g}));C?I.download=f:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(N){}}else this.createEchoRequest(e,f,g,v,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(e,f,g,v,y,C){e="xml="+encodeURIComponent(e);return new mxXmlRequest(SAVE_URL,e+(null!=
-g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(v?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(e,f){f=f||"";e=atob(e);for(var g=e.length,v=Math.ceil(g/1024),y=Array(v),C=0;C<v;++C){for(var I=1024*C,D=Math.min(I+1024,g),N=Array(D-I),G=0;I<D;++G,++I)N[G]=e[I].charCodeAt(0);y[C]=new Uint8Array(N)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(e,f,g,v,y,C,I,D){C=null!=C?C:!1;I=null!=I?I:"vsdx"!=
-y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(C);isLocalStorage&&y++;var N=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,ia){try{if("_blank"==ia)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(e,g,v);else if(null!=g&&"text/html"==g.substring(0,9)){var ka=new EmbedDialog(this,e);this.showDialog(ka.container,450,240,!0,!0);ka.init()}else{var ja=window.open("about:blank");null==ja?mxUtils.popup(e,!0):(ja.document.write("<pre>"+mxUtils.htmlEntities(e,
-!1)+"</pre>"),ja.document.close())}else ia==App.MODE_DEVICE||"download"==ia?this.doSaveLocalFile(e,G,g,v,null,D):null!=G&&0<G.length&&this.pickFolder(ia,mxUtils.bind(this,function(ca){try{this.exportFile(e,G,g,v,ia,ca)}catch(pa){this.handleError(pa)}}))}catch(ca){this.handleError(ca)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,C,I,null,1<y,N,e,g,v);C=this.isServices(y)?y>N?390:280:160;this.showDialog(f.container,420,C,!0,!0);f.init()};
-EditorUi.prototype.openInNewWindow=function(e,f,g){var v=window.open("about:blank");null==v||null==v.document?mxUtils.popup(e,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(e=g?e:btoa(unescape(encodeURIComponent(e))),v.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+e+'"/></html>')):v.document.write("<html>"+e+"</html>"):v.document.write("<html><pre>"+mxUtils.htmlEntities(e,!1)+"</pre></html>"),v.document.close())};var l=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(e){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=e(mxUtils.bind(this,function(v){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
+N.message?I=""==N.message&&null!=N.name?mxUtils.htmlEntities(N.name):mxUtils.htmlEntities(N.message):null!=N.response&&null!=N.response.error?I=mxUtils.htmlEntities(N.response.error):"undefined"!==typeof window.App&&(N.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout")):N.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof N&&0<N.length&&(I=mxUtils.htmlEntities(N)))}var ja=B=null;null!=N&&null!=N.helpLink?(B=mxResources.get("help"),ja=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(N.helpLink)})):null!=N&&null!=N.ownerEmail&&(B=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+B+": "+N.ownerEmail+")"),ja=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(N.ownerEmail))}));this.showError(f,I,G,g,ia,null,null,B,ja,null,null,null,v?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,
+!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,v,x,B){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){I();null!=f&&f()},function(){I();null!=g&&g()},v,x,null,null,null,null,D);this.showDialog(d.container,340,46+D,!0,B);d.init()};EditorUi.prototype.showBanner=function(d,f,g,v){var x=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&
+null!=mxSettings.settings["close"+d])){var B=document.createElement("div");B.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(B.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(B.style,"transition","all 1s ease");B.className="geBtn gePrimaryBtn";
+x=document.createElement("img");x.setAttribute("src",IMAGE_PATH+"/logo.png");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";B.appendChild(x);x=document.createElement("img");x.setAttribute("src",Dialog.prototype.closeImage);x.setAttribute("title",mxResources.get(v?"doNotShowAgain":"close"));x.setAttribute("border","0");x.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+B.appendChild(x);mxUtils.write(B,f);document.body.appendChild(B);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("id","geDoNotShowAgainCheckbox");I.style.marginRight="6px";if(!v){f.appendChild(I);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);
+B.style.paddingBottom="30px";B.appendChild(f)}var N=mxUtils.bind(this,function(){null!=B.parentNode&&(B.parentNode.removeChild(B),this.bannerShowing=!1,I.checked||v)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(x,"click",mxUtils.bind(this,function(ia){mxEvent.consume(ia);N()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){N()}),1E3)});mxEvent.addListener(B,"click",mxUtils.bind(this,function(ia){var ka=mxEvent.getSource(ia);ka!=I&&ka!=D?(null!=g&&g(),N(),mxEvent.consume(ia)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);x=!0}return x};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,v){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<v&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",v));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,v,x){var B="jpeg"==g?"jpg":g;v=this.getBaseFilename(v)+(null!=f?".drawio":"")+"."+B;d=this.createImageDataUri(d,
+f,g,x);this.saveData(v,B,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,
+!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,v,x,B){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=B?B:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=v?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),
+g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,v);else{var I=document.createElement("a");B=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);B=65==(D?parseInt(D[2],10):
+!1)?!1:B}if(B||this.isOffline()){I.href=URL.createObjectURL(v?this.base64ToBlob(d,g):new Blob([d],{type:g}));B?I.download=f:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(N){}}else this.createEchoRequest(d,f,g,v,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,v,x,B){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=
+g?"&mime="+g:"")+(null!=x?"&format="+x:"")+(null!=B?"&base64="+B:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(v?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,v=Math.ceil(g/1024),x=Array(v),B=0;B<v;++B){for(var I=1024*B,D=Math.min(I+1024,g),N=Array(D-I),G=0;I<D;++G,++I)N[G]=d[I].charCodeAt(0);x[B]=new Uint8Array(N)}return new Blob(x,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,v,x,B,I,D){B=null!=B?B:!1;I=null!=I?I:"vsdx"!=
+x&&(!mxClient.IS_IOS||!navigator.standalone);x=this.getServiceCount(B);isLocalStorage&&x++;var N=4>=x?2:6<x?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,ia){try{if("_blank"==ia)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,v);else if(null!=g&&"text/html"==g.substring(0,9)){var ka=new EmbedDialog(this,d);this.showDialog(ka.container,450,240,!0,!0);ka.init()}else{var ja=window.open("about:blank");null==ja?mxUtils.popup(d,!0):(ja.document.write("<pre>"+mxUtils.htmlEntities(d,
+!1)+"</pre>"),ja.document.close())}else ia==App.MODE_DEVICE||"download"==ia?this.doSaveLocalFile(d,G,g,v,null,D):null!=G&&0<G.length&&this.pickFolder(ia,mxUtils.bind(this,function(ca){try{this.exportFile(d,G,g,v,ia,ca)}catch(pa){this.handleError(pa)}}))}catch(ca){this.handleError(ca)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,B,I,null,1<x,N,d,g,v);B=this.isServices(x)?x>N?390:280:160;this.showDialog(f.container,420,B,!0,!0);f.init()};
+EditorUi.prototype.openInNewWindow=function(d,f,g){var v=window.open("about:blank");null==v||null==v.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),v.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):v.document.write("<html>"+d+"</html>"):v.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),v.document.close())};var l=EditorUi.prototype.addChromelessToolbarItems;
+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(v){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=
Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;
-mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var y=f.getBoundingClientRect();this.tagsDialog.style.left=y.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=y.zIndex;document.body.appendChild(this.tagsDialog);
+mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var x=f.getBoundingClientRect();this.tagsDialog.style.left=x.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=x.zIndex;document.body.appendChild(this.tagsDialog);
this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(v)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var v=this.editor.graph.getAllTags();f.style.display=0<v.length?"":"none"}))}l.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=
null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,
-"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=e(mxUtils.bind(this,function(v){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&
-(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var C=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
-"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=C.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";C=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=C.zIndex;var I=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,function(v){var x=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",x);null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)x.apply(this);else{this.exportDialog=document.createElement("div");var B=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=B.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";B=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=B.zIndex;var I=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});I.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(D){I.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var N=this.createImageDataUri(D,null,"png");D=document.createElement("img");D.style.maxWidth="140px";D.style.maxHeight="140px";D.style.cursor="pointer";D.style.backgroundColor="white";D.setAttribute("title",mxResources.get("openInNewWindow"));
-D.setAttribute("border","0");D.setAttribute("src",N);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(N.substring(N.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(v)}),
-Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(e,f,g,v,y){this.isLocalFileSave()?this.saveLocalFile(g,e,v,y,f):this.saveRequest(e,f,mxUtils.bind(this,function(C,I){return this.createEchoRequest(g,C,v,y,f,I)}),g,y,v)};EditorUi.prototype.saveRequest=function(e,f,g,v,y,C,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var D=this.getServiceCount(!1);isLocalStorage&&D++;var N=4>=D?2:6<D?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(G,ia){if("_blank"==
-ia||null!=G&&0<G.length){var ka=g("_blank"==ia?null:G,ia==App.MODE_DEVICE||"download"==ia||null==ia||"_blank"==ia?"0":"1");null!=ka&&(ia==App.MODE_DEVICE||"download"==ia||"_blank"==ia?ka.simulate(document,"_blank"):this.pickFolder(ia,mxUtils.bind(this,function(ja){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=v)try{this.exportFile(v,G,C,!0,ia,ja)}catch(ca){this.handleError(ca)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ka.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=ka.getStatus()&&299>=ka.getStatus())try{this.exportFile(ka.getText(),G,C,!0,ia,ja)}catch(ca){this.handleError(ca)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(ca){this.spinner.stop();this.handleError(ca)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,I,null,1<D,N,v,C,y);D=this.isServices(D)?4<D?390:280:160;this.showDialog(e.container,420,D,!0,!0);e.init()};EditorUi.prototype.isServices=
-function(e){return 1!=e};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(e,f,g,v,y,C){};EditorUi.prototype.pickFolder=function(e,f,g){f(null)};EditorUi.prototype.exportSvg=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja,ca){if(this.spinner.spin(document.body,mxResources.get("export")))try{var pa=this.editor.graph.isSelectionEmpty();g=null!=g?g:pa;var ra=f?null:this.editor.graph.background;ra==mxConstants.NONE&&(ra=null);null==ra&&0==f&&(ra=ia?
-this.editor.graph.defaultPageBackgroundColor:"#ffffff");var L=this.editor.graph.getSvg(ra,e,I,D,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ja,ia,ka);v&&this.editor.graph.addSvgShadow(L);var V=this.getBaseFilename()+(y?".drawio":"")+".svg";ca=null!=ca?ca:mxUtils.bind(this,function(Z){this.isLocalFileSave()||Z.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
-function(){mxUtils.popup(Z)}))});var R=mxUtils.bind(this,function(Z){this.spinner.stop();y&&Z.setAttribute("content",this.getFileData(!0,null,null,null,g,N,null,null,null,!1));ca(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))});this.editor.graph.mathEnabled&&this.editor.addMathCss(L);var Y=mxUtils.bind(this,function(Z){C?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Z,R,this.thumbImageCache)):R(Z)});ja?this.embedFonts(L,
-Y):(this.editor.addFontCss(L),Y(L))}catch(Z){this.handleError(Z)}};EditorUi.prototype.addRadiobox=function(e,f,g,v,y,C,I){return this.addCheckbox(e,g,v,y,C,I,!0,f)};EditorUi.prototype.addCheckbox=function(e,f,g,v,y,C,I,D){C=null!=C?C:!0;var N=document.createElement("input");N.style.marginRight="8px";N.style.marginTop="16px";N.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();N.id=I;null!=D&&N.setAttribute("name",D);g&&(N.setAttribute("checked","checked"),N.defaultChecked=!0);
-v&&N.setAttribute("disabled","disabled");C&&(e.appendChild(N),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",I),e.appendChild(g),y||mxUtils.br(e));return N};EditorUi.prototype.addEditButton=function(e,f){var g=this.addCheckbox(e,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var v=this.getCurrentFile(),y="";null!=v&&v.getMode()!=App.MODE_DEVICE&&v.getMode()!=App.MODE_BROWSER&&(y=window.location.href);var C=document.createElement("select");C.style.maxWidth=
-"200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("makeCopy"));C.appendChild(v);v=document.createElement("option");v.setAttribute("value","custom");mxUtils.write(v,mxResources.get("custom")+"...");C.appendChild(v);e.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==C.value){var I=new FilenameDialog(this,y,mxResources.get("ok"),
-function(D){null!=D?y=D:C.value="blank"},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(e);return{getLink:function(){return g.checked?"blank"===C.value?"_blank":y:null},getEditInput:function(){return g},getEditSelect:function(){return C}}};EditorUi.prototype.addLinkSection=
-function(e,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=C&&C!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=C):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(D)}mxUtils.write(e,mxResources.get("links")+":");var v=document.createElement("select");v.style.width=
-"100px";v.style.padding="0px";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));v.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));v.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y,mxResources.get("openInThisWindow"));v.appendChild(y);
-f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),v.appendChild(f));e.appendChild(v);mxUtils.write(e,mxResources.get("borderColor")+":");var C="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(C||"none",function(N){C=N;g()});mxEvent.consume(D)}));g();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width=
-"22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";e.appendChild(I);mxUtils.br(e);return{getColor:function(){return C},getTarget:function(){return v.value},focus:function(){v.focus()}}};EditorUi.prototype.createUrlParameters=function(e,f,g,v,y,C,I){I=null!=I?I:[];v&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||I.push("lightbox=1"),"auto"!=e&&I.push("target="+e),null!=f&&f!=mxConstants.NONE&&
-I.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&I.push("edit="+encodeURIComponent(y)),C&&I.push("layers=1"),this.editor.graph.foldingEnabled&&I.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&I.push("page-id="+this.currentPage.getId());return I};EditorUi.prototype.createLink=function(e,f,g,v,y,C,I,D,N,G){N=this.createUrlParameters(e,f,g,v,y,C,N);e=this.getCurrentFile();f=!0;null!=I?g="#U"+encodeURIComponent(I):(e=this.getCurrentFile(),
-D||null==e||e.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+e.getHash(),f=!1));f&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&N.push("title="+encodeURIComponent(e.getTitle()));G&&1<g.length&&(N.push("open="+g.substring(1)),g="");return(v&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<N.length?"?"+N.join("&"):"")+g};EditorUi.prototype.createHtml=function(e,f,g,v,y,C,I,D,N,G,ia,ka){this.getBasenames();var ja={};""!=y&&y!=mxConstants.NONE&&(ja.highlight=y);"auto"!==v&&(ja.target=v);G||(ja.lightbox=!1);ja.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(ja.zoom=g/100);g=[];I&&(g.push("pages"),ja.resize=!0,null!=this.pages&&null!=this.currentPage&&(ja.page=mxUtils.indexOf(this.pages,this.currentPage)));
-f&&(g.push("zoom"),ja.resize=!0);D&&g.push("layers");N&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ja.toolbar=g.join(" "));null!=ia&&0<ia.length&&(ja.edit=ia);null!=e?ja.url=e:ja.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ja))+'"></div>';e=null!=e?"&fetch="+encodeURIComponent(e):"";ka(f,'<script type="text/javascript" src="'+(0<e.length?
-("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+e:"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(e,f,g,v){var y=document.createElement("div");y.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-y.appendChild(C);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");C=D.cloneNode(!0);C.setAttribute("value","copy");I.appendChild(C);var N=document.createElement("span");mxUtils.write(N,mxResources.get("includeCopyOfMyDiagram"));
+D.setAttribute("border","0");D.setAttribute("src",N);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(N.substring(N.indexOf(",")+1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",x);document.body.appendChild(this.exportDialog)}mxEvent.consume(v)}),
+Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,v,x){this.isLocalFileSave()?this.saveLocalFile(g,d,v,x,f):this.saveRequest(d,f,mxUtils.bind(this,function(B,I){return this.createEchoRequest(g,B,v,x,f,I)}),g,x,v)};EditorUi.prototype.saveRequest=function(d,f,g,v,x,B,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var D=this.getServiceCount(!1);isLocalStorage&&D++;var N=4>=D?2:6<D?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,ia){if("_blank"==
+ia||null!=G&&0<G.length){var ka=g("_blank"==ia?null:G,ia==App.MODE_DEVICE||"download"==ia||null==ia||"_blank"==ia?"0":"1");null!=ka&&(ia==App.MODE_DEVICE||"download"==ia||"_blank"==ia?ka.simulate(document,"_blank"):this.pickFolder(ia,mxUtils.bind(this,function(ja){B=null!=B?B:"pdf"==f?"application/pdf":"image/"+f;if(null!=v)try{this.exportFile(v,G,B,!0,ia,ja)}catch(ca){this.handleError(ca)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ka.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=ka.getStatus()&&299>=ka.getStatus())try{this.exportFile(ka.getText(),G,B,!0,ia,ja)}catch(ca){this.handleError(ca)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(ca){this.spinner.stop();this.handleError(ca)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,I,null,1<D,N,v,B,x);D=this.isServices(D)?4<D?390:280:160;this.showDialog(d.container,420,D,!0,!0);d.init()};EditorUi.prototype.isServices=
+function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,v,x,B){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja,ca){if(this.spinner.spin(document.body,mxResources.get("export")))try{var pa=this.editor.graph.isSelectionEmpty();g=null!=g?g:pa;var ra=f?null:this.editor.graph.background;ra==mxConstants.NONE&&(ra=null);null==ra&&0==f&&(ra=ia?
+this.editor.graph.defaultPageBackgroundColor:"#ffffff");var L=this.editor.graph.getSvg(ra,d,I,D,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ja,ia,ka);v&&this.editor.graph.addSvgShadow(L);var V=this.getBaseFilename()+(x?".drawio":"")+".svg";ca=null!=ca?ca:mxUtils.bind(this,function(Z){this.isLocalFileSave()||Z.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
+function(){mxUtils.popup(Z)}))});var R=mxUtils.bind(this,function(Z){this.spinner.stop();x&&Z.setAttribute("content",this.getFileData(!0,null,null,null,g,N,null,null,null,!1));ca(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))});this.editor.graph.mathEnabled&&this.editor.addMathCss(L);var Y=mxUtils.bind(this,function(Z){B?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Z,R,this.thumbImageCache)):R(Z)});ja?this.embedFonts(L,
+Y):(this.editor.addFontCss(L),Y(L))}catch(Z){this.handleError(Z)}};EditorUi.prototype.addRadiobox=function(d,f,g,v,x,B,I){return this.addCheckbox(d,g,v,x,B,I,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,v,x,B,I,D){B=null!=B?B:!0;var N=document.createElement("input");N.style.marginRight="8px";N.style.marginTop="16px";N.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();N.id=I;null!=D&&N.setAttribute("name",D);g&&(N.setAttribute("checked","checked"),N.defaultChecked=!0);
+v&&N.setAttribute("disabled","disabled");B&&(d.appendChild(N),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",I),d.appendChild(g),x||mxUtils.br(d));return N};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var v=this.getCurrentFile(),x="";null!=v&&v.getMode()!=App.MODE_DEVICE&&v.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var B=document.createElement("select");B.style.maxWidth=
+"200px";B.style.width="auto";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("makeCopy"));B.appendChild(v);v=document.createElement("option");v.setAttribute("value","custom");mxUtils.write(v,mxResources.get("custom")+"...");B.appendChild(v);d.appendChild(B);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){if("custom"==B.value){var I=new FilenameDialog(this,x,mxResources.get("ok"),
+function(D){null!=D?x=D:B.value="blank"},mxResources.get("url"),null,null,null,null,function(){B.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===B.value?"_blank":x:null},getEditInput:function(){return g},getEditSelect:function(){return B}}};EditorUi.prototype.addLinkSection=
+function(d,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=B&&B!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=B):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(D)}mxUtils.write(d,mxResources.get("links")+":");var v=document.createElement("select");v.style.width=
+"100px";v.style.padding="0px";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";var x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));v.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));v.appendChild(x);x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));v.appendChild(x);
+f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),v.appendChild(f));d.appendChild(v);mxUtils.write(d,mxResources.get("borderColor")+":");var B="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(B||"none",function(N){B=N;g()});mxEvent.consume(D)}));g();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width=
+"22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";d.appendChild(I);mxUtils.br(d);return{getColor:function(){return B},getTarget:function(){return v.value},focus:function(){v.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,v,x,B,I){I=null!=I?I:[];v&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||I.push("lightbox=1"),"auto"!=d&&I.push("target="+d),null!=f&&f!=mxConstants.NONE&&
+I.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=x&&0<x.length&&I.push("edit="+encodeURIComponent(x)),B&&I.push("layers=1"),this.editor.graph.foldingEnabled&&I.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&I.push("page-id="+this.currentPage.getId());return I};EditorUi.prototype.createLink=function(d,f,g,v,x,B,I,D,N,G){N=this.createUrlParameters(d,f,g,v,x,B,N);d=this.getCurrentFile();f=!0;null!=I?g="#U"+encodeURIComponent(I):(d=this.getCurrentFile(),
+D||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&N.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(N.push("open="+g.substring(1)),g="");return(v&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<N.length?"?"+N.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,v,x,B,I,D,N,G,ia,ka){this.getBasenames();var ja={};""!=x&&x!=mxConstants.NONE&&(ja.highlight=x);"auto"!==v&&(ja.target=v);G||(ja.lightbox=!1);ja.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(ja.zoom=g/100);g=[];I&&(g.push("pages"),ja.resize=!0,null!=this.pages&&null!=this.currentPage&&(ja.page=mxUtils.indexOf(this.pages,this.currentPage)));
+f&&(g.push("zoom"),ja.resize=!0);D&&g.push("layers");N&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ja.toolbar=g.join(" "));null!=ia&&0<ia.length&&(ja.edit=ia);null!=d?ja.url=d:ja.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(B?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ja))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";ka(f,'<script type="text/javascript" src="'+(0<d.length?
+("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,v){var x=document.createElement("div");x.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("html"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+x.appendChild(B);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");B=D.cloneNode(!0);B.setAttribute("value","copy");I.appendChild(B);var N=document.createElement("span");mxUtils.write(N,mxResources.get("includeCopyOfMyDiagram"));
I.appendChild(N);mxUtils.br(I);I.appendChild(D);N=document.createElement("span");mxUtils.write(N,mxResources.get("publicDiagramUrl"));I.appendChild(N);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(N=document.createElement("a"),N.style.paddingLeft="12px",N.style.color="gray",N.style.cursor="pointer",mxUtils.write(N,mxResources.get("share")),I.appendChild(N),mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));
-C.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");y.appendChild(I);var ia=this.addLinkSection(y),ka=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var ja=document.createElement("input");ja.setAttribute("type","text");ja.style.marginRight="16px";ja.style.width="60px";ja.style.marginLeft="4px";ja.style.marginRight="12px";ja.value="100%";y.appendChild(ja);var ca=this.addCheckbox(y,mxResources.get("fit"),!0);I=null!=this.pages&&1<this.pages.length;
-var pa=pa=this.addCheckbox(y,mxResources.get("allPages"),I,!I),ra=this.addCheckbox(y,mxResources.get("layers"),!0),L=this.addCheckbox(y,mxResources.get("tags"),!0),V=this.addCheckbox(y,mxResources.get("lightbox"),!0),R=null;I=380;if(EditorUi.enableHtmlEditOption){R=this.addEditButton(y,V);var Y=R.getEditInput();Y.style.marginBottom="16px";I+=50;mxEvent.addListener(V,"change",function(){V.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled");Y.checked&&V.checked?R.getEditSelect().removeAttribute("disabled"):
-R.getEditSelect().setAttribute("disabled","disabled")})}e=new CustomDialog(this,y,mxUtils.bind(this,function(){v(D.checked?g:null,ka.checked,ja.value,ia.getTarget(),ia.getColor(),ca.checked,pa.checked,ra.checked,L.checked,V.checked,null!=R?R.getLink():null)}),null,e,f);this.showDialog(e.container,340,I,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(e,f,g,v,y,C,I,D){var N=document.createElement("div");N.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,
-e||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";N.appendChild(G);var ia=this.getCurrentFile();e=0;if(null==ia||ia.constructor!=window.DriveFile||f)I=null!=I?I:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{e=80;I=null!=I?I:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+B.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");x.appendChild(I);var ia=this.addLinkSection(x),ka=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var ja=document.createElement("input");ja.setAttribute("type","text");ja.style.marginRight="16px";ja.style.width="60px";ja.style.marginLeft="4px";ja.style.marginRight="12px";ja.value="100%";x.appendChild(ja);var ca=this.addCheckbox(x,mxResources.get("fit"),!0);I=null!=this.pages&&1<this.pages.length;
+var pa=pa=this.addCheckbox(x,mxResources.get("allPages"),I,!I),ra=this.addCheckbox(x,mxResources.get("layers"),!0),L=this.addCheckbox(x,mxResources.get("tags"),!0),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),R=null;I=380;if(EditorUi.enableHtmlEditOption){R=this.addEditButton(x,V);var Y=R.getEditInput();Y.style.marginBottom="16px";I+=50;mxEvent.addListener(V,"change",function(){V.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled");Y.checked&&V.checked?R.getEditSelect().removeAttribute("disabled"):
+R.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,x,mxUtils.bind(this,function(){v(D.checked?g:null,ka.checked,ja.value,ia.getTarget(),ia.getColor(),ca.checked,pa.checked,ra.checked,L.checked,V.checked,null!=R?R.getLink():null)}),null,d,f);this.showDialog(d.container,340,I,!0,!0);B.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,v,x,B,I,D){var N=document.createElement("div");N.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,
+d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";N.appendChild(G);var ia=this.getCurrentFile();d=0;if(null==ia||ia.constructor!=window.DriveFile||f)I=null!=I?I:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;I=null!=I?I:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
var ka=document.createElement("div");ka.style.whiteSpace="normal";mxUtils.write(ka,mxResources.get("linkAccountRequired"));G.appendChild(ka);ka=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(ia.getId())}));ka.style.marginTop="12px";ka.className="geBtn";G.appendChild(ka);N.appendChild(G);ka=document.createElement("a");ka.style.paddingLeft="12px";ka.style.color="gray";ka.style.fontSize="11px";ka.style.cursor="pointer";mxUtils.write(ka,mxResources.get("check"));
-G.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(la){this.spinner.stop();la=new ErrorDialog(this,null,mxResources.get(null!=la?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(la.container,300,80,!0,!1);la.init()}))}))}var ja=null,ca=null;if(null!=g||null!=v)e+=30,mxUtils.write(N,mxResources.get("width")+":"),ja=
-document.createElement("input"),ja.setAttribute("type","text"),ja.style.marginRight="16px",ja.style.width="50px",ja.style.marginLeft="6px",ja.style.marginRight="16px",ja.style.marginBottom="10px",ja.value="100%",N.appendChild(ja),mxUtils.write(N,mxResources.get("height")+":"),ca=document.createElement("input"),ca.setAttribute("type","text"),ca.style.width="50px",ca.style.marginLeft="6px",ca.style.marginBottom="10px",ca.value=v+"px",N.appendChild(ca),mxUtils.br(N);var pa=this.addLinkSection(N,C);g=
-null!=this.pages&&1<this.pages.length;var ra=null;if(null==ia||ia.constructor!=window.DriveFile||f)ra=this.addCheckbox(N,mxResources.get("allPages"),g,!g);var L=this.addCheckbox(N,mxResources.get("lightbox"),!0,null,null,!C),V=this.addEditButton(N,L),R=V.getEditInput();C&&(R.style.marginLeft=L.style.marginLeft,L.style.display="none",e-=20);var Y=this.addCheckbox(N,mxResources.get("layers"),!0);Y.style.marginLeft=R.style.marginLeft;Y.style.marginTop="8px";var Z=this.addCheckbox(N,mxResources.get("tags"),
-!0);Z.style.marginLeft=R.style.marginLeft;Z.style.marginBottom="16px";Z.style.marginTop="16px";mxEvent.addListener(L,"change",function(){L.checked?(Y.removeAttribute("disabled"),R.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"));R.checked&&L.checked?V.getEditSelect().removeAttribute("disabled"):V.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,N,mxUtils.bind(this,function(){y(pa.getTarget(),pa.getColor(),null==
-ra?!0:ra.checked,L.checked,V.getLink(),Y.checked,null!=ja?ja.value:null,null!=ca?ca.value:null,Z.checked)}),null,mxResources.get("create"),I,D);this.showDialog(f.container,340,300+e,!0,!0);null!=ja?(ja.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)):pa.focus()};EditorUi.prototype.showRemoteExportDialog=function(e,f,g,v,y){var C=document.createElement("div");C.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,
-mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";C.appendChild(I);if(y){mxUtils.write(C,mxResources.get("zoom")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=this.lastExportZoom||"100%";C.appendChild(D);mxUtils.write(C,mxResources.get("borderWidth")+":");var N=document.createElement("input");N.setAttribute("type",
-"text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.value=this.lastExportBorder||"0";C.appendChild(N);mxUtils.br(C)}var G=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ia=v?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ka=v?null:this.addCheckbox(C,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=ka&&
-(ka.style.marginBottom="16px");e=new CustomDialog(this,C,mxUtils.bind(this,function(){var ja=parseInt(D.value)/100||1,ca=parseInt(N.value)||0;g(!G.checked,null!=ia?ia.checked:!1,null!=ka?ka.checked:!1,ja,ca)}),null,e,f);this.showDialog(e.container,300,(y?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(e,f,g,v,y,C,I,D,N){I=null!=I?I:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var ia=this.editor.graph,ka="jpeg"==D?220:300,ja=document.createElement("h3");
-mxUtils.write(ja,e);ja.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ja);mxUtils.write(G,mxResources.get("zoom")+":");var ca=document.createElement("input");ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value=this.lastExportZoom||"100%";G.appendChild(ca);mxUtils.write(G,mxResources.get("borderWidth")+":");var pa=document.createElement("input");pa.setAttribute("type",
+G.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(la){this.spinner.stop();la=new ErrorDialog(this,null,mxResources.get(null!=la?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(la.container,300,80,!0,!1);la.init()}))}))}var ja=null,ca=null;if(null!=g||null!=v)d+=30,mxUtils.write(N,mxResources.get("width")+":"),ja=
+document.createElement("input"),ja.setAttribute("type","text"),ja.style.marginRight="16px",ja.style.width="50px",ja.style.marginLeft="6px",ja.style.marginRight="16px",ja.style.marginBottom="10px",ja.value="100%",N.appendChild(ja),mxUtils.write(N,mxResources.get("height")+":"),ca=document.createElement("input"),ca.setAttribute("type","text"),ca.style.width="50px",ca.style.marginLeft="6px",ca.style.marginBottom="10px",ca.value=v+"px",N.appendChild(ca),mxUtils.br(N);var pa=this.addLinkSection(N,B);g=
+null!=this.pages&&1<this.pages.length;var ra=null;if(null==ia||ia.constructor!=window.DriveFile||f)ra=this.addCheckbox(N,mxResources.get("allPages"),g,!g);var L=this.addCheckbox(N,mxResources.get("lightbox"),!0,null,null,!B),V=this.addEditButton(N,L),R=V.getEditInput();B&&(R.style.marginLeft=L.style.marginLeft,L.style.display="none",d-=20);var Y=this.addCheckbox(N,mxResources.get("layers"),!0);Y.style.marginLeft=R.style.marginLeft;Y.style.marginTop="8px";var Z=this.addCheckbox(N,mxResources.get("tags"),
+!0);Z.style.marginLeft=R.style.marginLeft;Z.style.marginBottom="16px";Z.style.marginTop="16px";mxEvent.addListener(L,"change",function(){L.checked?(Y.removeAttribute("disabled"),R.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"));R.checked&&L.checked?V.getEditSelect().removeAttribute("disabled"):V.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,N,mxUtils.bind(this,function(){x(pa.getTarget(),pa.getColor(),null==
+ra?!0:ra.checked,L.checked,V.getLink(),Y.checked,null!=ja?ja.value:null,null!=ca?ca.value:null,Z.checked)}),null,mxResources.get("create"),I,D);this.showDialog(f.container,340,300+d,!0,!0);null!=ja?(ja.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)):pa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,v,x){var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,
+mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(x?"10":"4")+"px";B.appendChild(I);if(x){mxUtils.write(B,mxResources.get("zoom")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=this.lastExportZoom||"100%";B.appendChild(D);mxUtils.write(B,mxResources.get("borderWidth")+":");var N=document.createElement("input");N.setAttribute("type",
+"text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.value=this.lastExportBorder||"0";B.appendChild(N);mxUtils.br(B)}var G=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ia=v?null:this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ka=v?null:this.addCheckbox(B,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=ka&&
+(ka.style.marginBottom="16px");d=new CustomDialog(this,B,mxUtils.bind(this,function(){var ja=parseInt(D.value)/100||1,ca=parseInt(N.value)||0;g(!G.checked,null!=ia?ia.checked:!1,null!=ka?ka.checked:!1,ja,ca)}),null,d,f);this.showDialog(d.container,300,(x?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,v,x,B,I,D,N){I=null!=I?I:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var ia=this.editor.graph,ka="jpeg"==D?220:300,ja=document.createElement("h3");
+mxUtils.write(ja,d);ja.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ja);mxUtils.write(G,mxResources.get("zoom")+":");var ca=document.createElement("input");ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value=this.lastExportZoom||"100%";G.appendChild(ca);mxUtils.write(G,mxResources.get("borderWidth")+":");var pa=document.createElement("input");pa.setAttribute("type",
"text");pa.style.marginRight="16px";pa.style.width="60px";pa.style.marginLeft="4px";pa.value=this.lastExportBorder||"0";G.appendChild(pa);mxUtils.br(G);var ra=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,ia.isSelectionEmpty()),L=document.createElement("input");L.style.marginTop="16px";L.style.marginRight="8px";L.style.marginLeft="24px";L.setAttribute("disabled","disabled");L.setAttribute("type","checkbox");var V=document.createElement("select");V.style.marginTop="16px";V.style.marginLeft=
-"8px";e=["selectionOnly","diagram","page"];var R={};for(ja=0;ja<e.length;ja++)if(!ia.isSelectionEmpty()||"selectionOnly"!=e[ja]){var Y=document.createElement("option");mxUtils.write(Y,mxResources.get(e[ja]));Y.setAttribute("value",e[ja]);V.appendChild(Y);R[e[ja]]=Y}N?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(V),mxUtils.br(G),ka+=26,mxEvent.addListener(V,"change",function(){"selectionOnly"==V.value&&(ra.checked=!0)})):C&&(G.appendChild(L),mxUtils.write(G,mxResources.get("crop")),
+"8px";d=["selectionOnly","diagram","page"];var R={};for(ja=0;ja<d.length;ja++)if(!ia.isSelectionEmpty()||"selectionOnly"!=d[ja]){var Y=document.createElement("option");mxUtils.write(Y,mxResources.get(d[ja]));Y.setAttribute("value",d[ja]);V.appendChild(Y);R[d[ja]]=Y}N?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(V),mxUtils.br(G),ka+=26,mxEvent.addListener(V,"change",function(){"selectionOnly"==V.value&&(ra.checked=!0)})):B&&(G.appendChild(L),mxUtils.write(G,mxResources.get("crop")),
mxUtils.br(G),ka+=30,mxEvent.addListener(ra,"change",function(){ra.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")}));ia.isSelectionEmpty()?N&&(ra.style.display="none",ra.nextSibling.style.display="none",ra.nextSibling.nextSibling.style.display="none",ka-=30):(V.value="diagram",L.setAttribute("checked","checked"),L.defaultChecked=!0,mxEvent.addListener(ra,"change",function(){V.value=ra.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(G,mxResources.get("transparentBackground"),
!1,null,null,"jpeg"!=D),la=null;Editor.isDarkMode()&&(la=this.addCheckbox(G,mxResources.get("dark"),!0),ka+=26);var q=this.addCheckbox(G,mxResources.get("shadow"),ia.shadowVisible),F=null;if("png"==D||"jpeg"==D)F=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ka+=30;var T=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),I,null,null,"jpeg"!=D);T.style.marginBottom="16px";var aa=document.createElement("input");aa.style.marginBottom="16px";aa.style.marginRight=
-"8px";aa.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||aa.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";U.className="geBtn";C=document.createElement("option");C.setAttribute("value","none");mxUtils.write(C,mxResources.get("noChange"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","embedFonts");mxUtils.write(C,
-mxResources.get("embedFonts"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","lblToSvg");mxUtils.write(C,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(C);mxEvent.addListener(U,"change",mxUtils.bind(this,function(){"lblToSvg"==U.value?(aa.checked=!0,aa.setAttribute("disabled","disabled"),R.page.style.display="none","page"==V.value&&(V.value="diagram"),q.checked=!1,q.setAttribute("disabled","disabled"),fa.style.display="inline-block",
+"8px";aa.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||aa.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";U.className="geBtn";B=document.createElement("option");B.setAttribute("value","none");mxUtils.write(B,mxResources.get("noChange"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","embedFonts");mxUtils.write(B,
+mxResources.get("embedFonts"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","lblToSvg");mxUtils.write(B,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(B);mxEvent.addListener(U,"change",mxUtils.bind(this,function(){"lblToSvg"==U.value?(aa.checked=!0,aa.setAttribute("disabled","disabled"),R.page.style.display="none","page"==V.value&&(V.value="diagram"),q.checked=!1,q.setAttribute("disabled","disabled"),fa.style.display="inline-block",
da.style.display="none"):"disabled"==aa.getAttribute("disabled")&&(aa.checked=!1,aa.removeAttribute("disabled"),q.removeAttribute("disabled"),R.page.style.display="",fa.style.display="none",da.style.display="")}));f&&(G.appendChild(aa),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(U),mxUtils.br(G),ka+=60);var da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginRight=
"10px";da.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));da.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));da.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));da.appendChild(f);var fa=document.createElement("div");mxUtils.write(fa,mxResources.get("LinksLost"));
-fa.style.margin="7px";fa.style.display="none";"svg"==D&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(da),G.appendChild(fa),mxUtils.br(G),mxUtils.br(G),ka+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=ca.value;y(ca.value,Z.checked,!ra.checked,q.checked,T.checked,aa.checked,pa.value,L.checked,!1,da.value,null!=F?F.checked:null,null!=la?la.checked:null,V.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,g,v);this.showDialog(g.container,
-340,ka,!0,!0,null,null,null,null,!0);ca.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(e,f,g,v,y){var C=document.createElement("div");C.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(D)}var N=this.addCheckbox(C,mxResources.get("fit"),
-!0),G=this.addCheckbox(C,mxResources.get("shadow"),I.shadowVisible&&v,!v),ia=this.addCheckbox(C,g),ka=this.addCheckbox(C,mxResources.get("lightbox"),!0),ja=this.addEditButton(C,ka),ca=ja.getEditInput(),pa=1<I.model.getChildCount(I.model.getRoot()),ra=this.addCheckbox(C,mxResources.get("layers"),pa,!pa);ra.style.marginLeft=ca.style.marginLeft;ra.style.marginBottom="12px";ra.style.marginTop="8px";mxEvent.addListener(ka,"change",function(){ka.checked?(pa&&ra.removeAttribute("disabled"),ca.removeAttribute("disabled")):
-(ra.setAttribute("disabled","disabled"),ca.setAttribute("disabled","disabled"));ca.checked&&ka.checked?ja.getEditSelect().removeAttribute("disabled"):ja.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){e(N.checked,G.checked,ia.checked,ka.checked,ja.getLink(),ra.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(e,f,g,v,y,C,I,D){function N(ca){var pa=" ",ra=
-"";v&&(pa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=ia?"&page="+ia:"")+(y?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");e&&(ra+="max-width:100%;");var L=
+fa.style.margin="7px";fa.style.display="none";"svg"==D&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(da),G.appendChild(fa),mxUtils.br(G),mxUtils.br(G),ka+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=ca.value;x(ca.value,Z.checked,!ra.checked,q.checked,T.checked,aa.checked,pa.value,L.checked,!1,da.value,null!=F?F.checked:null,null!=la?la.checked:null,V.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,g,v);this.showDialog(g.container,
+340,ka,!0,!0,null,null,null,null,!0);ca.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,v,x){var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";B.appendChild(D)}var N=this.addCheckbox(B,mxResources.get("fit"),
+!0),G=this.addCheckbox(B,mxResources.get("shadow"),I.shadowVisible&&v,!v),ia=this.addCheckbox(B,g),ka=this.addCheckbox(B,mxResources.get("lightbox"),!0),ja=this.addEditButton(B,ka),ca=ja.getEditInput(),pa=1<I.model.getChildCount(I.model.getRoot()),ra=this.addCheckbox(B,mxResources.get("layers"),pa,!pa);ra.style.marginLeft=ca.style.marginLeft;ra.style.marginBottom="12px";ra.style.marginTop="8px";mxEvent.addListener(ka,"change",function(){ka.checked?(pa&&ra.removeAttribute("disabled"),ca.removeAttribute("disabled")):
+(ra.setAttribute("disabled","disabled"),ca.setAttribute("disabled","disabled"));ca.checked&&ka.checked?ja.getEditSelect().removeAttribute("disabled"):ja.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,B,mxUtils.bind(this,function(){d(N.checked,G.checked,ia.checked,ka.checked,ja.getLink(),ra.checked)}),null,mxResources.get("embed"),x);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,v,x,B,I,D){function N(ca){var pa=" ",ra=
+"";v&&(pa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=ia?"&page="+ia:"")+(x?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");d&&(ra+="max-width:100%;");var L=
"";g&&(L=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');I('<img src="'+ca+'"'+L+(""!=ra?' style="'+ra+'"':"")+pa+"/>")}var G=this.editor.graph.getGraphBounds(),ia=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ca){var pa=v?this.getFileData(!0):null;ca=this.createImageDataUri(ca,pa,"png");N(ca)}),null,null,null,mxUtils.bind(this,function(ca){D({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,
null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ka="";g&&(ka="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ja=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(v?"1":"0")+ka+"&xml="+encodeURIComponent(f));ja.send(mxUtils.bind(this,function(){200<=ja.getStatus()&&299>=ja.getStatus()?N("data:image/png;base64,"+ja.getText()):D({message:mxResources.get("unknownError")})}))}else D({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(e,f,g,v,y,C,I){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),N=D.getElementsByTagName("a");if(null!=N)for(var G=0;G<N.length;G++){var ia=N[G].getAttribute("href");null!=ia&&"#"==ia.charAt(0)&&"_blank"==N[G].getAttribute("target")&&N[G].removeAttribute("target")}v&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var ka=" ",ja="";v&&(ka="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"+(y?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ja+="cursor:pointer;");e&&(ja+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(ca){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ca))+'"'+(""!=ja?' style="'+ja+'"':"")+ka+"/>")}))}else ja="",v&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ja+="cursor:pointer;"),e&&(e=parseInt(D.getAttribute("width")),y=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+e+" "+y),ja+="max-width:100%;max-height:"+y+"px;",D.removeAttribute("height")),""!=ja&&D.setAttribute("style",ja),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),I(mxUtils.getXml(D))};EditorUi.prototype.timeSince=
-function(e){e=Math.floor((new Date-e)/1E3);var f=Math.floor(e/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(e/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(e/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(e/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(e/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(e,f){if(null!=e){var g=null;if("diagram"==
-e.nodeName)g=e;else if("mxfile"==e.nodeName){var v=e.getElementsByTagName("diagram");if(0<v.length){g=v[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:y.apply(this,arguments)}}}null!=g&&(e=Editor.parseDiagramNode(g))}v=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(e)}catch(C){}finally{this.editor.graph=v}return e};EditorUi.prototype.getPngFileProperties=function(e){var f=
-1,g=0;if(null!=e){if(e.hasAttribute("scale")){var v=parseFloat(e.getAttribute("scale"));!isNaN(v)&&0<v&&(f=v)}e.hasAttribute("border")&&(v=parseInt(e.getAttribute("border")),!isNaN(v)&&0<v&&(g=v))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(e,f,g,v,y){try{var C=this.editor.graph,I=null!=C.themes&&"darkTheme"==C.defaultThemeName,D=null;if(null!=g&&0<g.length)C=this.createTemporaryGraph(I?C.getDefaultStylesheet():C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),C),D=g;else if(I||null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(I?C.getDefaultStylesheet():C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&C.setBackgroundImage(G.viewState.backgroundImage);C.getGlobalVariable=function(ia){return"page"==ia?G.getName():"pagenumber"==ia?1:N.apply(this,
-arguments)};document.body.appendChild(C.container);C.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ia){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ka=ia.toDataURL("image/png");ka=Editor.writeGraphModelToPng(ka,"tEXt","mxfile",encodeURIComponent(D));e(ka.substring(ka.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(ja){null!=f&&f(ja)}}),null,null,null,mxUtils.bind(this,function(ia){null!=
-f&&f(ia)}),null,null,v,null,C.shadowVisible,null,C,y,null,null,null,"diagram",null)}catch(ia){null!=f&&f(ia)}};EditorUi.prototype.getEmbeddedSvg=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){D=null!=D?D:!0;ia=null!=ia?ia:0;I=null!=N?N:f.background;I==mxConstants.NONE&&(I=null);C=f.getSvg(I,G,ia,null,null,C,null,null,null,f.shadowVisible||ka,null,ja,"diagram");(f.shadowVisible||ka)&&f.addSvgShadow(C,null,null,0==ia);null!=e&&C.setAttribute("content",e);null!=g&&C.setAttribute("resource",g);var ca=mxUtils.bind(this,
-function(pa){pa=(v?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(pa);null!=y&&y(pa);return pa});f.mathEnabled&&this.editor.addMathCss(C);if(null!=y)this.embedFonts(C,mxUtils.bind(this,function(pa){D?this.editor.convertImages(pa,mxUtils.bind(this,function(ra){ca(ra)})):ca(pa)}));else return ca(C)};EditorUi.prototype.embedFonts=function(e,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(e,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(e,g),f(e)}catch(v){f(e)}}))}catch(g){f(e)}}))};EditorUi.prototype.exportImage=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){N=null!=N?N:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ca=this.editor.graph.isSelectionEmpty();g=null!=g?g:ca;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(pa){this.spinner.stop();
-try{this.saveCanvas(pa,y?this.getFileData(!0,null,null,null,g,D):null,N,null==this.pages||0==this.pages.length,ia)}catch(ra){this.handleError(ra)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(pa){this.spinner.stop();this.handleError(pa)}),null,g,e||1,f,v,null,null,C,I,G,ka,ja)}catch(pa){this.spinner.stop(),this.handleError(pa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(e){return this.editor.isCorsEnabledForUrl(e)};EditorUi.prototype.importXml=function(e,f,g,v,y,C,I){f=null!=
-f?f:0;g=null!=g?g:0;var D=[];try{var N=this.editor.graph;if(null!=e&&0<e.length){N.model.beginUpdate();try{var G=mxUtils.parseXml(e);e={};var ia=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=ia&&"mxfile"==ia.nodeName&&null!=this.pages){var ka=ia.getElementsByTagName("diagram");if(1==ka.length&&!C){if(ia=Editor.parseDiagramNode(ka[0]),null!=this.currentPage&&(e[ka[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ja=ka[0].getAttribute("name");null!=
-ja&&""!=ja&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ja))}}else if(0<ka.length){C=[];var ca=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(e[ka[0].getAttribute("id")]=this.pages[0].getId(),ia=Editor.parseDiagramNode(ka[0]),v=!1,ca=1);for(;ca<ka.length;ca++){var pa=ka[ca].getAttribute("id");ka[ca].removeAttribute("id");var ra=this.updatePageRoot(new DiagramPage(ka[ca]));e[pa]=ka[ca].getAttribute("id");var L=this.pages.length;null==ra.getName()&&ra.setName(mxResources.get("pageWithNumber",
-[L+1]));N.model.execute(new ChangePage(this,ra,ra,L,!0));C.push(ra)}this.updatePageLinks(e,C)}}if(null!=ia&&"mxGraphModel"===ia.nodeName){D=N.importGraphModel(ia,f,g,v);if(null!=D)for(ca=0;ca<D.length;ca++)this.updatePageLinksForCell(e,D[ca]);var V=N.parseBackgroundImage(ia.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(e,V);var R=new ChangePageSetup(this,null,V);R.ignoreColor=!0;N.model.execute(R)}}I&&this.insertHandler(D,null,null,N.defaultVertexStyle,
-N.defaultEdgeStyle,!1,!0)}finally{N.model.endUpdate()}}}catch(Y){if(y)throw Y;this.handleError(Y)}return D};EditorUi.prototype.updatePageLinks=function(e,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(e,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(e,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(e,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=e[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc=
-"data:page/id,"+g)}}catch(v){}};EditorUi.prototype.updatePageLinksForCell=function(e,f){var g=document.createElement("div"),v=this.editor.graph,y=v.getLinkForCell(f);null!=y&&v.setLinkForCell(f,this.updatePageLink(e,y));if(v.isHtmlLabel(f)){g.innerHTML=v.sanitizeHtml(v.getLabel(f));for(var C=g.getElementsByTagName("a"),I=!1,D=0;D<C.length;D++)y=C[D].getAttribute("href"),null!=y&&(C[D].setAttribute("href",this.updatePageLink(e,y)),I=!0);I&&v.labelChanged(f,g.innerHTML)}for(D=0;D<v.model.getChildCount(f);D++)this.updatePageLinksForCell(e,
-v.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=function(e,f){if(Graph.isPageLink(f)){var g=e[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var v=JSON.parse(f.substring(17));if(null!=v.actions){for(var y=0;y<v.actions.length;y++){var C=v.actions[y];if(null!=C.open&&Graph.isPageLink(C.open)){var I=C.open.substring(C.open.indexOf(",")+1);g=e[I];null!=g?C.open="data:page/id,"+g:null==this.getPageById(I)&&delete C.open}}f=
-"data:action/json,"+JSON.stringify(v)}}catch(D){}return f};EditorUi.prototype.isRemoteVisioFormat=function(e){return/(\.v(sd|dx))($|\?)/i.test(e)||/(\.vs(s|x))($|\?)/i.test(e)};EditorUi.prototype.importVisio=function(e,f,g,v,y){v=null!=v?v:e.name;g=null!=g?g:mxUtils.bind(this,function(I){this.handleError(I)});var C=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(v);try{var D="UNKNOWN-VISIO",N=v.lastIndexOf(".");if(0<=N&&N<v.length)D=v.substring(N+
-1).toUpperCase();else{var G=v.lastIndexOf("/");0<=G&&G<v.length&&(v=v.substring(G+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+v,label:I?"remote":"local"})}catch(ka){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",e,v);var ia=new XMLHttpRequest;ia.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":
-""));ia.responseType="blob";this.addRemoteServiceSecurityCheck(ia);null!=y&&ia.setRequestHeader("x-convert-custom",y);ia.onreadystatechange=mxUtils.bind(this,function(){if(4==ia.readyState)if(200<=ia.status&&299>=ia.status)try{var ka=ia.response;if("text/xml"==ka.type){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(ca){try{f(ca.target.result)}catch(pa){g({message:mxResources.get("errorLoadingFile")})}});ja.readAsText(ka)}else this.doImportVisio(ka,f,g,v)}catch(ca){g(ca)}else try{""==ia.responseType||
-"text"==ia.responseType?g({message:ia.responseText}):(ja=new FileReader,ja.onload=function(){g({message:JSON.parse(ja.result).Message})},ja.readAsText(ia.response))}catch(ca){g({})}});ia.send(I)}else try{this.doImportVisio(e,f,g,v)}catch(ka){g(ka)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",C))};EditorUi.prototype.importGraphML=
-function(e,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(e,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?v():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",v))};EditorUi.prototype.exportVisio=function(e){var f=mxUtils.bind(this,
-function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(e)||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(e,
-f,g){var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y=JSON.parse(e);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+e.length}),null!=window.console&&"1"==urlParams.test){var C=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&C.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var I=0;I<y.svgThumbs.length;I++)C.push(Editor.createSvgDataUri(y.svgThumbs[I]));null!=
-y.thumb&&C.push(y.thumb);console.log.apply(console,C)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(v,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",v)})})})}):mxscript("js/extensions.min.js",v))};EditorUi.prototype.generateMermaidImage=function(e,f,g,v){var y=this,C=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),e,function(I){try{if(mxClient.IS_IE||mxClient.IS_IE11)I=
-I.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(I).getElementsByTagName("svg");if(0<D.length){var N=parseFloat(D[0].getAttribute("width")),G=parseFloat(D[0].getAttribute("height"));if(isNaN(N)||isNaN(G))try{var ia=D[0].getAttribute("viewBox").split(/\s+/);N=parseFloat(ia[2]);G=parseFloat(ia[3])}catch(ka){N=N||100,G=G||100}g(y.convertDataUri(Editor.createSvgDataUri(I)),N,G)}else v({message:mxResources.get("invalidInput")})}catch(ka){v(ka)}})}catch(I){v(I)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?C():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",C):mxscript("js/extensions.min.js",C))};EditorUi.prototype.generatePlantUmlImage=function(e,f,g,v){function y(D,N,G){c1=D>>2;c2=(D&3)<<4|N>>4;c3=(N&15)<<2|G>>6;c4=G&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+
-D);D-=26;return 0==D?"-":1==D?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(D){r="";for(i=0;i<D.length;i+=3)r=i+2==D.length?r+y(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+y(D.charCodeAt(i),0,0):r+y(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(e))),!0);"txt"!=f&&(I.responseType="blob");I.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==
+EditorUi.prototype.createEmbedSvg=function(d,f,g,v,x,B,I){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),N=D.getElementsByTagName("a");if(null!=N)for(var G=0;G<N.length;G++){var ia=N[G].getAttribute("href");null!=ia&&"#"==ia.charAt(0)&&"_blank"==N[G].getAttribute("target")&&N[G].removeAttribute("target")}v&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var ka=" ",ja="";v&&(ka="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"+(x?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",ja+="cursor:pointer;");d&&(ja+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(ca){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ca))+'"'+(""!=ja?' style="'+ja+'"':"")+ka+"/>")}))}else ja="",v&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(x?"&edit=_blank":"")+(B?"&layers=1":"")+"');}}})(this);"),ja+="cursor:pointer;"),d&&(d=parseInt(D.getAttribute("width")),x=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+d+" "+x),ja+="max-width:100%;max-height:"+x+"px;",D.removeAttribute("height")),""!=ja&&D.setAttribute("style",ja),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),I(mxUtils.getXml(D))};EditorUi.prototype.timeSince=
+function(d){d=Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==
+d.nodeName)g=d;else if("mxfile"==d.nodeName){var v=d.getElementsByTagName("diagram");if(0<v.length){g=v[0];var x=f.getGlobalVariable;f.getGlobalVariable=function(B){return"page"==B?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==B?1:x.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}v=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(B){}finally{this.editor.graph=v}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
+1,g=0;if(null!=d){if(d.hasAttribute("scale")){var v=parseFloat(d.getAttribute("scale"));!isNaN(v)&&0<v&&(f=v)}d.hasAttribute("border")&&(v=parseInt(d.getAttribute("border")),!isNaN(v)&&0<v&&(g=v))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,v,x){try{var B=this.editor.graph,I=null!=B.themes&&"darkTheme"==B.defaultThemeName,D=null;if(null!=g&&0<g.length)B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet()),document.body.appendChild(B.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),B),D=g;else if(I||null!=this.pages&&this.currentPage!=this.pages[0]){B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet());var N=B.getGlobalVariable;B.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?B.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&B.setBackgroundImage(G.viewState.backgroundImage);B.getGlobalVariable=function(ia){return"page"==ia?G.getName():"pagenumber"==ia?1:N.apply(this,
+arguments)};document.body.appendChild(B.container);B.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ia){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ka=ia.toDataURL("image/png");ka=Editor.writeGraphModelToPng(ka,"tEXt","mxfile",encodeURIComponent(D));d(ka.substring(ka.lastIndexOf(",")+1));B!=this.editor.graph&&B.container.parentNode.removeChild(B.container)}catch(ja){null!=f&&f(ja)}}),null,null,null,mxUtils.bind(this,function(ia){null!=
+f&&f(ia)}),null,null,v,null,B.shadowVisible,null,B,x,null,null,null,"diagram",null)}catch(ia){null!=f&&f(ia)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja){D=null!=D?D:!0;ia=null!=ia?ia:0;I=null!=N?N:f.background;I==mxConstants.NONE&&(I=null);B=f.getSvg(I,G,ia,null,null,B,null,null,null,f.shadowVisible||ka,null,ja,"diagram");(f.shadowVisible||ka)&&f.addSvgShadow(B,null,null,0==ia);null!=d&&B.setAttribute("content",d);null!=g&&B.setAttribute("resource",g);var ca=mxUtils.bind(this,
+function(pa){pa=(v?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(pa);null!=x&&x(pa);return pa});f.mathEnabled&&this.editor.addMathCss(B);if(null!=x)this.embedFonts(B,mxUtils.bind(this,function(pa){D?this.editor.convertImages(pa,mxUtils.bind(this,function(ra){ca(ra)})):ca(pa)}));else return ca(B)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(v){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja){N=null!=N?N:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ca=this.editor.graph.isSelectionEmpty();g=null!=g?g:ca;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(pa){this.spinner.stop();
+try{this.saveCanvas(pa,x?this.getFileData(!0,null,null,null,g,D):null,N,null==this.pages||0==this.pages.length,ia)}catch(ra){this.handleError(ra)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(pa){this.spinner.stop();this.handleError(pa)}),null,g,d||1,f,v,null,null,B,I,G,ka,ja)}catch(pa){this.spinner.stop(),this.handleError(pa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,v,x,B,I){f=null!=
+f?f:0;g=null!=g?g:0;var D=[];try{var N=this.editor.graph;if(null!=d&&0<d.length){N.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var ia=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=ia&&"mxfile"==ia.nodeName&&null!=this.pages){var ka=ia.getElementsByTagName("diagram");if(1==ka.length&&!B){if(ia=Editor.parseDiagramNode(ka[0]),null!=this.currentPage&&(d[ka[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ja=ka[0].getAttribute("name");null!=
+ja&&""!=ja&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ja))}}else if(0<ka.length){B=[];var ca=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[ka[0].getAttribute("id")]=this.pages[0].getId(),ia=Editor.parseDiagramNode(ka[0]),v=!1,ca=1);for(;ca<ka.length;ca++){var pa=ka[ca].getAttribute("id");ka[ca].removeAttribute("id");var ra=this.updatePageRoot(new DiagramPage(ka[ca]));d[pa]=ka[ca].getAttribute("id");var L=this.pages.length;null==ra.getName()&&ra.setName(mxResources.get("pageWithNumber",
+[L+1]));N.model.execute(new ChangePage(this,ra,ra,L,!0));B.push(ra)}this.updatePageLinks(d,B)}}if(null!=ia&&"mxGraphModel"===ia.nodeName){D=N.importGraphModel(ia,f,g,v);if(null!=D)for(ca=0;ca<D.length;ca++)this.updatePageLinksForCell(d,D[ca]);var V=N.parseBackgroundImage(ia.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(d,V);var R=new ChangePageSetup(this,null,V);R.ignoreColor=!0;N.model.execute(R)}}I&&this.insertHandler(D,null,null,N.defaultVertexStyle,
+N.defaultEdgeStyle,!1,!0)}finally{N.model.endUpdate()}}}catch(Y){if(x)throw Y;this.handleError(Y)}return D};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc=
+"data:page/id,"+g)}}catch(v){}};EditorUi.prototype.updatePageLinksForCell=function(d,f){var g=document.createElement("div"),v=this.editor.graph,x=v.getLinkForCell(f);null!=x&&v.setLinkForCell(f,this.updatePageLink(d,x));if(v.isHtmlLabel(f)){g.innerHTML=v.sanitizeHtml(v.getLabel(f));for(var B=g.getElementsByTagName("a"),I=!1,D=0;D<B.length;D++)x=B[D].getAttribute("href"),null!=x&&(B[D].setAttribute("href",this.updatePageLink(d,x)),I=!0);I&&v.labelChanged(f,g.innerHTML)}for(D=0;D<v.model.getChildCount(f);D++)this.updatePageLinksForCell(d,
+v.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var v=JSON.parse(f.substring(17));if(null!=v.actions){for(var x=0;x<v.actions.length;x++){var B=v.actions[x];if(null!=B.open&&Graph.isPageLink(B.open)){var I=B.open.substring(B.open.indexOf(",")+1);g=d[I];null!=g?B.open="data:page/id,"+g:null==this.getPageById(I)&&delete B.open}}f=
+"data:action/json,"+JSON.stringify(v)}}catch(D){}return f};EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,v,x){v=null!=v?v:d.name;g=null!=g?g:mxUtils.bind(this,function(I){this.handleError(I)});var B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(v);try{var D="UNKNOWN-VISIO",N=v.lastIndexOf(".");if(0<=N&&N<v.length)D=v.substring(N+
+1).toUpperCase();else{var G=v.lastIndexOf("/");0<=G&&G<v.length&&(v=v.substring(G+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+v,label:I?"remote":"local"})}catch(ka){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",d,v);var ia=new XMLHttpRequest;ia.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":
+""));ia.responseType="blob";this.addRemoteServiceSecurityCheck(ia);null!=x&&ia.setRequestHeader("x-convert-custom",x);ia.onreadystatechange=mxUtils.bind(this,function(){if(4==ia.readyState)if(200<=ia.status&&299>=ia.status)try{var ka=ia.response;if("text/xml"==ka.type){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(ca){try{f(ca.target.result)}catch(pa){g({message:mxResources.get("errorLoadingFile")})}});ja.readAsText(ka)}else this.doImportVisio(ka,f,g,v)}catch(ca){g(ca)}else try{""==ia.responseType||
+"text"==ia.responseType?g({message:ia.responseText}):(ja=new FileReader,ja.onload=function(){g({message:JSON.parse(ja.result).Message})},ja.readAsText(ia.response))}catch(ca){g({})}});ia.send(I)}else try{this.doImportVisio(d,f,g,v)}catch(ka){g(ka)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",B))};EditorUi.prototype.importGraphML=
+function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(x){this.handleError(x)});var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(x){g(x)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?v():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",v))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,
+f,g){var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var x=JSON.parse(d);f(LucidImporter.importState(x));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var B=[(new Date).toISOString(),"convertLucidChart",x];null!=x.state&&B.push(JSON.parse(x.state));if(null!=x.svgThumbs)for(var I=0;I<x.svgThumbs.length;I++)B.push(Editor.createSvgDataUri(x.svgThumbs[I]));null!=
+x.thumb&&B.push(x.thumb);console.log.apply(console,B)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(v,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",v)})})})}):mxscript("js/extensions.min.js",v))};EditorUi.prototype.generateMermaidImage=function(d,f,g,v){var x=this,B=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(I){try{if(mxClient.IS_IE||mxClient.IS_IE11)I=
+I.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(I).getElementsByTagName("svg");if(0<D.length){var N=parseFloat(D[0].getAttribute("width")),G=parseFloat(D[0].getAttribute("height"));if(isNaN(N)||isNaN(G))try{var ia=D[0].getAttribute("viewBox").split(/\s+/);N=parseFloat(ia[2]);G=parseFloat(ia[3])}catch(ka){N=N||100,G=G||100}g(x.convertDataUri(Editor.createSvgDataUri(I)),N,G)}else v({message:mxResources.get("invalidInput")})}catch(ka){v(ka)}})}catch(I){v(I)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?B():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",B):mxscript("js/extensions.min.js",B))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,v){function x(D,N,G){c1=D>>2;c2=(D&3)<<4|N>>4;c3=(N&15)<<2|G>>6;c4=G&63;r="";r+=B(c1&63);r+=B(c2&63);r+=B(c3&63);return r+=B(c4&63)}function B(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+
+D);D-=26;return 0==D?"-":1==D?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(D){r="";for(i=0;i<D.length;i+=3)r=i+2==D.length?r+x(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+x(D.charCodeAt(i),0,0):r+x(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(I.responseType="blob");I.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==
f)g(this.response);else{var N=new FileReader;N.readAsDataURL(this.response);N.onloadend=function(G){var ia=new Image;ia.onload=function(){try{var ka=ia.width,ja=ia.height;if(0==ka&&0==ja){var ca=N.result,pa=ca.indexOf(","),ra=decodeURIComponent(escape(atob(ca.substring(pa+1)))),L=mxUtils.parseXml(ra).getElementsByTagName("svg");0<L.length&&(ka=parseFloat(L[0].getAttribute("width")),ja=parseFloat(L[0].getAttribute("height")))}g(N.result,ka,ja)}catch(V){v(V)}};ia.src=N.result};N.onerror=function(G){v(G)}}else v(D)};
-I.onerror=function(D){v(D)};I.send()};EditorUi.prototype.insertAsPreText=function(e,f,g){var v=this.editor.graph,y=null;v.getModel().beginUpdate();try{y=v.insertVertex(null,null,"<pre>"+e+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),v.updateCellSize(y,!0)}finally{v.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(e,f,g,v,y,C,I,D){C=null!=C?C:!0;I=null!=I?I:!0;if(null!=e)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e))this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(e.replace(/\s+/g," "),mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ja.responseText,f,g,!0))}));else if("data:"==e.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e))){var N=this.editor.graph;if("data:application/pdf;base64,"==e.substring(0,28)){var G=Editor.extractGraphModelFromPdf(e);if(null!=
-G&&0<G.length)return this.importXml(G,f,g,C,!0,D)}if(Editor.isPngDataUrl(e)&&(G=Editor.extractGraphModelFromPng(e),null!=G&&0<G.length))return this.importXml(G,f,g,C,!0,D);if("data:image/svg+xml;"==e.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==e.substring(0,26)?(G=e.substring(e.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(e.substring(e.indexOf(",")+1));var ia=this.importXml(G,f,g,C,!0,D);if(0<ia.length)return ia}catch(ja){}this.loadImage(e,
-mxUtils.bind(this,function(ja){if("data:"==e.substring(0,5))this.resizeImage(ja,e,mxUtils.bind(this,function(ra,L,V){N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),L,V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ra)+";"))}),I,this.maxImageSize);else{var ca=Math.min(1,Math.min(this.maxImageSize/ja.width,this.maxImageSize/ja.height)),pa=Math.round(ja.width*ca);ja=Math.round(ja.height*
-ca);N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),pa,ja,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+e+";"))}}),mxUtils.bind(this,function(){var ja=null;N.getModel().beginUpdate();try{ja=N.insertVertex(N.getDefaultParent(),null,e,N.snap(f),N.snap(g),1,1,"text;"+(v?"html=1;":"")),N.updateCellSize(ja),N.fireEvent(new mxEventObject("textInserted","cells",[ja]))}finally{N.getModel().endUpdate()}N.setSelectionCell(ja)}))}else{e=
-Graph.zapGremlins(mxUtils.trim(e));if(this.isCompatibleString(e))return this.importXml(e,f,g,C,null,D);if(0<e.length)if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(ja){this.editor.graph.setSelectionCells(this.importXml(ja,f,g,C,null,D))}),mxUtils.bind(this,function(ja){this.handleError(ja)}));else{N=this.editor.graph;y=null;N.getModel().beginUpdate();try{y=N.insertVertex(N.getDefaultParent(),null,"",N.snap(f),N.snap(g),1,1,"text;whiteSpace=wrap;"+(v?"html=1;":""));
-N.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==e.charAt(0)&&e.indexOf(">")==e.length-1&&(e=mxUtils.htmlEntities(e));e.length>this.maxTextBytes&&(e=e.substring(0,this.maxTextBytes)+"...");y.value=e;N.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var ka=N.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=ka.width;y.geometry.height=ka.height}Graph.isLink(y.value)&&N.setLinkForCell(y,y.value);y.geometry.width+=N.gridSize;y.geometry.height+=
-N.gridSize}finally{N.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(e){var f=-1;do e/=1024,f++;while(1024<e);return Math.max(e,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(e){if("data:"==e.substring(0,5)){var f=e.indexOf(";");0<f&&(e=e.substring(0,f)+e.substring(e.indexOf(",",f+1)))}return e};EditorUi.prototype.isRemoteFileFormat=function(e,f){return/("contentType":\s*"application\/gliffy\+json")/.test(e)};
-EditorUi.prototype.isLucidChartData=function(e){return null!=e&&('{"state":"{\\"Properties\\":'==e.substring(0,26)||'{"Properties":'==e.substring(0,14))};EditorUi.prototype.importLocalFile=function(e,f){if(e&&Graph.fileSupport){if(null==this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display=
-"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,D){StorageFile.listFiles(this,"F",I,D)});window.openBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.getFileContent(this,I,D,N)});window.deleteBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.deleteFile(this,I,D,N)});if(!f){var v=Editor.useLocalStorage;Editor.useLocalStorage=!e}window.openFile=
+I.onerror=function(D){v(D)};I.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var v=this.editor.graph,x=null;v.getModel().beginUpdate();try{x=v.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),v.updateCellSize(x,!0)}finally{v.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(d,f,g,v,x,B,I,D){B=null!=B?B:!0;I=null!=I?I:!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(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ja.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var N=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=
+G&&0<G.length)return this.importXml(G,f,g,B,!0,D)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,f,g,B,!0,D);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var ia=this.importXml(G,f,g,B,!0,D);if(0<ia.length)return ia}catch(ja){}this.loadImage(d,
+mxUtils.bind(this,function(ja){if("data:"==d.substring(0,5))this.resizeImage(ja,d,mxUtils.bind(this,function(ra,L,V){N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),L,V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ra)+";"))}),I,this.maxImageSize);else{var ca=Math.min(1,Math.min(this.maxImageSize/ja.width,this.maxImageSize/ja.height)),pa=Math.round(ja.width*ca);ja=Math.round(ja.height*
+ca);N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),pa,ja,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var ja=null;N.getModel().beginUpdate();try{ja=N.insertVertex(N.getDefaultParent(),null,d,N.snap(f),N.snap(g),1,1,"text;"+(v?"html=1;":"")),N.updateCellSize(ja),N.fireEvent(new mxEventObject("textInserted","cells",[ja]))}finally{N.getModel().endUpdate()}N.setSelectionCell(ja)}))}else{d=
+Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,B,null,D);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(ja){this.editor.graph.setSelectionCells(this.importXml(ja,f,g,B,null,D))}),mxUtils.bind(this,function(ja){this.handleError(ja)}));else{N=this.editor.graph;x=null;N.getModel().beginUpdate();try{x=N.insertVertex(N.getDefaultParent(),null,"",N.snap(f),N.snap(g),1,1,"text;whiteSpace=wrap;"+(v?"html=1;":""));
+N.fireEvent(new mxEventObject("textInserted","cells",[x]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");x.value=d;N.updateCellSize(x);if(0<this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ka=N.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ka.width;x.geometry.height=ka.height}Graph.isLink(x.value)&&N.setLinkForCell(x,x.value);x.geometry.width+=N.gridSize;x.geometry.height+=
+N.gridSize}finally{N.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};
+EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display=
+"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,D){StorageFile.listFiles(this,"F",I,D)});window.openBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.getFileContent(this,I,D,N)});window.deleteBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.deleteFile(this,I,D,N)});if(!f){var v=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
new OpenFile(mxUtils.bind(this,function(I){this.hideDialog(I)}));window.openFile.setConsumer(mxUtils.bind(this,function(I,D){null!=D&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(D)?(I=new Blob([I],{type:"application/octet-stream"}),this.importVisio(I,mxUtils.bind(this,function(N){this.importXml(N,0,0,!0)}),null,D)):this.editor.graph.setSelectionCells(this.importXml(I,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
-function(){window.openFile=null});if(!f){var y=this.dialog,C=y.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=v;C.apply(y,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(e,f,g){var v=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(e).then(function(C){if(mxUtils.isEmptyObject(C.files))g();else{var I=0,D,N=!1;C.forEach(function(G,ia){G=
-ia.name.toLowerCase();"diagram/diagram.xml"==G?(N=!0,ia.async("string").then(function(ka){0==ka.indexOf("<mxfile ")?f(ka):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>I&&(I=G,D=ia))});0<I?D.async("string").then(function(G){(new XMLHttpRequest).upload&&v.isRemoteFileFormat(G,e.name)?v.isOffline()?v.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):v.parseFileData(G,mxUtils.bind(this,function(ia){4==ia.readyState&&(200<=ia.status&&299>=ia.status?f(ia.responseText):
-g())}),e.name):g()}):N||g()}},function(C){g(C)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(e,f,g,v,y,C,I,D,N,G,ia,ka){G=null!=G?G:!0;var ja=!1,ca=null,pa=mxUtils.bind(this,function(ra){var L=null;null!=ra&&"<mxlibrary"==ra.substring(0,10)?this.loadLibrary(new LocalLibrary(this,ra,I)):L=this.importXml(ra,g,v,G,null,null!=ka?mxEvent.isControlDown(ka):null);null!=
-D&&D(L)});"image"==f.substring(0,5)?(N=!1,"image/png"==f.substring(0,9)&&(f=ia?null:this.extractGraphModelFromPng(e),null!=f&&0<f.length&&(ca=this.importXml(f,g,v,G,null,null!=ka?mxEvent.isControlDown(ka):null),N=!0)),N||(f=this.editor.graph,N=e.indexOf(";"),0<N&&(e=e.substring(0,N)+e.substring(e.indexOf(",",N+1))),G&&f.isGridEnabled()&&(g=f.snap(g),v=f.snap(v)),ca=[f.insertVertex(null,null,"",g,v,y,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-e+";")])):/(\.*<graphml )/.test(e)?(ja=!0,this.importGraphML(e,pa)):null!=N&&null!=I&&(/(\.v(dx|sdx?))($|\?)/i.test(I)||/(\.vs(x|sx?))($|\?)/i.test(I))?(ja=!0,this.importVisio(N,pa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ja=!0,y=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?pa(ra.responseText):null!=D&&D(null))}),null!=e?this.parseFileData(e,y,I):this.parseFile(N,
-y,I)):0==e.indexOf("PK")&&null!=N?(ja=!0,this.importZipFile(N,pa,mxUtils.bind(this,function(){ca=this.insertTextAt(this.validateFileData(e),g,v,!0,null,G);D(ca)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ca=this.insertTextAt(this.validateFileData(e),g,v,!0,null,G,null,null!=ka?mxEvent.isControlDown(ka):null));ja||null==D||D(ca);return ca};EditorUi.prototype.importFiles=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){v=null!=v?v:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var ca=
-null!=f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var ra=!1;if(!mxClient.IS_CHROMEAPP&&null!=e)for(var L=ia||this.resampleThreshold,V=0;V<e.length;V++)if("image/svg"!==e[V].type.substring(0,9)&&"image/"===e[V].type.substring(0,6)&&e[V].size>L){ra=!0;break}var R=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.gridSize;y=null!=y?y:mxUtils.bind(this,function(U,da,fa,na,sa,za,ua,Ba,oa){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
-U,ua)),null):"atlassian"!=this.getServiceName()&&"1"!=urlParams.embed&&this.isCompatibleString(U)&&1==e.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,U,ua,!0)),null):this.importFile(U,da,fa,na,sa,za,ua,Ba,oa,ca,ka,ja)}catch(Aa){return this.handleError(Aa),null}});C=null!=C?C:mxUtils.bind(this,function(U){Y.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var la=e.length,q=la,F=[],T=mxUtils.bind(this,function(U,
-da){F[U]=da;if(0==--q){this.spinner.stop();if(null!=D)D(F);else{var fa=[];Y.getModel().beginUpdate();try{for(U=0;U<F.length;U++){var na=F[U]();null!=na&&(fa=fa.concat(na))}}finally{Y.getModel().endUpdate()}}C(fa)}}),aa=0;aa<la;aa++)mxUtils.bind(this,function(U){var da=e[U];if(null!=da){var fa=new FileReader;fa.onload=mxUtils.bind(this,function(na){if(null==I||I(da))if("image/"==da.type.substring(0,6))if("image/svg"==da.type.substring(0,9)){var sa=Graph.clipSvgDataUri(na.target.result),za=sa.indexOf(",");
-za=decodeURIComponent(escape(atob(sa.substring(za+1))));var ua=mxUtils.parseXml(za);za=ua.getElementsByTagName("svg");if(0<za.length){za=za[0];var Ba=ka?null:za.getAttribute("content");null!=Ba&&"<"!=Ba.charAt(0)&&"%"!=Ba.charAt(0)&&(Ba=unescape(window.atob?atob(Ba):Base64.decode(Ba,!0)));null!=Ba&&"%"==Ba.charAt(0)&&(Ba=decodeURIComponent(Ba));null==Ba||"<mxfile "!==Ba.substring(0,8)&&"<mxGraphModel "!==Ba.substring(0,14)?T(U,mxUtils.bind(this,function(){try{if(null!=ua){var ya=ua.getElementsByTagName("svg");
-if(0<ya.length){var La=ya[0],Oa=La.getAttribute("width"),Na=La.getAttribute("height");Oa=null!=Oa&&"%"!=Oa.charAt(Oa.length-1)?parseFloat(Oa):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Ia=La.getAttribute("viewBox");if(null==Ia||0==Ia.length)La.setAttribute("viewBox","0 0 "+Oa+" "+Na);else if(isNaN(Oa)||isNaN(Na)){var wa=Ia.split(" ");3<wa.length&&(Oa=parseFloat(wa[2]),Na=parseFloat(wa[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(La));var ab=Math.min(1,Math.min(v/Math.max(1,
-Oa)),v/Math.max(1,Na)),Ya=y(sa,da.type,f+U*Z,g+U*Z,Math.max(1,Math.round(Oa*ab)),Math.max(1,Math.round(Na*ab)),da.name);if(isNaN(Oa)||isNaN(Na)){var x=new Image;x.onload=mxUtils.bind(this,function(){Oa=Math.max(1,x.width);Na=Math.max(1,x.height);Ya[0].geometry.width=Oa;Ya[0].geometry.height=Na;La.setAttribute("viewBox","0 0 "+Oa+" "+Na);sa=Editor.createSvgDataUri(mxUtils.getXml(La));var O=sa.indexOf(";");0<O&&(sa=sa.substring(0,O)+sa.substring(sa.indexOf(",",O+1)));Y.setCellStyles("image",sa,[Ya[0]])});
-x.src=Editor.createSvgDataUri(mxUtils.getXml(La))}return Ya}}}catch(O){}return null})):T(U,mxUtils.bind(this,function(){return y(Ba,"text/xml",f+U*Z,g+U*Z,0,0,da.name)}))}else T(U,mxUtils.bind(this,function(){return null}))}else{za=!1;if("image/png"==da.type){var oa=ka?null:this.extractGraphModelFromPng(na.target.result);if(null!=oa&&0<oa.length){var Aa=new Image;Aa.src=na.target.result;T(U,mxUtils.bind(this,function(){return y(oa,"text/xml",f+U*Z,g+U*Z,Aa.width,Aa.height,da.name)}));za=!0}}za||(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(na.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,na.target.result,mxUtils.bind(this,function(La,Oa,Na){T(U,mxUtils.bind(this,function(){if(null!=La&&La.length<G){var Ia=pa&&this.isResampleImageSize(da.size,ia)?
-Math.min(1,Math.min(v/Oa,v/Na)):1;return y(La,da.type,f+U*Z,g+U*Z,Math.round(Oa*Ia),Math.round(Na*Ia),da.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,v,ia,da.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=na.target.result,y(sa,da.type,f+U*Z,g+U*Z,240,160,da.name,function(ya){T(U,function(){return ya})},da)});/(\.v(dx|sdx?))($|\?)/i.test(da.name)||/(\.vs(x|sx?))($|\?)/i.test(da.name)?y(null,
-da.type,f+U*Z,g+U*Z,240,160,da.name,function(na){T(U,function(){return na})},da):"image"==da.type.substring(0,5)||"application/pdf"==da.type?fa.readAsDataURL(da):fa.readAsText(da)}})(aa)});if(ra){ra=[];for(V=0;V<e.length;V++)ra.push(e[V]);e=ra;this.confirmImageResize(function(Y){pa=Y;R()},N)}else R()};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(e,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},v=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(C,I){if(C||f)mxSettings.setResizeImages(C?I:null),mxSettings.save();g();e(I)};null==v||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){y(C,!0)},function(C){y(C,!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):y(!1,v)};EditorUi.prototype.parseFile=function(e,f,g){g=null!=g?g:e.name;var v=new FileReader;v.onload=mxUtils.bind(this,function(){this.parseFileData(v.result,f,g)});v.readAsText(e)};EditorUi.prototype.parseFileData=function(e,f,g){var v=new XMLHttpRequest;v.open("POST",OPEN_URL);v.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
-v.onreadystatechange=function(){f(v)};v.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(e));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(e,f){f=null!=f?f:this.resampleThreshold;return e>f};EditorUi.prototype.resizeImage=function(e,f,g,v,y,C,I){y=null!=y?y:this.maxImageSize;var D=Math.max(1,e.width),N=Math.max(1,e.height);if(v&&this.isResampleImageSize(null!=I?I:f.length,C))try{var G=
-Math.max(D/y,N/y);if(1<G){var ia=Math.round(D/G),ka=Math.round(N/G),ja=document.createElement("canvas");ja.width=ia;ja.height=ka;ja.getContext("2d").drawImage(e,0,0,ia,ka);var ca=ja.toDataURL();if(ca.length<f.length){var pa=document.createElement("canvas");pa.width=ia;pa.height=ka;var ra=pa.toDataURL();ca!==ra&&(f=ca,D=ia,N=ka)}}}catch(L){}g(f,D,N)};EditorUi.prototype.extractGraphModelFromPng=function(e){return Editor.extractGraphModelFromPng(e)};EditorUi.prototype.loadImage=function(e,f,g){try{var v=
-new Image;v.onload=function(){v.width=0<v.width?v.width:120;v.height=0<v.height?v.height:120;f(v)};null!=g&&(v.onerror=g);v.src=e}catch(y){if(null!=g)g(y);else throw y;}};EditorUi.prototype.getDefaultSketchMode=function(){var e="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:e)};var B=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 e=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(L){var V=L.getEvent();return null==L.getState()&&!mxEvent.isMouseEvent(V)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(V)&&
-(null==L.getState()||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V))});f.cellEditor.editPlantUmlData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(e,mxResources.get("plantUml")+":",Y.data,function(Z){null!=Z&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generatePlantUmlImage(Z,Y.format,function(la,q,F){e.spinner.stop();f.getModel().beginUpdate();try{if("txt"==Y.format)f.labelChanged(L,"<pre>"+la+"</pre>"),f.updateCellSize(L,!0);else{f.setCellStyles("image",e.convertDataUri(la),
-[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=q,T.height=F,f.cellsResized([L],[T],!1))}f.setAttributeForCell(L,"plantUmlData",JSON.stringify({data:Z,format:Y.format}))}finally{f.getModel().endUpdate()}},function(la){e.handleError(la)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(e,mxResources.get("mermaid")+":",Y.data,function(Z){null!=Z&&e.spinner.spin(document.body,mxResources.get("inserting"))&&
-e.generateMermaidImage(Z,Y.config,function(la,q,F){e.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",la,[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=Math.max(T.width,q),T.height=Math.max(T.height,F),f.cellsResized([L],[T],!1));f.setAttributeForCell(L,"mermaidData",JSON.stringify({data:Z,config:Y.config},null,2))}finally{f.getModel().endUpdate()}},function(la){e.handleError(la)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};var g=f.cellEditor.startEditing;
-f.cellEditor.startEditing=function(L,V){try{var R=this.graph.getAttributeForCell(L,"plantUmlData");if(null!=R)this.editPlantUmlData(L,V,R);else if(R=this.graph.getAttributeForCell(L,"mermaidData"),null!=R)this.editMermaidData(L,V,R);else{var Y=f.getCellStyle(L);"1"==mxUtils.getValue(Y,"metaEdit","0")?e.showDataDialog(L):g.apply(this,arguments)}}catch(Z){e.handleError(Z)}};f.getLinkTitle=function(L){return e.getLinkTitle(L)};f.customLinkClicked=function(L){var V=!1;try{e.handleCustomLink(L),V=!0}catch(R){e.handleError(R)}return V};
-var v=f.parseBackgroundImage;f.parseBackgroundImage=function(L){var V=v.apply(this,arguments);null!=V&&null!=V.src&&Graph.isPageLink(V.src)&&(V={originalSrc:V.src});return V};var y=f.setBackgroundImage;f.setBackgroundImage=function(L){null!=L&&null!=L.originalSrc&&(L=e.createImageForPageLink(L.originalSrc,e.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,
-function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(L,V){L=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=L){var R=L.indexOf(",");if(0<R)for(L=L.substring(R+1),V=V.getProperty("patches"),R=0;R<V.length;R++)if(null!=V[R][EditorUi.DIFF_UPDATE]&&null!=V[R][EditorUi.DIFF_UPDATE][L]||null!=V[R][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(V[R][EditorUi.DIFF_REMOVE],L)){f.refreshBackgroundImage();break}}}));var C=f.getBackgroundImageObject;
-f.getBackgroundImageObject=function(L,V){var R=C.apply(this,arguments);if(null!=R&&null!=R.originalSrc)if(!V)R={src:R.originalSrc};else if(V&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var Y=this.stylesheet,Z=this.shapeForegroundColor,la=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";R=e.createImageForPageLink(R.originalSrc);this.shapeBackgroundColor=la;this.shapeForegroundColor=Z;this.stylesheet=
-Y}return R};var I=this.clearDefaultStyle;this.clearDefaultStyle=function(){I.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 D=e.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(L){L=null!=
-L?L:"";"1"==urlParams.dev&&(L+=(0<L.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var N=f.addClickHandler;f.addClickHandler=function(L,V,R){var Y=V;V=function(Z,la){if(null==la){var q=mxEvent.getSource(Z);"a"==q.nodeName.toLowerCase()&&(la=q.getAttribute("href"))}null!=la&&f.isCustomLink(la)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(la)&&mxEvent.consume(Z);null!=Y&&Y(Z,la)};N.call(this,L,V,R)};B.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,
-null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(L,V,R){e.editor.graph.isSelectionEmpty()?G.apply(this,arguments):e.menus.addMenuItems(L,"delete - cut copy copyAsImage - duplicate".split(" "),null,R)}}e.actions.get("print").funct=function(){e.showDialog((new PrintDialog(e)).container,360,null!=e.pages&&1<e.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var ia=f.getExportVariables;f.getExportVariables=
-function(){var L=ia.apply(this,arguments),V=e.getCurrentFile();null!=V&&(L.filename=V.getTitle());L.pagecount=null!=e.pages?e.pages.length:1;L.page=null!=e.currentPage?e.currentPage.getName():"";L.pagenumber=null!=e.pages&&null!=e.currentPage?mxUtils.indexOf(e.pages,e.currentPage)+1:1;return L};var ka=f.getGlobalVariable;f.getGlobalVariable=function(L){var V=e.getCurrentFile();return"filename"==L&&null!=V?V.getTitle():"page"==L&&null!=e.currentPage?e.currentPage.getName():"pagenumber"==L?null!=e.currentPage&&
-null!=e.pages?mxUtils.indexOf(e.pages,e.currentPage)+1:1:"pagecount"==L?null!=e.pages?e.pages.length:1:ka.apply(this,arguments)};var ja=f.labelLinkClicked;f.labelLinkClicked=function(L,V,R){var Y=V.getAttribute("href");if(null==Y||!f.isCustomLink(Y)||!mxEvent.isTouchEvent(R)&&mxEvent.isPopupTrigger(R))ja.apply(this,arguments);else{if(!f.isEnabled()||null!=L&&f.isCellLocked(L.cell))f.customLinkClicked(Y),f.getRubberband().reset();mxEvent.consume(R)}};this.editor.getOrCreateFilename=function(){var L=
-e.defaultFilename,V=e.getCurrentFile();null!=V&&(L=null!=V.getTitle()?V.getTitle():L);return L};var ca=this.actions.get("print");ca.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ca.visible=ca.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,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",
-mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(L){var V=f.cellEditor.text2,R=null;null!=V&&(mxEvent.addListener(V,"dragleave",function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);Y.stopPropagation();Y.preventDefault()}),mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==R&&(!mxClient.IS_IE||10<document.documentMode)&&(R=this.highlightElement(V));
-Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(V,"drop",mxUtils.bind(this,function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);if(0<Y.dataTransfer.files.length)this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,function(la,q,F,T,aa,U){f.insertImage(la,aa,U)},function(){},function(la){return"image/"==la.type.substring(0,6)},function(la){for(var q=0;q<la.length;q++)la[q]()},mxEvent.isControlDown(Y));else if(0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")){var Z=
-Y.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)?this.loadImage(decodeURIComponent(Z),mxUtils.bind(this,function(la){var q=Math.max(1,la.width);la=Math.max(1,la.height);var F=this.maxImageSize;F=Math.min(1,Math.min(F/Math.max(1,q)),F/Math.max(1,la));f.insertImage(decodeURIComponent(Z),q*F,la*F)})):document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(Y.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,
-Y.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(Y.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"));Y.stopPropagation();Y.preventDefault()})))}));this.isSettingsEnabled()&&(ca=this.editor.graph.view,ca.setUnit(mxSettings.getUnit()),ca.addListener("unitChanged",function(L,V){mxSettings.setUnit(V.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,ca.unit),this.refresh());if("1"==urlParams.styledev){ca=document.getElementById("geFooter");null!=ca&&(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)})),ca.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(L,V){0<this.editor.graph.getSelectionCount()?(L=this.editor.graph.getSelectionCell(),L=this.editor.graph.getModel().getStyle(L),this.styleInput.value=L||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));
-var pa=this.isSelectionAllowed;this.isSelectionAllowed=function(L){return mxEvent.getSource(L)==this.styleInput?!0:pa.apply(this,arguments)}}ca=document.getElementById("geInfo");null!=ca&&ca.parentNode.removeChild(ca);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var ra=null;mxEvent.addListener(f.container,"dragleave",function(L){f.isEnabled()&&(null!=ra&&(ra.parentNode.removeChild(ra),ra=null),L.stopPropagation(),L.preventDefault())});mxEvent.addListener(f.container,"dragover",
-mxUtils.bind(this,function(L){null==ra&&(!mxClient.IS_IE||10<document.documentMode)&&(ra=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();L.stopPropagation();L.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(L){null!=ra&&(ra.parentNode.removeChild(ra),ra=null);if(f.isEnabled()){var V=mxUtils.convertPoint(f.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),R=L.dataTransfer.files,Y=f.view.translate,Z=f.view.scale,la=V.x/Z-
-Y.x,q=V.y/Z-Y.y;if(0<R.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(L)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(R,!0)):(mxEvent.isAltDown(L)&&(q=la=null),this.importFiles(R,la,q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(L),null,null,mxEvent.isShiftDown(L),L));else{mxEvent.isAltDown(L)&&(q=la=0);var F=0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")?L.dataTransfer.getData("text/uri-list"):null;V=this.extractGraphModelFromEvent(L,
-null!=this.pages);if(null!=V)f.setSelectionCells(this.importXml(V,la,q,!0));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")){var T=L.dataTransfer.getData("text/html");V=document.createElement("div");V.innerHTML=f.sanitizeHtml(T);var aa=null;R=V.getElementsByTagName("img");null!=R&&1==R.length?(T=R[0].getAttribute("src"),null==T&&(T=R[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)||(aa=!0)):(R=V.getElementsByTagName("a"),null!=R&&1==R.length?T=R[0].getAttribute("href"):
-(V=V.getElementsByTagName("pre"),null!=V&&1==V.length&&(T=mxUtils.getTextContent(V[0]))));var U=!0,da=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(T,la,q,!0,aa,null,U,mxEvent.isControlDown(L)))});aa&&null!=T&&T.length>this.resampleThreshold?this.confirmImageResize(function(fa){U=fa;da()},mxEvent.isControlDown(L)):da()}else null!=F&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(fa){var na=Math.max(1,fa.width);fa=Math.max(1,
-fa.height);var sa=this.maxImageSize;sa=Math.min(1,Math.min(sa/Math.max(1,na)),sa/Math.max(1,fa));f.setSelectionCell(f.insertVertex(null,null,"",la,q,na*sa,fa*sa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+F+";"))}),mxUtils.bind(this,function(fa){f.setSelectionCells(this.insertTextAt(F,la,q,!0))})):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(L.dataTransfer.getData("text/plain"),
-la,q,!0))}}L.stopPropagation();L.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();ca=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",ca);this.addListener("sketchModeChanged",ca);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.refresh()}));f.addListener("enabledChanged",mxUtils.bind(this,
-function(){f.isEnabled()||this.hideShapePicker()}));"simple"==Editor.currentTheme&&(Editor.currentTheme="",this.doSetCurrentTheme("simple",0));mxClient.IS_IE||mxClient.IS_IE11||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(ca=!1,this.isSettingsEnabled()&&(ca="auto"==mxSettings.settings.darkMode||"auto"==urlParams.dark?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches:!0===mxSettings.settings.darkMode),(ca||"dark"==uiTheme||
-"1"==urlParams.dark)&&this.setDarkMode(!0));this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var e=this.editor.graph;e.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,v=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,5)){v=!0;break}if(!v){var C=g.items;for(index in C){var I=C[index];if("file"===I.kind){if(e.isEditing())this.importFiles([I.getAsFile()],
-0,0,this.maxImageSize,function(N,G,ia,ka,ja,ca){e.insertImage(N,ja,ca)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var G=0;G<N.length;G++)N[G]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([I.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(N){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function e(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",
-!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize=
-"1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var I=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||
-"TEXTAREA"==I.nodeName||224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||v||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(g),v=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=I)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var I=C.keyCode;window.setTimeout(mxUtils.bind(this,
-function(){!v||224!=I&&17!=I&&91!=I&&93!=I||(v=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),e()}catch(I){this.handleError(I)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),e()}catch(I){this.handleError(I)}}));
-mxEvent.addListener(g,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=C.clipboardData&&this.pasteCells(C,g,!0,!0),!mxEvent.isConsumed(C))){var I=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=I;f.container.scrollTop=D;this.pasteCells(C,g,!1,!0)}),0)}}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==
-g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(e,f){mxSettings.setUi(e);(f=this.doSetCurrentTheme(e)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(e,f){function g(ka){return""==ka||"dark"==ka||"kennedy"==ka||null==ka}var v=Editor.currentTheme;e=g(e)?"default":e;v=g(v)?"default":v;var y="simple"==v&&"default"==e||"default"==v&&"simple"==e;if(y&&!this.themeSwitching){Editor.currentTheme=e;this.themeSwitching=!0;
-var C=this.editor.graph.view.translate,I=C.x,D=C.y,N=mxUtils.getOffset(this.editor.graph.container),G=this.editor.graph.container.scrollLeft-N.x,ia=this.editor.graph.container.scrollTop-N.y;f=null!=f?f:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"simple"==v&&"default"==e?(this.sidebarFooterContainer.style.display=
-"block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==v&&"simple"==e&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display=
-"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(e);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();var ka=this.editor.graph.view.scale;N=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=G+N.x+(C.x-I)*ka;this.editor.graph.container.scrollTop=ia+N.y+(C.y-D)*
-ka;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),f)}),f)}),f)}),0)}return y};EditorUi.prototype.installStatusMinimizer=function(e){e=null!=e?e:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(){""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-block")}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,
-function(){f||(this.statusContainer.style.display="none")}));var g=mxUtils.bind(this,function(){if("simple"==Editor.currentTheme||"1"==urlParams.sketch){var v=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=v&&null!=v.getAttribute("class");if(!f&&null!=v){v=v.getAttribute("title");var y=this.getCurrentFile();y=null!=y?y.savingStatusKey:DrawioFile.prototype.savingStatusKey;v==mxResources.get(y)+"..."&&
-(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(y))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";v=26>e.clientWidth;e.style.visibility=v&&""==this.editor.getStatus()?"hidden":"";if(v||f)this.statusContainer.style.display="inline-block",f=!0}});this.editor.addListener("statusChanged",g);g()};EditorUi.prototype.switchTheme=function(e){"default"==e&&(null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex=
-"1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer)),this.toggleCompactMode(!0));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();
-this.switchThemeConstants(e);this.switchCssForTheme(e);this.createWrapperForTheme(e);this.createPickerMenuForTheme(e);this.createMainMenuForTheme(e);this.createMenubarForTheme(e);this.createFooterMenuForTheme(e);this.sidebarContainer.style.display="";"simple"==e&&(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),
-this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%");null!=this.format&&(e="default"==e||"atlas"==e,this.format.showCloseButton!=e&&(this.format.showCloseButton=e,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=
-this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&
-(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(e){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=e);"simple"==e?(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,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),f.defaultEdgeLength=120,null==urlParams.grid&&(f.defaultGridEnabled=
-!1),null==urlParams.pv&&(f.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(e){"simple"==e?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=
-Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(e){"simple"==e?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),
-this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(e){"simple"==e&&null==this.sketchMainMenuElt&&(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText=
-"position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",
-Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(e){if("simple"==e&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
-e=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";e.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var v=null!=this.pages?this.pages.length:1,y=this.getPageIndex(this.currentPage);y=null!=y?y+1:1;var C=this.currentPage.getId();
-f.setAttribute("title",this.currentPage.getName()+" ("+y+"/"+v+")"+(null!=C?" ["+C+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
-g);this.editor.addListener("pagesPatched",g);g();e.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));g=this.createMenu("viewZoom");g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";e.appendChild(g);mxUtils.bind(this,function(v){mxEvent.addListener(v,"click",
-mxUtils.bind(this,function(C){mxEvent.isAltDown(C)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var y=mxUtils.bind(this,function(){v.innerText="";mxUtils.write(v,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,y);this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",
-y)})(g);e.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(e){if("simple"==e&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+function(){window.openFile=null});if(!f){var x=this.dialog,B=x.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=v;B.apply(x,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var v=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(B){if(mxUtils.isEmptyObject(B.files))g();else{var I=0,D,N=!1;B.forEach(function(G,ia){G=
+ia.name.toLowerCase();"diagram/diagram.xml"==G?(N=!0,ia.async("string").then(function(ka){0==ka.indexOf("<mxfile ")?f(ka):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>I&&(I=G,D=ia))});0<I?D.async("string").then(function(G){(new XMLHttpRequest).upload&&v.isRemoteFileFormat(G,d.name)?v.isOffline()?v.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):v.parseFileData(G,mxUtils.bind(this,function(ia){4==ia.readyState&&(200<=ia.status&&299>=ia.status?f(ia.responseText):
+g())}),d.name):g()}):N||g()}},function(B){g(B)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.importFile=function(d,f,g,v,x,B,I,D,N,G,ia,ka){G=null!=G?G:!0;var ja=!1,ca=null,pa=mxUtils.bind(this,function(ra){var L=null;null!=ra&&"<mxlibrary"==ra.substring(0,10)?this.loadLibrary(new LocalLibrary(this,ra,I)):L=this.importXml(ra,g,v,G,null,null!=ka?mxEvent.isControlDown(ka):null);null!=
+D&&D(L)});"image"==f.substring(0,5)?(N=!1,"image/png"==f.substring(0,9)&&(f=ia?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(ca=this.importXml(f,g,v,G,null,null!=ka?mxEvent.isControlDown(ka):null),N=!0)),N||(f=this.editor.graph,N=d.indexOf(";"),0<N&&(d=d.substring(0,N)+d.substring(d.indexOf(",",N+1))),G&&f.isGridEnabled()&&(g=f.snap(g),v=f.snap(v)),ca=[f.insertVertex(null,null,"",g,v,x,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";")])):/(\.*<graphml )/.test(d)?(ja=!0,this.importGraphML(d,pa)):null!=N&&null!=I&&(/(\.v(dx|sdx?))($|\?)/i.test(I)||/(\.vs(x|sx?))($|\?)/i.test(I))?(ja=!0,this.importVisio(N,pa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ja=!0,x=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?pa(ra.responseText):null!=D&&(D(null),this.showError(mxResources.get("error"),413==
+ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,x,I):this.parseFile(N,x,I)):0==d.indexOf("PK")&&null!=N?(ja=!0,this.importZipFile(N,pa,mxUtils.bind(this,function(){ca=this.insertTextAt(this.validateFileData(d),g,v,!0,null,G);D(ca)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ca=this.insertTextAt(this.validateFileData(d),g,v,!0,null,G,null,null!=ka?mxEvent.isControlDown(ka):null));ja||null==D||D(ca);return ca};EditorUi.prototype.importFiles=
+function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja){v=null!=v?v:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var ca=null!=f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var ra=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var L=ia||this.resampleThreshold,V=0;V<d.length;V++)if("image/svg"!==d[V].type.substring(0,9)&&"image/"===d[V].type.substring(0,6)&&d[V].size>L){ra=!0;break}var R=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.gridSize;x=null!=x?x:mxUtils.bind(this,function(U,da,fa,na,sa,za,ua,Ba,oa){try{return null!=
+U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,ua)),null):"atlassian"!=this.getServiceName()&&"1"!=urlParams.embed&&this.isCompatibleString(U)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,U,ua,!0)),null):this.importFile(U,da,fa,na,sa,za,ua,Ba,oa,ca,ka,ja)}catch(Aa){return this.handleError(Aa),null}});B=null!=B?B:mxUtils.bind(this,function(U){Y.setSelectionCells(U)});if(this.spinner.spin(document.body,
+mxResources.get("loading")))for(var la=d.length,q=la,F=[],T=mxUtils.bind(this,function(U,da){F[U]=da;if(0==--q){this.spinner.stop();if(null!=D)D(F);else{var fa=[];Y.getModel().beginUpdate();try{for(U=0;U<F.length;U++){var na=F[U]();null!=na&&(fa=fa.concat(na))}}finally{Y.getModel().endUpdate()}}B(fa)}}),aa=0;aa<la;aa++)mxUtils.bind(this,function(U){var da=d[U];if(null!=da){var fa=new FileReader;fa.onload=mxUtils.bind(this,function(na){if(null==I||I(da))if("image/"==da.type.substring(0,6))if("image/svg"==
+da.type.substring(0,9)){var sa=Graph.clipSvgDataUri(na.target.result),za=sa.indexOf(",");za=decodeURIComponent(escape(atob(sa.substring(za+1))));var ua=mxUtils.parseXml(za);za=ua.getElementsByTagName("svg");if(0<za.length){za=za[0];var Ba=ka?null:za.getAttribute("content");null!=Ba&&"<"!=Ba.charAt(0)&&"%"!=Ba.charAt(0)&&(Ba=unescape(window.atob?atob(Ba):Base64.decode(Ba,!0)));null!=Ba&&"%"==Ba.charAt(0)&&(Ba=decodeURIComponent(Ba));null==Ba||"<mxfile "!==Ba.substring(0,8)&&"<mxGraphModel "!==Ba.substring(0,
+14)?T(U,mxUtils.bind(this,function(){try{if(null!=ua){var ya=ua.getElementsByTagName("svg");if(0<ya.length){var La=ya[0],Oa=La.getAttribute("width"),Na=La.getAttribute("height");Oa=null!=Oa&&"%"!=Oa.charAt(Oa.length-1)?parseFloat(Oa):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Ia=La.getAttribute("viewBox");if(null==Ia||0==Ia.length)La.setAttribute("viewBox","0 0 "+Oa+" "+Na);else if(isNaN(Oa)||isNaN(Na)){var wa=Ia.split(" ");3<wa.length&&(Oa=parseFloat(wa[2]),Na=parseFloat(wa[3]))}sa=
+Editor.createSvgDataUri(mxUtils.getXml(La));var ab=Math.min(1,Math.min(v/Math.max(1,Oa)),v/Math.max(1,Na)),Ya=x(sa,da.type,f+U*Z,g+U*Z,Math.max(1,Math.round(Oa*ab)),Math.max(1,Math.round(Na*ab)),da.name);if(isNaN(Oa)||isNaN(Na)){var y=new Image;y.onload=mxUtils.bind(this,function(){Oa=Math.max(1,y.width);Na=Math.max(1,y.height);Ya[0].geometry.width=Oa;Ya[0].geometry.height=Na;La.setAttribute("viewBox","0 0 "+Oa+" "+Na);sa=Editor.createSvgDataUri(mxUtils.getXml(La));var O=sa.indexOf(";");0<O&&(sa=
+sa.substring(0,O)+sa.substring(sa.indexOf(",",O+1)));Y.setCellStyles("image",sa,[Ya[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(La))}return Ya}}}catch(O){}return null})):T(U,mxUtils.bind(this,function(){return x(Ba,"text/xml",f+U*Z,g+U*Z,0,0,da.name)}))}else T(U,mxUtils.bind(this,function(){return null}))}else{za=!1;if("image/png"==da.type){var oa=ka?null:this.extractGraphModelFromPng(na.target.result);if(null!=oa&&0<oa.length){var Aa=new Image;Aa.src=na.target.result;T(U,mxUtils.bind(this,
+function(){return x(oa,"text/xml",f+U*Z,g+U*Z,Aa.width,Aa.height,da.name)}));za=!0}}za||(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(na.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,na.target.result,mxUtils.bind(this,function(La,Oa,
+Na){T(U,mxUtils.bind(this,function(){if(null!=La&&La.length<G){var Ia=pa&&this.isResampleImageSize(da.size,ia)?Math.min(1,Math.min(v/Oa,v/Na)):1;return x(La,da.type,f+U*Z,g+U*Z,Math.round(Oa*Ia),Math.round(Na*Ia),da.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,v,ia,da.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=na.target.result,x(sa,da.type,f+U*Z,g+U*Z,240,160,da.name,function(ya){T(U,
+function(){return ya})},da)});/(\.v(dx|sdx?))($|\?)/i.test(da.name)||/(\.vs(x|sx?))($|\?)/i.test(da.name)?x(null,da.type,f+U*Z,g+U*Z,240,160,da.name,function(na){T(U,function(){return na})},da):"image"==da.type.substring(0,5)||"application/pdf"==da.type?fa.readAsDataURL(da):fa.readAsText(da)}})(aa)});if(ra){ra=[];for(V=0;V<d.length;V++)ra.push(d[V]);d=ra;this.confirmImageResize(function(Y){pa=Y;R()},N)}else R()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
+this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},v=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(B,I){if(B||f)mxSettings.setResizeImages(B?I:null),mxSettings.save();g();d(I)};null==v||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(B){x(B,
+!0)},function(B){x(B,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):x(!1,v)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var v=new FileReader;v.onload=mxUtils.bind(this,function(){this.parseFileData(v.result,f,g)});v.readAsText(d)};EditorUi.prototype.parseFileData=
+function(d,f,g){var v=new XMLHttpRequest;v.open("POST",OPEN_URL);v.setRequestHeader("Content-Type","application/x-www-form-urlencoded");v.onreadystatechange=function(){f(v)};v.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,v,x,B,
+I){x=null!=x?x:this.maxImageSize;var D=Math.max(1,d.width),N=Math.max(1,d.height);if(v&&this.isResampleImageSize(null!=I?I:f.length,B))try{var G=Math.max(D/x,N/x);if(1<G){var ia=Math.round(D/G),ka=Math.round(N/G),ja=document.createElement("canvas");ja.width=ia;ja.height=ka;ja.getContext("2d").drawImage(d,0,0,ia,ka);var ca=ja.toDataURL();if(ca.length<f.length){var pa=document.createElement("canvas");pa.width=ia;pa.height=ka;var ra=pa.toDataURL();ca!==ra&&(f=ca,D=ia,N=ka)}}}catch(L){}g(f,D,N)};EditorUi.prototype.extractGraphModelFromPng=
+function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var v=new Image;v.onload=function(){v.width=0<v.width?v.width:120;v.height=0<v.height?v.height:120;f(v)};null!=g&&(v.onerror=g);v.src=d}catch(x){if(null!=g)g(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=
+mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(L){var V=L.getEvent();
+return null==L.getState()&&!mxEvent.isMouseEvent(V)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(V)&&(null==L.getState()||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V))});f.cellEditor.editPlantUmlData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(d,mxResources.get("plantUml")+":",Y.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Z,Y.format,function(la,q,F){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==Y.format)f.labelChanged(L,
+"<pre>"+la+"</pre>"),f.updateCellSize(L,!0);else{f.setCellStyles("image",d.convertDataUri(la),[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=q,T.height=F,f.cellsResized([L],[T],!1))}f.setAttributeForCell(L,"plantUmlData",JSON.stringify({data:Z,format:Y.format}))}finally{f.getModel().endUpdate()}},function(la){d.handleError(la)})},null,null,400,220);d.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(d,
+mxResources.get("mermaid")+":",Y.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(Z,Y.config,function(la,q,F){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",la,[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=Math.max(T.width,q),T.height=Math.max(T.height,F),f.cellsResized([L],[T],!1));f.setAttributeForCell(L,"mermaidData",JSON.stringify({data:Z,config:Y.config},null,2))}finally{f.getModel().endUpdate()}},
+function(la){d.handleError(la)})},null,null,400,220);d.showDialog(V.container,420,300,!0,!0);V.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(L,V){try{var R=this.graph.getAttributeForCell(L,"plantUmlData");if(null!=R)this.editPlantUmlData(L,V,R);else if(R=this.graph.getAttributeForCell(L,"mermaidData"),null!=R)this.editMermaidData(L,V,R);else{var Y=f.getCellStyle(L);"1"==mxUtils.getValue(Y,"metaEdit","0")?d.showDataDialog(L):g.apply(this,arguments)}}catch(Z){d.handleError(Z)}};
+f.getLinkTitle=function(L){return d.getLinkTitle(L)};f.customLinkClicked=function(L){var V=!1;try{d.handleCustomLink(L),V=!0}catch(R){d.handleError(R)}return V};var v=f.parseBackgroundImage;f.parseBackgroundImage=function(L){var V=v.apply(this,arguments);null!=V&&null!=V.src&&Graph.isPageLink(V.src)&&(V={originalSrc:V.src});return V};var x=f.setBackgroundImage;f.setBackgroundImage=function(L){null!=L&&null!=L.originalSrc&&(L=d.createImageForPageLink(L.originalSrc,d.currentPage,this));x.apply(this,
+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(L,V){L=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=L){var R=L.indexOf(",");if(0<R)for(L=L.substring(R+1),V=V.getProperty("patches"),R=0;R<V.length;R++)if(null!=V[R][EditorUi.DIFF_UPDATE]&&null!=V[R][EditorUi.DIFF_UPDATE][L]||
+null!=V[R][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(V[R][EditorUi.DIFF_REMOVE],L)){f.refreshBackgroundImage();break}}}));var B=f.getBackgroundImageObject;f.getBackgroundImageObject=function(L,V){var R=B.apply(this,arguments);if(null!=R&&null!=R.originalSrc)if(!V)R={src:R.originalSrc};else if(V&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var Y=this.stylesheet,Z=this.shapeForegroundColor,la=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor=
+"#ffffff";this.shapeForegroundColor="#000000";R=d.createImageForPageLink(R.originalSrc);this.shapeBackgroundColor=la;this.shapeForegroundColor=Z;this.stylesheet=Y}return R};var I=this.clearDefaultStyle;this.clearDefaultStyle=function(){I.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 D=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(L){L=null!=L?L:"";"1"==urlParams.dev&&(L+=(0<L.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var N=f.addClickHandler;f.addClickHandler=function(L,V,R){var Y=V;V=function(Z,la){if(null==la){var q=mxEvent.getSource(Z);"a"==q.nodeName.toLowerCase()&&(la=q.getAttribute("href"))}null!=la&&f.isCustomLink(la)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(la)&&mxEvent.consume(Z);
+null!=Y&&Y(Z,la)};N.call(this,L,V,R)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(L,V,R){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(L,"delete - cut copy copyAsImage - duplicate".split(" "),null,R)}}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 ia=f.getExportVariables;f.getExportVariables=function(){var L=ia.apply(this,arguments),V=d.getCurrentFile();null!=V&&(L.filename=V.getTitle());L.pagecount=null!=d.pages?d.pages.length:1;L.page=null!=d.currentPage?d.currentPage.getName():"";L.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return L};var ka=f.getGlobalVariable;f.getGlobalVariable=function(L){var V=
+d.getCurrentFile();return"filename"==L&&null!=V?V.getTitle():"page"==L&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==L?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==L?null!=d.pages?d.pages.length:1:ka.apply(this,arguments)};var ja=f.labelLinkClicked;f.labelLinkClicked=function(L,V,R){var Y=V.getAttribute("href");if(null==Y||!f.isCustomLink(Y)||!mxEvent.isTouchEvent(R)&&mxEvent.isPopupTrigger(R))ja.apply(this,arguments);else{if(!f.isEnabled()||
+null!=L&&f.isCellLocked(L.cell))f.customLinkClicked(Y),f.getRubberband().reset();mxEvent.consume(R)}};this.editor.getOrCreateFilename=function(){var L=d.defaultFilename,V=d.getCurrentFile();null!=V&&(L=null!=V.getTitle()?V.getTitle():L);return L};var ca=this.actions.get("print");ca.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ca.visible=ca.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,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,
+!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(L){var V=f.cellEditor.text2,R=null;null!=V&&(mxEvent.addListener(V,"dragleave",function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);Y.stopPropagation();
+Y.preventDefault()}),mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==R&&(!mxClient.IS_IE||10<document.documentMode)&&(R=this.highlightElement(V));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(V,"drop",mxUtils.bind(this,function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);if(0<Y.dataTransfer.files.length)this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,function(la,q,F,T,aa,U){f.insertImage(la,aa,U)},function(){},function(la){return"image/"==la.type.substring(0,
+6)},function(la){for(var q=0;q<la.length;q++)la[q]()},mxEvent.isControlDown(Y));else if(0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")){var Z=Y.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)?this.loadImage(decodeURIComponent(Z),mxUtils.bind(this,function(la){var q=Math.max(1,la.width);la=Math.max(1,la.height);var F=this.maxImageSize;F=Math.min(1,Math.min(F/Math.max(1,q)),F/Math.max(1,la));f.insertImage(decodeURIComponent(Z),q*F,la*F)})):document.execCommand("insertHTML",
+!1,Y.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(Y.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(Y.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"));Y.stopPropagation();Y.preventDefault()})))}));this.isSettingsEnabled()&&(ca=this.editor.graph.view,ca.setUnit(mxSettings.getUnit()),ca.addListener("unitChanged",function(L,V){mxSettings.setUnit(V.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,ca.unit),this.refresh());if("1"==urlParams.styledev){ca=document.getElementById("geFooter");null!=ca&&(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)})),ca.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(L,V){0<this.editor.graph.getSelectionCount()?(L=this.editor.graph.getSelectionCell(),
+L=this.editor.graph.getModel().getStyle(L),this.styleInput.value=L||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var pa=this.isSelectionAllowed;this.isSelectionAllowed=function(L){return mxEvent.getSource(L)==this.styleInput?!0:pa.apply(this,arguments)}}ca=document.getElementById("geInfo");null!=ca&&ca.parentNode.removeChild(ca);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var ra=null;mxEvent.addListener(f.container,"dragleave",
+function(L){f.isEnabled()&&(null!=ra&&(ra.parentNode.removeChild(ra),ra=null),L.stopPropagation(),L.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(L){null==ra&&(!mxClient.IS_IE||10<document.documentMode)&&(ra=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();L.stopPropagation();L.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(L){null!=ra&&(ra.parentNode.removeChild(ra),ra=null);if(f.isEnabled()){var V=
+mxUtils.convertPoint(f.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),R=L.dataTransfer.files,Y=f.view.translate,Z=f.view.scale,la=V.x/Z-Y.x,q=V.y/Z-Y.y;if(0<R.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(L)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(R,!0)):(mxEvent.isAltDown(L)&&(q=la=null),this.importFiles(R,la,q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(L),null,null,mxEvent.isShiftDown(L),L));else{mxEvent.isAltDown(L)&&
+(q=la=0);var F=0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")?L.dataTransfer.getData("text/uri-list"):null;V=this.extractGraphModelFromEvent(L,null!=this.pages);if(null!=V)f.setSelectionCells(this.importXml(V,la,q,!0));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")){var T=L.dataTransfer.getData("text/html");V=document.createElement("div");V.innerHTML=f.sanitizeHtml(T);var aa=null;R=V.getElementsByTagName("img");null!=R&&1==R.length?(T=R[0].getAttribute("src"),null==T&&(T=R[0].getAttribute("srcset")),
+/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)||(aa=!0)):(R=V.getElementsByTagName("a"),null!=R&&1==R.length?T=R[0].getAttribute("href"):(V=V.getElementsByTagName("pre"),null!=V&&1==V.length&&(T=mxUtils.getTextContent(V[0]))));var U=!0,da=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(T,la,q,!0,aa,null,U,mxEvent.isControlDown(L)))});aa&&null!=T&&T.length>this.resampleThreshold?this.confirmImageResize(function(fa){U=fa;da()},mxEvent.isControlDown(L)):da()}else null!=F&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?
+this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(fa){var na=Math.max(1,fa.width);fa=Math.max(1,fa.height);var sa=this.maxImageSize;sa=Math.min(1,Math.min(sa/Math.max(1,na)),sa/Math.max(1,fa));f.setSelectionCell(f.insertVertex(null,null,"",la,q,na*sa,fa*sa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+F+";"))}),mxUtils.bind(this,function(fa){f.setSelectionCells(this.insertTextAt(F,la,q,!0))})):0<=mxUtils.indexOf(L.dataTransfer.types,
+"text/plain")&&f.setSelectionCells(this.insertTextAt(L.dataTransfer.getData("text/plain"),la,q,!0))}}L.stopPropagation();L.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();ca=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",ca);this.addListener("sketchModeChanged",ca);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();
+this.refresh()}));f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));"simple"==Editor.currentTheme&&(Editor.currentTheme="",this.doSetCurrentTheme("simple",0));mxClient.IS_IE||mxClient.IS_IE11||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(ca=!1,this.isSettingsEnabled()&&(ca="auto"==mxSettings.settings.darkMode||"auto"==urlParams.dark?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches:
+!0===mxSettings.settings.darkMode),(ca||"dark"==uiTheme||"1"==urlParams.dark)&&this.setDarkMode(!0));this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,v=!1,x=0;x<g.types.length;x++)if("text/"===g.types[x].substring(0,5)){v=!0;break}if(!v){var B=g.items;for(index in B){var I=
+B[index];if("file"===I.kind){if(d.isEditing())this.importFiles([I.getAsFile()],0,0,this.maxImageSize,function(N,G,ia,ka,ja,ca){d.insertImage(N,ja,ca)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var G=0;G<N.length;G++)N[G]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([I.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(N){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML=
+"&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow=
+"hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(B){var I=mxEvent.getSource(B);null==f.container||!f.isEnabled()||f.isMouseDown||
+f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||"TEXTAREA"==I.nodeName||224!=B.keyCode&&(mxClient.IS_MAC||17!=B.keyCode)&&(!mxClient.IS_MAC||91!=B.keyCode&&93!=B.keyCode)||v||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",B=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(g),v=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=B,f.container.scrollTop=I)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
+function(B){var I=B.keyCode;window.setTimeout(mxUtils.bind(this,function(){!v||224!=I&&17!=I&&91!=I&&93!=I||(v=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(B){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(I){this.handleError(I)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(B){if(f.isEnabled())try{mxClipboard.copy(f),
+this.copyCells(g,!0),d()}catch(I){this.handleError(I)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(B){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=B.clipboardData&&this.pasteCells(B,g,!0,!0),!mxEvent.isConsumed(B))){var I=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=I;f.container.scrollTop=D;this.pasteCells(B,g,!1,!0)}),0)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=
+function(B){return mxEvent.getSource(B)==g?!0:x.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d,f){function g(ka){return""==ka||"dark"==ka||"kennedy"==ka||null==ka}var v=Editor.currentTheme;d=g(d)?"default":d;v=g(v)?"default":v;var x="simple"==v&&"default"==d||"default"==v&&"simple"==d;if(x&&!this.themeSwitching){Editor.currentTheme=
+d;this.themeSwitching=!0;var B=this.editor.graph.view.translate,I=B.x,D=B.y,N=mxUtils.getOffset(this.editor.graph.container),G=this.editor.graph.container.scrollLeft-N.x,ia=this.editor.graph.container.scrollTop-N.y;f=null!=f?f:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"simple"==v&&"default"==d?(this.sidebarFooterContainer.style.display=
+"block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==v&&"simple"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display=
+"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var ka=this.editor.graph.view.scale;N=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=G+N.x+(B.x-I)*ka;this.editor.graph.container.scrollTop=ia+N.y+(B.y-D)*ka;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),f)}),f)}),f)}),0)}return x};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-block")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){f||(this.statusContainer.style.display="none")}));
+var g=mxUtils.bind(this,function(){if("simple"==Editor.currentTheme||"1"==urlParams.sketch){var v=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=v&&null!=v.getAttribute("class");if(!f&&null!=v){v=v.getAttribute("title");var x=this.getCurrentFile();x=null!=x?x.savingStatusKey:DrawioFile.prototype.savingStatusKey;v==mxResources.get(x)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(x))+
+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";v=26>d.clientWidth;d.style.visibility=v&&""==this.editor.getStatus()?"hidden":"";if(v||f)this.statusContainer.style.display="inline-block",f=!0}});this.editor.addListener("statusChanged",g);g()};EditorUi.prototype.switchTheme=function(d){"default"==d&&(null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&
+this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer)),this.toggleCompactMode(!0));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);
+this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display="";"simple"==d&&(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom=
+"63px",this.sidebarContainer.style.width="100%");null!=this.format&&(d="default"==d||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&
+(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),
+this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(d){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=d);"simple"==d?(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,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),f.defaultEdgeLength=120,null==urlParams.grid&&(f.defaultGridEnabled=!1),null==urlParams.pv&&(f.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=
+mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(d){"simple"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),
+this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"simple"==d?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,
+this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(d){"simple"==d&&null==this.sketchMainMenuElt&&(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(d){if("simple"==d&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=
+document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";d=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";
+d.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var v=null!=this.pages?this.pages.length:1,x=this.getPageIndex(this.currentPage);x=null!=x?x+1:1;var B=this.currentPage.getId();f.setAttribute("title",this.currentPage.getName()+" ("+x+"/"+v+")"+(null!=B?" ["+B+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",
+g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",g);this.editor.addListener("pagesPatched",g);g();d.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));g=this.createMenu("viewZoom");g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";
+d.appendChild(g);mxUtils.bind(this,function(v){mxEvent.addListener(v,"click",mxUtils.bind(this,function(B){mxEvent.isAltDown(B)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(B)):mxEvent.isShiftDown(B)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(B))}));var x=mxUtils.bind(this,function(){v.innerText="";mxUtils.write(v,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,x);this.editor.addListener("resetGraphView",
+x);this.editor.addListener("pageSelected",x)})(g);d.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(d){if("simple"==d&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;max-height:100%;width:48px;z-index:1;box-sizing:border-box;transform:translate(0, -50%);top:50%;user-select:none;";
var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var v=this.createMenuItem("insertFreehand",Editor.freehandImage,
-!0);v.style.paddingLeft="12px";v.style.backgroundSize="";v.style.width="26px";v.style.height="30px";v.style.opacity="0.7";var y=this.createMenu("insert",Editor.shapesImage);y.style.backgroundSize="";y.style.marginBottom="4px";y.style.display="block";y.style.width="30px";y.style.height="30px";y.style.padding="4px";y.style.opacity="0.7";var C=!1,I=mxUtils.bind(this,function(){f.innerText="";if(!C){var D=function(G,ia,ka,ja){null!=ia&&G.setAttribute("title",ia);G.style.cursor="pointer";G.style.margin=
+!0);v.style.paddingLeft="12px";v.style.backgroundSize="";v.style.width="26px";v.style.height="30px";v.style.opacity="0.7";var x=this.createMenu("insert",Editor.shapesImage);x.style.backgroundSize="";x.style.marginBottom="4px";x.style.display="block";x.style.width="30px";x.style.height="30px";x.style.padding="4px";x.style.opacity="0.7";var B=!1,I=mxUtils.bind(this,function(){f.innerText="";if(!B){var D=function(G,ia,ka,ja){null!=ia&&G.setAttribute("title",ia);G.style.cursor="pointer";G.style.margin=
"8px 0px";G.style.display="block";f.appendChild(G);null!=ja&&(G.style.position="relative",G.style.overflow="visible",ia=document.createElement("div"),ia.style.position="absolute",ia.style.fontSize="8px",ia.style.left="32px",ia.style.top="28px",mxUtils.write(ia,ja),G.appendChild(ia));return G};D(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
" (A)",null,"A");D(this.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")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");D(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");D(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var N=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");N.geometry.setTerminalPoint(new mxPoint(0,0),!0);N.geometry.setTerminalPoint(new mxPoint(N.geometry.width,0),!1);N.geometry.points=
[];N.geometry.relative=!0;N.edge=!0;D(this.sidebar.createEdgeTemplateFromCells([N],N.geometry.width,N.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");N=N.clone();N.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";N.geometry.width=this.editor.graph.defaultEdgeLength+20;N.geometry.setTerminalPoint(new mxPoint(0,20),!0);N.geometry.setTerminalPoint(new mxPoint(N.geometry.width,20),!1);
-D(this.sidebar.createEdgeTemplateFromCells([N],N.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(v,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(y)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){C?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
-g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",C=!1,I()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",C=!0)}));this.addListener("darkModeChanged",
-I);this.addListener("sketchModeChanged",I);I();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(e){"simple"==e?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="display:flex;position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;flex-wrap:nowrap;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;max-width:calc(100% - 170px);min-width:40px;justify-content:flex-end;align-items:center;",
-this.sketchWrapperElt.appendChild(this.sketchMenubarElt),"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&this.installStatusMinimizer(this.sketchMenubarElt)),null!=this.statusContainer&&(this.statusContainer.style.flexShrink="1",this.statusContainer.style.overflow="hidden",this.sketchMenubarElt.appendChild(this.statusContainer)),null!=this.userElement&&(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement)),e=this.menubar.langIcon,
-null!=e&&(e.style.position="",e.style.height="21px",e.style.width="21px",e.style.flexShrink="0",this.sketchMenubarElt.appendChild(e)),null!=this.buttonContainer&&(this.buttonContainer.style.flexShrink="0",this.buttonContainer.style.padding="0px",this.buttonContainer.style.position="",this.sketchMenubarElt.appendChild(this.buttonContainer))):(null!=this.statusContainer&&(this.menubar.container.appendChild(this.statusContainer),this.statusContainer.style.flexShrink="",this.statusContainer.style.overflow=
-""),null!=this.userElement&&(this.userElement.style.flexShrink="",this.userElement.style.top="3px",this.menubarContainer.appendChild(this.userElement)),e=this.menubar.langIcon,null!=e&&(e.style.position="absolute",e.style.height="18px",e.style.width="18px",e.style.flexShrink="",this.menubarContainer.parentNode.insertBefore(e,this.menubarContainer)))};EditorUi.prototype.createMenu=function(e,f){var g=this.menus.get(e),v=this.menubar.addMenu(mxResources.get(e),g.funct);v.className="geToolbarButton";
-v.style.display="inline-block";v.style.cursor="pointer";v.style.height="24px";v.setAttribute("title",mxResources.get(e));this.menus.menuCreated(g,v,"geToolbarButton");null!=f&&(v.style.backgroundImage="url("+f+")",v.style.backgroundPosition="center center",v.style.backgroundRepeat="no-repeat",v.style.backgroundSize="100% 100%",v.style.width="24px",v.innerText="");return v};EditorUi.prototype.createMenuItem=function(e,f,g){var v=document.createElement("a");v.className="geToolbarButton";v.setAttribute("title",
-mxResources.get(e));v.style.backgroundImage="url("+f+")";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";v.style.backgroundSize="100% 100%";v.style.display="inline-block";v.style.cursor="pointer";v.style.marginLeft="6px";v.style.width="24px";v.style.height="24px";var y=this.actions.get(e);null!=y&&(mxEvent.addListener(v,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(v,"click",function(C){"disabled"!=
-v.getAttribute("disabled")&&y.funct(C);mxEvent.consume(C)}),g||(e=function(){y.isEnabled()?(v.removeAttribute("disabled"),v.style.cursor="pointer"):(v.setAttribute("disabled","disabled"),v.style.cursor="default");v.style.opacity=y.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",e),y.addListener("stateChanged",e),e()));return v};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var e=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==
-urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),e,f,240,g,mxUtils.bind(this,function(v){v.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};
-var p=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(e){var f=this.formatWindow;null!=f?f.window.setVisible(null!=e?e:!this.isFormatPanelVisible()):p.apply(this,arguments)};var E=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var e=this.formatWindow;return null!=e?e.window.isVisible():E.apply(this,arguments)};var M=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){if(null!=this.sketchWrapperElt&&null!=
-this.sketchWrapperElt.parentNode){e=null!=e?e:!0;var f=this.getDiagramContainerOffset();this.diagramContainer.style.left=f.x+"px";this.diagramContainer.style.top=f.y+"px";this.diagramContainer.style.right="0";this.diagramContainer.style.bottom="0";e&&this.editor.graph.sizeDidChange()}else M.apply(this,arguments)};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var e=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
-650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?66:10,"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,e-6,f-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
-0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(e){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(e);null==urlParams.rough&&(mxSettings.settings.sketchMode=e,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+
-(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
-"html > body > div > .geToolbarContainer { box-shadow:0px 2px 10px #e0e0e0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
+D(this.sidebar.createEdgeTemplateFromCells([N],N.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(v,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(x)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){B?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="48px",f.style.top="50%",f.style.bottom="",f.style.height="",
+g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.width="100%",g.style.height="14px",B=!1,I()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.width="auto",f.style.bottom="12px",f.style.padding="0px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.width="24px",g.style.height="24px",B=!0)}));this.addListener("darkModeChanged",
+I);this.addListener("sketchModeChanged",I);I();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(d){"simple"==d?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="display:flex;position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;flex-wrap:nowrap;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;max-width:calc(100% - 170px);min-width:40px;justify-content:flex-end;align-items:center;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt),d=mxUtils.bind(this,function(){var f=58>this.sketchPickerMenuElt.offsetTop-this.sketchPickerMenuElt.offsetHeight/2;this.sketchMainMenuElt.style.left=f?"70px":"10px";this.sketchMenubarElt.style.maxWidth=f?"calc(100% - 230px)":"calc(100% - 170px)"}),d(),mxEvent.addListener(window,"resize",d)),null!=this.statusContainer&&(this.statusContainer.style.flexShrink="1",this.sketchMenubarElt.appendChild(this.statusContainer)),null!=this.userElement&&
+(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement)),d=this.menubar.langIcon,null!=d&&(d.style.position="",d.style.height="21px",d.style.width="21px",d.style.flexShrink="0",this.sketchMenubarElt.appendChild(d)),null!=this.buttonContainer&&(this.buttonContainer.style.flexShrink="0",this.buttonContainer.style.padding="0px",this.buttonContainer.style.position="",this.sketchMenubarElt.appendChild(this.buttonContainer))):(null!=this.statusContainer&&
+(this.menubar.container.appendChild(this.statusContainer),this.statusContainer.style.flexShrink="",this.statusContainer.style.overflow=""),null!=this.userElement&&(this.userElement.style.flexShrink="",this.userElement.style.top="3px",this.menubarContainer.appendChild(this.userElement)),d=this.menubar.langIcon,null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.flexShrink="",this.menubarContainer.parentNode.insertBefore(d,this.menubarContainer)))};EditorUi.prototype.createMenu=
+function(d,f,g){g=null!=g?g:"geToolbarButton";var v=this.menus.get(d),x=this.menubar.addMenu(mxResources.get(d),v.funct);x.className=g;x.style.display="inline-block";x.style.cursor="pointer";x.style.height="24px";x.setAttribute("title",mxResources.get(d));this.menus.menuCreated(v,x,g);null!=f&&(x.style.backgroundImage="url("+f+")",x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize="100% 100%",x.style.width="24px",x.innerText="");return x};EditorUi.prototype.createToolbarButton=
+function(d,f,g,v){v=null!=v?v:24;var x=document.createElement("a");x.className="geToolbarButton geAdaptiveAsset";x.setAttribute("title",f);x.style.backgroundImage="url("+d+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="100% 100%";x.style.display="inline-block";x.style.cursor="pointer";x.style.marginLeft="6px";x.style.width=v+"px";x.style.height=v+"px";null!=g&&(mxEvent.addListener(x,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
+function(B){B.preventDefault()})),mxEvent.addListener(x,"click",function(B){"disabled"!=x.getAttribute("disabled")&&g(B);mxEvent.consume(B)}));return x};EditorUi.prototype.createMenuItem=function(d,f,g){var v=this.actions.get(d),x=null!=v?v.funct:null,B=this.createToolbarButton(f,mxResources.get(d),x);null==v||g||(d=function(){v.isEnabled()?(B.removeAttribute("disabled"),B.style.cursor="pointer"):(B.setAttribute("disabled","disabled"),B.style.cursor="default");B.style.opacity=v.isEnabled()?"":"0.2"},
+this.editor.graph.addListener("enabledChanged",d),v.addListener("stateChanged",d),d());return B};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,
+function(v){v.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};var p=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var f=this.formatWindow;null!=f?f.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):p.apply(this,arguments)};var E=EditorUi.prototype.isFormatPanelVisible;
+EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():E.apply(this,arguments)};var M=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){d=null!=d?d:!0;var f=this.getDiagramContainerOffset();this.diagramContainer.style.left=f.x+"px";this.diagramContainer.style.top=f.y+"px";this.diagramContainer.style.right="0";this.diagramContainer.style.bottom="0";d&&this.editor.graph.sizeDidChange()}else M.apply(this,
+arguments)};EditorUi.prototype.createShapesPanel=function(d){var f=document.createElement("div");f.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;";f.className="geTitle";var g=document.createElement("span");g.style.fontSize="18px";g.style.marginRight="5px";g.innerHTML="+";f.appendChild(g);mxUtils.write(f,mxResources.get("moreShapes"));d.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,
+function(){this.actions.get("shapes").funct()}));g=mxUtils.bind(this,function(v,x){v=this.createMenu(v,null,"geTitle");v.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;";d.appendChild(v);return v});!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?f.style.bottom="0":null!=this.actions.get("newLibrary")?(f=document.createElement("div"),f.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+f.className="geTitle",g=document.createElement("span"),g.style.cssText="position:relative;top:6px;",mxUtils.write(g,mxResources.get("newLibrary")),f.appendChild(g),d.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.borderLeft="1px solid lightgray",g=g.cloneNode(!1),mxUtils.write(g,mxResources.get("openLibrary")),f.appendChild(g),d.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct)):(f=g("newLibrary",
+mxResources.get("newLibrary")),f.style.boxSizing="border-box",f.style.paddingRight="6px",f.style.paddingLeft="6px",f.style.height="32px",f.style.left="0",f=g("openLibraryFrom",mxResources.get("openLibraryFrom")),f.style.borderLeft="1px solid lightgray",f.style.boxSizing="border-box",f.style.paddingRight="6px",f.style.paddingLeft="6px",f.style.height="32px",f.style.left="50%");d.appendChild(this.sidebarContainer);d.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==
+this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?66:10,"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,d-6,f-6,mxUtils.bind(this,function(g){this.createShapesPanel(g)}));
+this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());
+this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+"html > body > div > .geToolbarContainer { box-shadow:0px 2px 10px #e0e0e0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html body .geStatus > *:not([class]) { vertical-align:top; }html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }html body .geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+
"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(e){this.doSetDarkMode(e);this.fireEvent(new mxEventObject("darkModeChanged"))};var S=document.createElement("link");S.setAttribute("rel","stylesheet");S.setAttribute("href",STYLE_PATH+"/dark.css");S.setAttribute("charset","UTF-8");S.setAttribute("type","text/css");
-EditorUi.prototype.doSetDarkMode=function(e){if(Editor.darkMode!=e){var f=this.editor.graph;Editor.darkMode=e;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":
-"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&(e=this.actions.layersWindow.window.isVisible(),
-this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,e&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=f.defaultPageBorderColor;
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(d){this.doSetDarkMode(d);this.fireEvent(new mxEventObject("darkModeChanged"))};var S=document.createElement("link");S.setAttribute("rel","stylesheet");S.setAttribute("href",STYLE_PATH+"/dark.css");S.setAttribute("charset","UTF-8");S.setAttribute("type","text/css");
+EditorUi.prototype.doSetDarkMode=function(d){if(Editor.darkMode!=d){var f=this.editor.graph;Editor.darkMode=d;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":
+"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&(d=this.actions.layersWindow.window.isVisible(),
+this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,d&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=f.defaultPageBorderColor;
Graph.prototype.shapeBackgroundColor=f.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=f.shapeForegroundColor;Graph.prototype.defaultThemeName=f.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=
Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==S.parentNode&&document.getElementsByTagName("head")[0].appendChild(S):
-null!=S.parentNode&&S.parentNode.removeChild(S)}};EditorUi.prototype.setPagesVisible=function(e){Editor.pagesVisible!=e&&(Editor.pagesVisible=e,mxSettings.settings.pagesVisible=e,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(e,f){this.sidebar.sidebarTitles!=e&&(this.sidebar.sidebarTitles=e,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=e,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
-EditorUi.prototype.setInlineFullscreen=function(e){Editor.inlineFullscreen!=e&&(Editor.inlineFullscreen=e,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(e){Editor.sketchMode!=
-e&&(Editor.sketchMode=e,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var e=this.editor.graph;e.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)e.defaultEdgeStyle.fontSize=null,e.defaultVertexStyle.fontSize=
-null;else{e.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;e.defaultEdgeStyle.fontSize=f}"simple"==Editor.currentTheme&&(e.defaultEdgeStyle.edgeStyle="none",e.defaultEdgeStyle.curved="1",e.defaultEdgeStyle.rounded="0",e.defaultEdgeStyle.jettySize="auto",e.defaultEdgeStyle.orthogonalLoop="1",e.defaultEdgeStyle.endArrow="open",e.defaultEdgeStyle.endSize="14",e.defaultEdgeStyle.startSize="14",e.defaultEdgeStyle.sourcePerimeterSpacing="8",e.defaultEdgeStyle.targetPerimeterSpacing=
-"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),e.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,e.defaultVertexStyle.fontSource=Editor.sketchFontSource,e.defaultVertexStyle.hachureGap="4",e.defaultVertexStyle.sketch="1",e.defaultVertexStyle.jiggle="2",e.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,e.defaultEdgeStyle.fontSource=Editor.sketchFontSource,e.defaultEdgeStyle.sketch="1",e.defaultEdgeStyle.jiggle="2",e.defaultEdgeStyle.hachureGap=
-"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(e){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(e)){var g=e.indexOf(",");0<g&&(f=this.getPageById(e.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==e.substring(0,5)&&(f=mxResources.get("action"));return f};
-EditorUi.prototype.handleCustomLink=function(e){if(Graph.isPageLink(e)){var f=e.indexOf(",");if(e=this.getPageById(e.substring(f+1)))this.selectPage(e);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(e)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
-ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(e){e.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(e,
-f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(e=f.getProperty("customFonts"),this.menus.customFonts=e,mxSettings.setCustomFonts(e));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(e,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
-null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(e,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
-mxUtils.bind(this,function(e,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(e,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
-this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(e,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(v,y){try{this.spinner.stop();var C=this.createImageDataUri(v,f,"png"),I=parseInt(y.getAttribute("width")),D=parseInt(y.getAttribute("height"));this.writeImageToClipboard(C,I,D,mxUtils.bind(this,function(N){this.handleError(N)}))}catch(N){this.handleError(N)}}),null,null,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!1,null,0<e.length?e:null)}catch(v){this.handleError(v)}};EditorUi.prototype.writeImageToClipboard=function(e,f,g,v){var y=this.base64ToBlob(e.substring(e.indexOf(",")+1),"image/png");e=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+e+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([e])["catch"](v)};EditorUi.prototype.copyCells=function(e,f){var g=this.editor.graph;if(g.isSelectionEmpty())e.innerText="";else{var v=
-mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(v));mxUtils.setTextContent(e,encodeURIComponent(y));f?(g.removeCells(v,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);e.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var e=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(e=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
-f=mxUtils.getXml(f.encodeCells(e)),navigator.clipboard.writeText(f))}return e};EditorUi.prototype.pasteXml=function(e,f,g,v){var y=this.editor.graph,C=null;y.lastPasteXml==e?y.pasteCounter++:(y.lastPasteXml=e,y.pasteCounter=0);var I=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(e))C=this.importXml(e,I,I),y.setSelectionCells(C);else if(f&&1==y.getSelectionCount()){I=y.getStartEditingCell(y.getSelectionCell(),v);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==y.getCurrentCellStyle(I)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,
-e,[I]);else{y.model.beginUpdate();try{y.labelChanged(I,e),Graph.isLink(e)&&y.setLinkForCell(I,e)}finally{y.model.endUpdate()}}y.setSelectionCell(I)}else C=y.getInsertPoint(),y.isMouseInsertPoint()&&(I=0,y.lastPasteXml==e&&0<y.pasteCounter&&y.pasteCounter--),C=this.insertTextAt(e,C.x+I,C.y+I,!0),y.setSelectionCells(C);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return C};EditorUi.prototype.pasteCells=
-function(e,f,g,v){if(!mxEvent.isConsumed(e)){var y=f,C=!1;if(g&&null!=e.clipboardData&&e.clipboardData.getData){var I=e.clipboardData.getData("text/plain"),D=!1;if(null!=I&&0<I.length&&"%3CmxGraphModel%3E"==I.substring(0,18))try{var N=decodeURIComponent(I);this.isCompatibleString(N)&&(D=!0,I=N)}catch(pa){}D=D?null:e.clipboardData.getData("text/html");null!=D&&0<D.length?(y=this.parseHtmlData(D),C="text/plain"!=y.getAttribute("data-type")):null!=I&&0<I.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,
-D))}I=y.getElementsByTagName("span");if(null!=I&&0<I.length&&"application/vnd.lucid.chart.objects"===I[0].getAttribute("data-lucid-type"))g=I[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(pa){var ra=this.editor.graph;ra.lastPasteXml==pa?ra.pasteCounter++:(ra.lastPasteXml=pa,ra.pasteCounter=0);var L=ra.pasteCounter*ra.gridSize;ra.setSelectionCells(this.importXml(pa,L,L));ra.scrollCellToVisible(ra.getSelectionCell())}),mxUtils.bind(this,
-function(pa){this.handleError(pa)})),mxEvent.consume(e));else{var G=C?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),ia=!1;try{var ka=G.lastIndexOf("%3E");0<=ka&&ka<G.length-3&&(G=G.substring(0,ka+3))}catch(pa){}try{I=y.getElementsByTagName("span"),(N=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(G))&&(this.isCompatibleString(N)||0==N.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ia=!0,G=N)}catch(pa){}try{if(null!=
-G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ja=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,v,ia,e)}catch(pa){console.log("Miro import error:",pa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ja):ja()}else this.pasteXml(G,v,ia,e);try{mxEvent.consume(e)}catch(pa){}}else if(!g){var ca=this.editor.graph;ca.lastPasteXml=null;ca.pasteCounter=0}}catch(pa){this.handleError(pa)}}}f.innerHTML=
-"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(e){if(Graph.fileSupport)for(var f=null,g=0;g<e.length;g++)mxEvent.addListener(e[g],"dragleave",function(v){null!=f&&(f.parentNode.removeChild(f),f=null);v.stopPropagation();v.preventDefault()}),mxEvent.addListener(e[g],"dragover",mxUtils.bind(this,function(v){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());v.stopPropagation();v.preventDefault()})),
-mxEvent.addListener(e[g],"drop",mxUtils.bind(this,function(v){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<v.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(v.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(v)&&!mxEvent.isShiftDown(v)):this.openFiles(v.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(v);if(null==y){var C=null!=v.dataTransfer?v.dataTransfer:
-v.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?y=C.getData("Text"):(y=null,y=0<=mxUtils.indexOf(C.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=y&&0<y.length?(C=document.createElement("div"),C.innerHTML=this.editor.graph.sanitizeHtml(y),C=C.getElementsByTagName("img"),0<C.length&&(y=C[0].getAttribute("src"))):0<=mxUtils.indexOf(C.types,"text/plain")&&(y=C.getData("text/plain"))),
-null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(I){200<=I.getStatus()&&299>=I.getStatus()&&this.openLocalFile(I.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash=
-"#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}v.stopPropagation();v.preventDefault()}))};EditorUi.prototype.highlightElement=function(e){var f=0,g=0;if(null==e){var v=document.body;var y=document.documentElement;var C=(v.clientWidth||y.clientWidth)-3;v=Math.max(v.clientHeight||0,y.clientHeight)-3}else f=e.offsetTop,g=e.offsetLeft,C=e.clientWidth,
-v=e.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,C-3)+"px";y.style.height=Math.max(0,v-3)+"px";null!=e&&e.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(e){e=mxUtils.parseXml(e);
-var f=this.editor.extractGraphModel(e.documentElement);e=[];if(null!=f){var g=new mxCodec(f.ownerDocument),v=new mxGraphModel;g.decode(f,v);f=v.getChildAt(v.getRoot(),0);for(g=0;g<v.getChildCount(f);g++)e.push(v.getChildAt(f,g))}return e};EditorUi.prototype.openFileHandle=function(e,f,g,v,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var C=mxUtils.bind(this,function(D){f=0<=
-f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,v)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();
-C(D)}));else if(/(\.*<graphml )/.test(e))this.importGraphML(e,mxUtils.bind(this,function(D){this.spinner.stop();C(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),200<=D.status&&299>=D.status?C(D.responseText):this.handleError({message:mxResources.get(413==D.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(e))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(e,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,v)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==e.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
-this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,e,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==e.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();C(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(e,f,v)}));else{if("image/png"==g.type.substring(0,9))e=this.extractGraphModelFromPng(e);else if("application/pdf"==g.type){var I=Editor.extractGraphModelFromPdf(e);null!=I&&(y=null,v=!0,
-e=I)}this.spinner.stop();this.openLocalFile(e,f,v,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(e,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<e.length;g++)mxUtils.bind(this,function(v){var y=new FileReader;y.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,v.name,v,f)}catch(I){this.handleError(I)}});y.onerror=mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==v.type.substring(0,
-5)&&"application/pdf"!==v.type||"image/svg"===v.type.substring(0,9)?y.readAsText(v):y.readAsDataURL(v)})(e[g])};EditorUi.prototype.openLocalFile=function(e,f,g,v,y){var C=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(e);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,e,f||this.defaultFilename,g,v,y))});if(null!=
-e&&0<e.length)null==C||!C.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)&&null!=C&&C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(e,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=C&&C.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var e={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,e);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),e);f=[];for(var g in e)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(e,f){function g(I){if(null!=
-I){var D=I.lastIndexOf(".");0<D&&(I=I.substring(D+1,I.length));null==f[I]&&(f[I]=!0)}}var v=this.editor.graph,y=v.getCellStyle(e);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));v.model.isEdge(e)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=v.model.getChildCount(e);for(var C=0;C<y;C++)this.addBasenamesForCell(v.model.getChildAt(e,C),f)};EditorUi.prototype.setGraphEnabled=function(e){this.diagramContainer.style.visibility=
-e?"":"hidden";this.formatContainer.style.visibility=e?"":"hidden";this.sidebarFooterContainer.style.display=e?"":"none";this.sidebarContainer.style.display=e?"":"none";this.hsplit.style.display=e?"":"none";this.editor.graph.setEnabled(e);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=e?"":"hidden",this.ruler.vRuler.container.style.visibility=e?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=e?"":"hidden");e||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
-null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var e=
-!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,v,y){e||(e=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var I=C.model.cells,D;for(D in I){var N=I[D];null!=N&&null!=N.style&&(N.style+=";sketch=1;"+(-1==N.style.indexOf("fontFamily=")||-1<N.style.indexOf("fontFamily=Helvetica;")?
-"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=v?v:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
-function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(e,f){null!=e?e.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(e){var f=this.editor.graph;return{event:e,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
-scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(e){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var v=f.background;if(null==v||v==mxConstants.NONE)v=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",
-point:this.embedExitPoint,exit:null!=e?!e:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,v,1,this.embedExportBorder)}else e||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");e||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
-function(e){var f=null,g=!1,v=!1,y=null,C=mxUtils.bind(this,function(N,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(N){if(N.source==(window.opener||window.parent)){var G=N.data,ia=null,ka=mxUtils.bind(this,function(oa){if(null!=oa&&"function"===
-typeof oa.charAt&&"<"!=oa.charAt(0))try{Editor.isPngDataUrl(oa)?oa=Editor.extractGraphModelFromPng(oa):"data:image/svg+xml;base64,"==oa.substring(0,26)?oa=atob(oa.substring(26)):"data:image/svg+xml;utf8,"==oa.substring(0,24)&&(oa=oa.substring(24)),null!=oa&&("%"==oa.charAt(0)?oa=decodeURIComponent(oa):"<"!=oa.charAt(0)&&(oa=Graph.decompress(oa)))}catch(Aa){}return oa});if("json"==urlParams.proto){var ja=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[N],"data",
-[G])}catch(oa){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var ca=new FilenameDialog(this,G.defaultValue||"",null!=
-G.okKey?mxResources.get(G.okKey):G.ok,function(oa){null!=oa?I.postMessage(JSON.stringify({event:"prompt",value:oa,message:G}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(ca.container,300,80,!0,!1);ca.init();return}if("draft"==G.action){var pa=ka(G.xml);this.spinner.stop();ca=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),pa,mxUtils.bind(this,function(){this.hideDialog();
-I.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(ca.container,640,480,!0,!1,mxUtils.bind(this,function(oa){oa&&
-this.actions.get("exit").funct()}));try{ca.init()}catch(oa){I.postMessage(JSON.stringify({event:"draft",error:oa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var ra=1==G.enableRecent,L=1==G.enableSearch,V=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var R=this.getCurrentUser(),Y=new TemplatesDialog(this,function(oa,Aa,ya){oa=oa||this.emptyDiagramXml;I.postMessage(JSON.stringify({event:"template",xml:oa,blank:oa==this.emptyDiagramXml,
-name:Aa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=R?R.id:null,ra?mxUtils.bind(this,function(oa,Aa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,oa,Aa)}):null,L?mxUtils.bind(this,function(oa,Aa,ya,La){this.remoteInvoke("searchDiagrams",[oa,La],null,Aa,ya)}):null,mxUtils.bind(this,function(oa,Aa,ya){this.remoteInvoke("getFileContent",[oa.url],null,Aa,ya)}),null,
-V?mxUtils.bind(this,function(oa){this.remoteInvoke("getCustomTemplates",null,null,oa,function(){oa({},0)})}):null,!1,!1,!0,!0);this.showDialog(Y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}ca=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(oa,Aa,ya,La){oa=oa||this.emptyDiagramXml;null!=G.callback?I.postMessage(JSON.stringify({event:"template",xml:oa,blank:oa==this.emptyDiagramXml,name:Aa,tempUrl:ya,libs:La,builtIn:!0,message:G}),"*"):
-(e(oa,N,oa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ra?mxUtils.bind(this,function(oa){this.remoteInvoke("getRecentDiagrams",[null],null,oa,function(){oa(null,"Network Error!")})}):null,L?mxUtils.bind(this,function(oa,Aa){this.remoteInvoke("searchDiagrams",[oa,null],null,Aa,function(){Aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(oa,Aa,ya){I.postMessage(JSON.stringify({event:"template",docUrl:oa,info:Aa,
-name:ya}),"*")}),null,null,V?mxUtils.bind(this,function(oa){this.remoteInvoke("getCustomTemplates",null,null,oa,function(){oa({},0)})}):null,1==G.withoutType);this.showDialog(ca.container,620,460,!0,!1,mxUtils.bind(this,function(oa){this.sidebar.hideTooltip();oa&&this.actions.get("exit").funct()}));ca.init();return}if("textContent"==G.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:Z,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?
-this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var la=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,la):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=
-G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var q=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var F=this.editor.graph,T=mxUtils.bind(this,function(oa){this.editor.graph.setEnabled(!0);this.spinner.stop();var Aa=this.createLoadMessage("export");Aa.format=
-G.format;Aa.message=G;Aa.data=oa;Aa.xml=q;I.postMessage(JSON.stringify(Aa),"*")}),aa=mxUtils.bind(this,function(oa){null==oa&&(oa=Editor.blankImage);"xmlpng"==G.format&&(oa=Editor.writeGraphModelToPng(oa,"tEXt","mxfile",encodeURIComponent(q)));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container);T(oa)}),U=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var da=mxUtils.bind(this,function(){if(null!=this.pages&&
-this.currentPage.getId()!=U){var oa=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());for(var Aa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==U){Aa=this.updatePageRoot(this.pages[ya]);break}null==Aa&&(Aa=this.currentPage);F.getGlobalVariable=function(Ia){return"page"==Ia?Aa.getName():"pagenumber"==Ia?1:oa.apply(this,arguments)};document.body.appendChild(F.container);F.model.setRoot(Aa.root)}if(null!=G.layerIds){var La=F.model,Oa=La.getChildCells(La.getRoot()),Na={};for(ya=
-0;ya<G.layerIds.length;ya++)Na[G.layerIds[ya]]=!0;for(ya=0;ya<Oa.length;ya++)La.setVisible(Oa[ya],Na[Oa[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){aa(Ia.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){aa(null)}),null,null,G.scale,G.transparent,G.shadow,null,F,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(q),g=!1);da()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":
-"0")+(null!=U?"&pageId="+U:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(q))).send(mxUtils.bind(this,function(oa){200<=oa.getStatus()&&299>=oa.getStatus()?T("data:image/png;base64,"+oa.getText()):aa(null)}),mxUtils.bind(this,function(){aa(null)}))}}else if(da=mxUtils.bind(this,function(){var oa=this.createLoadMessage("export");oa.message=G;if("html2"==G.format||
-"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Aa=this.getXmlFileData();oa.xml=mxUtils.getXml(Aa);oa.data=this.getFileData(null,null,!0,null,null,null,Aa);oa.format=G.format}else if("html"==G.format)Aa=this.editor.getGraphXml(),oa.data=this.getHtml(Aa,this.editor.graph),oa.xml=mxUtils.getXml(Aa),oa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Aa=null!=G.background?G.background:this.editor.graph.background;Aa==mxConstants.NONE&&(Aa=null);oa.xml=
-this.getFileData(!0,null,null,null,null,null,null,null,null,!1);oa.format="svg";var ya=mxUtils.bind(this,function(La){this.editor.graph.setEnabled(!0);this.spinner.stop();oa.data=Editor.createSvgDataUri(La);I.postMessage(JSON.stringify(oa),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(oa.xml,this.editor.graph,null,!0,ya,null,null,G.embedImages,Aa,G.scale,G.border,G.shadow,G.keepTheme);
-else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Aa=this.editor.graph.getSvg(Aa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Aa),this.embedFonts(Aa,mxUtils.bind(this,function(La){G.embedImages||null==G.embedImages?this.editor.convertImages(La,mxUtils.bind(this,
-function(Oa){ya(mxUtils.getXml(Oa))})):ya(mxUtils.getXml(La))}));return}I.postMessage(JSON.stringify(oa),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var fa=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){fa.apply(this,arguments);da()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||da()}else da();return}if("load"==G.action){ja=G.toSketch;v=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=
-G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var na=Editor.sketchMode;this.doSetSketchMode(G.rough);na!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&this.setDarkMode(G.dark);null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=
+null!=S.parentNode&&S.parentNode.removeChild(S)}};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=
+d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)d.defaultEdgeStyle.fontSize=null,d.defaultVertexStyle.fontSize=
+null;else{d.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;d.defaultEdgeStyle.fontSize=f}"simple"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing=
+"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.jiggle="2",d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.jiggle="2",d.defaultEdgeStyle.hachureGap=
+"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};
+EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
+ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,
+f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
+mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(v,x){try{this.spinner.stop();var B=this.createImageDataUri(v,f,"png"),I=parseInt(x.getAttribute("width")),D=parseInt(x.getAttribute("height"));this.writeImageToClipboard(B,I,D,mxUtils.bind(this,function(N){this.handleError(N)}))}catch(N){this.handleError(N)}}),null,null,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(v){this.handleError(v)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,v){var x=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":x,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](v)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var v=
+mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),x=mxUtils.getXml(g.encodeCells(v));mxUtils.setTextContent(d,encodeURIComponent(x));f?(g.removeCells(v,!1),g.lastPasteXml=null):(g.lastPasteXml=x,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
+f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,v){var x=this.editor.graph,B=null;x.lastPasteXml==d?x.pasteCounter++:(x.lastPasteXml=d,x.pasteCounter=0);var I=x.pasteCounter*x.gridSize;if(g||this.isCompatibleString(d))B=this.importXml(d,I,I),x.setSelectionCells(B);else if(f&&1==x.getSelectionCount()){I=x.getStartEditingCell(x.getSelectionCell(),v);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==x.getCurrentCellStyle(I)[mxConstants.STYLE_SHAPE])x.setCellStyles(mxConstants.STYLE_IMAGE,
+d,[I]);else{x.model.beginUpdate();try{x.labelChanged(I,d),Graph.isLink(d)&&x.setLinkForCell(I,d)}finally{x.model.endUpdate()}}x.setSelectionCell(I)}else B=x.getInsertPoint(),x.isMouseInsertPoint()&&(I=0,x.lastPasteXml==d&&0<x.pasteCounter&&x.pasteCounter--),B=this.insertTextAt(d,B.x+I,B.y+I,!0),x.setSelectionCells(B);x.isSelectionEmpty()||(x.scrollCellToVisible(x.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(x.view.getState(x.getSelectionCell())));return B};EditorUi.prototype.pasteCells=
+function(d,f,g,v){if(!mxEvent.isConsumed(d)){var x=f,B=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var I=d.clipboardData.getData("text/plain"),D=!1;if(null!=I&&0<I.length&&"%3CmxGraphModel%3E"==I.substring(0,18))try{var N=decodeURIComponent(I);this.isCompatibleString(N)&&(D=!0,I=N)}catch(pa){}D=D?null:d.clipboardData.getData("text/html");null!=D&&0<D.length?(x=this.parseHtmlData(D),B="text/plain"!=x.getAttribute("data-type")):null!=I&&0<I.length&&(x=document.createElement("div"),mxUtils.setTextContent(x,
+D))}I=x.getElementsByTagName("span");if(null!=I&&0<I.length&&"application/vnd.lucid.chart.objects"===I[0].getAttribute("data-lucid-type"))g=I[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(pa){var ra=this.editor.graph;ra.lastPasteXml==pa?ra.pasteCounter++:(ra.lastPasteXml=pa,ra.pasteCounter=0);var L=ra.pasteCounter*ra.gridSize;ra.setSelectionCells(this.importXml(pa,L,L));ra.scrollCellToVisible(ra.getSelectionCell())}),mxUtils.bind(this,
+function(pa){this.handleError(pa)})),mxEvent.consume(d));else{var G=B?x.innerHTML:mxUtils.trim(null==x.innerText?mxUtils.getTextContent(x):x.innerText),ia=!1;try{var ka=G.lastIndexOf("%3E");0<=ka&&ka<G.length-3&&(G=G.substring(0,ka+3))}catch(pa){}try{I=x.getElementsByTagName("span"),(N=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(G))&&(this.isCompatibleString(N)||0==N.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ia=!0,G=N)}catch(pa){}try{if(null!=
+G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ja=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,v,ia,d)}catch(pa){console.log("Miro import error:",pa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ja):ja()}else this.pasteXml(G,v,ia,d);try{mxEvent.consume(d)}catch(pa){}}else if(!g){var ca=this.editor.graph;ca.lastPasteXml=null;ca.pasteCounter=0}}catch(pa){this.handleError(pa)}}}f.innerHTML=
+"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(v){null!=f&&(f.parentNode.removeChild(f),f=null);v.stopPropagation();v.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(v){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());v.stopPropagation();v.preventDefault()})),
+mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(v){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<v.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(v.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(v)&&!mxEvent.isShiftDown(v)):this.openFiles(v.dataTransfer.files,!0);else{var x=this.extractGraphModelFromEvent(v);if(null==x){var B=null!=v.dataTransfer?v.dataTransfer:
+v.clipboardData;null!=B&&(10==document.documentMode||11==document.documentMode?x=B.getData("Text"):(x=null,x=0<=mxUtils.indexOf(B.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(B.types,"text/html")?B.getData("text/html"):null,null!=x&&0<x.length?(B=document.createElement("div"),B.innerHTML=this.editor.graph.sanitizeHtml(x),B=B.getElementsByTagName("img"),0<B.length&&(x=B[0].getAttribute("src"))):0<=mxUtils.indexOf(B.types,"text/plain")&&(x=B.getData("text/plain"))),
+null!=x&&(Editor.isPngDataUrl(x)?(x=Editor.extractGraphModelFromPng(x),null!=x&&0<x.length&&this.openLocalFile(x,null,!0)):this.isRemoteFileFormat(x)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(x))).send(mxUtils.bind(this,function(I){200<=I.getStatus()&&299>=I.getStatus()?this.openLocalFile(I.getText(),null,!0):this.showError(mxResources.get("error"),413==I.getStatus()?mxResources.get("diagramTooLarge"):
+mxResources.get("unknownError"))})):/^https?:\/\//.test(x)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(x):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,!0)}v.stopPropagation();v.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var v=document.body;var x=document.documentElement;var B=(v.clientWidth||
+x.clientWidth)-3;v=Math.max(v.clientHeight||0,x.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,B=d.clientWidth,v=d.clientHeight;x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";x.style.pointerEvents="none";x.style.position="absolute";x.style.top=f+"px";x.style.left=g+"px";x.style.width=Math.max(0,B-3)+"px";x.style.height=Math.max(0,v-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):
+document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),v=new mxGraphModel;g.decode(f,v);f=v.getChildAt(v.getRoot(),0);for(g=0;g<v.getChildCount(f);g++)d.push(v.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,v,x){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
+/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var B=mxUtils.bind(this,function(D){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,v)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
+/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),
+200<=D.status&&299>=D.status?B(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,v)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,v)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
+g.type){var I=Editor.extractGraphModelFromPdf(d);null!=I&&(x=null,v=!0,d=I)}this.spinner.stop();this.openLocalFile(d,f,v,x,null!=x?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(v){var x=new FileReader;x.onload=mxUtils.bind(this,function(B){try{this.openFileHandle(B.target.result,v.name,v,f)}catch(I){this.handleError(I)}});x.onerror=mxUtils.bind(this,function(B){this.spinner.stop();
+this.handleError(B);window.openFile=null});"image"!==v.type.substring(0,5)&&"application/pdf"!==v.type||"image/svg"===v.type.substring(0,9)?x.readAsText(v):x.readAsDataURL(v)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,v,x){var B=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+d,f||this.defaultFilename,g,v,x))});if(null!=d&&0<d.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
+B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
+function(d,f){function g(I){if(null!=I){var D=I.lastIndexOf(".");0<D&&(I=I.substring(D+1,I.length));null==f[I]&&(f[I]=!0)}}var v=this.editor.graph,x=v.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(x[mxConstants.STYLE_SHAPE]));v.model.isEdge(d)&&(g(mxMarker.getPackageForType(x[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(x[mxConstants.STYLE_ENDARROW])));x=v.model.getChildCount(d);for(var B=0;B<x;B++)this.addBasenamesForCell(v.model.getChildAt(d,B),f)};EditorUi.prototype.setGraphEnabled=
+function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
+d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,v,x){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(x)try{var B=this.editor.graph;B.setGridEnabled(!1);B.pageVisible=!1;var I=B.model.cells,D;for(D in I){var N=I[D];null!=
+N&&null!=N.style&&(N.style+=";sketch=1;"+(-1==N.style.indexOf("fontFamily=")||-1<N.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=v?v:!1;this.updateUi();
+window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
+pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var v=f.background;if(null==v||v==mxConstants.NONE)v=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
+null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(x){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,v,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,v=!1,x=null,B=mxUtils.bind(this,function(N,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,B);mxEvent.addListener(window,"message",mxUtils.bind(this,function(N){if(N.source==
+(window.opener||window.parent)){var G=N.data,ia=null,ka=mxUtils.bind(this,function(oa){if(null!=oa&&"function"===typeof oa.charAt&&"<"!=oa.charAt(0))try{Editor.isPngDataUrl(oa)?oa=Editor.extractGraphModelFromPng(oa):"data:image/svg+xml;base64,"==oa.substring(0,26)?oa=atob(oa.substring(26)):"data:image/svg+xml;utf8,"==oa.substring(0,24)&&(oa=oa.substring(24)),null!=oa&&("%"==oa.charAt(0)?oa=decodeURIComponent(oa):"<"!=oa.charAt(0)&&(oa=Graph.decompress(oa)))}catch(Aa){}return oa});if("json"==urlParams.proto){var ja=
+!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[N],"data",[G])}catch(oa){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==
+G.action){this.spinner.stop();var ca=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(oa){null!=oa?I.postMessage(JSON.stringify({event:"prompt",value:oa,message:G}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(ca.container,300,80,!0,!1);ca.init();return}if("draft"==G.action){var pa=ka(G.xml);this.spinner.stop();ca=new DraftDialog(this,mxResources.get("draftFound",
+[G.name||this.defaultFilename]),pa,mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),
+"*")}):null);this.showDialog(ca.container,640,480,!0,!1,mxUtils.bind(this,function(oa){oa&&this.actions.get("exit").funct()}));try{ca.init()}catch(oa){I.postMessage(JSON.stringify({event:"draft",error:oa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var ra=1==G.enableRecent,L=1==G.enableSearch,V=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var R=this.getCurrentUser(),Y=new TemplatesDialog(this,function(oa,Aa,ya){oa=oa||this.emptyDiagramXml;
+I.postMessage(JSON.stringify({event:"template",xml:oa,blank:oa==this.emptyDiagramXml,name:Aa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=R?R.id:null,ra?mxUtils.bind(this,function(oa,Aa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,oa,Aa)}):null,L?mxUtils.bind(this,function(oa,Aa,ya,La){this.remoteInvoke("searchDiagrams",[oa,La],null,Aa,ya)}):null,mxUtils.bind(this,
+function(oa,Aa,ya){this.remoteInvoke("getFileContent",[oa.url],null,Aa,ya)}),null,V?mxUtils.bind(this,function(oa){this.remoteInvoke("getCustomTemplates",null,null,oa,function(){oa({},0)})}):null,!1,!1,!0,!0);this.showDialog(Y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}ca=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(oa,Aa,ya,La){oa=oa||this.emptyDiagramXml;null!=G.callback?I.postMessage(JSON.stringify({event:"template",xml:oa,blank:oa==
+this.emptyDiagramXml,name:Aa,tempUrl:ya,libs:La,builtIn:!0,message:G}),"*"):(d(oa,N,oa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ra?mxUtils.bind(this,function(oa){this.remoteInvoke("getRecentDiagrams",[null],null,oa,function(){oa(null,"Network Error!")})}):null,L?mxUtils.bind(this,function(oa,Aa){this.remoteInvoke("searchDiagrams",[oa,null],null,Aa,function(){Aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(oa,
+Aa,ya){I.postMessage(JSON.stringify({event:"template",docUrl:oa,info:Aa,name:ya}),"*")}),null,null,V?mxUtils.bind(this,function(oa){this.remoteInvoke("getCustomTemplates",null,null,oa,function(){oa({},0)})}):null,1==G.withoutType);this.showDialog(ca.container,620,460,!0,!1,mxUtils.bind(this,function(oa){this.sidebar.hideTooltip();oa&&this.actions.get("exit").funct()}));ca.init();return}if("textContent"==G.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",
+data:Z,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var la=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,la):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();
+return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var q=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var F=this.editor.graph,T=mxUtils.bind(this,function(oa){this.editor.graph.setEnabled(!0);
+this.spinner.stop();var Aa=this.createLoadMessage("export");Aa.format=G.format;Aa.message=G;Aa.data=oa;Aa.xml=q;I.postMessage(JSON.stringify(Aa),"*")}),aa=mxUtils.bind(this,function(oa){null==oa&&(oa=Editor.blankImage);"xmlpng"==G.format&&(oa=Editor.writeGraphModelToPng(oa,"tEXt","mxfile",encodeURIComponent(q)));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container);T(oa)}),U=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var da=
+mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var oa=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());for(var Aa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==U){Aa=this.updatePageRoot(this.pages[ya]);break}null==Aa&&(Aa=this.currentPage);F.getGlobalVariable=function(Ia){return"page"==Ia?Aa.getName():"pagenumber"==Ia?1:oa.apply(this,arguments)};document.body.appendChild(F.container);F.model.setRoot(Aa.root)}if(null!=G.layerIds){var La=
+F.model,Oa=La.getChildCells(La.getRoot()),Na={};for(ya=0;ya<G.layerIds.length;ya++)Na[G.layerIds[ya]]=!0;for(ya=0;ya<Oa.length;ya++)La.setVisible(Oa[ya],Na[Oa[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){aa(Ia.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){aa(null)}),null,null,G.scale,G.transparent,G.shadow,null,F,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(q),g=!1);da()}else(new mxXmlRequest(EXPORT_URL,
+"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(q))).send(mxUtils.bind(this,function(oa){200<=oa.getStatus()&&299>=oa.getStatus()?T("data:image/png;base64,"+oa.getText()):aa(null)}),mxUtils.bind(this,function(){aa(null)}))}}else if(da=mxUtils.bind(this,function(){var oa=this.createLoadMessage("export");
+oa.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Aa=this.getXmlFileData();oa.xml=mxUtils.getXml(Aa);oa.data=this.getFileData(null,null,!0,null,null,null,Aa);oa.format=G.format}else if("html"==G.format)Aa=this.editor.getGraphXml(),oa.data=this.getHtml(Aa,this.editor.graph),oa.xml=mxUtils.getXml(Aa),oa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Aa=null!=G.background?G.background:this.editor.graph.background;Aa==
+mxConstants.NONE&&(Aa=null);oa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);oa.format="svg";var ya=mxUtils.bind(this,function(La){this.editor.graph.setEnabled(!0);this.spinner.stop();oa.data=Editor.createSvgDataUri(La);I.postMessage(JSON.stringify(oa),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(oa.xml,this.editor.graph,null,!0,ya,null,null,G.embedImages,
+Aa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Aa=this.editor.graph.getSvg(Aa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Aa),this.embedFonts(Aa,mxUtils.bind(this,function(La){G.embedImages||null==G.embedImages?this.editor.convertImages(La,
+mxUtils.bind(this,function(Oa){ya(mxUtils.getXml(Oa))})):ya(mxUtils.getXml(La))}));return}I.postMessage(JSON.stringify(oa),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var fa=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){fa.apply(this,arguments);da()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||da()}else da();return}if("load"==G.action){ja=G.toSketch;v=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=
+G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var na=Editor.sketchMode;this.doSetSketchMode(G.rough);na!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&this.setDarkMode(G.dark);null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=
G.viewport);this.embedExitPoint=null;if(null!=G.rect){var sa=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";ia=mxUtils.bind(this,function(){var oa=this.editor.graph,Aa=oa.maxFitScale;oa.maxFitScale=
G.maxFitScale;oa.fit(2*sa);oa.maxFitScale=Aa;oa.container.scrollTop-=2*sa;oa.container.scrollLeft-=2*sa;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(pa=document.createElement("span"),mxUtils.write(pa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(pa),this.embedFilenameSpan=
pa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(oa){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var za=this.getCurrentFile();null!=za&&(pa=ka(G.xml),null!=pa&&""!=pa&&za.mergeFile(new LocalFile(this,pa),function(){I.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(oa){I.postMessage(JSON.stringify({event:"merge",message:G,error:oa}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(I):
-"remoteInvoke"==G.action?this.handleRemoteInvoke(G,N.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(oa){this.handleError(oa)}}var ua=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ba=mxUtils.bind(this,function(oa,Aa){g=!0;try{e(oa,Aa,null,ja)}catch(ya){this.handleError(ya)}g=
-!1;null!=urlParams.modified&&this.editor.setStatus("");y=ua();v&&null==f&&(f=mxUtils.bind(this,function(ya,La){ya=ua();ya==y||g||(La=this.createLoadMessage("autosave"),La.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(La),"*"));y=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",
+"remoteInvoke"==G.action?this.handleRemoteInvoke(G,N.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(oa){this.handleError(oa)}}var ua=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ba=mxUtils.bind(this,function(oa,Aa){g=!0;try{d(oa,Aa,null,ja)}catch(ya){this.handleError(ya)}g=
+!1;null!=urlParams.modified&&this.editor.setStatus("");x=ua();v&&null==f&&(f=mxUtils.bind(this,function(ya,La){ya=ua();ya==x||g||(La=this.createLoadMessage("autosave"),La.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(La),"*"));x=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",
f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Aa=this.createLoadMessage("load"),Aa.xml=oa,I.postMessage(JSON.stringify(Aa),"*");null!=ia&&ia()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,
-34)?(ka="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(oa){Ba(oa,N)},mxUtils.bind(this,function(oa){this.handleError(oa)}),ka)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(oa){4==oa.readyState&&200<=oa.status&&299>=oa.status&&
-"<mxGraphModel"==oa.responseText.substring(0,13)&&Ba(oa.responseText,N)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(oa){Ba(oa)}),mxUtils.bind(this,function(oa){this.handleError(oa)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ka(G),Ba(G,N)):this.loadDescriptor(G,mxUtils.bind(this,function(oa){Ba(ua(),N)}),mxUtils.bind(this,function(oa){this.handleError(oa,mxResources.get("errorLoadingFile"))}))}}));
-var I=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(C,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(N,G,ia){D.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:N,target:G,allowOpener:ia}),"*")}}};EditorUi.prototype.createEmbedButton=function(e,f,g,v){var y="simple"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement(y?
-"a":"button");C.setAttribute("title",e+(null!=g?" ("+g+")":""));C.style.marginLeft="6px";mxUtils.write(C,e);y?(C.className="geMenuItem"+(v?" gePrimaryBtn":""),C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(v?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){if("1"!=urlParams.embedInline){var e=document.createElement("div");e.style.display="inline-block";document.createElement("button").className="geBigButton";
-"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&e.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,null,!0)):(e.appendChild(this.createEmbedButton(mxResources.get("save"),this.actions.get("save").funct,Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&e.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct)));"1"!=urlParams.noExitBtn&&
-e.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"==Editor.currentTheme||"min"==Editor.currentTheme?null!=this.buttonContainer&&(e.style.position="relative","simple"!=Editor.currentTheme&&(e.style.marginRight="4px","1"!=urlParams.sketch?(e.style.marginTop="6px",this.buttonContainer.style.top="6px"):this.buttonContainer.style.top="0px"),this.buttonContainer.appendChild(e),this.editor.fireEvent(new mxEventObject("statusChanged"))):
-null!=this.menubar&&(e.style.position="absolute",e.style.padding="2px",e.style.right="62px",this.toolbar.container.appendChild(e),this.toolbar.staticElements.push(e))}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(e){this.importCsv(e)}),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(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();e()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
-function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(e,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(e,f)}))};EditorUi.prototype.doImportCsv=function(e,f){try{var g=e.split("\n"),v=[],y=[],C=[],I={};if(0<g.length){var D={},N=this.editor.graph,G=null,ia=null,ka=null,ja=null,ca=null,pa=null,ra=null,L="whiteSpace=wrap;html=1;",
-V=null,R=null,Y="",Z="auto",la="auto",q=!1,F=null,T=null,aa=40,U=40,da=100,fa=0,na=mxUtils.bind(this,function(){null!=f?f(Ma):(N.setSelectionCells(Ma),N.scrollCellToVisible(N.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=N.getFreeInsertPoint(),za=sa.x,ua=sa.y;sa=ua;var Ba=null,oa="auto";R=null;for(var Aa=[],ya=null,La=null,Oa=0;Oa<g.length&&"#"==g[Oa].charAt(0);){e=g[Oa].replace(/\r$/,"");for(Oa++;Oa<g.length&&
-"\\"==e.charAt(e.length-1)&&"#"==g[Oa].charAt(0);)e=e.substring(0,e.length-1)+mxUtils.trim(g[Oa].substring(1)),Oa++;if("#"!=e.charAt(1)){var Na=e.indexOf(":");if(0<Na){var Ia=mxUtils.trim(e.substring(1,Na)),wa=mxUtils.trim(e.substring(Na+1));"label"==Ia?Ba=N.sanitizeHtml(wa):"labelname"==Ia&&0<wa.length&&"-"!=wa?ca=wa:"labels"==Ia&&0<wa.length&&"-"!=wa?ra=JSON.parse(wa):"style"==Ia?ia=wa:"parentstyle"==Ia?L=wa:"unknownStyle"==Ia&&"-"!=wa?pa=wa:"stylename"==Ia&&0<wa.length&&"-"!=wa?ja=wa:"styles"==
-Ia&&0<wa.length&&"-"!=wa?ka=JSON.parse(wa):"vars"==Ia&&0<wa.length&&"-"!=wa?G=JSON.parse(wa):"identity"==Ia&&0<wa.length&&"-"!=wa?V=wa:"parent"==Ia&&0<wa.length&&"-"!=wa?R=wa:"namespace"==Ia&&0<wa.length&&"-"!=wa?Y=wa:"width"==Ia?Z=wa:"height"==Ia?la=wa:"collapsed"==Ia&&"-"!=wa?q="true"==wa:"left"==Ia&&0<wa.length?F=wa:"top"==Ia&&0<wa.length?T=wa:"ignore"==Ia?La=wa.split(","):"connect"==Ia?Aa.push(JSON.parse(wa)):"link"==Ia?ya=wa:"padding"==Ia?fa=parseFloat(wa):"edgespacing"==Ia?aa=parseFloat(wa):
-"nodespacing"==Ia?U=parseFloat(wa):"levelspacing"==Ia?da=parseFloat(wa):"layout"==Ia&&(oa=wa)}}}if(null==g[Oa])throw Error(mxResources.get("invalidOrMissingFile"));var ab=this.editor.csvToArray(g[Oa].replace(/\r$/,""));Na=e=null;Ia=[];for(wa=0;wa<ab.length;wa++)V==ab[wa]&&(e=wa),R==ab[wa]&&(Na=wa),Ia.push(mxUtils.trim(ab[wa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ia[0]+"%");if(null!=Aa)for(var Ya=0;Ya<Aa.length;Ya++)null==D[Aa[Ya].to]&&(D[Aa[Ya].to]={});
-V=[];for(wa=Oa+1;wa<g.length;wa++){var x=this.editor.csvToArray(g[wa].replace(/\r$/,""));if(null==x){var O=40<g[wa].length?g[wa].substring(0,40)+"...":g[wa];throw Error(O+" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<x.length&&V.push(x)}N.model.beginUpdate();try{for(wa=0;wa<V.length;wa++){x=V[wa];var P=null,X=null!=e?Y+x[e]:null;g=!1;null!=X&&(P=N.model.getCell(X),g=null==P||0<=mxUtils.indexOf(v,P));var ba=new mxCell(Ba,new mxGeometry(za,sa,0,0),ia||"whiteSpace=wrap;html=1;");ba.collapsed=
-q;ba.vertex=!0;ba.id=X;null==P||g||N.model.setCollapsed(P,q);for(var W=0;W<x.length;W++)N.setAttributeForCell(ba,Ia[W],x[W]),null==P||g||N.setAttributeForCell(P,Ia[W],x[W]);if(null!=ca&&null!=ra){var ea=ra[ba.getAttribute(ca)];null!=ea&&(N.labelChanged(ba,ea),null==P||g||N.cellLabelChanged(P,ea))}if(null!=ja&&null!=ka){var ta=ka[ba.getAttribute(ja)];null!=ta&&(ba.style=ta)}N.setAttributeForCell(ba,"placeholders","1");ba.style=N.replacePlaceholders(ba,ba.style,G);null==P||g?N.fireEvent(new mxEventObject("cellsInserted",
-"cells",[ba])):(N.model.setStyle(P,ba.style),0>mxUtils.indexOf(C,P)&&C.push(P),N.fireEvent(new mxEventObject("cellsInserted","cells",[P])));g=null!=P;P=ba;if(!g)for(Ya=0;Ya<Aa.length;Ya++)D[Aa[Ya].to][P.getAttribute(Aa[Ya].to)]=P;null!=ya&&"link"!=ya&&(N.setLinkForCell(P,P.getAttribute(ya)),N.setAttributeForCell(P,ya,null));var qa=this.editor.graph.getPreferredSizeForCell(P);R=null!=Na?N.model.getCell(Y+x[Na]):null;if(P.vertex){O=null!=R?0:za;Oa=null!=R?0:ua;null!=F&&null!=P.getAttribute(F)&&(P.geometry.x=
-O+parseFloat(P.getAttribute(F)));null!=T&&null!=P.getAttribute(T)&&(P.geometry.y=Oa+parseFloat(P.getAttribute(T)));var va="@"==Z.charAt(0)?P.getAttribute(Z.substring(1)):null;P.geometry.width=null!=va&&"auto"!=va?parseFloat(P.getAttribute(Z.substring(1))):"auto"==Z||"auto"==va?qa.width+fa:parseFloat(Z);var Ea="@"==la.charAt(0)?P.getAttribute(la.substring(1)):null;P.geometry.height=null!=Ea&&"auto"!=Ea?parseFloat(Ea):"auto"==la||"auto"==Ea?qa.height+fa:parseFloat(la);sa+=P.geometry.height+U}g?(null==
-I[X]&&(I[X]=[]),I[X].push(P)):(v.push(P),null!=R?(R.style=N.replacePlaceholders(R,L,G),N.addCell(P,R),y.push(R)):C.push(N.addCell(P)))}for(wa=0;wa<y.length;wa++)va="@"==Z.charAt(0)?y[wa].getAttribute(Z.substring(1)):null,Ea="@"==la.charAt(0)?y[wa].getAttribute(la.substring(1)):null,"auto"!=Z&&"auto"!=va||"auto"!=la&&"auto"!=Ea||N.updateGroupBounds([y[wa]],fa,!0);var Ca=C.slice(),Ma=C.slice();for(Ya=0;Ya<Aa.length;Ya++){var Sa=Aa[Ya];for(wa=0;wa<v.length;wa++){P=v[wa];var Qa=mxUtils.bind(this,function(Xa,
-Za,fb){var hb=Za.getAttribute(fb.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var qb=0;qb<hb.length;qb++){var kb=D[fb.to][hb[qb]];if(null==kb&&null!=pa){kb=new mxCell(hb[qb],new mxGeometry(za,ua,0,0),pa);kb.style=N.replacePlaceholders(Za,kb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(kb);kb.geometry.width=ib.width+fa;kb.geometry.height=ib.height+fa;D[fb.to][hb[qb]]=kb;kb.vertex=!0;kb.id=hb[qb];C.push(N.addCell(kb))}if(null!=kb){ib=fb.label;null!=fb.fromlabel&&(ib=(Za.getAttribute(fb.fromlabel)||
-"")+(ib||""));null!=fb.sourcelabel&&(ib=N.replacePlaceholders(Za,fb.sourcelabel,G)+(ib||""));null!=fb.tolabel&&(ib=(ib||"")+(kb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(ib=(ib||"")+N.replacePlaceholders(kb,fb.targetlabel,G));var ub="target"==fb.placeholders==!fb.invert?kb:Xa;ub=null!=fb.style?N.replacePlaceholders(ub,fb.style,G):N.createCurrentEdgeStyle();ib=N.insertEdge(null,null,ib||"",fb.invert?kb:Xa,fb.invert?Xa:kb,ub);if(null!=fb.labels)for(ub=0;ub<fb.labels.length;ub++){var ob=
-fb.labels[ub],nb=new mxCell(ob.label||ub,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");nb.vertex=!0;nb.connectable=!1;nb.geometry.relative=!0;null!=ob.placeholders&&(nb.value=N.replacePlaceholders("target"==ob.placeholders==!fb.invert?kb:Xa,nb.value,G));if(null!=ob.dx||null!=ob.dy)nb.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);ib.insert(nb)}Ma.push(ib);mxUtils.remove(fb.invert?Xa:kb,Ca)}}}});Qa(P,P,Sa);if(null!=I[P.id])for(W=0;W<I[P.id].length;W++)Qa(P,
-I[P.id][W],Sa)}}if(null!=La)for(wa=0;wa<v.length;wa++)for(P=v[wa],W=0;W<La.length;W++)N.setAttributeForCell(P,mxUtils.trim(La[W]),null);if(0<C.length){var Fa=new mxParallelEdgeLayout(N);Fa.spacing=aa;Fa.checkOverlap=!0;var Ka=function(){0<Fa.spacing&&Fa.execute(N.getDefaultParent());for(var Xa=0;Xa<C.length;Xa++){var Za=N.getCellGeometry(C[Xa]);Za.x=Math.round(N.snap(Za.x));Za.y=Math.round(N.snap(Za.y));"auto"==Z&&(Za.width=Math.round(N.snap(Za.width)));"auto"==la&&(Za.height=Math.round(N.snap(Za.height)))}};
-if("["==oa.charAt(0)){var Pa=na;N.view.validate();this.executeLayouts(N.createLayouts(JSON.parse(oa)),function(){Ka();Pa()});na=null}else if("circle"==oa){var $a=new mxCircleLayout(N);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var eb=$a.isVertexIgnored;$a.isVertexIgnored=function(Xa){return eb.apply(this,arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){$a.execute(N.getDefaultParent());Ka()},!0,na);na=null}else if("horizontaltree"==oa||"verticaltree"==oa||"auto"==oa&&Ma.length==2*C.length-
-1&&1==Ca.length){N.view.validate();var cb=new mxCompactTreeLayout(N,"horizontaltree"==oa);cb.levelDistance=U;cb.edgeRouting=!1;cb.resetEdges=!1;this.executeLayout(function(){cb.execute(N.getDefaultParent(),0<Ca.length?Ca[0]:null)},!0,na);na=null}else if("horizontalflow"==oa||"verticalflow"==oa||"auto"==oa&&1==Ca.length){N.view.validate();var db=new mxHierarchicalLayout(N,"horizontalflow"==oa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);db.intraCellSpacing=U;db.parallelEdgeSpacing=aa;db.interRankCellSpacing=
-da;db.disableEdgeStyle=!1;this.executeLayout(function(){db.execute(N.getDefaultParent(),Ma);N.moveCells(Ma,za,ua)},!0,na);na=null}else if("orgchart"==oa){N.view.validate();var rb=new mxOrgChartLayout(N,2,da,U),mb=rb.isVertexIgnored;rb.isVertexIgnored=function(Xa){return mb.apply(this,arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){rb.execute(N.getDefaultParent());Ka()},!0,na);na=null}else if("organic"==oa||"auto"==oa&&Ma.length>C.length){N.view.validate();var vb=new mxFastOrganicLayout(N);
-vb.forceConstant=3*U;vb.disableEdgeStyle=!1;vb.resetEdges=!1;var Bb=vb.isVertexIgnored;vb.isVertexIgnored=function(Xa){return Bb.apply(this,arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){vb.execute(N.getDefaultParent());Ka()},!0,na);na=null}}this.hideDialog()}finally{N.model.endUpdate()}null!=na&&na()}}catch(Xa){this.handleError(Xa)}};EditorUi.prototype.getSearch=function(e){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=e&&0<window.location.search.length){var g=
-"?",v;for(v in urlParams)0>mxUtils.indexOf(e,v)&&null!=urlParams[v]&&(f+=g+v+"="+urlParams[v],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(e){e=null!=e?e:window.location.pathname;var f=0<e.indexOf("?")?1:0;if("1"==urlParams.offline)e+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),v;for(v in urlParams)0>mxUtils.indexOf(g,v)&&(e=0==f?e+"?":e+"&",null!=urlParams[v]&&(e+=v+"="+
-urlParams[v],f++))}return e};EditorUi.prototype.showLinkDialog=function(e,f,g,v,y){e=new LinkDialog(this,e,f,g,!0,v,y);this.showDialog(e.container,560,130,!0,!0);e.init()};EditorUi.prototype.getServiceCount=function(e){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;e&&isLocalStorage&&"1"==urlParams.browser&&
-f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var e=this.getCurrentFile(),f=null!=e||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==e||e.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);
-g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));e="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("toggleDarkMode").setEnabled("atlas"!=
-uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&e);this.actions.get("redo").setEnabled(this.canRedo()&&e);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(e);this.menus.get("arrange").setEnabled(e);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(e),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(e));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=
-function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var e=this.getCurrentFile();return null!=e&&e.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var H=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(e){var f=H.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));
-this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var e=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),v=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(v);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(v);this.actions.get("editData").setEnabled(e.isEnabled());
-this.actions.get("shadowVisible").setEnabled(v);this.actions.get("connectionArrows").setEnabled(v);this.actions.get("connectionPoints").setEnabled(v);this.actions.get("copyStyle").setEnabled(v&&!e.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(v&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(v);this.actions.get("createRevision").setEnabled(v);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=
-f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(v&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==
-urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(e.isEnabled()?"/"+mxResources.get("replace"):"");e=e.view.getState(e.getSelectionCell());this.actions.get("editShape").setEnabled(v&&null!=e&&null!=e.shape&&null!=e.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=
-this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(e,f,g,v,y,C,I,D){var N=e.editor.graph;if("xml"==g)e.hideDialog(),e.saveData(f,"xml",mxUtils.getXml(e.editor.getGraphXml()),"text/xml");else if("svg"==g)e.hideDialog(),e.saveData(f,"svg",mxUtils.getXml(N.getSvg(v,y,C)),"image/svg+xml");else{var G=e.getFileData(!0,
-null,null,null,null,!0),ia=N.getGraphBounds(),ka=Math.floor(ia.width*y/N.view.scale),ja=Math.floor(ia.height*y/N.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ka*ja<MAX_AREA)if(e.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!e.isExportToCanvas()){var ca={globalVars:N.getExportVariables()};D&&(ca.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});e.saveRequest(f,g,function(pa,ra){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(ra||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):
-"")+"&extras="+encodeURIComponent(JSON.stringify(ca))+(0<I?"&dpi="+I:"")+"&bg="+(null!=v?v:"none")+"&w="+ka+"&h="+ja+"&border="+C+"&xml="+encodeURIComponent(G))})}else"png"==g?e.exportImage(y,null==v||"none"==v,!0,!1,!1,C,!0,!1,null,D,I):e.exportImage(y,!1,!0,!1,!1,C,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var e=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var v=
-e;this.currentPage!=this.pages[g]&&(v=this.createTemporaryGraph(e.getStylesheet()),this.updatePageRoot(this.pages[g]),v.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+v.getIndexableText()+" "}else f=e.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(e){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxUtils.htmlEntities(e));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-g.appendChild(v);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var I=mxSettings.getCustomLibraries();for(e=0;e<I.length;e++){var D=I[e];if("R"==D.substring(0,1)){var N=JSON.parse(decodeURIComponent(D.substring(1)));C[N[0]]={id:N[0],title:N[1],downloadUrl:N[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){y.innerText=
-"";if(0==G.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var ia=0;ia<G.length;ia++){var ka=G[ia];C[ka.id]&&(f[ka.id]=ka);var ja=this.addCheckbox(y,ka.title,C[ka.id]);(function(ca,pa){mxEvent.addListener(pa,"change",function(){this.checked?f[ca.id]=ca:delete f[ca.id]})})(ka,ja)}},mxUtils.bind(this,function(G){y.innerText="";var ia=document.createElement("div");ia.style.padding="8px";ia.style.textAlign=
-"center";mxUtils.write(ia,mxResources.get("error")+": ");mxUtils.write(ia,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));y.appendChild(ia)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,ia;for(ia in f)null==C[ia]&&(G++,mxUtils.bind(this,function(ka){this.remoteInvoke("getFileContent",[ka.downloadUrl],null,mxUtils.bind(this,function(ja){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
-ja,ka))}catch(ca){this.handleError(ca,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ia]));for(ia in C)f[ia]||this.closeLibrary(new RemoteLibrary(this,null,C[ia]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
-getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(e){this.remoteWin=e;for(var f=0;f<this.remoteInvokeQueue.length;f++)e.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=
-function(e){var f=e.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));e.error?g.error&&g.error(e.error.errResp):g.callback&&g.callback.apply(this,e.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(e,f,g,v,y){var C=!0,I=window.setTimeout(mxUtils.bind(this,function(){C=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(I);
-C&&v.apply(this,arguments)}),N=mxUtils.bind(this,function(){window.clearTimeout(I);C&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,error:N});e=JSON.stringify({event:"remoteInvoke",funtionName:e,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(e,"*"):this.remoteInvokeQueue.push(e)};EditorUi.prototype.handleRemoteInvoke=function(e,f){var g=mxUtils.bind(this,function(G,ia){var ka={event:"remoteInvokeResponse",
-msgMarkers:e.msgMarkers};null!=ia?ka.error={errResp:ia}:null!=G&&(ka.resp=G);this.remoteWin.postMessage(JSON.stringify(ka),"*")});try{var v=e.funtionName,y=this.remoteInvokableFns[v];if(null!=y&&"function"===typeof this[v]){if(y.allowedDomains){for(var C=!1,I=0;I<y.allowedDomains.length;I++)if(f=="https://"+y.allowedDomains[I]){C=!0;break}if(!C){g(null,"Invalid Call: "+v+" is not allowed.");return}}var D=e.functionArgs;Array.isArray(D)||(D=[]);if(y.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),
-D.push(function(G){g(null,G||"Unkown Error")}),this[v].apply(this,D);else{var N=this[v].apply(this,D);g([N])}}else g(null,"Invalid Call: "+v+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(e,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var v=g.open("database",2);v.onupgradeneeded=function(y){try{var C=v.result;1>y.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});
-2>y.oldVersion&&(C.createObjectStore("files",{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=f&&f(I)}};v.onsuccess=mxUtils.bind(this,function(y){var C=v.result;this.database=C;EditorUi.migrateStorageFiles&&(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if(!I||
-"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(D);var N=!0,G=!1,ia,ka=0,ja=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ca=mxUtils.bind(this,function(){ka++;pa()}),pa=mxUtils.bind(this,function(){try{if(ka>=
-ia.length)ja();else{var L=ia[ka];StorageFile.getFileContent(this,L,mxUtils.bind(this,function(V){null==V||".scratchpad"==L&&V==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[L]}),"*"):ca()}),ca)}}catch(V){console.log(V)}}),ra=mxUtils.bind(this,function(L){try{this.setDatabaseItem(null,[{title:L.title,size:L.data.length,lastModified:Date.now(),type:L.isLib?"L":"F"},{title:L.title,data:L.data}],ca,ca,["filesInfo",
-"files"])}catch(V){console.log(V)}});I=mxUtils.bind(this,function(L){try{if(L.source==D.contentWindow){var V={};try{V=JSON.parse(L.data)}catch(R){}"init"==V.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=V.event||G||(N?null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?(ia=V.resp[0],N=!1,pa()):ja():null!=V.resp&&0<V.resp.length&&
-null!=V.resp[0]?ra(V.resp[0]):ca())}}catch(R){console.log(R)}});window.addEventListener("message",I)}})));e(C);C.onversionchange=function(){C.close()}});v.onerror=f;v.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else e(this.database)};EditorUi.prototype.setDatabaseItem=function(e,f,g,v,y){this.openDatabase(mxUtils.bind(this,function(C){try{y=y||"objects";Array.isArray(y)||(y=[y],e=[e],f=[f]);var I=C.transaction(y,"readwrite");I.oncomplete=g;I.onerror=v;for(C=0;C<y.length;C++)I.objectStore(y[C]).put(null!=
-e&&null!=e[C]?{key:e[C],data:f[C]}:f[C])}catch(D){null!=v&&v(D)}}),v)};EditorUi.prototype.removeDatabaseItem=function(e,f,g,v){this.openDatabase(mxUtils.bind(this,function(y){v=v||"objects";Array.isArray(v)||(v=[v],e=[e]);y=y.transaction(v,"readwrite");y.oncomplete=f;y.onerror=g;for(var C=0;C<v.length;C++)y.objectStore(v[C]).delete(e[C])}),g)};EditorUi.prototype.getDatabaseItem=function(e,f,g,v){this.openDatabase(mxUtils.bind(this,function(y){try{v=v||"objects";var C=y.transaction([v],"readonly").objectStore(v).get(e);
-C.onsuccess=function(){f(C.result)};C.onerror=g}catch(I){null!=g&&g(I)}}),g)};EditorUi.prototype.getDatabaseItems=function(e,f,g){this.openDatabase(mxUtils.bind(this,function(v){try{g=g||"objects";var y=v.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),C=[];y.onsuccess=function(I){null==I.target.result?e(C):(C.push(I.target.result.value),I.target.result.continue())};y.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(e,f,g){this.openDatabase(mxUtils.bind(this,
-function(v){try{g=g||"objects";var y=v.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){e(y.result)};y.onerror=f}catch(C){null!=f&&f(C)}}),f)};EditorUi.prototype.commentsSupported=function(){var e=this.getCurrentFile();return null!=e?e.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var e=this.getCurrentFile();return null!=
-e?e.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(e,f){var g=this.getCurrentFile();null!=g?g.getComments(e,f):e([])};EditorUi.prototype.addComment=function(e,f,g){var v=this.getCurrentFile();null!=v?v.addComment(e,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var e=this.getCurrentFile();return null!=e?e.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var e=this.getCurrentFile();return null!=e?e.canComment():!0};EditorUi.prototype.newComment=
-function(e,f){var g=this.getCurrentFile();return null!=g?g.newComment(e,f):new DrawioComment(this,null,e,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var e=this.getCurrentFile();return null!=e&&e.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(e,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(e,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var e=this.getCurrentFile();
-return null!=e&&(e.constructor==DriveFile&&e.isEditable()||e.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(e){e.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(e,f,g,v,y,C,I,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(e,f,g,v,y,C,I,D)};EditorUi.prototype.loadFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");
-return this.editor.loadFonts(e)};EditorUi.prototype.createSvgDataUri=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(e)};EditorUi.prototype.embedCssFonts=function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(e,f)};EditorUi.prototype.embedExtFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(e)};EditorUi.prototype.exportToCanvas=function(e,
-f,g,v,y,C,I,D,N,G,ia,ka,ja,ca,pa,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(e,f,g,v,y,C,I,D,N,G,ia,ka,ja,ca,pa,ra)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(e,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(e,f,g,v)};EditorUi.prototype.convertImageToDataUri=
-function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(e,f)};EditorUi.prototype.base64Encode=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(e)};EditorUi.prototype.updateCRC=function(e,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(e,f,g,v)};EditorUi.prototype.crc32=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(e)};
-EditorUi.prototype.writeGraphModelToPng=function(e,f,g,v,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(e,f,g,v,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var e=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),v=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<v.length){var y="<mxfile "===
-v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12);v="<mxlibrary>"===v.substring(0,11);(y||v)&&e.push(g)}}return e};EditorUi.prototype.getLocalStorageFile=function(e){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(e);return{title:e,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,d,k,l,B,p){function E(){for(var ca=I.getElementsByTagName("div"),pa=0,ra=0;ra<ca.length;ra++)"none"!=ca[ra].style.display&&ca[ra].parentNode==I&&pa++;D.style.display=0==pa?"block":"none"}function M(ca,pa,ra,L){function V(){pa.removeChild(Z);pa.removeChild(la);Y.style.display="block";R.style.display="block"}v={div:pa,comment:ca,saveCallback:ra,deleteOnCancel:L};var R=pa.querySelector(".geCommentTxt"),Y=pa.querySelector(".geCommentActionsList"),Z=document.createElement("textarea");
+34)?(ka="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(oa){Ba(oa,N)},mxUtils.bind(this,function(oa){this.handleError(oa)}),ka)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status&&
+"<mxGraphModel"==oa.responseText.substring(0,13)?Ba(oa.responseText,N):this.handleError({message:413==oa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(oa){Ba(oa)}),mxUtils.bind(this,function(oa){this.handleError(oa)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ka(G),Ba(G,N)):this.loadDescriptor(G,mxUtils.bind(this,
+function(oa){Ba(ua(),N)}),mxUtils.bind(this,function(oa){this.handleError(oa,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;B="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(B,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(N,G,ia){D.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:N,target:G,allowOpener:ia}),"*")}}};EditorUi.prototype.createEmbedButton=
+function(d,f,g,v){var x="simple"==Editor.currentTheme||"min"==Editor.currentTheme,B=document.createElement(x?"a":"button");B.setAttribute("title",d+(null!=g?" ("+g+")":""));B.style.marginLeft="6px";mxUtils.write(B,d);x?(B.className="geMenuItem"+(v?" gePrimaryBtn":""),B.style.marginLeft="8px",B.style.padding="6px"):B.className="geBigButton"+(v?"":" geBigStandardButton");mxEvent.addListener(B,"click",f);return B};EditorUi.prototype.addEmbedButtons=function(){if("1"!=urlParams.embedInline){var d=document.createElement("div");
+d.style.display="inline-block";document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&d.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,null,!0)):(d.appendChild(this.createEmbedButton(mxResources.get("save"),this.actions.get("save").funct,Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&d.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),
+this.actions.get("saveAndExit").funct)));"1"!=urlParams.noExitBtn&&d.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"==Editor.currentTheme||"min"==Editor.currentTheme?null!=this.buttonContainer&&(d.style.position="relative","simple"!=Editor.currentTheme&&(d.style.marginRight="4px","1"!=urlParams.sketch?(d.style.marginTop="6px",this.buttonContainer.style.top="6px"):this.buttonContainer.style.top=
+"0px"),this.buttonContainer.appendChild(d),this.editor.fireEvent(new mxEventObject("statusChanged"))):null!=this.menubar&&(d.style.position="absolute",d.style.padding="2px",d.style.right="62px",this.toolbar.container.appendChild(d),this.toolbar.staticElements.push(d))}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,
+620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&
+(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),
+v=[],x=[],B=[],I={};if(0<g.length){var D={},N=this.editor.graph,G=null,ia=null,ka=null,ja=null,ca=null,pa=null,ra=null,L="whiteSpace=wrap;html=1;",V=null,R=null,Y="",Z="auto",la="auto",q=!1,F=null,T=null,aa=40,U=40,da=100,fa=0,na=mxUtils.bind(this,function(){null!=f?f(Ma):(N.setSelectionCells(Ma),N.scrollCellToVisible(N.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=N.getFreeInsertPoint(),za=sa.x,ua=sa.y;sa=ua;var Ba=
+null,oa="auto";R=null;for(var Aa=[],ya=null,La=null,Oa=0;Oa<g.length&&"#"==g[Oa].charAt(0);){d=g[Oa].replace(/\r$/,"");for(Oa++;Oa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Oa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Oa].substring(1)),Oa++;if("#"!=d.charAt(1)){var Na=d.indexOf(":");if(0<Na){var Ia=mxUtils.trim(d.substring(1,Na)),wa=mxUtils.trim(d.substring(Na+1));"label"==Ia?Ba=N.sanitizeHtml(wa):"labelname"==Ia&&0<wa.length&&"-"!=wa?ca=wa:"labels"==Ia&&0<wa.length&&"-"!=wa?ra=JSON.parse(wa):
+"style"==Ia?ia=wa:"parentstyle"==Ia?L=wa:"unknownStyle"==Ia&&"-"!=wa?pa=wa:"stylename"==Ia&&0<wa.length&&"-"!=wa?ja=wa:"styles"==Ia&&0<wa.length&&"-"!=wa?ka=JSON.parse(wa):"vars"==Ia&&0<wa.length&&"-"!=wa?G=JSON.parse(wa):"identity"==Ia&&0<wa.length&&"-"!=wa?V=wa:"parent"==Ia&&0<wa.length&&"-"!=wa?R=wa:"namespace"==Ia&&0<wa.length&&"-"!=wa?Y=wa:"width"==Ia?Z=wa:"height"==Ia?la=wa:"collapsed"==Ia&&"-"!=wa?q="true"==wa:"left"==Ia&&0<wa.length?F=wa:"top"==Ia&&0<wa.length?T=wa:"ignore"==Ia?La=wa.split(","):
+"connect"==Ia?Aa.push(JSON.parse(wa)):"link"==Ia?ya=wa:"padding"==Ia?fa=parseFloat(wa):"edgespacing"==Ia?aa=parseFloat(wa):"nodespacing"==Ia?U=parseFloat(wa):"levelspacing"==Ia?da=parseFloat(wa):"layout"==Ia&&(oa=wa)}}}if(null==g[Oa])throw Error(mxResources.get("invalidOrMissingFile"));var ab=this.editor.csvToArray(g[Oa].replace(/\r$/,""));Na=d=null;Ia=[];for(wa=0;wa<ab.length;wa++)V==ab[wa]&&(d=wa),R==ab[wa]&&(Na=wa),Ia.push(mxUtils.trim(ab[wa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,
+""));null==Ba&&(Ba="%"+Ia[0]+"%");if(null!=Aa)for(var Ya=0;Ya<Aa.length;Ya++)null==D[Aa[Ya].to]&&(D[Aa[Ya].to]={});V=[];for(wa=Oa+1;wa<g.length;wa++){var y=this.editor.csvToArray(g[wa].replace(/\r$/,""));if(null==y){var O=40<g[wa].length?g[wa].substring(0,40)+"...":g[wa];throw Error(O+" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<y.length&&V.push(y)}N.model.beginUpdate();try{for(wa=0;wa<V.length;wa++){y=V[wa];var P=null,X=null!=d?Y+y[d]:null;g=!1;null!=X&&(P=N.model.getCell(X),g=
+null==P||0<=mxUtils.indexOf(v,P));var ba=new mxCell(Ba,new mxGeometry(za,sa,0,0),ia||"whiteSpace=wrap;html=1;");ba.collapsed=q;ba.vertex=!0;ba.id=X;null==P||g||N.model.setCollapsed(P,q);for(var W=0;W<y.length;W++)N.setAttributeForCell(ba,Ia[W],y[W]),null==P||g||N.setAttributeForCell(P,Ia[W],y[W]);if(null!=ca&&null!=ra){var ea=ra[ba.getAttribute(ca)];null!=ea&&(N.labelChanged(ba,ea),null==P||g||N.cellLabelChanged(P,ea))}if(null!=ja&&null!=ka){var ta=ka[ba.getAttribute(ja)];null!=ta&&(ba.style=ta)}N.setAttributeForCell(ba,
+"placeholders","1");ba.style=N.replacePlaceholders(ba,ba.style,G);null==P||g?N.fireEvent(new mxEventObject("cellsInserted","cells",[ba])):(N.model.setStyle(P,ba.style),0>mxUtils.indexOf(B,P)&&B.push(P),N.fireEvent(new mxEventObject("cellsInserted","cells",[P])));g=null!=P;P=ba;if(!g)for(Ya=0;Ya<Aa.length;Ya++)D[Aa[Ya].to][P.getAttribute(Aa[Ya].to)]=P;null!=ya&&"link"!=ya&&(N.setLinkForCell(P,P.getAttribute(ya)),N.setAttributeForCell(P,ya,null));var qa=this.editor.graph.getPreferredSizeForCell(P);
+R=null!=Na?N.model.getCell(Y+y[Na]):null;if(P.vertex){O=null!=R?0:za;Oa=null!=R?0:ua;null!=F&&null!=P.getAttribute(F)&&(P.geometry.x=O+parseFloat(P.getAttribute(F)));null!=T&&null!=P.getAttribute(T)&&(P.geometry.y=Oa+parseFloat(P.getAttribute(T)));var va="@"==Z.charAt(0)?P.getAttribute(Z.substring(1)):null;P.geometry.width=null!=va&&"auto"!=va?parseFloat(P.getAttribute(Z.substring(1))):"auto"==Z||"auto"==va?qa.width+fa:parseFloat(Z);var Ea="@"==la.charAt(0)?P.getAttribute(la.substring(1)):null;P.geometry.height=
+null!=Ea&&"auto"!=Ea?parseFloat(Ea):"auto"==la||"auto"==Ea?qa.height+fa:parseFloat(la);sa+=P.geometry.height+U}g?(null==I[X]&&(I[X]=[]),I[X].push(P)):(v.push(P),null!=R?(R.style=N.replacePlaceholders(R,L,G),N.addCell(P,R),x.push(R)):B.push(N.addCell(P)))}for(wa=0;wa<x.length;wa++)va="@"==Z.charAt(0)?x[wa].getAttribute(Z.substring(1)):null,Ea="@"==la.charAt(0)?x[wa].getAttribute(la.substring(1)):null,"auto"!=Z&&"auto"!=va||"auto"!=la&&"auto"!=Ea||N.updateGroupBounds([x[wa]],fa,!0);var Ca=B.slice(),
+Ma=B.slice();for(Ya=0;Ya<Aa.length;Ya++){var Sa=Aa[Ya];for(wa=0;wa<v.length;wa++){P=v[wa];var Qa=mxUtils.bind(this,function(Xa,Za,fb){var hb=Za.getAttribute(fb.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var qb=0;qb<hb.length;qb++){var kb=D[fb.to][hb[qb]];if(null==kb&&null!=pa){kb=new mxCell(hb[qb],new mxGeometry(za,ua,0,0),pa);kb.style=N.replacePlaceholders(Za,kb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(kb);kb.geometry.width=ib.width+fa;kb.geometry.height=ib.height+fa;D[fb.to][hb[qb]]=
+kb;kb.vertex=!0;kb.id=hb[qb];B.push(N.addCell(kb))}if(null!=kb){ib=fb.label;null!=fb.fromlabel&&(ib=(Za.getAttribute(fb.fromlabel)||"")+(ib||""));null!=fb.sourcelabel&&(ib=N.replacePlaceholders(Za,fb.sourcelabel,G)+(ib||""));null!=fb.tolabel&&(ib=(ib||"")+(kb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(ib=(ib||"")+N.replacePlaceholders(kb,fb.targetlabel,G));var ub="target"==fb.placeholders==!fb.invert?kb:Xa;ub=null!=fb.style?N.replacePlaceholders(ub,fb.style,G):N.createCurrentEdgeStyle();
+ib=N.insertEdge(null,null,ib||"",fb.invert?kb:Xa,fb.invert?Xa:kb,ub);if(null!=fb.labels)for(ub=0;ub<fb.labels.length;ub++){var ob=fb.labels[ub],nb=new mxCell(ob.label||ub,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");nb.vertex=!0;nb.connectable=!1;nb.geometry.relative=!0;null!=ob.placeholders&&(nb.value=N.replacePlaceholders("target"==ob.placeholders==!fb.invert?kb:Xa,nb.value,G));if(null!=ob.dx||null!=ob.dy)nb.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=
+ob.dy?ob.dy:0);ib.insert(nb)}Ma.push(ib);mxUtils.remove(fb.invert?Xa:kb,Ca)}}}});Qa(P,P,Sa);if(null!=I[P.id])for(W=0;W<I[P.id].length;W++)Qa(P,I[P.id][W],Sa)}}if(null!=La)for(wa=0;wa<v.length;wa++)for(P=v[wa],W=0;W<La.length;W++)N.setAttributeForCell(P,mxUtils.trim(La[W]),null);if(0<B.length){var Fa=new mxParallelEdgeLayout(N);Fa.spacing=aa;Fa.checkOverlap=!0;var Ka=function(){0<Fa.spacing&&Fa.execute(N.getDefaultParent());for(var Xa=0;Xa<B.length;Xa++){var Za=N.getCellGeometry(B[Xa]);Za.x=Math.round(N.snap(Za.x));
+Za.y=Math.round(N.snap(Za.y));"auto"==Z&&(Za.width=Math.round(N.snap(Za.width)));"auto"==la&&(Za.height=Math.round(N.snap(Za.height)))}};if("["==oa.charAt(0)){var Pa=na;N.view.validate();this.executeLayouts(N.createLayouts(JSON.parse(oa)),function(){Ka();Pa()});na=null}else if("circle"==oa){var $a=new mxCircleLayout(N);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var eb=$a.isVertexIgnored;$a.isVertexIgnored=function(Xa){return eb.apply(this,arguments)||0>mxUtils.indexOf(B,Xa)};this.executeLayout(function(){$a.execute(N.getDefaultParent());
+Ka()},!0,na);na=null}else if("horizontaltree"==oa||"verticaltree"==oa||"auto"==oa&&Ma.length==2*B.length-1&&1==Ca.length){N.view.validate();var cb=new mxCompactTreeLayout(N,"horizontaltree"==oa);cb.levelDistance=U;cb.edgeRouting=!1;cb.resetEdges=!1;this.executeLayout(function(){cb.execute(N.getDefaultParent(),0<Ca.length?Ca[0]:null)},!0,na);na=null}else if("horizontalflow"==oa||"verticalflow"==oa||"auto"==oa&&1==Ca.length){N.view.validate();var db=new mxHierarchicalLayout(N,"horizontalflow"==oa?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);db.intraCellSpacing=U;db.parallelEdgeSpacing=aa;db.interRankCellSpacing=da;db.disableEdgeStyle=!1;this.executeLayout(function(){db.execute(N.getDefaultParent(),Ma);N.moveCells(Ma,za,ua)},!0,na);na=null}else if("orgchart"==oa){N.view.validate();var rb=new mxOrgChartLayout(N,2,da,U),mb=rb.isVertexIgnored;rb.isVertexIgnored=function(Xa){return mb.apply(this,arguments)||0>mxUtils.indexOf(B,Xa)};this.executeLayout(function(){rb.execute(N.getDefaultParent());Ka()},!0,na);na=
+null}else if("organic"==oa||"auto"==oa&&Ma.length>B.length){N.view.validate();var vb=new mxFastOrganicLayout(N);vb.forceConstant=3*U;vb.disableEdgeStyle=!1;vb.resetEdges=!1;var Bb=vb.isVertexIgnored;vb.isVertexIgnored=function(Xa){return Bb.apply(this,arguments)||0>mxUtils.indexOf(B,Xa)};this.executeLayout(function(){vb.execute(N.getDefaultParent());Ka()},!0,na);na=null}}this.hideDialog()}finally{N.model.endUpdate()}null!=na&&na()}}catch(Xa){this.handleError(Xa)}};EditorUi.prototype.getSearch=function(d){var f=
+"";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",v;for(v in urlParams)0>mxUtils.indexOf(d,v)&&null!=urlParams[v]&&(f+=g+v+"="+urlParams[v],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+v;for(v in urlParams)0>mxUtils.indexOf(g,v)&&(d=0==f?d+"?":d+"&",null!=urlParams[v]&&(d+=v+"="+urlParams[v],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,v,x){d=new LinkDialog(this,d,f,g,!0,v,x);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
+this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
+this.actions.get("resetView").setEnabled(f);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&
+this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var H=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
+function(d){var f=H.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),v=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(v);this.actions.get("autosave").setEnabled(null!=
+f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(v);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(v);this.actions.get("connectionArrows").setEnabled(v);this.actions.get("connectionPoints").setEnabled(v);this.actions.get("copyStyle").setEnabled(v&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(v&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(v);
+this.actions.get("createRevision").setEnabled(v);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(v&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(v&&null!=
+d&&null!=d.shape&&null!=d.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,v,x,B,I,D){var N=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");
+else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(N.getSvg(v,x,B)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),ia=N.getGraphBounds(),ka=Math.floor(ia.width*x/N.view.scale),ja=Math.floor(ia.height*x/N.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ka*ja<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var ca={globalVars:N.getExportVariables()};D&&(ca.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});d.saveRequest(f,
+g,function(pa,ra){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(ra||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):"")+"&extras="+encodeURIComponent(JSON.stringify(ca))+(0<I?"&dpi="+I:"")+"&bg="+(null!=v?v:"none")+"&w="+ka+"&h="+ja+"&border="+B+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(x,null==v||"none"==v,!0,!1,!1,B,!0,!1,null,D,I):d.exportImage(x,!1,!0,!1,!1,B,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=
+function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var v=d;this.currentPage!=this.pages[g]&&(v=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),v.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+v.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");
+g.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxUtils.htmlEntities(d));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(v);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var B={};try{var I=mxSettings.getCustomLibraries();for(d=0;d<I.length;d++){var D=I[d];if("R"==
+D.substring(0,1)){var N=JSON.parse(decodeURIComponent(D.substring(1)));B[N[0]]={id:N[0],title:N[1],downloadUrl:N[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){x.innerText="";if(0==G.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var ia=0;ia<G.length;ia++){var ka=G[ia];B[ka.id]&&(f[ka.id]=ka);var ja=this.addCheckbox(x,ka.title,B[ka.id]);(function(ca,pa){mxEvent.addListener(pa,
+"change",function(){this.checked?f[ca.id]=ca:delete f[ca.id]})})(ka,ja)}},mxUtils.bind(this,function(G){x.innerText="";var ia=document.createElement("div");ia.style.padding="8px";ia.style.textAlign="center";mxUtils.write(ia,mxResources.get("error")+": ");mxUtils.write(ia,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));x.appendChild(ia)}));g.appendChild(x);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,
+ia;for(ia in f)null==B[ia]&&(G++,mxUtils.bind(this,function(ka){this.remoteInvoke("getFileContent",[ka.downloadUrl],null,mxUtils.bind(this,function(ja){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ja,ka))}catch(ca){this.handleError(ca,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ia]));for(ia in B)f[ia]||this.closeLibrary(new RemoteLibrary(this,null,B[ia]));
+0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];
+EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,
+d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,v,x){var B=!0,I=window.setTimeout(mxUtils.bind(this,function(){B=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(I);B&&v.apply(this,arguments)}),N=mxUtils.bind(this,function(){window.clearTimeout(I);B&&x.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,
+error:N});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,ia){var ka={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=ia?ka.error={errResp:ia}:null!=G&&(ka.resp=G);this.remoteWin.postMessage(JSON.stringify(ka),"*")});try{var v=d.funtionName,x=this.remoteInvokableFns[v];if(null!=x&&
+"function"===typeof this[v]){if(x.allowedDomains){for(var B=!1,I=0;I<x.allowedDomains.length;I++)if(f=="https://"+x.allowedDomains[I]){B=!0;break}if(!B){g(null,"Invalid Call: "+v+" is not allowed.");return}}var D=d.functionArgs;Array.isArray(D)||(D=[]);if(x.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),D.push(function(G){g(null,G||"Unkown Error")}),this[v].apply(this,D);else{var N=this[v].apply(this,D);g([N])}}else g(null,"Invalid Call: "+v+" is not found.")}catch(G){g(null,
+"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var v=g.open("database",2);v.onupgradeneeded=function(x){try{var B=v.result;1>x.oldVersion&&B.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(B.createObjectStore("files",{keyPath:"title"}),B.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=
+f&&f(I)}};v.onsuccess=mxUtils.bind(this,function(x){var B=v.result;this.database=B;EditorUi.migrateStorageFiles&&(StorageFile.migrate(B),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if(!I||"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
+urlParams.forceMigration);document.body.appendChild(D);var N=!0,G=!1,ia,ka=0,ja=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ca=mxUtils.bind(this,function(){ka++;pa()}),pa=mxUtils.bind(this,function(){try{if(ka>=ia.length)ja();else{var L=ia[ka];StorageFile.getFileContent(this,L,mxUtils.bind(this,function(V){null==V||".scratchpad"==L&&V==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[L]}),"*"):ca()}),ca)}}catch(V){console.log(V)}}),ra=mxUtils.bind(this,function(L){try{this.setDatabaseItem(null,[{title:L.title,size:L.data.length,lastModified:Date.now(),type:L.isLib?"L":"F"},{title:L.title,data:L.data}],ca,ca,["filesInfo","files"])}catch(V){console.log(V)}});I=mxUtils.bind(this,function(L){try{if(L.source==D.contentWindow){var V={};try{V=JSON.parse(L.data)}catch(R){}"init"==V.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=V.event||G||(N?null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?(ia=V.resp[0],N=!1,pa()):ja():null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?ra(V.resp[0]):ca())}}catch(R){console.log(R)}});window.addEventListener("message",I)}})));d(B);B.onversionchange=function(){B.close()}});v.onerror=f;v.onblocked=function(){}}catch(x){null!=f&&f(x)}else null!=f&&f()}else d(this.database)};
+EditorUi.prototype.setDatabaseItem=function(d,f,g,v,x){this.openDatabase(mxUtils.bind(this,function(B){try{x=x||"objects";Array.isArray(x)||(x=[x],d=[d],f=[f]);var I=B.transaction(x,"readwrite");I.oncomplete=g;I.onerror=v;for(B=0;B<x.length;B++)I.objectStore(x[B]).put(null!=d&&null!=d[B]?{key:d[B],data:f[B]}:f[B])}catch(D){null!=v&&v(D)}}),v)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,v){this.openDatabase(mxUtils.bind(this,function(x){v=v||"objects";Array.isArray(v)||(v=[v],d=[d]);x=x.transaction(v,
+"readwrite");x.oncomplete=f;x.onerror=g;for(var B=0;B<v.length;B++)x.objectStore(v[B]).delete(d[B])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,v){this.openDatabase(mxUtils.bind(this,function(x){try{v=v||"objects";var B=x.transaction([v],"readonly").objectStore(v).get(d);B.onsuccess=function(){f(B.result)};B.onerror=g}catch(I){null!=g&&g(I)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(v){try{g=g||"objects";var x=v.transaction([g],
+"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),B=[];x.onsuccess=function(I){null==I.target.result?d(B):(B.push(I.target.result.value),I.target.result.continue())};x.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(v){try{g=g||"objects";var x=v.transaction([g],"readonly").objectStore(g).getAllKeys();x.onsuccess=function(){d(x.result)};x.onerror=f}catch(B){null!=f&&f(B)}}),f)};EditorUi.prototype.commentsSupported=
+function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var v=this.getCurrentFile();
+null!=v?v.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();
+return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,v,x,B,I,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,v,x,B,I,D)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja,ca,pa,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,v,x,B,I,D,N,G,ia,ka,ja,ca,pa,ra)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,v)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=
+function(d,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,v)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,v,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,v,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),v=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<v.length){var x="<mxfile "===v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12);v="<mxlibrary>"===v.substring(0,11);(x||v)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,e,k,l,C,p){function E(){for(var ca=I.getElementsByTagName("div"),pa=0,ra=0;ra<ca.length;ra++)"none"!=ca[ra].style.display&&ca[ra].parentNode==I&&pa++;D.style.display=0==pa?"block":"none"}function M(ca,pa,ra,L){function V(){pa.removeChild(Z);pa.removeChild(la);Y.style.display="block";R.style.display="block"}v={div:pa,comment:ca,saveCallback:ra,deleteOnCancel:L};var R=pa.querySelector(".geCommentTxt"),Y=pa.querySelector(".geCommentActionsList"),Z=document.createElement("textarea");
Z.className="geCommentEditTxtArea";Z.style.minHeight=R.offsetHeight+"px";Z.value=ca.content;pa.insertBefore(Z,R);var la=document.createElement("div");la.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){L?(pa.parentNode.removeChild(pa),E()):V();v=null});q.className="geCommentEditBtn";la.appendChild(q);var F=mxUtils.button(mxResources.get("save"),function(){R.innerText="";ca.content=Z.value;mxUtils.write(R,ca.content);V();ra(ca);v=null});mxEvent.addListener(Z,
"keydown",mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(F.click(),mxEvent.consume(T)):27==T.keyCode&&(q.click(),mxEvent.consume(T)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";la.appendChild(F);pa.insertBefore(la,R);Y.style.display="none";R.style.display="none";Z.focus()}function S(ca,pa){pa.innerText="";ca=new Date(ca.modifiedDate);var ra=b.timeSince(ca);null==ra&&(ra=mxResources.get("lessThanAMinute"));
-mxUtils.write(pa,mxResources.get("timeAgo",[ra],"{1} ago"));pa.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function H(ca){var pa=document.createElement("img");pa.className="geCommentBusyImg";pa.src=IMAGE_PATH+"/spin.gif";ca.appendChild(pa);ca.busyImg=pa}function K(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function Q(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function e(ca,pa,ra,L,V){function R(U,da,fa){var na=document.createElement("li");na.className=
+mxUtils.write(pa,mxResources.get("timeAgo",[ra],"{1} ago"));pa.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function H(ca){var pa=document.createElement("img");pa.className="geCommentBusyImg";pa.src=IMAGE_PATH+"/spin.gif";ca.appendChild(pa);ca.busyImg=pa}function K(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function Q(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function d(ca,pa,ra,L,V){function R(U,da,fa){var na=document.createElement("li");na.className=
"geCommentAction";var sa=document.createElement("a");sa.className="geCommentActionLnk";mxUtils.write(sa,U);na.appendChild(sa);mxEvent.addListener(sa,"click",function(za){da(za,ca);za.preventDefault();mxEvent.consume(za)});aa.appendChild(na);fa&&(na.style.display="none")}function Y(){function U(na){da.push(fa);if(null!=na.replies)for(var sa=0;sa<na.replies.length;sa++)fa=fa.nextSibling,U(na.replies[sa])}var da=[],fa=la;U(ca);return{pdiv:fa,replies:da}}function Z(U,da,fa,na,sa){function za(){H(Aa);
-ca.addReply(oa,function(ya){oa.id=ya;ca.replies.push(oa);Q(Aa);fa&&fa()},function(ya){ua();K(Aa);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},na,sa)}function ua(){M(oa,Aa,function(ya){za()},!0)}var Ba=Y().pdiv,oa=b.newComment(U,b.getCurrentUser());oa.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var Aa=e(oa,ca.replies,Ba,L+1);da?ua():za()}if(V||!ca.isResolved){D.style.display="none";var la=document.createElement("div");la.className="geCommentContainer";
+ca.addReply(oa,function(ya){oa.id=ya;ca.replies.push(oa);Q(Aa);fa&&fa()},function(ya){ua();K(Aa);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},na,sa)}function ua(){M(oa,Aa,function(ya){za()},!0)}var Ba=Y().pdiv,oa=b.newComment(U,b.getCurrentUser());oa.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var Aa=d(oa,ca.replies,Ba,L+1);da?ua():za()}if(V||!ca.isResolved){D.style.display="none";var la=document.createElement("div");la.className="geCommentContainer";
la.setAttribute("data-commentId",ca.id);la.style.marginLeft=20*L+5+"px";ca.isResolved&&!Editor.isDarkMode()&&(la.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=ca.user.pictureUrl||Editor.userImage;q.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";q.appendChild(F);var T=document.createElement("div");T.className="geCommentUsername";mxUtils.write(T,
ca.user.displayName||"");F.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ca.id);S(ca,T);F.appendChild(T);la.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,ca.content||"");la.appendChild(q);ca.isLocked&&(la.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var aa=document.createElement("ul");aa.className="geCommentActionsList";q.appendChild(aa);f||ca.isLocked||0!=
L&&!g||R(mxResources.get("reply"),function(){Z("",!0)},ca.isResolved);F=b.getCurrentUser();null==F||F.id!=ca.user.id||f||ca.isLocked||(R(mxResources.get("edit"),function(){function U(){M(ca,la,function(){H(la);ca.editComment(ca.content,function(){Q(la)},function(da){K(la);U();b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}U()},ca.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(la);ca.deleteComment(function(U){if(!0===
U){U=la.querySelector(".geCommentTxt");U.innerText="";mxUtils.write(U,mxResources.get("msgDeleted"));var da=la.querySelectorAll(".geCommentAction");for(U=0;U<da.length;U++)da[U].parentNode.removeChild(da[U]);Q(la);la.style.opacity="0.5"}else{da=Y(ca).replies;for(U=0;U<da.length;U++)I.removeChild(da[U]);for(U=0;U<pa.length;U++)if(pa[U]==ca){pa.splice(U,1);break}D.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(U){K(la);b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
ca.isResolved));f||ca.isLocked||0!=L||R(ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(U){function da(){var fa=U.target;fa.innerText="";ca.isResolved=!ca.isResolved;mxUtils.write(fa,ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=ca.isResolved?"none":"",sa=Y(ca).replies,za=Editor.isDarkMode()?"transparent":ca.isResolved?"ghostWhite":"white",ua=0;ua<sa.length;ua++){sa[ua].style.backgroundColor=za;for(var Ba=sa[ua].querySelectorAll(".geCommentAction"),
-oa=0;oa<Ba.length;oa++)Ba[oa]!=fa.parentNode&&(Ba[oa].style.display=na);ia||(sa[ua].style.display="none")}E()}ca.isResolved?Z(mxResources.get("reOpened")+": ",!0,da,!1,!0):Z(mxResources.get("markedAsResolved"),!1,da,!0)});la.appendChild(q);null!=ra?I.insertBefore(la,ra.nextSibling):I.appendChild(la);for(ra=0;null!=ca.replies&&ra<ca.replies.length;ra++)q=ca.replies[ra],q.isResolved=ca.isResolved,e(q,ca.replies,null,L+1,V);null!=v&&(v.comment.id==ca.id?(V=ca.content,ca.content=v.comment.content,M(ca,
-la,v.saveCallback,v.deleteOnCancel),ca.content=V):null==v.comment.id&&v.comment.pCommentId==ca.id&&(I.appendChild(v.div),M(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return la}}var f=!b.canComment(),g=b.canReplyToReplies(),v=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var C=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.backgroundColor=Editor.isDarkMode()?
-Dialog.backdropColor:"whiteSmoke";I.style.bottom=parseInt(C)+7+"px";y.appendChild(I);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(D,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=C;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C=document.createElement("a");
-C.className="geButton";if(!f){var G=C.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(ca){function pa(){M(ra,L,function(V){H(L);b.addComment(V,function(R){V.id=R;ka.push(V);Q(L)},function(R){K(L);pa();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ra=b.newComment("",b.getCurrentUser()),L=e(ra,ka,null,0);
-pa();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G)}G=C.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));G.className="geAdaptiveAsset";var ia=!1;mxEvent.addListener(G,"click",function(ca){this.className=(ia=!ia)?"geButton geCheckedBtn":"geButton";ja();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G);b.commentsRefreshNeeded()&&(G=C.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+
-'/update16.png" style="width: 16px; padding: 2px;">',G.setAttribute("title",mxResources.get("refresh")),G.className="geAdaptiveAsset",mxEvent.addListener(G,"click",function(ca){ja();ca.preventDefault();mxEvent.consume(ca)}),N.appendChild(G));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geAdaptiveAsset",mxEvent.addListener(C,"click",function(ca){p();ca.preventDefault();
-mxEvent.consume(ca)}),N.appendChild(C));y.appendChild(N);var ka=[],ja=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var ca=v.div.querySelector(".geCommentEditTxtArea"),pa=v.div.querySelector(".geCommentEditBtns");v.comment.content=ca.value;ca.parentNode.removeChild(ca);pa.parentNode.removeChild(pa)}catch(ra){b.handleError(ra)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
-"...</div>";g=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ra){function L(V){if(null!=V){V.sort(function(Y,Z){return new Date(Y.modifiedDate)-new Date(Z.modifiedDate)});for(var R=0;R<V.length;R++)L(V[R].replies)}}ra.sort(function(V,R){return new Date(V.modifiedDate)-new Date(R.modifiedDate)});I.innerText="";I.appendChild(D);D.style.display="block";ka=ra;for(ra=0;ra<ka.length;ra++)L(ka[ra].replies),e(ka[ra],ka,null,0,ia);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&
+oa=0;oa<Ba.length;oa++)Ba[oa]!=fa.parentNode&&(Ba[oa].style.display=na);ia||(sa[ua].style.display="none")}E()}ca.isResolved?Z(mxResources.get("reOpened")+": ",!0,da,!1,!0):Z(mxResources.get("markedAsResolved"),!1,da,!0)});la.appendChild(q);null!=ra?I.insertBefore(la,ra.nextSibling):I.appendChild(la);for(ra=0;null!=ca.replies&&ra<ca.replies.length;ra++)q=ca.replies[ra],q.isResolved=ca.isResolved,d(q,ca.replies,null,L+1,V);null!=v&&(v.comment.id==ca.id?(V=ca.content,ca.content=v.comment.content,M(ca,
+la,v.saveCallback,v.deleteOnCancel),ca.content=V):null==v.comment.id&&v.comment.pCommentId==ca.id&&(I.appendChild(v.div),M(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return la}}var f=!b.canComment(),g=b.canReplyToReplies(),v=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var B=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";I.style.bottom=parseInt(B)+7+"px";x.appendChild(I);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(D,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=B;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B=document.createElement("a");
+B.className="geButton";if(!f){var G=B.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(ca){function pa(){M(ra,L,function(V){H(L);b.addComment(V,function(R){V.id=R;ka.push(V);Q(L)},function(R){K(L);pa();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ra=b.newComment("",b.getCurrentUser()),L=d(ra,ka,null,0);
+pa();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G)}G=B.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));G.className="geAdaptiveAsset";var ia=!1;mxEvent.addListener(G,"click",function(ca){this.className=(ia=!ia)?"geButton geCheckedBtn":"geButton";ja();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G);b.commentsRefreshNeeded()&&(G=B.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+
+'/update16.png" style="width: 16px; padding: 2px;">',G.setAttribute("title",mxResources.get("refresh")),G.className="geAdaptiveAsset",mxEvent.addListener(G,"click",function(ca){ja();ca.preventDefault();mxEvent.consume(ca)}),N.appendChild(G));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geAdaptiveAsset",mxEvent.addListener(B,"click",function(ca){p();ca.preventDefault();
+mxEvent.consume(ca)}),N.appendChild(B));x.appendChild(N);var ka=[],ja=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var ca=v.div.querySelector(".geCommentEditTxtArea"),pa=v.div.querySelector(".geCommentEditBtns");v.comment.content=ca.value;ca.parentNode.removeChild(ca);pa.parentNode.removeChild(pa)}catch(ra){b.handleError(ra)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+"...</div>";g=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ra){function L(V){if(null!=V){V.sort(function(Y,Z){return new Date(Y.modifiedDate)-new Date(Z.modifiedDate)});for(var R=0;R<V.length;R++)L(V[R].replies)}}ra.sort(function(V,R){return new Date(V.modifiedDate)-new Date(R.modifiedDate)});I.innerText="";I.appendChild(D);D.style.display="block";ka=ra;for(ra=0;ra<ka.length;ra++)L(ka[ra].replies),d(ka[ra],ka,null,0,ia);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&
(I.appendChild(v.div),M(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(ra){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ra&&ra.message?": "+ra.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ja();this.refreshComments=ja;N=mxUtils.bind(this,function(){function ca(R){var Y=ra[R.id];if(null!=Y)for(S(R,Y),Y=0;null!=R.replies&&Y<R.replies.length;Y++)ca(R.replies[Y])}if(this.window.isVisible()){for(var pa=I.querySelectorAll(".geCommentDate"),
-ra={},L=0;L<pa.length;L++){var V=pa[L];ra[V.getAttribute("data-commentId")]=V}for(L=0;L<ka.length;L++)ca(ka[L])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),y,d,k,l,B,!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,d,k,l,B,p,E,M,S,H,K){var Q=document.createElement("div");Q.style.textAlign="center";K=null!=K?K:44;var e=document.createElement("div");e.style.padding="6px";e.style.overflow="auto";e.style.maxHeight=K+"px";e.style.lineHeight="1.2em";mxUtils.write(e,d);Q.appendChild(e);null!=H&&(e=document.createElement("div"),e.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",H),e.appendChild(d),Q.appendChild(e));H=document.createElement("div");
-H.style.textAlign="center";H.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l(f.checked)});p.className="geBtn";null!=M&&(p.innerHTML=M+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&H.appendChild(p);var g=mxUtils.button(B||mxResources.get("ok"),function(){b.hideDialog();null!=k&&
-k(f.checked)});H.appendChild(g);null!=E?(g.innerHTML=E+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(p);Q.appendChild(H);S?(H.style.marginTop="10px",e=document.createElement("p"),e.style.marginTop="20px",e.style.marginBottom="0px",e.appendChild(f),B=document.createElement("span"),mxUtils.write(B," "+mxResources.get("rememberThisSetting")),
-e.appendChild(B),Q.appendChild(e),mxEvent.addListener(B,"click",function(v){f.checked=!f.checked;mxEvent.consume(v)})):H.style.marginTop="12px";this.init=function(){g.focus()};this.container=Q};function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):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,d,k){this.ui=b;this.page=d;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(b,d,k){this.ui=b;this.oldIndex=d;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(b,d,k){this.ui=b;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=k&&(d.viewState=k,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var d=this.ui.editor,k=d.graph,l=Graph.compressNode(d.getGraphXml(!0));mxUtils.setTextContent(b.node,l);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
-k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,d,k,l,B){SelectPage.call(this,b,k);this.relatedPage=d;this.index=l;this.previousIndex=null;this.noSelect=B}mxUtils.extend(ChangePage,SelectPage);
+ra={},L=0;L<pa.length;L++){var V=pa[L];ra[V.getAttribute("data-commentId")]=V}for(L=0;L<ka.length;L++)ca(ka[L])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),x,e,k,l,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
+b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,l,C,p,E,M,S,H,K){var Q=document.createElement("div");Q.style.textAlign="center";K=null!=K?K:44;var d=document.createElement("div");d.style.padding="6px";d.style.overflow="auto";d.style.maxHeight=K+"px";d.style.lineHeight="1.2em";mxUtils.write(d,e);Q.appendChild(d);null!=H&&(d=document.createElement("div"),d.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",H),d.appendChild(e),Q.appendChild(d));H=document.createElement("div");
+H.style.textAlign="center";H.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l(f.checked)});p.className="geBtn";null!=M&&(p.innerHTML=M+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&H.appendChild(p);var g=mxUtils.button(C||mxResources.get("ok"),function(){b.hideDialog();null!=k&&
+k(f.checked)});H.appendChild(g);null!=E?(g.innerHTML=E+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(p);Q.appendChild(H);S?(H.style.marginTop="10px",d=document.createElement("p"),d.style.marginTop="20px",d.style.marginBottom="0px",d.appendChild(f),C=document.createElement("span"),mxUtils.write(C," "+mxResources.get("rememberThisSetting")),
+d.appendChild(C),Q.appendChild(d),mxEvent.addListener(C,"click",function(v){f.checked=!f.checked;mxEvent.consume(v)})):H.style.marginTop="12px";this.init=function(){g.focus()};this.container=Q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var e=this.ui.editor,k=e.graph,l=Graph.compressNode(e.getGraphXml(!0));mxUtils.setTextContent(b.node,l);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
+k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(b,e,k,l,C){SelectPage.call(this,b,k);this.relatedPage=e;this.index=l;this.previousIndex=null;this.noSelect=C}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var d=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){d=k;break}return d};EditorUi.prototype.getPageById=function(b,d){d=null!=d?d:this.pages;if(null!=d)for(var k=0;k<d.length;k++)if(d[k].getId()==b)return d[k];return null};
-EditorUi.prototype.createImageForPageLink=function(b,d,k){var l=b.indexOf(","),B=null;0<l&&(l=this.getPageById(b.substring(l+1)),null!=l&&l!=d&&(B=this.getImageForPage(l,d,k),B.originalSrc=b));null==B&&(B={originalSrc:b});return B};
-EditorUi.prototype.getImageForPage=function(b,d,k){k=null!=k?k:this.editor.graph;var l=k.getGlobalVariable,B=this.createTemporaryGraph(k.getStylesheet());B.defaultPageBackgroundColor=k.defaultPageBackgroundColor;B.shapeBackgroundColor=k.shapeBackgroundColor;B.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=d?d:this.currentPage);B.getGlobalVariable=function(M){return"pagenumber"==M?p+1:"page"==M&&null!=d?d.getName():l.apply(this,arguments)};document.body.appendChild(B.container);
-this.updatePageRoot(b);B.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=B.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=B.getGraphBounds();document.body.removeChild(B.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,d=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var B=
-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";B!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(b.view,arguments)});var k=null,l=mxUtils.bind(this,function(){this.updateTabContainer();var B=this.currentPage;null!=B&&B!=k&&(null==B.viewState||null==B.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
-(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+B.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+B.viewState.scrollTop),k=B);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(B,
-p){B=p.getProperty("edit").changes;for(p=0;p<B.length;p++)if(B[p]instanceof SelectPage||B[p]instanceof RenamePage||B[p]instanceof MovePage||B[p]instanceof mxRootChange){l();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(b,d,k){b=null!=b?this.getPageById(b.getId()):null;var l=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,d):(l.setViewState(d),this.editor.updateGraphComponents(),l.view.revalidate(),l.sizeDidChange()),l.container.scrollLeft=l.view.translate.x*l.view.scale+d.scrollLeft,l.container.scrollTop=l.view.translate.y*l.view.scale+d.scrollTop,l.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var d=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),l=parseFloat(b.getAttribute("pageWidth")),B=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),M=b.getAttribute("extFonts");if(M)try{M=M.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(l)||isNaN(B)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,l,B),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:M||[]}};
-Graph.prototype.saveViewState=function(b,d,k,l){k||(d.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),d.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),d.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),d.setAttribute("connect",null==b||b.connect?"1":"0"),d.setAttribute("arrows",null==b||b.arrows?"1":"0"),d.setAttribute("fold",
-null==b||b.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(d.setAttribute("pageWidth",k.width),d.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&d.setAttribute("background",b.background),l=this.getBackgroundImageObject(b.backgroundImage,l),null!=l&&d.setAttribute("backgroundImage",
-JSON.stringify(l)));d.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");d.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&d.setAttribute("extFonts",b.extFonts.map(function(B){return B.name+"^"+B.url}).join("|"))};
+EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
+EditorUi.prototype.createImageForPageLink=function(b,e,k){var l=b.indexOf(","),C=null;0<l&&(l=this.getPageById(b.substring(l+1)),null!=l&&l!=e&&(C=this.getImageForPage(l,e,k),C.originalSrc=b));null==C&&(C={originalSrc:b});return C};
+EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var l=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(M){return"pagenumber"==M?p+1:"page"==M&&null!=e?e.getName():l.apply(this,arguments)};document.body.appendChild(C.container);
+this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var C=
+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";C!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,l=mxUtils.bind(this,function(){this.updateTabContainer();var C=this.currentPage;null!=C&&C!=k&&(null==C.viewState||null==C.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+C.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+C.viewState.scrollTop),k=C);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,
+p){C=p.getProperty("edit").changes;for(p=0;p<C.length;p++)if(C[p]instanceof SelectPage||C[p]instanceof RenamePage||C[p]instanceof MovePage||C[p]instanceof mxRootChange){l();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var l=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(l.setViewState(e),this.editor.updateGraphComponents(),l.view.revalidate(),l.sizeDidChange()),l.container.scrollLeft=l.view.translate.x*l.view.scale+e.scrollLeft,l.container.scrollTop=l.view.translate.y*l.view.scale+e.scrollTop,l.restoreSelection(k))};
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),l=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),M=b.getAttribute("extFonts");if(M)try{M=M.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(l)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,l,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:M||[]}};
+Graph.prototype.saveViewState=function(b,e,k,l){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
+null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),l=this.getBackgroundImageObject(b.backgroundImage,l),null!=l&&e.setAttribute("backgroundImage",
+JSON.stringify(l)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(C){return C.name+"^"+C.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
-Graph.prototype.setViewState=function(b,d){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(d&&null!=k)for(d=0;d<k.length;d++){var l=document.getElementById("extFont_"+k[d].name);null!=l&&l.parentNode.removeChild(l)}for(d=0;d<this.extFonts.length;d++)this.addExtFont(this.extFonts[d].name,this.extFonts[d].url,
+Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=k)for(e=0;e<k.length;e++){var l=document.getElementById("extFont_"+k[e].name);null!=l&&l.parentNode.removeChild(l)}for(e=0;e<this.extFonts.length;e++)this.addExtFont(this.extFonts[e].name,this.extFonts[e].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled=
!0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,d,k){if(b&&d){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:d});var l="extFont_"+b;if(null==document.getElementById(l))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,l);else{document.getElementsByTagName("head");var B=document.createElement("style");B.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+d+'");\n}'));B.setAttribute("id",l);document.getElementsByTagName("head")[0].appendChild(B)}if(!k){null==
-this.extFonts&&(this.extFonts=[]);k=this.extFonts;l=!0;for(B=0;B<k.length;B++)if(k[B].name==b){l=!1;break}l&&this.extFonts.push({name:b,url:d})}}};
-EditorUi.prototype.updatePageRoot=function(b,d){if(null==b.root){d=this.editor.extractGraphModel(b.node,null,d);var k=Editor.extractParserError(d);if(k)throw Error(k);null!=d?(b.graphModelNode=d,b.viewState=this.editor.graph.createViewState(d),k=new mxCodec(d.ownerDocument),b.root=k.decode(d).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){d=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(d))throw Error(k);null!=d&&(b.graphModelNode=
-d)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,d,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var l=this.editor.graph.model.createUndoableEdit();l.ignoreEdit=!0;var B=new SelectPage(this,b,k);B.execute();l.add(B);l.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",l))}}catch(p){this.handleError(p)}};
-EditorUi.prototype.selectNextPage=function(b){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),b?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,d){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),d=null!=d?d:this.pages.length,d=new ChangePage(this,b,b,d),this.editor.graph.model.execute(d));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,d){d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),d);d.setName(null!=b?b:this.createPageName());this.initDiagramNode(d);return d};EditorUi.prototype.createPageName=function(){for(var b={},d=0;d<this.pages.length;d++){var k=this.pages[d].getName();null!=k&&0<k.length&&(b[k]=k)}d=this.pages.length;do k=mxResources.get("pageWithNumber",[++d]);while(null!=b[k]);return k};
-EditorUi.prototype.removePage=function(b){try{var d=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(d.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var l=this.currentPage;l==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,l=this.pages[k]):1>=this.pages.length&&(l=this.insertPage(),d.model.execute(new RenamePage(this,l,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,b,l))}finally{d.model.endUpdate()}}}catch(B){this.handleError(B)}return b};
-EditorUi.prototype.duplicatePage=function(b,d){var k=null;try{var l=this.editor.graph;if(l.isEnabled()){l.isEditing()&&l.stopEditing();var B=b.node.cloneNode(!1);B.removeAttribute("id");var p={},E=l.createCellLookup([l.model.root]);k=new DiagramPage(B);k.root=l.cloneCell(l.model.root,null,p);var M=new mxGraphModel;M.prefix=Editor.guid()+"-";M.setRoot(k.root);l.updateCustomLinks(l.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?l.getViewState():b.viewState;this.initDiagramNode(k);
-k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(d);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return k};EditorUi.prototype.initDiagramNode=function(b){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,d);mxUtils.setTextContent(b.node,Graph.compressNode(d))};
-EditorUi.prototype.clonePages=function(b){for(var d=[],k=0;k<b.length;k++)d.push(this.clonePage(b[k]));return d};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var d=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;d.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);d.root=this.editor.graph.model.cloneCell(b.root,null,!0);return d};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return b};EditorUi.prototype.movePage=function(b,d){this.editor.graph.model.execute(new MovePage(this,b,d))};
+Graph.prototype.addExtFont=function(b,e,k){if(b&&e){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:e});var l="extFont_"+b;if(null==document.getElementById(l))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,l);else{document.getElementsByTagName("head");var C=document.createElement("style");C.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));C.setAttribute("id",l);document.getElementsByTagName("head")[0].appendChild(C)}if(!k){null==
+this.extFonts&&(this.extFonts=[]);k=this.extFonts;l=!0;for(C=0;C<k.length;C++)if(k[C].name==b){l=!1;break}l&&this.extFonts.push({name:b,url:e})}}};
+EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){e=this.editor.extractGraphModel(b.node,null,e);var k=Editor.extractParserError(e);if(k)throw Error(k);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),k=new mxCodec(e.ownerDocument),b.root=k.decode(e).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(e))throw Error(k);null!=e&&(b.graphModelNode=
+e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
+EditorUi.prototype.selectPage=function(b,e,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var l=this.editor.graph.model.createUndoableEdit();l.ignoreEdit=!0;var C=new SelectPage(this,b,k);C.execute();l.add(C);l.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",l))}}catch(p){this.handleError(p)}};
+EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};
+EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
+EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var l=this.currentPage;l==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,l=this.pages[k]):1>=this.pages.length&&(l=this.insertPage(),e.model.execute(new RenamePage(this,l,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,l))}finally{e.model.endUpdate()}}}catch(C){this.handleError(C)}return b};
+EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var l=this.editor.graph;if(l.isEnabled()){l.isEditing()&&l.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},E=l.createCellLookup([l.model.root]);k=new DiagramPage(C);k.root=l.cloneCell(l.model.root,null,p);var M=new mxGraphModel;M.prefix=Editor.guid()+"-";M.setRoot(k.root);l.updateCustomLinks(l.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?l.getViewState():b.viewState;this.initDiagramNode(k);
+k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
+EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display="inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="13px";d.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,l=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),B=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(H,K){this.pages[H]==this.currentPage?(K.className="geActivePage",K.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):K.className="geInactivePage";K.setAttribute("draggable","true");mxEvent.addListener(K,"dragstart",mxUtils.bind(this,function(Q){b.isEnabled()?(mxClient.IS_FF&&Q.dataTransfer.setData("Text","<diagram/>"),B=H):mxEvent.consume(Q)}));mxEvent.addListener(K,"dragend",mxUtils.bind(this,function(Q){B=null;Q.stopPropagation();
-Q.preventDefault()}));mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Q){null!=B&&(Q.dataTransfer.dropEffect="move");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Q){null!=B&&H!=B&&this.movePage(B,H);Q.stopPropagation();Q.preventDefault()}));d.appendChild(K)})(p,this.createTabForPage(this.pages[p],l,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(d);l=this.createPageMenuTab();this.tabContainer.appendChild(l);
-l=null;this.isPageInsertTabVisible()&&(l=this.createPageInsertTab(),this.tabContainer.appendChild(l));if(d.clientWidth>this.tabContainer.clientWidth-k){null!=l&&(l.style.position="absolute",l.style.right="0px",d.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var M=this.createControlTab(4,"&nbsp;&#10095;");M.style.position="absolute";
-M.style.right=this.editor.chromeless?"0px":"29px";M.style.fontSize="13pt";this.tabContainer.appendChild(M);var S=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=S+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(H){d.scrollLeft-=Math.max(20,S-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(M,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(H)}));mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(M,
-d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(M,"click",mxUtils.bind(this,function(H){d.scrollLeft+=Math.max(20,S-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(M,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(H)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(b){var d=document.createElement("div");d.style.display="inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.textAlign="center";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="12px 4px 8px 4px";d.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";d.style.borderTopStyle="none";d.style.borderBottomStyle="none";d.style.backgroundColor=
-this.tabContainer.style.backgroundColor;d.style.cursor="move";d.style.color="gray";b&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(d.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(k){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return d};
-EditorUi.prototype.createControlTab=function(b,d,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=d;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
-EditorUi.prototype.createPageMenuTab=function(b,d){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
-var B=new mxPopupMenu(mxUtils.bind(this,function(M,S){var H=mxUtils.bind(this,function(){for(var f=0;f<this.pages.length;f++)mxUtils.bind(this,function(g){var v=M.addItem(this.getShortPageName(this.pages[g]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[g])}),S),y=this.pages[g].getId();v.setAttribute("title",this.pages[g].getName()+" ("+(g+1)+"/"+this.pages.length+")"+(null!=y?" ["+y+"]":""));this.pages[g]==this.currentPage&&M.addCheckmark(v,Editor.checkmarkImage)})(f)}),K=mxUtils.bind(this,
-function(){M.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),S)});d||H();if(this.editor.graph.isEnabled()){d||(M.addSeparator(S),K());var Q=this.currentPage;if(null!=Q){M.addSeparator(S);var e=this.getShortPageName(Q);M.addItem(mxResources.get("removeIt",[e]),null,mxUtils.bind(this,function(){this.removePage(Q)}),S);M.addItem(mxResources.get("renameIt",[e]),null,mxUtils.bind(this,function(){this.renamePage(Q,Q.getName())}),S);d||M.addSeparator(S);M.addItem(mxResources.get("duplicateIt",
-[e]),null,mxUtils.bind(this,function(){this.duplicatePage(Q,mxResources.get("copyOf",[Q.getName()]))}),S)}}d&&(M.addSeparator(S),K(),M.addSeparator(S),H())}));B.div.className+=" geMenubarMenu";B.smartSeparators=!0;B.showDisabled=!0;B.autoExpand=!0;B.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(B,arguments);B.destroy()});var p=mxEvent.getClientX(l),E=mxEvent.getClientY(l);B.popup(p,E,null,l);this.setCurrentMenu(B);mxEvent.consume(l)}));return b};
-EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var d=b.getElementsByTagName("div")[0];d.style.display="inline-block";d.style.width="21px";d.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,d,k,l){k=this.createTab(k);var B=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",B+(null!=p?" ("+p+")":"")+" ["+l+"]");mxUtils.write(k,B);k.style.maxWidth=d+"px";k.style.width=d+"px";this.addTabListeners(b,k);42<d&&(k.style.textOverflow="ellipsis");return k};
-EditorUi.prototype.addTabListeners=function(b,d){mxEvent.disableContextMenu(d);var k=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var l=!1,B=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(p){l=null!=this.currentMenu;B=b==this.currentPage;k.isMouseDown||B||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&B||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!l){var E=new mxPopupMenu(this.createPageMenu(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.resetCurrentMenu();E.destroy()});var M=mxEvent.getClientX(p),S=mxEvent.getClientY(p);E.popup(M,S,null,p);this.setCurrentMenu(E,d)}mxEvent.consume(p)}}))};
-EditorUi.prototype.getLinkForPage=function(b,d,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var l=this.getCurrentFile();if(null!=l&&l.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var B=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));B+=(0==B.length?"?":"&")+"page-id="+b.getId();null!=d&&(B+="&"+d.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+B+"#"+l.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,d){return mxUtils.bind(this,function(k,l){var B=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),l);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),l);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,d)}),l);null!=this.getLinkForPage(b)&&(k.addSeparator(l),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,M,S,H,K){p=this.createUrlParameters(p,E,M,S,H,K);M||p.push("hide-pages=1");B.isSelectionEmpty()||(M=B.getBoundingBox(B.getSelectionCells()),E=B.view.translate,H=B.view.scale,M.width/=H,M.height/=H,M.x=M.x/H-E.x,M.y=M.y/H-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(M.x),y:Math.round(M.y),width:Math.round(M.width),height:Math.round(M.height),border:100}))));
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,l=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
+1),C=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(H,K){this.pages[H]==this.currentPage?(K.className="geActivePage",K.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):K.className="geInactivePage";K.setAttribute("draggable","true");mxEvent.addListener(K,"dragstart",mxUtils.bind(this,function(Q){b.isEnabled()?(mxClient.IS_FF&&Q.dataTransfer.setData("Text","<diagram/>"),C=H):mxEvent.consume(Q)}));mxEvent.addListener(K,"dragend",mxUtils.bind(this,function(Q){C=null;Q.stopPropagation();
+Q.preventDefault()}));mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Q){null!=C&&(Q.dataTransfer.dropEffect="move");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Q){null!=C&&H!=C&&this.movePage(C,H);Q.stopPropagation();Q.preventDefault()}));e.appendChild(K)})(p,this.createTabForPage(this.pages[p],l,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);l=this.createPageMenuTab();this.tabContainer.appendChild(l);
+l=null;this.isPageInsertTabVisible()&&(l=this.createPageInsertTab(),this.tabContainer.appendChild(l));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=l&&(l.style.position="absolute",l.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var M=this.createControlTab(4,"&nbsp;&#10095;");M.style.position="absolute";
+M.style.right=this.editor.chromeless?"0px":"29px";M.style.fontSize="13pt";this.tabContainer.appendChild(M);var S=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=S+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(H){e.scrollLeft-=Math.max(20,S-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(M,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(H)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(M,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(M,"click",mxUtils.bind(this,function(H){e.scrollLeft+=Math.max(20,S-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(M,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(H)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
+this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
+EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
+EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
+var C=new mxPopupMenu(mxUtils.bind(this,function(M,S){var H=mxUtils.bind(this,function(){for(var f=0;f<this.pages.length;f++)mxUtils.bind(this,function(g){var v=M.addItem(this.getShortPageName(this.pages[g]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[g])}),S),x=this.pages[g].getId();v.setAttribute("title",this.pages[g].getName()+" ("+(g+1)+"/"+this.pages.length+")"+(null!=x?" ["+x+"]":""));this.pages[g]==this.currentPage&&M.addCheckmark(v,Editor.checkmarkImage)})(f)}),K=mxUtils.bind(this,
+function(){M.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),S)});e||H();if(this.editor.graph.isEnabled()){e||(M.addSeparator(S),K());var Q=this.currentPage;if(null!=Q){M.addSeparator(S);var d=this.getShortPageName(Q);M.addItem(mxResources.get("removeIt",[d]),null,mxUtils.bind(this,function(){this.removePage(Q)}),S);M.addItem(mxResources.get("renameIt",[d]),null,mxUtils.bind(this,function(){this.renamePage(Q,Q.getName())}),S);e||M.addSeparator(S);M.addItem(mxResources.get("duplicateIt",
+[d]),null,mxUtils.bind(this,function(){this.duplicatePage(Q,mxResources.get("copyOf",[Q.getName()]))}),S)}}e&&(M.addSeparator(S),K(),M.addSeparator(S),H())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(l),E=mxEvent.getClientY(l);C.popup(p,E,null,l);this.setCurrentMenu(C);mxEvent.consume(l)}));return b};
+EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
+EditorUi.prototype.createTabForPage=function(b,e,k,l){k=this.createTab(k);var C=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",C+(null!=p?" ("+p+")":"")+" ["+l+"]");mxUtils.write(k,C);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var l=!1,C=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){l=null!=this.currentMenu;C=b==this.currentPage;k.isMouseDown||C||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&C||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!l){var E=new mxPopupMenu(this.createPageMenu(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.resetCurrentMenu();E.destroy()});var M=mxEvent.getClientX(p),S=mxEvent.getClientY(p);E.popup(M,S,null,p);this.setCurrentMenu(E,e)}mxEvent.consume(p)}}))};
+EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var l=this.getCurrentFile();if(null!=l&&l.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var C=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));C+=(0==C.length?"?":"&")+"page-id="+b.getId();null!=e&&(C+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+C+"#"+l.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,l){var C=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),l);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),l);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),l);null!=this.getLinkForPage(b)&&(k.addSeparator(l),k.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,M,S,H,K){p=this.createUrlParameters(p,E,M,S,H,K);M||p.push("hide-pages=1");C.isSelectionEmpty()||(M=C.getBoundingBox(C.getSelectionCells()),E=C.view.translate,H=C.view.scale,M.width/=H,M.height/=H,M.x=M.x/H-E.x,M.y=M.y/H-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(M.x),y:Math.round(M.y),width:Math.round(M.width),height:Math.round(M.height),border:100}))));
S=new EmbedDialog(this,this.getLinkForPage(b,p,S));this.showDialog(S.container,450,240,!0,!0);S.init()}))})));k.addSeparator(l);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),l);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(l),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),l))})};(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(d,k,l){l.ui=d.ui;return k};b.afterDecode=function(d,k,l){d=l.oldIndex;l.oldIndex=l.newIndex;l.newIndex=d;return l};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(d,k,l){l.ui=d.ui;return k};b.afterDecode=function(d,k,l){d=l.previous;l.previous=l.name;l.name=d;return l};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(d,k,l){l.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(l.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(B,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,B)?p:void 0})),null!=k.relatedPage.root&&d.encodeCell(k.relatedPage.root,
-l));return l};b.beforeDecode=function(d,k,l){l.ui=d.ui;l.relatedPage=l.ui.getPageById(k.getAttribute("relatedPage"));if(null==l.relatedPage){var B=k.ownerDocument.createElement("diagram");B.setAttribute("id",k.getAttribute("relatedPage"));B.setAttribute("name",k.getAttribute("name"));l.relatedPage=new DiagramPage(B);B=k.getAttribute("viewState");null!=B&&(l.relatedPage.viewState=JSON.parse(B),k.removeAttribute("viewState"));k=k.cloneNode(!0);B=k.firstChild;if(null!=B)for(l.relatedPage.root=d.decodeCell(B,
-!1),l=B.nextSibling,B.parentNode.removeChild(B),B=l;null!=B;){l=B.nextSibling;if(B.nodeType==mxConstants.NODETYPE_ELEMENT){var p=B.getAttribute("id");null==d.lookup(p)&&d.decodeCell(B)}B.parentNode.removeChild(B);B=l}}return k};b.afterDecode=function(d,k,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(l,B,p,E,M){B=null!=B?B:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),l));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),H=0;H<p.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[H]),"treeFolding","0")&&this.foldTreeCell(l,p[H]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
-function(l,B){this.model.beginUpdate();try{var p=[];this.traverse(B,!0,mxUtils.bind(this,function(M,S){var H=null!=S&&this.isTreeEdge(S);H&&p.push(S);M==B||null!=S&&!H||p.push(M);return(null==S||H)&&(M==B||!this.model.isCollapsed(M))}));this.model.setCollapsed(B,l);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!l)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(l){return!this.isEdgeIgnored(l)};Graph.prototype.getTreeEdges=function(l,B,p,E,M,S){return this.model.filterCells(this.getEdges(l,
-B,p,E,M,S),mxUtils.bind(this,function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(l,B){return this.getTreeEdges(l,B,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(l,B){return this.getTreeEdges(l,B,!1,!0,!1)};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function l(L){return v.isVertex(L)&&p(L)}function B(L){var V=
+!0,!0))}),l))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};b.afterDecode=function(e,k,l){e=l.oldIndex;l.oldIndex=l.newIndex;l.newIndex=e;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};b.afterDecode=function(e,k,l){e=l.previous;l.previous=l.name;l.name=e;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,l){l.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(l.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(C,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,C)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
+l));return l};b.beforeDecode=function(e,k,l){l.ui=e.ui;l.relatedPage=l.ui.getPageById(k.getAttribute("relatedPage"));if(null==l.relatedPage){var C=k.ownerDocument.createElement("diagram");C.setAttribute("id",k.getAttribute("relatedPage"));C.setAttribute("name",k.getAttribute("name"));l.relatedPage=new DiagramPage(C);C=k.getAttribute("viewState");null!=C&&(l.relatedPage.viewState=JSON.parse(C),k.removeAttribute("viewState"));k=k.cloneNode(!0);C=k.firstChild;if(null!=C)for(l.relatedPage.root=e.decodeCell(C,
+!1),l=C.nextSibling,C.parentNode.removeChild(C),C=l;null!=C;){l=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=l}}return k};b.afterDecode=function(e,k,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(l,C,p,E,M){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),l));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),H=0;H<p.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[H]),"treeFolding","0")&&this.foldTreeCell(l,p[H]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(l,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(M,S){var H=null!=S&&this.isTreeEdge(S);H&&p.push(S);M==C||null!=S&&!H||p.push(M);return(null==S||H)&&(M==C||!this.model.isCollapsed(M))}));this.model.setCollapsed(C,l);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!l)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(l){return!this.isEdgeIgnored(l)};Graph.prototype.getTreeEdges=function(l,C,p,E,M,S){return this.model.filterCells(this.getEdges(l,
+C,p,E,M,S),mxUtils.bind(this,function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(l,C){return this.getTreeEdges(l,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(l,C){return this.getTreeEdges(l,C,!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 l(L){return v.isVertex(L)&&p(L)}function C(L){var V=
!1;null!=L&&(V="1"==g.getCurrentCellStyle(L).treeMoving);return V}function p(L){var V=!1;null!=L&&(L=v.getParent(L),V=g.view.getState(L),V="tree"==(null!=V?V.style:g.getCellStyle(L)).containerType);return V}function E(L){var V=!1;null!=L&&(L=v.getParent(L),V=g.view.getState(L),g.view.getState(L),V=null!=(null!=V?V.style:g.getCellStyle(L)).childLayout);return V}function M(L){L=g.view.getState(L);if(null!=L){var V=g.getIncomingTreeEdges(L.cell);if(0<V.length&&(V=g.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==L.y&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==L.y+L.height&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>L.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(L,V){V=null!=V?V:!0;g.model.beginUpdate();try{var R=g.model.getParent(L),Y=g.getIncomingTreeEdges(L),Z=g.cloneCells([Y[0],L]);g.model.setTerminal(Z[0],g.model.getTerminal(Y[0],
!0),!0);var la=M(L),q=R.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?Z[1].geometry.x+=V?L.geometry.width+10:-Z[1].geometry.width-10:Z[1].geometry.y+=V?L.geometry.height+10:-Z[1].geometry.height-10;g.view.currentRoot!=R&&(Z[1].geometry.x-=q.x,Z[1].geometry.y-=q.y);var F=g.view.getState(L),T=g.view.scale;if(null!=F){var aa=mxRectangle.fromRectangle(F);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?aa.x+=(V?L.geometry.width+10:-Z[1].geometry.width-10)*T:
@@ -3966,78 +3973,78 @@ L.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?F=0:V==mxConstants.DIRECTION
g.model.getTerminal(la[0],!1)){g.model.setTerminal(la[0],la[1],!1);var q=g.getCellStyle(la[1]).newEdgeStyle;if(null!=q)try{var F=JSON.parse(q),T;for(T in F)g.setCellStyles(T,F[T],[la[0]]),"edgeStyle"==T&&"elbowEdgeStyle"==F[T]&&g.setCellStyles("elbow",Z==mxConstants.DIRECTION_SOUTH||Z==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(sa){}}Y=g.getOutgoingTreeEdges(L);var aa=R.geometry;V=[];g.view.currentRoot==R&&(aa=new mxRectangle);for(q=0;q<Y.length;q++){var U=g.model.getTerminal(Y[q],
!1);null!=U&&V.push(U)}var da=g.view.getBounds(V),fa=g.view.translate,na=g.view.scale;Z==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==da?L.geometry.x+(L.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/na-fa.x-aa.x+10,la[1].geometry.y+=la[1].geometry.height-aa.y+40):Z==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==da?L.geometry.x+(L.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/na-fa.x+-aa.x+10,la[1].geometry.y-=la[1].geometry.height+aa.y+40):(la[1].geometry.x=Z==mxConstants.DIRECTION_WEST?
la[1].geometry.x-(la[1].geometry.width+aa.x+40):la[1].geometry.x+(la[1].geometry.width-aa.x+40),la[1].geometry.y=null==da?L.geometry.y+(L.geometry.height-la[1].geometry.height)/2:(da.y+da.height)/na-fa.y+-aa.y+10);return g.addCells(la,R)}finally{g.model.endUpdate()}}function Q(L,V,R){L=g.getOutgoingTreeEdges(L);R=g.view.getState(R);var Y=[];if(null!=R&&null!=L){for(var Z=0;Z<L.length;Z++){var la=g.view.getState(g.model.getTerminal(L[Z],!1));null!=la&&(!V&&Math.min(la.x+la.width,R.x+R.width)>=Math.max(la.x,
-R.x)||V&&Math.min(la.y+la.height,R.y+R.height)>=Math.max(la.y,R.y))&&Y.push(la)}Y.sort(function(q,F){return V?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return Y}function e(L,V){var R=M(L),Y=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST)==Y&&R!=V?f.actions.get("selectParent").funct():R==V?(V=g.getOutgoingTreeEdges(L),null!=V&&0<V.length&&g.setSelectionCell(g.model.getTerminal(V[0],!1))):(R=g.getIncomingTreeEdges(L),
-null!=R&&0<R.length&&(Y=Q(g.model.getTerminal(R[0],!0),Y,L),L=g.view.getState(L),null!=L&&(L=mxUtils.indexOf(Y,L),0<=L&&(L+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=Y.length-1&&g.setSelectionCell(Y[L].cell)))))}var f=this,g=f.editor.graph,v=g.getModel(),y=f.menus.createPopupMenu;f.menus.createPopupMenu=function(L,V,R){y.apply(this,arguments);if(1==g.getSelectionCount()){V=g.getSelectionCell();var Y=g.getOutgoingTreeEdges(V);L.addSeparator();0<Y.length&&(l(g.getSelectionCell())&&
+R.x)||V&&Math.min(la.y+la.height,R.y+R.height)>=Math.max(la.y,R.y))&&Y.push(la)}Y.sort(function(q,F){return V?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return Y}function d(L,V){var R=M(L),Y=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST)==Y&&R!=V?f.actions.get("selectParent").funct():R==V?(V=g.getOutgoingTreeEdges(L),null!=V&&0<V.length&&g.setSelectionCell(g.model.getTerminal(V[0],!1))):(R=g.getIncomingTreeEdges(L),
+null!=R&&0<R.length&&(Y=Q(g.model.getTerminal(R[0],!0),Y,L),L=g.view.getState(L),null!=L&&(L=mxUtils.indexOf(Y,L),0<=L&&(L+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=Y.length-1&&g.setSelectionCell(Y[L].cell)))))}var f=this,g=f.editor.graph,v=g.getModel(),x=f.menus.createPopupMenu;f.menus.createPopupMenu=function(L,V,R){x.apply(this,arguments);if(1==g.getSelectionCount()){V=g.getSelectionCell();var Y=g.getOutgoingTreeEdges(V);L.addSeparator();0<Y.length&&(l(g.getSelectionCell())&&
this.addMenuItems(L,["selectChildren"],null,R),this.addMenuItems(L,["selectDescendants"],null,R));l(g.getSelectionCell())?(L.addSeparator(),0<g.getIncomingTreeEdges(V).length&&this.addMenuItems(L,["selectSiblings","selectParent"],null,R)):0<g.model.getEdgeCount(V)&&this.addMenuItems(L,["selectConnections"],null,R)}};f.actions.addAction("selectChildren",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var L=g.getSelectionCell();L=g.getOutgoingTreeEdges(L);if(null!=L){for(var V=[],R=0;R<L.length;R++)V.push(g.model.getTerminal(L[R],
!1));g.setSelectionCells(V)}}},null,null,"Alt+Shift+X");f.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var L=g.getSelectionCell();L=g.getIncomingTreeEdges(L);if(null!=L&&0<L.length&&(L=g.getOutgoingTreeEdges(g.model.getTerminal(L[0],!0)),null!=L)){for(var V=[],R=0;R<L.length;R++)V.push(g.model.getTerminal(L[R],!1));g.setSelectionCells(V)}}},null,null,"Alt+Shift+S");f.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var L=
g.getSelectionCell();L=g.getIncomingTreeEdges(L);null!=L&&0<L.length&&g.setSelectionCell(g.model.getTerminal(L[0],!0))}},null,null,"Alt+Shift+P");f.actions.addAction("selectDescendants",function(L,V){L=g.getSelectionCell();if(g.isEnabled()&&g.model.isVertex(L)){if(null!=V&&mxEvent.isAltDown(V))g.setSelectionCells(g.model.getTreeEdges(L,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var R=[];g.traverse(L,!0,function(Y,Z){var la=null!=Z&&g.isTreeEdge(Z);la&&R.push(Z);null!=
-Z&&!la||null!=V&&mxEvent.isShiftDown(V)||R.push(Y);return null==Z||la})}g.setSelectionCells(R)}},null,null,"Alt+Shift+D");var C=g.removeCells;g.removeCells=function(L,V){V=null!=V?V:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));V&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var R=[],Y=0;Y<L.length;Y++){var Z=L[Y];v.isEdge(Z)&&p(Z)&&(R.push(Z),Z=v.getTerminal(Z,!1));if(l(Z)){var la=[];g.traverse(Z,!0,function(q,F){var T=null!=F&&g.isTreeEdge(F);T&&la.push(F);(null==F||T)&&
-la.push(q);return null==F||T});0<la.length&&(R=R.concat(la),Z=g.getIncomingTreeEdges(L[Y]),L=L.concat(Z))}else null!=Z&&R.push(L[Y])}L=R;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(L,V,R){return l(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,R))};var I=g.duplicateCells;g.duplicateCells=function(L,V){L=null!=L?L:this.getSelectionCells();for(var R=L.slice(0),Y=0;Y<R.length;Y++){var Z=g.view.getState(R[Y]);if(null!=Z&&l(Z.cell)){var la=g.getIncomingTreeEdges(Z.cell);
+Z&&!la||null!=V&&mxEvent.isShiftDown(V)||R.push(Y);return null==Z||la})}g.setSelectionCells(R)}},null,null,"Alt+Shift+D");var B=g.removeCells;g.removeCells=function(L,V){V=null!=V?V:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));V&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var R=[],Y=0;Y<L.length;Y++){var Z=L[Y];v.isEdge(Z)&&p(Z)&&(R.push(Z),Z=v.getTerminal(Z,!1));if(l(Z)){var la=[];g.traverse(Z,!0,function(q,F){var T=null!=F&&g.isTreeEdge(F);T&&la.push(F);(null==F||T)&&
+la.push(q);return null==F||T});0<la.length&&(R=R.concat(la),Z=g.getIncomingTreeEdges(L[Y]),L=L.concat(Z))}else null!=Z&&R.push(L[Y])}L=R;return B.apply(this,arguments)};f.hoverIcons.getStateAt=function(L,V,R){return l(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,R))};var I=g.duplicateCells;g.duplicateCells=function(L,V){L=null!=L?L:this.getSelectionCells();for(var R=L.slice(0),Y=0;Y<R.length;Y++){var Z=g.view.getState(R[Y]);if(null!=Z&&l(Z.cell)){var la=g.getIncomingTreeEdges(Z.cell);
for(Z=0;Z<la.length;Z++)mxUtils.remove(la[Z],L)}}this.model.beginUpdate();try{var q=I.call(this,L,V);if(q.length==L.length)for(Y=0;Y<L.length;Y++)if(l(L[Y])){var F=g.getIncomingTreeEdges(q[Y]);la=g.getIncomingTreeEdges(L[Y]);if(0==F.length&&0<la.length){var T=this.cloneCell(la[0]);this.addEdge(T,g.getDefaultParent(),this.model.getTerminal(la[0],!0),q[Y])}}}finally{this.model.endUpdate()}return q};var D=g.moveCells;g.moveCells=function(L,V,R,Y,Z,la,q){var F=null;this.model.beginUpdate();try{var T=
Z,aa=this.getCurrentCellStyle(Z);if(null!=L&&l(Z)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(var U=0;U<L.length;U++)if(l(L[U])||g.model.isEdge(L[U])&&null==g.model.getTerminal(L[U],!0)){Z=g.model.getParent(L[U]);break}if(null!=T&&Z!=T&&null!=this.view.getState(L[0])){var da=g.getIncomingTreeEdges(L[0]);if(0<da.length){var fa=g.view.getState(g.model.getTerminal(da[0],!0));if(null!=fa){var na=g.view.getState(T);null!=na&&(V=(na.getCenterX()-fa.getCenterX())/g.view.scale,R=(na.getCenterY()-fa.getCenterY())/
g.view.scale)}}}}F=D.apply(this,arguments);if(null!=F&&null!=L&&F.length==L.length)for(U=0;U<F.length;U++)if(this.model.isEdge(F[U]))l(T)&&0>mxUtils.indexOf(F,this.model.getTerminal(F[U],!0))&&this.model.setTerminal(F[U],T,!0);else if(l(L[U])&&(da=g.getIncomingTreeEdges(L[U]),0<da.length))if(!Y)l(T)&&0>mxUtils.indexOf(L,this.model.getTerminal(da[0],!0))&&this.model.setTerminal(da[0],T,!0);else if(0==g.getIncomingTreeEdges(F[U]).length){aa=T;if(null==aa||aa==g.model.getParent(L[U]))aa=g.model.getTerminal(da[0],
!0);Y=this.cloneCell(da[0]);this.addEdge(Y,g.getDefaultParent(),aa,F[U])}}finally{this.model.endUpdate()}return F};if(null!=f.sidebar){var N=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(L,V,R,Y){var Z=g.model,la=null;Z.beginUpdate();try{if(la=N.apply(this,arguments),l(L))for(var q=0;q<la.length;q++)if(Z.isEdge(la[q])&&null==Z.getTerminal(la[q],!0)){Z.setTerminal(la[q],L,!0);var F=g.getCellGeometry(la[q]);F.points=null;null!=F.getTerminalPoint(!0)&&F.setTerminalPoint(null,!0)}}finally{Z.endUpdate()}return la}}var G=
{88:f.actions.get("selectChildren"),84:f.actions.get("selectSubtree"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ia=f.onKeyDown;f.onKeyDown=function(L){try{if(g.isEnabled()&&!g.isEditing()&&l(g.getSelectionCell())&&1==g.getSelectionCount()){var V=null;0<g.getIncomingTreeEdges(g.getSelectionCell()).length&&(9==L.which?V=mxEvent.isShiftDown(L)?H(g.getSelectionCell()):K(g.getSelectionCell()):13==L.which&&(V=S(g.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=V&&0<V.length)1==
-V.length&&g.model.isEdge(V[0])?g.setSelectionCell(g.model.getTerminal(V[0],!1)):g.setSelectionCell(V[V.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var R=G[L.keyCode];null!=R&&(R.funct(L),mxEvent.consume(L))}else 37==L.keyCode?(e(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(e(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),
-mxEvent.consume(L)):39==L.keyCode?(e(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(e(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(Y){f.handleError(Y)}mxEvent.isConsumed(L)||ia.apply(this,arguments)};var ka=g.connectVertex;g.connectVertex=function(L,V,R,Y,Z,la,q){var F=g.getIncomingTreeEdges(L);if(l(L)){var T=M(L),aa=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,U=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
-return T==V||0==F.length?K(L,V):aa==U?H(L):S(L,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return ka.apply(this,arguments)};g.getSubtree=function(L){var V=[L];!B(L)&&!l(L)||E(L)||g.traverse(L,!0,function(R,Y){var Z=null!=Y&&g.isTreeEdge(Y);Z&&0>mxUtils.indexOf(V,Y)&&V.push(Y);(null==Y||Z)&&0>mxUtils.indexOf(V,R)&&V.push(R);return null==Y||Z});return V};var ja=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ja.apply(this,arguments);(B(this.state.cell)||l(this.state.cell))&&
+V.length&&g.model.isEdge(V[0])?g.setSelectionCell(g.model.getTerminal(V[0],!1)):g.setSelectionCell(V[V.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var R=G[L.keyCode];null!=R&&(R.funct(L),mxEvent.consume(L))}else 37==L.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),
+mxEvent.consume(L)):39==L.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(d(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(Y){f.handleError(Y)}mxEvent.isConsumed(L)||ia.apply(this,arguments)};var ka=g.connectVertex;g.connectVertex=function(L,V,R,Y,Z,la,q){var F=g.getIncomingTreeEdges(L);if(l(L)){var T=M(L),aa=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,U=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
+return T==V||0==F.length?K(L,V):aa==U?H(L):S(L,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return ka.apply(this,arguments)};g.getSubtree=function(L){var V=[L];!C(L)&&!l(L)||E(L)||g.traverse(L,!0,function(R,Y){var Z=null!=Y&&g.isTreeEdge(Y);Z&&0>mxUtils.indexOf(V,Y)&&V.push(Y);(null==Y||Z)&&0>mxUtils.indexOf(V,R)&&V.push(R);return null==Y||Z});return V};var ja=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ja.apply(this,arguments);(C(this.state.cell)||l(this.state.cell))&&
!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(L){this.graph.graphHandler.start(this.state.cell,
mxEvent.getClientX(L),mxEvent.getClientY(L),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(L);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(L)})))};var ca=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ca.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 pa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){pa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(L,V){ra.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
-typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var l=k.apply(this,arguments),B=this.graph;return l.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var l=k.apply(this,arguments),C=this.graph;return l.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
E.vertex=!0;var M=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');M.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);M.insertEdge(S,!1);p.insert(S);p.insert(E);p.insert(M);return sb.createVertexTemplateFromCells([p],p.geometry.width,
p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var M=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};');M.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);M.insertEdge(S,!1);
var H=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');H.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);var Q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');Q.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-e.geometry.relative=!0;e.edge=!0;E.insertEdge(e,!0);Q.insertEdge(e,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var g=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;E.insertEdge(g,!0);f.insertEdge(g,!1);p.insert(S);p.insert(K);p.insert(e);p.insert(g);p.insert(E);p.insert(M);p.insert(H);p.insert(Q);p.insert(f);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);var Q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');Q.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+d.geometry.relative=!0;d.edge=!0;E.insertEdge(d,!0);Q.insertEdge(d,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var g=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;E.insertEdge(g,!0);f.insertEdge(g,!1);p.insert(S);p.insert(K);p.insert(d);p.insert(g);p.insert(E);p.insert(M);p.insert(H);p.insert(Q);p.insert(f);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-p.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var M=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+p.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var M=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
M.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);M.insertEdge(S,!1);var H=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);p.insert(S);p.insert(K);p.insert(E);p.insert(M);p.insert(H);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.setAttributeForCell(p,"treeRoot",
+K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);p.insert(S);p.insert(K);p.insert(E);p.insert(M);p.insert(H);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var M=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");M.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");S.geometry.setTerminalPoint(new mxPoint(110,-40),!0);S.geometry.relative=
!0;S.edge=!0;M.insertEdge(S,!1);return sb.createVertexTemplateFromCells([E,S,p,M],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(g,v){if(EditorUi.windowed){var y=g.editor.graph;y.popupMenuHandler.hideMenu();if(null==g.formatWindow){v="1"==urlParams.sketch?Math.max(10,g.diagramContainer.clientWidth-244):Math.max(10,g.diagramContainer.clientWidth-248);var C="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;y="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,y.container.clientHeight-10);g.formatWindow=new WrapperWindow(g,mxResources.get("format"),v,C,240,y,
+EditorUi.initMinimalTheme=function(){function b(g,v){if(EditorUi.windowed){var x=g.editor.graph;x.popupMenuHandler.hideMenu();if(null==g.formatWindow){v="1"==urlParams.sketch?Math.max(10,g.diagramContainer.clientWidth-244):Math.max(10,g.diagramContainer.clientWidth-248);var B="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;x="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,x.container.clientHeight-10);g.formatWindow=new WrapperWindow(g,mxResources.get("format"),v,B,240,x,
function(I){g.createFormat(I).init()});g.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){g.formatWindow.window.fit()}));g.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else g.formatWindow.window.setVisible(null!=v?v:!g.formatWindow.window.isVisible())}else null==g.formatElt&&(g.formatElt=g.createSidebarContainer(),g.createFormat(g.formatElt).init(),g.formatElt.style.border="none",g.formatElt.style.width="240px",g.formatElt.style.borderLeft="1px solid gray",
-g.formatElt.style.right="0px"),y=g.diagramContainer.parentNode,null!=g.formatElt.parentNode?(g.formatElt.parentNode.removeChild(g.formatElt),y.style.right="0px"):(y.parentNode.appendChild(g.formatElt),y.style.right=g.formatElt.style.width)}function d(g,v){function y(N,G){var ia=g.menus.get(N);N=D.addMenu(G,mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}));N.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;";
-N.className="geTitle";v.appendChild(N);return N}var C=document.createElement("div");C.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;";C.className="geTitle";var I=document.createElement("span");I.style.fontSize="18px";I.style.marginRight="5px";I.innerHTML="+";C.appendChild(I);mxUtils.write(C,mxResources.get("moreShapes"));v.appendChild(C);mxEvent.addListener(C,"click",function(){g.actions.get("shapes").funct()});
-var D=new Menubar(g,v);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?C.style.bottom="0":null!=g.actions.get("newLibrary")?(C=document.createElement("div"),C.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",C.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("newLibrary")),C.appendChild(I),
-v.appendChild(C),mxEvent.addListener(C,"click",g.actions.get("newLibrary").funct),C=document.createElement("div"),C.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;",C.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("openLibrary")),C.appendChild(I),v.appendChild(C),mxEvent.addListener(C,
-"click",g.actions.get("openLibrary").funct)):(C=y("newLibrary",mxResources.get("newLibrary")),C.style.boxSizing="border-box",C.style.paddingRight="6px",C.style.paddingLeft="6px",C.style.height="32px",C.style.left="0",C=y("openLibraryFrom",mxResources.get("openLibraryFrom")),C.style.borderLeft="1px solid lightgray",C.style.boxSizing="border-box",C.style.paddingRight="6px",C.style.paddingLeft="6px",C.style.height="32px",C.style.left="50%");v.appendChild(g.sidebar.container);v.style.overflow="hidden"}
-function k(g,v){if(EditorUi.windowed){var y=g.editor.graph;y.popupMenuHandler.hideMenu();if(null==g.sidebarWindow){v=Math.min(y.container.clientWidth-10,218);var C="1"==urlParams.embedInline?650:Math.min(y.container.clientHeight-40,650);g.sidebarWindow=new WrapperWindow(g,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(y.container.clientHeight-C)/2):56,v-6,C-6,function(I){d(g,I)});g.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){g.sidebarWindow.window.fit()}));g.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);g.sidebarWindow.window.setVisible(!0);isLocalStorage&&g.getLocalData("sidebar",function(I){g.sidebar.showEntries(I,null,!0)});g.restoreLibraries()}else g.sidebarWindow.window.setVisible(null!=v?v:!g.sidebarWindow.window.isVisible())}else null==g.sidebarElt&&(g.sidebarElt=g.createSidebarContainer(),d(g,g.sidebarElt),g.sidebarElt.style.border="none",g.sidebarElt.style.width="210px",
-g.sidebarElt.style.borderRight="1px solid gray"),y=g.diagramContainer.parentNode,null!=g.sidebarElt.parentNode?(g.sidebarElt.parentNode.removeChild(g.sidebarElt),y.style.left="0px"):(y.parentNode.appendChild(g.sidebarElt),y.style.left=g.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var l=0;try{l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(g){}Menus.prototype.autoPopup=
+g.formatElt.style.right="0px"),x=g.diagramContainer.parentNode,null!=g.formatElt.parentNode?(g.formatElt.parentNode.removeChild(g.formatElt),x.style.right="0px"):(x.parentNode.appendChild(g.formatElt),x.style.right=g.formatElt.style.width)}function e(g,v){function x(N,G){var ia=g.menus.get(N);N=D.addMenu(G,mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}));N.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;";
+N.className="geTitle";v.appendChild(N);return N}var B=document.createElement("div");B.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;";B.className="geTitle";var I=document.createElement("span");I.style.fontSize="18px";I.style.marginRight="5px";I.innerHTML="+";B.appendChild(I);mxUtils.write(B,mxResources.get("moreShapes"));v.appendChild(B);mxEvent.addListener(B,"click",function(){g.actions.get("shapes").funct()});
+var D=new Menubar(g,v);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?B.style.bottom="0":null!=g.actions.get("newLibrary")?(B=document.createElement("div"),B.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",B.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("newLibrary")),B.appendChild(I),
+v.appendChild(B),mxEvent.addListener(B,"click",g.actions.get("newLibrary").funct),B=document.createElement("div"),B.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;",B.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("openLibrary")),B.appendChild(I),v.appendChild(B),mxEvent.addListener(B,
+"click",g.actions.get("openLibrary").funct)):(B=x("newLibrary",mxResources.get("newLibrary")),B.style.boxSizing="border-box",B.style.paddingRight="6px",B.style.paddingLeft="6px",B.style.height="32px",B.style.left="0",B=x("openLibraryFrom",mxResources.get("openLibraryFrom")),B.style.borderLeft="1px solid lightgray",B.style.boxSizing="border-box",B.style.paddingRight="6px",B.style.paddingLeft="6px",B.style.height="32px",B.style.left="50%");v.appendChild(g.sidebar.container);v.style.overflow="hidden"}
+function k(g,v){if(EditorUi.windowed){var x=g.editor.graph;x.popupMenuHandler.hideMenu();if(null==g.sidebarWindow){v=Math.min(x.container.clientWidth-10,218);var B="1"==urlParams.embedInline?650:Math.min(x.container.clientHeight-40,650);g.sidebarWindow=new WrapperWindow(g,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(x.container.clientHeight-B)/2):56,v-6,B-6,function(I){e(g,I)});g.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){g.sidebarWindow.window.fit()}));g.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);g.sidebarWindow.window.setVisible(!0);isLocalStorage&&g.getLocalData("sidebar",function(I){g.sidebar.showEntries(I,null,!0)});g.restoreLibraries()}else g.sidebarWindow.window.setVisible(null!=v?v:!g.sidebarWindow.window.isVisible())}else null==g.sidebarElt&&(g.sidebarElt=g.createSidebarContainer(),e(g,g.sidebarElt),g.sidebarElt.style.border="none",g.sidebarElt.style.width="210px",
+g.sidebarElt.style.borderRight="1px solid gray"),x=g.diagramContainer.parentNode,null!=g.sidebarElt.parentNode?(g.sidebarElt.parentNode.removeChild(g.sidebarElt),x.style.left="0px"):(x.parentNode.appendChild(g.sidebarElt),x.style.left=g.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var l=0;try{l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(g){}Menus.prototype.autoPopup=
!1;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;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
-Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var B=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");B.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(g,v){null!=v.shortcut&&900>l&&!mxClient.IS_IOS?g.firstChild.nextSibling.setAttribute("title",v.shortcut):E.apply(this,arguments)};var M=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(g,v,y){var C=this.editorUi.editor.graph;g.smartSeparators=!0;M.apply(this,arguments);"1"==urlParams.sketch?C.isEnabled()&&(g.addSeparator(),1==C.getSelectionCount()&&this.addMenuItems(g,
-["-","lockUnlock"],null,y)):1==C.getSelectionCount()?(C.isCellFoldable(C.getSelectionCell())&&this.addMenuItems(g,C.isCellCollapsed(v)?["expand"]:["collapse"],null,y),this.addMenuItems(g,["collapsible","-","lockUnlock","enterGroup"],null,y),g.addSeparator(),this.addSubmenu("layout",g)):C.isSelectionEmpty()&&C.isEnabled()?(g.addSeparator(),this.addMenuItems(g,["editData"],null,y),g.addSeparator(),this.addSubmenu("layout",g),this.addSubmenu("insert",g),this.addMenuItems(g,["-","exitGroup"],null,y)):
-C.isEnabled()&&this.addMenuItems(g,["-","lockUnlock"],null,y)};var S=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(g,v,y){S.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(g,["copyAsImage"],null,y)};EditorUi.prototype.toggleFormatPanel=function(g){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=g?g:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=
+Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var C=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");C.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
+this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(g,v){null!=v.shortcut&&900>l&&!mxClient.IS_IOS?g.firstChild.nextSibling.setAttribute("title",v.shortcut):E.apply(this,arguments)};var M=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(g,v,x){var B=this.editorUi.editor.graph;g.smartSeparators=!0;M.apply(this,arguments);"1"==urlParams.sketch?B.isEnabled()&&(g.addSeparator(),1==B.getSelectionCount()&&this.addMenuItems(g,
+["-","lockUnlock"],null,x)):1==B.getSelectionCount()?(B.isCellFoldable(B.getSelectionCell())&&this.addMenuItems(g,B.isCellCollapsed(v)?["expand"]:["collapse"],null,x),this.addMenuItems(g,["collapsible","-","lockUnlock","enterGroup"],null,x),g.addSeparator(),this.addSubmenu("layout",g)):B.isSelectionEmpty()&&B.isEnabled()?(g.addSeparator(),this.addMenuItems(g,["editData"],null,x),g.addSeparator(),this.addSubmenu("layout",g),this.addSubmenu("insert",g),this.addMenuItems(g,["-","exitGroup"],null,x)):
+B.isEnabled()&&this.addMenuItems(g,["-","lockUnlock"],null,x)};var S=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(g,v,x){S.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(g,["copyAsImage"],null,x)};EditorUi.prototype.toggleFormatPanel=function(g){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=g?g:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=
this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var H=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();H.apply(this,arguments)};var K=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(g){K.apply(this,arguments);if(g){var v=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=v&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&
this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=v||"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 Q=Menus.prototype.init;Menus.prototype.init=function(){Q.apply(this,arguments);var g=this.editorUi,v=g.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),
function(D){g.setPagesVisible(!Editor.pagesVisible)}));v.setToggleAction(!0);v.setSelectedCallback(function(){return Editor.pagesVisible});g.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(g)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!g.isOffline()&&g.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var D=new ParseDialog(g,mxResources.get("plantUml")+"...","plantUml");g.showDialog(D.container,620,420,!0,!1);D.init()}));
-g.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var D=new ParseDialog(g,mxResources.get("mermaid")+"...","mermaid");g.showDialog(D.container,620,420,!0,!1);D.init()}));var y=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(D,N){var G=this.editorUi.editor.graph,ia=G.getSelectionCell();y.call(this,D,ia,null,N);this.addMenuItems(D,["editTooltip"],N);G.model.isVertex(ia)&&this.addMenuItems(D,["editGeometry"],N);this.addMenuItems(D,["-",
-"edit"],N)})));this.addPopupMenuCellEditItems=function(D,N,G,ia){D.addSeparator();this.addSubmenu("editCell",D,ia,mxResources.get("edit"))};var C="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),I=function(D,N,G,ia){D.addItem(G,null,mxUtils.bind(this,function(){var ka=new CreateGraphDialog(g,G,ia);g.showDialog(ka.container,620,420,!0,!1);ka.init()}),N)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(D,N){for(var G=0;G<C.length;G++)"-"==
-C[G]?D.addSeparator(N):I(D,N,mxResources.get(C[G])+"...",C[G])})))};EditorUi.prototype.installFormatToolbar=function(g){var v=this.editor.graph,y=document.createElement("div");y.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%;";v.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,I){0<v.getSelectionCount()?(g.appendChild(y),y.innerHTML=
-"Selected: "+v.getSelectionCount()):null!=y.parentNode&&y.parentNode.removeChild(y)}))};var e=!1;EditorUi.prototype.initFormatWindow=function(){if(!e&&null!=this.formatWindow){e=!0;var g=this.formatWindow.window.toggleMinimized,v=240;this.formatWindow.window.toggleMinimized=function(){g.apply(this,arguments);this.minimized?(v=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+v-140+"px"):(this.div.style.width=
-v+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-v+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(y){mxEvent.getSource(y)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){function g(W,ea,ta){var qa=D.menus.get(W),va=ka.addMenu(mxResources.get(W),mxUtils.bind(this,function(){qa.funct.apply(this,
+g.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var D=new ParseDialog(g,mxResources.get("mermaid")+"...","mermaid");g.showDialog(D.container,620,420,!0,!1);D.init()}));var x=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(D,N){var G=this.editorUi.editor.graph,ia=G.getSelectionCell();x.call(this,D,ia,null,N);this.addMenuItems(D,["editTooltip"],N);G.model.isVertex(ia)&&this.addMenuItems(D,["editGeometry"],N);this.addMenuItems(D,["-",
+"edit"],N)})));this.addPopupMenuCellEditItems=function(D,N,G,ia){D.addSeparator();this.addSubmenu("editCell",D,ia,mxResources.get("edit"))};var B="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),I=function(D,N,G,ia){D.addItem(G,null,mxUtils.bind(this,function(){var ka=new CreateGraphDialog(g,G,ia);g.showDialog(ka.container,620,420,!0,!1);ka.init()}),N)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(D,N){for(var G=0;G<B.length;G++)"-"==
+B[G]?D.addSeparator(N):I(D,N,mxResources.get(B[G])+"...",B[G])})))};EditorUi.prototype.installFormatToolbar=function(g){var v=this.editor.graph,x=document.createElement("div");x.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%;";v.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(B,I){0<v.getSelectionCount()?(g.appendChild(x),x.innerHTML=
+"Selected: "+v.getSelectionCount()):null!=x.parentNode&&x.parentNode.removeChild(x)}))};var d=!1;EditorUi.prototype.initFormatWindow=function(){if(!d&&null!=this.formatWindow){d=!0;var g=this.formatWindow.window.toggleMinimized,v=240;this.formatWindow.window.toggleMinimized=function(){g.apply(this,arguments);this.minimized?(v=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+v-140+"px"):(this.div.style.width=
+v+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-v+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(x){mxEvent.getSource(x)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){function g(W,ea,ta){var qa=D.menus.get(W),va=ka.addMenu(mxResources.get(W),mxUtils.bind(this,function(){qa.funct.apply(this,
arguments)}),ia);va.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";va.style.display="inline-block";va.style.boxSizing="border-box";va.style.top="6px";va.style.marginRight="6px";va.style.height="30px";va.style.paddingTop="6px";va.style.paddingBottom="6px";va.style.cursor="pointer";va.setAttribute("title",mxResources.get(W));D.menus.menuCreated(qa,va,"geMenuItem");null!=ta?(va.style.backgroundImage="url("+ta+")",va.style.backgroundPosition="center center",va.style.backgroundRepeat="no-repeat",
va.style.backgroundSize="24px 24px",va.style.width="34px",va.innerText=""):ea||(va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",va.style.backgroundPosition="right 6px center",va.style.backgroundRepeat="no-repeat",va.style.paddingRight="22px");return va}function v(W,ea,ta,qa,va,Ea){var Ca=document.createElement("a");Ca.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ca.style.display="inline-block";Ca.style.boxSizing="border-box";Ca.style.height="30px";Ca.style.padding=
"6px";Ca.style.position="relative";Ca.style.verticalAlign="top";Ca.style.top="0px";"1"==urlParams.sketch&&(Ca.style.borderStyle="none",Ca.style.boxShadow="none",Ca.style.padding="6px",Ca.style.margin="0px");null!=D.statusContainer?G.insertBefore(Ca,D.statusContainer):G.appendChild(Ca);null!=Ea?(Ca.style.backgroundImage="url("+Ea+")",Ca.style.backgroundPosition="center center",Ca.style.backgroundRepeat="no-repeat",Ca.style.backgroundSize="24px 24px",Ca.style.width="34px"):mxUtils.write(Ca,W);mxEvent.addListener(Ca,
mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ma){Ma.preventDefault()}));mxEvent.addListener(Ca,"click",function(Ma){"disabled"!=Ca.getAttribute("disabled")&&ea(Ma);mxEvent.consume(Ma)});null==ta&&(Ca.style.marginRight="4px");null!=qa&&Ca.setAttribute("title",qa);null!=va&&(W=function(){va.isEnabled()?(Ca.removeAttribute("disabled"),Ca.style.cursor="pointer"):(Ca.setAttribute("disabled","disabled"),Ca.style.cursor="default")},va.addListener("stateChanged",W),N.addListener("enabledChanged",
-W),W());return Ca}function y(W,ea,ta){ta=document.createElement("div");ta.className="geMenuItem";ta.style.display="inline-block";ta.style.verticalAlign="top";ta.style.marginRight="6px";ta.style.padding="0 4px 0 4px";ta.style.height="30px";ta.style.position="relative";ta.style.top="0px";"1"==urlParams.sketch&&(ta.style.boxShadow="none");for(var qa=0;qa<W.length;qa++)null!=W[qa]&&("1"==urlParams.sketch&&(W[qa].style.padding="10px 8px",W[qa].style.width="30px"),W[qa].style.margin="0px",W[qa].style.boxShadow=
-"none",ta.appendChild(W[qa]));null!=ea&&mxUtils.setOpacity(ta,ea);null!=D.statusContainer&&"1"!=urlParams.sketch?G.insertBefore(ta,D.statusContainer):G.appendChild(ta);return ta}function C(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Y.style.left=58>R.offsetTop-R.offsetHeight/2?"70px":"10px");else{for(var W=G.firstChild;null!=W;){var ea=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=ea}ia=G.firstChild;l=window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth;W=1E3>l||"1"==urlParams.sketch;var ta=null;W||(ta=g("diagram"));ea=W?g("diagram",null,Editor.menuImage):null;null!=ea&&(ta=ea);y([ta,v(mxResources.get("shapes"),D.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),D.actions.get("image"),W?Editor.shapesImage:null),v(mxResources.get("format"),D.actions.get("format").funct,null,mxResources.get("format")+" ("+D.actions.get("format").shortcut+")",D.actions.get("image"),W?Editor.formatImage:null)],W?60:null);ea=g("insert",
-!0,W?L:null);y([ea,v(mxResources.get("delete"),D.actions.get("delete").funct,null,mxResources.get("delete"),D.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);411<=l&&(y([oa,Aa],60),520<=l&&y([ab,640<=l?v("",na.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",na,Editor.zoomInImage):null,640<=l?v("",sa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",sa,Editor.zoomOutImage):null],60))}null!=ta&&(mxEvent.disableContextMenu(ta),mxEvent.addGestureListeners(ta,mxUtils.bind(this,
-function(qa){(mxEvent.isShiftDown(qa)||mxEvent.isAltDown(qa)||mxEvent.isMetaDown(qa)||mxEvent.isControlDown(qa)||mxEvent.isPopupTrigger(qa))&&D.appIconClicked(qa)}),null,null));ea=D.menus.get("language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=l&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==x&&(ea=ka.addMenu("",ea.funct),ea.setAttribute("title","language"),ea.className="geToolbarButton",ea.style.backgroundImage="url("+Editor.globeImage+")",ea.style.backgroundPosition=
-"center center",ea.style.backgroundRepeat="no-repeat",ea.style.backgroundSize="22px 22px",ea.style.position="absolute",ea.style.height="24px",ea.style.width="24px",ea.style.zIndex="1",ea.style.right="8px",ea.style.cursor="pointer",ea.style.top="12px",G.appendChild(ea),x=ea),D.buttonContainer.style.paddingRight="34px"):(D.buttonContainer.style.paddingRight="0px",null!=x&&(x.parentNode.removeChild(x),x=null))}f.apply(this,arguments);var I=document.createElement("div");I.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+W),W());return Ca}function x(W,ea,ta){ta=document.createElement("div");ta.className="geMenuItem";ta.style.display="inline-block";ta.style.verticalAlign="top";ta.style.marginRight="6px";ta.style.padding="0 4px 0 4px";ta.style.height="30px";ta.style.position="relative";ta.style.top="0px";"1"==urlParams.sketch&&(ta.style.boxShadow="none");for(var qa=0;qa<W.length;qa++)null!=W[qa]&&("1"==urlParams.sketch&&(W[qa].style.padding="10px 8px",W[qa].style.width="30px"),W[qa].style.margin="0px",W[qa].style.boxShadow=
+"none",ta.appendChild(W[qa]));null!=ea&&mxUtils.setOpacity(ta,ea);null!=D.statusContainer&&"1"!=urlParams.sketch?G.insertBefore(ta,D.statusContainer):G.appendChild(ta);return ta}function B(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Y.style.left=58>R.offsetTop-R.offsetHeight/2?"70px":"10px");else{for(var W=G.firstChild;null!=W;){var ea=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=ea}ia=G.firstChild;l=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;W=1E3>l||"1"==urlParams.sketch;var ta=null;W||(ta=g("diagram"));ea=W?g("diagram",null,Editor.menuImage):null;null!=ea&&(ta=ea);x([ta,v(mxResources.get("shapes"),D.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),D.actions.get("image"),W?Editor.shapesImage:null),v(mxResources.get("format"),D.actions.get("format").funct,null,mxResources.get("format")+" ("+D.actions.get("format").shortcut+")",D.actions.get("image"),W?Editor.formatImage:null)],W?60:null);ea=g("insert",
+!0,W?L:null);x([ea,v(mxResources.get("delete"),D.actions.get("delete").funct,null,mxResources.get("delete"),D.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);411<=l&&(x([oa,Aa],60),520<=l&&x([ab,640<=l?v("",na.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",na,Editor.zoomInImage):null,640<=l?v("",sa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",sa,Editor.zoomOutImage):null],60))}null!=ta&&(mxEvent.disableContextMenu(ta),mxEvent.addGestureListeners(ta,mxUtils.bind(this,
+function(qa){(mxEvent.isShiftDown(qa)||mxEvent.isAltDown(qa)||mxEvent.isMetaDown(qa)||mxEvent.isControlDown(qa)||mxEvent.isPopupTrigger(qa))&&D.appIconClicked(qa)}),null,null));ea=D.menus.get("language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=l&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==y&&(ea=ka.addMenu("",ea.funct),ea.setAttribute("title","language"),ea.className="geToolbarButton",ea.style.backgroundImage="url("+Editor.globeImage+")",ea.style.backgroundPosition=
+"center center",ea.style.backgroundRepeat="no-repeat",ea.style.backgroundSize="22px 22px",ea.style.position="absolute",ea.style.height="24px",ea.style.width="24px",ea.style.zIndex="1",ea.style.right="8px",ea.style.cursor="pointer",ea.style.top="12px",G.appendChild(ea),y=ea),D.buttonContainer.style.paddingRight="34px"):(D.buttonContainer.style.paddingRight="0px",null!=y&&(y.parentNode.removeChild(y),y=null))}f.apply(this,arguments);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<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,
!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var D=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==D.embedViewport)mxUtils.fit(this.div);else{var W=parseInt(this.div.offsetLeft),ea=parseInt(this.div.offsetWidth),ta=D.embedViewport.x+D.embedViewport.width,qa=parseInt(this.div.offsetTop),va=parseInt(this.div.offsetHeight),Ea=D.embedViewport.y+
D.embedViewport.height;this.div.style.left=Math.max(D.embedViewport.x,Math.min(W,ta-ea))+"px";this.div.style.top=Math.max(D.embedViewport.y,Math.min(qa,Ea-va))+"px";this.div.style.height=Math.min(D.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(D.embedViewport.width,parseInt(this.div.style.width))+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),I=window.innerHeight||
@@ -4075,89 +4082,89 @@ mxClient.IS_POINTER&&(R.style.touchAction="none");pa.appendChild(R);window.setTi
ra.funct);wa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");wa.style.whiteSpace="nowrap";wa.style.paddingRight="10px";wa.style.textDecoration="none";wa.style.textDecoration="none";wa.style.overflow="hidden";wa.style.visibility="hidden";wa.style.textAlign="center";wa.style.cursor="pointer";wa.style.height=parseInt(D.tabContainerHeight)-1+"px";wa.style.lineHeight=parseInt(D.tabContainerHeight)+1+"px";wa.style.position="absolute";wa.style.display="block";wa.style.fontSize="12px";wa.style.width=
"59px";wa.style.right="0px";wa.style.bottom="0px";wa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";wa.style.backgroundPosition="right 6px center";wa.style.backgroundRepeat="no-repeat";pa.appendChild(wa)}(function(W){mxEvent.addListener(W,"click",fa);var ea=mxUtils.bind(this,function(){W.innerText="";mxUtils.write(W,Math.round(100*D.editor.graph.view.scale)+"%")});D.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);D.editor.addListener("resetGraphView",ea);D.editor.addListener("pageSelected",
ea)})(wa);var Ya=D.setGraphEnabled;D.setGraphEnabled=function(){Ya.apply(this,arguments);null!=this.tabContainer&&(wa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==V?this.tabContainerHeight+"px":"0px")}}pa.appendChild(G);pa.appendChild(D.diagramContainer);I.appendChild(pa);D.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&b(this,!0);null==V&&pa.appendChild(D.tabContainer);
-var x=null;C();mxEvent.addListener(window,"resize",function(){C();null!=D.sidebarWindow&&D.sidebarWindow.window.fit();null!=D.formatWindow&&D.formatWindow.window.fit();null!=D.actions.outlineWindow&&D.actions.outlineWindow.window.fit();null!=D.actions.layersWindow&&D.actions.layersWindow.window.fit();null!=D.menus.tagsWindow&&D.menus.tagsWindow.window.fit();null!=D.menus.findWindow&&D.menus.findWindow.window.fit();null!=D.menus.findReplaceWindow&&D.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor=
+var y=null;B();mxEvent.addListener(window,"resize",function(){B();null!=D.sidebarWindow&&D.sidebarWindow.window.fit();null!=D.formatWindow&&D.formatWindow.window.fit();null!=D.actions.outlineWindow&&D.actions.outlineWindow.window.fit();null!=D.actions.layersWindow&&D.actions.layersWindow.window.fit();null!=D.menus.tagsWindow&&D.menus.tagsWindow.window.fit();null!=D.menus.findWindow&&D.menus.findWindow.window.fit();null!=D.menus.findReplaceWindow&&D.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor=
"text";R.style.transform="";mxEvent.addGestureListeners(D.diagramContainer.parentNode,function(W){mxEvent.getSource(W)==D.diagramContainer.parentNode&&(D.embedExitPoint=new mxPoint(mxEvent.getClientX(W),mxEvent.getClientY(W)),D.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";D.diagramContainer.parentNode.appendChild(I);
D.bottomResizer=I;var O=null,P=null,X=null,ba=null;mxEvent.addGestureListeners(I,function(W){ba=parseInt(D.diagramContainer.style.height);P=mxEvent.getClientY(W);N.popupMenuHandler.hideMenu();mxEvent.consume(W)});I=I.cloneNode(!1);I.style.cursor="col-resize";D.diagramContainer.parentNode.appendChild(I);D.rightResizer=I;mxEvent.addGestureListeners(I,function(W){X=parseInt(D.diagramContainer.style.width);O=mxEvent.getClientX(W);N.popupMenuHandler.hideMenu();mxEvent.consume(W)});mxEvent.addGestureListeners(document.body,
null,function(W){var ea=!1;null!=O&&(D.diagramContainer.style.width=Math.max(20,X+mxEvent.getClientX(W)-O)+"px",ea=!0);null!=P&&(D.diagramContainer.style.height=Math.max(20,ba+mxEvent.getClientY(W)-P)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:D.diagramContainer.getBoundingClientRect()}),"*"),Z(),D.refresh())},function(W){null==O&&null==P||mxEvent.consume(W);P=O=null});this.diagramContainer.style.borderRadius=
-"4px";document.body.style.backgroundColor="transparent";D.bottomResizer.style.visibility="hidden";D.rightResizer.style.visibility="hidden";Y.style.visibility="hidden";V.style.visibility="hidden";R.style.display="none"}"1"==urlParams.prefetchFonts&&D.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,d,k,l,B,p,E){this.file=b;this.id=d;this.content=k;this.modifiedDate=l;this.createdDate=B;this.isResolved=p;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,d,k,l,B){d()};DrawioComment.prototype.editComment=function(b,d,k){d()};DrawioComment.prototype.deleteComment=function(b,d){b()};DrawioUser=function(b,d,k,l,B){this.id=b;this.email=d;this.displayName=k;this.pictureUrl=l;this.locale=B};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,d,k){this.init(b,d,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
+"4px";document.body.style.backgroundColor="transparent";D.bottomResizer.style.visibility="hidden";D.rightResizer.style.visibility="hidden";Y.style.visibility="hidden";V.style.visibility="hidden";R.style.display="none"}"1"==urlParams.prefetchFonts&&D.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,l,C,p,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=l;this.createdDate=C;this.isResolved=p;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,l,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,l,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=l;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
-GraphViewer.prototype.init=function(b,d,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
+GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?
-this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=d&&(this.xmlDocument=d.ownerDocument,this.xmlNode=d,this.xml=mxUtils.getXml(d),null!=b)){var l=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
-!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var v=this.view.graphBounds,y=this.view.translate;E.setAttribute("viewBox",v.x+y.x-this.panDx+" "+(v.y+y.y-this.panDy)+
+this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var l=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
+!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var v=this.view.graphBounds,x=this.view.translate;E.setAttribute("viewBox",v.x+x.x-this.panDx+" "+(v.y+x.y-this.panDy)+
" "+(v.width+1)+" "+(v.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",v))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(v){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
-this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=d&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var M=this;this.graph.getImageFromBundles=function(v){return M.getImageUrl(v)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var S=this.xmlNode.getElementsByTagName("diagram");if(0<
-S.length){if(null!=this.pageId)for(var H=0;H<S.length;H++)if(this.pageId==S[H].getAttribute("id")){this.currentPage=H;break}var K=this.graph.getGlobalVariable;M=this;this.graph.getGlobalVariable=function(v){var y=S[M.currentPage];return"page"==v?y.getAttribute("name")||"Page-"+(M.currentPage+1):"pagenumber"==v?M.currentPage+1:"pagecount"==v?S.length:K.apply(this,arguments)}}}this.diagrams=[];var Q=null;this.selectPage=function(v){this.handlingResize||(this.currentPage=mxUtils.mod(v,this.diagrams.length),
-this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(v){v=this.getIndexById(v);var y=0<=v;y&&this.selectPage(v);return y};H=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=Q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),Q=this.xmlNode)});var e=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(v){if(null!=v&&Graph.isPageLink(v.src)){var y=v.src,
-C=y.indexOf(",");0<C&&(C=M.getIndexById(y.substring(C+1)),0<=C&&(v=M.getImageForGraphModel(Editor.parseDiagramNode(M.diagrams[C])),v.originalSrc=y))}e.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(v){var y=f.apply(this,arguments);v=this.backgroundImage;if(null!=v){var C=this.view.translate,I=this.view.scale;y=mxRectangle.fromRectangle(y);y.add(new mxRectangle((C.x+v.x)*I,(C.y+v.y)*I,v.width*I,v.height*I))}return y};this.addListener("xmlNodeChanged",H);H();
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var M=this;this.graph.getImageFromBundles=function(v){return M.getImageUrl(v)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var S=this.xmlNode.getElementsByTagName("diagram");if(0<
+S.length){if(null!=this.pageId)for(var H=0;H<S.length;H++)if(this.pageId==S[H].getAttribute("id")){this.currentPage=H;break}var K=this.graph.getGlobalVariable;M=this;this.graph.getGlobalVariable=function(v){var x=S[M.currentPage];return"page"==v?x.getAttribute("name")||"Page-"+(M.currentPage+1):"pagenumber"==v?M.currentPage+1:"pagecount"==v?S.length:K.apply(this,arguments)}}}this.diagrams=[];var Q=null;this.selectPage=function(v){this.handlingResize||(this.currentPage=mxUtils.mod(v,this.diagrams.length),
+this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(v){v=this.getIndexById(v);var x=0<=v;x&&this.selectPage(v);return x};H=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=Q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),Q=this.xmlNode)});var d=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(v){if(null!=v&&Graph.isPageLink(v.src)){var x=v.src,
+B=x.indexOf(",");0<B&&(B=M.getIndexById(x.substring(B+1)),0<=B&&(v=M.getImageForGraphModel(Editor.parseDiagramNode(M.diagrams[B])),v.originalSrc=x))}d.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(v){var x=f.apply(this,arguments);v=this.backgroundImage;if(null!=v){var B=this.view.translate,I=this.view.scale;x=mxRectangle.fromRectangle(x);x.add(new mxRectangle((B.x+v.x)*I,(B.y+v.y)*I,v.width*I,v.height*I))}return x};this.addListener("xmlNodeChanged",H);H();
urlParams.page=M.currentPage;H=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,H=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(v){return!mxEvent.isPopupTrigger(v.getEvent())&&"auto"==this.graph.container.style.overflow},
this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);
-this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=H&&this.setLayersVisible(H);this.graph.customLinkClicked=function(v){if(Graph.isPageLink(v)){var y=v.indexOf(",");M.selectPageById(v.substring(y+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(v);return!0};var g=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
-!0;return g.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var B=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),l())}));p.observe(B,{attributes:!0})}else l()}};
+this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=H&&this.setLayersVisible(H);this.graph.customLinkClicked=function(v){if(Graph.isPageLink(v)){var x=v.indexOf(",");M.selectPageById(v.substring(x+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(v);return!0};var g=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
+!0;return g.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),l())}));p.observe(C,{attributes:!0})}else l()}};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
-GraphViewer.prototype.getImageForGraphModel=function(b){var d=Graph.createOffscreenGraph(this.graph.getStylesheet());d.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(d.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;d.model.setRoot(b);b=d.getSvg();var k=d.getGraphBounds();document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
-GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var d=0;d<this.diagrams.length;d++)if(this.diagrams[d].getAttribute("id")==b)return d;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
+GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
+GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var d=!0;if(!this.autoOrigin){var k=[],l=this.graph.getModel();l.beginUpdate();try{for(var B=0;B<l.getChildCount(l.root);B++){var p=l.getChildAt(l.root,B);d=d&&l.isVisible(p);k.push(l.isVisible(p));l.setVisible(p,null!=b?b[B]:!0)}}finally{l.endUpdate()}}return d?null:k};
-GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var d=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),d=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
-{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d&&this.setLayersVisible(d)}};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,d=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var l=mxUtils.bind(this,function(){if(!k){k=!0;var M=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?M.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){M=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
+GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],l=this.graph.getModel();l.beginUpdate();try{for(var C=0;C<l.getChildCount(l.root);C++){var p=l.getChildAt(l.root,C);e=e&&l.isVisible(p);k.push(l.isVisible(p));l.setVisible(p,null!=b?b[C]:!0)}}finally{l.endUpdate()}}return e?null:k};
+GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
+{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var l=mxUtils.bind(this,function(){if(!k){k=!0;var M=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?M.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){M=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};M={left:M.left-S.left,top:M.top-S.top,bottom:M.bottom-S.top,right:M.right-S.left};this.toolbar.style.left=M.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=M.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=M.top+1+"px"):this.toolbar.style.top=M.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),B=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(M){var S=b.offsetWidth;S==B||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=M?M:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},B=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
-!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",l),this.graph.addListener("size",l)):new ResizeSensor(this.graph.container,l));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,d.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,d.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=B=null;l=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",l):new ResizeSensor(this.graph.container,l))}else 9>=document.documentMode||this.graph.addListener("size",
-l);var E=mxUtils.bind(this,function(M){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var H=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==M&&this.allowZoomOut&&(this.allowZoomIn||d.width+2*this.graph.border>b.offsetWidth||d.height+2*this.graph.border>H)?(M=null,null!=H&&d.height+2*this.graph.border>H-2&&(M=(H-2*this.graph.border-2)/d.height),this.fitGraph(M)):this.widthIsEmpty||
-null!=M||0!=this.graphConfig.resize||""==b.style.height?(M=null!=M?M:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-d.x/this.graph.view.scale)+M.x,Math.floor(this.graph.border-d.y/this.graph.view.scale)+M.y),B=b.offsetWidth):this.graph.center((!this.widthIsEmpty||d.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(M){d=this.graph.getGraphBounds();B=null;E(M)}};
-GraphViewer.prototype.crop=function(){var b=this.graph,d=b.getGraphBounds(),k=b.border,l=b.view.scale;b.view.setTranslate(null!=d.x?Math.floor(b.view.translate.x-d.x/l+k):k,null!=d.y?Math.floor(b.view.translate.y-d.y/l+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,d){b.style.width=d+"px"};GraphViewer.prototype.updateContainerHeight=function(b,d){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=d+"px"};
-GraphViewer.prototype.showLayers=function(b,d){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var l=this.graphConfig.layerIds,B=null!=l&&0<l.length,p=!1;if(0<k.length||B||null!=d){d=null!=d?d.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==d){d=!1;p={};if(B)for(var M=0;M<l.length;M++){var S=b.getCell(l[M]);null!=S&&(d=!0,p[S.id]=!0)}else for(M=0;M<k.length;M++)S=b.getChildAt(b.root,parseInt(k[M])),null!=S&&(d=!0,p[S.id]=!0);for(M=0;d&&
-M<E;M++)S=b.getChildAt(b.root,M),b.setVisible(S,p[S.id]||!1)}else for(M=0;M<E;M++)b.setVisible(b.getChildAt(b.root,M),d.isVisible(d.getChildAt(d.root,M)))}finally{b.endUpdate()}p=!0}return p};
-GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var d=b.ownerDocument.createElement("div");d.style.position="absolute";d.style.overflow="hidden";d.style.boxSizing="border-box";d.style.whiteSpace="nowrap";d.style.textAlign="left";d.style.zIndex=this.toolbarZIndex;d.style.backgroundColor="#eee";
-d.style.height=this.toolbarHeight+"px";this.toolbar=d;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(d.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(d,30);var k=null,l=null,B=mxUtils.bind(this,function(ja){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);k=null;l=window.setTimeout(mxUtils.bind(this,function(){d.style.display="none";
-l=null}),100)}),ja||200)}),p=mxUtils.bind(this,function(ja){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);d.style.display="";mxUtils.setOpacity(d,ja||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||(p(30),B())}));mxEvent.addListener(d,mxClient.IS_POINTER?"pointermove":"mousemove",function(ja){mxEvent.consume(ja)});mxEvent.addListener(d,"mouseenter",
-mxUtils.bind(this,function(ja){p(100)}));mxEvent.addListener(d,"mousemove",mxUtils.bind(this,function(ja){p(100);mxEvent.consume(ja)}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||p(30)}));var E=this.graph,M=E.getTolerance();E.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ja,ca){this.startX=ca.getGraphX();this.startY=ca.getGraphY();this.scrollLeft=E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(ja,
-ca){},mouseUp:function(ja,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<M&&Math.abs(this.scrollTop-E.container.scrollTop)<M&&Math.abs(this.startX-ca.getGraphX())<M&&Math.abs(this.startY-ca.getGraphY())<M&&(0<parseFloat(d.style.opacity||0)?B():p(30))}})}for(var S=this.toolbarItems,H=0,K=mxUtils.bind(this,function(ja,ca,pa,ra){ja=this.createToolbarButton(ja,ca,pa,ra);d.appendChild(ja);H++;return ja}),Q=null,e=null,f=null,g=null,v=0;v<S.length;v++){var y=S[v];
-if("pages"==y){g=b.ownerDocument.createElement("div");g.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(g,70);var C=K(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");C.style.borderRightStyle="none";C.style.paddingLeft="0px";C.style.paddingRight="0px";d.appendChild(g);var I=K(mxUtils.bind(this,
-function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");I.style.paddingLeft="0px";I.style.paddingRight="0px";y=mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";C.style.display=g.style.display;I.style.display=g.style.display});this.addListener("graphChanged",y);y()}else if("zoom"==y)this.zoomEnabled&&(K(mxUtils.bind(this,function(){this.graph.zoomOut()}),
-Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),K(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),K(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==y){if(this.layersEnabled){var D=this.graph.getModel(),N=K(mxUtils.bind(this,function(ja){if(null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(M){var S=b.offsetWidth;S==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=M?M:this.graphConfig.zoom||
+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",l),this.graph.addListener("size",l)):new ResizeSensor(this.graph.container,l));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=C=null;l=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",l):new ResizeSensor(this.graph.container,l))}else 9>=document.documentMode||this.graph.addListener("size",
+l);var E=mxUtils.bind(this,function(M){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var H=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==M&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>H)?(M=null,null!=H&&e.height+2*this.graph.border>H-2&&(M=(H-2*this.graph.border-2)/e.height),this.fitGraph(M)):this.widthIsEmpty||
+null!=M||0!=this.graphConfig.resize||""==b.style.height?(M=null!=M?M:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+M.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+M.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(M){e=this.graph.getGraphBounds();C=null;E(M)}};
+GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,l=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/l+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/l+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
+GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var l=this.graphConfig.layerIds,C=null!=l&&0<l.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var M=0;M<l.length;M++){var S=b.getCell(l[M]);null!=S&&(e=!0,p[S.id]=!0)}else for(M=0;M<k.length;M++)S=b.getChildAt(b.root,parseInt(k[M])),null!=S&&(e=!0,p[S.id]=!0);for(M=0;e&&
+M<E;M++)S=b.getChildAt(b.root,M),b.setVisible(S,p[S.id]||!1)}else for(M=0;M<E;M++)b.setVisible(b.getChildAt(b.root,M),e.isVisible(e.getChildAt(e.root,M)))}finally{b.endUpdate()}p=!0}return p};
+GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";
+e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,l=null,C=mxUtils.bind(this,function(ja){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;l=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
+l=null}),100)}),ja||200)}),p=mxUtils.bind(this,function(ja){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ja||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ja){mxEvent.consume(ja)});mxEvent.addListener(e,"mouseenter",
+mxUtils.bind(this,function(ja){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ja){p(100);mxEvent.consume(ja)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||p(30)}));var E=this.graph,M=E.getTolerance();E.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ja,ca){this.startX=ca.getGraphX();this.startY=ca.getGraphY();this.scrollLeft=E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(ja,
+ca){},mouseUp:function(ja,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<M&&Math.abs(this.scrollTop-E.container.scrollTop)<M&&Math.abs(this.startX-ca.getGraphX())<M&&Math.abs(this.startY-ca.getGraphY())<M&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var S=this.toolbarItems,H=0,K=mxUtils.bind(this,function(ja,ca,pa,ra){ja=this.createToolbarButton(ja,ca,pa,ra);e.appendChild(ja);H++;return ja}),Q=null,d=null,f=null,g=null,v=0;v<S.length;v++){var x=S[v];
+if("pages"==x){g=b.ownerDocument.createElement("div");g.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(g,70);var B=K(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");B.style.borderRightStyle="none";B.style.paddingLeft="0px";B.style.paddingRight="0px";e.appendChild(g);var I=K(mxUtils.bind(this,
+function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");I.style.paddingLeft="0px";I.style.paddingRight="0px";x=mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";B.style.display=g.style.display;I.style.display=g.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(K(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),K(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),K(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==x){if(this.layersEnabled){var D=this.graph.getModel(),N=K(mxUtils.bind(this,function(ja){if(null!=
Q)Q.parentNode.removeChild(Q),Q=null;else{Q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var pa=this.graph.getGraphBounds(),ra=this.graph.view;0>pa.x||0>pa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ra.translate.clone(),scale:ra.scale}):null!=this.graph.originalViewState&&0<pa.x/ra.scale+this.graph.originalViewState.translate.x-ra.translate.x&&0<pa.y/ra.scale+this.graph.originalViewState.translate.y-
ra.translate.y&&(ra.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ra.translate.clone(),scale:ra.scale})}}));mxEvent.addListener(Q,"mouseleave",function(){Q.parentNode.removeChild(Q);Q=null});ja=N.getBoundingClientRect();Q.style.width="140px";Q.style.padding="2px 0px 2px 0px";Q.style.border="1px solid #d0d0d0";Q.style.backgroundColor="#eee";Q.style.fontFamily=Editor.defaultHtmlFont;
Q.style.fontSize="11px";Q.style.overflowY="auto";Q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";Q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(Q,80);var ca=mxUtils.getDocumentScrollOrigin(document);Q.style.left=ca.x+ja.left-1+"px";Q.style.top=ca.y+ja.bottom-2+"px";document.body.appendChild(Q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){N.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});N.style.display=
-1<D.getChildCount(D.root)?"inline-block":"none"}}else if("tags"==y){if(this.tagsEnabled){var G=K(mxUtils.bind(this,function(ja){null==e&&(e=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),e.div.getElementsByTagName("div")[0].style.position="",e.div.style.maxHeight="160px",e.div.style.maxWidth="120px",e.div.style.padding="2px",e.div.style.overflow="auto",e.div.style.height="auto",e.div.style.position="fixed",e.div.style.fontFamily=Editor.defaultHtmlFont,e.div.style.fontSize="11px",
-e.div.style.backgroundColor="#eee",e.div.style.color="#000",e.div.style.border="1px solid #d0d0d0",e.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(e.div,80));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=e.div;mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});ja=G.getBoundingClientRect();var ca=mxUtils.getDocumentScrollOrigin(document);f.style.left=ca.x+ja.left-1+"px";f.style.top=ca.y+ja.bottom-2+"px";document.body.appendChild(f);e.refresh()}}),Editor.tagsImage,
-mxResources.get("tags")||"Tags");D.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==y?this.lightboxEnabled&&K(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(y=this.graphConfig["toolbar-buttons"][y],null!=y&&(y.elem=K(null==
-y.enabled||y.enabled?y.handler:function(){},y.image,y.title,y.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*H);null!=this.graphConfig.title&&(S=b.ownerDocument.createElement("div"),S.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",S.setAttribute("title",this.graphConfig.title),mxUtils.write(S,this.graphConfig.title),mxUtils.setOpacity(S,70),
-d.appendChild(S),this.filename=S);this.minToolbarWidth=34*H;var ia=b.style.border,ka=mxUtils.bind(this,function(){d.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";d.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ja=b.getBoundingClientRect(),ca=mxUtils.getScrollOrigin(document.body);ca="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ca.x,top:-ca.y};ja={left:ja.left-
-ca.left,top:ja.top-ca.top,bottom:ja.bottom-ca.top,right:ja.right-ca.left};d.style.left=ja.left+"px";"bottom"==this.graphConfig["toolbar-position"]?d.style.top=ja.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(d.style.marginTop=-this.toolbarHeight+"px",d.style.top=ja.top+1+"px"):d.style.top=ja.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(d);var pa=mxUtils.bind(this,function(){null!=d.parentNode&&d.parentNode.removeChild(d);null!=
-Q&&(Q.parentNode.removeChild(Q),Q=null);b.style.border=ia});mxEvent.addListener(document,"mousemove",function(ra){for(ra=mxEvent.getSource(ra);null!=ra;){if(ra==b||ra==d||ra==Q)return;ra=ra.parentNode}pa()});mxEvent.addListener(document.body,"mouseleave",function(ra){pa()})}else d.style.top=-this.toolbarHeight+"px",b.appendChild(d)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ka):ka();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-d.parentNode&&ka()})).observe(b)};
-GraphViewer.prototype.createToolbarButton=function(b,d,k,l){var B=document.createElement("div");B.style.borderRight="1px solid #d0d0d0";B.style.padding="3px 6px 3px 6px";mxEvent.addListener(B,"click",b);null!=k&&B.setAttribute("title",k);B.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="18px";null==l||l?(mxEvent.addListener(B,"mouseenter",function(){B.style.backgroundColor="#ddd"}),mxEvent.addListener(B,"mouseleave",
-function(){B.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),B.style.cursor="pointer"):mxUtils.setOpacity(B,30);B.appendChild(b);return B};GraphViewer.prototype.disableButton=function(b){var d=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=d&&(mxUtils.setOpacity(d.elem,30),mxEvent.removeListener(d.elem,"click",d.handler),mxEvent.addListener(d.elem,"mouseenter",function(){d.elem.style.backgroundColor="#eee"}))};
-GraphViewer.prototype.addClickHandler=function(b,d){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,l){if(null==l)for(var B=mxEvent.getSource(k);B!=b.container&&null!=B&&null==l;)"a"==B.nodeName.toLowerCase()&&(l=B.getAttribute("href")),B=B.parentNode;null!=d?null==l||b.isCustomLink(l)?mxEvent.consume(k):b.isExternalProtocol(l)||b.isBlankLink(l)||window.setTimeout(function(){d.destroy()},0):null!=l&&null==d&&b.isCustomLink(l)&&
-(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(l)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=d||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
-GraphViewer.prototype.showLightbox=function(b,d,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=d?d:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
+1<D.getChildCount(D.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var G=K(mxUtils.bind(this,function(ja){null==d&&(d=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),d.div.getElementsByTagName("div")[0].style.position="",d.div.style.maxHeight="160px",d.div.style.maxWidth="120px",d.div.style.padding="2px",d.div.style.overflow="auto",d.div.style.height="auto",d.div.style.position="fixed",d.div.style.fontFamily=Editor.defaultHtmlFont,d.div.style.fontSize="11px",
+d.div.style.backgroundColor="#eee",d.div.style.color="#000",d.div.style.border="1px solid #d0d0d0",d.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(d.div,80));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=d.div;mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});ja=G.getBoundingClientRect();var ca=mxUtils.getDocumentScrollOrigin(document);f.style.left=ca.x+ja.left-1+"px";f.style.top=ca.y+ja.bottom-2+"px";document.body.appendChild(f);d.refresh()}}),Editor.tagsImage,
+mxResources.get("tags")||"Tags");D.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==x?this.lightboxEnabled&&K(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=x&&(x.elem=K(null==
+x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*H);null!=this.graphConfig.title&&(S=b.ownerDocument.createElement("div"),S.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",S.setAttribute("title",this.graphConfig.title),mxUtils.write(S,this.graphConfig.title),mxUtils.setOpacity(S,70),
+e.appendChild(S),this.filename=S);this.minToolbarWidth=34*H;var ia=b.style.border,ka=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ja=b.getBoundingClientRect(),ca=mxUtils.getScrollOrigin(document.body);ca="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ca.x,top:-ca.y};ja={left:ja.left-
+ca.left,top:ja.top-ca.top,bottom:ja.bottom-ca.top,right:ja.right-ca.left};e.style.left=ja.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ja.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ja.top+1+"px"):e.style.top=ja.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var pa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
+Q&&(Q.parentNode.removeChild(Q),Q=null);b.style.border=ia});mxEvent.addListener(document,"mousemove",function(ra){for(ra=mxEvent.getSource(ra);null!=ra;){if(ra==b||ra==e||ra==Q)return;ra=ra.parentNode}pa()});mxEvent.addListener(document.body,"mouseleave",function(ra){pa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ka):ka();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+e.parentNode&&ka()})).observe(b)};
+GraphViewer.prototype.createToolbarButton=function(b,e,k,l){var C=document.createElement("div");C.style.borderRight="1px solid #d0d0d0";C.style.padding="3px 6px 3px 6px";mxEvent.addListener(C,"click",b);null!=k&&C.setAttribute("title",k);C.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==l||l?(mxEvent.addListener(C,"mouseenter",function(){C.style.backgroundColor="#ddd"}),mxEvent.addListener(C,"mouseleave",
+function(){C.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),C.style.cursor="pointer"):mxUtils.setOpacity(C,30);C.appendChild(b);return C};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
+GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,l){if(null==l)for(var C=mxEvent.getSource(k);C!=b.container&&null!=C&&null==l;)"a"==C.nodeName.toLowerCase()&&(l=C.getAttribute("href")),C=C.parentNode;null!=e?null==l||b.isCustomLink(l)?mxEvent.consume(k):b.isExternalProtocol(l)||b.isBlankLink(l)||window.setTimeout(function(){e.destroy()},0):null!=l&&null==e&&b.isCustomLink(l)&&
+(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(l)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=e||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.showLightbox=function(b,e,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(k.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(l){"ready"==l.data&&l.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):k.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(k.dev=
"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(k)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
-GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("src",Editor.closeBlackImage);d.style.cssText="position:fixed;top:32px;right:32px;";d.style.cursor="pointer";
-mxEvent.addListener(d,"click",function(){l.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
+GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
+mxEvent.addListener(e,"click",function(){l.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var l=new EditorUi(new Editor(!0),document.createElement("div"),!0);l.editor.editBlankUrl=this.editBlankUrl;l.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-l.refresh=function(){};var B=mxUtils.bind(this,function(Q){27==Q.keyCode&&l.destroy()}),p=this.initialOverflow,E=l.destroy;l.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",B);document.body.removeChild(b);document.body.removeChild(d);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var M=l.editor.graph,S=M.container;S.style.overflow="hidden";this.lightboxChrome?(S.style.border="1px solid #c0c0c0",S.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",B)):(b.style.display="none",d.style.display="none");var H=this;M.getImageFromBundles=function(Q){return H.getImageUrl(Q)};var K=l.createTemporaryGraph;l.createTemporaryGraph=function(){var Q=K.apply(this,arguments);Q.getImageFromBundles=function(e){return H.getImageUrl(e)};return Q};this.graphConfig.move&&(M.isMoveCellsEvent=function(Q){return!0});mxUtils.setPrefixedStyle(S.style,"border-radius","4px");S.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(S.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(S.style,"transition","all .25s ease-in-out"));this.addClickHandler(M,l);window.setTimeout(mxUtils.bind(this,function(){S.style.outline="none";S.style.zIndex=this.lightboxZIndex;d.style.zIndex=this.lightboxZIndex;document.body.appendChild(S);document.body.appendChild(d);l.setFileData(this.xml);mxUtils.setPrefixedStyle(S.style,"transform","rotateY(0deg)");l.chromelessToolbar.style.bottom=
+l.refresh=function(){};var C=mxUtils.bind(this,function(Q){27==Q.keyCode&&l.destroy()}),p=this.initialOverflow,E=l.destroy;l.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var M=l.editor.graph,S=M.container;S.style.overflow="hidden";this.lightboxChrome?(S.style.border="1px solid #c0c0c0",S.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",C)):(b.style.display="none",e.style.display="none");var H=this;M.getImageFromBundles=function(Q){return H.getImageUrl(Q)};var K=l.createTemporaryGraph;l.createTemporaryGraph=function(){var Q=K.apply(this,arguments);Q.getImageFromBundles=function(d){return H.getImageUrl(d)};return Q};this.graphConfig.move&&(M.isMoveCellsEvent=function(Q){return!0});mxUtils.setPrefixedStyle(S.style,"border-radius","4px");S.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(S.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(S.style,"transition","all .25s ease-in-out"));this.addClickHandler(M,l);window.setTimeout(mxUtils.bind(this,function(){S.style.outline="none";S.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(S);document.body.appendChild(e);l.setFileData(this.xml);mxUtils.setPrefixedStyle(S.style,"transform","rotateY(0deg)");l.chromelessToolbar.style.bottom=
"60px";l.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(l.chromelessToolbar);l.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});l.lightboxFit();l.chromelessResize();this.showLayers(M,this.graph);mxEvent.addListener(b,"click",function(){l.destroy()})}),0);return l};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
-GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(d){try{d.innerText="",GraphViewer.createViewerForElement(d)}catch(k){d.innerText=k.message,null!=window.console&&console.error(k)}})};
-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var d=document.getElementsByClassName(b);b=[];for(var k=0;k<d.length;k++)b.push(d[k]);return b}var l=document.getElementsByTagName("*");d=[];for(k=0;k<l.length;k++){var B=l[k].className;null!=B&&0<B.length&&(B=B.split(" "),0<=mxUtils.indexOf(B,b)&&d.push(l[k]))}return d};
-GraphViewer.createViewerForElement=function(b,d){var k=b.getAttribute("data-mxgraph");if(null!=k){var l=JSON.parse(k),B=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,l);null!=d&&d(p)};null!=l.url?GraphViewer.getUrl(l.url,function(p){B(p)}):B(l.xml)}};
-GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(d){}};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,d,k){if(null!=GraphViewer.cachedUrls[b])d(GraphViewer.cachedUrls[b]);else{var l=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;l.open("GET",b);l.onload=function(){d(null!=l.getText?l.getText():l.responseText)};l.onerror=k;l.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},d=function(k,l){function B(){this.q=[];this.add=function(f){this.q.push(f)};var Q,e;this.call=function(){Q=0;for(e=this.q.length;Q<e;Q++)this.q[Q].call()}}function p(Q,e){return Q.currentStyle?Q.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(Q,null).getPropertyValue(e):Q.style[e]}function E(Q,e){if(!Q.resizedAttached)Q.resizedAttached=
-new B,Q.resizedAttached.add(e);else if(Q.resizedAttached){Q.resizedAttached.add(e);return}Q.resizeSensor=document.createElement("div");Q.resizeSensor.className="resize-sensor";Q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";Q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-Q.appendChild(Q.resizeSensor);"static"==p(Q,"position")&&(Q.style.position="relative");var f=Q.resizeSensor.childNodes[0],g=f.childNodes[0],v=Q.resizeSensor.childNodes[1],y=function(){g.style.width="100000px";g.style.height="100000px";f.scrollLeft=1E5;f.scrollTop=1E5;v.scrollLeft=1E5;v.scrollTop=1E5};y();var C=!1,I=function(){Q.resizedAttached&&(C&&(Q.resizedAttached.call(),C=!1),b(I))};b(I);var D,N,G,ia;e=function(){if((G=Q.offsetWidth)!=D||(ia=Q.offsetHeight)!=N)C=!0,D=G,N=ia;y()};var ka=function(ja,
-ca,pa){ja.attachEvent?ja.attachEvent("on"+ca,pa):ja.addEventListener(ca,pa)};ka(f,"scroll",e);ka(v,"scroll",e)}var M=function(){GraphViewer.resizeSensorEnabled&&l()},S=Object.prototype.toString.call(k),H="[object Array]"===S||"[object NodeList]"===S||"[object HTMLCollection]"===S||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(H){S=0;for(var K=k.length;S<K;S++)E(k[S],M)}else E(k,M);this.detach=function(){if(H)for(var Q=0,e=k.length;Q<e;Q++)d.detach(k[Q]);
-else d.detach(k)}};d.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=d})();
+GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})};
+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var l=document.getElementsByTagName("*");e=[];for(k=0;k<l.length;k++){var C=l[k].className;null!=C&&0<C.length&&(C=C.split(" "),0<=mxUtils.indexOf(C,b)&&e.push(l[k]))}return e};
+GraphViewer.createViewerForElement=function(b,e){var k=b.getAttribute("data-mxgraph");if(null!=k){var l=JSON.parse(k),C=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,l);null!=e&&e(p)};null!=l.url?GraphViewer.getUrl(l.url,function(p){C(p)}):C(l.xml)}};
+GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(e){}};
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var l=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;l.open("GET",b);l.onload=function(){e(null!=l.getText?l.getText():l.responseText)};l.onerror=k;l.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,l){function C(){this.q=[];this.add=function(f){this.q.push(f)};var Q,d;this.call=function(){Q=0;for(d=this.q.length;Q<d;Q++)this.q[Q].call()}}function p(Q,d){return Q.currentStyle?Q.currentStyle[d]:window.getComputedStyle?window.getComputedStyle(Q,null).getPropertyValue(d):Q.style[d]}function E(Q,d){if(!Q.resizedAttached)Q.resizedAttached=
+new C,Q.resizedAttached.add(d);else if(Q.resizedAttached){Q.resizedAttached.add(d);return}Q.resizeSensor=document.createElement("div");Q.resizeSensor.className="resize-sensor";Q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";Q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+Q.appendChild(Q.resizeSensor);"static"==p(Q,"position")&&(Q.style.position="relative");var f=Q.resizeSensor.childNodes[0],g=f.childNodes[0],v=Q.resizeSensor.childNodes[1],x=function(){g.style.width="100000px";g.style.height="100000px";f.scrollLeft=1E5;f.scrollTop=1E5;v.scrollLeft=1E5;v.scrollTop=1E5};x();var B=!1,I=function(){Q.resizedAttached&&(B&&(Q.resizedAttached.call(),B=!1),b(I))};b(I);var D,N,G,ia;d=function(){if((G=Q.offsetWidth)!=D||(ia=Q.offsetHeight)!=N)B=!0,D=G,N=ia;x()};var ka=function(ja,
+ca,pa){ja.attachEvent?ja.attachEvent("on"+ca,pa):ja.addEventListener(ca,pa)};ka(f,"scroll",d);ka(v,"scroll",d)}var M=function(){GraphViewer.resizeSensorEnabled&&l()},S=Object.prototype.toString.call(k),H="[object Array]"===S||"[object NodeList]"===S||"[object HTMLCollection]"===S||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(H){S=0;for(var K=k.length;S<K;S++)E(k[S],M)}else E(k,M);this.detach=function(){if(H)for(var Q=0,d=k.length;Q<d;Q++)e.detach(k[Q]);
+else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
{val:"parallelMultiple",dispName:"Parallel Multiple"},{val:"terminate",dispName:"Terminate"},{val:"exclusiveGw",dispName:"Exclusive Gw"},{val:"parallelGw",dispName:"Parallel Gw"},{val:"complexGw",dispName:"Complex Gw"}]},{name:"outline",dispName:"Event Type",type:"enum",defVal:"standard",enumList:[{val:"standard",dispName:"Standard"},{val:"eventInt",dispName:"Interrupting"},{val:"eventNonint",dispName:"Non-Interrupting"},{val:"catching",dispName:"Catching"},{val:"boundInt",dispName:"Bound Interrupting"},
@@ -7039,7 +7046,12 @@ mxShapeSysMLSubmachineState.prototype.getConstraints=function(a,d,e){a=[];a.push
.75),!1));return a};function mxShapeSysMLUseCaseExtensionPoints(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLUseCaseExtensionPoints,mxShape);mxShapeSysMLUseCaseExtensionPoints.prototype.cst={USE_CASE_EXT_PT:"mxgraph.sysml.useCaseExtPt"};mxShapeSysMLUseCaseExtensionPoints.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeSysMLUseCaseExtensionPoints.prototype.background=function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke()};mxShapeSysMLUseCaseExtensionPoints.prototype.foreground=function(a,d,e,b,c){a.begin();a.moveTo(.02*b,.35*c);a.lineTo(.98*b,.35*c);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLUseCaseExtensionPoints.prototype.cst.USE_CASE_EXT_PT,mxShapeSysMLUseCaseExtensionPoints);
mxShapeSysMLUseCaseExtensionPoints.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,
-.145),!1));return a};function mxShapeUMLInputPin(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLInputPin,mxActor);mxShapeUMLInputPin.prototype.cst={INPUT_PIN:"mxgraph.uml25.inputPin"};
+.145),!1));return a};function mxShapeSysMLPort(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLPort,mxShape);mxShapeSysMLPort.prototype.cst={PORT:"mxgraph.sysml.port"};
+mxShapeSysMLPort.prototype.customProperties=[{name:"sysMLPortType",dispName:"Port Type",type:"enum",enumList:[{val:"empty",dispName:"Empty"},{val:"flowN",dispName:"Flow Up"},{val:"flowE",dispName:"Flow Right"},{val:"flowS",dispName:"Flow Down"},{val:"flowW",dispName:"Flow Left"},{val:"doubleH",dispName:"Double Horizontal"},{val:"doubleV",dispName:"Double Vertical"}]}];
+mxShapeSysMLPort.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();switch(mxUtils.getValue(this.style,"sysMLPortType","empty")){case "flowN":a.begin();a.moveTo(.25*b,.5*c);a.lineTo(.5*b,.25*c);a.lineTo(.75*b,.5*c);a.moveTo(.5*b,.25*c);a.lineTo(.5*b,.75*c);a.stroke();break;case "flowE":a.begin();a.moveTo(.5*b,.25*c);a.lineTo(.75*b,.5*c);a.lineTo(.5*b,.75*c);a.moveTo(.75*b,.5*c);a.lineTo(.25*b,.5*c);a.stroke();break;case "flowS":a.begin();a.moveTo(.25*
+b,.5*c);a.lineTo(.5*b,.75*c);a.lineTo(.75*b,.5*c);a.moveTo(.5*b,.75*c);a.lineTo(.5*b,.25*c);a.stroke();break;case "flowW":a.begin();a.moveTo(.5*b,.25*c);a.lineTo(.25*b,.5*c);a.lineTo(.5*b,.75*c);a.moveTo(.25*b,.5*c);a.lineTo(.75*b,.5*c);a.stroke();break;case "doubleH":a.begin();a.moveTo(.6*b,.25*c);a.lineTo(.85*b,.5*c);a.lineTo(.6*b,.75*c);a.moveTo(.4*b,.25*c);a.lineTo(.15*b,.5*c);a.lineTo(.4*b,.75*c);a.stroke();break;case "doubleV":a.begin(),a.moveTo(.25*b,.6*c),a.lineTo(.5*b,.85*c),a.lineTo(.75*
+b,.6*c),a.moveTo(.25*b,.4*c),a.lineTo(.5*b,.15*c),a.lineTo(.75*b,.4*c),a.stroke()}};mxCellRenderer.registerShape(mxShapeSysMLPort.prototype.cst.PORT,mxShapeSysMLPort);mxShapeSysMLPort.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};
+function mxShapeUMLInputPin(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLInputPin,mxActor);mxShapeUMLInputPin.prototype.cst={INPUT_PIN:"mxgraph.uml25.inputPin"};
mxShapeUMLInputPin.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(.75*b,.5*c);a.lineTo(.25*b,.5*c);a.moveTo(.4*b,.4*c);a.lineTo(.25*b,.5*c);a.lineTo(.4*b,.6*c);a.stroke()};mxCellRenderer.registerShape(mxShapeUMLInputPin.prototype.cst.INPUT_PIN,mxShapeUMLInputPin);mxShapeUMLInputPin.prototype.constraints=null;
function mxShapeUMLBehaviorAction(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLBehaviorAction,mxActor);mxShapeUMLBehaviorAction.prototype.cst={BEHAVIOR_ACTION:"mxgraph.uml25.behaviorAction"};
mxShapeUMLBehaviorAction.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"rounded",!1);e=mxUtils.getValue(this.style,"absoluteArcSize",!1);var f=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(f*=Math.min(b,c));f=Math.min(f,.5*b,.5*c);d||(f=0);a.begin();d?(a.moveTo(0,f),a.arcTo(f,f,0,0,1,f,0),a.lineTo(b-f,0),a.arcTo(f,f,0,0,1,b,f),a.lineTo(b,c-f),a.arcTo(f,f,0,0,1,b-f,c),a.lineTo(f,c),a.arcTo(f,f,0,0,1,0,c-f)):(a.moveTo(0,0),a.lineTo(b,
@@ -7180,7 +7192,15 @@ mxRackRackCabinet.prototype.paintVertexShape=function(a,d,e,b,c){b=parseFloat(mx
2*g,e):a.translate(d,e);c=b*f+42;this.background(a,c);a.setShadow(!1);this.foreground(a,c);h!==mxRackRackCabinet.prototype.cst.OFF&&this.sideText(a,c,b,f,g,h)};mxRackRackCabinet.prototype.background=function(a,d){a.setFillColor("#ffffff");a.rect(0,0,180,d);a.fillAndStroke()};
mxRackRackCabinet.prototype.foreground=function(a,d){a.setFillColor("#f4f4f4");a.rect(0,0,180,21);a.fillAndStroke();a.rect(0,d-21,180,21);a.fillAndStroke();a.rect(0,21,9,d-42);a.fillAndStroke();a.rect(171,21,9,d-42);a.fillAndStroke();a.ellipse(2.5,7.5,6,6);a.stroke();a.ellipse(171.5,7.5,6,6);a.stroke();a.ellipse(2.5,d-13.5,6,6);a.stroke();a.ellipse(171.5,d-13.5,6,6);a.stroke()};
mxRackRackCabinet.prototype.sideText=function(a,d,e,b,c,f){var g=mxUtils.getValue(this.style,mxRackRackCabinet.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,"startUnit",1);a.setFontSize(c);a.setFontColor(g);if(f===mxRackRackCabinet.prototype.cst.DIR_ASC)for(f=0;f<e;f++)a.text(-c,21+.5*b+f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else if(f===mxRackRackCabinet.prototype.cst.DIR_DESC||f===mxRackRackCabinet.prototype.cst.DIR_ON)for(f=0;f<
-e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackHorCableDuct1U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorCableDuct1U,mxShape);mxRackHorCableDuct1U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_1U:"mxgraph.rackGeneral.horCableDuct1U"};
+e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackRackCabinet2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackRackCabinet2,mxShape);
+mxRackRackCabinet2.prototype.cst={SHAPE_RACK_RACK_CABINET:"mxgraph.rackGeneral.rackCabinet2",UNIT_NUM:"unitNum",UNIT_HEIGHT:"rackUnitSize",TEXT_COLOR:"textColor",NUM_DIR:"numDir",NUMBER_DISPLAY:"numDisp",ON:"on",OFF:"off",DIR_ASC:"ascend",DIR_DESC:"descend",TEXT_SIZE:"textSize"};
+mxRackRackCabinet2.prototype.customProperties=[{name:"unitNum",dispName:"Number of units",type:"int",defVal:12},{name:"startUnit",dispName:"Starting unit",type:"int",defVal:1},{name:"rackUnitSize",dispName:"Unit height",type:"float",defVal:14.8},{name:"fillColor2",dispName:"Panel Color",type:"color",defVal:"#ffffff"},{name:"textColor",dispName:"Number text color",type:"color",defVal:"#666666"},{name:"textSize",dispName:"Text size",type:"float",defVal:"12"},{name:"numDisp",dispName:"Display Numbers",
+type:"enum",defVal:"descend",enumList:[{val:"off",dispName:"Off"},{val:"ascend",dispName:"Ascending"},{val:"descend",dispName:"Descending"}],onChange:function(a,d){a.setCellStyles("marginLeft","off"==d?9:33,a.getSelectionCells())}}];
+mxRackRackCabinet2.prototype.paintVertexShape=function(a,d,e,b,c){var f=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.UNIT_NUM,"12")),g=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.UNIT_HEIGHT,"14.8")),h=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.TEXT_SIZE,"12")),k=mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.NUMBER_DISPLAY,mxRackRackCabinet2.prototype.cst.ON);k!==mxRackRackCabinet2.prototype.cst.OFF?
+(a.translate(d+2*h,e),b-=2*h):a.translate(d,e);c=f*g+42;this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c);k!==mxRackRackCabinet2.prototype.cst.OFF&&this.sideText(a,c,f,g,h,k)};mxRackRackCabinet2.prototype.background=function(a,d,e){var b=mxUtils.getValue(this.style,"fillColor2","#ffffff");a.setFillColor(b);a.rect(0,0,d,e);a.fillAndStroke()};
+mxRackRackCabinet2.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#f4f4f4");a.setFillColor(b);a.rect(0,0,d,21);a.fillAndStroke();a.rect(0,e-21,d,21);a.fillAndStroke();a.rect(0,21,9,e-42);a.fillAndStroke();a.rect(d-9,21,9,e-42);a.fillAndStroke();a.ellipse(2.5,7.5,6,6);a.stroke();a.ellipse(d-8.5,7.5,6,6);a.stroke();a.ellipse(2.5,e-13.5,6,6);a.stroke();a.ellipse(d-8.5,e-13.5,6,6);a.stroke()};
+mxRackRackCabinet2.prototype.sideText=function(a,d,e,b,c,f){var g=mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,"startUnit",1);a.setFontSize(c);a.setFontColor(g);if(f===mxRackRackCabinet2.prototype.cst.DIR_ASC)for(f=0;f<e;f++)a.text(-c,21+.5*b+f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else if(f===mxRackRackCabinet2.prototype.cst.DIR_DESC||f===mxRackRackCabinet2.prototype.cst.DIR_ON)for(f=
+0;f<e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackHorCableDuct1U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorCableDuct1U,mxShape);mxRackHorCableDuct1U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_1U:"mxgraph.rackGeneral.horCableDuct1U"};
mxRackHorCableDuct1U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorCableDuct1U.prototype.background=function(a,d,e){a.rect(0,0,160.9,14.8);a.fillAndStroke()};
mxRackHorCableDuct1U.prototype.foreground=function(a,d,e){a.rect(12,0,3,7);a.stroke();a.rect(12,7,3,7.8);a.stroke();a.rect(45.5,0,3,7);a.stroke();a.rect(45.5,7,3,7.8);a.stroke();a.rect(79,0,3,7);a.stroke();a.rect(79,7,3,7.8);a.stroke();a.rect(112.5,0,3,7);a.stroke();a.rect(112.5,7,3,7.8);a.stroke();a.rect(146,0,3,7);a.stroke();a.rect(146,7,3,7.8);a.stroke()};function mxRackHorCableDuct2U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxRackHorCableDuct2U,mxShape);mxRackHorCableDuct2U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_2U:"mxgraph.rackGeneral.horCableDuct2U"};mxRackHorCableDuct2U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorCableDuct2U.prototype.background=function(a,d,e){a.rect(0,0,160.9,29.6);a.fillAndStroke()};
@@ -7198,10 +7218,10 @@ function mxRackChannelBase(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d
mxRackChannelBase.prototype.background=function(a,d,e){a.rect(10,e-15,5,15);a.fillAndStroke();a.rect(d-15,e-15,5,15);a.fillAndStroke();a.rect(0,0,d,e-5);a.fillAndStroke()};mxRackChannelBase.prototype.foreground=function(a,d,e){a.setFillColor("#000000");a.rect(10,e-15,5,15);a.fillAndStroke();a.rect(d-15,e-15,5,15);a.fillAndStroke()};function mxRackCabinetLeg(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackCabinetLeg,mxShape);
mxRackCabinetLeg.prototype.cst={SHAPE_RACK_CABINET_LEG:"mxgraph.rackGeneral.cabinetLeg"};mxRackCabinetLeg.prototype.paintVertexShape=function(a,d,e,b,c){b=Math.max(b,20);c=Math.max(c,20);a.translate(d,e);this.background(a,b,c)};
mxRackCabinetLeg.prototype.background=function(a,d,e){a.begin();a.moveTo(0,e-10);a.lineTo(5,e-10);a.lineTo(5,e-12);a.lineTo(9,e-12);a.lineTo(9,e-10);a.lineTo(d-10,e-10);a.lineTo(d-10,9);a.lineTo(d-12,9);a.lineTo(d-12,5);a.lineTo(d-10,5);a.lineTo(d-10,0);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(0,e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxRackContainer.prototype.cst.SHAPE_RACK_CONTAINER,mxRackContainer);
-mxCellRenderer.registerShape(mxRackHorCableDuct.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT,mxRackHorCableDuct);mxCellRenderer.registerShape(mxRackHorRoutingBank.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK,mxRackHorRoutingBank);mxCellRenderer.registerShape(mxRackNeatPatch.prototype.cst.SHAPE_RACK_NEAT_PATCH,mxRackNeatPatch);mxCellRenderer.registerShape(mxRackShelf.prototype.cst.SHAPE_RACK_SHELF,mxRackShelf);mxCellRenderer.registerShape(mxRackPlate.prototype.cst.SHAPE_RACK_PLATE,mxRackPlate);
-mxCellRenderer.registerShape(mxRackRackNumbering.prototype.cst.SHAPE_RACK_RACK_NUMBERING,mxRackRackNumbering);mxCellRenderer.registerShape(mxRackRackCabinet.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet);mxCellRenderer.registerShape(mxRackHorCableDuct1U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_1U,mxRackHorCableDuct1U);mxCellRenderer.registerShape(mxRackHorCableDuct2U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_2U,mxRackHorCableDuct2U);
-mxCellRenderer.registerShape(mxRackHorRoutingBank1U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_1U,mxRackHorRoutingBank1U);mxCellRenderer.registerShape(mxRackHorRoutingBank2U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_2U,mxRackHorRoutingBank2U);mxCellRenderer.registerShape(mxRackNeatPatch2U.prototype.cst.SHAPE_RACK_NEAT_PATCH_2U,mxRackNeatPatch2U);mxCellRenderer.registerShape(mxRackShelf1U.prototype.cst.SHAPE_RACK_SHELF_1U,mxRackShelf1U);
-mxCellRenderer.registerShape(mxRackShelf2U.prototype.cst.SHAPE_RACK_SHELF_2U,mxRackShelf2U);mxCellRenderer.registerShape(mxRackShelf4U.prototype.cst.SHAPE_RACK_SHELF_4U,mxRackShelf4U);mxCellRenderer.registerShape(mxRackChannelBase.prototype.cst.SHAPE_RACK_CHANNEL_BASE,mxRackChannelBase);mxCellRenderer.registerShape(mxRackCabinetLeg.prototype.cst.SHAPE_RACK_CABINET_LEG,mxRackCabinetLeg);
+mxCellRenderer.registerShape(mxRackRackCabinet2.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet2);mxCellRenderer.registerShape(mxRackHorCableDuct.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT,mxRackHorCableDuct);mxCellRenderer.registerShape(mxRackHorRoutingBank.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK,mxRackHorRoutingBank);mxCellRenderer.registerShape(mxRackNeatPatch.prototype.cst.SHAPE_RACK_NEAT_PATCH,mxRackNeatPatch);mxCellRenderer.registerShape(mxRackShelf.prototype.cst.SHAPE_RACK_SHELF,mxRackShelf);
+mxCellRenderer.registerShape(mxRackPlate.prototype.cst.SHAPE_RACK_PLATE,mxRackPlate);mxCellRenderer.registerShape(mxRackRackNumbering.prototype.cst.SHAPE_RACK_RACK_NUMBERING,mxRackRackNumbering);mxCellRenderer.registerShape(mxRackRackCabinet.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet);mxCellRenderer.registerShape(mxRackHorCableDuct1U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_1U,mxRackHorCableDuct1U);
+mxCellRenderer.registerShape(mxRackHorCableDuct2U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_2U,mxRackHorCableDuct2U);mxCellRenderer.registerShape(mxRackHorRoutingBank1U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_1U,mxRackHorRoutingBank1U);mxCellRenderer.registerShape(mxRackHorRoutingBank2U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_2U,mxRackHorRoutingBank2U);mxCellRenderer.registerShape(mxRackNeatPatch2U.prototype.cst.SHAPE_RACK_NEAT_PATCH_2U,mxRackNeatPatch2U);
+mxCellRenderer.registerShape(mxRackShelf1U.prototype.cst.SHAPE_RACK_SHELF_1U,mxRackShelf1U);mxCellRenderer.registerShape(mxRackShelf2U.prototype.cst.SHAPE_RACK_SHELF_2U,mxRackShelf2U);mxCellRenderer.registerShape(mxRackShelf4U.prototype.cst.SHAPE_RACK_SHELF_4U,mxRackShelf4U);mxCellRenderer.registerShape(mxRackChannelBase.prototype.cst.SHAPE_RACK_CHANNEL_BASE,mxRackChannelBase);mxCellRenderer.registerShape(mxRackCabinetLeg.prototype.cst.SHAPE_RACK_CABINET_LEG,mxRackCabinetLeg);
mxStencilRegistry.allowEval = false;
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 6ca39c4b..f3cdde08 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -111,7 +111,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.4.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.4.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/"),
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]"!==
@@ -428,7 +428,7 @@ mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGrad
mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement(e==mxConstants.DIRECTION_RADIAL?"radialGradient":"linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");
e=this.createElement("stop");e.setAttribute("offset","0%");e.style.stopColor=a;e.style.stopOpacity=c;f.appendChild(e);e=this.createElement("stop");e.setAttribute("offset","100%");e.style.stopColor=b;e.style.stopOpacity=d;f.appendChild(e);return f};mxSvgCanvas2D.prototype.createFillPatternId=function(a,b,c){c=mxUtils.rgba2hex(c);"#"==c.charAt(0)&&(c=c.substring(1));return("mx-pattern-"+a+"-"+b+"-"+c).toLowerCase()};
mxSvgCanvas2D.prototype.getFillPattern=function(a,b,c,d){var e=this.createFillPatternId(a,b,c),f=this.fillPatterns[e];if(null==f){var g=this.root.ownerSVGElement,k=0,l=e+"-"+k;if(null!=g)for(f=g.ownerDocument.getElementById(l);null!=f&&f.ownerSVGElement!=g;)l=e+"-"+k++,f=g.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;if(null==f){switch(a){case "hatch":f=this.createHatchPattern(b,c,d);break;case "dots":f=this.createDotsPattern(b,c,d);break;case "cross-hatch":f=this.createCrossHatchPattern(b,
-c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return"ERROR"}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
+c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return null}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
mxSvgCanvas2D.prototype.createHatchPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1","0");e.setAttribute("x2","0");e.setAttribute("y2",c);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
a);d.appendChild(e);return d};
mxSvgCanvas2D.prototype.createDashedPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1",c/4);e.setAttribute("x2","0");e.setAttribute("y2",3*c/4);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
@@ -442,7 +442,7 @@ mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(nu
c.setAttribute("transform",d.transform);this.pointerEvents?c.setAttribute("pointer-events",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute("pointer-events","none");d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&(!a||null==d.fillColor)&&this.addTolerance(c);("rect"!=c.nodeName&&"path"!=c.nodeName&&"ellipse"!=c.nodeName||"none"!=c.getAttribute("fill")&&"transparent"!=c.getAttribute("fill")||"none"!=c.getAttribute("stroke")||"none"!=
c.getAttribute("pointer-events"))&&this.root.appendChild(c);this.node=null}};mxSvgCanvas2D.prototype.addTolerance=function(a){this.root.appendChild(this.createTolerance(a))};
mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);var b=!1;if(null!=a.fillColor)if(null!=a.gradientColor&&a.gradientColor!=mxConstants.NONE){b=!0;var c=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection);if(this.root.ownerDocument==document&&this.useAbsoluteIds){var d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");d="url("+d+"#"+c+
-")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();b||null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?this.node.setAttribute("fill",d):(a=this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale),this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")"))};
+")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();a=null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?null:this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale);b||null==a?this.node.setAttribute("fill",d):this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")")};
mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};
mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",String(a.strokeColor).toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);var b=this.getCurrentStrokeWidth();1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern((a.fixDash?1:a.strokeWidth)*a.scale))};
mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null==a.miterLimit||this.styleEnabled&&10==a.miterLimit||this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
@@ -1952,10 +1952,10 @@ 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();
-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,d){b.raw=d;return b};$jscomp.arrayIteratorImpl=function(b){var d=0;return function(){return d<b.length?{done:!1,value:b[d++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var d="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return d?d.call(b):$jscomp.arrayIterator(b)};
-Editor=function(b,d,k,l,B){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=l||this.createGraph(d,k);this.editable=null!=B?B:!b;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(p){this.status=p;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(p,E){p=null!=E?E.getProperty("edit"):null;null!=p&&p.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 b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(d){}})();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;
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)};
+Editor=function(b,e,k,l,C){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=l||this.createGraph(e,k);this.editable=null!=C?C:!b;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(p,E){this.status=p;this.statusFunction=E;this.fireEvent(new mxEventObject("statusChanged"))};
+this.getStatus=function(){return this.status};this.graphChangeListener=function(p,E){p=null!=E?E.getProperty("edit"):null;null!=p&&p.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 b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();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="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=";Editor.lightCheckmarkImage="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=";
Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";
Editor.lightHelpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+";
@@ -1981,85 +1981,85 @@ Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My
Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==";
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==";
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
-Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;
-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.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.compareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE1Ljg1IDQwLTIuMS0yLjEgNi4wNS02LjA1SDR2LTNoMTUuOGwtNi4wNS02LjA1IDIuMS0yLjEgOS42NSA5LjY1Wm0xNi4zLTEyLjctOS42NS05LjY1TDMyLjE1IDhsMi4xIDIuMS02LjA1IDYuMDVINDR2M0gyOC4ybDYuMDUgNi4wNVoiLz48L3N2Zz4=";
+Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;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.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{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.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(b){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};
Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(b){var d=null;try{var k=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(l,mxUtils.bind(this,function(B,p,E){B=l.substring(B+8,B+8+E);"zTXt"==p?(E=B.indexOf(String.fromCharCode(0)),"mxGraphModel"==B.substring(0,E)&&(B=pako.inflateRaw(Graph.stringToArrayBuffer(B.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=B&&0<B.length&&(d=B))):"tEXt"==p&&(B=B.split(String.fromCharCode(0)),1<B.length&&("mxGraphModel"==
-B[0]||"mxfile"==B[0])&&(d=B[1]));if(null!=d||"IDAT"==p)return!0}))}catch(B){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};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.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(l,mxUtils.bind(this,function(C,p,E){C=l.substring(C+8,C+8+E);"zTXt"==p?(E=C.indexOf(String.fromCharCode(0)),"mxGraphModel"==C.substring(0,E)&&(C=pako.inflateRaw(Graph.stringToArrayBuffer(C.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=C&&0<C.length&&(e=C))):"tEXt"==p&&(C=C.split(String.fromCharCode(0)),1<C.length&&("mxGraphModel"==
+C[0]||"mxfile"==C[0])&&(e=C[1]));if(null!=e||"IDAT"==p)return!0}))}catch(C){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";
Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};
Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
-Editor.prototype.editAsNew=function(b,d){d=null!=d?"?title="+encodeURIComponent(d):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,l=mxUtils.bind(this,function(B){"ready"==B.data&&B.source==k&&(mxEvent.removeListener(window,"message",l),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",l);k=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+"client=1"),
-null,!0)}else this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,d){b=new Graph(null,d,null,null,b);b.transparentBackground=!1;var k=b.isCssTransformsSupported,l=this;b.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!l.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(B){return!this.isExternalProtocol(B)});return b};
+Editor.prototype.editAsNew=function(b,e){e=null!=e?"?title="+encodeURIComponent(e):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,l=mxUtils.bind(this,function(C){"ready"==C.data&&C.source==k&&(mxEvent.removeListener(window,"message",l),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",l);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"),
+null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,e){b=new Graph(null,e,null,null,b);b.transparentBackground=!1;var k=b.isCssTransformsSupported,l=this;b.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!l.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(C){return!this.isExternalProtocol(C)});return b};
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(b){var d=b.getAttribute("grid");if(null==d||""==d)d=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=d&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
-"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);d=parseFloat(b.getAttribute("pageScale"));!isNaN(d)&&0<d?this.graph.pageScale=d:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(d=b.getAttribute("page"),this.graph.pageVisible=
-null!=d?"0"!=d:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;d=parseFloat(b.getAttribute("pageWidth"));var k=parseFloat(b.getAttribute("pageHeight"));isNaN(d)||isNaN(k)||(this.graph.pageFormat=new mxRectangle(0,0,d,k));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
-Editor.prototype.setGraphXml=function(b){if(null!=b){var d=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),d.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var k=d.document.createElement("mxGraphModel");k.appendChild(b);d.decode(k,this.graph.getModel());
+Editor.prototype.readGraphState=function(b){var e=b.getAttribute("grid");if(null==e||""==e)e=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=e&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
+"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);e=parseFloat(b.getAttribute("pageScale"));!isNaN(e)&&0<e?this.graph.pageScale=e:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(e=b.getAttribute("page"),this.graph.pageVisible=
+null!=e?"0"!=e:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;e=parseFloat(b.getAttribute("pageWidth"));var k=parseFloat(b.getAttribute("pageHeight"));isNaN(e)||isNaN(k)||(this.graph.pageFormat=new mxRectangle(0,0,e,k));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
+Editor.prototype.setGraphXml=function(b){if(null!=b){var e=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),e.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var k=e.document.createElement("mxGraphModel");k.appendChild(b);e.decode(k,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:b,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)b.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),b.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);b.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");b.setAttribute("gridSize",
this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);
b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};
Editor.prototype.setFilename=function(b){this.filename=b};
-Editor.prototype.createUndoManager=function(){var b=this.graph,d=new mxUndoManager;this.undoListener=function(l,B){d.undoableEditHappened(B.getProperty("edit"))};var k=mxUtils.bind(this,function(l,B){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(l,B){l=b.getSelectionCellsForChanges(B.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<l.length){b.getModel();B=[];for(var p=0;p<l.length;p++)null!=
-b.view.getState(l[p])&&B.push(l[p]);b.setSelectionCells(B)}};d.addListener(mxEvent.UNDO,k);d.addListener(mxEvent.REDO,k);return d};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(l,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(l,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(l,C){l=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<l.length){b.getModel();C=[];for(var p=0;p<l.length;p++)null!=
+b.view.getState(l[p])&&C.push(l[p]);b.setSelectionCells(C)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,d,k,l,B,p,E,M,S,H,K){var Q=S?57:0,e=k,f=l,g=S?0:64,v=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(v.height=window.innerHeight);var y=v.height,C=Math.max(1,Math.round((v.width-k-g)/2)),I=Math.max(1,Math.round((y-l-b.footerHeight)/3));d.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-g):k;l=Math.min(l,y-g);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";C+=v.x;I+=v.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-I+=b.embedViewport.y,C+=b.embedViewport.x);B&&document.body.appendChild(this.bg);var D=b.createDiv(S?"geTransDialog":"geDialog");B=this.getPosition(C,I,k,l);C=B.x;I=B.y;D.style.width=k+"px";D.style.height=l+"px";D.style.left=C+"px";D.style.top=I+"px";D.style.zIndex=this.zIndex;D.appendChild(d);document.body.appendChild(D);!M&&d.clientHeight>D.clientHeight-g&&(d.style.overflowY="auto");d.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
-p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=I+14+"px",p.style.left=C+k+38-Q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!K)){var N=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(G){N=!0}),null,mxUtils.bind(this,function(G){N&&(b.hideDialog(!0),N=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=H){var G=H();
-null!=G&&(e=k=G.w,f=l=G.h)}G=mxUtils.getDocumentSize();y=G.height;this.bg.style.height=y+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");C=Math.max(1,Math.round((G.width-k-g)/2));I=Math.max(1,Math.round((y-l-b.footerHeight)/3));k=null!=document.body?Math.min(e,document.body.scrollWidth-g):e;l=Math.min(f,y-g);G=this.getPosition(C,I,k,l);C=G.x;I=G.y;D.style.left=C+"px";D.style.top=I+"px";D.style.width=k+"px";D.style.height=l+"px";!M&&
-d.clientHeight>D.clientHeight-g&&(d.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=I+14+"px",this.dialogImg.style.left=C+k+38-Q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=D;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,e,k,l,C,p,E,M,S,H,K){var Q=S?57:0,d=k,f=l,g=S?0:64,v=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(v.height=window.innerHeight);var x=v.height,B=Math.max(1,Math.round((v.width-k-g)/2)),I=Math.max(1,Math.round((x-l-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-g):k;l=Math.min(l,x-g);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";B+=v.x;I+=v.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+I+=b.embedViewport.y,B+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var D=b.createDiv(S?"geTransDialog":"geDialog");C=this.getPosition(B,I,k,l);B=C.x;I=C.y;D.style.width=k+"px";D.style.height=l+"px";D.style.left=B+"px";D.style.top=I+"px";D.style.zIndex=this.zIndex;D.appendChild(e);document.body.appendChild(D);!M&&e.clientHeight>D.clientHeight-g&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
+p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=I+14+"px",p.style.left=B+k+38-Q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!K)){var N=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(G){N=!0}),null,mxUtils.bind(this,function(G){N&&(b.hideDialog(!0),N=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=H){var G=H();
+null!=G&&(d=k=G.w,f=l=G.h)}G=mxUtils.getDocumentSize();x=G.height;this.bg.style.height=x+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");B=Math.max(1,Math.round((G.width-k-g)/2));I=Math.max(1,Math.round((x-l-b.footerHeight)/3));k=null!=document.body?Math.min(d,document.body.scrollWidth-g):d;l=Math.min(f,x-g);G=this.getPosition(B,I,k,l);B=G.x;I=G.y;D.style.left=B+"px";D.style.top=I+"px";D.style.width=k+"px";D.style.height=l+"px";!M&&
+e.clientHeight>D.clientHeight-g&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=I+14+"px",this.dialogImg.style.left=B+k+38-Q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=D;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
-"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,d){return new mxPoint(b,d)};Dialog.prototype.close=function(b,d){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,d))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,d,k,l,B,p,E,M,S,H,K){S=null!=S?S:!0;var Q=document.createElement("div");Q.style.textAlign="center";if(null!=d){var e=document.createElement("div");e.style.padding="0px";e.style.margin="0px";e.style.fontSize="18px";e.style.paddingBottom="16px";e.style.marginBottom="10px";e.style.borderBottom="1px solid #c0c0c0";e.style.color="gray";e.style.whiteSpace="nowrap";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,d);e.setAttribute("title",d);Q.appendChild(e)}d=
-document.createElement("div");d.style.lineHeight="1.2em";d.style.padding="6px";d.innerHTML=k;Q.appendChild(d);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),d.className="geBtn",k.appendChild(d),k.style.textAlign="center");null!=H&&(H=mxUtils.button(H,function(){null!=K&&K()}),H.className="geBtn",k.appendChild(H));var f=mxUtils.button(l,function(){S&&b.hideDialog();null!=B&&B()});
-f.className="geBtn";k.appendChild(f);null!=E&&(l=mxUtils.button(E,function(){S&&b.hideDialog();null!=M&&M()}),l.className="geBtn gePrimaryBtn",k.appendChild(l));this.init=function(){f.focus()};Q.appendChild(k);this.container=Q},PrintDialog=function(b,d){this.create(b,d)};
-PrintDialog.prototype.create=function(b){function d(f){var g=E.checked||H.checked,v=parseInt(Q.value)/100;isNaN(v)&&(v=1,Q.value="100%");v*=.75;var y=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/k.pageScale;if(g){var I=E.checked?1:parseInt(K.value);isNaN(I)||(C=mxUtils.getScaleForPageCount(I,k,y))}k.getGraphBounds();var D=I=0;y=mxRectangle.fromRectangle(y);y.width=Math.ceil(y.width*v);y.height=Math.ceil(y.height*v);C*=v;!g&&k.pageVisible?(v=k.getPageLayout(),I-=v.x*y.width,D-=v.y*y.height):
-g=!0;g=PrintDialog.createPrintPreview(k,C,y,0,I,D,g);g.open();f&&PrintDialog.printPreview(g)}var k=b.editor.graph,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var B=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var M=document.createElement("td");M.setAttribute("colspan","2");M.style.fontSize="10pt";M.appendChild(E);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
-M.appendChild(S);mxEvent.addListener(S,"click",function(f){E.checked=!E.checked;H.checked=!E.checked;mxEvent.consume(f)});mxEvent.addListener(E,"change",function(){H.checked=!E.checked});p.appendChild(M);B.appendChild(p);p=p.cloneNode(!1);var H=document.createElement("input");H.setAttribute("type","checkbox");M=document.createElement("td");M.style.fontSize="10pt";M.appendChild(H);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");M.appendChild(S);mxEvent.addListener(S,
-"click",function(f){H.checked=!H.checked;E.checked=!H.checked;mxEvent.consume(f)});p.appendChild(M);var K=document.createElement("input");K.setAttribute("value","1");K.setAttribute("type","number");K.setAttribute("min","1");K.setAttribute("size","4");K.setAttribute("disabled","disabled");K.style.width="50px";M=document.createElement("td");M.style.fontSize="10pt";M.appendChild(K);mxUtils.write(M," "+mxResources.get("pages")+" (max)");p.appendChild(M);B.appendChild(p);mxEvent.addListener(H,"change",
-function(){H.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");E.checked=!H.checked});p=p.cloneNode(!1);M=document.createElement("td");mxUtils.write(M,mxResources.get("pageScale")+":");p.appendChild(M);M=document.createElement("td");var Q=document.createElement("input");Q.setAttribute("value","100 %");Q.setAttribute("size","5");Q.style.width="50px";M.appendChild(Q);p.appendChild(M);B.appendChild(p);p=document.createElement("tr");M=document.createElement("td");M.colSpan=2;
-M.style.paddingTop="20px";M.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&M.appendChild(S);if(PrintDialog.previewEnabled){var e=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)});e.className="geBtn";M.appendChild(e)}e=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();d(!0)});e.className="geBtn gePrimaryBtn";M.appendChild(e);b.editor.cancelFirst||
-M.appendChild(S);p.appendChild(M);B.appendChild(p);l.appendChild(B);this.container=l};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var d=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(d,500):d()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,d,k,l,B,p,E){d=new mxPrintPreview(b,d,k,l,B,p);d.title=mxResources.get("preview");d.printBackgroundImage=!0;d.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";d.backgroundColor=b;var M=d.writeHead;d.writeHead=function(S){M.apply(this,arguments);S.writeln('<style type="text/css">');S.writeln("@media screen {");S.writeln(" body > div { padding:30px;box-sizing:content-box; }");S.writeln("}");S.writeln("</style>")};return d};
+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
+var ErrorDialog=function(b,e,k,l,C,p,E,M,S,H,K){S=null!=S?S:!0;var Q=document.createElement("div");Q.style.textAlign="center";if(null!=e){var d=document.createElement("div");d.style.padding="0px";d.style.margin="0px";d.style.fontSize="18px";d.style.paddingBottom="16px";d.style.marginBottom="10px";d.style.borderBottom="1px solid #c0c0c0";d.style.color="gray";d.style.whiteSpace="nowrap";d.style.textOverflow="ellipsis";d.style.overflow="hidden";mxUtils.write(d,e);d.setAttribute("title",e);Q.appendChild(d)}e=
+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;Q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=H&&(H=mxUtils.button(H,function(){null!=K&&K()}),H.className="geBtn",k.appendChild(H));var f=mxUtils.button(l,function(){S&&b.hideDialog();null!=C&&C()});
+f.className="geBtn";k.appendChild(f);null!=E&&(l=mxUtils.button(E,function(){S&&b.hideDialog();null!=M&&M()}),l.className="geBtn gePrimaryBtn",k.appendChild(l));this.init=function(){f.focus()};Q.appendChild(k);this.container=Q},PrintDialog=function(b,e){this.create(b,e)};
+PrintDialog.prototype.create=function(b){function e(f){var g=E.checked||H.checked,v=parseInt(Q.value)/100;isNaN(v)&&(v=1,Q.value="100%");v*=.75;var x=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,B=1/k.pageScale;if(g){var I=E.checked?1:parseInt(K.value);isNaN(I)||(B=mxUtils.getScaleForPageCount(I,k,x))}k.getGraphBounds();var D=I=0;x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*v);x.height=Math.ceil(x.height*v);B*=v;!g&&k.pageVisible?(v=k.getPageLayout(),I-=v.x*x.width,D-=v.y*x.height):
+g=!0;g=PrintDialog.createPrintPreview(k,B,x,0,I,D,g);g.open();f&&PrintDialog.printPreview(g)}var k=b.editor.graph,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var C=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var M=document.createElement("td");M.setAttribute("colspan","2");M.style.fontSize="10pt";M.appendChild(E);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
+M.appendChild(S);mxEvent.addListener(S,"click",function(f){E.checked=!E.checked;H.checked=!E.checked;mxEvent.consume(f)});mxEvent.addListener(E,"change",function(){H.checked=!E.checked});p.appendChild(M);C.appendChild(p);p=p.cloneNode(!1);var H=document.createElement("input");H.setAttribute("type","checkbox");M=document.createElement("td");M.style.fontSize="10pt";M.appendChild(H);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");M.appendChild(S);mxEvent.addListener(S,
+"click",function(f){H.checked=!H.checked;E.checked=!H.checked;mxEvent.consume(f)});p.appendChild(M);var K=document.createElement("input");K.setAttribute("value","1");K.setAttribute("type","number");K.setAttribute("min","1");K.setAttribute("size","4");K.setAttribute("disabled","disabled");K.style.width="50px";M=document.createElement("td");M.style.fontSize="10pt";M.appendChild(K);mxUtils.write(M," "+mxResources.get("pages")+" (max)");p.appendChild(M);C.appendChild(p);mxEvent.addListener(H,"change",
+function(){H.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");E.checked=!H.checked});p=p.cloneNode(!1);M=document.createElement("td");mxUtils.write(M,mxResources.get("pageScale")+":");p.appendChild(M);M=document.createElement("td");var Q=document.createElement("input");Q.setAttribute("value","100 %");Q.setAttribute("size","5");Q.style.width="50px";M.appendChild(Q);p.appendChild(M);C.appendChild(p);p=document.createElement("tr");M=document.createElement("td");M.colSpan=2;
+M.style.paddingTop="20px";M.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&M.appendChild(S);if(PrintDialog.previewEnabled){var d=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});d.className="geBtn";M.appendChild(d)}d=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});d.className="geBtn gePrimaryBtn";M.appendChild(d);b.editor.cancelFirst||
+M.appendChild(S);p.appendChild(M);C.appendChild(p);l.appendChild(C);this.container=l};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
+PrintDialog.createPrintPreview=function(b,e,k,l,C,p,E){e=new mxPrintPreview(b,e,k,l,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var M=e.writeHead;e.writeHead=function(S){M.apply(this,arguments);S.writeln('<style type="text/css">');S.writeln("@media screen {");S.writeln(" body > div { padding:30px;box-sizing:content-box; }");S.writeln("}");S.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function d(){null==K||K==mxConstants.NONE?(H.style.backgroundColor="",H.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(H.style.backgroundColor=K,H.style.backgroundImage="")}function k(){var y=g;null!=y&&Graph.isPageLink(y.src)&&(y=b.createImageForPageLink(y.src,null));null!=y&&null!=y.src?(f.setAttribute("src",y.src),f.style.display=""):(f.removeAttribute("src"),f.style.display="none")}var l=b.editor.graph,B=document.createElement("table");B.style.width=
-"100%";B.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";mxUtils.write(M,mxResources.get("paperSize")+":");E.appendChild(M);M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";var S=PageSetupDialog.addPageFormatPanel(M,"pagesetupdialog",l.pageFormat);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");
-mxUtils.write(M,mxResources.get("background")+":");E.appendChild(M);M=document.createElement("td");M.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var H=document.createElement("button");H.style.width="22px";H.style.height="22px";H.style.cursor="pointer";H.style.marginRight="20px";H.style.backgroundPosition="center center";H.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(H.style.position="relative",H.style.top="-6px");var K=l.background;d();mxEvent.addListener(H,
-"click",function(y){b.pickColor(K||"none",function(C){K=C;d()});mxEvent.consume(y)});M.appendChild(H);mxUtils.write(M,mxResources.get("gridSize")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="6px";Q.value=l.getGridSize();M.appendChild(Q);mxEvent.addListener(Q,"change",function(){var y=parseInt(Q.value);Q.value=Math.max(1,isNaN(y)?l.getGridSize():y)});E.appendChild(M);p.appendChild(E);E=document.createElement("tr");
-M=document.createElement("td");mxUtils.write(M,mxResources.get("image")+":");E.appendChild(M);M=document.createElement("td");var e=document.createElement("button");e.className="geBtn";e.style.margin="0px";mxUtils.write(e,mxResources.get("change")+"...");var f=document.createElement("img");f.setAttribute("valign","middle");f.style.verticalAlign="middle";f.style.border="1px solid lightGray";f.style.borderRadius="4px";f.style.marginRight="14px";f.style.maxWidth="100px";f.style.cursor="pointer";f.style.height=
-"60px";f.style.padding="4px";var g=l.backgroundImage,v=function(y){b.showBackgroundImageDialog(function(C,I){I||(g=C,k())},g);mxEvent.consume(y)};mxEvent.addListener(e,"click",v);mxEvent.addListener(f,"click",v);k();M.appendChild(f);M.appendChild(e);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");M.colSpan=2;M.style.paddingTop="16px";M.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";
-b.editor.cancelFirst&&M.appendChild(e);v=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var y=parseInt(Q.value);isNaN(y)||l.gridSize===y||l.setGridSize(y);y=new ChangePageSetup(b,K,g,S.get());y.ignoreColor=l.background==K;y.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=g?g.src:null);l.pageFormat.width==y.previousFormat.width&&l.pageFormat.height==y.previousFormat.height&&y.ignoreColor&&y.ignoreImage||l.model.execute(y)});v.className="geBtn gePrimaryBtn";
-M.appendChild(v);b.editor.cancelFirst||M.appendChild(e);E.appendChild(M);p.appendChild(E);B.appendChild(p);this.container=B};
-PageSetupDialog.addPageFormatPanel=function(b,d,k,l){function B(G,ia,ka){if(ka||Q!=document.activeElement&&e!=document.activeElement){G=!1;for(ia=0;ia<g.length;ia++)ka=g[ia],I?"custom"==ka.key&&(M.value=ka.key,I=!1):null!=ka.format&&("a4"==ka.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==ka.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
-k.width==ka.format.width&&k.height==ka.format.height?(M.value=ka.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,G=!0):k.width==ka.format.height&&k.height==ka.format.width&&(M.value=ka.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,G=E.checked=!0));G?(S.style.display="",K.style.display="none"):(Q.value=k.width/100,e.value=k.height/100,p.setAttribute("checked",
-"checked"),M.value="custom",S.style.display="none",K.style.display="")}}d="format-"+d;var p=document.createElement("input");p.setAttribute("name",d);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",d);E.setAttribute("type","radio");E.setAttribute("value","landscape");var M=document.createElement("select");M.style.marginBottom="8px";M.style.borderRadius="4px";M.style.border="1px solid rgb(160, 160, 160)";M.style.width="206px";
-var S=document.createElement("div");S.style.marginLeft="4px";S.style.width="210px";S.style.height="24px";p.style.marginRight="6px";S.appendChild(p);d=document.createElement("span");d.style.maxWidth="100px";mxUtils.write(d,mxResources.get("portrait"));S.appendChild(d);E.style.marginLeft="10px";E.style.marginRight="6px";S.appendChild(E);var H=document.createElement("span");H.style.width="100px";mxUtils.write(H,mxResources.get("landscape"));S.appendChild(H);var K=document.createElement("div");K.style.marginLeft=
-"4px";K.style.width="210px";K.style.height="24px";var Q=document.createElement("input");Q.setAttribute("size","7");Q.style.textAlign="right";K.appendChild(Q);mxUtils.write(K," in x ");var e=document.createElement("input");e.setAttribute("size","7");e.style.textAlign="right";K.appendChild(e);mxUtils.write(K," in");S.style.display="none";K.style.display="none";for(var f={},g=PageSetupDialog.getFormats(),v=0;v<g.length;v++){var y=g[v];f[y.key]=y;var C=document.createElement("option");C.setAttribute("value",
-y.key);mxUtils.write(C,y.title);M.appendChild(C)}var I=!1;B();b.appendChild(M);mxUtils.br(b);b.appendChild(S);b.appendChild(K);var D=k,N=function(G,ia){G=f[M.value];null!=G.format?(Q.value=G.format.width/100,e.value=G.format.height/100,K.style.display="none",S.style.display=""):(S.style.display="none",K.style.display="");G=parseFloat(Q.value);if(isNaN(G)||0>=G)Q.value=k.width/100;G=parseFloat(e.value);if(isNaN(G)||0>=G)e.value=k.height/100;G=new mxRectangle(0,0,Math.floor(100*parseFloat(Q.value)),
-Math.floor(100*parseFloat(e.value)));"custom"!=M.value&&E.checked&&(G=new mxRectangle(0,0,G.height,G.width));ia&&I||G.width==D.width&&G.height==D.height||(D=G,null!=l&&l(D))};mxEvent.addListener(d,"click",function(G){p.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(H,"click",function(G){E.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(Q,"blur",N);mxEvent.addListener(Q,"click",N);mxEvent.addListener(e,"blur",N);mxEvent.addListener(e,"click",N);mxEvent.addListener(E,"change",N);
-mxEvent.addListener(p,"change",N);mxEvent.addListener(M,"change",function(G){I="custom"==M.value;N(G,!0)});N();return{set:function(G){k=G;B(null,null,!0)},get:function(){return D},widthInput:Q,heightInput:e}};
+var PageSetupDialog=function(b){function e(){null==K||K==mxConstants.NONE?(H.style.backgroundColor="",H.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(H.style.backgroundColor=K,H.style.backgroundImage="")}function k(){var x=g;null!=x&&Graph.isPageLink(x.src)&&(x=b.createImageForPageLink(x.src,null));null!=x&&null!=x.src?(f.setAttribute("src",x.src),f.style.display=""):(f.removeAttribute("src"),f.style.display="none")}var l=b.editor.graph,C=document.createElement("table");C.style.width=
+"100%";C.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";mxUtils.write(M,mxResources.get("paperSize")+":");E.appendChild(M);M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";var S=PageSetupDialog.addPageFormatPanel(M,"pagesetupdialog",l.pageFormat);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");
+mxUtils.write(M,mxResources.get("background")+":");E.appendChild(M);M=document.createElement("td");M.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var H=document.createElement("button");H.style.width="22px";H.style.height="22px";H.style.cursor="pointer";H.style.marginRight="20px";H.style.backgroundPosition="center center";H.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(H.style.position="relative",H.style.top="-6px");var K=l.background;e();mxEvent.addListener(H,
+"click",function(x){b.pickColor(K||"none",function(B){K=B;e()});mxEvent.consume(x)});M.appendChild(H);mxUtils.write(M,mxResources.get("gridSize")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="6px";Q.value=l.getGridSize();M.appendChild(Q);mxEvent.addListener(Q,"change",function(){var x=parseInt(Q.value);Q.value=Math.max(1,isNaN(x)?l.getGridSize():x)});E.appendChild(M);p.appendChild(E);E=document.createElement("tr");
+M=document.createElement("td");mxUtils.write(M,mxResources.get("image")+":");E.appendChild(M);M=document.createElement("td");var d=document.createElement("button");d.className="geBtn";d.style.margin="0px";mxUtils.write(d,mxResources.get("change")+"...");var f=document.createElement("img");f.setAttribute("valign","middle");f.style.verticalAlign="middle";f.style.border="1px solid lightGray";f.style.borderRadius="4px";f.style.marginRight="14px";f.style.maxWidth="100px";f.style.cursor="pointer";f.style.height=
+"60px";f.style.padding="4px";var g=l.backgroundImage,v=function(x){b.showBackgroundImageDialog(function(B,I){I||(g=B,k())},g);mxEvent.consume(x)};mxEvent.addListener(d,"click",v);mxEvent.addListener(f,"click",v);k();M.appendChild(f);M.appendChild(d);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");M.colSpan=2;M.style.paddingTop="16px";M.setAttribute("align","right");d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";
+b.editor.cancelFirst&&M.appendChild(d);v=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(Q.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,K,g,S.get());x.ignoreColor=l.background==K;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=g?g.src:null);l.pageFormat.width==x.previousFormat.width&&l.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage||l.model.execute(x)});v.className="geBtn gePrimaryBtn";
+M.appendChild(v);b.editor.cancelFirst||M.appendChild(d);E.appendChild(M);p.appendChild(E);C.appendChild(p);this.container=C};
+PageSetupDialog.addPageFormatPanel=function(b,e,k,l){function C(G,ia,ka){if(ka||Q!=document.activeElement&&d!=document.activeElement){G=!1;for(ia=0;ia<g.length;ia++)ka=g[ia],I?"custom"==ka.key&&(M.value=ka.key,I=!1):null!=ka.format&&("a4"==ka.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==ka.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
+k.width==ka.format.width&&k.height==ka.format.height?(M.value=ka.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,G=!0):k.width==ka.format.height&&k.height==ka.format.width&&(M.value=ka.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,G=E.checked=!0));G?(S.style.display="",K.style.display="none"):(Q.value=k.width/100,d.value=k.height/100,p.setAttribute("checked",
+"checked"),M.value="custom",S.style.display="none",K.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var M=document.createElement("select");M.style.marginBottom="8px";M.style.borderRadius="4px";M.style.border="1px solid rgb(160, 160, 160)";M.style.width="206px";
+var S=document.createElement("div");S.style.marginLeft="4px";S.style.width="210px";S.style.height="24px";p.style.marginRight="6px";S.appendChild(p);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));S.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";S.appendChild(E);var H=document.createElement("span");H.style.width="100px";mxUtils.write(H,mxResources.get("landscape"));S.appendChild(H);var K=document.createElement("div");K.style.marginLeft=
+"4px";K.style.width="210px";K.style.height="24px";var Q=document.createElement("input");Q.setAttribute("size","7");Q.style.textAlign="right";K.appendChild(Q);mxUtils.write(K," in x ");var d=document.createElement("input");d.setAttribute("size","7");d.style.textAlign="right";K.appendChild(d);mxUtils.write(K," in");S.style.display="none";K.style.display="none";for(var f={},g=PageSetupDialog.getFormats(),v=0;v<g.length;v++){var x=g[v];f[x.key]=x;var B=document.createElement("option");B.setAttribute("value",
+x.key);mxUtils.write(B,x.title);M.appendChild(B)}var I=!1;C();b.appendChild(M);mxUtils.br(b);b.appendChild(S);b.appendChild(K);var D=k,N=function(G,ia){G=f[M.value];null!=G.format?(Q.value=G.format.width/100,d.value=G.format.height/100,K.style.display="none",S.style.display=""):(S.style.display="none",K.style.display="");G=parseFloat(Q.value);if(isNaN(G)||0>=G)Q.value=k.width/100;G=parseFloat(d.value);if(isNaN(G)||0>=G)d.value=k.height/100;G=new mxRectangle(0,0,Math.floor(100*parseFloat(Q.value)),
+Math.floor(100*parseFloat(d.value)));"custom"!=M.value&&E.checked&&(G=new mxRectangle(0,0,G.height,G.width));ia&&I||G.width==D.width&&G.height==D.height||(D=G,null!=l&&l(D))};mxEvent.addListener(e,"click",function(G){p.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(H,"click",function(G){E.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(Q,"blur",N);mxEvent.addListener(Q,"click",N);mxEvent.addListener(d,"blur",N);mxEvent.addListener(d,"click",N);mxEvent.addListener(E,"change",N);
+mxEvent.addListener(p,"change",N);mxEvent.addListener(M,"change",function(G){I="custom"==M.value;N(G,!0)});N();return{set:function(G){k=G;C(null,null,!0)},get:function(){return D},widthInput:Q,heightInput:d}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,d,k,l,B,p,E,M,S,H,K,Q,e){S=null!=S?S:!0;var f=document.createElement("table"),g=document.createElement("tbody");f.style.position="absolute";f.style.top="30px";f.style.left="20px";var v=document.createElement("tr");var y=document.createElement("td");y.style.textOverflow="ellipsis";y.style.textAlign="right";y.style.maxWidth=(e?e+15:100)+"px";y.style.fontSize="10pt";y.style.width=(e?e:84)+"px";mxUtils.write(y,(B||mxResources.get("filename"))+":");v.appendChild(y);var C=
-document.createElement("input");C.setAttribute("value",d||"");C.style.marginLeft="4px";C.style.width=null!=Q?Q+"px":"180px";var I=mxUtils.button(k,function(){if(null==p||p(C.value))S&&b.hideDialog(),l(C.value)});I.className="geBtn gePrimaryBtn";this.init=function(){if(null!=B||null==E)if(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var D=f.parentNode;if(null!=D){var N=null;mxEvent.addListener(D,"dragleave",
-function(G){null!=N&&(N.style.backgroundColor="",N=null);G.stopPropagation();G.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(G){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=C,N.style.backgroundColor="#ebf2f9");G.stopPropagation();G.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(G){null!=N&&(N.style.backgroundColor="",N=null);0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")&&(C.value=decodeURIComponent(G.dataTransfer.getData("text/uri-list")),
-I.click());G.stopPropagation();G.preventDefault()}))}}};y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(C);v.appendChild(y);if(null!=B||null==E)g.appendChild(v),null!=K&&(y.appendChild(FilenameDialog.createTypeHint(b,C,K)),null!=b.editor.diagramFileTypes&&(v=document.createElement("tr"),y=document.createElement("td"),y.style.textOverflow="ellipsis",y.style.textAlign="right",y.style.maxWidth="100px",y.style.fontSize="10pt",y.style.width="84px",mxUtils.write(y,mxResources.get("type")+
-":"),v.appendChild(y),y=document.createElement("td"),y.style.whiteSpace="nowrap",v.appendChild(y),d=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),d.style.marginLeft="4px",d.style.width="198px",y.appendChild(d),C.style.width=null!=Q?Q-40+"px":"190px",v.appendChild(y),g.appendChild(v)));null!=E&&(v=document.createElement("tr"),y=document.createElement("td"),y.colSpan=2,y.appendChild(E),v.appendChild(y),g.appendChild(v));v=document.createElement("tr");y=document.createElement("td");y.colSpan=
-2;y.style.paddingTop=null!=K?"12px":"20px";y.style.whiteSpace="nowrap";y.setAttribute("align","right");K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=H&&H()});K.className="geBtn";b.editor.cancelFirst&&y.appendChild(K);null!=M&&(Q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(M)}),Q.className="geBtn",y.appendChild(Q));mxEvent.addListener(C,"keypress",function(D){13==D.keyCode&&I.click()});y.appendChild(I);b.editor.cancelFirst||y.appendChild(K);
-v.appendChild(y);g.appendChild(v);f.appendChild(g);this.container=f};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(b,d,k){var l=document.createElement("img");l.style.backgroundPosition="center bottom";l.style.backgroundRepeat="no-repeat";l.style.margin="2px 0 0 4px";l.style.verticalAlign="top";l.style.cursor="pointer";l.style.height="16px";l.style.width="16px";mxUtils.setOpacity(l,70);var B=function(){l.setAttribute("src",Editor.helpImage);l.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&d.value.toLowerCase().substring(d.value.length-
-k[p].ext.length-1)=="."+k[p].ext){l.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(d,"keyup",B);mxEvent.addListener(d,"change",B);mxEvent.addListener(l,"click",function(p){var E=l.getAttribute("title");l.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
-B();return l};
-FilenameDialog.createFileTypes=function(b,d,k){var l=document.createElement("select");for(b=0;b<k.length;b++){var B=document.createElement("option");B.setAttribute("value",b);mxUtils.write(B,mxResources.get(k[b].description)+" (."+k[b].extension+")");l.appendChild(B)}mxEvent.addListener(l,"change",function(p){p=k[l.value].extension;var E=d.value.lastIndexOf(".drawio.");E=0<E?E:d.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);d.value=0<E?d.value.substring(0,E+1)+p:d.value+"."+p;"createEvent"in
-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),d.dispatchEvent(p)):d.fireEvent("onchange")});b=function(p){p=d.value.toLowerCase();for(var E=0,M=0;M<k.length;M++){var S=k[M].extension,H=null;"drawio"!=S&&(H=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=H&&p.substring(p.length-H.length-1)=="."+H){E=M;break}}l.value=E};mxEvent.addListener(d,"change",b);mxEvent.addListener(d,"keyup",b);b();return l};
-var WrapperWindow=function(b,d,k,l,B,p,E){var M=b.createSidebarContainer();E(M);this.window=new mxWindow(d,M,k,l,B,p,!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(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};
+var FilenameDialog=function(b,e,k,l,C,p,E,M,S,H,K,Q,d){S=null!=S?S:!0;var f=document.createElement("table"),g=document.createElement("tbody");f.style.position="absolute";f.style.top="30px";f.style.left="20px";var v=document.createElement("tr");var x=document.createElement("td");x.style.textOverflow="ellipsis";x.style.textAlign="right";x.style.maxWidth=(d?d+15:100)+"px";x.style.fontSize="10pt";x.style.width=(d?d:84)+"px";mxUtils.write(x,(C||mxResources.get("filename"))+":");v.appendChild(x);var B=
+document.createElement("input");B.setAttribute("value",e||"");B.style.marginLeft="4px";B.style.width=null!=Q?Q+"px":"180px";var I=mxUtils.button(k,function(){if(null==p||p(B.value))S&&b.hideDialog(),l(B.value)});I.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==E)if(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var D=f.parentNode;if(null!=D){var N=null;mxEvent.addListener(D,"dragleave",
+function(G){null!=N&&(N.style.backgroundColor="",N=null);G.stopPropagation();G.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(G){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=B,N.style.backgroundColor="#ebf2f9");G.stopPropagation();G.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(G){null!=N&&(N.style.backgroundColor="",N=null);0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")&&(B.value=decodeURIComponent(G.dataTransfer.getData("text/uri-list")),
+I.click());G.stopPropagation();G.preventDefault()}))}}};x=document.createElement("td");x.style.whiteSpace="nowrap";x.appendChild(B);v.appendChild(x);if(null!=C||null==E)g.appendChild(v),null!=K&&(x.appendChild(FilenameDialog.createTypeHint(b,B,K)),null!=b.editor.diagramFileTypes&&(v=document.createElement("tr"),x=document.createElement("td"),x.style.textOverflow="ellipsis",x.style.textAlign="right",x.style.maxWidth="100px",x.style.fontSize="10pt",x.style.width="84px",mxUtils.write(x,mxResources.get("type")+
+":"),v.appendChild(x),x=document.createElement("td"),x.style.whiteSpace="nowrap",v.appendChild(x),e=FilenameDialog.createFileTypes(b,B,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",x.appendChild(e),B.style.width=null!=Q?Q-40+"px":"190px",v.appendChild(x),g.appendChild(v)));null!=E&&(v=document.createElement("tr"),x=document.createElement("td"),x.colSpan=2,x.appendChild(E),v.appendChild(x),g.appendChild(v));v=document.createElement("tr");x=document.createElement("td");x.colSpan=
+2;x.style.paddingTop=null!=K?"12px":"20px";x.style.whiteSpace="nowrap";x.setAttribute("align","right");K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=H&&H()});K.className="geBtn";b.editor.cancelFirst&&x.appendChild(K);null!=M&&(Q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(M)}),Q.className="geBtn",x.appendChild(Q));mxEvent.addListener(B,"keypress",function(D){13==D.keyCode&&I.click()});x.appendChild(I);b.editor.cancelFirst||x.appendChild(K);
+v.appendChild(x);g.appendChild(v);f.appendChild(g);this.container=f};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(b,e,k){var l=document.createElement("img");l.style.backgroundPosition="center bottom";l.style.backgroundRepeat="no-repeat";l.style.margin="2px 0 0 4px";l.style.verticalAlign="top";l.style.cursor="pointer";l.style.height="16px";l.style.width="16px";mxUtils.setOpacity(l,70);var C=function(){l.setAttribute("src",Editor.helpImage);l.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&e.value.toLowerCase().substring(e.value.length-
+k[p].ext.length-1)=="."+k[p].ext){l.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);mxEvent.addListener(l,"click",function(p){var E=l.getAttribute("title");l.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
+C();return l};
+FilenameDialog.createFileTypes=function(b,e,k){var l=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");l.appendChild(C)}mxEvent.addListener(l,"change",function(p){p=k[l.value].extension;var E=e.value.lastIndexOf(".drawio.");E=0<E?E:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<E?e.value.substring(0,E+1)+p:e.value+"."+p;"createEvent"in
+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var E=0,M=0;M<k.length;M++){var S=k[M].extension,H=null;"drawio"!=S&&(H=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=H&&p.substring(p.length-H.length-1)=="."+H){E=M;break}}l.value=E};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return l};
+var WrapperWindow=function(b,e,k,l,C,p,E){var M=b.createSidebarContainer();E(M);this.window=new mxWindow(e,M,k,l,C,p,!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(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var M=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=E.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(M),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(E.container),S.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(H){E.dblClick(H)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(H){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(H))}),mxUtils.bind(this,function(H){null!=
E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(H)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(H))}),mxUtils.bind(this,function(H){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(H))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=M,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
@@ -2068,29 +2068,29 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,M=nul
E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",S.style.backgroundImage="none",S.style.backgroundColor="",Editor.isDarkMode()||"simple"!=Editor.currentTheme?E.container.style.backgroundColor="":E.container.style.backgroundColor=E.simpleBackgroundColor):(E.container.className="geDiagramContainer",S.style.backgroundPosition=K,S.style.backgroundImage=H,null!=E.background&&E.background!=mxConstants.NONE||Editor.isDarkMode()||"simple"!=Editor.currentTheme?S.style.backgroundColor=
M:(S.style.backgroundColor=E.simpleBackgroundColor,E.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(E){for(var M=this.graph.gridSize*this.scale;M<this.minGridSize;)M*=2;for(var S=this.gridSteps*M,H=[],K=1;K<this.gridSteps;K++){var Q=K*M;H.push("M 0 "+Q+" L "+S+" "+Q+" M "+Q+" 0 L "+Q+" "+S)}return'<svg width="'+S+'" height="'+S+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+S+'" height="'+S+'" patternUnits="userSpaceOnUse"><path d="'+H.join(" ")+
'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+S+" 0 L 0 0 0 "+S+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,M){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var H=this.gridSize*this.view.scale*this.view.gridSteps;H=-Math.round(H-mxUtils.mod(this.view.translate.x*
-this.view.scale+E,H))+"px "+-Math.round(H-mxUtils.mod(this.view.translate.y*this.view.scale+M,H))+"px";S.style.backgroundPosition=H}};mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.view.scale,K=this.view.translate,Q=this.pageFormat,e=H*this.pageScale,f=this.view.getBackgroundPageBounds();M=f.width;S=f.height;var g=new mxRectangle(H*K.x,H*K.y,Q.width*e,Q.height*e),v=(E=E&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(S/g.height)-1:0,y=E?Math.ceil(M/g.width)-1:0,C=f.x+M,
-I=f.y+S;null==this.horizontalPageBreaks&&0<v&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<y&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(D){if(null!=D){for(var N=D==this.horizontalPageBreaks?v:y,G=0;G<=N;G++){var ia=D==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(G+1)*g.height)),new mxPoint(Math.round(C),Math.round(f.y+(G+1)*g.height))]:[new mxPoint(Math.round(f.x+(G+1)*g.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(G+1)*g.width),
-Math.round(I))];null!=D[G]?(D[G].points=ia,D[G].redraw()):(ia=new mxPolyline(ia,this.pageBreakColor),ia.dialect=this.dialect,ia.isDashed=this.pageBreakDashed,ia.pointerEvents=!1,ia.init(this.view.backgroundPane),ia.redraw(),D[G]=ia)}for(G=N;G<D.length;G++)D[G].destroy();D.splice(N,D.length-N)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var d=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,M,S){for(var H=0;H<M.length;H++){if(this.graph.isTableCell(M[H])||
-this.graph.isTableRow(M[H]))return!1;if(this.graph.getModel().isVertex(M[H])){var K=this.graph.getCellGeometry(M[H]);if(null!=K&&K.relative)return!1}}return d.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(M,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=
-function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),M=0<E.width?E.x/this.scale-this.translate.x:0,S=0<E.height?E.y/this.scale-this.translate.y:0,H=this.graph.pageFormat,K=this.graph.pageScale,Q=H.width*K;H=H.height*K;K=Math.floor(Math.min(0,M)/Q);var e=Math.floor(Math.min(0,S)/H);return new mxRectangle(this.scale*(this.translate.x+K*Q),this.scale*(this.translate.y+e*H),this.scale*
-(Math.ceil(Math.max(1,M+E.width/this.scale)/Q)-K)*Q,this.scale*(Math.ceil(Math.max(1,S+E.height/this.scale)/H)-e)*H)};var l=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,M){l.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=M+"px")};var B=mxPopupMenu.prototype.addItem;
-mxPopupMenu.prototype.addItem=function(E,M,S,H,K,Q){var e=B.apply(this,arguments);null==Q||Q||mxEvent.addListener(e,"mousedown",function(f){mxEvent.consume(f)});return e};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,M,S){var H=this.graph.model.getParent(E);if(M){var K=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);K=!this.graph.model.isEdge(H)&&!this.graph.isSiblingSelected(E)&&(null!=K&&K.relative||!this.graph.isContainer(H)||
+this.view.scale+E,H))+"px "+-Math.round(H-mxUtils.mod(this.view.translate.y*this.view.scale+M,H))+"px";S.style.backgroundPosition=H}};mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.view.scale,K=this.view.translate,Q=this.pageFormat,d=H*this.pageScale,f=this.view.getBackgroundPageBounds();M=f.width;S=f.height;var g=new mxRectangle(H*K.x,H*K.y,Q.width*d,Q.height*d),v=(E=E&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(S/g.height)-1:0,x=E?Math.ceil(M/g.width)-1:0,B=f.x+M,
+I=f.y+S;null==this.horizontalPageBreaks&&0<v&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(D){if(null!=D){for(var N=D==this.horizontalPageBreaks?v:x,G=0;G<=N;G++){var ia=D==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(G+1)*g.height)),new mxPoint(Math.round(B),Math.round(f.y+(G+1)*g.height))]:[new mxPoint(Math.round(f.x+(G+1)*g.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(G+1)*g.width),
+Math.round(I))];null!=D[G]?(D[G].points=ia,D[G].redraw()):(ia=new mxPolyline(ia,this.pageBreakColor),ia.dialect=this.dialect,ia.isDashed=this.pageBreakDashed,ia.pointerEvents=!1,ia.init(this.view.backgroundPane),ia.redraw(),D[G]=ia)}for(G=N;G<D.length;G++)D[G].destroy();D.splice(N,D.length-N)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,M,S){for(var H=0;H<M.length;H++){if(this.graph.isTableCell(M[H])||
+this.graph.isTableRow(M[H]))return!1;if(this.graph.getModel().isVertex(M[H])){var K=this.graph.getCellGeometry(M[H]);if(null!=K&&K.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(M,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=
+function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),M=0<E.width?E.x/this.scale-this.translate.x:0,S=0<E.height?E.y/this.scale-this.translate.y:0,H=this.graph.pageFormat,K=this.graph.pageScale,Q=H.width*K;H=H.height*K;K=Math.floor(Math.min(0,M)/Q);var d=Math.floor(Math.min(0,S)/H);return new mxRectangle(this.scale*(this.translate.x+K*Q),this.scale*(this.translate.y+d*H),this.scale*
+(Math.ceil(Math.max(1,M+E.width/this.scale)/Q)-K)*Q,this.scale*(Math.ceil(Math.max(1,S+E.height/this.scale)/H)-d)*H)};var l=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,M){l.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=M+"px")};var C=mxPopupMenu.prototype.addItem;
+mxPopupMenu.prototype.addItem=function(E,M,S,H,K,Q){var d=C.apply(this,arguments);null==Q||Q||mxEvent.addListener(d,"mousedown",function(f){mxEvent.consume(f)});return d};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,M,S){var H=this.graph.model.getParent(E);if(M){var K=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);K=!this.graph.model.isEdge(H)&&!this.graph.isSiblingSelected(E)&&(null!=K&&K.relative||!this.graph.isContainer(H)||
this.graph.isPart(E))}else if(K=p.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))K=H,this.graph.isTable(K)||(K=this.graph.model.getParent(K)),K=!this.graph.selectionCellsHandler.isHandled(K)||this.graph.isCellSelected(K)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(H);return K};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();
-for(var M=this.graph.getModel(),S=M.getParent(E),H=this.graph.view.getState(S),K=this.graph.isCellSelected(E);null!=H&&(M.isVertex(S)||M.isEdge(S));){var Q=this.graph.isCellSelected(S);K=K||Q;if(Q||!K&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=S;S=M.getParent(S)}return E}})();EditorUi=function(b,d,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=d||document.body;var l=this.editor.graph;l.lightbox=k;var B=l.getGraphBounds;l.getGraphBounds=function(){var R=B.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var Z=this.view.translate,la=this.view.scale;R=mxRectangle.fromRectangle(R);R.add(new mxRectangle((Z.x+Y.x)*la,(Z.y+Y.y)*la,Y.width*la,Y.height*la))}return R};l.useCssTransforms&&(this.lazyZoomDelay=
+for(var M=this.graph.getModel(),S=M.getParent(E),H=this.graph.view.getState(S),K=this.graph.isCellSelected(E);null!=H&&(M.isVertex(S)||M.isEdge(S));){var Q=this.graph.isCellSelected(S);K=K||Q;if(Q||!K&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=S;S=M.getParent(S)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var l=this.editor.graph;l.lightbox=k;var C=l.getGraphBounds;l.getGraphBounds=function(){var R=C.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var Z=this.view.translate,la=this.view.scale;R=mxRectangle.fromRectangle(R);R.add(new mxRectangle((Z.x+Y.x)*la,(Z.y+Y.y)*la,Y.width*la,Y.height*la))}return R};l.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(R,Y){this.clearSelectionState()});l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
l.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);l.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);l.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);l.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,l.isEnabled=function(){return!1},l.panningHandler.isForcePanningEvent=function(R){return!mxEvent.isPopupTrigger(R.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!l.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
M="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),S=!1,H=!1;this.setDefaultStyle=function(R){try{l.getModel().isEdge(R)?H=!1:S=!1;var Y=l.getCellStyle(R,!1),Z=[],la=[],q;for(q in Y)Z.push(Y[q]),la.push(q);l.getModel().isEdge(R)?l.currentEdgeStyle={}:l.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",Z,"cells",[R]));l.getModel().isEdge(R)?H=!0:S=!0}catch(F){this.handleError(F)}};this.clearDefaultStyle=
-function(){l.currentEdgeStyle=mxUtils.clone(l.defaultEdgeStyle);l.currentVertexStyle=mxUtils.clone(l.defaultVertexStyle);S=H=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var K=["fontFamily","fontSource","fontSize","fontColor"];for(d=0;d<K.length;d++)0>mxUtils.indexOf(p,K[d])&&p.push(K[d]);var Q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),e=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
-"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(d=0;d<e.length;d++)for(k=0;k<e[d].length;k++)p.push(e[d][k]);for(d=0;d<E.length;d++)0>mxUtils.indexOf(p,E[d])&&p.push(E[d]);var f=function(R,Y,Z,la,q,F,T){la=null!=la?la:l.currentVertexStyle;q=null!=q?q:l.currentEdgeStyle;F=null!=F?F:!0;Z=null!=Z?Z:l.getModel();if(T){T=[];for(var aa=0;aa<R.length;aa++)T=T.concat(Z.getDescendants(R[aa]));R=T}Z.beginUpdate();try{for(aa=0;aa<R.length;aa++){var U=R[aa];
-if(Y)var da=["fontSize","fontFamily","fontColor"];else{var fa=Z.getStyle(U),na=null!=fa?fa.split(";"):[];da=p.slice();for(var sa=0;sa<na.length;sa++){var za=na[sa],ua=za.indexOf("=");if(0<=ua){var Ba=za.substring(0,ua),oa=mxUtils.indexOf(da,Ba);0<=oa&&da.splice(oa,1);for(T=0;T<e.length;T++){var Aa=e[T];if(0<=mxUtils.indexOf(Aa,Ba))for(var ya=0;ya<Aa.length;ya++){var La=mxUtils.indexOf(da,Aa[ya]);0<=La&&da.splice(La,1)}}}}}var Oa=Z.isEdge(U);T=Oa?q:la;var Na=Z.getStyle(U);for(sa=0;sa<da.length;sa++){Ba=
+function(){l.currentEdgeStyle=mxUtils.clone(l.defaultEdgeStyle);l.currentVertexStyle=mxUtils.clone(l.defaultVertexStyle);S=H=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var K=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<K.length;e++)0>mxUtils.indexOf(p,K[e])&&p.push(K[e]);var Q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),d=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
+"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<d.length;e++)for(k=0;k<d[e].length;k++)p.push(d[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(p,E[e])&&p.push(E[e]);var f=function(R,Y,Z,la,q,F,T){la=null!=la?la:l.currentVertexStyle;q=null!=q?q:l.currentEdgeStyle;F=null!=F?F:!0;Z=null!=Z?Z:l.getModel();if(T){T=[];for(var aa=0;aa<R.length;aa++)T=T.concat(Z.getDescendants(R[aa]));R=T}Z.beginUpdate();try{for(aa=0;aa<R.length;aa++){var U=R[aa];
+if(Y)var da=["fontSize","fontFamily","fontColor"];else{var fa=Z.getStyle(U),na=null!=fa?fa.split(";"):[];da=p.slice();for(var sa=0;sa<na.length;sa++){var za=na[sa],ua=za.indexOf("=");if(0<=ua){var Ba=za.substring(0,ua),oa=mxUtils.indexOf(da,Ba);0<=oa&&da.splice(oa,1);for(T=0;T<d.length;T++){var Aa=d[T];if(0<=mxUtils.indexOf(Aa,Ba))for(var ya=0;ya<Aa.length;ya++){var La=mxUtils.indexOf(da,Aa[ya]);0<=La&&da.splice(La,1)}}}}}var Oa=Z.isEdge(U);T=Oa?q:la;var Na=Z.getStyle(U);for(sa=0;sa<da.length;sa++){Ba=
da[sa];var Ia=T[Ba];null!=Ia&&"edgeStyle"!=Ba&&("shape"!=Ba||Oa)&&(!Oa||F||0>mxUtils.indexOf(M,Ba))&&(Na=mxUtils.setStyle(Na,Ba,Ia))}Editor.simpleLabels&&(Na=mxUtils.setStyle(mxUtils.setStyle(Na,"html",null),"whiteSpace",null));Z.setStyle(U,Na)}}finally{Z.endUpdate()}return R};l.addListener("cellsInserted",function(R,Y){f(Y.getProperty("cells"),null,null,null,null,!0,!0)});l.addListener("textInserted",function(R,Y){f(Y.getProperty("cells"),!0)});this.insertHandler=f;this.createDivs();this.createUi();
this.refresh();var g=mxUtils.bind(this,function(R){null==R&&(R=window.event);return l.isEditing()||null!=R&&this.isSelectionAllowed(R)});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?(d=function(R){if(null!=R){var Y=mxEvent.getSource(R);if("A"==Y.nodeName)for(;null!=Y;){if("geHint"==Y.className)return!0;Y=Y.parentNode}}return g(R)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-d):this.diagramContainer.oncontextmenu=d):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(d=l.view.getDrawPane().ownerSVGElement,null!=d&&(d.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=l.graphHandler){var v=l.graphHandler.start;l.graphHandler.start=function(){null!=pa.hoverIcons&&pa.hoverIcons.reset();v.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(R){var Y=
-mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(R)-Y.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(R)-Y.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var y=!1,C=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(R,Y){return y||C.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(R){32!=R.which||l.isEditing()?mxEvent.isConsumed(R)||
-27!=R.keyCode||this.hideDialog(null,!0):(y=!0,this.hoverIcons.reset(),l.container.style.cursor="move",l.isEditing()||mxEvent.getSource(R)!=l.container||mxEvent.consume(R))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(R){l.container.style.cursor="";y=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var I=l.panningHandler.isForcePanningEvent;l.panningHandler.isForcePanningEvent=function(R){return I.apply(this,arguments)||y||mxEvent.isMouseEvent(R.getEvent())&&
-(this.usePopupTrigger||!mxEvent.isPopupTrigger(R.getEvent()))&&(!mxEvent.isControlDown(R.getEvent())&&mxEvent.isRightMouseButton(R.getEvent())||mxEvent.isMiddleMouseButton(R.getEvent()))};var D=l.cellEditor.isStopEditingEvent;l.cellEditor.isStopEditingEvent=function(R){return D.apply(this,arguments)||13==R.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(R)||mxClient.IS_MAC&&mxEvent.isMetaDown(R)||mxClient.IS_SF&&mxEvent.isShiftDown(R))};var N=l.isZoomWheelEvent;l.isZoomWheelEvent=function(){return y||
+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?(e=function(R){if(null!=R){var Y=mxEvent.getSource(R);if("A"==Y.nodeName)for(;null!=Y;){if("geHint"==Y.className)return!0;Y=Y.parentNode}}return g(R)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+e):this.diagramContainer.oncontextmenu=e):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(e=l.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=l.graphHandler){var v=l.graphHandler.start;l.graphHandler.start=function(){null!=pa.hoverIcons&&pa.hoverIcons.reset();v.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(R){var Y=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(R)-Y.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(R)-Y.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var x=!1,B=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(R,Y){return x||B.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(R){32!=R.which||l.isEditing()?mxEvent.isConsumed(R)||
+27!=R.keyCode||this.hideDialog(null,!0):(x=!0,this.hoverIcons.reset(),l.container.style.cursor="move",l.isEditing()||mxEvent.getSource(R)!=l.container||mxEvent.consume(R))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(R){l.container.style.cursor="";x=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var I=l.panningHandler.isForcePanningEvent;l.panningHandler.isForcePanningEvent=function(R){return I.apply(this,arguments)||x||mxEvent.isMouseEvent(R.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(R.getEvent()))&&(!mxEvent.isControlDown(R.getEvent())&&mxEvent.isRightMouseButton(R.getEvent())||mxEvent.isMiddleMouseButton(R.getEvent()))};var D=l.cellEditor.isStopEditingEvent;l.cellEditor.isStopEditingEvent=function(R){return D.apply(this,arguments)||13==R.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(R)||mxClient.IS_MAC&&mxEvent.isMetaDown(R)||mxClient.IS_SF&&mxEvent.isShiftDown(R))};var N=l.isZoomWheelEvent;l.isZoomWheelEvent=function(){return x||
N.apply(this,arguments)};var G=!1,ia=null,ka=null,ja=null,ca=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=l.cellEditor.isContentEditing()){for(var R=this.toolbar.container.firstChild,Y=[];null!=R;){var Z=R.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,R)&&(R.parentNode.removeChild(R),Y.push(R));R=Z}R=this.toolbar.fontMenu;Z=this.toolbar.sizeMenu;if(null==ja)this.toolbar.createTextToolbar();else{for(var la=0;la<ja.length;la++)this.toolbar.container.appendChild(ja[la]);this.toolbar.fontMenu=
ia;this.toolbar.sizeMenu=ka}G=l.cellEditor.isContentEditing();ia=R;ka=Z;ja=Y}}),pa=this,ra=l.cellEditor.startEditing;l.cellEditor.startEditing=function(){ra.apply(this,arguments);ca();if(l.cellEditor.isContentEditing()){var R=!1,Y=function(){R||(R=!0,window.setTimeout(function(){var Z=l.getSelectedEditingElement();null!=Z&&(Z=mxUtils.getCurrentStyle(Z),null!=Z&&null!=pa.toolbar&&(pa.toolbar.setFontName(Graph.stripQuotes(Z.fontFamily)),pa.toolbar.setFontSize(parseInt(Z.fontSize))));R=!1},0))};mxEvent.addListener(l.cellEditor.textarea,
"input",Y);mxEvent.addListener(l.cellEditor.textarea,"touchend",Y);mxEvent.addListener(l.cellEditor.textarea,"mouseup",Y);mxEvent.addListener(l.cellEditor.textarea,"keyup",Y);Y()}};var L=l.cellEditor.stopEditing;l.cellEditor.stopEditing=function(R,Y){try{L.apply(this,arguments),ca()}catch(Z){pa.handleError(Z)}};l.container.setAttribute("tabindex","0");l.container.style.cursor="default";if(window.self===window.top&&null!=l.container.parentNode)try{l.container.focus()}catch(R){}var V=l.fireMouseEvent;
@@ -2104,122 +2104,122 @@ l.currentEdgeStyle.edgeStyle||"none"==l.currentEdgeStyle.edgeStyle||null==l.curr
0<R.length&&l.getModel().setVisible(Y,!0)});this.gestureHandler=mxUtils.bind(this,function(R){null!=this.currentMenu&&mxEvent.getSource(R)!=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(){l.view.validateBackground()}));this.addListener("backgroundColorChanged",
mxUtils.bind(this,function(){l.view.validateBackground()}));l.addListener("gridSizeChanged",mxUtils.bind(this,function(){l.isGridEnabled()&&l.view.validateBackground()}));this.editor.resetGraph()}this.init();l.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,d,k){function l(M,S){var H=p;p+=S;return M.substring(H,p)}function B(M){M=l(M,4);return M.charCodeAt(3)+(M.charCodeAt(2)<<8)+(M.charCodeAt(1)<<16)+(M.charCodeAt(0)<<24)}var p=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(l(b,4),"IHDR"!=l(b,4))null!=k&&k();else{l(b,17);do{k=B(b);var E=l(b,4);if(null!=d&&d(p-8,E,k))break;value=l(b,k);l(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+EditorUi.parsePng=function(b,e,k){function l(M,S){var H=p;p+=S;return M.substring(H,p)}function C(M){M=l(M,4);return M.charCodeAt(3)+(M.charCodeAt(2)<<8)+(M.charCodeAt(1)<<16)+(M.charCodeAt(0)<<24)}var p=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(l(b,4),"IHDR"!=l(b,4))null!=k&&k();else{l(b,17);do{k=C(b);var E=l(b,4);if(null!=e&&e(p-8,E,k))break;value=l(b,k);l(b,4);if("IEND"==E)break}while(k)}};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 b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var l=b.getRubberband();null!=l&&l.cancel()}));mxEvent.addListener(b.container,
-"keydown",mxUtils.bind(this,function(l){this.onKeyDown(l)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(l){this.onKeyPress(l)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var d=b.setDefaultParent,k=this;this.editor.graph.setDefaultParent=function(){d.apply(this,
+"keydown",mxUtils.bind(this,function(l){this.onKeyDown(l)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(l){this.onKeyPress(l)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var e=b.setDefaultParent,k=this;this.editor.graph.setDefaultParent=function(){e.apply(this,
arguments);k.updateActionStates()};b.editLink=k.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 b=this.editor.graph,d=b.getSelectionCells(),k=this.initSelectionState(),l=!0,B=0;B<d.length;B++){var p=b.getCurrentCellStyle(d[B]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,d[B],d,l),l=!1)}this.updateSelectionStateForTableCells(k);return k};
+EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),l=!0,C=0;C<e.length;C++){var p=b.getCurrentCellStyle(e[C]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[C],e,l),l=!1)}this.updateSelectionStateForTableCells(k);return k};
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(b){if(1<b.cells.length&&b.cell){for(var d=mxUtils.sortCells(b.cells),k=this.editor.graph.model,l=k.getParent(d[0]),B=k.getParent(l),p=l.getIndex(d[0]),E=B.getIndex(l),M=null,S=1,H=1,K=0,Q=E<B.getChildCount()-1?k.getChildAt(k.getChildAt(B,E+1),p):null;K<d.length-1;){var e=d[++K];null==Q||Q!=e||null!=M&&S!=M||(M=S,S=0,H++,l=k.getParent(Q),Q=E+H<B.getChildCount()?k.getChildAt(k.getChildAt(B,E+H),p):null);var f=this.editor.graph.view.getState(e);
-if(e==k.getChildAt(l,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}K==H*S-1&&(b.mergeCell=d[0],b.colspan=S,b.rowspan=H)}};
-EditorUi.prototype.updateSelectionStateForCell=function(b,d,k,l){k=this.editor.graph;b.cells.push(d);if(k.getModel().isVertex(d)){b.connections=0<k.model.getEdgeCount(d);b.unlocked=b.unlocked&&!k.isCellLocked(d);b.resizable=b.resizable&&k.isCellResizable(d);b.rotatable=b.rotatable&&k.isCellRotatable(d);b.movable=b.movable&&k.isCellMovable(d)&&!k.isTableRow(d)&&!k.isTableCell(d);b.swimlane=b.swimlane||k.isSwimlane(d);b.table=b.table||k.isTable(d);b.cell=b.cell||k.isTableCell(d);b.row=b.row||k.isTableRow(d);
-b.vertices.push(d);var B=k.getCellGeometry(d);if(null!=B&&(0<B.width?null==b.width?b.width=B.width:b.width!=B.width&&(b.width=""):b.containsLabel=!0,0<B.height?null==b.height?b.height=B.height:b.height!=B.height&&(b.height=""):b.containsLabel=!0,!B.relative||null!=B.offset)){var p=B.relative?B.offset.x:B.x;B=B.relative?B.offset.y:B.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=B:b.y!=B&&(b.y="")}}else k.getModel().isEdge(d)&&(b.edges.push(d),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
-!1);d=k.view.getState(d);null!=d&&(b.autoSize=b.autoSize||k.isAutoSizeState(d),b.glass=b.glass&&k.isGlassState(d),b.rounded=b.rounded&&k.isRoundedState(d),b.lineJumps=b.lineJumps&&k.isLineJumpState(d),b.image=b.image&&k.isImageState(d),b.shadow=b.shadow&&k.isShadowState(d),b.fill=b.fill&&k.isFillState(d),b.stroke=b.stroke&&k.isStrokeState(d),p=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(d.style,b.style,l))};
-EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,d=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,H){"mouseDown"==H.getProperty("eventName")&&d.hideShapePicker()}));var k=mxUtils.bind(this,function(){d.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var l=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return l.apply(this,arguments)||null!=d.shapePicker};var B=b.dblClick;b.dblClick=function(S,H){if(this.isEnabled())if(null!=H||null==d.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))B.apply(this,arguments);else{var K=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(K.x,K.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){d.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(S,H,K){var Q=K.getEvent();this.graph.isCloneEvent(Q)||mxEvent.isShiftDown(Q)?E.apply(this,arguments):this.graph.connectVertex(S.cell,H,this.graph.defaultEdgeLength,Q,null,null,mxUtils.bind(this,function(e,f,g){var v=b.getCompositeParent(S.cell);e=b.getCellGeometry(v);for(K.consume();null!=v&&b.model.isVertex(v)&&null!=e&&e.relative;)cell=
-v,v=b.model.getParent(cell),e=b.getCellGeometry(v);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(K.getGraphX(),K.getGraphY(),v,mxUtils.bind(this,function(y){g(y);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(y))}),H)}),30)}),mxUtils.bind(this,function(e){this.graph.selectCellsForConnectVertex(e,Q,this)}))};var M=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M);M=window.setTimeout(mxUtils.bind(this,function(){var K=
-H.getProperty("arrow"),Q=H.getProperty("direction"),e=H.getProperty("event");K=K.getBoundingClientRect();var f=mxUtils.getOffset(b.container),g=b.container.scrollLeft+K.x-f.x;f=b.container.scrollTop+K.y-f.y;var v=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),y=d.showShapePicker(g,f,v,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(v,Q,b.defaultEdgeLength,e,!0,!0,function(I,D,N){N(C);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(C))},
-function(I){b.selectCellsForConnectVertex(I)},e,this.hoverIcons)}),Q,!0);this.centerShapePicker(y,K,g,f,Q);mxUtils.setOpacity(y,30);mxEvent.addListener(y,"mouseenter",function(){mxUtils.setOpacity(y,100)});mxEvent.addListener(y,"mouseleave",function(){d.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M)}))}};
-EditorUi.prototype.centerShapePicker=function(b,d,k,l,B){if(B==mxConstants.DIRECTION_EAST||B==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();B==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,l-=p.height+6):B==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,l+=d.height+6):B==mxConstants.DIRECTION_WEST?(k-=p.width+6,l-=p.height/2-10):B==mxConstants.DIRECTION_EAST&&(k+=d.width+6,l-=p.height/2-10);b.style.left=k+"px";b.style.top=l+"px"};
-EditorUi.prototype.showShapePicker=function(b,d,k,l,B,p){b=this.createShapePicker(b,d,k,l,B,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=l,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,d,k,l,B,p,E,M){var S=null;if(null!=E&&0<E.length){var H=this,K=this.editor.graph;S=document.createElement("div");B=K.view.getState(k);var Q=null==k||null!=B&&K.isTransparentState(B)?null:K.copyStyle(k);k=6>E.length?35*E.length:140;S.className="geToolbarContainer geSidebarContainer";S.style.cssText="position:absolute;left:"+b+"px;top:"+d+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";M||mxUtils.setPrefixedStyle(S.style,"transform","translate(-22px,-22px)");null!=K.background&&K.background!=mxConstants.NONE&&(S.style.backgroundColor=K.background);K.container.appendChild(S);k=mxUtils.bind(this,function(e){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";S.appendChild(f);null!=Q&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(Q,[e]):H.insertHandler([e],""!=e.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([e],25,25,f,null,!0,!1,e.geometry.width,e.geometry.height);mxEvent.addListener(f,"click",function(){var g=K.cloneCell(e);if(null!=l)l(g);else{g.geometry.x=K.snap(Math.round(b/K.view.scale)-K.view.translate.x-e.geometry.width/2);g.geometry.y=K.snap(Math.round(d/K.view.scale)-K.view.translate.y-e.geometry.height/2);K.model.beginUpdate();try{K.addCell(g)}finally{K.model.endUpdate()}K.setSelectionCell(g);
-K.scrollCellToVisible(g);K.startEditingAtCell(g);null!=H.hoverIcons&&H.hoverIcons.update(K.view.getState(g))}null!=p&&p()})});for(B=0;B<(M?Math.min(E.length,4):E.length);B++)k(E[B]);E=S.offsetTop+S.clientHeight-(K.container.scrollTop+K.container.offsetHeight);0<E&&(S.style.top=Math.max(K.container.scrollTop+22,d-E)+"px");E=S.offsetLeft+S.clientWidth-(K.container.scrollLeft+K.container.offsetWidth);0<E&&(S.style.left=Math.max(K.container.scrollLeft+22,b-E)+"px")}return S};
-EditorUi.prototype.getCellsForShapePicker=function(b,d){d=mxUtils.bind(this,function(k,l,B,p){return this.editor.graph.createVertex(null,null,p||"",0,0,l||120,B||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):d("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),d("whiteSpace=wrap;html=1;"),d("ellipse;whiteSpace=wrap;html=1;"),d("rhombus;whiteSpace=wrap;html=1;",80,80),d("rounded=1;whiteSpace=wrap;html=1;"),d("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
-d("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),d("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),d("triangle;whiteSpace=wrap;html=1;",60,80),d("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),d("shape=tape;whiteSpace=wrap;html=1;",120,100),d("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
-120,80),d("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),d("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
-EditorUi.prototype.onKeyDown=function(b){var d=this.editor.graph;if(9==b.which&&d.isEnabled()&&!mxEvent.isControlDown(b)){if(d.isEditing())if(mxEvent.isAltDown(b))d.stopEditing(!1);else try{var k=d.cellEditor.isContentEditing()&&d.cellEditor.isTextSelected();if(window.getSelection&&d.cellEditor.isContentEditing()&&!k&&!mxClient.IS_IE&&!mxClient.IS_IE11){var l=window.getSelection(),B=0<l.rangeCount?l.getRangeAt(0).commonAncestorContainer:null;k=null!=B&&("LI"==B.nodeName||null!=B.parentNode&&"LI"==
-B.parentNode.nodeName)}k?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?d.stopEditing(!1):d.cellEditor.insertTab(d.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?d.selectParentCell():d.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
-EditorUi.prototype.onKeyPress=function(b){var d=this.editor.graph;!this.isImmediateEditingEvent(b)||d.isEditing()||d.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(d.escape(),d.startEditing(),mxClient.IS_FF&&(d=d.cellEditor,null!=d.textarea&&(d.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(d.textarea),b.collapse(!1),d=window.getSelection(),d.removeAllRanges(),d.addRange(b))))};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,l=k.getParent(e[0]),C=k.getParent(l),p=l.getIndex(e[0]),E=C.getIndex(l),M=null,S=1,H=1,K=0,Q=E<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,E+1),p):null;K<e.length-1;){var d=e[++K];null==Q||Q!=d||null!=M&&S!=M||(M=S,S=0,H++,l=k.getParent(Q),Q=E+H<C.getChildCount()?k.getChildAt(k.getChildAt(C,E+H),p):null);var f=this.editor.graph.view.getState(d);
+if(d==k.getChildAt(l,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}K==H*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=H)}};
+EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,l){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
+b.vertices.push(e);var C=k.getCellGeometry(e);if(null!=C&&(0<C.width?null==b.width?b.width=C.width:b.width!=C.width&&(b.width=""):b.containsLabel=!0,0<C.height?null==b.height?b.height=C.height:b.height!=C.height&&(b.height=""):b.containsLabel=!0,!C.relative||null!=C.offset)){var p=C.relative?C.offset.x:C.x;C=C.relative?C.offset.y:C.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=C:b.y!=C&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
+!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),p=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(e.style,b.style,l))};
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,H){"mouseDown"==H.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var l=b.popupMenuHandler.isMenuShowing;
+b.popupMenuHandler.isMenuShowing=function(){return l.apply(this,arguments)||null!=e.shapePicker};var C=b.dblClick;b.dblClick=function(S,H){if(this.isEnabled())if(null!=H||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))C.apply(this,arguments);else{var K=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(K.x,K.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(S,H,K){var Q=K.getEvent();this.graph.isCloneEvent(Q)||mxEvent.isShiftDown(Q)?E.apply(this,arguments):this.graph.connectVertex(S.cell,H,this.graph.defaultEdgeLength,Q,null,null,mxUtils.bind(this,function(d,f,g){var v=b.getCompositeParent(S.cell);d=b.getCellGeometry(v);for(K.consume();null!=v&&b.model.isVertex(v)&&null!=d&&d.relative;)cell=
+v,v=b.model.getParent(cell),d=b.getCellGeometry(v);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(K.getGraphX(),K.getGraphY(),v,mxUtils.bind(this,function(x){g(x);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(x))}),H)}),30)}),mxUtils.bind(this,function(d){this.graph.selectCellsForConnectVertex(d,Q,this)}))};var M=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M);M=window.setTimeout(mxUtils.bind(this,function(){var K=
+H.getProperty("arrow"),Q=H.getProperty("direction"),d=H.getProperty("event");K=K.getBoundingClientRect();var f=mxUtils.getOffset(b.container),g=b.container.scrollLeft+K.x-f.x;f=b.container.scrollTop+K.y-f.y;var v=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=e.showShapePicker(g,f,v,mxUtils.bind(this,function(B){null!=B&&b.connectVertex(v,Q,b.defaultEdgeLength,d,!0,!0,function(I,D,N){N(B);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(B))},
+function(I){b.selectCellsForConnectVertex(I)},d,this.hoverIcons)}),Q,!0);this.centerShapePicker(x,K,g,f,Q);mxUtils.setOpacity(x,30);mxEvent.addListener(x,"mouseenter",function(){mxUtils.setOpacity(x,100)});mxEvent.addListener(x,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M)}))}};
+EditorUi.prototype.centerShapePicker=function(b,e,k,l,C){if(C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();C==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,l-=p.height+6):C==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,l+=e.height+6):C==mxConstants.DIRECTION_WEST?(k-=p.width+6,l-=p.height/2-10):C==mxConstants.DIRECTION_EAST&&(k+=e.width+6,l-=p.height/2-10);b.style.left=k+"px";b.style.top=l+"px"};
+EditorUi.prototype.showShapePicker=function(b,e,k,l,C,p){b=this.createShapePicker(b,e,k,l,C,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=l,this.shapePicker=b);return b};
+EditorUi.prototype.createShapePicker=function(b,e,k,l,C,p,E,M){var S=null;if(null!=E&&0<E.length){var H=this,K=this.editor.graph;S=document.createElement("div");C=K.view.getState(k);var Q=null==k||null!=C&&K.isTransparentState(C)?null:K.copyStyle(k);k=6>E.length?35*E.length:140;S.className="geToolbarContainer geSidebarContainer";S.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";M||mxUtils.setPrefixedStyle(S.style,"transform","translate(-22px,-22px)");null!=K.background&&K.background!=mxConstants.NONE&&(S.style.backgroundColor=K.background);K.container.appendChild(S);k=mxUtils.bind(this,function(d){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";S.appendChild(f);null!=Q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(Q,[d]):H.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,f,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(f,"click",function(){var g=K.cloneCell(d);if(null!=l)l(g);else{g.geometry.x=K.snap(Math.round(b/K.view.scale)-K.view.translate.x-d.geometry.width/2);g.geometry.y=K.snap(Math.round(e/K.view.scale)-K.view.translate.y-d.geometry.height/2);K.model.beginUpdate();try{K.addCell(g)}finally{K.model.endUpdate()}K.setSelectionCell(g);
+K.scrollCellToVisible(g);K.startEditingAtCell(g);null!=H.hoverIcons&&H.hoverIcons.update(K.view.getState(g))}null!=p&&p()})});for(C=0;C<(M?Math.min(E.length,4):E.length);C++)k(E[C]);E=S.offsetTop+S.clientHeight-(K.container.scrollTop+K.container.offsetHeight);0<E&&(S.style.top=Math.max(K.container.scrollTop+22,e-E)+"px");E=S.offsetLeft+S.clientWidth-(K.container.scrollLeft+K.container.offsetWidth);0<E&&(S.style.left=Math.max(K.container.scrollLeft+22,b-E)+"px")}return S};
+EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,l,C,p){return this.editor.graph.createVertex(null,null,p||"",0,0,l||120,C||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
+120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
+EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&e.isEnabled()&&!mxEvent.isControlDown(b)){if(e.isEditing())if(mxEvent.isAltDown(b))e.stopEditing(!1);else try{var k=e.cellEditor.isContentEditing()&&e.cellEditor.isTextSelected();if(window.getSelection&&e.cellEditor.isContentEditing()&&!k&&!mxClient.IS_IE&&!mxClient.IS_IE11){var l=window.getSelection(),C=0<l.rangeCount?l.getRangeAt(0).commonAncestorContainer:null;k=null!=C&&("LI"==C.nodeName||null!=C.parentNode&&"LI"==
+C.parentNode.nodeName)}k?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
+EditorUi.prototype.onKeyPress=function(b){var e=this.editor.graph;!this.isImmediateEditingEvent(b)||e.isEditing()||e.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(e.escape(),e.startEditing(),mxClient.IS_FF&&(e=e.cellEditor,null!=e.textarea&&(e.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(e.textarea),b.collapse(!1),e=window.getSelection(),e.removeAllRanges(),e.addRange(b))))};
EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};
-EditorUi.prototype.updateCssForMarker=function(b,d,k,l,B){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==k?b.className=null!=l&&l!=mxConstants.NONE?"geSprite geSprite-"+d+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(l,B),null!=k?(l=document.createElement("img"),l.className="geAdaptiveAsset",l.style.position="absolute",l.style.marginTop="0.5px",l.setAttribute("src",k),b.className="","end"==d&&mxUtils.setPrefixedStyle(l.style,
+EditorUi.prototype.updateCssForMarker=function(b,e,k,l,C){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==k?b.className=null!=l&&l!=mxConstants.NONE?"geSprite geSprite-"+e+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(l,C),null!=k?(l=document.createElement("img"),l.className="geAdaptiveAsset",l.style.position="absolute",l.style.marginTop="0.5px",l.setAttribute("src",k),b.className="","end"==e&&mxUtils.setPrefixedStyle(l.style,
"transform","scaleX(-1)"),b.appendChild(l)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))};
-EditorUi.prototype.getImageForMarker=function(b,d){var k=null;b==mxConstants.ARROW_CLASSIC?k="1"!=d?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?k="1"!=d?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?k=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?k=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?k="1"!=d?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
-b==mxConstants.ARROW_BLOCK_THIN?k="1"!=d?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?k="1"!=d?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?k="1"!=d?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?k="1"!=d?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?k="1"!=d?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
-"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=d?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
+EditorUi.prototype.getImageForMarker=function(b,e){var k=null;b==mxConstants.ARROW_CLASSIC?k="1"!=e?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?k="1"!=e?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?k=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?k=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?k="1"!=e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
+b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?k="1"!=e?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?k="1"!=e?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?k="1"!=e?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?k="1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
+"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
-EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,d=this.actions.get("paste"),k=this.actions.get("pasteHere");d.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(d.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,d=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):d.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var M={},S=p.createCellLookup(E),H=p.cloneCells(E,null,M),K=new mxGraphModel,Q=K.getChildAt(K.getRoot(),
-0),e=0;e<H.length;e++){K.add(Q,H[e]);var f=p.view.getState(E[e]);if(null!=f){var g=p.getCellGeometry(H[e]);null!=g&&g.relative&&!K.isEdge(E[e])&&null==S[mxObjectIdentity.get(K.getParent(E[e]))]&&(g.offset=null,g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(M,S),H);mxClipboard.insertCount=1;mxClipboard.setCells(H)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E=
-null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);b.updatePasteActionStates()};var B=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){B.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var M={},S=p.createCellLookup(E),H=p.cloneCells(E,null,M),K=new mxGraphModel,Q=K.getChildAt(K.getRoot(),
+0),d=0;d<H.length;d++){K.add(Q,H[d]);var f=p.view.getState(E[d]);if(null!=f){var g=p.getCellGeometry(H[d]);null!=g&&g.relative&&!K.isEdge(E[d])&&null==S[mxObjectIdentity.get(K.getParent(E[d]))]&&(g.offset=null,g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(M,S),H);mxClipboard.insertCount=1;mxClipboard.setCells(H)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E=
+null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);b.updatePasteActionStates()};var C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){C.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var Z=this.graph.getPageLayout(),la=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+Z.x*la.width),this.scale*(this.translate.y+Z.y*la.height),this.scale*Z.width*la.width,
-this.scale*Z.height*la.height)};b.getPreferredPageSize=function(Z,la,q){Z=this.getPageLayout();la=this.getPageSize();return new mxRectangle(0,0,Z.width*la.width,Z.height*la.height)};var d=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=d=mxUtils.bind(this,function(Z,la,q,F){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;F=null!=F?F:0;var T=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),aa=mxUtils.hasScrollbars(b.container),U=b.view.translate,da=b.view.scale,
+this.scale*Z.height*la.height)};b.getPreferredPageSize=function(Z,la,q){Z=this.getPageLayout();la=this.getPageSize();return new mxRectangle(0,0,Z.width*la.width,Z.height*la.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(Z,la,q,F){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;F=null!=F?F:0;var T=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),aa=mxUtils.hasScrollbars(b.container),U=b.view.translate,da=b.view.scale,
fa=mxRectangle.fromRectangle(T);fa.x=fa.x/da-U.x;fa.y=fa.y/da-U.y;fa.width/=da;fa.height/=da;U=b.container.scrollTop;var na=b.container.scrollLeft,sa=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)sa+=3;var za=b.container.offsetWidth-sa;sa=b.container.offsetHeight-sa;Z=Z?Math.max(.3,Math.min(la||1,za/fa.width)):da;la=(za-Z*fa.width)/2/Z;var ua=0==this.lightboxVerticalDivider?0:(sa-Z*fa.height)/this.lightboxVerticalDivider/Z;aa&&(la=Math.max(la,0),ua=Math.max(ua,
0));if(aa||T.width<za||T.height<sa)b.view.scaleAndTranslate(Z,Math.floor(la-fa.x),Math.floor(ua-fa.y)),b.container.scrollTop=U*Z/da,b.container.scrollLeft=na*Z/da;else if(0!=q||0!=F)T=b.view.translate,b.view.setTranslate(Math.floor(T.x+q/da),Math.floor(T.y+F/da))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var l=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",l);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",l)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(Z){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(Z){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var B=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+"resize",l)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(Z){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(Z){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var C=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var Z=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=Z?parseInt(Z["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var E=0;p=mxUtils.bind(this,function(Z,la,q){E++;
-var F=document.createElement("span");F.style.paddingLeft="8px";F.style.paddingRight="8px";F.style.cursor="pointer";mxEvent.addListener(F,"click",Z);null!=q&&F.setAttribute("title",q);Z=document.createElement("img");Z.setAttribute("border","0");Z.setAttribute("src",la);Z.style.width="36px";Z.style.filter="invert(100%)";F.appendChild(Z);this.chromelessToolbar.appendChild(F);return F});if(null!=B.backBtn){var M=Graph.sanitizeLink(B.backBtn.url);null!=M&&p(mxUtils.bind(this,function(Z){window.location.href=
+var F=document.createElement("span");F.style.paddingLeft="8px";F.style.paddingRight="8px";F.style.cursor="pointer";mxEvent.addListener(F,"click",Z);null!=q&&F.setAttribute("title",q);Z=document.createElement("img");Z.setAttribute("border","0");Z.setAttribute("src",la);Z.style.width="36px";Z.style.filter="invert(100%)";F.appendChild(Z);this.chromelessToolbar.appendChild(F);return F});if(null!=C.backBtn){var M=Graph.sanitizeLink(C.backBtn.url);null!=M&&p(mxUtils.bind(this,function(Z){window.location.href=
M;mxEvent.consume(Z)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(Z){this.actions.get("previousPage").funct();mxEvent.consume(Z)}),Editor.previousImage,mxResources.get("previousPage")),H=document.createElement("div");H.style.fontFamily=Editor.defaultHtmlFont;H.style.display="inline-block";H.style.verticalAlign="top";H.style.fontWeight="bold";H.style.marginTop="8px";H.style.fontSize="14px";H.style.color=mxClient.IS_IE||mxClient.IS_IE11?
"#000000":"#ffffff";this.chromelessToolbar.appendChild(H);var K=p(mxUtils.bind(this,function(Z){this.actions.get("nextPage").funct();mxEvent.consume(Z)}),Editor.nextImage,mxResources.get("nextPage")),Q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(H.innerText="",mxUtils.write(H,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});S.style.paddingLeft="0px";S.style.paddingRight="4px";K.style.paddingLeft="4px";K.style.paddingRight=
-"0px";var e=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(K.style.display="",S.style.display="",H.style.display="inline-block"):(K.style.display="none",S.style.display="none",H.style.display="none");Q()});this.editor.addListener("resetGraphView",e);this.editor.addListener("pageSelected",Q)}p(mxUtils.bind(this,function(Z){this.actions.get("zoomOut").funct();mxEvent.consume(Z)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
+"0px";var d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(K.style.display="",S.style.display="",H.style.display="inline-block"):(K.style.display="none",S.style.display="none",H.style.display="none");Q()});this.editor.addListener("resetGraphView",d);this.editor.addListener("pageSelected",Q)}p(mxUtils.bind(this,function(Z){this.actions.get("zoomOut").funct();mxEvent.consume(Z)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
function(Z){this.actions.get("zoomIn").funct();mxEvent.consume(Z)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(Z){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Z)}),Editor.zoomFitImage,mxResources.get("fit"));var f=null,g=null,v=mxUtils.bind(this,function(Z){null!=f&&(window.clearTimeout(f),f=null);null!=g&&(window.clearTimeout(g),g=null);f=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;g=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";g=null}),600)}),Z||200)}),y=mxUtils.bind(this,function(Z){null!=f&&(window.clearTimeout(f),f=null);null!=g&&(window.clearTimeout(g),g=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Z||30)});if("1"==urlParams.layers){this.layersDialog=null;var C=p(mxUtils.bind(this,function(Z){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var la=C.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=
+function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;g=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";g=null}),600)}),Z||200)}),x=mxUtils.bind(this,function(Z){null!=f&&(window.clearTimeout(f),f=null);null!=g&&(window.clearTimeout(g),g=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Z||30)});if("1"==urlParams.layers){this.layersDialog=null;var B=p(mxUtils.bind(this,function(Z){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var la=B.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=la.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));la=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=la.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(Z)}),Editor.layersImage,mxResources.get("layers")),I=b.getModel();I.addListener(mxEvent.CHANGE,function(){C.style.display=1<I.getChildCount(I.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(Z){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(Z)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(e=0;e<this.lightboxToolbarActions.length;e++){var D=this.lightboxToolbarActions[e];D.elem=p(D.fn,D.icon,D.tooltip)}if(null!=B.refreshBtn){var N=null==B.refreshBtn.url?null:Graph.sanitizeLink(B.refreshBtn.url);
-p(mxUtils.bind(this,function(Z){null!=N?window.location.href=N:window.location.reload();mxEvent.consume(Z)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=B.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(Z){B.fullscreenBtn.url?b.openLink(B.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(Z)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(B.closeBtn&&window.self===window.top||b.lightbox&&("1"==
-urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(Z){"1"==urlParams.close||B.closeBtn?window.close():(this.destroy(),mxEvent.consume(Z))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
-function(Z){mxEvent.isTouchEvent(Z)||(mxEvent.isShiftDown(Z)||y(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(Z){mxEvent.consume(Z)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(Z){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(Z)?v():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Z){mxEvent.isShiftDown(Z)?v():y(100);
-mxEvent.consume(Z)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(Z){mxEvent.isTouchEvent(Z)||y(30)}));var G=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Z,la){this.startX=la.getGraphX();this.startY=la.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(Z,la){},mouseUp:function(Z,la){mxEvent.isTouchEvent(la.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
-G&&Math.abs(this.scrollTop-b.container.scrollTop)<G&&Math.abs(this.startX-la.getGraphX())<G&&Math.abs(this.startY-la.getGraphY())<G&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ia=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var Z=this.graph.getPagePadding(),la=this.graph.getPageSize();this.translate.x=Z.x-(this.x0||
+this.layersDialog.style.zIndex=la.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(Z)}),Editor.layersImage,mxResources.get("layers")),I=b.getModel();I.addListener(mxEvent.CHANGE,function(){B.style.display=1<I.getChildCount(I.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(Z){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(Z)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(d=0;d<this.lightboxToolbarActions.length;d++){var D=this.lightboxToolbarActions[d];D.elem=p(D.fn,D.icon,D.tooltip)}if(null!=C.refreshBtn){var N=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.refreshBtn.url);
+p(mxUtils.bind(this,function(Z){null!=N?window.location.href=N:window.location.reload();mxEvent.consume(Z)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(Z){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(Z)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
+urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(Z){"1"==urlParams.close||C.closeBtn?window.close():(this.destroy(),mxEvent.consume(Z))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
+function(Z){mxEvent.isTouchEvent(Z)||(mxEvent.isShiftDown(Z)||x(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(Z){mxEvent.consume(Z)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(Z){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(Z)?v():x(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Z){mxEvent.isShiftDown(Z)?v():x(100);
+mxEvent.consume(Z)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(Z){mxEvent.isTouchEvent(Z)||x(30)}));var G=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Z,la){this.startX=la.getGraphX();this.startY=la.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(Z,la){},mouseUp:function(Z,la){mxEvent.isTouchEvent(la.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
+G&&Math.abs(this.scrollTop-b.container.scrollTop)<G&&Math.abs(this.startX-la.getGraphX())<G&&Math.abs(this.startY-la.getGraphY())<G&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?v():x(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ia=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var Z=this.graph.getPagePadding(),la=this.graph.getPageSize();this.translate.x=Z.x-(this.x0||
0)*la.width;this.translate.y=Z.y-(this.y0||0)*la.height}ia.apply(this,arguments)};if(!b.isViewer()){var ka=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var Z=this.getPageLayout(),la=this.getPagePadding(),q=this.getPageSize(),F=Math.ceil(2*la.x+Z.width*q.width),T=Math.ceil(2*la.y+Z.height*q.height),aa=b.minimumGraphSize;if(null==aa||aa.width!=F||aa.height!=T)b.minimumGraphSize=new mxRectangle(0,0,F,T);F=la.x-Z.x*q.width;la=la.y-Z.y*q.height;
this.autoTranslate||this.view.translate.x==F&&this.view.translate.y==la?ka.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=Z.x,this.view.y0=Z.y,Z=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(F,la),b.container.scrollLeft+=Math.round((F-Z)*b.view.scale),b.container.scrollTop+=Math.round((la-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=b.view.getBackgroundPane(),ca=b.view.getDrawPane();b.cumulativeZoomFactor=
1;var pa=null,ra=null,L=null,V=null,R=null,Y=function(Z){null!=pa&&window.clearTimeout(pa);0<=Z&&window.setTimeout(function(){if(!b.isMouseDown||V)pa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ca.style.transformOrigin="",ja.style.transformOrigin=
"",mxClient.IS_SF?(ca.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){ca.style.transform="";ja.style.transform=""},0)):(ca.style.transform="",ja.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var la=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),F=b.view.scale,T=0,aa=0;null!=ra&&(T=b.container.offsetWidth/2-ra.x+q.x,aa=b.container.offsetHeight/2-ra.y+q.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=F&&(null!=L&&(T+=la.x-L.x,aa+=la.y-L.y),null!=d&&k.chromelessResize(!1,null,T*(b.cumulativeZoomFactor-1),aa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==T&&0==aa||(b.container.scrollLeft-=T*(b.cumulativeZoomFactor-1),b.container.scrollTop-=aa*(b.cumulativeZoomFactor-1)));null!=R&&ca.setAttribute("filter",R);b.cumulativeZoomFactor=1;R=V=ra=L=pa=null}),null!=Z?Z:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=F&&(null!=L&&(T+=la.x-L.x,aa+=la.y-L.y),null!=e&&k.chromelessResize(!1,null,T*(b.cumulativeZoomFactor-1),aa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==T&&0==aa||(b.container.scrollLeft-=T*(b.cumulativeZoomFactor-1),b.container.scrollTop-=aa*(b.cumulativeZoomFactor-1)));null!=R&&ca.setAttribute("filter",R);b.cumulativeZoomFactor=1;R=V=ra=L=pa=null}),null!=Z?Z:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
function(Z,la,q,F){F=null!=F?F:this.zoomFactor;(la=la||!b.scrollbars)&&(ra=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));Z?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=F,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/=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==R&&""!=ca.getAttribute("filter")&&(R=ca.getAttribute("filter"),ca.removeAttribute("filter")),L=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Z=la||null==ra?b.container.scrollLeft+
b.container.clientWidth/2:ra.x+b.container.scrollLeft-b.container.offsetLeft,F=la||null==ra?b.container.scrollTop+b.container.clientHeight/2:ra.y+b.container.scrollTop-b.container.offsetTop,ca.style.transformOrigin=Z+"px "+F+"px",ca.style.transform="scale("+this.cumulativeZoomFactor+")",ja.style.transformOrigin=Z+"px "+F+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(Z=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(Z.style,
"transform-origin",(la||null==ra?b.container.clientWidth/2+b.container.scrollLeft-Z.offsetLeft+"px":ra.x+b.container.scrollLeft-Z.offsetLeft-b.container.offsetLeft+"px")+" "+(la||null==ra?b.container.clientHeight/2+b.container.scrollTop-Z.offsetTop+"px":ra.y+b.container.scrollTop-Z.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(Z.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
k.hoverIcons.reset());Y(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(Z){null!=pa&&window.clearTimeout(pa)},null,function(Z){1!=b.cumulativeZoomFactor&&Y(0)});mxEvent.addListener(b.container,"scroll",function(Z){null==pa||b.isMouseDown||1==b.cumulativeZoomFactor||Y(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(Z,la,q,F,T){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(Z))q=
b.view.getTranslate(),F=40/b.view.scale,mxEvent.isShiftDown(Z)?b.view.setTranslate(q.x+(la?-F:F),q.y):b.view.setTranslate(q.x,q.y+(la?F:-F));else if(q||b.isZoomWheelEvent(Z))for(var aa=mxEvent.getSource(Z);null!=aa;){if(aa==b.container)return b.tooltipHandler.hideTooltip(),ra=null!=F&&null!=T?new mxPoint(F,T):new mxPoint(mxEvent.getClientX(Z),mxEvent.getClientY(Z)),V=q,q=b.zoomFactor,F=null,Z.ctrlKey&&null!=Z.deltaY&&40>Math.abs(Z.deltaY)&&Math.round(Z.deltaY)!=Z.deltaY?q=1+Math.abs(Z.deltaY)/20*
-(q-1):null!=Z.movementY&&"pointermove"==Z.type&&(q=1+Math.max(1,Math.abs(Z.movementY))/20*(q-1),F=-1),b.lazyZoom(la,null,F,q),mxEvent.consume(Z),!1;aa=aa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(Z){b.cumulativeZoomFactor=Z.scale;b.lazyZoom(0<Z.scale,!0);mxEvent.consume(Z)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(d){this.actions.get("print").funct();mxEvent.consume(d)}),Editor.printImage,mxResources.get("print"))};
+(q-1):null!=Z.movementY&&"pointermove"==Z.type&&(q=1+Math.max(1,Math.abs(Z.movementY))/20*(q-1),F=-1),b.lazyZoom(la,null,F,q),mxEvent.consume(Z),!1;aa=aa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(Z){b.cumulativeZoomFactor=Z.scale;b.lazyZoom(0<Z.scale,!0);mxEvent.consume(Z)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
-EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var d=urlParams.border,k=60;null!=d&&(k=parseInt(d));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
+EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};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(b,d){try{var k=mxUtils.parseXml(b);this.editor.setGraphXml(k.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=d&&(this.editor.setFilename(d),this.updateDocumentTitle())}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,d,k,l){this.editor.graph.popupMenuHandler.hideMenu();var B=new mxPopupMenu(b);B.div.className+=" geMenubarMenu";B.smartSeparators=!0;B.showDisabled=!0;B.autoExpand=!0;B.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(B,arguments);B.destroy()});B.popup(d,k,null,l);this.setCurrentMenu(B)};
-EditorUi.prototype.setCurrentMenu=function(b,d){this.currentMenuElt=d;this.currentMenu=b;this.hideShapePicker()};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 b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
-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(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var d=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);d==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(k){}};
-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(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0,k;for(k in urlParams)b=0==d?b+"?":b+"&",b+=k+"="+urlParams[k],d++;return b};
-EditorUi.prototype.setScrollbars=function(b){var d=this.editor.graph,k=d.container.style.overflow;d.scrollbars=b;this.editor.updateGraphComponents();k!=d.container.style.overflow&&(d.container.scrollTop=0,d.container.scrollLeft=0,d.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 b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var d=b.getPagePadding();b.container.scrollTop=Math.floor(d.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(d.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
-1;d=b.getGraphBounds();0<d.width&&0<d.height&&(d.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(d.x+d.width-b.container.clientWidth,d.x-10)),d.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(d.y+d.height-b.container.clientHeight,d.y-10)))}else{d=b.getGraphBounds();var k=Math.max(d.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,d.y-Math.max(20,(b.container.clientHeight-Math.max(d.height,
-b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,d.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{d=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var l=b.view.scale;d.x=d.x/l-k.x;d.y=d.y/l-k.y;d.width/=l;d.height/=l;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-d.width)/2)-d.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-d.height)/4))-d.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var d=this.editor.graph,k=mxUtils.hasScrollbars(d.container),l=0,B=0;k&&(l=d.view.translate.x*d.view.scale-d.container.scrollLeft,B=d.view.translate.y*d.view.scale-d.container.scrollTop);d.pageVisible=b;d.pageBreaksVisible=b;d.preferPageSize=b;d.view.validateBackground();if(k){var p=d.getSelectionCells();d.clearSelection();d.setSelectionCells(p)}d.sizeDidChange();k&&(d.container.scrollLeft=d.view.translate.x*d.view.scale-l,d.container.scrollTop=d.view.translate.y*
-d.view.scale-B);d.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
-EditorUi.prototype.installResizeHandler=function(b,d,k){d&&(b.window.setSize=function(B,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;B=Math.min(B,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(B,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-M=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),H=parseInt(this.div.style.height);B=Math.max(0,Math.min(B,E-S));p=Math.max(0,Math.min(p,M-H));this.getX()==B&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);d&&!this.minimized&&this.setSize(S,H)};var l=mxUtils.bind(this,function(){var B=b.window.getX(),p=b.window.getY();b.window.setLocation(B,p)});mxEvent.addListener(window,"resize",l);b.destroy=function(){mxEvent.removeListener(window,
-"resize",l);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,d){this.ui=b;this.color=d}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
-function ChangePageSetup(b,d,k,l,B){this.ui=b;this.previousColor=this.color=d;this.previousImage=this.image=k;this.previousFormat=this.format=l;this.previousPageScale=this.pageScale=B;this.ignoreImage=this.ignoreColor=!1}
-ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var d=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=d}if(!this.ignoreImage){this.image=this.previousImage;d=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=d}null!=this.previousFormat&&
-(this.format=this.previousFormat,d=b.pageFormat,this.previousFormat.width!=d.width||this.previousFormat.height!=d.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=d);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
-this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(d,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;l.previousPageScale=l.pageScale;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);return l};mxCodecRegistry.register(b)})();
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,e){try{var k=mxUtils.parseXml(b);this.editor.setGraphXml(k.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=e&&(this.editor.setFilename(e),this.updateDocumentTitle())}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,e,k,l){this.editor.graph.popupMenuHandler.hideMenu();var C=new mxPopupMenu(b);C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});C.popup(e,k,null,l);this.setCurrentMenu(C)};
+EditorUi.prototype.setCurrentMenu=function(b,e){this.currentMenuElt=e;this.currentMenu=b;this.hideShapePicker()};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 b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
+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(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var e=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);e==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(k){}};
+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(b){b=null!=b?b:window.location.pathname;var e=0<b.indexOf("?")?1:0,k;for(k in urlParams)b=0==e?b+"?":b+"&",b+=k+"="+urlParams[k],e++;return b};
+EditorUi.prototype.setScrollbars=function(b){var e=this.editor.graph,k=e.container.style.overflow;e.scrollbars=b;this.editor.updateGraphComponents();k!=e.container.style.overflow&&(e.container.scrollTop=0,e.container.scrollLeft=0,e.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 b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var e=b.getPagePadding();b.container.scrollTop=Math.floor(e.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(e.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
+1;e=b.getGraphBounds();0<e.width&&0<e.height&&(e.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(e.x+e.width-b.container.clientWidth,e.x-10)),e.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(e.y+e.height-b.container.clientHeight,e.y-10)))}else{e=b.getGraphBounds();var k=Math.max(e.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,e.y-Math.max(20,(b.container.clientHeight-Math.max(e.height,
+b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,e.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{e=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var l=b.view.scale;e.x=e.x/l-k.x;e.y=e.y/l-k.y;e.width/=l;e.height/=l;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-e.width)/2)-e.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-e.height)/4))-e.y+1))}};
+EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),l=0,C=0;k&&(l=e.view.translate.x*e.view.scale-e.container.scrollLeft,C=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-l,e.container.scrollTop=e.view.translate.y*
+e.view.scale-C);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
+EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+M=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),H=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,E-S));p=Math.max(0,Math.min(p,M-H));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(S,H)};var l=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",l);b.destroy=function(){mxEvent.removeListener(window,
+"resize",l);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
+function ChangePageSetup(b,e,k,l,C){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=l;this.previousPageScale=this.pageScale=C;this.ignoreImage=this.ignoreColor=!1}
+ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
+(this.format=this.previousFormat,e=b.pageFormat,this.previousFormat.width!=e.width||this.previousFormat.height!=e.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=e);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
+this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(e,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;l.previousPageScale=l.pageScale;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);return l};mxCodecRegistry.register(b)})();
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
-EditorUi.prototype.setPageFormat=function(b,d){d=null!=d?d:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;d||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
+EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),d=this.actions.get("redo"),k=this.editor.undoManager,l=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());d.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,l);k.addListener(mxEvent.UNDO,l);k.addListener(mxEvent.REDO,l);k.addListener(mxEvent.CLEAR,l);var B=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){B.apply(this,arguments);l()};var p=this.editor.graph.cellEditor.stopEditing;
+EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,l=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,l);k.addListener(mxEvent.UNDO,l);k.addListener(mxEvent.REDO,l);k.addListener(mxEvent.CLEAR,l);var C=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){C.apply(this,arguments);l()};var p=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(E,M){p.apply(this,arguments);l()};l()};
-EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,d=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),l="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(" "),B=0;B<l.length;B++)this.actions.get(l[B]).setEnabled(0<d.cells.length);
-this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<d.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<d.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==d.cells.length);this.actions.get("sendBackward").setEnabled(1==
-d.cells.length);this.actions.get("rotation").setEnabled(1==d.vertices.length);this.actions.get("wordWrap").setEnabled(1==d.vertices.length);this.actions.get("autosize").setEnabled(0<d.vertices.length);this.actions.get("copySize").setEnabled(1==d.vertices.length);this.actions.get("clearWaypoints").setEnabled(d.connections);this.actions.get("curved").setEnabled(0<d.edges.length);this.actions.get("turn").setEnabled(0<d.cells.length);this.actions.get("group").setEnabled(!d.row&&!d.cell&&(1<d.cells.length||
-1==d.vertices.length&&0==b.model.getChildCount(d.cells[0])&&!b.isContainer(d.vertices[0])));this.actions.get("ungroup").setEnabled(!d.row&&!d.cell&&!d.table&&0<d.vertices.length&&(b.isContainer(d.vertices[0])||0<b.getModel().getChildCount(d.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==d.cells.length&&b.getModel().isVertex(b.getModel().getParent(d.cells[0])));this.actions.get("collapsible").setEnabled(1==d.vertices.length&&(0<b.model.getChildCount(d.vertices[0])||b.isContainer(d.vertices[0])));
-this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==d.cells.length&&b.isValidRoot(d.cells[0]));this.actions.get("editLink").setEnabled(1==d.cells.length);this.actions.get("openLink").setEnabled(1==d.cells.length&&null!=b.getLinkForCell(d.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
-this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);l=1==d.vertices.length&&b.isCellFoldable(d.vertices[0]);this.actions.get("expand").setEnabled(l);this.actions.get("collapse").setEnabled(l);this.menus.get("navigation").setEnabled(0<d.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(d.unlocked&&1==d.vertices.length);this.menus.get("distribute").setEnabled(d.unlocked&&
-1<d.vertices.length);this.menus.get("align").setEnabled(d.unlocked&&0<d.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var d=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(d=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var B=Math.max(0,Math.min(this.hsplitPosition,
-d-this.splitSize-20));d=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",d+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",d+=this.toolbarHeight);0<d&&(d+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+l;p=Math.max(0,Math.min(k-d-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=B+"px";this.sidebarFooterContainer.style.height=
-p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=d+"px";this.sidebarContainer.style.width=B+"px";this.formatContainer.style.top=d+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var M=null!=this.hsplit.parentNode?B+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+l+"px";this.hsplit.style.left=B+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=M+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px");B=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=k+"px",B=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+l+"px";this.formatContainer.style.bottom=
-this.footerHeight+l+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=M+E.x+"px",this.diagramContainer.style.top=d+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+l+B+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),l="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(" "),C=0;C<l.length;C++)this.actions.get(l[C]).setEnabled(0<e.cells.length);
+this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
+e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
+1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0])));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));
+this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("openLink").setEnabled(1==e.cells.length&&null!=b.getLinkForCell(e.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
+this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);l=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(l);this.actions.get("collapse").setEnabled(l);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&
+1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,
+e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+l;p=Math.max(0,Math.min(k-e-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=
+p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var M=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+l+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=M+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+l+"px";this.formatContainer.style.bottom=
+this.footerHeight+l+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=M+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+l+C+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2227,61 +2227,65 @@ EditorUi.prototype.createSidebarContainer=function(){var b=document.createElemen
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var b=this.editor.chromeless?null:this.createFooter();null!=b&&(this.footerContainer.appendChild(b),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
-!0,0,mxUtils.bind(this,function(d){this.hsplitPosition=d;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
-EditorUi.prototype.createStatusDiv=function(b){var d=document.createElement("div");d.setAttribute("title",b);d.innerHTML=b;return d};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
-EditorUi.prototype.createDiv=function(b){var d=document.createElement("div");d.className=b;return d};
-EditorUi.prototype.addSplitHandler=function(b,d,k,l){function B(Q){if(null!=E){var e=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q));l(Math.max(0,M+(d?e.x-E.x:E.y-e.y)-k));mxEvent.consume(Q);M!=K()&&(S=!0,H=null)}}function p(Q){B(Q);E=M=null}var E=null,M=null,S=!0,H=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var K=mxUtils.bind(this,function(){var Q=parseInt(d?b.style.left:b.style.bottom);d||(Q=Q+k-this.footerHeight);return Q});mxEvent.addGestureListeners(b,function(Q){E=new mxPoint(mxEvent.getClientX(Q),
-mxEvent.getClientY(Q));M=K();S=!1;mxEvent.consume(Q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(Q){if(!S&&this.hsplitClickEnabled){var e=null!=H?H-k:0;H=K();l(e);mxEvent.consume(Q)}}));mxEvent.addGestureListeners(document,null,B,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,B,p)})};
-EditorUi.prototype.prompt=function(b,d,k){b=new FilenameDialog(this,d,mxResources.get("apply"),function(l){k(parseFloat(l))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
-EditorUi.prototype.handleError=function(b,d,k,l,B){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=d){B=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");d=null!=d?d:mxResources.get("error");null!=b&&null!=b.message&&(B=mxUtils.htmlEntities(b.message));this.showError(d,B,p,k,null,null,null,null,null,null,null,null,l?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,d,k,l,B,p,E,M,S,H,K,Q,e){b=new ErrorDialog(this,b,d,k||mxResources.get("ok"),l,B,p,E,Q,M,S);d=Math.ceil(null!=d?d.length/50:1);this.showDialog(b.container,H||340,K||100+20*d,!0,!1,e);b.init()};EditorUi.prototype.showDialog=function(b,d,k,l,B,p,E,M,S,H){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,d,k,l,B,p,E,M,S,H);this.dialogs.push(this.dialog)};
-EditorUi.prototype.hideDialog=function(b,d,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,d)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var d=b.getSelectionCells(),k=new mxDictionary,l=[],B=0;B<d.length;B++){var p=b.isTableCell(d[B])?b.model.getParent(d[B]):d[B];null==p||k.get(p)||(k.put(p,!0),l.push(p))}b.setSelectionCells(b.duplicateCells(l,!1))}catch(E){this.handleError(E)}};
-EditorUi.prototype.pickColor=function(b,d){var k=this.editor.graph,l=k.cellEditor.saveSelection(),B=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(l);d(p)},function(){k.cellEditor.restoreSelection(l)});this.showDialog(b.container,230,B,!0,!1);b.init()};
+!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};
+EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){var k=mxEvent.getSource(e),l=k.getAttribute("data-action");if("statusFunction"==l&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=l)k=this.actions.get(l),null!=k&&k.funct();else{l=k.getAttribute("data-title");var C=k.getAttribute("data-message");null!=l&&null!=C?this.showError(l,C):(k=k.getAttribute("data-link"),
+null!=k&&this.editor.graph.openLink(k))}mxEvent.consume(e)}));return b};
+EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var e=0;e<b.length;e++)(function(k){mxUtils.setOpacity(k,0);mxUtils.setPrefixedStyle(k.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(k.style,"transition","all 0.2s ease");
+window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(k,100);mxUtils.setPrefixedStyle(k.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(k.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(k.style,"transform","scaleX(0)");mxUtils.setOpacity(k,0);window.setTimeout(mxUtils.bind(this,function(){null!=k.parentNode&&k.parentNode.removeChild(k)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};
+EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
+EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
+EditorUi.prototype.addSplitHandler=function(b,e,k,l){function C(Q){if(null!=E){var d=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q));l(Math.max(0,M+(e?d.x-E.x:E.y-d.y)-k));mxEvent.consume(Q);M!=K()&&(S=!0,H=null)}}function p(Q){C(Q);E=M=null}var E=null,M=null,S=!0,H=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var K=mxUtils.bind(this,function(){var Q=parseInt(e?b.style.left:b.style.bottom);e||(Q=Q+k-this.footerHeight);return Q});mxEvent.addGestureListeners(b,function(Q){E=new mxPoint(mxEvent.getClientX(Q),
+mxEvent.getClientY(Q));M=K();S=!1;mxEvent.consume(Q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(Q){if(!S&&this.hsplitClickEnabled){var d=null!=H?H-k:0;H=K();l(d);mxEvent.consume(Q)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
+EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(l){k(parseFloat(l))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
+EditorUi.prototype.handleError=function(b,e,k,l,C){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){C=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(C=mxUtils.htmlEntities(b.message));this.showError(e,C,p,k,null,null,null,null,null,null,null,null,l?k:null)}else null!=k&&k()};
+EditorUi.prototype.showError=function(b,e,k,l,C,p,E,M,S,H,K,Q,d){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),l,C,p,E,Q,M,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,H||340,K||100+20*e,!0,!1,d);b.init()};EditorUi.prototype.showDialog=function(b,e,k,l,C,p,E,M,S,H){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,l,C,p,E,M,S,H);this.dialogs.push(this.dialog)};
+EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,l=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),l.push(p))}b.setSelectionCells(b.duplicateCells(l,!1))}catch(E){this.handleError(E)}};
+EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,l=k.cellEditor.saveSelection(),C=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(l);e(p)},function(){k.cellEditor.restoreSelection(l)});this.showDialog(b.container,230,C,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var l=b.lastIndexOf("&lt;/mxGraphModel&gt;");l>k&&(d=b.substring(k,l+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(B){}return d};
-EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(d){null!=d?b(d):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var l=decodeURIComponent(k);this.isCompatibleString(l)&&(k=l)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,d){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==d&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(l){l.text().then(mxUtils.bind(this,function(B){try{var p=this.parseHtmlData(B),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var M=E.lastIndexOf("%3E");
-0<=M&&M<E.length-3&&(E=E.substring(0,M+3))}catch(K){}try{var S=p.getElementsByTagName("span"),H=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(E);this.isCompatibleString(H)&&(E=H)}catch(K){}}catch(K){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(B){b(null)})}))["catch"](function(l){b(null)});else if(null!=k&&0<k.length&&"text"==d&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(l){l.text().then(function(B){b(B)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var l=b.lastIndexOf("&lt;/mxGraphModel&gt;");l>k&&(e=b.substring(k,l+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(C){}return e};
+EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var l=decodeURIComponent(k);this.isCompatibleString(l)&&(k=l)}b(k)}),"text")}),"html")};
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(l){l.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var M=E.lastIndexOf("%3E");
+0<=M&&M<E.length-3&&(E=E.substring(0,M+3))}catch(K){}try{var S=p.getElementsByTagName("span"),H=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(E);this.isCompatibleString(H)&&(E=H)}catch(K){}}catch(K){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(C){b(null)})}))["catch"](function(l){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(l){l.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(k){b(null)})};
-EditorUi.prototype.parseHtmlData=function(b){var d=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);d=document.createElement("div");d.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=d.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=d.firstChild&&d.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=d.firstChild.nextSibling&&d.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
-d.firstChild.nodeName&&"A"==d.firstChild.nextSibling.nodeName&&null==d.firstChild.nextSibling.nextSibling&&(b=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,b==d.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(d,b),asHtml=!1));k=k&&null!=d.firstChild?d.firstChild.nextSibling:d.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
-null!=b&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(d,b),asHtml=!1)):(k=d.getElementsByTagName("img"),1==k.length&&(k=k[0],b=k.getAttribute("src"),null!=b&&k.parentNode==d&&1==d.children.length&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(d,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(d)}asHtml||d.setAttribute("data-type","text/plain");return d};
-EditorUi.prototype.extractGraphModelFromEvent=function(b){var d=null,k=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?k=b.getData("Text"):(k=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==k||0==k.length)&&(k=b.getData("text/plain"))),null!=k&&(k=Graph.zapGremlins(mxUtils.trim(k)),b=this.extractGraphModelFromHtml(k),null!=b&&(k=b))));null!=k&&this.isCompatibleString(k)&&
-(d=k);return d};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(d){this.save(d)}),null,mxUtils.bind(this,function(d){if(null!=d&&0<d.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
-EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,d);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(d.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(d))).simulate(document,
-"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(d);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayouts=function(b,d){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),l=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==l.length?null:l)}),!0,d)};
-EditorUi.prototype.executeLayout=function(b,d,k){var l=this.editor.graph;l.getModel().beginUpdate();try{b()}catch(B){throw B;}finally{this.allowAnimation&&d&&l.isEnabled()?(b=new mxMorphing(l),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(l.getModel().endUpdate(),null!=k&&k())}};
-EditorUi.prototype.showImageDialog=function(b,d,k,l){l=this.editor.graph.cellEditor;var B=l.saveSelection(),p=mxUtils.prompt(b,d);l.restoreSelection(B);if(null!=p&&0<p.length){var E=new Image;E.onload=function(){k(p,E.width,E.height)};E.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,d,k){b=new LinkDialog(this,b,d,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
+e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
+null!=b&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)):(k=e.getElementsByTagName("img"),1==k.length&&(k=k[0],b=k.getAttribute("src"),null!=b&&k.parentNode==e&&1==e.children.length&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(e)}asHtml||e.setAttribute("data-type","text/plain");return e};
+EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,k=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?k=b.getData("Text"):(k=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==k||0==k.length)&&(k=b.getData("text/plain"))),null!=k&&(k=Graph.zapGremlins(mxUtils.trim(k)),b=this.extractGraphModelFromHtml(k),null!=b&&(k=b))));null!=k&&this.isCompatibleString(k)&&
+(e=k);return e};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(e){this.save(e)}),null,mxUtils.bind(this,function(e){if(null!=e&&0<e.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
+EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,
+"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
+EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),l=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==l.length?null:l)}),!0,e)};
+EditorUi.prototype.executeLayout=function(b,e,k){var l=this.editor.graph;l.getModel().beginUpdate();try{b()}catch(C){throw C;}finally{this.allowAnimation&&e&&l.isEnabled()?(b=new mxMorphing(l),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(l.getModel().endUpdate(),null!=k&&k())}};
+EditorUi.prototype.showImageDialog=function(b,e,k,l){l=this.editor.graph.cellEditor;var C=l.saveSelection(),p=mxUtils.prompt(b,e);l.restoreSelection(C);if(null!=p&&0<p.length){var E=new Image;E.onload=function(){k(p,E.width,E.height)};E.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(b,d){b=null!=b?b:mxUtils.bind(this,function(l){l=new ChangePageSetup(this,null,l);l.ignoreColor=!0;this.editor.graph.model.execute(l)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=d?d.src:"");null!=k&&0<k.length?(d=new Image,d.onload=function(){b(new mxImage(k,d.width,d.height),!1)},d.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},d.src=k):b(null)};
-EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,d,k){mxUtils.confirm(b)?null!=d&&d():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var d=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){d.update(!1)});return d};
+EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(l){l=new ChangePageSetup(this,null,l);l.ignoreColor=!0;this.editor.graph.model.execute(l)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=k):b(null)};
+EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function d(Q,e,f){if(!l.isSelectionEmpty()&&l.isEnabled()){e=null!=e?e:1;var g=l.getCompositeParents(l.getSelectionCells()),v=0<g.length?g[0]:null;if(null!=v)if(f){l.getModel().beginUpdate();try{for(v=0;v<g.length;v++)if(l.getModel().isVertex(g[v])&&l.isCellResizable(g[v])){var y=l.getCellGeometry(g[v]);null!=y&&(y=y.clone(),37==Q?y.width=Math.max(0,y.width-e):38==Q?y.height=Math.max(0,y.height-e):39==Q?y.width+=e:40==Q&&(y.height+=e),l.getModel().setGeometry(g[v],
-y))}}finally{l.getModel().endUpdate()}}else{y=l.model.getParent(v);var C=l.getView().scale;f=null;1==l.getSelectionCount()&&l.model.isVertex(v)&&null!=l.layoutManager&&!l.isCellLocked(v)&&(f=l.layoutManager.getLayout(y));if(null!=f&&f.constructor==mxStackLayout)e=y.getIndex(v),37==Q||38==Q?l.model.add(y,v,Math.max(0,e-1)):(39==Q||40==Q)&&l.model.add(y,v,Math.min(l.model.getChildCount(y),e+1));else{var I=l.graphHandler;null!=I&&(null==I.first&&I.start(v,0,0,g),null!=I.first&&(v=g=0,37==Q?g=-e:38==
-Q?v=-e:39==Q?g=e:40==Q&&(v=e),I.currentDx+=g*C,I.currentDy+=v*C,I.checkPreview(),I.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=I.first){var D=I.roundLength(I.currentDx/C),N=I.roundLength(I.currentDy/C);I.moveCells(I.cells,D,N);I.reset()}},400))}}}}var k=this,l=this.editor.graph,B=new mxKeyHandler(l),p=B.isEventIgnored;B.isEventIgnored=function(Q){return!(mxEvent.isShiftDown(Q)&&9==Q.keyCode)&&(!this.isControlDown(Q)||mxEvent.isShiftDown(Q)||90!=Q.keyCode&&
-89!=Q.keyCode&&188!=Q.keyCode&&190!=Q.keyCode&&85!=Q.keyCode)&&(66!=Q.keyCode&&73!=Q.keyCode||!this.isControlDown(Q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};B.isEnabledForEvent=function(Q){return!mxEvent.isConsumed(Q)&&this.isGraphEvent(Q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};B.isControlDown=function(Q){return mxEvent.isControlDown(Q)||mxClient.IS_MAC&&Q.metaKey};var E=null,M={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=B.getFunction;mxKeyHandler.prototype.getFunction=function(Q){if(l.isEnabled()){if(mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){var e=k.actions.get(k.altShiftActions[Q.keyCode]);if(null!=e)return e.funct}if(null!=M[Q.keyCode]&&!l.isSelectionEmpty())if(!this.isControlDown(Q)&&mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){if(l.model.isVertex(l.getSelectionCell()))return function(){var f=l.connectVertex(l.getSelectionCell(),M[Q.keyCode],
-l.defaultEdgeLength,Q,!0);null!=f&&0<f.length&&(1==f.length&&l.model.isEdge(f[0])?l.setSelectionCell(l.model.getTerminal(f[0],!1)):l.setSelectionCell(f[f.length-1]),l.scrollCellToVisible(l.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(l.view.getState(l.getSelectionCell())))}}else return this.isControlDown(Q)?function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null,!0)}:function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null)}}return S.apply(this,arguments)};B.bindAction=mxUtils.bind(this,
-function(Q,e,f,g){var v=this.actions.get(f);null!=v&&(f=function(){v.isEnabled()&&v.funct.apply(this,arguments)},e?g?B.bindControlShiftKey(Q,f):B.bindControlKey(Q,f):g?B.bindShiftKey(Q,f):B.bindKey(Q,f))});var H=this,K=B.escape;B.escape=function(Q){K.apply(this,arguments)};B.enter=function(){};B.bindControlShiftKey(36,function(){l.exitGroup()});B.bindControlShiftKey(35,function(){l.enterGroup()});B.bindShiftKey(36,function(){l.home()});B.bindKey(35,function(){l.refresh()});B.bindAction(107,!0,"zoomIn");
-B.bindAction(109,!0,"zoomOut");B.bindAction(80,!0,"print");B.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)B.bindControlKey(36,function(){l.isEnabled()&&l.foldCells(!0)}),B.bindControlKey(35,function(){l.isEnabled()&&l.foldCells(!1)}),B.bindControlKey(13,function(){H.ctrlEnter()}),B.bindAction(8,!1,"delete"),B.bindAction(8,!0,"deleteAll"),B.bindAction(8,!1,"deleteLabels",!0),B.bindAction(46,!1,"delete"),B.bindAction(46,!0,"deleteAll"),B.bindAction(46,!1,"deleteLabels",
-!0),B.bindAction(36,!1,"resetView"),B.bindAction(72,!0,"fitWindow",!0),B.bindAction(74,!0,"fitPage"),B.bindAction(74,!0,"fitTwoPages",!0),B.bindAction(48,!0,"customZoom"),B.bindAction(82,!0,"turn"),B.bindAction(82,!0,"clearDefaultStyle",!0),B.bindAction(83,!0,"save"),B.bindAction(83,!0,"saveAs",!0),B.bindAction(65,!0,"selectAll"),B.bindAction(65,!0,"selectNone",!0),B.bindAction(73,!0,"selectVertices",!0),B.bindAction(69,!0,"selectEdges",!0),B.bindAction(69,!0,"editStyle"),B.bindAction(66,!0,"bold"),
-B.bindAction(66,!0,"toBack",!0),B.bindAction(70,!0,"toFront",!0),B.bindAction(68,!0,"duplicate"),B.bindAction(68,!0,"setAsDefaultStyle",!0),B.bindAction(90,!0,"undo"),B.bindAction(89,!0,"autosize",!0),B.bindAction(88,!0,"cut"),B.bindAction(67,!0,"copy"),B.bindAction(86,!0,"paste"),B.bindAction(71,!0,"group"),B.bindAction(77,!0,"editData"),B.bindAction(71,!0,"grid",!0),B.bindAction(73,!0,"italic"),B.bindAction(76,!0,"lockUnlock"),B.bindAction(76,!0,"layers",!0),B.bindAction(80,!0,"format",!0),B.bindAction(85,
-!0,"underline"),B.bindAction(85,!0,"ungroup",!0),B.bindAction(190,!0,"superscript"),B.bindAction(188,!0,"subscript"),B.bindAction(13,!1,"keyPressEnter"),B.bindKey(113,function(){l.isEnabled()&&l.startEditingAtCell()});mxClient.IS_WIN?B.bindAction(89,!0,"redo"):B.bindAction(90,!0,"redo",!0);return B};
+EditorUi.prototype.createKeyHandler=function(b){function e(Q,d,f){if(!l.isSelectionEmpty()&&l.isEnabled()){d=null!=d?d:1;var g=l.getCompositeParents(l.getSelectionCells()),v=0<g.length?g[0]:null;if(null!=v)if(f){l.getModel().beginUpdate();try{for(v=0;v<g.length;v++)if(l.getModel().isVertex(g[v])&&l.isCellResizable(g[v])){var x=l.getCellGeometry(g[v]);null!=x&&(x=x.clone(),37==Q?x.width=Math.max(0,x.width-d):38==Q?x.height=Math.max(0,x.height-d):39==Q?x.width+=d:40==Q&&(x.height+=d),l.getModel().setGeometry(g[v],
+x))}}finally{l.getModel().endUpdate()}}else{x=l.model.getParent(v);var B=l.getView().scale;f=null;1==l.getSelectionCount()&&l.model.isVertex(v)&&null!=l.layoutManager&&!l.isCellLocked(v)&&(f=l.layoutManager.getLayout(x));if(null!=f&&f.constructor==mxStackLayout)d=x.getIndex(v),37==Q||38==Q?l.model.add(x,v,Math.max(0,d-1)):(39==Q||40==Q)&&l.model.add(x,v,Math.min(l.model.getChildCount(x),d+1));else{var I=l.graphHandler;null!=I&&(null==I.first&&I.start(v,0,0,g),null!=I.first&&(v=g=0,37==Q?g=-d:38==
+Q?v=-d:39==Q?g=d:40==Q&&(v=d),I.currentDx+=g*B,I.currentDy+=v*B,I.checkPreview(),I.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=I.first){var D=I.roundLength(I.currentDx/B),N=I.roundLength(I.currentDy/B);I.moveCells(I.cells,D,N);I.reset()}},400))}}}}var k=this,l=this.editor.graph,C=new mxKeyHandler(l),p=C.isEventIgnored;C.isEventIgnored=function(Q){return!(mxEvent.isShiftDown(Q)&&9==Q.keyCode)&&(!this.isControlDown(Q)||mxEvent.isShiftDown(Q)||90!=Q.keyCode&&
+89!=Q.keyCode&&188!=Q.keyCode&&190!=Q.keyCode&&85!=Q.keyCode)&&(66!=Q.keyCode&&73!=Q.keyCode||!this.isControlDown(Q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};C.isEnabledForEvent=function(Q){return!mxEvent.isConsumed(Q)&&this.isGraphEvent(Q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.isControlDown=function(Q){return mxEvent.isControlDown(Q)||mxClient.IS_MAC&&Q.metaKey};var E=null,M={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=C.getFunction;mxKeyHandler.prototype.getFunction=function(Q){if(l.isEnabled()){if(mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){var d=k.actions.get(k.altShiftActions[Q.keyCode]);if(null!=d)return d.funct}if(null!=M[Q.keyCode]&&!l.isSelectionEmpty())if(!this.isControlDown(Q)&&mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){if(l.model.isVertex(l.getSelectionCell()))return function(){var f=l.connectVertex(l.getSelectionCell(),M[Q.keyCode],
+l.defaultEdgeLength,Q,!0);null!=f&&0<f.length&&(1==f.length&&l.model.isEdge(f[0])?l.setSelectionCell(l.model.getTerminal(f[0],!1)):l.setSelectionCell(f[f.length-1]),l.scrollCellToVisible(l.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(l.view.getState(l.getSelectionCell())))}}else return this.isControlDown(Q)?function(){e(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null,!0)}:function(){e(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null)}}return S.apply(this,arguments)};C.bindAction=mxUtils.bind(this,
+function(Q,d,f,g){var v=this.actions.get(f);null!=v&&(f=function(){v.isEnabled()&&v.funct.apply(this,arguments)},d?g?C.bindControlShiftKey(Q,f):C.bindControlKey(Q,f):g?C.bindShiftKey(Q,f):C.bindKey(Q,f))});var H=this,K=C.escape;C.escape=function(Q){K.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){l.exitGroup()});C.bindControlShiftKey(35,function(){l.enterGroup()});C.bindShiftKey(36,function(){l.home()});C.bindKey(35,function(){l.refresh()});C.bindAction(107,!0,"zoomIn");
+C.bindAction(109,!0,"zoomOut");C.bindAction(80,!0,"print");C.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)C.bindControlKey(36,function(){l.isEnabled()&&l.foldCells(!0)}),C.bindControlKey(35,function(){l.isEnabled()&&l.foldCells(!1)}),C.bindControlKey(13,function(){H.ctrlEnter()}),C.bindAction(8,!1,"delete"),C.bindAction(8,!0,"deleteAll"),C.bindAction(8,!1,"deleteLabels",!0),C.bindAction(46,!1,"delete"),C.bindAction(46,!0,"deleteAll"),C.bindAction(46,!1,"deleteLabels",
+!0),C.bindAction(36,!1,"resetView"),C.bindAction(72,!0,"fitWindow",!0),C.bindAction(74,!0,"fitPage"),C.bindAction(74,!0,"fitTwoPages",!0),C.bindAction(48,!0,"customZoom"),C.bindAction(82,!0,"turn"),C.bindAction(82,!0,"clearDefaultStyle",!0),C.bindAction(83,!0,"save"),C.bindAction(83,!0,"saveAs",!0),C.bindAction(65,!0,"selectAll"),C.bindAction(65,!0,"selectNone",!0),C.bindAction(73,!0,"selectVertices",!0),C.bindAction(69,!0,"selectEdges",!0),C.bindAction(69,!0,"editStyle"),C.bindAction(66,!0,"bold"),
+C.bindAction(66,!0,"toBack",!0),C.bindAction(70,!0,"toFront",!0),C.bindAction(68,!0,"duplicate"),C.bindAction(68,!0,"setAsDefaultStyle",!0),C.bindAction(90,!0,"undo"),C.bindAction(89,!0,"autosize",!0),C.bindAction(88,!0,"cut"),C.bindAction(67,!0,"copy"),C.bindAction(86,!0,"paste"),C.bindAction(71,!0,"group"),C.bindAction(77,!0,"editData"),C.bindAction(71,!0,"grid",!0),C.bindAction(73,!0,"italic"),C.bindAction(76,!0,"lockUnlock"),C.bindAction(76,!0,"layers",!0),C.bindAction(80,!0,"format",!0),C.bindAction(85,
+!0,"underline"),C.bindAction(85,!0,"ungroup",!0),C.bindAction(190,!0,"superscript"),C.bindAction(188,!0,"subscript"),C.bindAction(13,!1,"keyPressEnter"),C.bindKey(113,function(){l.isEnabled()&&l.startEditingAtCell()});mxClient.IS_WIN?C.bindAction(89,!0,"redo"):C.bindAction(90,!0,"redo",!0);return C};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),b.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),
-this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var d=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<d.length;b++)null!=d[b]&&null!=d[b].parentNode&&d[b].parentNode.removeChild(d[b])};(function(){var b=[["nbsp","160"],["shy","173"]],d=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var l=0;l<b.length;l++)k=k.replace(new RegExp("&"+b[l][0]+";","g"),"&#"+b[l][1]+";");return d(k)}})();
-Date.prototype.toISOString||function(){function b(d){d=String(d);1===d.length&&(d="0"+d);return d}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,d=function(l){return"function"===typeof l||"[object Function]"===b.call(l)},k=Math.pow(2,53)-1;return function(l){var B=Object(l);if(null==l)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!d(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
-arguments[2])}var M=Number(B.length);M=isNaN(M)?0:0!==M&&isFinite(M)?(0<M?1:-1)*Math.floor(Math.abs(M)):M;M=Math.min(Math.max(M,0),k);for(var S=d(this)?Object(new this(M)):Array(M),H=0,K;H<M;)K=B[H],S[H]=p?"undefined"===typeof E?p(K,H):p.call(E,K,H):K,H+=1;S.length=M;return S}}());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";
+this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var l=0;l<b.length;l++)k=k.replace(new RegExp("&"+b[l][0]+";","g"),"&#"+b[l][1]+";");return e(k)}})();
+Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(l){return"function"===typeof l||"[object Function]"===b.call(l)},k=Math.pow(2,53)-1;return function(l){var C=Object(l);if(null==l)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
+arguments[2])}var M=Number(C.length);M=isNaN(M)?0:0!==M&&isFinite(M)?(0<M?1:-1)*Math.floor(Math.abs(M)):M;M=Math.min(Math.max(M,0),k);for(var S=e(this)?Object(new this(M)):Array(M),H=0,K;H<M;)K=C[H],S[H]=p?"undefined"===typeof E?p(K,H):p.call(E,K,H):K,H+=1;S.length=M;return S}}());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 b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(d){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
+(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
-mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,d,k){return null};
+mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,d,k,l,B,p){mxGraph.call(this,b,d,k,l);this.themes=B||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;d=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<d&&(d=b.indexOf("/",d+2),0<d&&(this.domainUrl=b.substring(0,d)),d=b.lastIndexOf("/"),0<d&&(this.domainPathUrl=b.substring(0,d+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
+Graph=function(b,e,k,l,C,p){mxGraph.call(this,b,e,k,l);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
return null!=L?"1"==L.html||"wrap"==L[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,M=null,S=null,H=null,K=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){L=V.getProperty("event");var R=L.getState();V=this.view.scale;if(!mxEvent.isAltDown(L.getEvent())&&null!=R)if(this.model.isEdge(R.cell))if(E=new mxPoint(L.getGraphX(),L.getGraphY()),K=this.isCellSelected(R.cell),S=R,M=L,null!=R.text&&null!=
R.text.boundingBox&&mxUtils.contains(R.text.boundingBox,L.getGraphX(),L.getGraphY()))H=mxEvent.LABEL_HANDLE;else{var Y=this.selectionCellsHandler.getHandler(R.cell);null!=Y&&null!=Y.bends&&0<Y.bends.length&&(H=Y.getHandleForEvent(L))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(L.getEvent())&&(Y=this.selectionCellsHandler.getHandler(R.cell),null==Y||null==Y.getHandleForEvent(L))){var Z=new mxRectangle(L.getGraphX()-1,L.getGraphY()-1),la=mxEvent.isTouchEvent(L.getEvent())?mxShape.prototype.svgStrokeTolerance-
1:(mxShape.prototype.svgStrokeTolerance+2)/2;Y=la+2;Z.grow(la);if(this.isTableCell(R.cell)&&!this.isCellSelected(R.cell)&&!(mxUtils.contains(R,L.getGraphX()-Y,L.getGraphY()-Y)&&mxUtils.contains(R,L.getGraphX()-Y,L.getGraphY()+Y)&&mxUtils.contains(R,L.getGraphX()+Y,L.getGraphY()+Y)&&mxUtils.contains(R,L.getGraphX()+Y,L.getGraphY()-Y))){var q=this.model.getParent(R.cell);Y=this.model.getParent(q);if(!this.isCellSelected(Y)){la*=V;var F=2*la;if(this.model.getChildAt(Y,0)!=q&&mxUtils.intersects(Z,new mxRectangle(R.x,
@@ -2298,9 +2302,9 @@ this.isOrthogonal(R)&&(V=mxUtils.findNearestSegment(R,V.getGraphX(),V.getGraphY(
(V=1!=L.style.html?mxUtils.htmlEntities(V,!1):L.view.graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;
this.connectionHandler.isValidSource=function(L,V){return!1};this.alternateEdgeStyle="vertical";null==l&&this.loadStylesheet();var Q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=Q.apply(this,arguments);if(this.graph.pageVisible){var V=[],R=this.graph.pageFormat,Y=this.graph.pageScale,Z=R.width*Y;R=R.height*Y;Y=this.graph.view.translate;for(var la=this.graph.view.scale,q=this.graph.getPageLayout(),F=0;F<q.width;F++)V.push(new mxRectangle(((q.x+F)*Z+Y.x)*la,(q.y*
R+Y.y)*la,Z*la,R*la));for(F=1;F<q.height;F++)V.push(new mxRectangle((q.x*Z+Y.x)*la,((q.y+F)*R+Y.y)*la,Z*la,R*la));L=V.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,V){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
-arguments)};var e=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var V=e.apply(this,arguments),R=new mxDictionary,Y=[],Z=0;Z<V.length;Z++){var la=this.graph.isTableCell(L)&&this.graph.isTableCell(V[Z])&&this.graph.isCellSelected(V[Z])?this.graph.model.getParent(V[Z]):this.graph.isTableRow(L)&&this.graph.isTableRow(V[Z])&&this.graph.isCellSelected(V[Z])?V[Z]:this.graph.getCompositeParent(V[Z]);null==la||R.get(la)||(R.put(la,!0),Y.push(la))}return Y};var f=this.graphHandler.start;
+arguments)};var d=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var V=d.apply(this,arguments),R=new mxDictionary,Y=[],Z=0;Z<V.length;Z++){var la=this.graph.isTableCell(L)&&this.graph.isTableCell(V[Z])&&this.graph.isCellSelected(V[Z])?this.graph.model.getParent(V[Z]):this.graph.isTableRow(L)&&this.graph.isTableRow(V[Z])&&this.graph.isCellSelected(V[Z])?V[Z]:this.graph.getCompositeParent(V[Z]);null==la||R.get(la)||(R.put(la,!0),Y.push(la))}return Y};var f=this.graphHandler.start;
this.graphHandler.start=function(L,V,R,Y){var Z=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?Z=!0:L=this.graph.model.getParent(L));Z||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));f.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this);this.getRubberband=function(){return g};
-var v=(new Date).getTime(),y=0,C=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;C.apply(this,arguments);L!=this.currentState?(v=(new Date).getTime(),y=0):y=(new Date).getTime()-v};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<y||(null==this.currentState||
+var v=(new Date).getTime(),x=0,B=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;B.apply(this,arguments);L!=this.currentState?(v=(new Date).getTime(),x=0):x=(new Date).getTime()-v};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<x||(null==this.currentState||
"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&I.apply(this,arguments)};var D=this.isToggleEvent;this.isToggleEvent=function(L){return D.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var N=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(L){return N.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.getEvent())};
var G=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(G=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=G)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var ia=this.click;this.click=function(L){var V=null==L.state&&null!=
L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!V||L.isConsumed())return ia.apply(this,arguments);var R=V?L.sourceState.cell:L.getCell();null!=R&&(R=this.getClickableLinkForCell(R),null!=R&&(this.isCustomLink(R)?this.customLinkClicked(R):this.openLink(R)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var ka=this.tooltipHandler.show;this.tooltipHandler.show=function(){ka.apply(this,arguments);if(null!=
@@ -2313,29 +2317,29 @@ this.initTouch();var ra=this.updateMouseEvent;this.updateMouseEvent=function(L){
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(b){var d=new Graph(document.createElement("div"));d.stylesheet.styles=mxUtils.clone(b.styles);d.resetViewOnRootChange=!1;d.setConnectable(!1);d.gridEnabled=!1;d.autoScroll=!1;d.setTooltips(!1);d.setEnabled(!1);d.container.style.visibility="hidden";d.container.style.position="absolute";d.container.style.overflow="hidden";d.container.style.height="1px";d.container.style.width="1px";return d};
-Graph.createSvgImage=function(b,d,k,l,B){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+d+'px" '+(null!=l&&null!=B?'viewBox="0 0 '+l+" "+B+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,d)};
-Graph.createSvgNode=function(b,d,k,l,B){var p=mxUtils.createXmlDocument(),E=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=B&&(null!=E.style?E.style.backgroundColor=B:E.setAttribute("style","background-color:"+B));null==p.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
-E.setAttribute("width",k+"px");E.setAttribute("height",l+"px");E.setAttribute("viewBox",b+" "+d+" "+k+" "+l);p.appendChild(E);return E};Graph.htmlToPng=function(b,d,k,l){var B=document.createElement("canvas");B.width=d;B.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){B.getContext("2d").drawImage(p,0,0);l(B.toDataURL())});p.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(b){for(var d=0,k=[],l=0;l<b.length;l++){var B=b.charCodeAt(l);(32<=B||9==B||10==B||13==B)&&65535!=B&&65534!=B||(k.push(b.substring(d,l)),d=l+1)}0<d&&d<b.length&&k.push(b.substring(d));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var d=Array(b.length),k=0;k<b.length;k++)d[k]=b.charCodeAt(k);return d};Graph.bytesToString=function(b){for(var d=Array(b.length),k=0;k<b.length;k++)d[k]=String.fromCharCode(b[k]);return d.join("")};
-Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(d,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(d){return"%"+("00"+d.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,d){b=mxUtils.getXml(b);return Graph.compress(d?b:Graph.zapGremlins(b))};
-Graph.arrayBufferToString=function(b){var d="";b=new Uint8Array(b);for(var k=b.byteLength,l=0;l<k;l++)d+=String.fromCharCode(b[l]);return d};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(d){return d.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(b,d,k){var l=d.charCodeAt(0),B=1,p=-1;for(k=k||0;k<b.byteLength;k++)if(b[k]==l){p=k;break}for(k=p+1;-1<p&&k<b.byteLength&&k<p+d.length-1;k++){if(b[k]!=d.charCodeAt(B))return Graph.arrayBufferIndexOfString(b,d,p+1);B++}return B==d.length-1?p:-1};Graph.compress=function(b,d){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=d?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
-Graph.decompress=function(b,d,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));d=decodeURIComponent(d?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?d:Graph.zapGremlins(d)};
-Graph.fadeNodes=function(b,d,k,l,B){B=null!=B?B:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,d);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+B+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=l&&l()},B)},0)};Graph.removeKeys=function(b,d){for(var k in b)d(k)&&delete b[k]};
-Graph.setTransitionForNodes=function(b,d){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",d)};Graph.setOpacityForNodes=function(b,d){for(var k=0;k<b.length;k++)b[k].style.opacity=d};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
-Graph.sanitizeHtml=function(b,d){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var d=document.createElement("a");d.setAttribute("href",b);Graph.sanitizeNode(d);return d.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};
-DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(b,d){"svg"==b.nodeName&&"content"==d.attrName&&(d.forceKeepAttr=!0);return b});Graph.domPurify=function(b,d){window.DOM_PURIFY_CONFIG.IN_PLACE=d;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(b,d){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),B=l.indexOf("<svg");if(0<=B){k.innerHTML=Graph.sanitizeHtml(l.substring(B));var p=k.getElementsByTagName("svg");if(0<p.length){if(d||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{l=d=
-1;var E=p[0].getAttribute("width"),M=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;M=null!=M&&"%"!=M.charAt(M.length-1)?parseFloat(M):NaN;var S=p[0].getAttribute("viewBox");if(null!=S&&!isNaN(E)&&!isNaN(M)){var H=S.split(" ");4<=S.length&&(d=parseFloat(H[2])/E,l=parseFloat(H[3])/M)}var K=p[0].getBBox();0<K.width&&0<K.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",K.x+" "+K.y+" "+K.width+" "+K.height),k.getElementsByTagName("svg")[0].setAttribute("width",
-K.width/d),k.getElementsByTagName("svg")[0].setAttribute("height",K.height/l))}catch(Q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(Q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
-Graph.createRemoveIcon=function(b,d){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",d);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
+Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};
+Graph.createSvgImage=function(b,e,k,l,C){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=l&&null!=C?'viewBox="0 0 '+l+" "+C+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)};
+Graph.createSvgNode=function(b,e,k,l,C){var p=mxUtils.createXmlDocument(),E=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=C&&(null!=E.style?E.style.backgroundColor=C:E.setAttribute("style","background-color:"+C));null==p.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
+E.setAttribute("width",k+"px");E.setAttribute("height",l+"px");E.setAttribute("viewBox",b+" "+e+" "+k+" "+l);p.appendChild(E);return E};Graph.htmlToPng=function(b,e,k,l){var C=document.createElement("canvas");C.width=e;C.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){C.getContext("2d").drawImage(p,0,0);l(C.toDataURL())});p.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(b){for(var e=0,k=[],l=0;l<b.length;l++){var C=b.charCodeAt(l);(32<=C||9==C||10==C||13==C)&&65535!=C&&65534!=C||(k.push(b.substring(e,l)),e=l+1)}0<e&&e<b.length&&k.push(b.substring(e));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=b.charCodeAt(k);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=String.fromCharCode(b[k]);return e.join("")};
+Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};
+Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var k=b.byteLength,l=0;l<k;l++)e+=String.fromCharCode(b[l]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(b,e,k){var l=e.charCodeAt(0),C=1,p=-1;for(k=k||0;k<b.byteLength;k++)if(b[k]==l){p=k;break}for(k=p+1;-1<p&&k<b.byteLength&&k<p+e.length-1;k++){if(b[k]!=e.charCodeAt(C))return Graph.arrayBufferIndexOfString(b,e,p+1);C++}return C==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
+Graph.decompress=function(b,e,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?e:Graph.zapGremlins(e)};
+Graph.fadeNodes=function(b,e,k,l,C){C=null!=C?C:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+C+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=l&&l()},C)},0)};Graph.removeKeys=function(b,e){for(var k in b)e(k)&&delete b[k]};
+Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var k=0;k<b.length;k++)b[k].style.opacity=e};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
+Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};
+DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(b,e){"svg"==b.nodeName&&"content"==e.attrName&&(e.forceKeepAttr=!0);return b});Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
+Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),C=l.indexOf("<svg");if(0<=C){k.innerHTML=Graph.sanitizeHtml(l.substring(C));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{l=e=
+1;var E=p[0].getAttribute("width"),M=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;M=null!=M&&"%"!=M.charAt(M.length-1)?parseFloat(M):NaN;var S=p[0].getAttribute("viewBox");if(null!=S&&!isNaN(E)&&!isNaN(M)){var H=S.split(" ");4<=S.length&&(e=parseFloat(H[2])/E,l=parseFloat(H[3])/M)}var K=p[0].getBBox();0<K.width&&0<K.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",K.x+" "+K.y+" "+K.width+" "+K.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+K.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",K.height/l))}catch(Q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(Q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
+Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=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.simpleBackgroundColor="#f0f0f0";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(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,l){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var B=k.view.graph.tolerance,p=!0,E=null,M=mxUtils.bind(this,function(K){p=!0;E=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K))}),S=mxUtils.bind(this,function(K){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(K))<B&&Math.abs(E.y-mxEvent.getClientY(K))<B}),H=mxUtils.bind(this,function(K){if(p)for(var Q=mxEvent.getSource(K);null!=
-Q&&Q!=l.node;){if("a"==Q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,Q,K);break}Q=Q.parentNode}});mxEvent.addGestureListeners(l.node,M,S,H);mxEvent.addListener(l.node,"click",function(K){mxEvent.consume(K)})};if(null!=this.tooltipHandler){var d=this.tooltipHandler.init;this.tooltipHandler.init=function(){d.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var l=mxEvent.getSource(k);"A"==l.nodeName&&(l=l.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,l){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,E=null,M=mxUtils.bind(this,function(K){p=!0;E=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K))}),S=mxUtils.bind(this,function(K){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(K))<C&&Math.abs(E.y-mxEvent.getClientY(K))<C}),H=mxUtils.bind(this,function(K){if(p)for(var Q=mxEvent.getSource(K);null!=
+Q&&Q!=l.node;){if("a"==Q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,Q,K);break}Q=Q.parentNode}});mxEvent.addGestureListeners(l.node,M,S,H);mxEvent.addListener(l.node,"click",function(K){mxEvent.consume(K)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var l=mxEvent.getSource(k);"A"==l.nodeName&&(l=l.getAttribute("href"),null!=
l&&this.graph.isCustomLink(l)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(l)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,l){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||
@@ -2345,86 +2349,86 @@ function(E){for(var M={},S=0;S<E.length;S++){var H=this.view.getState(E[S]);this
0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),M=this.getCellStyle(E),M=parseInt(mxUtils.getValue(M,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==M)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(M=0;M<this.model.getChildCount(E);M++){var S=this.model.getChildAt(E,M);if(this.isCellEditable(S)){E=S;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,M,S){S=null!=S?S:Graph.pasteStyles;
Graph.removeKeys(E,function(H){return 0>mxUtils.indexOf(S,H)});this.updateCellStyles(E,M)};Graph.prototype.updateCellStyles=function(E,M){this.model.beginUpdate();try{for(var S=0;S<M.length;S++)if(this.model.isVertex(M[S])||this.model.isEdge(M[S])){var H=this.getCellStyle(M[S],!1),K;for(K in E){var Q=E[K];H[K]!=Q&&this.setCellStyles(K,Q,[M[S]])}}}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(E,M,S,H,K,Q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,M=M/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,M,S,H,K,Q){H=null!=H?H:!0;K=null!=K?K:!0;
-null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var e=this.model.getChildCount(S)-1;0<=e;e--){var f=this.model.getChildAt(S,e),g=this.getScaledCellAt(E,M,f,H,K,Q);if(null!=g)return g;if(this.isCellVisible(f)&&(K&&this.model.isEdge(f)||H&&this.model.isVertex(f))&&(g=this.view.getState(f),null!=g&&(null==Q||!Q(g,E,M))&&this.intersects(g,E,M)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
+null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var d=this.model.getChildCount(S)-1;0<=d;d--){var f=this.model.getChildAt(S,d),g=this.getScaledCellAt(E,M,f,H,K,Q);if(null!=g)return g;if(this.isCellVisible(f)&&(K&&this.model.isEdge(f)||H&&this.model.isVertex(f))&&(g=this.view.getState(f),null!=g&&(null==Q||!Q(g,E,M))&&this.intersects(g,E,M)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var M=this.getCellGeometry(E);null!=M&&M.relative;)E=this.getModel().getParent(E),M=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var M=
new mxDictionary,S=[],H=0;H<E.length;H++){var K=this.getCompositeParent(E[H]);this.isTableCell(K)&&(K=this.graph.model.getParent(K));this.isTableRow(K)&&(K=this.graph.model.getParent(K));null==K||M.get(K)||(M.put(K,!0),S.push(K))}return S};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var M=this.model.getParent(E);if(!this.model.isVertex(M))break;E=M}return E};Graph.prototype.filterSelectionCells=function(E){var M=this.getSelectionCells();if(null!=E){for(var S=[],H=0;H<M.length;H++)E(M[H])||
S.push(M[H]);M=S}return M};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var M=this.currentScale,S=this.currentTranslate;E=new mxRectangle((E.x+2*S.x)*M-S.x,(E.y+2*S.y)*M-S.y,E.width*M,E.height*M)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;
-if(this.graph.useCssTransforms){var M=this.graph.currentTranslate,S=this.graph.currentScale;E=new mxRectangle((E.x+M.x)*S,(E.y+M.y)*S,E.width*S,E.height*S)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var d=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){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);d.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 k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var M=[],S=0;S<E.length;S++)this.isTableRow(E[S])||this.isTableCell(E[S])||M.push(E[S]);return M};var l=
+if(this.graph.useCssTransforms){var M=this.graph.currentTranslate,S=this.graph.currentScale;E=new mxRectangle((E.x+M.x)*S,(E.y+M.y)*S,E.width*S,E.height*S)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){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);e.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 k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var M=[],S=0;S<E.length;S++)this.isTableRow(E[S])||this.isTableCell(E[S])||M.push(E[S]);return M};var l=
mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=l.apply(this,arguments);for(var M=[],S=0;S<E.length;S++)this.isTable(E[S])||this.isTableRow(E[S])||this.isTableCell(E[S])||M.push(E[S]);return M};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var M=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;E.setAttribute("transform",
-"scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");M!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var B=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,M=this.scale,S=this.translate;
-E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);B.apply(this,arguments);E&&(this.scale=M,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.useCssTransforms,K=this.view.scale,Q=this.view.translate;H&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);H&&(this.view.scale=K,this.view.translate=Q,this.useCssTransforms=!0)}})();
-Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,d,k){var l=d.getAttribute("href");l!=Graph.sanitizeLink(l)&&Graph.sanitizeNode(d);if(null!=l&&!this.isCustomLink(l)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(l)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(l),b);mxEvent.consume(k)}};
-Graph.prototype.openLink=function(b,d,k){var l=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==d&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top){var B=b.split("#")[1];window.location.hash=="#"+B&&(window.location.hash="");window.location.hash=B}else l=window.open(b,null!=d?d:"_blank"),null==l||k||(l.opener=null)}catch(p){}return l};
+"scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");M!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,M=this.scale,S=this.translate;
+E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);E&&(this.scale=M,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.useCssTransforms,K=this.view.scale,Q=this.view.translate;H&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);H&&(this.view.scale=K,this.view.translate=Q,this.useCssTransforms=!0)}})();
+Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){var l=e.getAttribute("href");l!=Graph.sanitizeLink(l)&&Graph.sanitizeNode(e);if(null!=l&&!this.isCustomLink(l)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(l)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(l),b);mxEvent.consume(k)}};
+Graph.prototype.openLink=function(b,e,k){var l=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var C=b.split("#")[1];window.location.hash=="#"+C&&(window.location.hash="");window.location.hash=C}else l=window.open(b,null!=e?e:"_blank"),null==l||k||(l.opener=null)}catch(p){}return l};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,d){var k=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(d!=mxEvent.BEGIN_UPDATE||this.hasLayout(k,d))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return d=new mxStackLayout(this.graph,!0),d.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
-"1"),d.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),d.spacing=b.stackSpacing||d.spacing,d.border=b.stackBorder||d.border,d.marginLeft=b.marginLeft||0,d.marginRight=b.marginRight||0,d.marginTop=b.marginTop||0,d.marginBottom=b.marginBottom||0,d.allowGaps=b.allowGaps||0,d.fill=!0,d.allowGaps&&(d.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),d;if("treeLayout"==
-b.childLayout)return d=new mxCompactTreeLayout(this.graph),d.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.groupPadding=mxUtils.getValue(b,"parentPadding",20),d.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),d.maintainParentLocation=!0,d.edgeRouting=!1,d.resetEdges=!1,d;if("flowLayout"==b.childLayout)return d=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),d.resizeParent=
-"1"==mxUtils.getValue(b,"resizeParent","1"),d.parentBorder=mxUtils.getValue(b,"parentPadding",20),d.maintainParentLocation=!0,d.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),d.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),d.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),d.parallelEdgeSpacing=mxUtils.getValue(b,
-"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),d;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(l){null!=window.console&&console.error(l)}}return null}};
-Graph.prototype.createLayouts=function(b){for(var d=[],k=0;k<b.length;k++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[k].layout)){var l=new window[b[k].layout](this);if(null!=b[k].config)for(var B in b[k].config)l[B]=b[k].config[B];d.push(l)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[k].layout]));return d};
-Graph.prototype.getDataForCells=function(b){for(var d=[],k=0;k<b.length;k++){var l=null!=b[k].value?b[k].value.attributes:null,B={};B.id=b[k].id;if(null!=l)for(var p=0;p<l.length;p++)B[l[p].nodeName]=l[p].nodeValue;else B.label=this.convertValueToString(b[k]);d.push(B)}return d};
-Graph.prototype.getNodesForCells=function(b){for(var d=[],k=0;k<b.length;k++){var l=this.view.getState(b[k]);if(null!=l){for(var B=this.cellRenderer.getShapesForState(l),p=0;p<B.length;p++)null!=B[p]&&null!=B[p].node&&d.push(B[p].node);null!=l.control&&null!=l.control.node&&d.push(l.control.node)}}return d};
-Graph.prototype.createWipeAnimations=function(b,d){for(var k=[],l=0;l<b.length;l++){var B=this.view.getState(b[l]);null!=B&&null!=B.shape&&(this.model.isEdge(B.cell)&&null!=B.absolutePoints&&1<B.absolutePoints.length?k.push(this.createEdgeWipeAnimation(B,d)):this.model.isVertex(B.cell)&&null!=B.shape.bounds&&k.push(this.createVertexWipeAnimation(B,d)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,d){var k=b.absolutePoints.slice(),l=b.segments,B=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,M){if(null!=b.shape){var S=[k[0]];M=E/M;d||(M=1-M);for(var H=B*M,K=1;K<p;K++)if(H<=l[K-1]){S.push(new mxPoint(k[K-1].x+(k[K].x-k[K-1].x)*H/l[K-1],k[K-1].y+(k[K].y-k[K-1].y)*H/l[K-1]));break}else H-=l[K-1],S.push(k[K]);b.shape.points=S;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=M)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),d?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,d){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(l,B){null!=b.shape&&(B=l/B,d||(B=1-B),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*B,k.height),b.shape.redraw(),0==l&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=B))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),d?1:0))})}};Graph.prototype.executeAnimations=function(b,d,k,l){k=null!=k?k:30;l=null!=l?l:30;var B=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(B);for(var M=0;M<b.length;M++)b[M].stop();null!=d&&d()}else for(M=0;M<b.length;M++)b[M].execute(p,k);p++});B=window.setInterval(E,l);E()};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,e){var k=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(e!=mxEvent.BEGIN_UPDATE||this.hasLayout(k,e))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return e=new mxStackLayout(this.graph,!0),e.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
+"1"),e.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),e.spacing=b.stackSpacing||e.spacing,e.border=b.stackBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.allowGaps=b.allowGaps||0,e.fill=!0,e.allowGaps&&(e.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),e;if("treeLayout"==
+b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.groupPadding=mxUtils.getValue(b,"parentPadding",20),e.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==b.childLayout)return e=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent=
+"1"==mxUtils.getValue(b,"resizeParent","1"),e.parentBorder=mxUtils.getValue(b,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(b,
+"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(l){null!=window.console&&console.error(l)}}return null}};
+Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[k].layout)){var l=new window[b[k].layout](this);if(null!=b[k].config)for(var C in b[k].config)l[C]=b[k].config[C];e.push(l)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[k].layout]));return e};
+Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var l=null!=b[k].value?b[k].value.attributes:null,C={};C.id=b[k].id;if(null!=l)for(var p=0;p<l.length;p++)C[l[p].nodeName]=l[p].nodeValue;else C.label=this.convertValueToString(b[k]);e.push(C)}return e};
+Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var l=this.view.getState(b[k]);if(null!=l){for(var C=this.cellRenderer.getShapesForState(l),p=0;p<C.length;p++)null!=C[p]&&null!=C[p].node&&e.push(C[p].node);null!=l.control&&null!=l.control.node&&e.push(l.control.node)}}return e};
+Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],l=0;l<b.length;l++){var C=this.view.getState(b[l]);null!=C&&null!=C.shape&&(this.model.isEdge(C.cell)&&null!=C.absolutePoints&&1<C.absolutePoints.length?k.push(this.createEdgeWipeAnimation(C,e)):this.model.isVertex(C.cell)&&null!=C.shape.bounds&&k.push(this.createVertexWipeAnimation(C,e)))}return k};
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),l=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,M){if(null!=b.shape){var S=[k[0]];M=E/M;e||(M=1-M);for(var H=C*M,K=1;K<p;K++)if(H<=l[K-1]){S.push(new mxPoint(k[K-1].x+(k[K].x-k[K-1].x)*H/l[K-1],k[K-1].y+(k[K].y-k[K-1].y)*H/l[K-1]));break}else H-=l[K-1],S.push(k[K]);b.shape.points=S;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=M)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
+Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(l,C){null!=b.shape&&(C=l/C,e||(C=1-C),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*C,k.height),b.shape.redraw(),0==l&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=C))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,l){k=null!=k?k:30;l=null!=l?l:30;var C=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var M=0;M<b.length;M++)b[M].stop();null!=e&&e()}else for(M=0;M<b.length;M++)b[M].execute(p,k);p++});C=window.setInterval(E,l);E()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),d=this.getGraphBounds();if(0==d.width||0==d.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(d.x/this.view.scale-this.view.translate.x)/b.width),l=Math.floor(Math.ceil(d.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,l,Math.ceil((Math.floor((d.x+d.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((d.y+d.height)/this.view.scale)-this.view.translate.y)/b.height)-
-l)};Graph.prototype.sanitizeHtml=function(b,d){return Graph.sanitizeHtml(b,d)};Graph.prototype.updatePlaceholders=function(){var b=!1,d;for(d in this.model.cells){var k=this.model.cells[d];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),l=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,l,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
+l)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(b){return Graph.zoomWheel&&!mxEvent.isShiftDown(b)&&!mxEvent.isMetaDown(b)&&!mxEvent.isAltDown(b)&&(!mxEvent.isControlDown(b)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(b)||mxEvent.isControlDown(b))};Graph.prototype.isScrollWheelEvent=function(b){return!this.isZoomWheelEvent(b)};Graph.prototype.isTransparentClickEvent=function(b){return mxEvent.isAltDown(b)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};
-Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var d=!1;null!=b&&(b=this.getCurrentCellStyle(b),d="1"==mxUtils.getValue(b,"ignoreEdge","0"));return d};Graph.prototype.isSplitTarget=function(b,d,k){return!this.model.isEdge(d[0])&&!mxEvent.isAltDown(k)&&!mxEvent.isShiftDown(k)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
-Graph.prototype.getLabel=function(b){var d=mxGraph.prototype.getLabel.apply(this,arguments);null!=d&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(d=this.replacePlaceholders(b,d));return d};Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(d,"labelMovable","0")))};
-Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var d=this.getLinkForCell(b);if(null!=d)return d;b=this.model.getParent(b)}while(null!=b);return null};
-Graph.prototype.getGlobalVariable=function(b){var d=null;"date"==b?d=(new Date).toLocaleDateString():"time"==b?d=(new Date).toLocaleTimeString():"timestamp"==b?d=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),d=this.formatDate(new Date,b));return d};
-Graph.prototype.formatDate=function(b,d,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var l=this.dateFormatCache,B=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(C,I){C=String(C);for(I=I||2;C.length<I;)C="0"+C;return C};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(d=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");d=String(l.masks[d]||d||l.masks["default"]);"UTC:"==d.slice(0,4)&&(d=d.slice(4),k=!0);var M=k?"getUTC":"get",S=b[M+"Date"](),H=b[M+"Day"](),K=b[M+"Month"](),Q=b[M+"FullYear"](),e=b[M+"Hours"](),f=b[M+"Minutes"](),g=b[M+"Seconds"]();M=b[M+"Milliseconds"]();var v=k?0:b.getTimezoneOffset(),y={d:S,dd:E(S),ddd:l.i18n.dayNames[H],dddd:l.i18n.dayNames[H+7],m:K+1,mm:E(K+1),mmm:l.i18n.monthNames[K],mmmm:l.i18n.monthNames[K+
-12],yy:String(Q).slice(2),yyyy:Q,h:e%12||12,hh:E(e%12||12),H:e,HH:E(e),M:f,MM:E(f),s:g,ss:E(g),l:E(M,3),L:E(99<M?Math.round(M/10):M),t:12>e?"a":"p",tt:12>e?"am":"pm",T:12>e?"A":"P",TT:12>e?"AM":"PM",Z:k?"UTC":(String(b).match(B)||[""]).pop().replace(p,""),o:(0<v?"-":"+")+E(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return d.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in y?y[C]:C.slice(1,
-C.length-1)})};Graph.prototype.getLayerForCells=function(b){var d=null;if(0<b.length){for(d=b[0];!this.model.isLayer(d);)d=this.model.getParent(d);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(d,b[k])){d=null;break}}return d};
-Graph.prototype.createLayersDialog=function(b,d){var k=document.createElement("div");k.style.position="absolute";for(var l=this.getModel(),B=l.getChildCount(l.root),p=0;p<B;p++)mxUtils.bind(this,function(E){function M(){l.isVisible(E)?(K.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(H,75)):(K.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(H,25))}var S=this.convertValueToString(E)||mxResources.get("background")||"Background",H=document.createElement("div");H.style.overflow=
-"hidden";H.style.textOverflow="ellipsis";H.style.padding="2px";H.style.whiteSpace="nowrap";H.style.cursor="pointer";H.setAttribute("title",mxResources.get(l.isVisible(E)?"hideIt":"show",[S]));var K=document.createElement("img");K.setAttribute("draggable","false");K.setAttribute("align","absmiddle");K.setAttribute("border","0");K.style.position="relative";K.style.width="16px";K.style.padding="0px 6px 0 4px";d&&(K.style.filter="invert(100%)",K.style.top="-2px");H.appendChild(K);mxUtils.write(H,S);k.appendChild(H);
+Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var e=!1;null!=b&&(b=this.getCurrentCellStyle(b),e="1"==mxUtils.getValue(b,"ignoreEdge","0"));return e};Graph.prototype.isSplitTarget=function(b,e,k){return!this.model.isEdge(e[0])&&!mxEvent.isAltDown(k)&&!mxEvent.isShiftDown(k)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
+Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this,arguments);null!=e&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(e=this.replacePlaceholders(b,e));return e};Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(e,"labelMovable","0")))};
+Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
+Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
+Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var l=this.dateFormatCache,C=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(B,I){B=String(B);for(I=I||2;B.length<I;)B="0"+B;return B};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(l.masks[e]||e||l.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var M=k?"getUTC":"get",S=b[M+"Date"](),H=b[M+"Day"](),K=b[M+"Month"](),Q=b[M+"FullYear"](),d=b[M+"Hours"](),f=b[M+"Minutes"](),g=b[M+"Seconds"]();M=b[M+"Milliseconds"]();var v=k?0:b.getTimezoneOffset(),x={d:S,dd:E(S),ddd:l.i18n.dayNames[H],dddd:l.i18n.dayNames[H+7],m:K+1,mm:E(K+1),mmm:l.i18n.monthNames[K],mmmm:l.i18n.monthNames[K+
+12],yy:String(Q).slice(2),yyyy:Q,h:d%12||12,hh:E(d%12||12),H:d,HH:E(d),M:f,MM:E(f),s:g,ss:E(g),l:E(M,3),L:E(99<M?Math.round(M/10):M),t:12>d?"a":"p",tt:12>d?"am":"pm",T:12>d?"A":"P",TT:12>d?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).pop().replace(p,""),o:(0<v?"-":"+")+E(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(B){return B in x?x[B]:B.slice(1,
+B.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var l=this.getModel(),C=l.getChildCount(l.root),p=0;p<C;p++)mxUtils.bind(this,function(E){function M(){l.isVisible(E)?(K.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(H,75)):(K.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(H,25))}var S=this.convertValueToString(E)||mxResources.get("background")||"Background",H=document.createElement("div");H.style.overflow=
+"hidden";H.style.textOverflow="ellipsis";H.style.padding="2px";H.style.whiteSpace="nowrap";H.style.cursor="pointer";H.setAttribute("title",mxResources.get(l.isVisible(E)?"hideIt":"show",[S]));var K=document.createElement("img");K.setAttribute("draggable","false");K.setAttribute("align","absmiddle");K.setAttribute("border","0");K.style.position="relative";K.style.width="16px";K.style.padding="0px 6px 0 4px";e&&(K.style.filter="invert(100%)",K.style.top="-2px");H.appendChild(K);mxUtils.write(H,S);k.appendChild(H);
mxEvent.addListener(H,"click",function(){l.setVisible(E,!l.isVisible(E));M();null!=b&&b(E)});M()})(l.getChildAt(l.root,p));return k};
-Graph.prototype.replacePlaceholders=function(b,d,k,l){l=[];if(null!=d){for(var B=0;match=this.placeholderPattern.exec(d);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>B&&"%"==d.charAt(match.index-1))E=p.substring(1);else{var M=p.substring(1,p.length-1);if("id"==M)E=b.id;else if(0>M.indexOf("{"))for(var S=b;null==E&&null!=S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=S.getAttribute(M+"_"+Graph.diagramLanguage)),
-null==E&&(E=S.hasAttribute(M)?null!=S.getAttribute(M)?S.getAttribute(M):"":null)),S=this.model.getParent(S);null==E&&(E=this.getGlobalVariable(M));null==E&&null!=k&&(E=k[M])}l.push(d.substring(B,match.index)+(null!=E?E:p));B=match.index+p.length}}l.push(d.substring(B))}return l.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var d=[],k=0;k<b.length;k++){var l=this.model.getCell(b[k].id);null!=l&&d.push(l)}this.setSelectionCells(d)}else this.clearSelection()};
-Graph.prototype.selectCellForEvent=function(b,d){mxEvent.isShiftDown(d)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,d){var k=!1;if(this.isTableCell(b)&&this.isTableCell(d)){var l=this.model.getParent(b),B=this.model.getParent(l),p=this.model.getParent(d);if(B==this.model.getParent(p)){b=l.getIndex(b);l=B.getIndex(l);var E=p.getIndex(d),M=B.getIndex(p);p=Math.max(l,M);d=Math.min(b,E);b=Math.max(b,E);E=[];for(l=Math.min(l,M);l<=p;l++){M=this.model.getChildAt(B,l);for(var S=d;S<=b;S++)E.push(this.model.getChildAt(M,S))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
+Graph.prototype.replacePlaceholders=function(b,e,k,l){l=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>C&&"%"==e.charAt(match.index-1))E=p.substring(1);else{var M=p.substring(1,p.length-1);if("id"==M)E=b.id;else if(0>M.indexOf("{"))for(var S=b;null==E&&null!=S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=S.getAttribute(M+"_"+Graph.diagramLanguage)),
+null==E&&(E=S.hasAttribute(M)?null!=S.getAttribute(M)?S.getAttribute(M):"":null)),S=this.model.getParent(S);null==E&&(E=this.getGlobalVariable(M));null==E&&null!=k&&(E=k[M])}l.push(e.substring(C,match.index)+(null!=E?E:p));C=match.index+p.length}}l.push(e.substring(C))}return l.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var l=this.model.getCell(b[k].id);null!=l&&e.push(l)}this.setSelectionCells(e)}else this.clearSelection()};
+Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
+Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var l=this.model.getParent(b),C=this.model.getParent(l),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=l.getIndex(b);l=C.getIndex(l);var E=p.getIndex(e),M=C.getIndex(p);p=Math.max(l,M);e=Math.min(b,E);b=Math.max(b,E);E=[];for(l=Math.min(l,M);l<=p;l++){M=this.model.getChildAt(C,l);for(var S=e;S<=b;S++)E.push(this.model.getChildAt(M,S))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),k=!0)}}return k};
-Graph.prototype.snapCellsToGrid=function(b,d){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var l=b[k],B=this.getCellGeometry(l);if(null!=B){B=B.clone();if(this.getModel().isVertex(l))B.x=Math.round(B.x/d)*d,B.y=Math.round(B.y/d)*d,B.width=Math.round(B.width/d)*d,B.height=Math.round(B.height/d)*d;else if(this.getModel().isEdge(l)&&null!=B.points)for(var p=0;p<B.points.length;p++)B.points[p].x=Math.round(B.points[p].x/d)*d,B.points[p].y=Math.round(B.points[p].y/d)*d;this.getModel().setGeometry(l,
-B)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,d,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(d)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
-Graph.prototype.isCloneConnectSource=function(b){var d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=d&&d.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,d,k,l,B,p,E,M){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),H=S?b:this.getCompositeParent(b),K=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(H.geometry.x,H.geometry.y);d==mxConstants.DIRECTION_NORTH?(K.x+=H.geometry.width/2,K.y-=k):d==
-mxConstants.DIRECTION_SOUTH?(K.x+=H.geometry.width/2,K.y+=H.geometry.height+k):(K.x=d==mxConstants.DIRECTION_WEST?K.x-k:K.x+(H.geometry.width+k),K.y+=H.geometry.height/2);var Q=this.view.getState(this.model.getParent(b));k=this.view.scale;var e=this.view.translate;H=e.x*k;e=e.y*k;null!=Q&&this.model.isVertex(Q.cell)&&(H=Q.x,e=Q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(K.x+=b.parent.geometry.x,K.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(H+K.x*k,e+K.y*k)).grow(40*k);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;Q=this.view.getState(b);var f=null,g=null;if(null!=p){p=p.reverse();for(var v=0;v<p.length;v++)if(!this.isCellLocked(p[v])&&!this.model.isEdge(p[v])&&p[v]!=b)if(!this.model.isAncestor(b,p[v])&&this.isContainer(p[v])&&(null==f||p[v]==this.model.getParent(b)))f=p[v];else if(null==g&&this.isCellConnectable(p[v])&&!this.model.isAncestor(p[v],b)&&!this.isSwimlane(p[v])){var y=this.view.getState(p[v]);null==Q||null==y||mxUtils.intersects(Q,y)||(g=p[v])}}var C=
-!mxEvent.isShiftDown(l)||mxEvent.isControlDown(l)||B;C&&("1"!=urlParams.sketch||B)&&(d==mxConstants.DIRECTION_NORTH?K.y-=b.geometry.height/2:d==mxConstants.DIRECTION_SOUTH?K.y+=b.geometry.height/2:K.x=d==mxConstants.DIRECTION_WEST?K.x-b.geometry.width/2:K.x+b.geometry.width/2);var I=[],D=g;g=f;B=mxUtils.bind(this,function(N){if(null==E||null!=N||null==g&&S){this.model.beginUpdate();try{if(null==D&&C){var G=this.getAbsoluteParent(null!=N?N:b);G=S?b:this.getCompositeParent(G);D=null!=N?N:this.duplicateCells([G],
-!1)[0];null!=N&&this.addCells([D],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(D);null!=ia&&(null!=N&&"1"==urlParams.sketch&&(d==mxConstants.DIRECTION_NORTH?K.y-=ia.height/2:d==mxConstants.DIRECTION_SOUTH?K.y+=ia.height/2:K.x=d==mxConstants.DIRECTION_WEST?K.x-ia.width/2:K.x+ia.width/2),ia.x=K.x-ia.width/2,ia.y=K.y-ia.height/2);null!=f?(this.addCells([D],f,null,null,null,!0),g=null):C&&!S&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var ka=mxEvent.isControlDown(l)&&
-mxEvent.isShiftDown(l)&&C||null==g&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,D,this.createCurrentEdgeStyle());if(null!=ka&&this.connectionHandler.insertBeforeSource){var ja=null;for(N=b;null!=N.parent&&null!=N.geometry&&N.geometry.relative&&N.parent!=ka.parent;)N=this.model.getParent(N);null!=N&&null!=N.parent&&N.parent==ka.parent&&(ja=N.parent.getIndex(N),this.model.add(N.parent,ka,ja))}null==g&&null!=D&&null!=b.parent&&S&&d==mxConstants.DIRECTION_WEST&&(ja=b.parent.getIndex(b),this.model.add(b.parent,
-D,ja));null!=ka&&I.push(ka);null==g&&null!=D&&I.push(D);null==D&&null!=ka&&ka.geometry.setTerminalPoint(K,!1);null!=ka&&this.fireEvent(new mxEventObject("cellsInserted","cells",[ka]))}finally{this.model.endUpdate()}}if(null!=M)M(I);else return I});if(null==E||null!=D||!C||null==g&&S)return B(D);E(H+K.x*k,e+K.y*k,B)};
-Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var d=document.createElement("div"),k=[],l,B=0;B<b.length;B++)if(l=b[B],this.model.isVertex(l)||this.model.isEdge(l))this.isHtmlLabel(l)?(d.innerHTML=Graph.sanitizeHtml(this.getLabel(l)),l=mxUtils.extractTextWithWhitespace([d])):l=this.getLabel(l),l=mxUtils.trim(l.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<l.length&&k.push(l);return k.join(" ")};
-Graph.prototype.convertValueToString=function(b){var d=this.model.getValue(b);if(null!=d&&"object"==typeof d){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){d=b.getAttribute("placeholder");for(var l=b;null==k&&null!=l;)null!=l.value&&"object"==typeof l.value&&(k=l.hasAttribute(d)?null!=l.getAttribute(d)?l.getAttribute(d):"":null),l=this.model.getParent(l)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=d.getAttribute("label_"+Graph.diagramLanguage)),
-null==k&&(k=d.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
-Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,d){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
-Graph.prototype.updateHorizontalStyle=function(b,d){if(null!=b&&null!=d&&null!=this.layoutManager){var k=this.model.getParent(b);this.model.isVertex(k)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(k),null!=b&&b.constructor==mxStackLayout&&(d[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return d};
-Graph.prototype.replaceDefaultColors=function(b,d){if(null!=d){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(d,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(d,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BACKGROUND,
-b,k);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return d};Graph.prototype.replaceDefaultColor=function(b,d,k,l){null!=b&&"default"==b[d]&&null!=k&&(b[d]=this.getDefaultColor(b,d,k,l))};Graph.prototype.getDefaultColor=function(b,d,k,l){d="default"+d.charAt(0).toUpperCase()+d.substring(1);"invert"==b[d]&&(k=l);return k};
-Graph.prototype.updateAlternateBounds=function(b,d,k){if(null!=b&&null!=d&&null!=this.layoutManager&&null!=d.alternateBounds){var l=this.layoutManager.getLayout(this.model.getParent(b));null!=l&&l.constructor==mxStackLayout&&(l.horizontal?d.alternateBounds.height=0:d.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,d){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(d.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,d,k,l,B){d=null!=d?d:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),M=this.getCellGeometry(k[p]);if(null!=E&&null!=M){var S=Math.round(M.width-E.width/this.view.scale),H=Math.round(M.height-E.height/this.view.scale);if(0!=H||0!=S){var K=this.model.getParent(k[p]),Q=this.layoutManager.getLayout(K);
-null==Q?null!=B&&this.isMoveCellsEvent(B,E)&&this.moveSiblings(E,K,S,H):null!=B&&mxEvent.isAltDown(B)||Q.constructor!=mxStackLayout||Q.resizeLast||this.resizeParentStacks(K,Q,S,H)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
-Graph.prototype.moveSiblings=function(b,d,k,l){this.model.beginUpdate();try{var B=this.getCellsBeyond(b.x,b.y,d,!0,!0);for(d=0;d<B.length;d++)if(B[d]!=b.cell){var p=this.view.getState(B[d]),E=this.getCellGeometry(B[d]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(l*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(B[d],E))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,d,k,l){if(null!=this.layoutManager&&null!=d&&d.constructor==mxStackLayout&&!d.resizeLast){this.model.beginUpdate();try{for(var B=d.horizontal;null!=b&&null!=d&&d.constructor==mxStackLayout&&d.horizontal==B&&!d.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),d.horizontal?p.width+=k+Math.min(0,E.width/this.view.scale-p.width):p.height+=l+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b,
-p));b=this.model.getParent(b);d=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var d=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=d.container:"1"==d.container};Graph.prototype.isCellConnectable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.connectable?"0"!=d.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
-Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.movableLabel?"0"!=d.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,d,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(b,d,k){var l=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(l)&&(l=null);return l};Graph.prototype.isCellFoldable=function(b){var d=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(d,mxConstants.STYLE_RESIZABLE,"1")&&("1"==d.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=d.collapsible||!this.isContainer(b)&&"1"==d.collapsible))};
-Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,d){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
+Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var l=b[k],C=this.getCellGeometry(l);if(null!=C){C=C.clone();if(this.getModel().isVertex(l))C.x=Math.round(C.x/e)*e,C.y=Math.round(C.y/e)*e,C.width=Math.round(C.width/e)*e,C.height=Math.round(C.height/e)*e;else if(this.getModel().isEdge(l)&&null!=C.points)for(var p=0;p<C.points.length;p++)C.points[p].x=Math.round(C.points[p].x/e)*e,C.points[p].y=Math.round(C.points[p].y/e)*e;this.getModel().setGeometry(l,
+C)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
+Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
+Graph.prototype.connectVertex=function(b,e,k,l,C,p,E,M){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),H=S?b:this.getCompositeParent(b),K=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(H.geometry.x,H.geometry.y);e==mxConstants.DIRECTION_NORTH?(K.x+=H.geometry.width/2,K.y-=k):e==
+mxConstants.DIRECTION_SOUTH?(K.x+=H.geometry.width/2,K.y+=H.geometry.height+k):(K.x=e==mxConstants.DIRECTION_WEST?K.x-k:K.x+(H.geometry.width+k),K.y+=H.geometry.height/2);var Q=this.view.getState(this.model.getParent(b));k=this.view.scale;var d=this.view.translate;H=d.x*k;d=d.y*k;null!=Q&&this.model.isVertex(Q.cell)&&(H=Q.x,d=Q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(K.x+=b.parent.geometry.x,K.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(H+K.x*k,d+K.y*k)).grow(40*k);p=null!=p?
+this.getCells(0,0,0,0,null,null,p,null,!0):null;Q=this.view.getState(b);var f=null,g=null;if(null!=p){p=p.reverse();for(var v=0;v<p.length;v++)if(!this.isCellLocked(p[v])&&!this.model.isEdge(p[v])&&p[v]!=b)if(!this.model.isAncestor(b,p[v])&&this.isContainer(p[v])&&(null==f||p[v]==this.model.getParent(b)))f=p[v];else if(null==g&&this.isCellConnectable(p[v])&&!this.model.isAncestor(p[v],b)&&!this.isSwimlane(p[v])){var x=this.view.getState(p[v]);null==Q||null==x||mxUtils.intersects(Q,x)||(g=p[v])}}var B=
+!mxEvent.isShiftDown(l)||mxEvent.isControlDown(l)||C;B&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?K.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?K.y+=b.geometry.height/2:K.x=e==mxConstants.DIRECTION_WEST?K.x-b.geometry.width/2:K.x+b.geometry.width/2);var I=[],D=g;g=f;C=mxUtils.bind(this,function(N){if(null==E||null!=N||null==g&&S){this.model.beginUpdate();try{if(null==D&&B){var G=this.getAbsoluteParent(null!=N?N:b);G=S?b:this.getCompositeParent(G);D=null!=N?N:this.duplicateCells([G],
+!1)[0];null!=N&&this.addCells([D],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(D);null!=ia&&(null!=N&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?K.y-=ia.height/2:e==mxConstants.DIRECTION_SOUTH?K.y+=ia.height/2:K.x=e==mxConstants.DIRECTION_WEST?K.x-ia.width/2:K.x+ia.width/2),ia.x=K.x-ia.width/2,ia.y=K.y-ia.height/2);null!=f?(this.addCells([D],f,null,null,null,!0),g=null):B&&!S&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var ka=mxEvent.isControlDown(l)&&
+mxEvent.isShiftDown(l)&&B||null==g&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,D,this.createCurrentEdgeStyle());if(null!=ka&&this.connectionHandler.insertBeforeSource){var ja=null;for(N=b;null!=N.parent&&null!=N.geometry&&N.geometry.relative&&N.parent!=ka.parent;)N=this.model.getParent(N);null!=N&&null!=N.parent&&N.parent==ka.parent&&(ja=N.parent.getIndex(N),this.model.add(N.parent,ka,ja))}null==g&&null!=D&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST&&(ja=b.parent.getIndex(b),this.model.add(b.parent,
+D,ja));null!=ka&&I.push(ka);null==g&&null!=D&&I.push(D);null==D&&null!=ka&&ka.geometry.setTerminalPoint(K,!1);null!=ka&&this.fireEvent(new mxEventObject("cellsInserted","cells",[ka]))}finally{this.model.endUpdate()}}if(null!=M)M(I);else return I});if(null==E||null!=D||!B||null==g&&S)return C(D);E(H+K.x*k,d+K.y*k,C)};
+Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],l,C=0;C<b.length;C++)if(l=b[C],this.model.isVertex(l)||this.model.isEdge(l))this.isHtmlLabel(l)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(l)),l=mxUtils.extractTextWithWhitespace([e])):l=this.getLabel(l),l=mxUtils.trim(l.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<l.length&&k.push(l);return k.join(" ")};
+Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var l=b;null==k&&null!=l;)null!=l.value&&"object"==typeof l.value&&(k=l.hasAttribute(e)?null!=l.getAttribute(e)?l.getAttribute(e):"":null),l=this.model.getParent(l)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
+null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
+Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,e){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
+Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=this.layoutManager){var k=this.model.getParent(b);this.model.isVertex(k)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(k),null!=b&&b.constructor==mxStackLayout&&(e[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return e};
+Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,
+b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,l){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,l))};Graph.prototype.getDefaultColor=function(b,e,k,l){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=l);return k};
+Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var l=this.layoutManager.getLayout(this.model.getParent(b));null!=l&&l.constructor==mxStackLayout&&(l.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
+Graph.prototype.foldCells=function(b,e,k,l,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),M=this.getCellGeometry(k[p]);if(null!=E&&null!=M){var S=Math.round(M.width-E.width/this.view.scale),H=Math.round(M.height-E.height/this.view.scale);if(0!=H||0!=S){var K=this.model.getParent(k[p]),Q=this.layoutManager.getLayout(K);
+null==Q?null!=C&&this.isMoveCellsEvent(C,E)&&this.moveSiblings(E,K,S,H):null!=C&&mxEvent.isAltDown(C)||Q.constructor!=mxStackLayout||Q.resizeLast||this.resizeParentStacks(K,Q,S,H)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
+Graph.prototype.moveSiblings=function(b,e,k,l){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),E=this.getCellGeometry(C[e]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(l*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],E))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,e,k,l){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,E.width/this.view.scale-p.width):p.height+=l+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b,
+p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)};
+Graph.prototype.getSwimlaneAt=function(b,e,k){var l=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(l)&&(l=null);return l};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))};
+Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,e){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(b,d){d=null!=d?d:10;var k=this.container.clientWidth-d,l=this.container.clientHeight-d,B=Math.floor(20*Math.min(k/b.width,l/b.height))/20;this.zoomTo(B);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*B-Math.max((l-b.height*B)/2+d/2,0);this.container.scrollLeft=(b.x+p.x)*B-Math.max((k-b.width*B)/2+d/2,0)}};
-Graph.prototype.getTooltipForCell=function(b){var d="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),d=Graph.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var l=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var B=0;B<b.length;B++)(Graph.translateDiagram&&
-"label"==b[B].nodeName||0>mxUtils.indexOf(k,b[B].nodeName))&&0<b[B].nodeValue.length&&l.push({name:b[B].nodeName,value:b[B].nodeValue});l.sort(function(p,E){return p.name<E.name?-1:p.name>E.name?1:0});for(B=0;B<l.length;B++)"link"==l[B].name&&this.isCustomLink(l[B].value)||(d+=("link"!=l[B].name?"<b>"+mxUtils.htmlEntities(l[B].name)+":</b> ":"")+mxUtils.htmlEntities(l[B].value)+"\n");0<d.length&&(d=d.substring(0,d.length-1),mxClient.IS_SVG&&(d='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
-d+"</div>"))}}return d};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var d=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(d);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
-Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,d){return Graph.compress(b,d)};
-Graph.prototype.decompress=function(b,d){return Graph.decompress(b,d)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
+Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var k=this.container.clientWidth-e,l=this.container.clientHeight-e,C=Math.floor(20*Math.min(k/b.width,l/b.height))/20;this.zoomTo(C);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*C-Math.max((l-b.height*C)/2+e/2,0);this.container.scrollLeft=(b.x+p.x)*C-Math.max((k-b.width*C)/2+e/2,0)}};
+Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=Graph.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var l=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var C=0;C<b.length;C++)(Graph.translateDiagram&&
+"label"==b[C].nodeName||0>mxUtils.indexOf(k,b[C].nodeName))&&0<b[C].nodeValue.length&&l.push({name:b[C].nodeName,value:b[C].nodeValue});l.sort(function(p,E){return p.name<E.name?-1:p.name>E.name?1:0});for(C=0;C<l.length;C++)"link"==l[C].name&&this.isCustomLink(l[C].value)||(e+=("link"!=l[C].name?"<b>"+mxUtils.htmlEntities(l[C].name)+":</b> ":"")+mxUtils.htmlEntities(l[C].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
+e+"</div>"))}}return e};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
+Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)};
+Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
@@ -2433,216 +2437,216 @@ IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUC
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"),mxConstants.DIRECTION_NORTH);this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"),mxConstants.DIRECTION_EAST);this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"),mxConstants.DIRECTION_SOUTH);this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"),mxConstants.DIRECTION_WEST);this.elts=[this.arrowUp,this.arrowRight,
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(k){null!=k.relatedTarget&&
-mxEvent.getSource(k)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(k){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(k){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(k.getEvent())||this.graph.model.isVertex(k.getCell())||this.reset()});var d=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(k,
-l){d=!1;k=l.getEvent();this.isResetEvent(k)?this.reset():this.isActive()||(l=this.getState(l.getState()),null==l&&mxEvent.isTouchEvent(k)||this.update(l));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(k,l){k=l.getEvent();this.isResetEvent(k)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(k)||this.update(this.getState(l.getState()),l.getGraphX(),l.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(d=!0)}),mouseUp:mxUtils.bind(this,
-function(k,l){k=l.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(k),mxEvent.getClientY(k));this.isResetEvent(k)?this.reset():this.isActive()&&!d&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),l):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(l.getGraphX(),l.getGraphY())))):mxEvent.isTouchEvent(k)||null!=
-this.bbox&&mxUtils.contains(this.bbox,l.getGraphX(),l.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(k)||this.reset();d=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,d){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
-HoverIcons.prototype.createArrow=function(b,d,k){var l=null;l=mxUtils.createImage(b.src);l.style.width=b.width+"px";l.style.height=b.height+"px";l.style.padding=this.tolerance+"px";null!=d&&l.setAttribute("title",d);l.style.position="absolute";l.style.cursor=this.cssCursor;mxEvent.addGestureListeners(l,mxUtils.bind(this,function(B){null==this.currentState||this.isResetEvent(B)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(B),mxEvent.getClientY(B)),this.drag(B,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=l,this.setDisplay("none"),mxEvent.consume(B))}));mxEvent.redirectMouseEvents(l,this.graph,this.currentState);mxEvent.addListener(l,"mouseenter",mxUtils.bind(this,function(B){mxEvent.isMouseEvent(B)&&(null!=this.activeArrow&&this.activeArrow!=l&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(l,100),this.activeArrow=l,this.fireEvent(new mxEventObject("focus",
-"arrow",l,"direction",k,"event",B)))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(B){mxEvent.isMouseEvent(B)&&this.fireEvent(new mxEventObject("blur","arrow",l,"direction",k,"event",B));this.graph.isMouseDown||this.resetActiveArrow()}));return l};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
-HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var d=0;d<this.elts.length;d++)null!=this.elts[d]&&b(this.elts[d])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
-HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(d){d.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
-HoverIcons.prototype.drag=function(b,d,k){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,d,k),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=d&&d.setHandlesVisible(!1),d=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=d&&"orthogonalEdgeStyle"===
-mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),d.cell.style=mxUtils.setStyle(d.cell.style,"sourcePortConstraint",b),d.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,d,k){return this.graph.view.getState(this.graph.getCellAt(d,k))};
-HoverIcons.prototype.click=function(b,d,k){var l=k.getEvent(),B=k.getGraphX(),p=k.getGraphY();B=this.getStateAt(b,B,p);null==B||!this.graph.model.isEdge(B.cell)||this.graph.isCloneEvent(l)||B.getVisibleTerminalState(!0)!=b&&B.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,d,k):(this.graph.setSelectionCell(B.cell),this.reset());k.consume()};
-HoverIcons.prototype.execute=function(b,d,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,d,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
+mxEvent.getSource(k)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(k){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(k){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(k.getEvent())||this.graph.model.isVertex(k.getCell())||this.reset()});var e=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(k,
+l){e=!1;k=l.getEvent();this.isResetEvent(k)?this.reset():this.isActive()||(l=this.getState(l.getState()),null==l&&mxEvent.isTouchEvent(k)||this.update(l));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(k,l){k=l.getEvent();this.isResetEvent(k)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(k)||this.update(this.getState(l.getState()),l.getGraphX(),l.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(e=!0)}),mouseUp:mxUtils.bind(this,
+function(k,l){k=l.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(k),mxEvent.getClientY(k));this.isResetEvent(k)?this.reset():this.isActive()&&!e&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),l):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(l.getGraphX(),l.getGraphY())))):mxEvent.isTouchEvent(k)||null!=
+this.bbox&&mxUtils.contains(this.bbox,l.getGraphX(),l.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(k)||this.reset();e=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,e){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
+HoverIcons.prototype.createArrow=function(b,e,k){var l=null;l=mxUtils.createImage(b.src);l.style.width=b.width+"px";l.style.height=b.height+"px";l.style.padding=this.tolerance+"px";null!=e&&l.setAttribute("title",e);l.style.position="absolute";l.style.cursor=this.cssCursor;mxEvent.addGestureListeners(l,mxUtils.bind(this,function(C){null==this.currentState||this.isResetEvent(C)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(C),mxEvent.getClientY(C)),this.drag(C,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=l,this.setDisplay("none"),mxEvent.consume(C))}));mxEvent.redirectMouseEvents(l,this.graph,this.currentState);mxEvent.addListener(l,"mouseenter",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&(null!=this.activeArrow&&this.activeArrow!=l&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(l,100),this.activeArrow=l,this.fireEvent(new mxEventObject("focus",
+"arrow",l,"direction",k,"event",C)))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&this.fireEvent(new mxEventObject("blur","arrow",l,"direction",k,"event",C));this.graph.isMouseDown||this.resetActiveArrow()}));return l};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var e=0;e<this.elts.length;e++)null!=this.elts[e]&&b(this.elts[e])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
+HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(e){e.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
+HoverIcons.prototype.drag=function(b,e,k){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,e,k),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=e&&e.setHandlesVisible(!1),e=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=e&&"orthogonalEdgeStyle"===
+mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),e.cell.style=mxUtils.setStyle(e.cell.style,"sourcePortConstraint",b),e.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,e,k){return this.graph.view.getState(this.graph.getCellAt(e,k))};
+HoverIcons.prototype.click=function(b,e,k){var l=k.getEvent(),C=k.getGraphX(),p=k.getGraphY();C=this.getStateAt(b,C,p);null==C||!this.graph.model.isEdge(C.cell)||this.graph.isCloneEvent(l)||C.getVisibleTerminalState(!0)!=b&&C.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,e,k):(this.graph.setSelectionCell(C.cell),this.reset());k.consume()};
+HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
-var d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(d=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=d&&(b.x-=d.horizontalOffset/2,b.y-=d.verticalOffset/2,b.width+=d.horizontalOffset,b.height+=d.verticalOffset,null!=d.rotationShape&&null!=d.rotationShape.node&&"hidden"!=d.rotationShape.node.style.visibility&&"none"!=d.rotationShape.node.style.display&&null!=d.rotationShape.boundingBox&&
-(k=d.rotationShape.boundingBox));d=mxUtils.bind(this,function(M,S,H){if(null!=k){var K=new mxRectangle(S,H,M.clientWidth,M.clientHeight);mxUtils.intersects(K,k)&&(M==this.arrowUp?H-=K.y+K.height-k.y:M==this.arrowRight?S+=k.x+k.width-K.x:M==this.arrowDown?H+=k.y+k.height-K.y:M==this.arrowLeft&&(S-=K.x+K.width-k.x))}M.style.left=S+"px";M.style.top=H+"px";mxUtils.setOpacity(M,this.inactiveOpacity)});d(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
-this.triangleUp.height-this.tolerance));d(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));d(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));d(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){d=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var l=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),B=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=d&&d==l&&l==B&&B==b&&(b=B=l=d=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(M,S){var H=this.graph.model.isVertex(M)&&this.graph.getCellGeometry(M);null==M||this.graph.model.isAncestor(M,
-this.currentState.cell)||this.graph.isSwimlane(M)||!(null==H||null==p||H.height<3*p.height&&H.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});E(d,this.arrowRight);E(l,this.arrowLeft);E(B,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(M,S,H){if(null!=k){var K=new mxRectangle(S,H,M.clientWidth,M.clientHeight);mxUtils.intersects(K,k)&&(M==this.arrowUp?H-=K.y+K.height-k.y:M==this.arrowRight?S+=k.x+k.width-K.x:M==this.arrowDown?H+=k.y+k.height-K.y:M==this.arrowLeft&&(S-=K.x+K.width-k.x))}M.style.left=S+"px";M.style.top=H+"px";mxUtils.setOpacity(M,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
+var l=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==l&&l==C&&C==b&&(b=C=l=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(M,S){var H=this.graph.model.isVertex(M)&&this.graph.getCellGeometry(M);null==M||this.graph.model.isAncestor(M,
+this.currentState.cell)||this.graph.isSwimlane(M)||!(null==H||null==p||H.height<3*p.height&&H.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});E(e,this.arrowRight);E(l,this.arrowLeft);E(C,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
-HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(d){null!=d.parentNode&&(d=new mxRectangle(d.offsetLeft,d.offsetTop,d.offsetWidth,d.offsetHeight),null==b?b=d:b.add(d))});return b};
-HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var d=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(d)&&this.graph.isCellConnectable(d)&&(b=d)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
-HoverIcons.prototype.update=function(b,d,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var l=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,l=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
-window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,d,k))}),this.updateDelay+10))):null!=this.startTime&&(l=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&l<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,d,k)?this.reset(!1):(null!=this.currentState||l>this.activationDelay)&&this.currentState!=b&&(l>this.updateDelay&&null!=
-b||null==this.bbox||null==d||null==k||!mxUtils.contains(this.bbox,d,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,d,k,l,B){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(d),M=this.getCellGeometry(E);null!=M&&(M.x+=p*l,M.y+=p*B);b.insert(E)}return b};
-Graph.prototype.createTable=function(b,d,k,l,B,p,E,M,S){k=null!=k?k:60;l=null!=l?l:40;p=null!=p?p:30;M=null!=M?M:"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;";S=null!=S?S:"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!=B?B:"",0,0,d*k,b*l+(null!=B?p:0),null!=E?E:"shape=table;startSize="+(null!=B?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,d*k,l,M),this.createVertex(null,null,"",0,0,k,l,S),d,k,0),b,0,l)};
-Graph.prototype.setTableValues=function(b,d,k){for(var l=this.model.getChildCells(b,!0),B=0;B<l.length;B++)if(null!=k&&(l[B].value=k[B]),null!=d)for(var p=this.model.getChildCells(l[B],!0),E=0;E<p.length;E++)null!=d[B][E]&&(p[E].value=d[B][E]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,d,k,l,B,p,E,M,S){k=null!=k?k:120;l=null!=l?l:120;E=null!=E?E:"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;";M=null!=M?M:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";B=this.createVertex(null,null,null!=B?B:"",0,0,d*k,b*l,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==B?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(B),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);B.geometry.width+=p;B.geometry.height+=p;E=this.createVertex(null,
-null,"",0,p,d*k+p,l,E);B.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,l,M),d,k,0));return 1<b?(E.geometry.y=l+p,this.createParent(B,this.createParent(E,this.createVertex(null,null,"",p,0,k,l,S),d,k,0),b-1,0,l)):B};
-Graph.prototype.visitTableCells=function(b,d){var k=null,l=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var B=0;B<l.length;B++){for(var p=this.getActualStartSize(l[B],!0),E=this.model.getChildCells(l[B],!0),M=this.getCellStyle(l[B],!0),S=null,H=[],K=0;K<E.length;K++){var Q=this.getCellGeometry(E[K]),e={cell:E[K],rospan:1,colspan:1,row:B,col:K,geo:Q};Q=null!=Q.alternateBounds?Q.alternateBounds:Q;e.point=new mxPoint(Q.width+(null!=S?S.point.x:b.x+p.x),Q.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+p.y));e.actual=e;null!=k&&null!=k[K]&&1<k[K].rowspan?(e.rowspan=k[K].rowspan-1,e.colspan=k[K].colspan,e.actual=k[K].actual):null!=S&&1<S.colspan?(e.rowspan=S.rowspan,e.colspan=S.colspan-1,e.actual=S.actual):(S=this.getCurrentCellStyle(E[K],!0),null!=S&&(e.rowspan=parseInt(S.rowspan||1),e.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(M,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(M,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;d(e,E.length,
-l.length,b.x+(S?p.x:0),b.y+(S?p.y:0));H.push(e);S=e}k=H}};Graph.prototype.getTableLines=function(b,d,k){var l=[],B=[];(d||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,M,S,H){d&&p.row<M-1&&(null==l[p.row]&&(l[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&l[p.row].push(null),l[p.row].push(p.point));k&&p.col<E-1&&(null==B[p.col]&&(B[p.col]=[new mxPoint(p.point.x,H)]),1<p.colspan&&B[p.col].push(null),B[p.col].push(p.point))}));return l.concat(B)};
+HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
+HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
+HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var l=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,l=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
+window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(l=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&l<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||l>this.activationDelay)&&this.currentState!=b&&(l>this.updateDelay&&null!=
+b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,l,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(e),M=this.getCellGeometry(E);null!=M&&(M.x+=p*l,M.y+=p*C);b.insert(E)}return b};
+Graph.prototype.createTable=function(b,e,k,l,C,p,E,M,S){k=null!=k?k:60;l=null!=l?l:40;p=null!=p?p:30;M=null!=M?M:"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;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=C?C:"",0,0,e*k,b*l+(null!=C?p:0),null!=E?E:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,l,M),this.createVertex(null,null,"",0,0,k,l,S),e,k,0),b,0,l)};
+Graph.prototype.setTableValues=function(b,e,k){for(var l=this.model.getChildCells(b,!0),C=0;C<l.length;C++)if(null!=k&&(l[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(l[C],!0),E=0;E<p.length;E++)null!=e[C][E]&&(p[E].value=e[C][E]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,l,C,p,E,M,S){k=null!=k?k:120;l=null!=l?l:120;E=null!=E?E:"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;";M=null!=M?M:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*l,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;E=this.createVertex(null,
+null,"",0,p,e*k+p,l,E);C.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,l,M),e,k,0));return 1<b?(E.geometry.y=l+p,this.createParent(C,this.createParent(E,this.createVertex(null,null,"",p,0,k,l,S),e,k,0),b-1,0,l)):C};
+Graph.prototype.visitTableCells=function(b,e){var k=null,l=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<l.length;C++){for(var p=this.getActualStartSize(l[C],!0),E=this.model.getChildCells(l[C],!0),M=this.getCellStyle(l[C],!0),S=null,H=[],K=0;K<E.length;K++){var Q=this.getCellGeometry(E[K]),d={cell:E[K],rospan:1,colspan:1,row:C,col:K,geo:Q};Q=null!=Q.alternateBounds?Q.alternateBounds:Q;d.point=new mxPoint(Q.width+(null!=S?S.point.x:b.x+p.x),Q.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+p.y));d.actual=d;null!=k&&null!=k[K]&&1<k[K].rowspan?(d.rowspan=k[K].rowspan-1,d.colspan=k[K].colspan,d.actual=k[K].actual):null!=S&&1<S.colspan?(d.rowspan=S.rowspan,d.colspan=S.colspan-1,d.actual=S.actual):(S=this.getCurrentCellStyle(E[K],!0),null!=S&&(d.rowspan=parseInt(S.rowspan||1),d.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(M,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(M,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(d,E.length,
+l.length,b.x+(S?p.x:0),b.y+(S?p.y:0));H.push(d);S=d}k=H}};Graph.prototype.getTableLines=function(b,e,k){var l=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,M,S,H){e&&p.row<M-1&&(null==l[p.row]&&(l[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&l[p.row].push(null),l[p.row].push(p.point));k&&p.col<E-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,H)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return l.concat(C)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,d,k){k=null!=k?k:!0;var l=this.getModel();l.beginUpdate();try{var B=this.getCellGeometry(b);if(null!=B){B=B.clone();B.height+=d;l.setGeometry(b,B);var p=l.getParent(b),E=l.getChildCells(p,!0);if(!k){var M=mxUtils.indexOf(E,b);if(M<E.length-1){var S=E[M+1],H=this.getCellGeometry(S);null!=H&&(H=H.clone(),H.y+=d,H.height-=d,l.setGeometry(S,H))}}var K=this.getCellGeometry(p);null!=K&&(k||(k=b==E[E.length-1]),k&&(K=K.clone(),K.height+=d,l.setGeometry(p,K)))}}finally{l.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,d,k){k=null!=k?k:!1;var l=this.getModel(),B=l.getParent(b),p=l.getParent(B),E=l.getChildCells(B,!0);b=mxUtils.indexOf(E,b);var M=b==E.length-1;l.beginUpdate();try{for(var S=l.getChildCells(p,!0),H=0;H<S.length;H++){B=S[H];E=l.getChildCells(B,!0);var K=E[b],Q=this.getCellGeometry(K);null!=Q&&(Q=Q.clone(),Q.width+=d,null!=Q.alternateBounds&&(Q.alternateBounds.width+=d),l.setGeometry(K,Q));b<E.length-1&&(K=E[b+1],Q=this.getCellGeometry(K),null!=Q&&(Q=Q.clone(),
-Q.x+=d,k||(Q.width-=d,null!=Q.alternateBounds&&(Q.alternateBounds.width-=d)),l.setGeometry(K,Q)))}if(M||k){var e=this.getCellGeometry(p);null!=e&&(e=e.clone(),e.width+=d,l.setGeometry(p,e))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{l.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
-TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,d){for(var k=0,l=0;l<b.length;l++)if(!this.isVertexIgnored(b[l])){var B=this.graph.getCellGeometry(b[l]);null!=B&&(k+=d?B.width:B.height)}return k};
-TableLayout.prototype.getRowLayout=function(b,d){var k=this.graph.model.getChildCells(b,!0),l=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);d=d-l.x-l.width;var B=[];l=l.x;for(var p=0;p<k.length;p++){var E=this.graph.getCellGeometry(k[p]);null!=E&&(l+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*d/b,B.push(Math.round(l)))}return B};
-TableLayout.prototype.layoutRow=function(b,d,k,l){var B=this.graph.getModel(),p=B.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,M=0;null!=d&&(d=d.slice(),d.splice(0,0,b.x));for(var S=0;S<p.length;S++){var H=this.graph.getCellGeometry(p[S]);null!=H&&(H=H.clone(),H.y=b.y,H.height=k-b.y-b.height,null!=d?(H.x=d[S],H.width=d[S+1]-H.x,S==p.length-1&&S<d.length-2&&(H.width=l-H.x-b.x-b.width)):(H.x=E,E+=H.width,S==p.length-1?H.width=l-b.x-b.width-M:M+=H.width),H.alternateBounds=new mxRectangle(0,
-0,H.width,H.height),B.setGeometry(p[S],H))}return M};
-TableLayout.prototype.execute=function(b){if(null!=b){var d=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),l=this.graph.getCellStyle(b),B="1"==mxUtils.getValue(l,"resizeLastRow","0"),p="1"==mxUtils.getValue(l,"resizeLast","0");l="1"==mxUtils.getValue(l,"fixedRows","0");var E=this.graph.getModel(),M=0;E.beginUpdate();try{for(var S=k.height-d.y-d.height,H=k.width-d.x-d.width,K=E.getChildCells(b,!0),Q=0;Q<K.length;Q++)E.setVisible(K[Q],!0);var e=this.getSize(K,!1);if(0<S&&0<H&&0<
-K.length&&0<e){if(B){var f=this.graph.getCellGeometry(K[K.length-1]);null!=f&&(f=f.clone(),f.height=S-e+f.height,E.setGeometry(K[K.length-1],f))}var g=p?null:this.getRowLayout(K[0],H),v=[],y=d.y;for(Q=0;Q<K.length;Q++)f=this.graph.getCellGeometry(K[Q]),null!=f&&(f=f.clone(),f.x=d.x,f.width=H,f.y=Math.round(y),y=B||l?y+f.height:y+f.height/e*S,f.height=Math.round(y)-f.y,E.setGeometry(K[Q],f)),M=Math.max(M,this.layoutRow(K[Q],g,f.height,H,v));l&&S<e&&(k=k.clone(),k.height=y+d.height,E.setGeometry(b,
-k));p&&H<M+Graph.minTableColumnWidth&&(k=k.clone(),k.width=M+d.width+d.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){E.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var I=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=I.width}C.actual.col==C.col&&(I=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=I.height)}}))}else for(Q=0;Q<K.length;Q++)E.setVisible(K[Q],
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var l=this.getModel();l.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;l.setGeometry(b,C);var p=l.getParent(b),E=l.getChildCells(p,!0);if(!k){var M=mxUtils.indexOf(E,b);if(M<E.length-1){var S=E[M+1],H=this.getCellGeometry(S);null!=H&&(H=H.clone(),H.y+=e,H.height-=e,l.setGeometry(S,H))}}var K=this.getCellGeometry(p);null!=K&&(k||(k=b==E[E.length-1]),k&&(K=K.clone(),K.height+=e,l.setGeometry(p,K)))}}finally{l.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var l=this.getModel(),C=l.getParent(b),p=l.getParent(C),E=l.getChildCells(C,!0);b=mxUtils.indexOf(E,b);var M=b==E.length-1;l.beginUpdate();try{for(var S=l.getChildCells(p,!0),H=0;H<S.length;H++){C=S[H];E=l.getChildCells(C,!0);var K=E[b],Q=this.getCellGeometry(K);null!=Q&&(Q=Q.clone(),Q.width+=e,null!=Q.alternateBounds&&(Q.alternateBounds.width+=e),l.setGeometry(K,Q));b<E.length-1&&(K=E[b+1],Q=this.getCellGeometry(K),null!=Q&&(Q=Q.clone(),
+Q.x+=e,k||(Q.width-=e,null!=Q.alternateBounds&&(Q.alternateBounds.width-=e)),l.setGeometry(K,Q)))}if(M||k){var d=this.getCellGeometry(p);null!=d&&(d=d.clone(),d.width+=e,l.setGeometry(p,d))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{l.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,l=0;l<b.length;l++)if(!this.isVertexIgnored(b[l])){var C=this.graph.getCellGeometry(b[l]);null!=C&&(k+=e?C.width:C.height)}return k};
+TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),l=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-l.x-l.width;var C=[];l=l.x;for(var p=0;p<k.length;p++){var E=this.graph.getCellGeometry(k[p]);null!=E&&(l+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*e/b,C.push(Math.round(l)))}return C};
+TableLayout.prototype.layoutRow=function(b,e,k,l){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,M=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<p.length;S++){var H=this.graph.getCellGeometry(p[S]);null!=H&&(H=H.clone(),H.y=b.y,H.height=k-b.y-b.height,null!=e?(H.x=e[S],H.width=e[S+1]-H.x,S==p.length-1&&S<e.length-2&&(H.width=l-H.x-b.x-b.width)):(H.x=E,E+=H.width,S==p.length-1?H.width=l-b.x-b.width-M:M+=H.width),H.alternateBounds=new mxRectangle(0,
+0,H.width,H.height),C.setGeometry(p[S],H))}return M};
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),l=this.graph.getCellStyle(b),C="1"==mxUtils.getValue(l,"resizeLastRow","0"),p="1"==mxUtils.getValue(l,"resizeLast","0");l="1"==mxUtils.getValue(l,"fixedRows","0");var E=this.graph.getModel(),M=0;E.beginUpdate();try{for(var S=k.height-e.y-e.height,H=k.width-e.x-e.width,K=E.getChildCells(b,!0),Q=0;Q<K.length;Q++)E.setVisible(K[Q],!0);var d=this.getSize(K,!1);if(0<S&&0<H&&0<
+K.length&&0<d){if(C){var f=this.graph.getCellGeometry(K[K.length-1]);null!=f&&(f=f.clone(),f.height=S-d+f.height,E.setGeometry(K[K.length-1],f))}var g=p?null:this.getRowLayout(K[0],H),v=[],x=e.y;for(Q=0;Q<K.length;Q++)f=this.graph.getCellGeometry(K[Q]),null!=f&&(f=f.clone(),f.x=e.x,f.width=H,f.y=Math.round(x),x=C||l?x+f.height:x+f.height/d*S,f.height=Math.round(x)-f.y,E.setGeometry(K[Q],f)),M=Math.max(M,this.layoutRow(K[Q],g,f.height,H,v));l&&S<d&&(k=k.clone(),k.height=x+e.height,E.setGeometry(b,
+k));p&&H<M+Graph.minTableColumnWidth&&(k=k.clone(),k.width=M+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(B){E.setVisible(B.cell,B.actual.cell==B.cell);if(B.actual.cell!=B.cell){if(B.actual.row==B.row){var I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo;B.actual.geo.width+=I.width}B.actual.col==B.col&&(I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo,B.actual.geo.height+=I.height)}}))}else for(Q=0;Q<K.length;Q++)E.setVisible(K[Q],
!1)}finally{E.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var d=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(K,Q){Q=null!=Q?Q:!0;var e=this.getState(K);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&!e.invalid&&this.updateLineJumps(e)&&this.graph.cellRenderer.redraw(e,!1,this.isRendering());e=d.apply(this,
-arguments);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var K=this.node.getElementsByTagName("path");if(1<K.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&K[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var Q=this.state.view.graph.getFlowAnimationStyle();null!=Q&&K[1].setAttribute("class",Q.getAttribute("id"))}}};var l=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(K,Q){return l.apply(this,arguments)||null!=K.routedPoints&&null!=Q.routedPoints&&!mxUtils.equalPoints(Q.routedPoints,K.routedPoints)};var B=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(K){B.apply(this,arguments);this.graph.model.isEdge(K.cell)&&1!=K.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(K)};mxGraphView.prototype.updateLineJumps=function(K){var Q=K.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=K.routedPoints,f=null;if(null!=Q&&null!=this.validEdges&&"none"!==mxUtils.getValue(K.style,"jumpStyle","none")){var g=function(pa,ra,L){var V=new mxPoint(ra,L);V.type=pa;f.push(V);V=null!=K.routedPoints?K.routedPoints[f.length-1]:null;return null==V||V.type!=
-pa||V.x!=ra||V.y!=L},v=.5*this.scale;e=!1;f=[];for(var y=0;y<Q.length-1;y++){for(var C=Q[y+1],I=Q[y],D=[],N=Q[y+2];y<Q.length-2&&mxUtils.ptSegDistSq(I.x,I.y,N.x,N.y,C.x,C.y)<1*this.scale*this.scale;)C=N,y++,N=Q[y+2];e=g(0,I.x,I.y)||e;for(var G=0;G<this.validEdges.length;G++){var ia=this.validEdges[G],ka=ia.absolutePoints;if(null!=ka&&mxUtils.intersects(K,ia)&&"1"!=ia.style.noJump)for(ia=0;ia<ka.length-1;ia++){var ja=ka[ia+1],ca=ka[ia];for(N=ka[ia+2];ia<ka.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,N.x,
-N.y,ja.x,ja.y)<1*this.scale*this.scale;)ja=N,ia++,N=ka[ia+2];N=mxUtils.intersection(I.x,I.y,C.x,C.y,ca.x,ca.y,ja.x,ja.y);if(null!=N&&(Math.abs(N.x-I.x)>v||Math.abs(N.y-I.y)>v)&&(Math.abs(N.x-C.x)>v||Math.abs(N.y-C.y)>v)&&(Math.abs(N.x-ca.x)>v||Math.abs(N.y-ca.y)>v)&&(Math.abs(N.x-ja.x)>v||Math.abs(N.y-ja.y)>v)){ja=N.x-I.x;ca=N.y-I.y;N={distSq:ja*ja+ca*ca,x:N.x,y:N.y};for(ja=0;ja<D.length;ja++)if(D[ja].distSq>N.distSq){D.splice(ja,0,N);N=null;break}null==N||0!=D.length&&D[D.length-1].x===N.x&&D[D.length-
-1].y===N.y||D.push(N)}}}for(ia=0;ia<D.length;ia++)e=g(1,D[ia].x,D[ia].y)||e}N=Q[Q.length-1];e=g(0,N.x,N.y)||e}K.routedPoints=f;return e}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(K,Q,e){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,v=mxUtils.getValue(this.style,"jumpStyle","none"),y=!0,C=null,I=null,D=[],N=null;K.begin();for(var G=0;G<this.state.routedPoints.length;G++){var ia=this.state.routedPoints[G],ka=new mxPoint(ia.x/this.scale,ia.y/this.scale);0==G?ka=Q[0]:G==this.state.routedPoints.length-1&&(ka=Q[Q.length-1]);var ja=!1;if(null!=C&&1==ia.type){var ca=this.state.routedPoints[G+1];ia=ca.x/this.scale-
-ka.x;ca=ca.y/this.scale-ka.y;ia=ia*ia+ca*ca;null==N&&(N=new mxPoint(ka.x-C.x,ka.y-C.y),I=Math.sqrt(N.x*N.x+N.y*N.y),0<I?(N.x=N.x*g/I,N.y=N.y*g/I):N=null);ia>g*g&&0<I&&(ia=C.x-ka.x,ca=C.y-ka.y,ia=ia*ia+ca*ca,ia>g*g&&(ja=new mxPoint(ka.x-N.x,ka.y-N.y),ia=new mxPoint(ka.x+N.x,ka.y+N.y),D.push(ja),this.addPoints(K,D,e,f,!1,null,y),D=0>Math.round(N.x)||0==Math.round(N.x)&&0>=Math.round(N.y)?1:-1,y=!1,"sharp"==v?(K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.lineTo(ia.x-N.y*D,ia.y+N.x*D),K.lineTo(ia.x,ia.y)):"line"==
-v?(K.moveTo(ja.x+N.y*D,ja.y-N.x*D),K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.moveTo(ia.x-N.y*D,ia.y+N.x*D),K.lineTo(ia.x+N.y*D,ia.y-N.x*D),K.moveTo(ia.x,ia.y)):"arc"==v?(D*=1.3,K.curveTo(ja.x-N.y*D,ja.y+N.x*D,ia.x-N.y*D,ia.y+N.x*D,ia.x,ia.y)):(K.moveTo(ia.x,ia.y),y=!0),D=[ia],ja=!0))}else N=null;ja||(D.push(ka),C=ka)}this.addPoints(K,D,e,f,!1,null,y);K.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(K,Q,e,f){return null!=Q&&"centerPerimeter"==
-Q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(Q.getCenterX(),Q.getCenterY()):E.apply(this,arguments)};var M=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(K,Q,e,f){if(null==Q||null==K||"1"!=Q.style.snapToPoint&&"1"!=K.style.snapToPoint)M.apply(this,arguments);else{Q=this.getTerminalPort(K,Q,f);var g=this.getNextPoint(K,e,f),v=this.graph.isOrthogonal(K),y=mxUtils.toRadians(Number(Q.style[mxConstants.STYLE_ROTATION]||"0")),C=new mxPoint(Q.getCenterX(),
-Q.getCenterY());if(0!=y){var I=Math.cos(-y),D=Math.sin(-y);g=mxUtils.getRotatedPoint(g,I,D,C)}I=parseFloat(K.style[mxConstants.STYLE_PERIMETER_SPACING]||0);I+=parseFloat(K.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(Q,g,0==y&&v,I);0!=y&&(I=Math.cos(y),D=Math.sin(y),g=mxUtils.getRotatedPoint(g,I,D,C));K.setAbsoluteTerminalPoint(this.snapToAnchorPoint(K,Q,e,f,g),f)}};mxGraphView.prototype.snapToAnchorPoint=function(K,Q,
-e,f,g){if(null!=Q&&null!=K){K=this.graph.getAllConnectionConstraints(Q);f=e=null;if(null!=K)for(var v=0;v<K.length;v++){var y=this.graph.getConnectionPoint(Q,K[v]);if(null!=y){var C=(y.x-g.x)*(y.x-g.x)+(y.y-g.y)*(y.y-g.y);if(null==f||C<f)e=y,f=C}}null!=e&&(g=e)}return g};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(K,Q,e){var f=S.apply(this,arguments);"1"==K.getAttribute("placeholders")&&null!=e.state&&(f=e.state.view.graph.replacePlaceholders(e.state.cell,
-f));return f};var H=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(K){if(null!=K.style&&"undefined"!==typeof pako){var Q=mxUtils.getValue(K.style,mxConstants.STYLE_SHAPE,null);if(null!=Q&&"string"===typeof Q&&"stencil("==Q.substring(0,8))try{var e=Q.substring(8,Q.length-1),f=mxUtils.parseXml(Graph.decompress(e));return new mxShape(new mxStencil(f.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return H.apply(this,arguments)}})();
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(K,Q){Q=null!=Q?Q:!0;var d=this.getState(K);null!=d&&Q&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=e.apply(this,
+arguments);null!=d&&Q&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var K=this.node.getElementsByTagName("path");if(1<K.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&K[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var Q=this.state.view.graph.getFlowAnimationStyle();null!=Q&&K[1].setAttribute("class",Q.getAttribute("id"))}}};var l=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(K,Q){return l.apply(this,arguments)||null!=K.routedPoints&&null!=Q.routedPoints&&!mxUtils.equalPoints(Q.routedPoints,K.routedPoints)};var C=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(K){C.apply(this,arguments);this.graph.model.isEdge(K.cell)&&1!=K.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(K)};mxGraphView.prototype.updateLineJumps=function(K){var Q=K.absolutePoints;if(Graph.lineJumpsEnabled){var d=null!=K.routedPoints,f=null;if(null!=Q&&null!=this.validEdges&&"none"!==mxUtils.getValue(K.style,"jumpStyle","none")){var g=function(pa,ra,L){var V=new mxPoint(ra,L);V.type=pa;f.push(V);V=null!=K.routedPoints?K.routedPoints[f.length-1]:null;return null==V||V.type!=
+pa||V.x!=ra||V.y!=L},v=.5*this.scale;d=!1;f=[];for(var x=0;x<Q.length-1;x++){for(var B=Q[x+1],I=Q[x],D=[],N=Q[x+2];x<Q.length-2&&mxUtils.ptSegDistSq(I.x,I.y,N.x,N.y,B.x,B.y)<1*this.scale*this.scale;)B=N,x++,N=Q[x+2];d=g(0,I.x,I.y)||d;for(var G=0;G<this.validEdges.length;G++){var ia=this.validEdges[G],ka=ia.absolutePoints;if(null!=ka&&mxUtils.intersects(K,ia)&&"1"!=ia.style.noJump)for(ia=0;ia<ka.length-1;ia++){var ja=ka[ia+1],ca=ka[ia];for(N=ka[ia+2];ia<ka.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,N.x,
+N.y,ja.x,ja.y)<1*this.scale*this.scale;)ja=N,ia++,N=ka[ia+2];N=mxUtils.intersection(I.x,I.y,B.x,B.y,ca.x,ca.y,ja.x,ja.y);if(null!=N&&(Math.abs(N.x-I.x)>v||Math.abs(N.y-I.y)>v)&&(Math.abs(N.x-B.x)>v||Math.abs(N.y-B.y)>v)&&(Math.abs(N.x-ca.x)>v||Math.abs(N.y-ca.y)>v)&&(Math.abs(N.x-ja.x)>v||Math.abs(N.y-ja.y)>v)){ja=N.x-I.x;ca=N.y-I.y;N={distSq:ja*ja+ca*ca,x:N.x,y:N.y};for(ja=0;ja<D.length;ja++)if(D[ja].distSq>N.distSq){D.splice(ja,0,N);N=null;break}null==N||0!=D.length&&D[D.length-1].x===N.x&&D[D.length-
+1].y===N.y||D.push(N)}}}for(ia=0;ia<D.length;ia++)d=g(1,D[ia].x,D[ia].y)||d}N=Q[Q.length-1];d=g(0,N.x,N.y)||d}K.routedPoints=f;return d}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(K,Q,d){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,v=mxUtils.getValue(this.style,"jumpStyle","none"),x=!0,B=null,I=null,D=[],N=null;K.begin();for(var G=0;G<this.state.routedPoints.length;G++){var ia=this.state.routedPoints[G],ka=new mxPoint(ia.x/this.scale,ia.y/this.scale);0==G?ka=Q[0]:G==this.state.routedPoints.length-1&&(ka=Q[Q.length-1]);var ja=!1;if(null!=B&&1==ia.type){var ca=this.state.routedPoints[G+1];ia=ca.x/this.scale-
+ka.x;ca=ca.y/this.scale-ka.y;ia=ia*ia+ca*ca;null==N&&(N=new mxPoint(ka.x-B.x,ka.y-B.y),I=Math.sqrt(N.x*N.x+N.y*N.y),0<I?(N.x=N.x*g/I,N.y=N.y*g/I):N=null);ia>g*g&&0<I&&(ia=B.x-ka.x,ca=B.y-ka.y,ia=ia*ia+ca*ca,ia>g*g&&(ja=new mxPoint(ka.x-N.x,ka.y-N.y),ia=new mxPoint(ka.x+N.x,ka.y+N.y),D.push(ja),this.addPoints(K,D,d,f,!1,null,x),D=0>Math.round(N.x)||0==Math.round(N.x)&&0>=Math.round(N.y)?1:-1,x=!1,"sharp"==v?(K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.lineTo(ia.x-N.y*D,ia.y+N.x*D),K.lineTo(ia.x,ia.y)):"line"==
+v?(K.moveTo(ja.x+N.y*D,ja.y-N.x*D),K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.moveTo(ia.x-N.y*D,ia.y+N.x*D),K.lineTo(ia.x+N.y*D,ia.y-N.x*D),K.moveTo(ia.x,ia.y)):"arc"==v?(D*=1.3,K.curveTo(ja.x-N.y*D,ja.y+N.x*D,ia.x-N.y*D,ia.y+N.x*D,ia.x,ia.y)):(K.moveTo(ia.x,ia.y),x=!0),D=[ia],ja=!0))}else N=null;ja||(D.push(ka),B=ka)}this.addPoints(K,D,d,f,!1,null,x);K.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(K,Q,d,f){return null!=Q&&"centerPerimeter"==
+Q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(Q.getCenterX(),Q.getCenterY()):E.apply(this,arguments)};var M=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(K,Q,d,f){if(null==Q||null==K||"1"!=Q.style.snapToPoint&&"1"!=K.style.snapToPoint)M.apply(this,arguments);else{Q=this.getTerminalPort(K,Q,f);var g=this.getNextPoint(K,d,f),v=this.graph.isOrthogonal(K),x=mxUtils.toRadians(Number(Q.style[mxConstants.STYLE_ROTATION]||"0")),B=new mxPoint(Q.getCenterX(),
+Q.getCenterY());if(0!=x){var I=Math.cos(-x),D=Math.sin(-x);g=mxUtils.getRotatedPoint(g,I,D,B)}I=parseFloat(K.style[mxConstants.STYLE_PERIMETER_SPACING]||0);I+=parseFloat(K.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(Q,g,0==x&&v,I);0!=x&&(I=Math.cos(x),D=Math.sin(x),g=mxUtils.getRotatedPoint(g,I,D,B));K.setAbsoluteTerminalPoint(this.snapToAnchorPoint(K,Q,d,f,g),f)}};mxGraphView.prototype.snapToAnchorPoint=function(K,Q,
+d,f,g){if(null!=Q&&null!=K){K=this.graph.getAllConnectionConstraints(Q);f=d=null;if(null!=K)for(var v=0;v<K.length;v++){var x=this.graph.getConnectionPoint(Q,K[v]);if(null!=x){var B=(x.x-g.x)*(x.x-g.x)+(x.y-g.y)*(x.y-g.y);if(null==f||B<f)d=x,f=B}}null!=d&&(g=d)}return g};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(K,Q,d){var f=S.apply(this,arguments);"1"==K.getAttribute("placeholders")&&null!=d.state&&(f=d.state.view.graph.replacePlaceholders(d.state.cell,
+f));return f};var H=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(K){if(null!=K.style&&"undefined"!==typeof pako){var Q=mxUtils.getValue(K.style,mxConstants.STYLE_SHAPE,null);if(null!=Q&&"string"===typeof Q&&"stencil("==Q.substring(0,8))try{var d=Q.substring(8,Q.length-1),f=mxUtils.parseXml(Graph.decompress(d));return new mxShape(new mxStencil(f.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return H.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(b){var d=mxStencilRegistry.stencils[b];if(null==d&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){d=mxStencilRegistry.libraries[k];if(null!=d){if(null==mxStencilRegistry.packages[k]){for(var l=0;l<d.length;l++){var B=d[l];if(!mxStencilRegistry.filesLoaded[B])if(mxStencilRegistry.filesLoaded[B]=!0,".xml"==B.toLowerCase().substring(B.length-4,B.length))mxStencilRegistry.loadStencilSet(B,
-null);else if(".js"==B.toLowerCase().substring(B.length-3,B.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(B);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,d,B,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);d=mxStencilRegistry.stencils[b]}}return d};
-mxStencilRegistry.getBasenameForStencil=function(b){var d=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){d=b[1];for(var k=2;k<b.length-1;k++)d+="/"+b[k]}return d};
-mxStencilRegistry.loadStencilSet=function(b,d,k,l){var B=mxStencilRegistry.packages[b];if(null!=k&&k||null==B){var p=!1;if(null==B)try{if(l){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,d,p))}));return}B=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=B;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=B&&null!=
-B.documentElement&&mxStencilRegistry.parseStencilSet(B.documentElement,d,p)}};mxStencilRegistry.loadStencil=function(b,d){if(null!=d)mxUtils.get(b,mxUtils.bind(this,function(k){d(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var d=0;d<b.length;d++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[d]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,d,k){if("stencils"==b.nodeName)for(var l=b.firstChild;null!=l;)"shapes"==l.nodeName&&mxStencilRegistry.parseStencilSet(l,d,k),l=l.nextSibling;else{k=null!=k?k:!0;l=b.firstChild;var B="";b=b.getAttribute("name");for(null!=b&&(B=b+".");null!=l;){if(l.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=l.getAttribute("name"),null!=b)){B=B.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(B+p.toLowerCase(),new mxStencil(l));if(null!=d){var E=l.getAttribute("w"),
-M=l.getAttribute("h");E=null==E?80:parseInt(E,10);M=null==M?80:parseInt(M,10);d(B,p,b,E,M)}}l=l.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function d(x,O){switch(O){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var l=0;l<e.length;l++){var C=e[l];if(!mxStencilRegistry.filesLoaded[C])if(mxStencilRegistry.filesLoaded[C]=!0,".xml"==C.toLowerCase().substring(C.length-4,C.length))mxStencilRegistry.loadStencilSet(C,
+null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,C,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
+mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
+mxStencilRegistry.loadStencilSet=function(b,e,k,l){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(l){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=C&&null!=
+C.documentElement&&mxStencilRegistry.parseStencilSet(C.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var l=b.firstChild;null!=l;)"shapes"==l.nodeName&&mxStencilRegistry.parseStencilSet(l,e,k),l=l.nextSibling;else{k=null!=k?k:!0;l=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=l;){if(l.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=l.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(l));if(null!=e){var E=l.getAttribute("w"),
+M=l.getAttribute("h");E=null==E?80:parseInt(E,10);M=null==M?80:parseInt(M,10);e(C,p,b,E,M)}}l=l.nextSibling}}};
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var y=document.createElement("div");y.className="geHint";y.style.whiteSpace="nowrap";y.style.position="absolute";return y}function e(y,O){switch(O){case mxConstants.POINTS:return y;case mxConstants.MILLIMETERS:return(y/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(y/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(y/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(x){return!mxEvent.isAltDown(x)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(x){return k.apply(this,arguments)||this.graph.isTableRow(x)||this.graph.isTableCell(x)};var l=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(x){return l.apply(this,arguments)||
-this.graph.isEdgeIgnored(x)};var B=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(x){return this.graph.isCloneEvent(x)!=B.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var x=new mxEllipse(null,this.highlightColor,this.highlightColor,0);x.opacity=mxConstants.HIGHLIGHT_OPACITY;return x};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,null,null,null,null,x);x=new mxCellState(this.graph.view,x,this.graph.getCellStyle(x));for(var O in this.graph.currentEdgeStyle)x.style[O]=this.graph.currentEdgeStyle[O];x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return x};mxConnectionHandler.prototype.updatePreview=function(x){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=E.apply(this,arguments),O=x.getCell;x.getCell=mxUtils.bind(this,function(P){var X=O.apply(this,arguments);this.error=null;return X});return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",O="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),P=0;P<O.length;P++)null!=this.currentEdgeStyle[O[P]]&&(x+=O[P]+"="+this.currentEdgeStyle[O[P]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
-(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(x+="elbow="+this.currentEdgeStyle.elbow+";");return x=null!=this.currentEdgeStyle.html?x+("html="+this.currentEdgeStyle.html+";"):x+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var x=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,O){O=null!=O?O:{};for(var P=0;P<x.length;P++){var X=x[P];O[mxObjectIdentity.get(X)]=X.getId();for(var ba=this.model.getChildCount(X),
-W=0;W<ba;W++)this.createCellLookup([this.model.getChildAt(X,W)],O)}return O};Graph.prototype.createCellMapping=function(x,O,P){P=null!=P?P:{};for(var X in x){var ba=O[X];null==P[ba]&&(P[ba]=x[X].getId()||"")}return P};Graph.prototype.importGraphModel=function(x,O,P,X){O=null!=O?O:0;P=null!=P?P:0;var ba=new mxCodec(x.ownerDocument),W=new mxGraphModel;ba.decode(x,W);x=[];ba={};var ea={},ta=W.getChildren(this.cloneCell(W.root,this.isCloneInvalidEdges(),ba));if(null!=ta){var qa=this.createCellLookup([W.root]);
-ta=ta.slice();this.model.beginUpdate();try{if(1!=ta.length||this.isCellLocked(this.getDefaultParent()))for(W=0;W<ta.length;W++)va=this.model.getChildren(this.moveCells([ta[W]],O,P,!1,this.model.getRoot())[0]),null!=va&&(x=x.concat(va));else{var va=W.getChildren(ta[0]);null!=va&&(x=this.moveCells(va,O,P,!1,this.getDefaultParent()),ea[W.getChildAt(W.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(ba,qa,ea),this.updateCustomLinks(ea,x),X)){this.isGridEnabled()&&
-(O=this.snap(O),P=this.snap(P));var Ea=this.getBoundingBoxFromGeometry(x,!0);null!=Ea&&this.moveCells(x,O-Ea.x,P-Ea.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var O={},P=this.cloneCells(x,null,O),X=new mxDictionary,ba=0;ba<x.length;ba++)X.put(x[ba],!0);var W=new mxCodec,ea=new mxGraphModel,ta=ea.getChildAt(ea.getRoot(),0);for(ba=0;ba<P.length;ba++){ea.add(ta,P[ba]);var qa=this.view.getState(x[ba]);if(null!=qa){var va=this.getCellGeometry(P[ba]);null!=
-va&&va.relative&&!this.model.isEdge(x[ba])&&null==X.get(this.model.getParent(x[ba]))&&(va.offset=null,va.relative=!1,va.x=qa.x/qa.view.scale-qa.view.translate.x,va.y=qa.y/qa.view.scale-qa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(O,this.createCellLookup(x)),P);return W.encode(ea)};Graph.prototype.isSwimlane=function(x,O){var P=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(P=this.getCurrentCellStyle(x,O)[mxConstants.STYLE_SHAPE]);return P==
-mxConstants.SHAPE_SWIMLANE||"table"==P||"tableRow"==P};var M=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var O=this.model.getParent(x);if(null!=O){var P=this.getCurrentCellStyle(O);if(null!=P.expand)return"0"!=P.expand}return M.apply(this,arguments)&&(null==O||!this.isTable(O))};var S=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(x,O,P,X,ba,W,ea,ta){null==ta&&(ta=this.model.getParent(x),this.isTable(ta)||this.isTableRow(ta))&&(ta=this.getCellAt(W,ea,null,
-!0,!1));P=null;this.model.beginUpdate();try{P=S.apply(this,[x,O,P,X,ba,W,ea,ta]);this.model.setValue(P,"");var qa=this.getChildCells(P,!0);for(O=0;O<qa.length;O++){var va=this.getCellGeometry(qa[O]);null!=va&&va.relative&&0<va.x&&this.model.remove(qa[O])}var Ea=this.getChildCells(x,!0);for(O=0;O<Ea.length;O++)va=this.getCellGeometry(Ea[O]),null!=va&&va.relative&&0>=va.x&&this.model.remove(Ea[O]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[P]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
-mxConstants.NONE,[P]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[x]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[x]);var Ca=this.model.getTerminal(P,!1);if(null!=Ca){var Ma=this.getCurrentCellStyle(Ca);null!=Ma&&"1"==Ma.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[P]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[P]))}}finally{this.model.endUpdate()}return P};
-var H=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,O,P){if(O||P)H.apply(this,arguments);else{var X=this.getSelectionCell(),ba=null,W=[],ea=mxUtils.bind(this,function(ta){if(null!=this.view.getState(ta)&&(this.model.isVertex(ta)||this.model.isEdge(ta)))if(W.push(ta),ta==X)ba=W.length-1;else if(x&&null==X&&0<W.length||null!=ba&&x&&W.length>ba||!x&&0<ba)return;for(var qa=0;qa<this.model.getChildCount(ta);qa++)ea(this.model.getChildAt(ta,qa))});ea(this.model.root);0<W.length&&(ba=
-null!=ba?mxUtils.mod(ba+(x?1:-1),W.length):0,this.setSelectionCell(W[ba]))}};Graph.prototype.swapShapes=function(x,O,P,X,ba,W,ea){O=!1;if(!X&&null!=ba&&1==x.length&&(X=this.view.getState(ba),P=this.view.getState(x[0]),null!=X&&null!=P&&(null!=W&&mxEvent.isShiftDown(W)||"umlLifeline"==X.style.shape&&"umlLifeline"==P.style.shape)&&(X=this.getCellGeometry(ba),W=this.getCellGeometry(x[0]),null!=X&&null!=W))){O=X.clone();X=W.clone();X.x=O.x;X.y=O.y;O.x=W.x;O.y=W.y;this.model.beginUpdate();try{this.model.setGeometry(ba,
-O),this.model.setGeometry(x[0],X)}finally{this.model.endUpdate()}O=!0}return O};var K=Graph.prototype.moveCells;Graph.prototype.moveCells=function(x,O,P,X,ba,W,ea){if(this.swapShapes(x,O,P,X,ba,W,ea))return x;ea=null!=ea?ea:{};if(this.isTable(ba)){for(var ta=[],qa=0;qa<x.length;qa++)this.isTable(x[qa])?ta=ta.concat(this.model.getChildCells(x[qa],!0).reverse()):ta.push(x[qa]);x=ta}this.model.beginUpdate();try{ta=[];for(qa=0;qa<x.length;qa++)if(null!=ba&&this.isTableRow(x[qa])){var va=this.model.getParent(x[qa]),
-Ea=this.getCellGeometry(x[qa]);this.isTable(va)&&ta.push(va);if(null!=va&&null!=Ea&&this.isTable(va)&&this.isTable(ba)&&(X||va!=ba)){if(!X){var Ca=this.getCellGeometry(va);null!=Ca&&(Ca=Ca.clone(),Ca.height-=Ea.height,this.model.setGeometry(va,Ca))}Ca=this.getCellGeometry(ba);null!=Ca&&(Ca=Ca.clone(),Ca.height+=Ea.height,this.model.setGeometry(ba,Ca));var Ma=this.model.getChildCells(ba,!0);if(0<Ma.length){x[qa]=X?this.cloneCell(x[qa]):x[qa];var Sa=this.model.getChildCells(x[qa],!0),Qa=this.model.getChildCells(Ma[0],
-!0),Fa=Qa.length-Sa.length;if(0<Fa)for(var Ka=0;Ka<Fa;Ka++){var Pa=this.cloneCell(Sa[Sa.length-1]);null!=Pa&&(Pa.value="",this.model.add(x[qa],Pa))}else if(0>Fa)for(Ka=0;Ka>Fa;Ka--)this.model.remove(Sa[Sa.length+Ka-1]);Sa=this.model.getChildCells(x[qa],!0);for(Ka=0;Ka<Qa.length;Ka++){var $a=this.getCellGeometry(Qa[Ka]),eb=this.getCellGeometry(Sa[Ka]);null!=$a&&null!=eb&&(eb=eb.clone(),eb.width=$a.width,this.model.setGeometry(Sa[Ka],eb))}}}}var cb=K.apply(this,arguments);for(qa=0;qa<ta.length;qa++)!X&&
-this.model.contains(ta[qa])&&0==this.model.getChildCount(ta[qa])&&this.model.remove(ta[qa]);X&&this.updateCustomLinks(this.createCellMapping(ea,this.createCellLookup(x)),cb)}finally{this.model.endUpdate()}return cb};var Q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,O){var P=[];this.model.beginUpdate();try{for(var X=0;X<x.length;X++)if(this.isTableCell(x[X])){var ba=this.model.getParent(x[X]),W=this.model.getParent(ba);1==this.model.getChildCount(ba)&&1==this.model.getChildCount(W)?
-0>mxUtils.indexOf(x,W)&&0>mxUtils.indexOf(P,W)&&P.push(W):this.labelChanged(x[X],"")}else{if(this.isTableRow(x[X])&&(W=this.model.getParent(x[X]),0>mxUtils.indexOf(x,W)&&0>mxUtils.indexOf(P,W))){for(var ea=this.model.getChildCells(W,!0),ta=0,qa=0;qa<ea.length;qa++)0<=mxUtils.indexOf(x,ea[qa])&&ta++;ta==ea.length&&P.push(W)}P.push(x[X])}P=Q.apply(this,[P,O])}finally{this.model.endUpdate()}return P};Graph.prototype.updateCustomLinks=function(x,O,P){P=null!=P?P:new Graph;for(var X=0;X<O.length;X++)null!=
-O[X]&&P.updateCustomLinksForCell(x,O[X],P)};Graph.prototype.updateCustomLinksForCell=function(x,O){this.doUpdateCustomLinksForCell(x,O);for(var P=this.model.getChildCount(O),X=0;X<P;X++)this.updateCustomLinksForCell(x,this.model.getChildAt(O,X))};Graph.prototype.doUpdateCustomLinksForCell=function(x,O){};Graph.prototype.getAllConnectionConstraints=function(x,O){if(null!=x){O=mxUtils.getValue(x.style,"points",null);if(null!=O){x=[];try{var P=JSON.parse(O);for(O=0;O<P.length;O++){var X=P[O];x.push(new mxConnectionConstraint(new mxPoint(X[0],
-X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(W){}return x}if(null!=x.shape&&null!=x.shape.bounds){X=x.shape.direction;O=x.shape.bounds;var ba=x.shape.scale;P=O.width/ba;O=O.height/ba;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=P,P=O,O=X;O=x.shape.getConstraints(x.style,P,O);if(null!=O)return O;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};
-Graph.prototype.flipEdge=function(x){if(null!=x){var O=this.getCurrentCellStyle(x);O=mxUtils.getValue(O,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,O,[x])}};Graph.prototype.isValidRoot=function(x){for(var O=this.model.getChildCount(x),P=0,X=0;X<O;X++){var ba=this.model.getChildAt(x,X);this.model.isVertex(ba)&&(ba=this.getCellGeometry(ba),null==ba||ba.relative||
-P++)}return 0<P||this.isContainer(x)};Graph.prototype.isValidDropTarget=function(x,O,P){for(var X=this.getCurrentCellStyle(x),ba=!0,W=!0,ea=0;ea<O.length&&W;ea++)ba=ba&&this.isTable(O[ea]),W=W&&this.isTableRow(O[ea]);return(1==O.length&&null!=P&&mxEvent.isShiftDown(P)&&!mxEvent.isControlDown(P)&&!mxEvent.isAltDown(P)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&
-!this.isTableRow(x)&&(!this.isTable(x)||W||ba))&&!this.isCellLocked(x)};Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var O=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(O&&null!=x&&null!=this.layoutManager){var P=this.model.getParent(x);null!=P&&(P=this.layoutManager.getLayout(P),null!=P&&P.constructor==mxStackLayout&&(O=!1))}return O};Graph.prototype.getPreferredSizeForCell=
-function(x){var O=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=O&&(O.width+=10,O.height+=4,this.gridEnabled&&(O.width=this.snap(O.width),O.height=this.snap(O.height)));return O};Graph.prototype.turnShapes=function(x,O){var P=this.getModel(),X=[];P.beginUpdate();try{for(var ba=0;ba<x.length;ba++){var W=x[ba];if(P.isEdge(W)){var ea=P.getTerminal(W,!0),ta=P.getTerminal(W,!1);P.setTerminal(W,ta,!0);P.setTerminal(W,ea,!1);var qa=P.getGeometry(W);if(null!=qa){qa=qa.clone();null!=
+!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(y){return!mxEvent.isAltDown(y)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(y){return k.apply(this,arguments)||this.graph.isTableRow(y)||this.graph.isTableCell(y)};var l=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(y){return l.apply(this,arguments)||
+this.graph.isEdgeIgnored(y)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(y){return this.graph.isCloneEvent(y)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var y=new mxEllipse(null,this.highlightColor,this.highlightColor,0);y.opacity=mxConstants.HIGHLIGHT_OPACITY;return y};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
+function(y){y=this.graph.createCurrentEdgeStyle();y=this.graph.createEdge(null,null,null,null,null,y);y=new mxCellState(this.graph.view,y,this.graph.getCellStyle(y));for(var O in this.graph.currentEdgeStyle)y.style[O]=this.graph.currentEdgeStyle[O];y.style=this.graph.postProcessCellStyle(y.cell,y.style);return y};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var y=p.apply(this,arguments);y.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+return y};mxConnectionHandler.prototype.updatePreview=function(y){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=E.apply(this,arguments),O=y.getCell;y.getCell=mxUtils.bind(this,function(P){var X=O.apply(this,arguments);this.error=null;return X});return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var y="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",O="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),P=0;P<O.length;P++)null!=this.currentEdgeStyle[O[P]]&&(y+=O[P]+"="+this.currentEdgeStyle[O[P]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+(y+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?y+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(y+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(y+="elbow="+this.currentEdgeStyle.elbow+";");return y=null!=this.currentEdgeStyle.html?y+("html="+this.currentEdgeStyle.html+";"):y+"html=1;"};
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var y=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,O){O=null!=O?O:{};for(var P=0;P<y.length;P++){var X=y[P];O[mxObjectIdentity.get(X)]=X.getId();for(var ba=this.model.getChildCount(X),
+W=0;W<ba;W++)this.createCellLookup([this.model.getChildAt(X,W)],O)}return O};Graph.prototype.createCellMapping=function(y,O,P){P=null!=P?P:{};for(var X in y){var ba=O[X];null==P[ba]&&(P[ba]=y[X].getId()||"")}return P};Graph.prototype.importGraphModel=function(y,O,P,X){O=null!=O?O:0;P=null!=P?P:0;var ba=new mxCodec(y.ownerDocument),W=new mxGraphModel;ba.decode(y,W);y=[];ba={};var ea={},ta=W.getChildren(this.cloneCell(W.root,this.isCloneInvalidEdges(),ba));if(null!=ta){var qa=this.createCellLookup([W.root]);
+ta=ta.slice();this.model.beginUpdate();try{if(1!=ta.length||this.isCellLocked(this.getDefaultParent()))for(W=0;W<ta.length;W++)va=this.model.getChildren(this.moveCells([ta[W]],O,P,!1,this.model.getRoot())[0]),null!=va&&(y=y.concat(va));else{var va=W.getChildren(ta[0]);null!=va&&(y=this.moveCells(va,O,P,!1,this.getDefaultParent()),ea[W.getChildAt(W.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(ba,qa,ea),this.updateCustomLinks(ea,y),X)){this.isGridEnabled()&&
+(O=this.snap(O),P=this.snap(P));var Ea=this.getBoundingBoxFromGeometry(y,!0);null!=Ea&&this.moveCells(y,O-Ea.x,P-Ea.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var O={},P=this.cloneCells(y,null,O),X=new mxDictionary,ba=0;ba<y.length;ba++)X.put(y[ba],!0);var W=new mxCodec,ea=new mxGraphModel,ta=ea.getChildAt(ea.getRoot(),0);for(ba=0;ba<P.length;ba++){ea.add(ta,P[ba]);var qa=this.view.getState(y[ba]);if(null!=qa){var va=this.getCellGeometry(P[ba]);null!=
+va&&va.relative&&!this.model.isEdge(y[ba])&&null==X.get(this.model.getParent(y[ba]))&&(va.offset=null,va.relative=!1,va.x=qa.x/qa.view.scale-qa.view.translate.x,va.y=qa.y/qa.view.scale-qa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(O,this.createCellLookup(y)),P);return W.encode(ea)};Graph.prototype.isSwimlane=function(y,O){var P=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(P=this.getCurrentCellStyle(y,O)[mxConstants.STYLE_SHAPE]);return P==
+mxConstants.SHAPE_SWIMLANE||"table"==P||"tableRow"==P};var M=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var O=this.model.getParent(y);if(null!=O){var P=this.getCurrentCellStyle(O);if(null!=P.expand)return"0"!=P.expand}return M.apply(this,arguments)&&(null==O||!this.isTable(O))};var S=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(y,O,P,X,ba,W,ea,ta){null==ta&&(ta=this.model.getParent(y),this.isTable(ta)||this.isTableRow(ta))&&(ta=this.getCellAt(W,ea,null,
+!0,!1));P=null;this.model.beginUpdate();try{P=S.apply(this,[y,O,P,X,ba,W,ea,ta]);this.model.setValue(P,"");var qa=this.getChildCells(P,!0);for(O=0;O<qa.length;O++){var va=this.getCellGeometry(qa[O]);null!=va&&va.relative&&0<va.x&&this.model.remove(qa[O])}var Ea=this.getChildCells(y,!0);for(O=0;O<Ea.length;O++)va=this.getCellGeometry(Ea[O]),null!=va&&va.relative&&0>=va.x&&this.model.remove(Ea[O]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[P]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
+mxConstants.NONE,[P]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[y]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[y]);var Ca=this.model.getTerminal(P,!1);if(null!=Ca){var Ma=this.getCurrentCellStyle(Ca);null!=Ma&&"1"==Ma.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[P]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[P]))}}finally{this.model.endUpdate()}return P};
+var H=Graph.prototype.selectCell;Graph.prototype.selectCell=function(y,O,P){if(O||P)H.apply(this,arguments);else{var X=this.getSelectionCell(),ba=null,W=[],ea=mxUtils.bind(this,function(ta){if(null!=this.view.getState(ta)&&(this.model.isVertex(ta)||this.model.isEdge(ta)))if(W.push(ta),ta==X)ba=W.length-1;else if(y&&null==X&&0<W.length||null!=ba&&y&&W.length>ba||!y&&0<ba)return;for(var qa=0;qa<this.model.getChildCount(ta);qa++)ea(this.model.getChildAt(ta,qa))});ea(this.model.root);0<W.length&&(ba=
+null!=ba?mxUtils.mod(ba+(y?1:-1),W.length):0,this.setSelectionCell(W[ba]))}};Graph.prototype.swapShapes=function(y,O,P,X,ba,W,ea){O=!1;if(!X&&null!=ba&&1==y.length&&(X=this.view.getState(ba),P=this.view.getState(y[0]),null!=X&&null!=P&&(null!=W&&mxEvent.isShiftDown(W)||"umlLifeline"==X.style.shape&&"umlLifeline"==P.style.shape)&&(X=this.getCellGeometry(ba),W=this.getCellGeometry(y[0]),null!=X&&null!=W))){O=X.clone();X=W.clone();X.x=O.x;X.y=O.y;O.x=W.x;O.y=W.y;this.model.beginUpdate();try{this.model.setGeometry(ba,
+O),this.model.setGeometry(y[0],X)}finally{this.model.endUpdate()}O=!0}return O};var K=Graph.prototype.moveCells;Graph.prototype.moveCells=function(y,O,P,X,ba,W,ea){if(this.swapShapes(y,O,P,X,ba,W,ea))return y;ea=null!=ea?ea:{};if(this.isTable(ba)){for(var ta=[],qa=0;qa<y.length;qa++)this.isTable(y[qa])?ta=ta.concat(this.model.getChildCells(y[qa],!0).reverse()):ta.push(y[qa]);y=ta}this.model.beginUpdate();try{ta=[];for(qa=0;qa<y.length;qa++)if(null!=ba&&this.isTableRow(y[qa])){var va=this.model.getParent(y[qa]),
+Ea=this.getCellGeometry(y[qa]);this.isTable(va)&&ta.push(va);if(null!=va&&null!=Ea&&this.isTable(va)&&this.isTable(ba)&&(X||va!=ba)){if(!X){var Ca=this.getCellGeometry(va);null!=Ca&&(Ca=Ca.clone(),Ca.height-=Ea.height,this.model.setGeometry(va,Ca))}Ca=this.getCellGeometry(ba);null!=Ca&&(Ca=Ca.clone(),Ca.height+=Ea.height,this.model.setGeometry(ba,Ca));var Ma=this.model.getChildCells(ba,!0);if(0<Ma.length){y[qa]=X?this.cloneCell(y[qa]):y[qa];var Sa=this.model.getChildCells(y[qa],!0),Qa=this.model.getChildCells(Ma[0],
+!0),Fa=Qa.length-Sa.length;if(0<Fa)for(var Ka=0;Ka<Fa;Ka++){var Pa=this.cloneCell(Sa[Sa.length-1]);null!=Pa&&(Pa.value="",this.model.add(y[qa],Pa))}else if(0>Fa)for(Ka=0;Ka>Fa;Ka--)this.model.remove(Sa[Sa.length+Ka-1]);Sa=this.model.getChildCells(y[qa],!0);for(Ka=0;Ka<Qa.length;Ka++){var $a=this.getCellGeometry(Qa[Ka]),eb=this.getCellGeometry(Sa[Ka]);null!=$a&&null!=eb&&(eb=eb.clone(),eb.width=$a.width,this.model.setGeometry(Sa[Ka],eb))}}}}var cb=K.apply(this,arguments);for(qa=0;qa<ta.length;qa++)!X&&
+this.model.contains(ta[qa])&&0==this.model.getChildCount(ta[qa])&&this.model.remove(ta[qa]);X&&this.updateCustomLinks(this.createCellMapping(ea,this.createCellLookup(y)),cb)}finally{this.model.endUpdate()}return cb};var Q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,O){var P=[];this.model.beginUpdate();try{for(var X=0;X<y.length;X++)if(this.isTableCell(y[X])){var ba=this.model.getParent(y[X]),W=this.model.getParent(ba);1==this.model.getChildCount(ba)&&1==this.model.getChildCount(W)?
+0>mxUtils.indexOf(y,W)&&0>mxUtils.indexOf(P,W)&&P.push(W):this.labelChanged(y[X],"")}else{if(this.isTableRow(y[X])&&(W=this.model.getParent(y[X]),0>mxUtils.indexOf(y,W)&&0>mxUtils.indexOf(P,W))){for(var ea=this.model.getChildCells(W,!0),ta=0,qa=0;qa<ea.length;qa++)0<=mxUtils.indexOf(y,ea[qa])&&ta++;ta==ea.length&&P.push(W)}P.push(y[X])}P=Q.apply(this,[P,O])}finally{this.model.endUpdate()}return P};Graph.prototype.updateCustomLinks=function(y,O,P){P=null!=P?P:new Graph;for(var X=0;X<O.length;X++)null!=
+O[X]&&P.updateCustomLinksForCell(y,O[X],P)};Graph.prototype.updateCustomLinksForCell=function(y,O){this.doUpdateCustomLinksForCell(y,O);for(var P=this.model.getChildCount(O),X=0;X<P;X++)this.updateCustomLinksForCell(y,this.model.getChildAt(O,X))};Graph.prototype.doUpdateCustomLinksForCell=function(y,O){};Graph.prototype.getAllConnectionConstraints=function(y,O){if(null!=y){O=mxUtils.getValue(y.style,"points",null);if(null!=O){y=[];try{var P=JSON.parse(O);for(O=0;O<P.length;O++){var X=P[O];y.push(new mxConnectionConstraint(new mxPoint(X[0],
+X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(W){}return y}if(null!=y.shape&&null!=y.shape.bounds){X=y.shape.direction;O=y.shape.bounds;var ba=y.shape.scale;P=O.width/ba;O=O.height/ba;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=P,P=O,O=X;O=y.shape.getConstraints(y.style,P,O);if(null!=O)return O;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};
+Graph.prototype.flipEdge=function(y){if(null!=y){var O=this.getCurrentCellStyle(y);O=mxUtils.getValue(O,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,O,[y])}};Graph.prototype.isValidRoot=function(y){for(var O=this.model.getChildCount(y),P=0,X=0;X<O;X++){var ba=this.model.getChildAt(y,X);this.model.isVertex(ba)&&(ba=this.getCellGeometry(ba),null==ba||ba.relative||
+P++)}return 0<P||this.isContainer(y)};Graph.prototype.isValidDropTarget=function(y,O,P){for(var X=this.getCurrentCellStyle(y),ba=!0,W=!0,ea=0;ea<O.length&&W;ea++)ba=ba&&this.isTable(O[ea]),W=W&&this.isTableRow(O[ea]);return(1==O.length&&null!=P&&mxEvent.isShiftDown(P)&&!mxEvent.isControlDown(P)&&!mxEvent.isAltDown(P)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(y))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&
+!this.isTableRow(y)&&(!this.isTable(y)||W||ba))&&!this.isCellLocked(y)};Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var O=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(O&&null!=y&&null!=this.layoutManager){var P=this.model.getParent(y);null!=P&&(P=this.layoutManager.getLayout(P),null!=P&&P.constructor==mxStackLayout&&(O=!1))}return O};Graph.prototype.getPreferredSizeForCell=
+function(y){var O=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=O&&(O.width+=10,O.height+=4,this.gridEnabled&&(O.width=this.snap(O.width),O.height=this.snap(O.height)));return O};Graph.prototype.turnShapes=function(y,O){var P=this.getModel(),X=[];P.beginUpdate();try{for(var ba=0;ba<y.length;ba++){var W=y[ba];if(P.isEdge(W)){var ea=P.getTerminal(W,!0),ta=P.getTerminal(W,!1);P.setTerminal(W,ta,!0);P.setTerminal(W,ea,!1);var qa=P.getGeometry(W);if(null!=qa){qa=qa.clone();null!=
qa.points&&qa.points.reverse();var va=qa.getTerminalPoint(!0),Ea=qa.getTerminalPoint(!1);qa.setTerminalPoint(va,!1);qa.setTerminalPoint(Ea,!0);P.setGeometry(W,qa);var Ca=this.view.getState(W),Ma=this.view.getState(ea),Sa=this.view.getState(ta);if(null!=Ca){var Qa=null!=Ma?this.getConnectionConstraint(Ca,Ma,!0):null,Fa=null!=Sa?this.getConnectionConstraint(Ca,Sa,!1):null;this.setConnectionConstraint(W,ea,!0,Fa);this.setConnectionConstraint(W,ta,!1,Qa);var Ka=mxUtils.getValue(Ca.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);
this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ca.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[W]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ka,[W])}X.push(W)}}else if(P.isVertex(W)&&(qa=this.getCellGeometry(W),null!=qa)){if(!(this.isTable(W)||this.isTableRow(W)||this.isTableCell(W)||this.isSwimlane(W))){qa=qa.clone();qa.x+=qa.width/2-qa.height/2;qa.y+=qa.height/2-qa.width/2;var Pa=qa.width;qa.width=qa.height;qa.height=Pa;P.setGeometry(W,qa)}var $a=
-this.view.getState(W);if(null!=$a){var eb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],cb=mxUtils.getValue($a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,eb[mxUtils.mod(mxUtils.indexOf(eb,cb)+(O?-1:1),eb.length)],[W])}X.push(W)}}}finally{P.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=
-x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;x=x.nextSibling}return!1};var e=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var O=x.cell;this.isTableCell(O)&&(O=this.model.getParent(O));this.isTableRow(O)&&(O=this.model.getParent(O));var P=this.view.getState(O);null!=P&&null!=
-P.shape&&(this.view.invalidate(O),P.shape.bounds=null)}e.apply(this,arguments);x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var O=0;O<x.length;O++){var P=this.view.getState(x[O]);null!=P&&null!=P.shape&&null!=P.shape.stencil&&this.stencilHasPlaceholders(P.shape.stencil)?this.removeStateForCell(x[O]):
-this.isReplacePlaceholders(x[O])&&this.view.invalidate(x[O],!1,!1)}};Graph.prototype.replaceElement=function(x,O){O=x.ownerDocument.createElement(null!=O?O:"span");for(var P=Array.prototype.slice.call(x.attributes);attr=P.pop();)O.setAttribute(attr.nodeName,attr.nodeValue);O.innerHTML=x.innerHTML;x.parentNode.replaceChild(O,x)};Graph.prototype.processElements=function(x,O){if(null!=x){x=x.getElementsByTagName("*");for(var P=0;P<x.length;P++)O(x[P])}};Graph.prototype.updateLabelElements=function(x,
-O,P){x=null!=x?x:this.getSelectionCells();for(var X=document.createElement("div"),ba=0;ba<x.length;ba++)if(this.isHtmlLabel(x[ba])){var W=this.convertValueToString(x[ba]);if(null!=W&&0<W.length){X.innerHTML=W;for(var ea=X.getElementsByTagName(null!=P?P:"*"),ta=0;ta<ea.length;ta++)O(ea[ta]);X.innerHTML!=W&&this.cellLabelChanged(x[ba],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,O,P){O=Graph.zapGremlins(O);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&
-null!=x.getAttribute("placeholder"))for(var X=x.getAttribute("placeholder"),ba=x;null!=ba;){if(ba==this.model.getRoot()||null!=ba.value&&"object"==typeof ba.value&&ba.hasAttribute(X)){this.setAttributeForCell(ba,X,O);break}ba=this.model.getParent(ba)}var W=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&W.hasAttribute("label_"+Graph.diagramLanguage)?W.setAttribute("label_"+Graph.diagramLanguage,O):W.setAttribute("label",O);O=W}mxGraph.prototype.cellLabelChanged.apply(this,
-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=x){for(var O=new mxDictionary,P=0;P<x.length;P++)O.put(x[P],!0);var X=[];for(P=0;P<x.length;P++){var ba=this.model.getParent(x[P]);null==ba||O.get(ba)||(O.put(ba,!0),X.push(ba))}for(P=0;P<X.length;P++)if(ba=this.view.getState(X[P]),null!=ba&&(this.model.isEdge(ba.cell)||this.model.isVertex(ba.cell))&&this.isCellDeletable(ba.cell)&&this.isTransparentState(ba)){for(var W=!0,ea=0;ea<this.model.getChildCount(ba.cell)&&
-W;ea++)O.get(this.model.getChildAt(ba.cell,ea))||(W=!1);W&&x.push(ba.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var O=[],P=0;P<x.length;P++)this.isCellDeletable(x[P])&&this.isTransparentState(this.view.getState(x[P]))&&O.push(x[P]);x=O;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,O){this.setAttributeForCell(x,"link",O)};Graph.prototype.setTooltipForCell=function(x,
-O){var P="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(P="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,P,O)};Graph.prototype.getAttributeForCell=function(x,O,P){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(O):null;return null!=x?x:P};Graph.prototype.setAttributeForCell=function(x,O,P){if(null!=x.value&&"object"==typeof x.value)var X=x.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),
-X.setAttribute("label",x.value||"");null!=P?X.setAttribute(O,P):X.removeAttribute(O);this.model.setValue(x,X)};var f=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,O,P,X){this.getModel();if(mxEvent.isAltDown(O))return null;for(var ba=0;ba<x.length;ba++){var W=this.model.getParent(x[ba]);if(this.model.isEdge(W)&&0>mxUtils.indexOf(x,W))return null}W=f.apply(this,arguments);var ea=!0;for(ba=0;ba<x.length&&ea;ba++)ea=ea&&this.isTableRow(x[ba]);ea&&(this.isTableCell(W)&&(W=this.model.getParent(W)),
-this.isTableRow(W)&&(W=this.model.getParent(W)),this.isTable(W)||(W=null));return W};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};Graph.prototype.dblClick=function(x,O){this.isEnabled()&&(O=this.insertTextForEvent(x,O),mxGraph.prototype.dblClick.call(this,x,O))};Graph.prototype.insertTextForEvent=function(x,O){var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=
-x&&!this.model.isVertex(O)){var X=this.model.isEdge(O)?this.view.getState(O):null,ba=mxEvent.getSource(x);this.firstClickState!=X||this.firstClickSource!=ba||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,P.x,P.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(x)))||(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ba==this.view.getCanvas().ownerSVGElement)||(null==
-X&&(X=this.view.getState(this.getCellAt(P.x,P.y))),O=this.addText(P.x,P.y,X))}return O};Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),O=this.container.scrollLeft/this.view.scale-this.view.translate.x,P=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),ba=this.getPageSize();O=Math.max(O,X.x*ba.width);P=Math.max(P,X.y*ba.height)}return new mxPoint(this.snap(O+x),this.snap(P+x))};Graph.prototype.getFreeInsertPoint=function(){var x=
-this.view,O=this.getGraphBounds(),P=this.getInsertPoint(),X=this.snap(Math.round(Math.max(P.x,O.x/x.scale-x.translate.x+(0==O.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(P.y,(O.y+O.height)/x.scale-x.translate.y+2*this.gridSize)));return new mxPoint(X,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x: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-
-x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(x,O,P){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,
-0,0,0);X.vertex=!0;if(null!=P&&this.model.isEdge(P.cell)){X.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";X.geometry.relative=!0;X.connectable=!1;var ba=this.view.getRelativePoint(P,x,O);X.geometry.x=Math.round(1E4*ba.x)/1E4;X.geometry.y=Math.round(ba.y);X.geometry.offset=new mxPoint(0,0);ba=this.view.getPoint(P,X.geometry);var W=this.view.scale;X.geometry.offset=new mxPoint(Math.round((x-ba.x)/W),Math.round((O-ba.y)/W))}else ba=this.view.translate,X.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
-X.geometry.width=40,X.geometry.height=20,X.geometry.x=Math.round(x/this.view.scale)-ba.x-(null!=P?P.origin.x:0),X.geometry.y=Math.round(O/this.view.scale)-ba.y-(null!=P?P.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=P?P.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(x,O,P){var X=mxUtils.bind(this,function(){var qa=this.container.getElementsByTagName("a");
-if(null!=qa)for(var va=0;va<qa.length;va++){var Ea=this.getAbsoluteUrl(qa[va].getAttribute("href"));null!=Ea&&(qa[va].setAttribute("rel",this.linkRelation),qa[va].setAttribute("href",Ea),null!=O&&mxEvent.addGestureListeners(qa[va],null,null,O))}});this.model.addListener(mxEvent.CHANGE,X);X();var ba=this.container.style.cursor,W=this.getTolerance(),ea=this,ta={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&x!=mxConstants.NONE?new mxCellHighlight(ea,x,4):null,startX:0,
+this.view.getState(W);if(null!=$a){var eb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],cb=mxUtils.getValue($a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,eb[mxUtils.mod(mxUtils.indexOf(eb,cb)+(O?-1:1),eb.length)],[W])}X.push(W)}}}finally{P.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=
+y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0;y=y.nextSibling}return!1};var d=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var O=y.cell;this.isTableCell(O)&&(O=this.model.getParent(O));this.isTableRow(O)&&(O=this.model.getParent(O));var P=this.view.getState(O);null!=P&&null!=
+P.shape&&(this.view.invalidate(O),P.shape.bounds=null)}d.apply(this,arguments);y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var O=0;O<y.length;O++){var P=this.view.getState(y[O]);null!=P&&null!=P.shape&&null!=P.shape.stencil&&this.stencilHasPlaceholders(P.shape.stencil)?this.removeStateForCell(y[O]):
+this.isReplacePlaceholders(y[O])&&this.view.invalidate(y[O],!1,!1)}};Graph.prototype.replaceElement=function(y,O){O=y.ownerDocument.createElement(null!=O?O:"span");for(var P=Array.prototype.slice.call(y.attributes);attr=P.pop();)O.setAttribute(attr.nodeName,attr.nodeValue);O.innerHTML=y.innerHTML;y.parentNode.replaceChild(O,y)};Graph.prototype.processElements=function(y,O){if(null!=y){y=y.getElementsByTagName("*");for(var P=0;P<y.length;P++)O(y[P])}};Graph.prototype.updateLabelElements=function(y,
+O,P){y=null!=y?y:this.getSelectionCells();for(var X=document.createElement("div"),ba=0;ba<y.length;ba++)if(this.isHtmlLabel(y[ba])){var W=this.convertValueToString(y[ba]);if(null!=W&&0<W.length){X.innerHTML=W;for(var ea=X.getElementsByTagName(null!=P?P:"*"),ta=0;ta<ea.length;ta++)O(ea[ta]);X.innerHTML!=W&&this.cellLabelChanged(y[ba],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,O,P){O=Graph.zapGremlins(O);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&
+null!=y.getAttribute("placeholder"))for(var X=y.getAttribute("placeholder"),ba=y;null!=ba;){if(ba==this.model.getRoot()||null!=ba.value&&"object"==typeof ba.value&&ba.hasAttribute(X)){this.setAttributeForCell(ba,X,O);break}ba=this.model.getParent(ba)}var W=y.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&W.hasAttribute("label_"+Graph.diagramLanguage)?W.setAttribute("label_"+Graph.diagramLanguage,O):W.setAttribute("label",O);O=W}mxGraph.prototype.cellLabelChanged.apply(this,
+arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(y){if(null!=y){for(var O=new mxDictionary,P=0;P<y.length;P++)O.put(y[P],!0);var X=[];for(P=0;P<y.length;P++){var ba=this.model.getParent(y[P]);null==ba||O.get(ba)||(O.put(ba,!0),X.push(ba))}for(P=0;P<X.length;P++)if(ba=this.view.getState(X[P]),null!=ba&&(this.model.isEdge(ba.cell)||this.model.isVertex(ba.cell))&&this.isCellDeletable(ba.cell)&&this.isTransparentState(ba)){for(var W=!0,ea=0;ea<this.model.getChildCount(ba.cell)&&
+W;ea++)O.get(this.model.getChildAt(ba.cell,ea))||(W=!1);W&&y.push(ba.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var O=[],P=0;P<y.length;P++)this.isCellDeletable(y[P])&&this.isTransparentState(this.view.getState(y[P]))&&O.push(y[P]);y=O;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,O){this.setAttributeForCell(y,"link",O)};Graph.prototype.setTooltipForCell=function(y,
+O){var P="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(P="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,P,O)};Graph.prototype.getAttributeForCell=function(y,O,P){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(O):null;return null!=y?y:P};Graph.prototype.setAttributeForCell=function(y,O,P){if(null!=y.value&&"object"==typeof y.value)var X=y.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),
+X.setAttribute("label",y.value||"");null!=P?X.setAttribute(O,P):X.removeAttribute(O);this.model.setValue(y,X)};var f=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,O,P,X){this.getModel();if(mxEvent.isAltDown(O))return null;for(var ba=0;ba<y.length;ba++){var W=this.model.getParent(y[ba]);if(this.model.isEdge(W)&&0>mxUtils.indexOf(y,W))return null}W=f.apply(this,arguments);var ea=!0;for(ba=0;ba<y.length&&ea;ba++)ea=ea&&this.isTableRow(y[ba]);ea&&(this.isTableCell(W)&&(W=this.model.getParent(W)),
+this.isTableRow(W)&&(W=this.model.getParent(W)),this.isTable(W)||(W=null));return W};Graph.prototype.click=function(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};Graph.prototype.dblClick=function(y,O){this.isEnabled()&&(O=this.insertTextForEvent(y,O),mxGraph.prototype.dblClick.call(this,y,O))};Graph.prototype.insertTextForEvent=function(y,O){var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=
+y&&!this.model.isVertex(O)){var X=this.model.isEdge(O)?this.view.getState(O):null,ba=mxEvent.getSource(y);this.firstClickState!=X||this.firstClickSource!=ba||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,P.x,P.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(y)))||(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ba==this.view.getCanvas().ownerSVGElement)||(null==
+X&&(X=this.view.getState(this.getCellAt(P.x,P.y))),O=this.addText(P.x,P.y,X))}return O};Graph.prototype.getInsertPoint=function(){var y=this.getGridSize(),O=this.container.scrollLeft/this.view.scale-this.view.translate.x,P=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),ba=this.getPageSize();O=Math.max(O,X.x*ba.width);P=Math.max(P,X.y*ba.height)}return new mxPoint(this.snap(O+y),this.snap(P+y))};Graph.prototype.getFreeInsertPoint=function(){var y=
+this.view,O=this.getGraphBounds(),P=this.getInsertPoint(),X=this.snap(Math.round(Math.max(P.x,O.x/y.scale-y.translate.x+(0==O.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(P.y,(O.y+O.height)/y.scale-y.translate.y+2*this.gridSize)));return new mxPoint(X,y)};Graph.prototype.getCenterInsertPoint=function(y){y=null!=y?y: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-
+y.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-y.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(y,O,P){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,
+0,0,0);X.vertex=!0;if(null!=P&&this.model.isEdge(P.cell)){X.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";X.geometry.relative=!0;X.connectable=!1;var ba=this.view.getRelativePoint(P,y,O);X.geometry.x=Math.round(1E4*ba.x)/1E4;X.geometry.y=Math.round(ba.y);X.geometry.offset=new mxPoint(0,0);ba=this.view.getPoint(P,X.geometry);var W=this.view.scale;X.geometry.offset=new mxPoint(Math.round((y-ba.x)/W),Math.round((O-ba.y)/W))}else ba=this.view.translate,X.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
+X.geometry.width=40,X.geometry.height=20,X.geometry.x=Math.round(y/this.view.scale)-ba.x-(null!=P?P.origin.x:0),X.geometry.y=Math.round(O/this.view.scale)-ba.y-(null!=P?P.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=P?P.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(y,O,P){var X=mxUtils.bind(this,function(){var qa=this.container.getElementsByTagName("a");
+if(null!=qa)for(var va=0;va<qa.length;va++){var Ea=this.getAbsoluteUrl(qa[va].getAttribute("href"));null!=Ea&&(qa[va].setAttribute("rel",this.linkRelation),qa[va].setAttribute("href",Ea),null!=O&&mxEvent.addGestureListeners(qa[va],null,null,O))}});this.model.addListener(mxEvent.CHANGE,X);X();var ba=this.container.style.cursor,W=this.getTolerance(),ea=this,ta={currentState:null,currentLink:null,currentTarget:null,highlight:null!=y&&""!=y&&y!=mxConstants.NONE?new mxCellHighlight(ea,y,4):null,startX:0,
startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(qa){var va=qa.sourceState;if(null==va||null==ea.getLinkForCell(va.cell))qa=ea.getCellAt(qa.getGraphX(),qa.getGraphY(),null,null,null,function(Ea,Ca,Ma){return null==ea.getLinkForCell(Ea.cell)}),va=null==va||ea.model.isAncestor(qa,va.cell)?ea.view.getState(qa):null;va!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=va,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(qa,va){this.startX=
va.getGraphX();this.startY=va.getGraphY();this.scrollLeft=ea.container.scrollLeft;this.scrollTop=ea.container.scrollTop;null==this.currentLink&&"auto"==ea.container.style.overflow&&(ea.container.style.cursor="move");this.updateCurrentState(va)},mouseMove:function(qa,va){if(ea.isMouseDown)null!=this.currentLink&&(qa=Math.abs(this.startX-va.getGraphX()),va=Math.abs(this.startY-va.getGraphY()),(qa>W||va>W)&&this.clear());else{for(qa=va.getSource();null!=qa&&"a"!=qa.nodeName.toLowerCase();)qa=qa.parentNode;
null!=qa?this.clear():(null!=ea.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&ea.tooltipHandler.reset(va,!0,this.currentState),(null==this.currentState||va.getState()!=this.currentState&&null!=va.sourceState||!ea.intersects(this.currentState,va.getGraphX(),va.getGraphY()))&&this.updateCurrentState(va))}},mouseUp:function(qa,va){var Ea=va.getSource();for(qa=va.getEvent();null!=Ea&&"a"!=Ea.nodeName.toLowerCase();)Ea=Ea.parentNode;null==Ea&&Math.abs(this.scrollLeft-ea.container.scrollLeft)<
W&&Math.abs(this.scrollTop-ea.container.scrollTop)<W&&(null==va.sourceState||!va.isSource(va.sourceState.control))&&((mxEvent.isLeftMouseButton(qa)||mxEvent.isMiddleMouseButton(qa))&&!mxEvent.isPopupTrigger(qa)||mxEvent.isTouchEvent(qa))&&(null!=this.currentLink?(Ea=ea.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ea||null==O||O(qa,this.currentLink),mxEvent.isConsumed(qa)||(qa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(qa)?"_blank":Ea?ea.linkTarget:
"_top",ea.openLink(this.currentLink,qa),va.consume())):null!=P&&!va.isConsumed()&&Math.abs(this.scrollLeft-ea.container.scrollLeft)<W&&Math.abs(this.scrollTop-ea.container.scrollTop)<W&&Math.abs(this.startX-va.getGraphX())<W&&Math.abs(this.startY-va.getGraphY())<W&&P(va.getEvent()));this.clear()},activate:function(qa){this.currentLink=ea.getAbsoluteUrl(ea.getLinkForCell(qa.cell));null!=this.currentLink&&(this.currentTarget=ea.getLinkTargetForCell(qa.cell),ea.container.style.cursor="pointer",null!=
-this.highlight&&this.highlight.highlight(qa))},clear:function(){null!=ea.container&&(ea.container.style.cursor=ba);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ea.tooltipHandler&&ea.tooltipHandler.hide()}};ea.click=function(qa){};ea.addMouseListener(ta);mxEvent.addListener(document,"mouseleave",function(qa){ta.clear()})};Graph.prototype.duplicateCells=function(x,O){x=null!=x?x:this.getSelectionCells();O=null!=O?O:!0;for(var P=0;P<x.length;P++)this.isTableCell(x[P])&&
-(x[P]=this.model.getParent(x[P]));x=this.model.getTopmostCells(x);var X=this.getModel(),ba=this.gridSize,W=[];X.beginUpdate();try{var ea={},ta=this.createCellLookup(x),qa=this.cloneCells(x,!1,ea,!0);for(P=0;P<x.length;P++){var va=X.getParent(x[P]);if(null!=va){var Ea=this.moveCells([qa[P]],ba,ba,!1)[0];W.push(Ea);if(O)X.add(va,qa[P]);else{var Ca=va.getIndex(x[P]);X.add(va,qa[P],Ca+1)}if(this.isTable(va)){var Ma=this.getCellGeometry(qa[P]),Sa=this.getCellGeometry(va);null!=Ma&&null!=Sa&&(Sa=Sa.clone(),
-Sa.height+=Ma.height,X.setGeometry(va,Sa))}}else W.push(qa[P])}this.updateCustomLinks(this.createCellMapping(ea,ta),qa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",qa))}finally{X.endUpdate()}return W};Graph.prototype.insertImage=function(x,O,P){if(null!=x&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ba=[],W=0;W<X.length;W++)ba.push(X[W]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");
-if(x.length==ba.length+1)for(W=x.length-1;0<=W;W--)if(0==W||x[W]!=ba[W-1]){x[W].setAttribute("width",O);x[W].setAttribute("height",P);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var O=this.cellEditor.textarea.getElementsByTagName("a"),P=[],X=0;X<O.length;X++)P.push(O[X]);document.execCommand("createlink",!1,mxUtils.trim(x));O=this.cellEditor.textarea.getElementsByTagName("a");if(O.length==
-P.length+1)for(X=O.length-1;0<=X;X--)if(O[X]!=P[X-1]){for(O=O[X].getElementsByTagName("a");0<O.length;){for(P=O[0].parentNode;null!=O[0].firstChild;)P.insertBefore(O[0].firstChild,O[0]);P.removeChild(O[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var O=mxGraph.prototype.isCellResizable.apply(this,arguments),P=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(O||"0"!=mxUtils.getValue(P,mxConstants.STYLE_RESIZABLE,
-"1")&&"wrap"==P[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,O,P){null==O&&(O=this.getSelectionCells());if(null!=O&&1<O.length){for(var X=[],ba=null,W=null,ea=0,ta=0;ta<O.length;ta++)if(this.getModel().isVertex(O[ta])){var qa=this.view.getState(O[ta]);if(null!=qa){var va=x?qa.getCenterX():qa.getCenterY();ba=null!=ba?Math.max(ba,va):va;W=null!=W?Math.min(W,va):va;P&&(ea+=x?qa.width:qa.height);X.push(qa)}}if(2<X.length){X.sort(function(Qa,Fa){return x?Qa.x-Fa.x:Qa.y-Fa.y});
-P&&(ea-=x?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);qa=this.view.translate;va=this.view.scale;W=W/va-(x?qa.x:qa.y);ba=ba/va-(x?qa.x:qa.y);this.getModel().beginUpdate();try{var Ea=(ba-W-ea)/(X.length-1),Ca=W+(P?x?X[0].width/2:X[0].height/2:0);for(ta=1;ta<X.length-1;ta++){var Ma=this.view.getState(this.model.getParent(X[ta].cell)),Sa=this.getCellGeometry(X[ta].cell);Ca+=Ea;null!=Sa&&null!=Ma&&(Sa=Sa.clone(),x?Sa.x=Math.round(Ca-(P?0:Sa.width/2))-Ma.origin.x:Sa.y=Math.round(Ca-
-(P?0:Sa.height/2))-Ma.origin.y,this.getModel().setGeometry(X[ta].cell,Sa));P&&(Ca+=x?X[ta].width:X[ta].height)}}finally{this.getModel().endUpdate()}}}return O};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=function(){var x=new mxImageExport;x.getLinkForCellState=mxUtils.bind(this,function(O,P){return this.getLinkForCell(O.cell)});return x};Graph.prototype.parseBackgroundImage=function(x){var O=
-null;null!=x&&0<x.length&&(x=JSON.parse(x),O=new mxImage(x.src,x.width,x.height));return O};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,O,P,X,ba,W,ea,ta,qa,va,Ea,Ca,Ma,Sa){var Qa=null;if(null!=Sa)for(Qa=new mxDictionary,Ea=0;Ea<Sa.length;Ea++)Qa.put(Sa[Ea],!0);if(Sa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{O=null!=O?O:1;P=null!=P?P:0;ba=null!=ba?ba:!0;W=null!=W?W:!0;ea=null!=ea?ea:!0;va=null!=
+this.highlight&&this.highlight.highlight(qa))},clear:function(){null!=ea.container&&(ea.container.style.cursor=ba);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ea.tooltipHandler&&ea.tooltipHandler.hide()}};ea.click=function(qa){};ea.addMouseListener(ta);mxEvent.addListener(document,"mouseleave",function(qa){ta.clear()})};Graph.prototype.duplicateCells=function(y,O){y=null!=y?y:this.getSelectionCells();O=null!=O?O:!0;for(var P=0;P<y.length;P++)this.isTableCell(y[P])&&
+(y[P]=this.model.getParent(y[P]));y=this.model.getTopmostCells(y);var X=this.getModel(),ba=this.gridSize,W=[];X.beginUpdate();try{var ea={},ta=this.createCellLookup(y),qa=this.cloneCells(y,!1,ea,!0);for(P=0;P<y.length;P++){var va=X.getParent(y[P]);if(null!=va){var Ea=this.moveCells([qa[P]],ba,ba,!1)[0];W.push(Ea);if(O)X.add(va,qa[P]);else{var Ca=va.getIndex(y[P]);X.add(va,qa[P],Ca+1)}if(this.isTable(va)){var Ma=this.getCellGeometry(qa[P]),Sa=this.getCellGeometry(va);null!=Ma&&null!=Sa&&(Sa=Sa.clone(),
+Sa.height+=Ma.height,X.setGeometry(va,Sa))}}else W.push(qa[P])}this.updateCustomLinks(this.createCellMapping(ea,ta),qa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",qa))}finally{X.endUpdate()}return W};Graph.prototype.insertImage=function(y,O,P){if(null!=y&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ba=[],W=0;W<X.length;W++)ba.push(X[W]);document.execCommand("insertimage",!1,y);y=this.cellEditor.textarea.getElementsByTagName("img");
+if(y.length==ba.length+1)for(W=y.length-1;0<=W;W--)if(0==W||y[W]!=ba[W-1]){y[W].setAttribute("width",O);y[W].setAttribute("height",P);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var O=this.cellEditor.textarea.getElementsByTagName("a"),P=[],X=0;X<O.length;X++)P.push(O[X]);document.execCommand("createlink",!1,mxUtils.trim(y));O=this.cellEditor.textarea.getElementsByTagName("a");if(O.length==
+P.length+1)for(X=O.length-1;0<=X;X--)if(O[X]!=P[X-1]){for(O=O[X].getElementsByTagName("a");0<O.length;){for(P=O[0].parentNode;null!=O[0].firstChild;)P.insertBefore(O[0].firstChild,O[0]);P.removeChild(O[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(y))};Graph.prototype.isCellResizable=function(y){var O=mxGraph.prototype.isCellResizable.apply(this,arguments),P=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(O||"0"!=mxUtils.getValue(P,mxConstants.STYLE_RESIZABLE,
+"1")&&"wrap"==P[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,O,P){null==O&&(O=this.getSelectionCells());if(null!=O&&1<O.length){for(var X=[],ba=null,W=null,ea=0,ta=0;ta<O.length;ta++)if(this.getModel().isVertex(O[ta])){var qa=this.view.getState(O[ta]);if(null!=qa){var va=y?qa.getCenterX():qa.getCenterY();ba=null!=ba?Math.max(ba,va):va;W=null!=W?Math.min(W,va):va;P&&(ea+=y?qa.width:qa.height);X.push(qa)}}if(2<X.length){X.sort(function(Qa,Fa){return y?Qa.x-Fa.x:Qa.y-Fa.y});
+P&&(ea-=y?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);qa=this.view.translate;va=this.view.scale;W=W/va-(y?qa.x:qa.y);ba=ba/va-(y?qa.x:qa.y);this.getModel().beginUpdate();try{var Ea=(ba-W-ea)/(X.length-1),Ca=W+(P?y?X[0].width/2:X[0].height/2:0);for(ta=1;ta<X.length-1;ta++){var Ma=this.view.getState(this.model.getParent(X[ta].cell)),Sa=this.getCellGeometry(X[ta].cell);Ca+=Ea;null!=Sa&&null!=Ma&&(Sa=Sa.clone(),y?Sa.x=Math.round(Ca-(P?0:Sa.width/2))-Ma.origin.x:Sa.y=Math.round(Ca-
+(P?0:Sa.height/2))-Ma.origin.y,this.getModel().setGeometry(X[ta].cell,Sa));P&&(Ca+=y?X[ta].width:X[ta].height)}}finally{this.getModel().endUpdate()}}}return O};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport=function(){var y=new mxImageExport;y.getLinkForCellState=mxUtils.bind(this,function(O,P){return this.getLinkForCell(O.cell)});return y};Graph.prototype.parseBackgroundImage=function(y){var O=
+null;null!=y&&0<y.length&&(y=JSON.parse(y),O=new mxImage(y.src,y.width,y.height));return O};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,O,P,X,ba,W,ea,ta,qa,va,Ea,Ca,Ma,Sa){var Qa=null;if(null!=Sa)for(Qa=new mxDictionary,Ea=0;Ea<Sa.length;Ea++)Qa.put(Sa[Ea],!0);if(Sa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{O=null!=O?O:1;P=null!=P?P:0;ba=null!=ba?ba:!0;W=null!=W?W:!0;ea=null!=ea?ea:!0;va=null!=
va?va:!1;var Fa="page"==Ma?this.view.getBackgroundPageBounds():W&&null==Qa||X||"diagram"==Ma?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.view.scale;"diagram"==Ma&&null!=this.backgroundImage&&(Fa=mxRectangle.fromRectangle(Fa),Fa.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Ka,(this.view.translate.y+this.backgroundImage.y)*Ka,this.backgroundImage.width*Ka,this.backgroundImage.height*Ka)));if(null==Fa)throw Error(mxResources.get("drawingEmpty"));
-X=O/Ka;Ma=ba?-.5:0;var Pa=Graph.createSvgNode(Ma,Ma,Math.max(1,Math.ceil(Fa.width*X)+2*P)+(va&&0==P?5:0),Math.max(1,Math.ceil(Fa.height*X)+2*P)+(va&&0==P?5:0),x),$a=Pa.ownerDocument,eb=null!=$a.createElementNS?$a.createElementNS(mxConstants.NS_SVG,"g"):$a.createElement("g");Pa.appendChild(eb);var cb=this.createSvgCanvas(eb);cb.foOffset=ba?-.5:0;cb.textOffset=ba?-.5:0;cb.imageOffset=ba?-.5:0;cb.translate(Math.floor(P/O-Fa.x/Ka),Math.floor(P/O-Fa.y/Ka));var db=document.createElement("div"),rb=cb.getAlternateText;
+X=O/Ka;Ma=ba?-.5:0;var Pa=Graph.createSvgNode(Ma,Ma,Math.max(1,Math.ceil(Fa.width*X)+2*P)+(va&&0==P?5:0),Math.max(1,Math.ceil(Fa.height*X)+2*P)+(va&&0==P?5:0),y),$a=Pa.ownerDocument,eb=null!=$a.createElementNS?$a.createElementNS(mxConstants.NS_SVG,"g"):$a.createElement("g");Pa.appendChild(eb);var cb=this.createSvgCanvas(eb);cb.foOffset=ba?-.5:0;cb.textOffset=ba?-.5:0;cb.imageOffset=ba?-.5:0;cb.translate(Math.floor(P/O-Fa.x/Ka),Math.floor(P/O-Fa.y/Ka));var db=document.createElement("div"),rb=cb.getAlternateText;
cb.getAlternateText=function(Za,fb,hb,qb,kb,ib,ub,ob,nb,wb,lb,gb,tb){if(null!=ib&&0<this.state.fontSize)try{mxUtils.isNode(ib)?ib=ib.innerText:(db.innerHTML=ib,ib=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,pb=0;(0==Cb||zb<Cb)&&pb<ib.length;){var yb=ib.charCodeAt(pb);if(10==yb||13==yb){if(0<zb)break}else xb.push(ib.charAt(pb)),255>yb&&zb++;pb++}xb.length<ib.length&&1<ib.length-xb.length&&(ib=mxUtils.trim(xb.join(""))+"...");return ib}catch(Ab){return rb.apply(this,
-arguments)}else return rb.apply(this,arguments)};var mb=this.backgroundImage;if(null!=mb){x=Ka/O;var vb=this.view.translate;Ma=new mxRectangle((mb.x+vb.x)*x,(mb.y+vb.y)*x,mb.width*x,mb.height*x);mxUtils.intersects(Fa,Ma)&&cb.image(mb.x+vb.x,mb.y+vb.y,mb.width,mb.height,mb.src,!0)}cb.scale(X);cb.textEnabled=ea;ta=null!=ta?ta:this.createSvgImageExport();var Bb=ta.drawCellState,Xa=ta.getLinkForCellState;ta.getLinkForCellState=function(Za,fb){var hb=Xa.apply(this,arguments);return null==hb||Za.view.graph.isCustomLink(hb)?
+arguments)}else return rb.apply(this,arguments)};var mb=this.backgroundImage;if(null!=mb){y=Ka/O;var vb=this.view.translate;Ma=new mxRectangle((mb.x+vb.x)*y,(mb.y+vb.y)*y,mb.width*y,mb.height*y);mxUtils.intersects(Fa,Ma)&&cb.image(mb.x+vb.x,mb.y+vb.y,mb.width,mb.height,mb.src,!0)}cb.scale(X);cb.textEnabled=ea;ta=null!=ta?ta:this.createSvgImageExport();var Bb=ta.drawCellState,Xa=ta.getLinkForCellState;ta.getLinkForCellState=function(Za,fb){var hb=Xa.apply(this,arguments);return null==hb||Za.view.graph.isCustomLink(hb)?
null:hb};ta.getLinkTargetForCellState=function(Za,fb){return Za.view.graph.getLinkTargetForCell(Za.cell)};ta.drawCellState=function(Za,fb){for(var hb=Za.view.graph,qb=null!=Qa?Qa.get(Za.cell):hb.isCellSelected(Za.cell),kb=hb.model.getParent(Za.cell);!(W&&null==Qa||qb)&&null!=kb;)qb=null!=Qa?Qa.get(kb):hb.isCellSelected(kb),kb=hb.model.getParent(kb);if(W&&null==Qa||qb)hb.view.redrawEnumerationState(Za),Bb.apply(this,arguments),this.doDrawShape(Za.secondLabel,fb)};ta.drawState(this.getView().getState(this.model.root),
-cb);this.updateSvgLinks(Pa,qa,!0);this.addForeignObjectWarning(cb,Pa);return Pa}finally{Sa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,O){if("0"!=urlParams["svg-warning"]&&0<O.getElementsByTagName("foreignObject").length){var P=x.createElement("switch"),X=x.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ba=x.createElement("a");ba.setAttribute("transform","translate(0,-5)");
-null==ba.setAttributeNS||O.ownerDocument!=document&&null==document.documentMode?(ba.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ba.setAttribute("target","_blank")):(ba.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ba.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);
-P.appendChild(X);ba.appendChild(x);P.appendChild(ba);O.appendChild(P)}};Graph.prototype.updateSvgLinks=function(x,O,P){x=x.getElementsByTagName("a");for(var X=0;X<x.length;X++)if(null==x[X].getAttribute("target")){var ba=x[X].getAttribute("href");null==ba&&(ba=x[X].getAttribute("xlink:href"));null!=ba&&(null!=O&&/^https?:\/\//.test(ba)?x[X].setAttribute("target",O):P&&this.isCustomLink(ba)&&x[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);
-x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var O=window.getSelection();O.getRangeAt&&O.rangeCount&&(x=O.getRangeAt(0).commonAncestorContainer)}else document.selection&&(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){for(var x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=x.parentNode;
-null!=x&&x==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(x=this.cellEditor.textarea.firstChild);return x};Graph.prototype.getParentByName=function(x,O,P){for(;null!=x&&x.nodeName!=O;){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,O,P){for(;null!=x&&!(0<=mxUtils.indexOf(O,x.nodeName));){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.selectNode=
-function(x){var O=null;if(window.getSelection){if(O=window.getSelection(),O.getRangeAt&&O.rangeCount){var P=document.createRange();P.selectNode(x);O.removeAllRanges();O.addRange(P)}}else(O=document.selection)&&"Control"!=O.type&&(x=O.createRange(),x.collapse(!0),P=O.createRange(),P.setEndPoint("StartToStart",x),P.select())};Graph.prototype.flipEdgePoints=function(x,O,P){var X=this.getCellGeometry(x);if(null!=X){X=X.clone();if(null!=X.points)for(var ba=0;ba<X.points.length;ba++)O?X.points[ba].x=P+
-(P-X.points[ba].x):X.points[ba].y=P+(P-X.points[ba].y);ba=function(W){null!=W&&(O?W.x=P+(P-W.x):W.y=P+(P-W.y))};ba(X.getTerminalPoint(!0));ba(X.getTerminalPoint(!1));this.model.setGeometry(x,X)}};Graph.prototype.flipChildren=function(x,O,P){this.model.beginUpdate();try{for(var X=this.model.getChildCount(x),ba=0;ba<X;ba++){var W=this.model.getChildAt(x,ba);if(this.model.isEdge(W))this.flipEdgePoints(W,O,P);else{var ea=this.getCellGeometry(W);null!=ea&&(ea=ea.clone(),O?ea.x=P+(P-ea.x-ea.width):ea.y=
-P+(P-ea.y-ea.height),this.model.setGeometry(W,ea))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,O){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);for(var P=[],X=0;X<x.length;X++)if(this.model.isEdge(x[X])){var ba=this.view.getState(x[X]);null!=ba&&this.flipEdgePoints(x[X],O,(O?ba.getCenterX():ba.getCenterY())/this.view.scale-(O?ba.origin.x:ba.origin.y)-(O?this.view.translate.x:this.view.translate.y))}else{var W=this.getCellGeometry(x[X]);null!=W&&this.flipChildren(x[X],
-O,O?W.getCenterX()-W.x:W.getCenterY()-W.y);P.push(x[X])}this.toggleCellStyles(O?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,P)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(x,O){var P=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var X=0;X<x.length;X++){var ba=this.model.getParent(x[X]);if(this.isTable(ba)){var W=this.getCellGeometry(x[X]),ea=this.getCellGeometry(ba);null!=W&&null!=ea&&(ea=ea.clone(),ea.height-=W.height,this.model.setGeometry(ba,ea))}}var ta=
-this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,O)}finally{this.model.endUpdate()}if(null!=ta)for(P=[],X=0;X<ta.length;X++)this.model.contains(ta[X])&&(this.model.isVertex(ta[X])||this.model.isEdge(ta[X]))&&P.push(ta[X])}return P};Graph.prototype.insertTableColumn=function(x,O){var P=this.getModel();P.beginUpdate();try{var X=x,ba=0;if(this.isTableCell(x)){var W=P.getParent(x);X=P.getParent(W);ba=mxUtils.indexOf(P.getChildCells(W,!0),x)}else this.isTableRow(x)?X=P.getParent(x):
-x=P.getChildCells(X,!0)[0],O||(ba=P.getChildCells(x,!0).length-1);var ea=P.getChildCells(X,!0),ta=Graph.minTableColumnWidth;for(x=0;x<ea.length;x++){var qa=P.getChildCells(ea[x],!0)[ba],va=P.cloneCell(qa,!1),Ea=this.getCellGeometry(va);va.value=null;va.style=mxUtils.setStyle(mxUtils.setStyle(va.style,"rowspan",null),"colspan",null);if(null!=Ea){null!=Ea.alternateBounds&&(Ea.width=Ea.alternateBounds.width,Ea.height=Ea.alternateBounds.height,Ea.alternateBounds=null);ta=Ea.width;var Ca=this.getCellGeometry(ea[x]);
-null!=Ca&&(Ea.height=Ca.height)}P.add(ea[x],va,ba+(O?0:1))}var Ma=this.getCellGeometry(X);null!=Ma&&(Ma=Ma.clone(),Ma.width+=ta,P.setGeometry(X,Ma))}finally{P.endUpdate()}};Graph.prototype.deleteLane=function(x){var O=this.getModel();O.beginUpdate();try{var P=null;P="stackLayout"==this.getCurrentCellStyle(x).childLayout?x:O.getParent(x);var X=O.getChildCells(P,!0);0==X.length?O.remove(P):(P==x&&(x=X[X.length-1]),O.remove(x))}finally{O.endUpdate()}};Graph.prototype.insertLane=function(x,O){var P=this.getModel();
-P.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){X=x;var ba=P.getChildCells(X,!0);x=ba[O?0:ba.length-1]}else X=P.getParent(x);var W=X.getIndex(x);x=P.cloneCell(x,!1);x.value=null;P.add(X,x,W+(O?0:1))}finally{P.endUpdate()}};Graph.prototype.insertTableRow=function(x,O){var P=this.getModel();P.beginUpdate();try{var X=x,ba=x;if(this.isTableCell(x))ba=P.getParent(x),X=P.getParent(ba);else if(this.isTableRow(x))X=P.getParent(x);else{var W=P.getChildCells(X,!0);
-ba=W[O?0:W.length-1]}var ea=P.getChildCells(ba,!0),ta=X.getIndex(ba);ba=P.cloneCell(ba,!1);ba.value=null;var qa=this.getCellGeometry(ba);if(null!=qa){for(W=0;W<ea.length;W++){x=P.cloneCell(ea[W],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var va=this.getCellGeometry(x);null!=va&&(null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null),va.height=qa.height);ba.insert(x)}P.add(X,ba,
-ta+(O?0:1));var Ea=this.getCellGeometry(X);null!=Ea&&(Ea=Ea.clone(),Ea.height+=qa.height,P.setGeometry(X,Ea))}}finally{P.endUpdate()}};Graph.prototype.deleteTableColumn=function(x){var O=this.getModel();O.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(X=O.getParent(x));this.isTableRow(X)&&(P=O.getParent(X));var ba=O.getChildCells(P,!0);if(0==ba.length)O.remove(P);else{this.isTableRow(X)||(X=ba[0]);var W=O.getChildCells(X,!0);if(1>=W.length)O.remove(P);else{var ea=W.length-1;this.isTableCell(x)&&
-(ea=mxUtils.indexOf(W,x));for(X=x=0;X<ba.length;X++){var ta=O.getChildCells(ba[X],!0)[ea];O.remove(ta);var qa=this.getCellGeometry(ta);null!=qa&&(x=Math.max(x,qa.width))}var va=this.getCellGeometry(P);null!=va&&(va=va.clone(),va.width-=x,O.setGeometry(P,va))}}}finally{O.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var O=this.getModel();O.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(x=X=O.getParent(x));this.isTableRow(x)&&(P=O.getParent(X));var ba=O.getChildCells(P,!0);if(1>=ba.length)O.remove(P);
-else{this.isTableRow(X)||(X=ba[ba.length-1]);O.remove(X);x=0;var W=this.getCellGeometry(X);null!=W&&(x=W.height);var ea=this.getCellGeometry(P);null!=ea&&(ea=ea.clone(),ea.height-=x,O.setGeometry(P,ea))}}finally{O.endUpdate()}};Graph.prototype.insertRow=function(x,O){for(var P=x.tBodies[0],X=P.rows[0].cells,ba=x=0;ba<X.length;ba++){var W=X[ba].getAttribute("colspan");x+=null!=W?parseInt(W):1}O=P.insertRow(O);for(ba=0;ba<x;ba++)mxUtils.br(O.insertCell(-1));return O.cells[0]};Graph.prototype.deleteRow=
-function(x,O){x.tBodies[0].deleteRow(O)};Graph.prototype.insertColumn=function(x,O){var P=x.tHead;if(null!=P)for(var X=0;X<P.rows.length;X++){var ba=document.createElement("th");P.rows[X].appendChild(ba);mxUtils.br(ba)}x=x.tBodies[0];for(P=0;P<x.rows.length;P++)X=x.rows[P].insertCell(O),mxUtils.br(X);return x.rows[0].cells[0<=O?O:x.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(x,O){if(0<=O){x=x.tBodies[0].rows;for(var P=0;P<x.length;P++)x[P].cells.length>O&&x[P].deleteCell(O)}};Graph.prototype.pasteHtmlAtCaret=
-function(x){if(window.getSelection){var O=window.getSelection();if(O.getRangeAt&&O.rangeCount){O=O.getRangeAt(0);O.deleteContents();var P=document.createElement("div");P.innerHTML=x;x=document.createDocumentFragment();for(var X;X=P.firstChild;)lastNode=x.appendChild(X);O.insertNode(x)}}else(O=document.selection)&&"Control"!=O.type&&O.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,O){function P(ba,W){ba.length>W&&(ba=ba.substring(0,Math.round(W/2))+"..."+ba.substring(ba.length-
-Math.round(W/4)));return ba}x=null!=x?x:"javascript:void(0);";if(null==O||0==O.length)O=this.isCustomLink(x)?this.getLinkTitle(x):x;var X=document.createElement("a");X.setAttribute("rel",this.linkRelation);X.setAttribute("href",this.getAbsoluteUrl(x));X.setAttribute("title",P(this.isCustomLink(x)?this.getLinkTitle(x):x,80));null!=this.linkTarget&&X.setAttribute("target",this.linkTarget);mxUtils.write(X,P(O,40));this.isCustomLink(x)&&mxEvent.addListener(X,"click",mxUtils.bind(this,function(ba){this.customLinkClicked(x);
-mxEvent.consume(ba)}));return X};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(W,ea){this.popupMenuHandler.hideMenu()});var x=this.updateMouseEvent;this.updateMouseEvent=function(W){W=x.apply(this,arguments);if(mxEvent.isTouchEvent(W.getEvent())&&null==W.getState()){var ea=this.getCellAt(W.graphX,W.graphY);null!=ea&&this.isSwimlane(ea)&&this.hitsSwimlaneContent(ea,
+cb);this.updateSvgLinks(Pa,qa,!0);this.addForeignObjectWarning(cb,Pa);return Pa}finally{Sa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(y,O){if("0"!=urlParams["svg-warning"]&&0<O.getElementsByTagName("foreignObject").length){var P=y.createElement("switch"),X=y.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ba=y.createElement("a");ba.setAttribute("transform","translate(0,-5)");
+null==ba.setAttributeNS||O.ownerDocument!=document&&null==document.documentMode?(ba.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ba.setAttribute("target","_blank")):(ba.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ba.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));y=y.createElement("text");y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x","50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);
+P.appendChild(X);ba.appendChild(y);P.appendChild(ba);O.appendChild(P)}};Graph.prototype.updateSvgLinks=function(y,O,P){y=y.getElementsByTagName("a");for(var X=0;X<y.length;X++)if(null==y[X].getAttribute("target")){var ba=y[X].getAttribute("href");null==ba&&(ba=y[X].getAttribute("xlink:href"));null!=ba&&(null!=O&&/^https?:\/\//.test(ba)?y[X].setAttribute("target",O):P&&this.isCustomLink(ba)&&y[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);
+y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;y.pointerEvents=!0;return y};Graph.prototype.getSelectedElement=function(){var y=null;if(window.getSelection){var O=window.getSelection();O.getRangeAt&&O.rangeCount&&(y=O.getRangeAt(0).commonAncestorContainer)}else document.selection&&(y=document.selection.createRange().parentElement());return y};Graph.prototype.getSelectedEditingElement=function(){for(var y=this.getSelectedElement();null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=y.parentNode;
+null!=y&&y==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(y=this.cellEditor.textarea.firstChild);return y};Graph.prototype.getParentByName=function(y,O,P){for(;null!=y&&y.nodeName!=O;){if(y==P)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=function(y,O,P){for(;null!=y&&!(0<=mxUtils.indexOf(O,y.nodeName));){if(y==P)return null;y=y.parentNode}return y};Graph.prototype.selectNode=
+function(y){var O=null;if(window.getSelection){if(O=window.getSelection(),O.getRangeAt&&O.rangeCount){var P=document.createRange();P.selectNode(y);O.removeAllRanges();O.addRange(P)}}else(O=document.selection)&&"Control"!=O.type&&(y=O.createRange(),y.collapse(!0),P=O.createRange(),P.setEndPoint("StartToStart",y),P.select())};Graph.prototype.flipEdgePoints=function(y,O,P){var X=this.getCellGeometry(y);if(null!=X){X=X.clone();if(null!=X.points)for(var ba=0;ba<X.points.length;ba++)O?X.points[ba].x=P+
+(P-X.points[ba].x):X.points[ba].y=P+(P-X.points[ba].y);ba=function(W){null!=W&&(O?W.x=P+(P-W.x):W.y=P+(P-W.y))};ba(X.getTerminalPoint(!0));ba(X.getTerminalPoint(!1));this.model.setGeometry(y,X)}};Graph.prototype.flipChildren=function(y,O,P){this.model.beginUpdate();try{for(var X=this.model.getChildCount(y),ba=0;ba<X;ba++){var W=this.model.getChildAt(y,ba);if(this.model.isEdge(W))this.flipEdgePoints(W,O,P);else{var ea=this.getCellGeometry(W);null!=ea&&(ea=ea.clone(),O?ea.x=P+(P-ea.x-ea.width):ea.y=
+P+(P-ea.y-ea.height),this.model.setGeometry(W,ea))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(y,O){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);for(var P=[],X=0;X<y.length;X++)if(this.model.isEdge(y[X])){var ba=this.view.getState(y[X]);null!=ba&&this.flipEdgePoints(y[X],O,(O?ba.getCenterX():ba.getCenterY())/this.view.scale-(O?ba.origin.x:ba.origin.y)-(O?this.view.translate.x:this.view.translate.y))}else{var W=this.getCellGeometry(y[X]);null!=W&&this.flipChildren(y[X],
+O,O?W.getCenterX()-W.x:W.getCenterY()-W.y);P.push(y[X])}this.toggleCellStyles(O?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,P)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(y,O){var P=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var X=0;X<y.length;X++){var ba=this.model.getParent(y[X]);if(this.isTable(ba)){var W=this.getCellGeometry(y[X]),ea=this.getCellGeometry(ba);null!=W&&null!=ea&&(ea=ea.clone(),ea.height-=W.height,this.model.setGeometry(ba,ea))}}var ta=
+this.selectParentAfterDelete?this.model.getParents(y):null;this.removeCells(y,O)}finally{this.model.endUpdate()}if(null!=ta)for(P=[],X=0;X<ta.length;X++)this.model.contains(ta[X])&&(this.model.isVertex(ta[X])||this.model.isEdge(ta[X]))&&P.push(ta[X])}return P};Graph.prototype.insertTableColumn=function(y,O){var P=this.getModel();P.beginUpdate();try{var X=y,ba=0;if(this.isTableCell(y)){var W=P.getParent(y);X=P.getParent(W);ba=mxUtils.indexOf(P.getChildCells(W,!0),y)}else this.isTableRow(y)?X=P.getParent(y):
+y=P.getChildCells(X,!0)[0],O||(ba=P.getChildCells(y,!0).length-1);var ea=P.getChildCells(X,!0),ta=Graph.minTableColumnWidth;for(y=0;y<ea.length;y++){var qa=P.getChildCells(ea[y],!0)[ba],va=P.cloneCell(qa,!1),Ea=this.getCellGeometry(va);va.value=null;va.style=mxUtils.setStyle(mxUtils.setStyle(va.style,"rowspan",null),"colspan",null);if(null!=Ea){null!=Ea.alternateBounds&&(Ea.width=Ea.alternateBounds.width,Ea.height=Ea.alternateBounds.height,Ea.alternateBounds=null);ta=Ea.width;var Ca=this.getCellGeometry(ea[y]);
+null!=Ca&&(Ea.height=Ca.height)}P.add(ea[y],va,ba+(O?0:1))}var Ma=this.getCellGeometry(X);null!=Ma&&(Ma=Ma.clone(),Ma.width+=ta,P.setGeometry(X,Ma))}finally{P.endUpdate()}};Graph.prototype.deleteLane=function(y){var O=this.getModel();O.beginUpdate();try{var P=null;P="stackLayout"==this.getCurrentCellStyle(y).childLayout?y:O.getParent(y);var X=O.getChildCells(P,!0);0==X.length?O.remove(P):(P==y&&(y=X[X.length-1]),O.remove(y))}finally{O.endUpdate()}};Graph.prototype.insertLane=function(y,O){var P=this.getModel();
+P.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){X=y;var ba=P.getChildCells(X,!0);y=ba[O?0:ba.length-1]}else X=P.getParent(y);var W=X.getIndex(y);y=P.cloneCell(y,!1);y.value=null;P.add(X,y,W+(O?0:1))}finally{P.endUpdate()}};Graph.prototype.insertTableRow=function(y,O){var P=this.getModel();P.beginUpdate();try{var X=y,ba=y;if(this.isTableCell(y))ba=P.getParent(y),X=P.getParent(ba);else if(this.isTableRow(y))X=P.getParent(y);else{var W=P.getChildCells(X,!0);
+ba=W[O?0:W.length-1]}var ea=P.getChildCells(ba,!0),ta=X.getIndex(ba);ba=P.cloneCell(ba,!1);ba.value=null;var qa=this.getCellGeometry(ba);if(null!=qa){for(W=0;W<ea.length;W++){y=P.cloneCell(ea[W],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var va=this.getCellGeometry(y);null!=va&&(null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null),va.height=qa.height);ba.insert(y)}P.add(X,ba,
+ta+(O?0:1));var Ea=this.getCellGeometry(X);null!=Ea&&(Ea=Ea.clone(),Ea.height+=qa.height,P.setGeometry(X,Ea))}}finally{P.endUpdate()}};Graph.prototype.deleteTableColumn=function(y){var O=this.getModel();O.beginUpdate();try{var P=y,X=y;this.isTableCell(y)&&(X=O.getParent(y));this.isTableRow(X)&&(P=O.getParent(X));var ba=O.getChildCells(P,!0);if(0==ba.length)O.remove(P);else{this.isTableRow(X)||(X=ba[0]);var W=O.getChildCells(X,!0);if(1>=W.length)O.remove(P);else{var ea=W.length-1;this.isTableCell(y)&&
+(ea=mxUtils.indexOf(W,y));for(X=y=0;X<ba.length;X++){var ta=O.getChildCells(ba[X],!0)[ea];O.remove(ta);var qa=this.getCellGeometry(ta);null!=qa&&(y=Math.max(y,qa.width))}var va=this.getCellGeometry(P);null!=va&&(va=va.clone(),va.width-=y,O.setGeometry(P,va))}}}finally{O.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var O=this.getModel();O.beginUpdate();try{var P=y,X=y;this.isTableCell(y)&&(y=X=O.getParent(y));this.isTableRow(y)&&(P=O.getParent(X));var ba=O.getChildCells(P,!0);if(1>=ba.length)O.remove(P);
+else{this.isTableRow(X)||(X=ba[ba.length-1]);O.remove(X);y=0;var W=this.getCellGeometry(X);null!=W&&(y=W.height);var ea=this.getCellGeometry(P);null!=ea&&(ea=ea.clone(),ea.height-=y,O.setGeometry(P,ea))}}finally{O.endUpdate()}};Graph.prototype.insertRow=function(y,O){for(var P=y.tBodies[0],X=P.rows[0].cells,ba=y=0;ba<X.length;ba++){var W=X[ba].getAttribute("colspan");y+=null!=W?parseInt(W):1}O=P.insertRow(O);for(ba=0;ba<y;ba++)mxUtils.br(O.insertCell(-1));return O.cells[0]};Graph.prototype.deleteRow=
+function(y,O){y.tBodies[0].deleteRow(O)};Graph.prototype.insertColumn=function(y,O){var P=y.tHead;if(null!=P)for(var X=0;X<P.rows.length;X++){var ba=document.createElement("th");P.rows[X].appendChild(ba);mxUtils.br(ba)}y=y.tBodies[0];for(P=0;P<y.rows.length;P++)X=y.rows[P].insertCell(O),mxUtils.br(X);return y.rows[0].cells[0<=O?O:y.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(y,O){if(0<=O){y=y.tBodies[0].rows;for(var P=0;P<y.length;P++)y[P].cells.length>O&&y[P].deleteCell(O)}};Graph.prototype.pasteHtmlAtCaret=
+function(y){if(window.getSelection){var O=window.getSelection();if(O.getRangeAt&&O.rangeCount){O=O.getRangeAt(0);O.deleteContents();var P=document.createElement("div");P.innerHTML=y;y=document.createDocumentFragment();for(var X;X=P.firstChild;)lastNode=y.appendChild(X);O.insertNode(y)}}else(O=document.selection)&&"Control"!=O.type&&O.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=function(y,O){function P(ba,W){ba.length>W&&(ba=ba.substring(0,Math.round(W/2))+"..."+ba.substring(ba.length-
+Math.round(W/4)));return ba}y=null!=y?y:"javascript:void(0);";if(null==O||0==O.length)O=this.isCustomLink(y)?this.getLinkTitle(y):y;var X=document.createElement("a");X.setAttribute("rel",this.linkRelation);X.setAttribute("href",this.getAbsoluteUrl(y));X.setAttribute("title",P(this.isCustomLink(y)?this.getLinkTitle(y):y,80));null!=this.linkTarget&&X.setAttribute("target",this.linkTarget);mxUtils.write(X,P(O,40));this.isCustomLink(y)&&mxEvent.addListener(X,"click",mxUtils.bind(this,function(ba){this.customLinkClicked(y);
+mxEvent.consume(ba)}));return X};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(W,ea){this.popupMenuHandler.hideMenu()});var y=this.updateMouseEvent;this.updateMouseEvent=function(W){W=y.apply(this,arguments);if(mxEvent.isTouchEvent(W.getEvent())&&null==W.getState()){var ea=this.getCellAt(W.graphX,W.graphY);null!=ea&&this.isSwimlane(ea)&&this.hitsSwimlaneContent(ea,
W.graphX,W.graphY)||(W.state=this.view.getState(ea),null!=W.state&&null!=W.state.shape&&(this.container.style.cursor=W.state.shape.node.style.cursor))}null==W.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return W};var O=!1,P=!1,X=!1,ba=this.fireMouseEvent;this.fireMouseEvent=function(W,ea,ta){W==mxEvent.MOUSE_DOWN&&(ea=this.updateMouseEvent(ea),O=this.isCellSelected(ea.getCell()),P=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ba.apply(this,arguments)};
this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(W,ea){var ta=mxEvent.isMouseEvent(ea.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ea.getState()||!ea.isSource(ea.getState().control))&&(this.popupMenuHandler.popupTrigger||!X&&!ta&&(P&&null==ea.getCell()&&this.isSelectionEmpty()||O&&this.isCellSelected(ea.getCell())));ta=!O||ta?null:mxUtils.bind(this,function(qa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var va=mxUtils.getScrollOrigin();
-this.popupMenuHandler.popup(ea.getX()+va.x+1,ea.getY()+va.y+1,qa,ea.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[W,ea,ta])})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);return null!=x&&1==x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x=
-"";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var O=this.textarea.ownerDocument.defaultView.getSelection(),P=O.getRangeAt(0),X="\t";if(null!=x)for(X="";0<x;)X+=" ",x--;x=document.createElement("span");x.style.whiteSpace="pre";x.appendChild(document.createTextNode(X));P.insertNode(x);P.setStartAfter(x);P.setEndAfter(x);O.removeAllRanges();
-O.addRange(P)};mxCellEditor.prototype.alignText=function(x,O){var P=null!=O&&mxEvent.isShiftDown(O);if(P||null!=window.getSelection&&null!=window.getSelection().containsNode){var X=!0;this.graph.processElements(this.textarea,function(ba){P||window.getSelection().containsNode(ba,!0)?(ba.removeAttribute("align"),ba.style.textAlign=null):X=!1});X&&this.graph.cellEditor.setAlign(x)}document.execCommand("justify"+x.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=
-window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var O=[],P=0,X=x.rangeCount;P<X;++P)O.push(x.getRangeAt(P));return O}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(x){try{if(x)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var O=0,P=x.length;O<P;++O)sel.addRange(x[O])}else document.selection&&x.select&&x.select()}catch(X){}};var g=mxCellRenderer.prototype.initializeLabel;
-mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));g.apply(this,arguments)};var v=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,O){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?v.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
-!1;var y=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,O){x=this.graph.getStartEditingCell(x,O);y.apply(this,arguments);var P=this.graph.view.getState(x);this.textarea.className=null!=P&&1==P.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x);P=this.graph.getModel().getParent(x);var X=this.graph.getCellGeometry(x);if(this.graph.getModel().isEdge(P)&&null!=
-X&&X.relative||this.graph.getModel().isEdge(x))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(x){function O(ba,W){W.originalNode=ba;ba=ba.firstChild;for(var ea=W.firstChild;null!=ba&&null!=ea;)O(ba,ea),ba=ba.nextSibling,ea=ea.nextSibling;return W}function P(ba,W){if(null!=ba)if(W.originalNode!=ba)X(ba);else for(ba=ba.firstChild,W=W.firstChild;null!=
+this.popupMenuHandler.popup(ea.getX()+va.x+1,ea.getY()+va.y+1,qa,ea.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[W,ea,ta])})};mxCellEditor.prototype.isContentEditing=function(){var y=this.graph.view.getState(this.editingCell);return null!=y&&1==y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y=
+"";window.getSelection?y=window.getSelection():document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var O=this.textarea.ownerDocument.defaultView.getSelection(),P=O.getRangeAt(0),X="\t";if(null!=y)for(X="";0<y;)X+=" ",y--;y=document.createElement("span");y.style.whiteSpace="pre";y.appendChild(document.createTextNode(X));P.insertNode(y);P.setStartAfter(y);P.setEndAfter(y);O.removeAllRanges();
+O.addRange(P)};mxCellEditor.prototype.alignText=function(y,O){var P=null!=O&&mxEvent.isShiftDown(O);if(P||null!=window.getSelection&&null!=window.getSelection().containsNode){var X=!0;this.graph.processElements(this.textarea,function(ba){P||window.getSelection().containsNode(ba,!0)?(ba.removeAttribute("align"),ba.style.textAlign=null):X=!1});X&&this.graph.cellEditor.setAlign(y)}document.execCommand("justify"+y.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=
+window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var O=[],P=0,X=y.rangeCount;P<X;++P)O.push(y.getRangeAt(P));return O}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var O=0,P=y.length;O<P;++O)sel.addRange(y[O])}else document.selection&&y.select&&y.select()}catch(X){}};var g=mxCellRenderer.prototype.initializeLabel;
+mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));g.apply(this,arguments)};var v=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,O){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?v.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
+!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,O){y=this.graph.getStartEditingCell(y,O);x.apply(this,arguments);var P=this.graph.view.getState(y);this.textarea.className=null!=P&&1==P.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y);P=this.graph.getModel().getParent(y);var X=this.graph.getCellGeometry(y);if(this.graph.getModel().isEdge(P)&&null!=
+X&&X.relative||this.graph.getModel().isEdge(y))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var B=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(y){function O(ba,W){W.originalNode=ba;ba=ba.firstChild;for(var ea=W.firstChild;null!=ba&&null!=ea;)O(ba,ea),ba=ba.nextSibling,ea=ea.nextSibling;return W}function P(ba,W){if(null!=ba)if(W.originalNode!=ba)X(ba);else for(ba=ba.firstChild,W=W.firstChild;null!=
ba;){var ea=ba.nextSibling;null==W?X(ba):(P(ba,W),W=W.nextSibling);ba=ea}}function X(ba){for(var W=ba.firstChild;null!=W;){var ea=W.nextSibling;X(W);W=ea}1==ba.nodeType&&("BR"===ba.nodeName||null!=ba.firstChild)||3==ba.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(ba)).length?(3==ba.nodeType&&mxUtils.setTextContent(ba,mxUtils.getTextContent(ba).replace(/\n|\r/g,"")),1==ba.nodeType&&(ba.removeAttribute("style"),ba.removeAttribute("class"),ba.removeAttribute("width"),ba.removeAttribute("cellpadding"),
-ba.removeAttribute("cellspacing"),ba.removeAttribute("border"))):ba.parentNode.removeChild(ba)}C.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ba){var W=O(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]>")?P(this.textarea,
-W):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var O=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),P=this.saveSelection();if(this.codeViewMode){ta=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ta.length&&"\n"==ta.charAt(ta.length-1)&&(ta=ta.substring(0,ta.length-1));ta=this.graph.sanitizeHtml(O?ta.replace(/\n/g,"<br/>"):ta,!0);this.textarea.className="mxCellEditor geContentEditable";
-qa=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);O=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ba=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,W=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ea=[];(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ea.push("underline");(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ea.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration=ea.join(" ");this.textarea.style.fontWeight=ba?"bold":"normal";
+ba.removeAttribute("cellspacing"),ba.removeAttribute("border"))):ba.parentNode.removeChild(ba)}B.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ba){var W=O(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]>")?P(this.textarea,
+W):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);if(null!=y){var O=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),P=this.saveSelection();if(this.codeViewMode){ta=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ta.length&&"\n"==ta.charAt(ta.length-1)&&(ta=ta.substring(0,ta.length-1));ta=this.graph.sanitizeHtml(O?ta.replace(/\n/g,"<br/>"):ta,!0);this.textarea.className="mxCellEditor geContentEditable";
+qa=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);O=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ba=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,W=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ea=[];(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ea.push("underline");(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ea.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration=ea.join(" ");this.textarea.style.fontWeight=ba?"bold":"normal";
this.textarea.style.fontStyle=W?"italic":"";this.textarea.style.fontFamily=O;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta,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 ta=mxUtils.htmlEntities(this.textarea.innerHTML);
8!=document.documentMode&&(ta=mxUtils.replaceTrailingNewlines(ta,"<div><br></div>"));ta=this.graph.sanitizeHtml(O?ta.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ta,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var qa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"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!=ta&&(this.textarea.innerHTML=ta);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=P;this.resize()}};var I=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,
-O){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var P=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*P;this.bounds.height=60*P;var X=null!=x.text?x.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
+"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!=ta&&(this.textarea.innerHTML=ta);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=P;this.resize()}};var I=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,
+O){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var P=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*P;this.bounds.height=60*P;var X=null!=y.text?y.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/P)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/P)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/P)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*P);this.textarea.clientWidth<
this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/P)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*P);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("+P+","+P+")")}else this.textarea.style.height="",this.textarea.style.overflow="",I.apply(this,arguments)};mxCellEditorGetInitialValue=
-mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,O){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var P=this.graph.getEditingValue(x.cell,O);"1"==mxUtils.getValue(x.style,"nl2Br","1")&&(P=P.replace(/\n/g,"<br/>"));return P=this.graph.sanitizeHtml(P,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,
-"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var O=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return O="1"==mxUtils.getValue(x.style,"nl2Br","1")?O.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):O.replace(/\r\n/g,"").replace(/\n/g,"")};var D=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();D.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};
-var N=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,O){this.graph.getModel().beginUpdate();try{N.apply(this,arguments),""==O&&this.graph.isCellDeletable(x.cell)&&0==this.graph.model.getChildCount(x.cell)&&this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){var O=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=O&&O!=mxConstants.NONE||
-!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(x.style,mxConstants.STYLE_FILLCOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getBorderColor=function(x){var O=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=O&&O!=mxConstants.NONE||!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,
-mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(x.style,mxConstants.STYLE_STROKECOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getMinimumSize=function(x){var O=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*O+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,O){return mxGraphHandlerIsValidDropTarget.apply(this,
-arguments)&&!mxEvent.isAltDown(O.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?d(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var O=this.graph.view.translate,P=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/P-O.x);O=this.roundLength((this.bounds.y+this.currentDy)/P-O.y);P=this.graph.view.unit;
-this.hint.innerHTML=d(x,P)+", "+d(O,P);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 G=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,O){G.apply(this,arguments);var P=this.graph.getCellStyle(x);
-if(null==P.childLayout){var X=this.graph.model.getParent(x),ba=null!=X?this.graph.getCellGeometry(X):null;if(null!=ba&&(P=this.graph.getCellStyle(X),"stackLayout"==P.childLayout)){var W=parseFloat(mxUtils.getValue(P,"stackBorder",mxStackLayout.prototype.border));P="1"==mxUtils.getValue(P,"horizontalStack","1");var ea=this.graph.getActualStartSize(X);ba=ba.clone();P?ba.height=O.height+ea.y+ea.height+2*W:ba.width=O.width+ea.x+ea.width+2*W;this.graph.model.setGeometry(X,ba)}}};var ia=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
-mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(ta){P.get(ta)||(P.put(ta,!0),ba.push(ta))}for(var O=ia.apply(this,arguments),P=new mxDictionary,X=this.graph.model,ba=[],W=0;W<O.length;W++){var ea=O[W];this.graph.isTableCell(ea)?x(X.getParent(X.getParent(ea))):this.graph.isTableRow(ea)&&x(X.getParent(ea));x(ea)}return ba};var ka=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var O=ka.apply(this,
-arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};var ja=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(x){var O=ja.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-
-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,O){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(O.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(x,O){return mxEvent.isControlDown(O.getEvent())||mxEvent.isMetaDown(O.getEvent())};var ca=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ca.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&
+mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,O){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var P=this.graph.getEditingValue(y.cell,O);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(P=P.replace(/\n/g,"<br/>"));return P=this.graph.sanitizeHtml(P,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,
+"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var O=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return O="1"==mxUtils.getValue(y.style,"nl2Br","1")?O.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):O.replace(/\r\n/g,"").replace(/\n/g,"")};var D=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();D.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};
+var N=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,O){this.graph.getModel().beginUpdate();try{N.apply(this,arguments),""==O&&this.graph.isCellDeletable(y.cell)&&0==this.graph.model.getChildCount(y.cell)&&this.graph.isTransparentState(y)&&this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(y){var O=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=O&&O!=mxConstants.NONE||
+!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(y.style,mxConstants.STYLE_FILLCOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getBorderColor=function(y){var O=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=O&&O!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,
+mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(y.style,mxConstants.STYLE_STROKECOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getMinimumSize=function(y){var O=this.graph.getView().scale;return new mxRectangle(0,0,null==y.text?30:y.text.size*O+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(y,O){return mxGraphHandlerIsValidDropTarget.apply(this,
+arguments)&&!mxEvent.isAltDown(O.getEvent)};mxGraphView.prototype.formatUnitText=function(y){return y?e(y,this.unit):y};mxGraphHandler.prototype.updateHint=function(y){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var O=this.graph.view.translate,P=this.graph.view.scale;y=this.roundLength((this.bounds.x+this.currentDx)/P-O.x);O=this.roundLength((this.bounds.y+this.currentDy)/P-O.y);P=this.graph.view.unit;
+this.hint.innerHTML=e(y,P)+", "+e(O,P);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 G=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,O){G.apply(this,arguments);var P=this.graph.getCellStyle(y);
+if(null==P.childLayout){var X=this.graph.model.getParent(y),ba=null!=X?this.graph.getCellGeometry(X):null;if(null!=ba&&(P=this.graph.getCellStyle(X),"stackLayout"==P.childLayout)){var W=parseFloat(mxUtils.getValue(P,"stackBorder",mxStackLayout.prototype.border));P="1"==mxUtils.getValue(P,"horizontalStack","1");var ea=this.graph.getActualStartSize(X);ba=ba.clone();P?ba.height=O.height+ea.y+ea.height+2*W:ba.width=O.width+ea.x+ea.width+2*W;this.graph.model.setGeometry(X,ba)}}};var ia=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
+mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(ta){P.get(ta)||(P.put(ta,!0),ba.push(ta))}for(var O=ia.apply(this,arguments),P=new mxDictionary,X=this.graph.model,ba=[],W=0;W<O.length;W++){var ea=O[W];this.graph.isTableCell(ea)?y(X.getParent(X.getParent(ea))):this.graph.isTableRow(ea)&&y(X.getParent(ea));y(ea)}return ba};var ka=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var O=ka.apply(this,
+arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};var ja=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(y){var O=ja.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-
+y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,O){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(O.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(y,O){return mxEvent.isControlDown(O.getEvent())||mxEvent.isMetaDown(O.getEvent())};var ca=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ca.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 pa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return pa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ra=mxVertexHandler.prototype.isCustomHandleVisible;
-mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||ra.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};
-var V=null,R=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var x=R.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var O=function(Qa,Fa,Ka){for(var Pa=[],$a=0;$a<Qa.length;$a++){var eb=Qa[$a];Pa.push(null==eb?null:new mxPoint((qa+eb.x+Fa)*W,(va+eb.y+Ka)*W))}return Pa},P=this,X=this.graph,ba=X.model,W=X.view.scale,ea=this.state,ta=this.selectionBorder,qa=this.state.origin.x+X.view.translate.x,
-va=this.state.origin.y+X.view.translate.y;null==x&&(x=[]);var Ea=X.view.getCellStates(ba.getChildCells(this.state.cell,!0));if(0<Ea.length){var Ca=ba.getChildCells(Ea[0].cell,!0),Ma=X.getTableLines(this.state.cell,!1,!0),Sa=X.getTableLines(this.state.cell,!0,!1);for(ba=0;ba<Ea.length;ba++)mxUtils.bind(this,function(Qa){var Fa=Ea[Qa],Ka=Qa<Ea.length-1?Ea[Qa+1]:null;Ka=null!=Ka?X.getCellGeometry(Ka.cell):null;var Pa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Sa[Qa]?new V(Sa[Qa],
+mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||ra.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&(y=2);return y};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};
+var V=null,R=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var y=R.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var O=function(Qa,Fa,Ka){for(var Pa=[],$a=0;$a<Qa.length;$a++){var eb=Qa[$a];Pa.push(null==eb?null:new mxPoint((qa+eb.x+Fa)*W,(va+eb.y+Ka)*W))}return Pa},P=this,X=this.graph,ba=X.model,W=X.view.scale,ea=this.state,ta=this.selectionBorder,qa=this.state.origin.x+X.view.translate.x,
+va=this.state.origin.y+X.view.translate.y;null==y&&(y=[]);var Ea=X.view.getCellStates(ba.getChildCells(this.state.cell,!0));if(0<Ea.length){var Ca=ba.getChildCells(Ea[0].cell,!0),Ma=X.getTableLines(this.state.cell,!1,!0),Sa=X.getTableLines(this.state.cell,!0,!1);for(ba=0;ba<Ea.length;ba++)mxUtils.bind(this,function(Qa){var Fa=Ea[Qa],Ka=Qa<Ea.length-1?Ea[Qa+1]:null;Ka=null!=Ka?X.getCellGeometry(Ka.cell):null;var Pa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Sa[Qa]?new V(Sa[Qa],
mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ka.isDashed=ta.isDashed;Ka.svgStrokeTolerance++;Fa=new mxHandle(Fa,"row-resize",null,Ka);Fa.tableHandle=!0;var $a=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==$a?mxConstants.NONE:ta.stroke;if(this.shape.constructor==V)this.shape.line=O(Sa[Qa],0,$a),this.shape.updateBoundsFromLine();else{var cb=X.getActualStartSize(ea.cell,
!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+$a*W;this.shape.bounds.x=ea.x+(Qa==Ea.length-1?0:cb.x*W);this.shape.bounds.width=ea.width-(Qa==Ea.length-1?0:cb.width+cb.x+W)}this.shape.redraw()}};var eb=!1;Fa.setPosition=function(cb,db,rb){$a=Math.max(Graph.minTableRowHeight-cb.height,db.y-cb.y-cb.height);eb=mxEvent.isShiftDown(rb.getEvent());null!=Pa&&eb&&($a=Math.min($a,Pa.height-Graph.minTableRowHeight))};Fa.execute=function(cb){if(0!=$a)X.setTableRowHeight(this.state.cell,
-$a,!eb);else if(!P.blockDelayedSelection){var db=X.getCellAt(cb.getGraphX(),cb.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(db,cb)}$a=0};Fa.reset=function(){$a=0};x.push(Fa)})(ba);for(ba=0;ba<Ca.length;ba++)mxUtils.bind(this,function(Qa){var Fa=X.view.getState(Ca[Qa]),Ka=X.getCellGeometry(Ca[Qa]),Pa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Fa&&(Fa=new mxCellState(X.view,Ca[Qa],X.getCellStyle(Ca[Qa])),Fa.x=ea.x+Ka.x*W,Fa.y=ea.y+Ka.y*W,Fa.width=Pa.width*W,Fa.height=Pa.height*
+$a,!eb);else if(!P.blockDelayedSelection){var db=X.getCellAt(cb.getGraphX(),cb.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(db,cb)}$a=0};Fa.reset=function(){$a=0};y.push(Fa)})(ba);for(ba=0;ba<Ca.length;ba++)mxUtils.bind(this,function(Qa){var Fa=X.view.getState(Ca[Qa]),Ka=X.getCellGeometry(Ca[Qa]),Pa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Fa&&(Fa=new mxCellState(X.view,Ca[Qa],X.getCellStyle(Ca[Qa])),Fa.x=ea.x+Ka.x*W,Fa.y=ea.y+Ka.y*W,Fa.width=Pa.width*W,Fa.height=Pa.height*
W,Fa.updateCachedBounds());Ka=Qa<Ca.length-1?Ca[Qa+1]:null;Ka=null!=Ka?X.getCellGeometry(Ka):null;var $a=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Ma[Qa]?new V(Ma[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ka.isDashed=ta.isDashed;Ka.svgStrokeTolerance++;Fa=new mxHandle(Fa,"col-resize",null,Ka);Fa.tableHandle=!0;var eb=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=
0==eb?mxConstants.NONE:ta.stroke;if(this.shape.constructor==V)this.shape.line=O(Ma[Qa],eb,0),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(ea.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Pa.width+eb)*W;this.shape.bounds.y=ea.y+(Qa==Ca.length-1?0:db.y*W);this.shape.bounds.height=ea.height-(Qa==Ca.length-1?0:(db.height+db.y)*W)}this.shape.redraw()}};var cb=!1;Fa.setPosition=function(db,rb,mb){eb=Math.max(Graph.minTableColumnWidth-Pa.width,rb.x-db.x-Pa.width);
-cb=mxEvent.isShiftDown(mb.getEvent());null==$a||cb||(eb=Math.min(eb,$a.width-Graph.minTableColumnWidth))};Fa.execute=function(db){if(0!=eb)X.setTableColumnWidth(this.state.cell,eb,cb);else if(!P.blockDelayedSelection){var rb=X.getCellAt(db.getGraphX(),db.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(rb,db)}eb=0};Fa.positionChanged=function(){};Fa.reset=function(){eb=0};x.push(Fa)})(ba)}}return null!=x?x.reverse():null};var Y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
-function(x){Y.apply(this,arguments);if(null!=this.moveHandles)for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].style.visibility=x?"":"hidden";if(null!=this.cornerHandles)for(O=0;O<this.cornerHandles.length;O++)this.cornerHandles[O].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.graph.model;if(null!=this.moveHandles){for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].parentNode.removeChild(this.moveHandles[O]);this.moveHandles=
-null}this.moveHandles=[];for(O=0;O<x.getChildCount(this.state.cell);O++)mxUtils.bind(this,function(P){if(null!=P&&x.isVertex(P.cell)){var X=mxUtils.createImage(Editor.rowMoveImage);X.style.position="absolute";X.style.cursor="pointer";X.style.width="7px";X.style.height="4px";X.style.padding="4px 2px 4px 2px";X.rowState=P;mxEvent.addGestureListeners(X,mxUtils.bind(this,function(ba){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(ba)&&this.graph.isCellSelected(P.cell)||
+cb=mxEvent.isShiftDown(mb.getEvent());null==$a||cb||(eb=Math.min(eb,$a.width-Graph.minTableColumnWidth))};Fa.execute=function(db){if(0!=eb)X.setTableColumnWidth(this.state.cell,eb,cb);else if(!P.blockDelayedSelection){var rb=X.getCellAt(db.getGraphX(),db.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(rb,db)}eb=0};Fa.positionChanged=function(){};Fa.reset=function(){eb=0};y.push(Fa)})(ba)}}return null!=y?y.reverse():null};var Y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
+function(y){Y.apply(this,arguments);if(null!=this.moveHandles)for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].style.visibility=y?"":"hidden";if(null!=this.cornerHandles)for(O=0;O<this.cornerHandles.length;O++)this.cornerHandles[O].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var y=this.graph.model;if(null!=this.moveHandles){for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].parentNode.removeChild(this.moveHandles[O]);this.moveHandles=
+null}this.moveHandles=[];for(O=0;O<y.getChildCount(this.state.cell);O++)mxUtils.bind(this,function(P){if(null!=P&&y.isVertex(P.cell)){var X=mxUtils.createImage(Editor.rowMoveImage);X.style.position="absolute";X.style.cursor="pointer";X.style.width="7px";X.style.height="4px";X.style.padding="4px 2px 4px 2px";X.rowState=P;mxEvent.addGestureListeners(X,mxUtils.bind(this,function(ba){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(ba)&&this.graph.isCellSelected(P.cell)||
this.graph.selectCellForEvent(P.cell,ba);mxEvent.isPopupTrigger(ba)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(ba),mxEvent.getClientY(ba),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(ba),this.graph.isMouseDown=!0);mxEvent.consume(ba)}),null,mxUtils.bind(this,function(ba){mxEvent.isPopupTrigger(ba)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(ba),mxEvent.getClientY(ba),P.cell,ba),mxEvent.consume(ba))}));
-this.moveHandles.push(X);this.graph.container.appendChild(X)}})(this.graph.view.getState(x.getChildAt(this.state.cell,O)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var x=0;x<this.customHandles.length;x++)this.customHandles[x].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var Z=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,
+this.moveHandles.push(X);this.graph.container.appendChild(X)}})(this.graph.view.getState(y.getChildAt(this.state.cell,O)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var y=0;y<this.customHandles.length;y++)this.customHandles[y].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var Z=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,
0),O=this.tolerance,P=this.state.style.shape;null==mxCellRenderer.defaultShapes[P]&&mxStencilRegistry.getStencil(P);P=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!P&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ba=this.customHandles[X].shape.bounds,W=ba.getCenterX(),ea=ba.getCenterY();if(Math.abs(this.state.x-W)<ba.width/2||Math.abs(this.state.y-
-ea)<ba.height/2||Math.abs(this.state.x+this.state.width-W)<ba.width/2||Math.abs(this.state.y+this.state.height-ea)<ba.height/2){P=!0;break}}P&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(O/=2,this.graph.isTable(this.state.cell)&&(O+=7),x.x=this.sizers[0].bounds.width+O,x.y=this.sizers[0].bounds.height+O):x=Z.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
-if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{x=this.state.view.scale;var O=this.state.view.unit;this.hint.innerHTML=d(this.roundLength(this.bounds.width/x),O)+" x "+d(this.roundLength(this.bounds.height/x),O)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
-x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,O){la.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display=
-"none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,O){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,O){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var P=this.graph.view.translate,X=this.graph.view.scale,ba=this.roundLength(O.x/X-P.x);P=this.roundLength(O.y/X-P.y);X=this.graph.view.unit;this.hint.innerHTML=
-d(ba,X)+", "+d(P,X);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(ba=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*ba.x)+"%, "+Math.round(100*ba.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),O.y)+Editor.hintOffset+
+ea)<ba.height/2||Math.abs(this.state.x+this.state.width-W)<ba.width/2||Math.abs(this.state.y+this.state.height-ea)<ba.height/2){P=!0;break}}P&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(O/=2,this.graph.isTable(this.state.cell)&&(O+=7),y.x=this.sizers[0].bounds.width+O,y.y=this.sizers[0].bounds.height+O):y=Z.apply(this,arguments);return y};mxVertexHandler.prototype.updateHint=function(y){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
+if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{y=this.state.view.scale;var O=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/y),O)+" x "+e(this.roundLength(this.bounds.height/y),O)}y=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==y&&(y=this.bounds);this.hint.style.left=y.x+Math.round((y.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
+y.y+y.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,O){la.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display=
+"none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,O){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(y,O){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var P=this.graph.view.translate,X=this.graph.view.scale,ba=this.roundLength(O.x/X-P.x);P=this.roundLength(O.y/X-P.y);X=this.graph.view.unit;this.hint.innerHTML=
+e(ba,X)+", "+e(P,X);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(ba=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*ba.x)+"%, "+Math.round(100*ba.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.getGraphY(),O.y)+Editor.hintOffset+
"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,
9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
@@ -2652,78 +2656,78 @@ HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" f
mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=
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(x){return!mxEvent.isShiftDown(x.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(x){return!mxEvent.isShiftDown(x.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(x){return mxEvent.isMouseEvent(x.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(x){var O=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(O)||mxEvent.isPopupTrigger(O)&&(null==x.getState()||mxEvent.isControlDown(O)||mxEvent.isShiftDown(O))};var F=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
-function(x,O){F.apply(this,arguments);mxEvent.isTouchEvent(O.getEvent())&&this.graph.isCellSelected(O.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var O=x.getEvent();return mxEvent.isLeftMouseButton(O)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(O)&&!mxEvent.isShiftDown(O))||this.usePopupTrigger&&mxEvent.isPopupTrigger(O)};mxRubberband.prototype.isSpaceEvent=function(x){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,O){if(this.cancelled)this.cancelled=!1,O.consume();else{var P=null!=this.div&&"none"!=this.div.style.display,X=null,ba=null,W=x=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ba=this.first.y,x=(this.currentX-X)/this.graph.view.scale,W=(this.currentY-ba)/this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(x=this.graph.snap(x),W=this.graph.snap(W),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(W)<this.graph.tolerance&&(W=0))));this.reset();if(P){if(this.isSpaceEvent(O)){this.graph.model.beginUpdate();try{var ea=this.graph.getCellsBeyond(X,ba,this.graph.getDefaultParent(),
-!0,!0);for(P=0;P<ea.length;P++)if(this.graph.isCellMovable(ea[P])){var ta=this.graph.view.getState(ea[P]),qa=this.graph.getCellGeometry(ea[P]);null!=ta&&null!=qa&&(qa=qa.clone(),qa.translate(x,W),this.graph.model.setGeometry(ea[P],qa))}}finally{this.graph.model.endUpdate()}}else ea=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ea,O.getEvent());O.consume()}}};mxRubberband.prototype.mouseMove=function(x,O){if(!O.isConsumed()&&null!=this.first){var P=mxUtils.getScrollOrigin(this.graph.container);
-x=mxUtils.getOffset(this.graph.container);P.x-=x.x;P.y-=x.y;x=O.getX()+P.x;P=O.getY()+P.y;var X=this.first.x-x,ba=this.first.y-P,W=this.graph.tolerance;if(null!=this.div||Math.abs(X)>W||Math.abs(ba)>W)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,P),this.isSpaceEvent(O)?(x=this.x+this.width,P=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,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=x-this.width),this.y<this.first.y&&(this.y=P-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",
+!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(y){return!mxEvent.isShiftDown(y.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(y){return!mxEvent.isShiftDown(y.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(y){return mxEvent.isMouseEvent(y.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(y){var O=y.getEvent();return null==y.getState()&&!mxEvent.isMouseEvent(O)||mxEvent.isPopupTrigger(O)&&(null==y.getState()||mxEvent.isControlDown(O)||mxEvent.isShiftDown(O))};var F=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(y,O){F.apply(this,arguments);mxEvent.isTouchEvent(O.getEvent())&&this.graph.isCellSelected(O.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(y){var O=y.getEvent();return mxEvent.isLeftMouseButton(O)&&(this.useLeftButtonForPanning&&null==y.getState()||mxEvent.isControlDown(O)&&!mxEvent.isShiftDown(O))||this.usePopupTrigger&&mxEvent.isPopupTrigger(O)};mxRubberband.prototype.isSpaceEvent=function(y){return this.graph.isEnabled()&&
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,O){if(this.cancelled)this.cancelled=!1,O.consume();else{var P=null!=this.div&&"none"!=this.div.style.display,X=null,ba=null,W=y=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ba=this.first.y,y=(this.currentX-X)/this.graph.view.scale,W=(this.currentY-ba)/this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(y=this.graph.snap(y),W=this.graph.snap(W),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=0),Math.abs(W)<this.graph.tolerance&&(W=0))));this.reset();if(P){if(this.isSpaceEvent(O)){this.graph.model.beginUpdate();try{var ea=this.graph.getCellsBeyond(X,ba,this.graph.getDefaultParent(),
+!0,!0);for(P=0;P<ea.length;P++)if(this.graph.isCellMovable(ea[P])){var ta=this.graph.view.getState(ea[P]),qa=this.graph.getCellGeometry(ea[P]);null!=ta&&null!=qa&&(qa=qa.clone(),qa.translate(y,W),this.graph.model.setGeometry(ea[P],qa))}}finally{this.graph.model.endUpdate()}}else ea=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ea,O.getEvent());O.consume()}}};mxRubberband.prototype.mouseMove=function(y,O){if(!O.isConsumed()&&null!=this.first){var P=mxUtils.getScrollOrigin(this.graph.container);
+y=mxUtils.getOffset(this.graph.container);P.x-=y.x;P.y-=y.y;y=O.getX()+P.x;P=O.getY()+P.y;var X=this.first.x-y,ba=this.first.y-P,W=this.graph.tolerance;if(null!=this.div||Math.abs(X)>W||Math.abs(ba)>W)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(y,P),this.isSpaceEvent(O)?(y=this.x+this.width,P=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,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=y-this.width),this.y<this.first.y&&(this.y=P-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)),O.consume()}};var T=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);T.apply(this,arguments)};var aa=(new Date).getTime(),U=0,da=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(x,O,P,X){da.apply(this,arguments);P!=this.currentTerminalState?(aa=(new Date).getTime(),
-U=0):U=(new Date).getTime()-aa;this.currentTerminalState=P};var fa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<U||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&fa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(x,O,P){O=null!=x&&0==x;var X=this.state.getVisibleTerminalState(O);x=null!=x&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,X,O):null;P=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(O),x):null)?P?this.endFixedHandleImage:this.fixedHandleImage:null!=x&&null!=X?P?this.endTerminalHandleImage:this.terminalHandleImage:P?this.endHandleImage:this.handleImage;if(null!=P)return P=
-new mxImageShape(new mxRectangle(0,0,P.width,P.height),P.src),P.preserveImageAspect=!1,P;P=mxConstants.HANDLE_SIZE;this.preferHtml&&--P;return new mxRectangleShape(new mxRectangle(0,0,P,P),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,O,P){this.handleImage=O==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:O==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return na.apply(this,arguments)};var sa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var O=this.graph.getModel(),P=O.getParent(x[0]),X=this.graph.getCellGeometry(x[0]);if(O.isEdge(P)&&null!=X&&X.relative&&(O=this.graph.view.getState(x[0]),null!=O&&2>O.width&&2>O.height&&null!=O.text&&null!=O.text.boundingBox))return mxRectangle.fromRectangle(O.text.boundingBox)}return sa.apply(this,arguments)};var za=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var x=za.apply(this,arguments),O=[],P=0;P<x.length;P++)"1"!=mxUtils.getValue(x[P].style,"part","0")&&O.push(x[P]);return O};var ua=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var O=this.graph.getModel(),P=O.getParent(x.cell),X=this.graph.getCellGeometry(x.cell);return O.isEdge(P)&&null!=X&&X.relative&&2>x.width&&2>x.height&&null!=x.text&&null!=x.text.boundingBox?(O=x.text.unrotatedBoundingBox||
-x.text.boundingBox,new mxRectangle(Math.round(O.x),Math.round(O.y),Math.round(O.width),Math.round(O.height))):ua.apply(this,arguments)};var Ba=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,O){var P=this.graph.getModel(),X=P.getParent(this.state.cell),ba=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(O)==mxEvent.ROTATION_HANDLE||!P.isEdge(X)||null==ba||!ba.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ba.apply(this,
-arguments)};mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),O=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&O==mxConstants.NONE?(x=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,x,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var oa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,O){oa.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 Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(x,O){Aa.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 ya=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ya.apply(this,arguments);var x=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),O.consume()}};var T=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);T.apply(this,arguments)};var aa=(new Date).getTime(),U=0,da=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(y,O,P,X){da.apply(this,arguments);P!=this.currentTerminalState?(aa=(new Date).getTime(),
+U=0):U=(new Date).getTime()-aa;this.currentTerminalState=P};var fa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<U||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&fa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(y,O,P){O=null!=y&&0==y;var X=this.state.getVisibleTerminalState(O);y=null!=y&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,X,O):null;P=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(O),y):null)?P?this.endFixedHandleImage:this.fixedHandleImage:null!=y&&null!=X?P?this.endTerminalHandleImage:this.terminalHandleImage:P?this.endHandleImage:this.handleImage;if(null!=P)return P=
+new mxImageShape(new mxRectangle(0,0,P.width,P.height),P.src),P.preserveImageAspect=!1,P;P=mxConstants.HANDLE_SIZE;this.preferHtml&&--P;return new mxRectangleShape(new mxRectangle(0,0,P,P),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(y,O,P){this.handleImage=O==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:O==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return na.apply(this,arguments)};var sa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(y){if(null!=y&&1==y.length){var O=this.graph.getModel(),P=O.getParent(y[0]),X=this.graph.getCellGeometry(y[0]);if(O.isEdge(P)&&null!=X&&X.relative&&(O=this.graph.view.getState(y[0]),null!=O&&2>O.width&&2>O.height&&null!=O.text&&null!=O.text.boundingBox))return mxRectangle.fromRectangle(O.text.boundingBox)}return sa.apply(this,arguments)};var za=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var y=za.apply(this,arguments),O=[],P=0;P<y.length;P++)"1"!=mxUtils.getValue(y[P].style,"part","0")&&O.push(y[P]);return O};var ua=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var O=this.graph.getModel(),P=O.getParent(y.cell),X=this.graph.getCellGeometry(y.cell);return O.isEdge(P)&&null!=X&&X.relative&&2>y.width&&2>y.height&&null!=y.text&&null!=y.text.boundingBox?(O=y.text.unrotatedBoundingBox||
+y.text.boundingBox,new mxRectangle(Math.round(O.x),Math.round(O.y),Math.round(O.width),Math.round(O.height))):ua.apply(this,arguments)};var Ba=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(y,O){var P=this.graph.getModel(),X=P.getParent(this.state.cell),ba=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(O)==mxEvent.ROTATION_HANDLE||!P.isEdge(X)||null==ba||!ba.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ba.apply(this,
+arguments)};mxVertexHandler.prototype.rotateClick=function(){var y=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),O=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&y==mxConstants.NONE&&O==mxConstants.NONE?(y=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,y,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
+var oa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,O){oa.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 Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(y,O){Aa.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 ya=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ya.apply(this,arguments);var y=!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 O=0;4>O;O++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}var X=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(ba,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));X()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(ba,W){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-O=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(O,P);if(null!=O||null!=P&&0<P.length)x=!0;x&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(x,O){try{if(null==x&&(null==O||0==O.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=x||null!=O&&0<O.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
-"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x&&(this.linkHint.appendChild(this.graph.createLinkForHint(x)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var P=document.createElement("img");P.className="geAdaptiveAsset";P.setAttribute("src",Editor.editImage);
+O=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(O,P);if(null!=O||null!=P&&0<P.length)y=!0;y&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(y,O){try{if(null==y&&(null==O||0==O.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=y||null!=O&&0<O.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=y&&(this.linkHint.appendChild(this.graph.createLinkForHint(y)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var P=document.createElement("img");P.className="geAdaptiveAsset";P.setAttribute("src",Editor.editImage);
P.setAttribute("title",mxResources.get("editLink"));P.setAttribute("width","11");P.setAttribute("height","11");P.style.marginLeft="10px";P.style.marginBottom="-1px";P.style.cursor="pointer";this.linkHint.appendChild(P);mxEvent.addListener(P,"click",mxUtils.bind(this,function(W){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(W)}));var X=P.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-X.style.marginLeft="4px";this.linkHint.appendChild(X);mxEvent.addListener(X,"click",mxUtils.bind(this,function(W){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(W)}))}if(null!=O)for(P=0;P<O.length;P++){var ba=document.createElement("div");ba.style.marginTop=null!=x||0<P?"6px":"0px";ba.appendChild(this.graph.createLinkForHint(O[P].getAttribute("href"),mxUtils.getTextContent(O[P])));this.linkHint.appendChild(ba)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(W){}};mxEdgeHandler.prototype.updateLinkHint=
-mxVertexHandler.prototype.updateLinkHint;var La=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){La.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var x=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(X,ba){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));x();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var O=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);if(null!=O||null!=P&&0<P.length)this.updateLinkHint(O,
-P),this.redrawHandles()};var Oa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Oa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Na=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)this.moveHandles[x].style.left=this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-
-5+"px",this.moveHandles[x].style.top=this.moveHandles[x].rowState.y+this.moveHandles[x].rowState.height/2-6+"px";if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var O=this.cornerHandles,P=O[0].bounds.height/2;O[0].bounds.x=this.state.x-O[0].bounds.width/2+x;O[0].bounds.y=this.state.y-P+x;O[0].redraw();O[1].bounds.x=O[0].bounds.x+this.state.width-2*x;O[1].bounds.y=O[0].bounds.y;O[1].redraw();O[2].bounds.x=O[0].bounds.x;O[2].bounds.y=this.state.y+this.state.height-2*x;O[2].redraw();O[3].bounds.x=
-O[1].bounds.x;O[3].bounds.y=O[2].bounds.y;O[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Na.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
-O=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),P=mxUtils.getBoundingBox(O,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=P?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,O=null!=this.state.text?this.state.text.boundingBox:null,null==P&&(P=this.state),P=P.y+P.height,null!=O&&(P=Math.max(P,O.y+O.height)),this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px",
-this.linkHint.style.top=Math.round(P+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ia.apply(this,arguments);if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&null!=this.moveHandles[x].parentNode&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}if(null!=this.cornerHandles){for(x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&
-null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
-(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var wa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(wa.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
-Math.round(x.y+x.height+Editor.hintOffset)+"px"}};var ab=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ab.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ya=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ya.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,m,u){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=u?u:1;this.updateBoundsFromLine()}function d(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function l(){mxCylinder.call(this)}function B(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function K(){mxShape.call(this)}function Q(){mxShape.call(this)}
-function e(c,m,u,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=u;this.strokewidth=null!=n?n:1}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function v(){mxCylinder.call(this)}function y(){mxActor.call(this)}function C(){mxActor.call(this)}function I(){mxActor.call(this)}function D(){mxActor.call(this)}function N(){mxActor.call(this)}function G(){mxActor.call(this)}function ia(){mxActor.call(this)}function ka(c,m){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+X.style.marginLeft="4px";this.linkHint.appendChild(X);mxEvent.addListener(X,"click",mxUtils.bind(this,function(W){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(W)}))}if(null!=O)for(P=0;P<O.length;P++){var ba=document.createElement("div");ba.style.marginTop=null!=y||0<P?"6px":"0px";ba.appendChild(this.graph.createLinkForHint(O[P].getAttribute("href"),mxUtils.getTextContent(O[P])));this.linkHint.appendChild(ba)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(W){}};mxEdgeHandler.prototype.updateLinkHint=
+mxVertexHandler.prototype.updateLinkHint;var La=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){La.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var y=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(X,ba){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));y();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var O=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);if(null!=O||null!=P&&0<P.length)this.updateLinkHint(O,
+P),this.redrawHandles()};var Oa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Oa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Na=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var y=0;y<this.moveHandles.length;y++)this.moveHandles[y].style.left=this.moveHandles[y].rowState.x+this.moveHandles[y].rowState.width-
+5+"px",this.moveHandles[y].style.top=this.moveHandles[y].rowState.y+this.moveHandles[y].rowState.height/2-6+"px";if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var O=this.cornerHandles,P=O[0].bounds.height/2;O[0].bounds.x=this.state.x-O[0].bounds.width/2+y;O[0].bounds.y=this.state.y-P+y;O[0].redraw();O[1].bounds.x=O[0].bounds.x+this.state.width-2*y;O[1].bounds.y=O[0].bounds.y;O[1].redraw();O[2].bounds.x=O[0].bounds.x;O[2].bounds.y=this.state.y+this.state.height-2*y;O[2].redraw();O[3].bounds.x=
+O[1].bounds.x;O[3].bounds.y=O[2].bounds.y;O[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Na.apply(this);null!=this.state&&null!=this.linkHint&&(y=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
+O=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),P=mxUtils.getBoundingBox(O,this.state.style[mxConstants.STYLE_ROTATION]||"0",y),y=null!=P?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,O=null!=this.state.text?this.state.text.boundingBox:null,null==P&&(P=this.state),P=P.y+P.height,null!=O&&(P=Math.max(P,O.y+O.height)),this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px",
+this.linkHint.style.top=Math.round(P+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ia.apply(this,arguments);if(null!=this.moveHandles){for(var y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&null!=this.moveHandles[y].parentNode&&this.moveHandles[y].parentNode.removeChild(this.moveHandles[y]);this.moveHandles=null}if(null!=this.cornerHandles){for(y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&&
+null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
+(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var wa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(wa.apply(this),null!=this.state&&null!=this.linkHint)){var y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
+Math.round(y.y+y.height+Editor.hintOffset)+"px"}};var ab=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ab.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ya=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ya.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
+this.changeHandler=null)}}();(function(){function b(c,m,u){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=u?u:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function l(){mxCylinder.call(this)}function C(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function K(){mxShape.call(this)}function Q(){mxShape.call(this)}
+function d(c,m,u,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=u;this.strokewidth=null!=n?n:1}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function v(){mxCylinder.call(this)}function x(){mxActor.call(this)}function B(){mxActor.call(this)}function I(){mxActor.call(this)}function D(){mxActor.call(this)}function N(){mxActor.call(this)}function G(){mxActor.call(this)}function ia(){mxActor.call(this)}function ka(c,m){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
this.defaultVariation=m;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ka.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ka.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ka.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ka.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,ka.prototype.curveTo);
this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ka.prototype.arcTo)}function ja(){mxRectangleShape.call(this)}function ca(){mxRectangleShape.call(this)}function pa(){mxActor.call(this)}function ra(){mxActor.call(this)}function L(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function R(){mxRectangleShape.call(this)}function Y(){mxCylinder.call(this)}function Z(){mxShape.call(this)}function la(){mxShape.call(this)}function q(){mxEllipse.call(this)}function F(){mxShape.call(this)}
function T(){mxShape.call(this)}function aa(){mxRectangleShape.call(this)}function U(){mxShape.call(this)}function da(){mxShape.call(this)}function fa(){mxShape.call(this)}function na(){mxShape.call(this)}function sa(){mxShape.call(this)}function za(){mxCylinder.call(this)}function ua(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function oa(){mxDoubleEllipse.call(this)}function Aa(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);this.spacing=0}function La(){mxArrowConnector.call(this);
-this.spacing=0}function Oa(){mxActor.call(this)}function Na(){mxRectangleShape.call(this)}function Ia(){mxActor.call(this)}function wa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Ya(){mxActor.call(this)}function x(){mxActor.call(this)}function O(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxActor.call(this)}function ba(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}
+this.spacing=0}function Oa(){mxActor.call(this)}function Na(){mxRectangleShape.call(this)}function Ia(){mxActor.call(this)}function wa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Ya(){mxActor.call(this)}function y(){mxActor.call(this)}function O(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxActor.call(this)}function ba(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}
function va(){mxRhombus.call(this)}function Ea(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Sa(){mxEllipse.call(this)}function Qa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Pa(c,m,u,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=u;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function $a(){mxConnector.call(this)}
function eb(c,m,u,n,t,z,A,ha,J,xa){A+=J;var ma=n.clone();n.x-=t*(2*A+J);n.y-=z*(2*A+J);t*=A+J;z*=A+J;return function(){c.ellipse(ma.x-t-A,ma.y-z-A,2*A,2*A);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var m=0;m<this.line.length;m++){var u=this.line[m];null!=u&&(u=new mxRectangle(u.x,u.y,this.strokewidth,this.strokewidth),null==c?c=u:c.add(u))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
function(c,m,u,n,t){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,m,u,n){if(null!=m){var t=null;c.begin();for(var z=0;z<m.length;z++){var A=m[z];null!=A&&(null==t?c.moveTo(A.x+u,A.y+n):null!=t&&c.lineTo(A.x+u,A.y+n));t=A}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var m=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var u=null,n=0;n<this.line.length&&!m;n++){var t=this.line[n];null!=t&&null!=u&&(m=mxUtils.rectangleIntersectsSegment(c,
-u,t));u=t}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(d,mxSwimlane);d.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};d.prototype.paintVertexShape=function(c,m,u,n,t){var z=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,A=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Ma.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-u));z||this.outline||!(A&&ha<t||!A&&ha<n)||this.paintForeground(c,m,u,n,t)};d.prototype.paintForeground=function(c,m,u,n,t){if(null!=this.state){var z=this.flipH,A=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=z;z=A;A=ha}c.rotate(-this.getShapeRotation(),z,A,m+n/2,u+t/2);s=this.scale;m=this.bounds.x/s;u=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/
-s;this.paintTableForeground(c,m,u,n,t)}};d.prototype.paintTableForeground=function(c,m,u,n,t){n=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(t=0;t<n.length;t++)b.prototype.paintTableLine(c,n[t],m,u)};d.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-d);mxUtils.extend(k,d);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(l,mxCylinder);l.prototype.size=20;l.prototype.darkOpacity=0;l.prototype.darkOpacity2=0;l.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),A=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+u,t));u=t}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,m,u,n,t){var z=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,A=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Ma.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-u));z||this.outline||!(A&&ha<t||!A&&ha<n)||this.paintForeground(c,m,u,n,t)};e.prototype.paintForeground=function(c,m,u,n,t){if(null!=this.state){var z=this.flipH,A=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=z;z=A;A=ha}c.rotate(-this.getShapeRotation(),z,A,m+n/2,u+t/2);s=this.scale;m=this.bounds.x/s;u=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/
+s;this.paintTableForeground(c,m,u,n,t)}};e.prototype.paintTableForeground=function(c,m,u,n,t){n=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(t=0;t<n.length;t++)b.prototype.paintTableLine(c,n[t],m,u)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
+e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(l,mxCylinder);l.prototype.size=20;l.prototype.darkOpacity=0;l.prototype.darkOpacity2=0;l.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),A=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"darkOpacity2",this.darkOpacity2))));c.translate(m,u);c.begin();c.moveTo(0,0);c.lineTo(n-z,0);c.lineTo(n,z);c.lineTo(n,t);c.lineTo(z,t);c.lineTo(0,t-z);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=A&&(c.setFillAlpha(Math.abs(A)),c.setFillColor(0>A?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-z,0),c.lineTo(n,z),c.lineTo(z,z),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(z,
-z),c.lineTo(z,t),c.lineTo(0,t-z),c.close(),c.fill()),c.begin(),c.moveTo(z,t),c.lineTo(z,z),c.lineTo(0,0),c.moveTo(z,z),c.lineTo(n,z),c.end(),c.stroke())};l.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",l);var cb=Math.tan(mxUtils.toRadians(30)),db=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(B,
-mxCylinder);B.prototype.size=6;B.prototype.paintVertexShape=function(c,m,u,n,t){c.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(n-z),u+.5*(t-z),z,z);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,u,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",B);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,m,u,n,t){m=Math.min(n,t/cb);c.translate((n-m)/2,(t-m)/2+m/4);c.moveTo(0,
+z),c.lineTo(z,t),c.lineTo(0,t-z),c.close(),c.fill()),c.begin(),c.moveTo(z,t),c.lineTo(z,z),c.lineTo(0,0),c.moveTo(z,z),c.lineTo(n,z),c.end(),c.stroke())};l.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",l);var cb=Math.tan(mxUtils.toRadians(30)),db=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(C,
+mxCylinder);C.prototype.size=6;C.prototype.paintVertexShape=function(c,m,u,n,t){c.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(n-z),u+.5*(t-z),z,z);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,u,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",C);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,m,u,n,t){m=Math.min(n,t/cb);c.translate((n-m)/2,(t-m)/2+m/4);c.moveTo(0,
.25*m);c.lineTo(.5*m,m*db);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-db)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,m,u,n,t,z){m=Math.min(n,t/(.5+cb));z?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-db)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-db)*m),c.lineTo(.5*m,(1-db)*m)):(c.translate((n-m)/2,(t-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*db),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*
m,(1-db)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(M,mxCylinder);M.prototype.redrawPath=function(c,m,u,n,t,z){m=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(z&&null!=this.fill||!z&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,
-m);z||(c.moveTo(0,m),c.curveTo(0,-m/3,n,-m/3,n,m),c.lineTo(n,t-m),c.curveTo(n,t+m/3,0,t+m/3,0,t-m),c.close())};M.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",M);mxUtils.extend(S,mxCylinder);S.prototype.size=30;S.prototype.darkOpacity=0;S.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",
this.size))))),A=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,u);c.begin();c.moveTo(0,0);c.lineTo(n-z,0);c.lineTo(n,z);c.lineTo(n,t);c.lineTo(0,t);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=A&&(c.setFillAlpha(Math.abs(A)),c.setFillColor(0>A?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-z,0),c.lineTo(n-z,z),c.lineTo(n,z),c.close(),c.fill()),c.begin(),c.moveTo(n-z,0),c.lineTo(n-z,z),c.lineTo(n,z),
c.end(),c.stroke())};mxCellRenderer.registerShape("note",S);mxUtils.extend(H,S);mxCellRenderer.registerShape("note2",H);H.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(K,mxShape);K.prototype.isoAngle=15;K.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
"isoAngle",this.isoAngle))))*Math.PI/200;z=Math.min(n*Math.tan(z),.5*t);c.translate(m,u);c.begin();c.moveTo(.5*n,0);c.lineTo(n,z);c.lineTo(n,t-z);c.lineTo(.5*n,t);c.lineTo(0,t-z);c.lineTo(0,z);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,z);c.lineTo(.5*n,2*z);c.lineTo(n,z);c.moveTo(.5*n,2*z);c.lineTo(.5*n,t);c.stroke()};mxCellRenderer.registerShape("isoCube2",K);mxUtils.extend(Q,mxShape);Q.prototype.size=15;Q.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(.5*
-t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,u);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke())};mxCellRenderer.registerShape("cylinder2",Q);mxUtils.extend(e,mxCylinder);e.prototype.size=
-15;e.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),A=mxUtils.getValue(this.style,"lid",!0);c.translate(m,u);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),A?(c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z)):(c.moveTo(0,0),c.arcTo(.5*n,z,0,0,0,.5*n,z),c.arcTo(.5*n,z,0,0,0,n,0)),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),
-A&&(c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke()))};mxCellRenderer.registerShape("cylinder3",e);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(c,m,u,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(g,mxCylinder);g.prototype.tabWidth=60;g.prototype.tabHeight=20;g.prototype.tabPosition="right";g.prototype.arcSize=.1;
+t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,u);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke())};mxCellRenderer.registerShape("cylinder2",Q);mxUtils.extend(d,mxCylinder);d.prototype.size=
+15;d.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),A=mxUtils.getValue(this.style,"lid",!0);c.translate(m,u);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),A?(c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z)):(c.moveTo(0,0),c.arcTo(.5*n,z,0,0,0,.5*n,z),c.arcTo(.5*n,z,0,0,0,n,0)),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),
+A&&(c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke()))};mxCellRenderer.registerShape("cylinder3",d);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(c,m,u,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",f);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,m,u,n,t){c.translate(m,u);m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));u=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),A=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),J=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(J*=Math.min(n,t));
J=Math.min(J,.5*n,.5*(t-u));m=Math.max(m,J);m=Math.min(n-J,m);A||(J=0);c.begin();"left"==z?(c.moveTo(Math.max(J,0),u),c.lineTo(Math.max(J,0),0),c.lineTo(m,0),c.lineTo(m,u)):(c.moveTo(n-m,u),c.lineTo(n-m,0),c.lineTo(n-Math.max(J,0),0),c.lineTo(n-Math.max(J,0),u));A?(c.moveTo(0,J+u),c.arcTo(J,J,0,0,1,J,u),c.lineTo(n-J,u),c.arcTo(J,J,0,0,1,n,J+u),c.lineTo(n,t-J),c.arcTo(J,J,0,0,1,n-J,t),c.lineTo(J,t),c.arcTo(J,J,0,0,1,0,t-J)):(c.moveTo(0,u),c.lineTo(n,u),c.lineTo(n,t),c.lineTo(0,t));c.close();c.fillAndStroke();
c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,u+20),c.lineTo(n-20,u+10),c.lineTo(n-10,u+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var u=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(z*=Math.min(c.width,c.height));z=Math.min(z,.5*c.width,.5*(c.height-m));n||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(c.width,c.width-u),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-u),0,z,Math.min(c.height,c.height-
m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(v,mxCylinder);v.prototype.arcSize=.1;v.prototype.paintVertexShape=function(c,m,u,n,t){c.translate(m,u);var z=mxUtils.getValue(this.style,"rounded",!1),A=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u=mxUtils.getValue(this.style,"umlStateConnection",null);A||(m*=Math.min(n,t));m=Math.min(m,.5*n,.5*t);z||(m=0);z=0;null!=u&&(z=10);c.begin();c.moveTo(z,
m);c.arcTo(m,m,0,0,1,z+m,0);c.lineTo(n-m,0);c.arcTo(m,m,0,0,1,n,m);c.lineTo(n,t-m);c.arcTo(m,m,0,0,1,n-m,t);c.lineTo(z+m,t);c.arcTo(m,m,0,0,1,z,t-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,t-20,10,10,3,3),c.stroke(),c.roundrect(n-20,t-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,t-15),c.lineTo(n-20,t-15),c.stroke());"connPointRefEntry"==u?(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-u&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};v.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",v);mxUtils.extend(y,mxActor);y.prototype.size=30;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
-function(c,m,u,n,t){m=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,m)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("card",y);mxUtils.extend(C,mxActor);C.prototype.size=.4;C.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,m/2);c.quadTo(n/4,1.4*m,n/2,m/2);c.quadTo(3*n/4,m*(1-1.4),n,m/2);c.lineTo(n,t-m/2);c.quadTo(3*n/4,t-1.4*m,n/2,t-m/2);c.quadTo(n/4,t-m*(1-1.4),0,t-m/2);c.lineTo(0,m/2);c.close();c.end()};C.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),u=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return m*=
-n,new mxRectangle(c.x,c.y+m,u,n-2*m);m*=u;return new mxRectangle(c.x+m,c.y,u-2*m,n)}return c};mxCellRenderer.registerShape("tape",C);mxUtils.extend(I,mxActor);I.prototype.size=.3;I.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};I.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+u&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};v.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",v);mxUtils.extend(x,mxActor);x.prototype.size=30;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=
+function(c,m,u,n,t){m=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,m)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("card",x);mxUtils.extend(B,mxActor);B.prototype.size=.4;B.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,m/2);c.quadTo(n/4,1.4*m,n/2,m/2);c.quadTo(3*n/4,m*(1-1.4),n,m/2);c.lineTo(n,t-m/2);c.quadTo(3*n/4,t-1.4*m,n/2,t-m/2);c.quadTo(n/4,t-m*(1-1.4),0,t-m/2);c.lineTo(0,m/2);c.close();c.end()};B.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),u=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return m*=
+n,new mxRectangle(c.x,c.y+m,u,n-2*m);m*=u;return new mxRectangle(c.x+m,c.y,u-2*m,n)}return c};mxCellRenderer.registerShape("tape",B);mxUtils.extend(I,mxActor);I.prototype.size=.3;I.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};I.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
0);c.lineTo(n,0);c.lineTo(n,t-m/2);c.quadTo(3*n/4,t-1.4*m,n/2,t-m/2);c.quadTo(n/4,t-m*(1-1.4),0,t-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",I);var rb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,u,n){var t=mxUtils.getValue(this.style,"size");return null!=t?n*Math.max(0,Math.min(1,t)):rb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};e.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};d.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var u=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(z*=Math.min(c.width,c.height));z=Math.min(z,.5*c.width,.5*(c.height-m));n||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(z,0,Math.min(c.width,c.width-u),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-u),0,z,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};v.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};H.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(c,m,u,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
@@ -2787,8 +2791,8 @@ mxUtils.extend(Ia,mxActor);Ia.prototype.dx=20;Ia.prototype.dy=20;Ia.prototype.re
new mxPoint(m,t),new mxPoint(0,t)],this.isRounded,z,!0);c.end()};mxCellRenderer.registerShape("corner",Ia);mxUtils.extend(wa,mxActor);wa.prototype.redrawPath=function(c,m,u,n,t){c.moveTo(0,0);c.lineTo(0,t);c.end();c.moveTo(n,0);c.lineTo(n,t);c.end();c.moveTo(0,t/2);c.lineTo(n,t/2);c.end()};mxCellRenderer.registerShape("crossbar",wa);mxUtils.extend(ab,mxActor);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.redrawPath=function(c,m,u,n,t){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
"dx",this.dx))));u=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint((n+m)/2,u),new mxPoint((n+m)/2,t),new mxPoint((n-m)/2,t),new mxPoint((n-m)/2,u),new mxPoint(0,u)],this.isRounded,z,!0);c.end()};mxCellRenderer.registerShape("tee",ab);mxUtils.extend(Ya,
mxActor);Ya.prototype.arrowWidth=.3;Ya.prototype.arrowSize=.2;Ya.prototype.redrawPath=function(c,m,u,n,t){var z=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));u=(t-z)/2;z=u+z;var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(n-m,u),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-
-m,t),new mxPoint(n-m,z),new mxPoint(0,z)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Ya);mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(c,m,u,n,t){var z=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));u=(t-z)/2;z=u+z;var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(m,0),new mxPoint(m,u),new mxPoint(n-m,u),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-m,t),new mxPoint(n-m,z),new mxPoint(m,z),new mxPoint(m,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",x);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.fixedSize=20;O.prototype.redrawPath=function(c,m,u,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+m,t),new mxPoint(n-m,z),new mxPoint(0,z)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Ya);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,m,u,n,t){var z=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));u=(t-z)/2;z=u+z;var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(m,0),new mxPoint(m,u),new mxPoint(n-m,u),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-m,t),new mxPoint(n-m,z),new mxPoint(m,z),new mxPoint(m,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",y);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.fixedSize=20;O.prototype.redrawPath=function(c,m,u,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(m,0);c.lineTo(n,0);c.quadTo(n-2*m,t/2,n,t);c.lineTo(m,t);c.quadTo(m-2*m,t/2,m,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",O);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(c,m,u,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.close();c.end()};mxCellRenderer.registerShape("or",P);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(c,
m,u,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.quadTo(n/2,t/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",X);mxUtils.extend(ba,mxActor);ba.prototype.size=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,m,u,n,t){m=Math.min(n/2,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n-m,0),
new mxPoint(n,.8*m),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,.8*m)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ba);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,
@@ -2895,11 +2899,11 @@ Math.min(u.width,n.x-u.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(u
Math.min(m.width,u.x-m.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,u.y-m.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(m){var u=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",ab.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",ab.prototype.dy)));return new mxPoint(m.x+(m.width+u)/2,m.y+n)},function(m,u){this.state.style.dx=Math.round(Math.max(0,2*Math.min(m.width/2,u.x-m.x-m.width/2)));this.state.style.dy=
Math.round(Math.max(0,Math.min(m.height,u.y-m.y)))},!1)]},singleArrow:kb(1),doubleArrow:kb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(m){var u=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,
"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(u=m.width-u);return new mxPoint(m.x+u,m.y+n)},function(m,u){var n=Math.max(0,Math.min(m.width,u.x-m.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=m.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(m.height,u.y-m.y)))},!1)]},document:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",I.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-u)*m.height)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-u.y)/m.height))},!1)]},tape:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(m.getCenterX(),m.y+u*m.height/2)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(u.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[gb(c,
-["isoAngle"],function(m){var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",K.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(u),.5*m.height))},function(m,u){this.state.style.isoAngle=Math.max(0,50*(u.y-m.y)/m.height)},!0)]},cylinder2:ib(Q.prototype.size),cylinder3:ib(e.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));
+"size",I.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-u)*m.height)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-u.y)/m.height))},!1)]},tape:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(m.getCenterX(),m.y+u*m.height/2)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(u.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[gb(c,
+["isoAngle"],function(m){var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",K.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(u),.5*m.height))},function(m,u){this.state.style.isoAngle=Math.max(0,50*(u.y-m.y)/m.height)},!0)]},cylinder2:ib(Q.prototype.size),cylinder3:ib(d.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));
return new mxPoint(m.getCenterX(),m.y+(1-u)*m.height)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-u.y)/m.height))},!1)]},"mxgraph.basic.rect":function(c){var m=[Graph.createHandle(c,["size"],function(u){var n=Math.max(0,Math.min(u.width/2,u.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(u.x+n,u.y+n)},function(u,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(u.height/2,u.width/2,n.x-u.x)))/100})];c=Graph.createHandle(c,
["indent"],function(u){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(u.x+.75*u.width,u.y+n*u.height/200)},function(u,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-u.y)/u.height)))/100});m.push(c);return m},step:ob(ra.prototype.size,!0,null,!0,ra.prototype.fixedSize),hexagon:ob(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:ob(G.prototype.size,!1),display:ob(Ka.prototype.size,!1),cube:ub(1,
-l.prototype.size,!1),card:ub(.5,y.prototype.size,!0),loopLimit:ub(.5,ba.prototype.size,!0),trapezoid:nb(.5,N.prototype.size,N.prototype.fixedSize),parallelogram:nb(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
+l.prototype.size,!1),card:ub(.5,x.prototype.size,!0),loopLimit:ub(.5,ba.prototype.size,!0),trapezoid:nb(.5,N.prototype.size,N.prototype.fixedSize),parallelogram:nb(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
null==mxStencilRegistry.getStencil(m)?m=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(m=mxConstants.SHAPE_SWIMLANE);m=tb[m];null==m&&null!=this.state.shape&&this.state.shape.isRoundable()&&(m=tb[mxConstants.SHAPE_RECTANGLE]);null!=m&&(m=m(this.state),null!=m&&(c=null==c?m:c.concat(m)))}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=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),pb=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(pb),Math.sin(pb));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,m,u,n,t){var z=c.view;n=null!=n&&0<n.length?n[0]:null;var A=c.absolutePoints,ha=A[0];A=A[A.length-1];null!=n&&(n=z.transformControlPoint(c,n));
null==ha&&null!=m&&(ha=new mxPoint(m.getCenterX(),m.getCenterY()));null==A&&null!=u&&(A=new mxPoint(u.getCenterX(),u.getCenterY()));var J=xb.x,xa=xb.y,ma=zb.x,Wa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=A&&null!=ha){c=function(Da,Ja,Ha){Da-=bb.x;var Ga=Ja-bb.y;Ja=(Wa*Da-ma*Ga)/(J*Wa-xa*ma);Da=(xa*Da-J*Ga)/(xa*ma-J*Wa);jb?(Ha&&(bb=new mxPoint(bb.x+J*Ja,bb.y+xa*Ja),t.push(bb)),bb=new mxPoint(bb.x+ma*Da,bb.y+Wa*Da)):(Ha&&(bb=new mxPoint(bb.x+ma*Da,bb.y+Wa*Da),t.push(bb)),
@@ -2913,10 +2917,10 @@ Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))))
1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ma.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,Math.min(u,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*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(u+n)));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));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};y.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,Math.min(u,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*(m+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};x.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,Math.min(u,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*(m+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(u+n)));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));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};l.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,Math.min(u,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*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(u+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,u-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(u-n)));return c};e.prototype.getConstraints=function(c,m,u){c=[];m=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,u-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(u-n)));return c};d.prototype.getConstraints=function(c,m,u){c=[];m=Math.max(0,Math.min(u,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,m));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(1,
0),!1,null,0,m+.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,u-m-.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-m-.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};g.prototype.getConstraints=
function(c,m,u){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),t=Math.max(0,Math.min(u,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*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2932,7 +2936,7 @@ qa.prototype.constraints=mxEllipse.prototype.constraints;Sa.prototype.constraint
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];C.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,
+.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)];B.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)];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(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
@@ -2946,7 +2950,7 @@ qa.prototype.constraints=mxEllipse.prototype.constraints;Sa.prototype.constraint
0),!1,null,m,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(u+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return c};wa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Ya.prototype.getConstraints=
function(c,m,u){c=[];var n=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),t=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(u-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-t),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-t),u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));return c};x.prototype.getConstraints=function(c,m,u){c=[];var n=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth)))),t=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));n=(u-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-t),u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));return c};y.prototype.getConstraints=function(c,m,u){c=[];var n=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth)))),t=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));n=(u-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,u));return c};Fa.prototype.getConstraints=
function(c,m,u){c=[];var n=Math.min(u,m),t=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(u-t)/2;var z=n+t,A=(m-t)/2;t=A+t;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,t,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,u-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,u));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,u-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+t),n));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2954,18 +2958,18 @@ function(c,m,u){c=[];var n=Math.min(u,m),t=Math.max(0,Math.min(n,n*parseFloat(mx
0),!1,null,0,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*A,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,n));return c};aa.prototype.constraints=null;P.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)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(H){p.escape();H=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),H);null!=H&&p.setSelectionCells(H)}function d(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var H=p.getSelectionCells(),K=0;K<H.length;K++)p.cellLabelChanged(H[K],"")}finally{p.getModel().endUpdate()}}}function k(H,K,Q,e,f){f.getModel().beginUpdate();try{var g=f.getCellGeometry(H);null!=g&&Q&&e&&(Q/=e,g=g.clone(),1<Q?g.height=g.width/Q:g.width=g.height*Q,f.getModel().setGeometry(H,
-g));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,K,[H]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[H])}finally{f.getModel().endUpdate()}}var l=this.editorUi,B=l.editor,p=B.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(l.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";l.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var H=p.view.scale,
+Actions.prototype.init=function(){function b(H){p.escape();H=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),H);null!=H&&p.setSelectionCells(H)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var H=p.getSelectionCells(),K=0;K<H.length;K++)p.cellLabelChanged(H[K],"")}finally{p.getModel().endUpdate()}}}function k(H,K,Q,d,f){f.getModel().beginUpdate();try{var g=f.getCellGeometry(H);null!=g&&Q&&d&&(Q/=d,g=g.clone(),1<Q?g.height=g.width/Q:g.width=g.height*Q,f.getModel().setGeometry(H,
+g));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,K,[H]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[H])}finally{f.getModel().endUpdate()}}var l=this.editorUi,C=l.editor,p=C.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(l.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";l.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var H=p.view.scale,
K=p.view.translate.x,Q=p.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(H-p.view.scale)&&K==p.view.translate.x&&Q==p.view.translate.y&&l.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?l.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){l.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(H,K){try{var Q=mxUtils.parseXml(H);B.graph.setSelectionCells(B.graph.importGraphModel(Q.documentElement))}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}));l.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){l.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){l.saveFile(!0)},null,
+window.openFile.setConsumer(mxUtils.bind(this,function(H,K){try{var Q=mxUtils.parseXml(H);C.graph.setSelectionCells(C.graph.importGraphModel(Q.documentElement))}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}));l.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){l.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){l.saveFile(!0)},null,
null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){l.showDialog((new ExportDialog(l)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var H=new EditDiagramDialog(l);l.showDialog(H.container,620,420,!0,!1);H.init()});this.addAction("pageSetup...",function(){l.showDialog((new PageSetupDialog(l)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){l.showDialog((new PrintDialog(l)).container,300,180,!0,!0)},null,"sprite-print",
Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){l.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){l.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var H=null;try{H=l.copyXml(),null!=H&&p.removeCells(H,!1)}catch(K){}null==H&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{l.copyXml()}catch(H){}try{mxClipboard.copy(p)}catch(H){l.handleError(H)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var H=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(K){if(null!=K){p.getModel().beginUpdate();try{l.pasteXml(K,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),H=!0)}catch(K){}H||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(H){function K(e){if(null!=e){for(var f=!0,g=0;g<
-e.length&&f;g++)f=f&&p.model.isEdge(e[g]);var v=p.view.translate;g=p.view.scale;var y=v.x,C=v.y;v=null;if(1==e.length&&f){var I=p.getCellGeometry(e[0]);null!=I&&(v=I.getTerminalPoint(!0))}v=null!=v?v:p.getBoundingBoxFromGeometry(e,f);null!=v&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/g-y)),g=Math.round(p.snap(p.popupMenuHandler.triggerY/g-C)),p.cellsMoved(e,f-v.x,g-v.y))}}function Q(){p.getModel().beginUpdate();try{K(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())){H=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(e){if(null!=e){p.getModel().beginUpdate();try{K(l.pasteXml(e,!0))}finally{p.getModel().endUpdate()}}else Q()}),H=!0)}catch(e){}H||Q()}});this.addAction("copySize",function(){var H=p.getSelectionCell();p.isEnabled()&&null!=H&&p.getModel().isVertex(H)&&(H=p.getCellGeometry(H),null!=H&&(l.copiedSize=new mxRectangle(H.x,H.y,H.width,H.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var H=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(K){if(null!=K){p.getModel().beginUpdate();try{l.pasteXml(K,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),H=!0)}catch(K){}H||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(H){function K(d){if(null!=d){for(var f=!0,g=0;g<
+d.length&&f;g++)f=f&&p.model.isEdge(d[g]);var v=p.view.translate;g=p.view.scale;var x=v.x,B=v.y;v=null;if(1==d.length&&f){var I=p.getCellGeometry(d[0]);null!=I&&(v=I.getTerminalPoint(!0))}v=null!=v?v:p.getBoundingBoxFromGeometry(d,f);null!=v&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/g-x)),g=Math.round(p.snap(p.popupMenuHandler.triggerY/g-B)),p.cellsMoved(d,f-v.x,g-v.y))}}function Q(){p.getModel().beginUpdate();try{K(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())){H=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(d){if(null!=d){p.getModel().beginUpdate();try{K(l.pasteXml(d,!0))}finally{p.getModel().endUpdate()}}else Q()}),H=!0)}catch(d){}H||Q()}});this.addAction("copySize",function(){var H=p.getSelectionCell();p.isEnabled()&&null!=H&&p.getModel().isVertex(H)&&(H=p.getCellGeometry(H),null!=H&&(l.copiedSize=new mxRectangle(H.x,H.y,H.width,H.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedSize){p.getModel().beginUpdate();try{for(var H=p.getResizableCells(p.getSelectionCells()),K=0;K<H.length;K++)if(p.getModel().isVertex(H[K])){var Q=p.getCellGeometry(H[K]);null!=Q&&(Q=Q.clone(),Q.width=l.copiedSize.width,Q.height=l.copiedSize.height,p.getModel().setGeometry(H[K],Q))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var H=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
-null!=H&&(H=H.cloneValue(),null==H||isNaN(H.nodeType)||(l.copiedValue=H))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(H,K){function Q(g,v){var y=e.getValue(g);v=g.cloneValue(v);v.removeAttribute("placeholders");null==y||isNaN(y.nodeType)||v.setAttribute("placeholders",y.getAttribute("placeholders"));null!=H&&mxEvent.isShiftDown(H)||v.setAttribute("label",p.convertValueToString(g));e.setValue(g,v)}H=null!=K?K:H;var e=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedValue){e.beginUpdate();
-try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)Q(e.getRoot(),l.copiedValue);else for(K=0;K<f.length;K++)Q(f[K],l.copiedValue)}finally{e.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(H,K){H=null!=K?K:H;null!=H&&mxEvent.isShiftDown(H)?d():b(null!=H&&(mxEvent.isControlDown(H)||mxEvent.isMetaDown(H)||mxEvent.isAltDown(H)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){d()},null,null,Editor.ctrlKey+
+null!=H&&(H=H.cloneValue(),null==H||isNaN(H.nodeType)||(l.copiedValue=H))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(H,K){function Q(g,v){var x=d.getValue(g);v=g.cloneValue(v);v.removeAttribute("placeholders");null==x||isNaN(x.nodeType)||v.setAttribute("placeholders",x.getAttribute("placeholders"));null!=H&&mxEvent.isShiftDown(H)||v.setAttribute("label",p.convertValueToString(g));d.setValue(g,v)}H=null!=K?K:H;var d=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedValue){d.beginUpdate();
+try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)Q(d.getRoot(),l.copiedValue);else for(K=0;K<f.length;K++)Q(f[K],l.copiedValue)}finally{d.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(H,K){H=null!=K?K:H;null!=H&&mxEvent.isShiftDown(H)?e():b(null!=H&&(mxEvent.isControlDown(H)||mxEvent.isMetaDown(H)||mxEvent.isAltDown(H)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(H){l.handleError(H)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var H=l.getSelectionState();if(null!=H.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",H.rowspan,[H.mergeCell]),p.setCellStyles("colspan",H.colspan,[H.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
new Action(mxResources.get("unmerge"),function(){var H=l.getSelectionState();if(0<H.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,H.cells),p.setCellStyles("colspan",null,H.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(H,K){H=null!=K?K:H;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=H?mxEvent.isShiftDown(H):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(H){H=p.getSelectionCell();p.isEnabled()&&null!=H&&p.addSelectionCells(p.getEdges(H))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},
@@ -2974,15 +2978,15 @@ Q,H);p.setCellStyles("connectable",Q,H)}finally{p.getModel().endUpdate()}}},null
null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(H){p.orderCells(!1,null,!0)});this.addAction("sendBackward",function(H){p.orderCells(!0,null,!0)});this.addAction("group",function(){if(p.isEnabled()){var H=mxUtils.sortCells(p.getSelectionCells(),!0);1!=H.length||p.isTable(H[0])||p.isTableRow(H[0])?
(H=p.getCellsForGroup(H),1<H.length&&p.setSelectionCell(p.groupCells(null,0,H))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(p.isEnabled()){var H=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var K=p.ungroupCells();if(null!=H)for(var Q=0;Q<H.length;Q++)p.model.contains(H[Q])&&(0==p.model.getChildCount(H[Q])&&p.model.isVertex(H[Q])&&p.setCellStyles("container","0",[H[Q]]),K.push(H[Q]))}finally{p.model.endUpdate()}0<
K.length&&p.setSelectionCells(K)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var H=p.getSelectionCells();if(null!=H){for(var K=[],Q=0;Q<H.length;Q++)p.isTableRow(H[Q])||p.isTableCell(H[Q])||K.push(H[Q]);p.removeCellsFromParent(K)}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var H=p.getSelectionCell()||p.getModel().getRoot();l.showDataDialog(H)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K="";if(mxUtils.isNode(H.value)){var Q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&H.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q=H.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==Q&&(Q=H.value.getAttribute("tooltip"));null!=Q&&(K=Q)}K=new TextareaDialog(l,mxResources.get("editTooltip")+":",K,function(e){p.setTooltipForCell(H,
-e)});l.showDialog(K.container,320,200,!0,!0);K.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var H=p.getLinkForCell(p.getSelectionCell());null!=H&&p.openLink(H)});this.addAction("editLink...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K=p.getLinkForCell(H)||"";l.showLinkDialog(K,mxResources.get("apply"),function(Q,e,f){Q=mxUtils.trim(Q);p.setLinkForCell(H,0<Q.length?Q:null);p.setAttributeForCell(H,"linkTarget",f)},!0,p.getLinkTargetForCell(H))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),l.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&l.showLinkDialog("",mxResources.get("insert"),function(H,K,Q){H=mxUtils.trim(H);if(0<H.length){var e=null,f=p.getLinkTitle(H);null!=K&&0<K.length&&(e=K[0].iconUrl,
-f=K[0].name||K[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));K=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));K.vertex=!0;e=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([K],!0));K.geometry.x=e.x;K.geometry.y=e.y;p.setAttributeForCell(K,"linkTarget",Q);p.setLinkForCell(K,H);p.cellSizeUpdated(K,
-!0);p.getModel().beginUpdate();try{K=p.addCell(K),p.fireEvent(new mxEventObject("cellsInserted","cells",[K]))}finally{p.getModel().endUpdate()}p.setSelectionCell(K);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var H=p.getSelectedElement(),K=p.getParentByName(H,"A",p.cellEditor.textarea),Q="";if(null==K&&null!=H&&null!=H.getElementsByTagName)for(var e=H.getElementsByTagName("a"),
-f=0;f<e.length&&null==K;f++)e[f].textContent==H.textContent&&(K=e[f]);null!=K&&"A"==K.nodeName&&(Q=K.getAttribute("href")||"",p.selectNode(K));var g=p.cellEditor.saveSelection();l.showLinkDialog(Q,mxResources.get("apply"),mxUtils.bind(this,function(v){p.cellEditor.restoreSelection(g);null!=v&&p.insertLink(v)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var H=p.getSelectionCells();if(null!=H){p.getModel().beginUpdate();
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K="";if(mxUtils.isNode(H.value)){var Q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&H.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q=H.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==Q&&(Q=H.value.getAttribute("tooltip"));null!=Q&&(K=Q)}K=new TextareaDialog(l,mxResources.get("editTooltip")+":",K,function(d){p.setTooltipForCell(H,
+d)});l.showDialog(K.container,320,200,!0,!0);K.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var H=p.getLinkForCell(p.getSelectionCell());null!=H&&p.openLink(H)});this.addAction("editLink...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K=p.getLinkForCell(H)||"";l.showLinkDialog(K,mxResources.get("apply"),function(Q,d,f){Q=mxUtils.trim(Q);p.setLinkForCell(H,0<Q.length?Q:null);p.setAttributeForCell(H,"linkTarget",f)},!0,p.getLinkTargetForCell(H))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),l.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&l.showLinkDialog("",mxResources.get("insert"),function(H,K,Q){H=mxUtils.trim(H);if(0<H.length){var d=null,f=p.getLinkTitle(H);null!=K&&0<K.length&&(d=K[0].iconUrl,
+f=K[0].name||K[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));K=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));K.vertex=!0;d=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([K],!0));K.geometry.x=d.x;K.geometry.y=d.y;p.setAttributeForCell(K,"linkTarget",Q);p.setLinkForCell(K,H);p.cellSizeUpdated(K,
+!0);p.getModel().beginUpdate();try{K=p.addCell(K),p.fireEvent(new mxEventObject("cellsInserted","cells",[K]))}finally{p.getModel().endUpdate()}p.setSelectionCell(K);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var H=p.getSelectedElement(),K=p.getParentByName(H,"A",p.cellEditor.textarea),Q="";if(null==K&&null!=H&&null!=H.getElementsByTagName)for(var d=H.getElementsByTagName("a"),
+f=0;f<d.length&&null==K;f++)d[f].textContent==H.textContent&&(K=d[f]);null!=K&&"A"==K.nodeName&&(Q=K.getAttribute("href")||"",p.selectNode(K));var g=p.cellEditor.saveSelection();l.showLinkDialog(Q,mxResources.get("apply"),mxUtils.bind(this,function(v){p.cellEditor.restoreSelection(g);null!=v&&p.insertLink(v)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var H=p.getSelectionCells();if(null!=H){p.getModel().beginUpdate();
try{for(var K=0;K<H.length;K++){var Q=H[K];p.getModel().isVertex(Q)&&(0<p.getModel().getChildCount(Q)?p.updateGroupBounds([Q],0,!0):p.updateCellSize(Q))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var H=p.getCommonStyle(p.getSelectionCells());H="1"==mxUtils.getValue(H,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var K=
-p.getEditableCells(p.getSelectionCells()),Q=0;Q<K.length;Q++)if(state=p.getView().getState(K[Q]),null!=state){var e=mxUtils.getValue(state.style,"html","0");if("1"==e&&null==H){var f=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=p.sanitizeHtml(f);f=mxUtils.extractTextWithWhitespace(g.childNodes);p.cellLabelChanged(state.cell,f);p.setCellStyles("html",H,[K[Q]])}else"0"==
-e&&"1"==H&&(f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(f)),p.setCellStyles("html",H,[K[Q]]))}l.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=H?H:"0"],"cells",K))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var H=p.getView().getState(p.getSelectionCell()),K="wrap";p.stopEditing();null!=H&&"wrap"==H.style[mxConstants.STYLE_WHITE_SPACE]&&
+p.getEditableCells(p.getSelectionCells()),Q=0;Q<K.length;Q++)if(state=p.getView().getState(K[Q]),null!=state){var d=mxUtils.getValue(state.style,"html","0");if("1"==d&&null==H){var f=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=p.sanitizeHtml(f);f=mxUtils.extractTextWithWhitespace(g.childNodes);p.cellLabelChanged(state.cell,f);p.setCellStyles("html",H,[K[Q]])}else"0"==
+d&&"1"==H&&(f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(f)),p.setCellStyles("html",H,[K[Q]]))}l.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=H?H:"0"],"cells",K))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var H=p.getView().getState(p.getSelectionCell()),K="wrap";p.stopEditing();null!=H&&"wrap"==H.style[mxConstants.STYLE_WHITE_SPACE]&&
(K=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,K)});this.addAction("rotation",function(){var H="0",K=p.getView().getState(p.getSelectionCell());null!=K&&(H=K.style[mxConstants.STYLE_ROTATION]||H);H=new FilenameDialog(l,H,mxResources.get("apply"),function(Q){null!=Q&&0<Q.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,Q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");l.showDialog(H.container,375,80,!0,!0);H.init()});this.addAction("resetView",function(){p.zoomTo(1);
l.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(H){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,l.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(H){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,l.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var H=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),K=p.view.translate,
Q=p.view.scale;H.x=H.x/Q-K.x;H.y=H.y/Q-K.y;H.width/=Q;H.height/=Q;null!=p.backgroundImage&&(H=mxRectangle.fromRectangle(H),H.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==H.width||0==H.height?(p.zoomTo(1),l.resetScrollbars()):(K=Editor.fitWindowBorders,null!=K&&(H.x-=K.x,H.y-=K.y,H.width+=K.width+K.x,H.height+=K.height+K.y),p.fitWindow(H))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
@@ -2995,9 +2999,9 @@ M.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});M.setEnab
M.setToggleAction(!0);M.setSelectedCallback(function(){return p.foldingEnabled});M.isEnabled=E;M=this.addAction("scrollbars",function(){l.setScrollbars(!l.hasScrollbars())});M.setToggleAction(!0);M.setSelectedCallback(function(){return p.scrollbars});M=this.addAction("pageView",mxUtils.bind(this,function(){l.setPageVisible(!p.pageVisible)}));M.setToggleAction(!0);M.setSelectedCallback(function(){return p.pageVisible});M=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
l.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");M.setToggleAction(!0);M.setSelectedCallback(function(){return p.connectionArrowsEnabled});M=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());l.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");M.setToggleAction(!0);M.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});M=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
l.fireEvent(new mxEventObject("copyConnectChanged"))});M.setToggleAction(!0);M.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});M.isEnabled=E;M=this.addAction("autosave",function(){l.editor.setAutosave(!l.editor.autosave)});M.setToggleAction(!0);M.setSelectedCallback(function(){return l.editor.autosave});M.isEnabled=E;M.visible=!1;this.addAction("help",function(){var H="";mxResources.isLanguageSupported(mxClient.language)&&(H="_"+mxClient.language);p.openLink(RESOURCES_PATH+
-"/help"+H+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(l.showDialog((new AboutDialog(l)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));M=mxUtils.bind(this,function(H,K,Q,e){return this.addAction(H,function(){if(null!=Q&&p.cellEditor.isContentEditing())Q();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,K,f);(K&mxConstants.FONT_BOLD)==
+"/help"+H+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(l.showDialog((new AboutDialog(l)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));M=mxUtils.bind(this,function(H,K,Q,d){return this.addAction(H,function(){if(null!=Q&&p.cellEditor.isContentEditing())Q();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,K,f);(K&mxConstants.FONT_BOLD)==
mxConstants.FONT_BOLD?p.updateLabelElements(f,function(v){v.style.fontWeight=null;"B"==v.nodeName&&p.replaceElement(v)}):(K&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(v){v.style.fontStyle=null;"I"==v.nodeName&&p.replaceElement(v)}):(K&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(v){v.style.textDecoration=null;"U"==v.nodeName&&p.replaceElement(v)});for(var g=0;g<f.length;g++)0==p.model.getChildCount(f[g])&&p.autoSizeCell(f[g],
-!1)}finally{p.getModel().endUpdate()}}},null,null,e)});M("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");M("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");M("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){l.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+!1)}finally{p.getModel().endUpdate()}}},null,null,d)});M("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");M("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");M("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){l.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){l.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){l.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){l.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){l.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){l.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),l.fireEvent(new mxEventObject("styleChanged",
@@ -3006,110 +3010,107 @@ this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyl
Q="1"==mxUtils.getValue(K,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,Q);p.setCellStyles(mxConstants.STYLE_CURVED,null);l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[Q,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,
"1"),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var H=p.view.getState(p.getSelectionCell()),K="1";null!=H&&null!=p.getFoldingImage(H)&&(K="0");p.setCellStyles("collapsible",K);l.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[K],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
mxUtils.bind(this,function(){var H=p.getEditableCells(p.getSelectionCells());if(null!=H&&0<H.length){var K=p.getModel();K=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",K.getStyle(H[0])||"",function(Q){null!=Q&&p.setCellStyle(mxUtils.trim(Q),H)},null,null,400,220);this.editorUi.showDialog(K.container,420,300,!0,!0);K.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&l.setDefaultStyle(p.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&l.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var H=p.getSelectionCell();if(null!=H&&p.getModel().isEdge(H)){var K=B.graph.selectionCellsHandler.getHandler(H);if(K instanceof mxEdgeHandler){var Q=p.view.translate,e=p.view.scale,f=Q.x;Q=Q.y;H=p.getModel().getParent(H);for(var g=p.getCellGeometry(H);p.getModel().isVertex(H)&&null!=g;)f+=g.x,Q+=g.y,H=
-p.getModel().getParent(H),g=p.getCellGeometry(H);f=Math.round(p.snap(p.popupMenuHandler.triggerX/e-f));e=Math.round(p.snap(p.popupMenuHandler.triggerY/e-Q));K.addPointAt(K.state,f,e)}}});this.addAction("removeWaypoint",function(){var H=l.actions.get("removeWaypoint");null!=H.handler&&H.handler.removePoint(H.handler.state,H.index)});this.addAction("clearWaypoints",function(H,K){H=null!=K?K:H;var Q=p.getSelectionCells();if(null!=Q){Q=p.getEditableCells(p.addAllEdges(Q));p.getModel().beginUpdate();try{for(var e=
-0;e<Q.length;e++){var f=Q[e];if(p.getModel().isEdge(f)){var g=p.getCellGeometry(f);null!=K&&mxEvent.isShiftDown(H)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[f]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[f])):null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,p.getModel().setGeometry(f,g))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");M=this.addAction("subscript",
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&l.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var H=p.getSelectionCell();if(null!=H&&p.getModel().isEdge(H)){var K=C.graph.selectionCellsHandler.getHandler(H);if(K instanceof mxEdgeHandler){var Q=p.view.translate,d=p.view.scale,f=Q.x;Q=Q.y;H=p.getModel().getParent(H);for(var g=p.getCellGeometry(H);p.getModel().isVertex(H)&&null!=g;)f+=g.x,Q+=g.y,H=
+p.getModel().getParent(H),g=p.getCellGeometry(H);f=Math.round(p.snap(p.popupMenuHandler.triggerX/d-f));d=Math.round(p.snap(p.popupMenuHandler.triggerY/d-Q));K.addPointAt(K.state,f,d)}}});this.addAction("removeWaypoint",function(){var H=l.actions.get("removeWaypoint");null!=H.handler&&H.handler.removePoint(H.handler.state,H.index)});this.addAction("clearWaypoints",function(H,K){H=null!=K?K:H;var Q=p.getSelectionCells();if(null!=Q){Q=p.getEditableCells(p.addAllEdges(Q));p.getModel().beginUpdate();try{for(var d=
+0;d<Q.length;d++){var f=Q[d];if(p.getModel().isEdge(f)){var g=p.getCellGeometry(f);null!=K&&mxEvent.isShiftDown(H)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[f]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[f])):null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,p.getModel().setGeometry(f,g))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");M=this.addAction("subscript",
mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");M=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var H=mxResources.get("image")+" ("+mxResources.get("url")+"):",K=p.getView().getState(p.getSelectionCell()),
-Q="",e=null;null!=K&&(Q=K.style[mxConstants.STYLE_IMAGE]||Q,e=K.style[mxConstants.STYLE_CLIP_PATH]||e);var f=p.cellEditor.saveSelection();l.showImageDialog(H,Q,function(g,v,y,C,I,D){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(g,v,y);else{var N=p.getSelectionCells();if(null!=g&&(0<g.length||0<N.length)){var G=null;p.getModel().beginUpdate();try{if(0==N.length){N=[p.insertVertex(p.getDefaultParent(),null,"",0,0,v,y,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var ia=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=ia.x;N[0].geometry.y=ia.y;null!=C&&k(N[0],C,I,D,p);G=N;p.fireEvent(new mxEventObject("cellsInserted","cells",G))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<g.length?g:null,N);var ka=p.getCurrentCellStyle(N[0]);"image"!=ka[mxConstants.STYLE_SHAPE]&&"label"!=ka[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==g.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,N);if(null!=v&&null!=y)for(g=0;g<N.length;g++){var ja=N[g];if("0"!=p.getCurrentCellStyle(ja).expand){var ca=p.getModel().getGeometry(ja);null!=ca&&(ca=ca.clone(),ca.width=v,ca.height=y,p.getModel().setGeometry(ja,ca))}null!=C&&k(ja,C,I,D,p)}}finally{p.getModel().endUpdate()}null!=G&&(p.setSelectionCells(G),p.scrollCellToVisible(G[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,e)}}).isEnabled=E;this.addAction("crop...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=p.getCurrentCellStyle(H),Q=K[mxConstants.STYLE_IMAGE],e=K[mxConstants.STYLE_SHAPE];Q&&"image"==e&&(K=new CropImageDialog(l,Q,K[mxConstants.STYLE_CLIP_PATH],function(f,g,v){k(H,f,g,v,p)}),l.showDialog(K.container,300,390,!0,!0))}}).isEnabled=E;M=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(l,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
+Q="",d=null;null!=K&&(Q=K.style[mxConstants.STYLE_IMAGE]||Q,d=K.style[mxConstants.STYLE_CLIP_PATH]||d);var f=p.cellEditor.saveSelection();l.showImageDialog(H,Q,function(g,v,x,B,I,D){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(g,v,x);else{var N=p.getSelectionCells();if(null!=g&&(0<g.length||0<N.length)){var G=null;p.getModel().beginUpdate();try{if(0==N.length){N=[p.insertVertex(p.getDefaultParent(),null,"",0,0,v,x,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var ia=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=ia.x;N[0].geometry.y=ia.y;null!=B&&k(N[0],B,I,D,p);G=N;p.fireEvent(new mxEventObject("cellsInserted","cells",G))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<g.length?g:null,N);var ka=p.getCurrentCellStyle(N[0]);"image"!=ka[mxConstants.STYLE_SHAPE]&&"label"!=ka[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==g.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==B&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,N);if(null!=v&&null!=x)for(g=0;g<N.length;g++){var ja=N[g];if("0"!=p.getCurrentCellStyle(ja).expand){var ca=p.getModel().getGeometry(ja);null!=ca&&(ca=ca.clone(),ca.width=v,ca.height=x,p.getModel().setGeometry(ja,ca))}null!=B&&k(ja,B,I,D,p)}}finally{p.getModel().endUpdate()}null!=G&&(p.setSelectionCells(G),p.scrollCellToVisible(G[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,d)}}).isEnabled=E;this.addAction("crop...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=p.getCurrentCellStyle(H),Q=K[mxConstants.STYLE_IMAGE],d=K[mxConstants.STYLE_SHAPE];Q&&"image"==d&&(K=new CropImageDialog(l,Q,K[mxConstants.STYLE_CLIP_PATH],function(f,g,v){k(H,f,g,v,p)}),l.showDialog(K.container,300,390,!0,!0))}}).isEnabled=E;M=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(l,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");M.setToggleAction(!0);M.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
M=this.addAction("format",mxUtils.bind(this,function(){l.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");M.setToggleAction(!0);M.setSelectedCallback(mxUtils.bind(this,function(){return l.isFormatPanelVisible()}));M=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(l,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("outline"))})),
this.outlineWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");M.setToggleAction(!0);M.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var H=
-p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=new ConnectionPointsDialog(l,H);l.showDialog(K.container,350,450,!0,!1,function(){K.destroy()});K.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,d,k,l,B){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,d,k,l,B))};Actions.prototype.put=function(b,d){return this.actions[b]=d};
-Actions.prototype.get=function(b){return this.actions[b]};function Action(b,d,k,l,B){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(d);this.enabled=null!=k?k:!0;this.iconCls=l;this.shortcut=B;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
-Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,d){mxEventSource.call(this);this.ui=b;this.setData(d||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=new ConnectionPointsDialog(l,H);l.showDialog(K.container,350,450,!0,!1,function(){K.destroy()});K.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,l,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,l,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e};
+Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,l,C){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=l;this.shortcut=C;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
-DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,d,k)}),d):this.updateFile(b,d)};
-DrawioFile.prototype.updateFile=function(b,d,k,l){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(B){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[B]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=B?this.mergeFile(B,b,d,l):this.reloadFile(b,
-d))}catch(p){null!=d&&d(p)}}),d))};
-DrawioFile.prototype.mergeFile=function(b,d,k,l){var B=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var M=[this.ui.diffPages(null!=l?l:p,E)],S=this.ignorePatches(M);this.setShadowPages(E);if(S)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;l={};S={};var H=this.ui.patchPages(p,M[0]),K=this.ui.getHashValueForPages(H,
-l),Q=this.ui.getHashValueForPages(E,S);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",M,"backup",this.backupPatch,"checksum",K,"current",Q,"valid",K==Q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=K&&K!=Q){var e=this.compressReportData(this.getAnonymizedXmlForPages(E)),f=this.compressReportData(this.getAnonymizedXmlForPages(H)),g=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,M,"Shadow Details: "+JSON.stringify(l)+"\nChecksum: "+K+"\nCurrent: "+Q+"\nCurrent Details: "+JSON.stringify(S)+"\nFrom: "+g+"\nTo: "+v+"\n\nFile Data:\n"+e+"\nPatched Shadow:\n"+f,null,"mergeFile",K,Q,b.getCurrentRevisionId());return}if(null!=this.sync){var y=this.sync.patchRealtime(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==y||mxUtils.isEmptyObject(y)||M.push(y)}this.patch(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw B=!1,Error(mxResources.get("notADiagramFile"));
-this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(D);try{if(B)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var C=this.getCurrentUser(),I=null!=C?C.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),I,D)}}catch(N){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var d=new mxCodec(mxUtils.createXmlDocument()),k=d.document.createElement("mxfile");if(null!=b)for(var l=0;l<b.length;l++){var B=d.encode(new mxGraphModel(b[l].root));"1"!=urlParams.dev&&(B=this.ui.anonymizeNode(B,!0));B.setAttribute("id",b[l].getId());b[l].viewState&&this.ui.editor.graph.saveViewState(b[l].viewState,B,!0);k.appendChild(B)}return mxUtils.getPrettyXml(k)};
-DrawioFile.prototype.compressReportData=function(b,d,k){d=null!=d?d:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>d&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,d,k,l,B,p,E,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!=d)for(var S=0;S<d.length;S++)this.ui.anonymizePatch(d[S]);var H=mxUtils.bind(this,function(v){var y=this.compressReportData(JSON.stringify(d,null,2));v=null==v?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(v.data)),
-25E3);this.sendErrorReport("Checksum Error in "+B+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+y+(null!=v?"\n\nRemote:\n"+v:""),null,7E4)});null==l?H(null):this.getLatestVersion(mxUtils.bind(this,function(v){null!=v&&v.getCurrentEtag()==l?H(v):H(null)}),function(){})}else{var K=this.getCurrentUser(),Q=null!=K?K.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(d).length,g=null;if(null!=d&&this.constructor==DriveFile&&400>f){for(S=0;S<d.length;S++)this.ui.anonymizePatch(d[S]);
-g=JSON.stringify(d);g=null!=g&&250>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(v){try{var y=null!=g?"Report":"Error",C=this.ui.getHashValueForPages(v.getShadowPages());EditorUi.logError("Checksum "+y+" in "+B+" "+e,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=M?
-"-rev_"+this.ui.hashValue(M):"")+(null!=C?"-latest_"+C:"")+(null!=v?"-latestRev_"+this.ui.hashValue(v.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+e,action:B,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+"-size_"+this.getSize()})}catch(I){}}),b)}}catch(v){}};
-DrawioFile.prototype.sendErrorReport=function(b,d,k,l){try{var B=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),M=null!=E?this.ui.hashValue(E.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),K=H.lastIndexOf(".");E="xml";0<K&&(E=H.substring(K));var Q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+M+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=d?"\n\n"+d:
-"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+B+"\n\nData:\n"+p,l)}catch(e){}};
-DrawioFile.prototype.reloadFile=function(b,d){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),d);else{var l=this.ui.editor.graph,B=l.getSelectionCells(),p=l.getViewState(),E=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,B);null!=this.backupPatch&&this.patch([this.backupPatch]);var M=this.ui.getCurrentFile();null!=M&&(M.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
-k()}catch(l){null!=d&&d(l)}};DrawioFile.prototype.mergeLatestVersion=function(b,d,k){this.getLatestVersion(mxUtils.bind(this,function(l){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(l.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(l.getDescriptor());this.descriptorChanged();null!=d&&d()}),k)};
-DrawioFile.prototype.copyFile=function(b,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var d=!0;if(null!=b)for(var k=0;k<b.length&&d;k++)d=d&&mxUtils.isEmptyObject(b[k]);return d};
-DrawioFile.prototype.patch=function(b,d,k){if(null!=b){var l=this.ui.editor.undoManager,B=l.history.slice(),p=l.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var M=this.changeListenerEnabled;this.changeListenerEnabled=k;var S=E.foldingEnabled,H=E.mathEnabled,K=E.cellRenderer.redraw;E.cellRenderer.redraw=function(Q){Q.view.graph.isEditing(Q.cell)&&(Q.view.graph.scrollCellToVisible(Q.cell),Q.view.graph.cellEditor.resize());K.apply(this,arguments)};E.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,d,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=K;this.changeListenerEnabled=M;k||(l.history=B,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)H!=E.mathEnabled?
-(this.ui.editor.updateGraphComponents(),E.refresh()):(S!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",d,"undoable",k)}return b};
-DrawioFile.prototype.save=function(b,d,k,l,B,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",l,"overwrite",B,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!B&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=k)k({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var d=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=d&&(d.viewState=this.ui.editor.graph.getViewState(),d.needsUpdate=!0)}d=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return d};
-DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,d,k){};
-DrawioFile.prototype.saveFile=function(b,d,k,l){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
-DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,d,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,d,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
+DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
+DrawioFile.prototype.updateFile=function(b,e,k,l){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(C){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[C]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=C?this.mergeFile(C,b,e,l):this.reloadFile(b,
+e))}catch(p){null!=e&&e(p)}}),e))};
+DrawioFile.prototype.mergeFile=function(b,e,k,l){var C=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var M=[this.ui.diffPages(null!=l?l:p,E)],S=this.ignorePatches(M);this.setShadowPages(E);if(S)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;l={};S={};var H=this.ui.patchPages(p,M[0]),K=this.ui.getHashValueForPages(H,
+l),Q=this.ui.getHashValueForPages(E,S);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",M,"backup",this.backupPatch,"checksum",K,"current",Q,"valid",K==Q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=K&&K!=Q){var d=this.compressReportData(this.getAnonymizedXmlForPages(E)),f=this.compressReportData(this.getAnonymizedXmlForPages(H)),g=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,M,"Shadow Details: "+JSON.stringify(l)+"\nChecksum: "+K+"\nCurrent: "+Q+"\nCurrent Details: "+JSON.stringify(S)+"\nFrom: "+g+"\nTo: "+v+"\n\nFile Data:\n"+d+"\nPatched Shadow:\n"+f,null,"mergeFile",K,Q,b.getCurrentRevisionId());return}if(null!=this.sync){var x=this.sync.patchRealtime(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==x||mxUtils.isEmptyObject(x)||M.push(x)}this.patch(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(D);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var B=this.getCurrentUser(),I=null!=B?B.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),I,D)}}catch(N){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var l=0;l<b.length;l++){var C=e.encode(new mxGraphModel(b[l].root));"1"!=urlParams.dev&&(C=this.ui.anonymizeNode(C,!0));C.setAttribute("id",b[l].getId());b[l].viewState&&this.ui.editor.graph.saveViewState(b[l].viewState,C,!0);k.appendChild(C)}return mxUtils.getPrettyXml(k)};
+DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,e,k,l,C,p,E,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(var S=0;S<e.length;S++)this.ui.anonymizePatch(e[S]);var H=mxUtils.bind(this,function(v){var x=this.compressReportData(JSON.stringify(e,null,2));v=null==v?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(v.data)),
+25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+x+(null!=v?"\n\nRemote:\n"+v:""),null,7E4)});null==l?H(null):this.getLatestVersion(mxUtils.bind(this,function(v){null!=v&&v.getCurrentEtag()==l?H(v):H(null)}),function(){})}else{var K=this.getCurrentUser(),Q=null!=K?K.id:"unknown",d=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(e).length,g=null;if(null!=e&&this.constructor==DriveFile&&400>f){for(S=0;S<e.length;S++)this.ui.anonymizePatch(e[S]);
+g=JSON.stringify(e);g=null!=g&&250>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(v){try{var x=null!=g?"Report":"Error",B=this.ui.getHashValueForPages(v.getShadowPages());EditorUi.logError("Checksum "+x+" in "+C+" "+d,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+e.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=M?
+"-rev_"+this.ui.hashValue(M):"")+(null!=B?"-latest_"+B:"")+(null!=v?"-latestRev_"+this.ui.hashValue(v.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+d,action:C,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+e.length+"-size_"+this.getSize()})}catch(I){}}),b)}}catch(v){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,k,l){try{var C=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),M=null!=E?this.ui.hashValue(E.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),K=H.lastIndexOf(".");E="xml";0<K&&(E=H.substring(K));var Q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+M+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+C+"\n\nData:\n"+p,l)}catch(d){}};
+DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var l=this.ui.editor.graph,C=l.getSelectionCells(),p=l.getViewState(),E=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var M=this.ui.getCurrentFile();null!=M&&(M.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+k()}catch(l){null!=e&&e(l)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(l){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(l.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(l.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
+DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var l=this.ui.editor.undoManager,C=l.history.slice(),p=l.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var M=this.changeListenerEnabled;this.changeListenerEnabled=k;var S=E.foldingEnabled,H=E.mathEnabled,K=E.cellRenderer.redraw;E.cellRenderer.redraw=function(Q){Q.view.graph.isEditing(Q.cell)&&(Q.view.graph.scrollCellToVisible(Q.cell),Q.view.graph.cellEditor.resize());K.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=K;this.changeListenerEnabled=M;k||(l.history=C,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)H!=E.mathEnabled?
+(this.ui.editor.updateGraphComponents(),E.refresh()):(S!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
+DrawioFile.prototype.save=function(b,e,k,l,C,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",l,"overwrite",C,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!C&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
+DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,k){};
+DrawioFile.prototype.saveFile=function(b,e,k,l){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
+DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var d=function(k){for(var l=0;null!=k&&l<k.length;l++){var B=k[l];null!=B.id&&0==B.id.indexOf("extFont_")&&B.parentNode.removeChild(B)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var e=function(k){for(var l=0;null!=k&&l<k.length;l++){var C=k[l];null!=C.id&&0==C.id.indexOf("extFont_")&&C.parentNode.removeChild(C)}};e(document.querySelectorAll("head > style[id]"));e(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
-DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,d){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,d){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,d){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),d)};DrawioFile.prototype.patchDescriptor=function(b,d){this.setDescriptorEtag(b,this.getDescriptorEtag(d));this.descriptorChanged()};
+DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,e){b(null)};
+DrawioFile.prototype.loadDescriptor=function(b,e){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,e){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),e)};DrawioFile.prototype.patchDescriptor=function(b,e){this.setDescriptorEtag(b,this.getDescriptorEtag(e));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
-DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,d){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,d){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
+DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,e){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,e){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.getPullingInterval=function(){return 1E4};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};
-DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,d){this.setDescriptorEtag(b,d)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,d){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,d){b=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
+DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,e){this.setDescriptorEtag(b,e)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,e){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,e){b=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
-DrawioFile.prototype.addAllSavedStatus=function(b){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+b+'">'+b+"</div>"),b=this.ui.statusContainer.getElementsByTagName("div"),0<b.length&&this.isRevisionHistorySupported()&&(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(d){this.removeDraft()}};
+DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var e=this.isRevisionHistorySupported()?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+e+'title="'+b+'">'+b+"</div>")}};
+DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(e){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
-DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var d=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>");d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length&&(d[0].style.cursor="pointer",mxEvent.addListener(d[0],
-"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{d=this.getErrorMessage(b);if(null==d&&null!=this.lastSaved){var k=this.ui.timeSince(new Date(this.lastSaved));null!=k&&(d=mxResources.get("lastSaved",[k]))}null!=d&&60<d.length&&(d=d.substring(0,60)+"...");d=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":"");this.ui.editor.setStatus('<div title="'+
-d+'" class="geStatusAlertOrange">'+d+' <img src="'+Editor.saveImage+'"/></div>');d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(d=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
-EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
-0))}};
-DrawioFile.prototype.addConflictStatus=function(b,d){this.invalidChecksum&&null==d&&(d=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":""));this.ui.spinner.stop();this.clearAutosave();d=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(k){"IMG"!=mxEvent.getSource(k).nodeName&&
-b()}))):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),b)};DrawioFile.prototype.setConflictStatus=function(b){this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert">'+b+' <a href="https://www.diagrams.net/doc/faq/synchronize" title="'+mxResources.get("help")+'" target="_blank"><img src="'+Editor.helpImage+'"/></a></div>')};
-DrawioFile.prototype.showRefreshDialog=function(b,d,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,d)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,d)}),k),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
-d)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,d)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,d,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,d)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
-DrawioFile.prototype.showConflictDialog=function(b,d){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),l=mxResources.get("redirectToNewApp");null!=d&&(l+=" ("+d+")");d=mxUtils.bind(this,function(){var B=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
-k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),B,mxResources.get("cancel"),mxResources.get("discardChanges")):B()});null!=b?this.isModified()?this.ui.confirm(l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(l,d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-d)}};
+DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var e=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+e+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+")</div>")}else e=
+this.getErrorMessage(b),null==e&&null!=this.lastSaved&&(b=this.ui.timeSince(new Date(this.lastSaved)),null!=b&&(e=mxResources.get("lastSaved",[b]))),null!=e&&60<e.length&&(e=e.substring(0,60)+"..."),e=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":""),b='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"',this.ui.editor.setStatus("<div "+b+' title="'+e+'" class="geStatusAlertOrange">'+e+' <img src="'+Editor.saveImage+
+'"/></div>'),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
+0))};DrawioFile.prototype.addConflictStatus=function(b,e){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),e);this.ui.spinner.stop();this.clearAutosave()};
+DrawioFile.prototype.setConflictStatus=function(b,e){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=e?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.diagrams.net/doc/faq/synchronize" src="'+Editor.helpImage+'" style="cursor:help;"/></div>',e)};
+DrawioFile.prototype.showRefreshDialog=function(b,e,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,e)})):(this.addConflictStatus(k,mxUtils.bind(this,function(){this.showRefreshDialog(b,e)})),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
+e)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,e)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
+DrawioFile.prototype.showCopyDialog=function(b,e,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
+DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),l=mxResources.get("redirectToNewApp");null!=e&&(l+=" ("+e+")");e=mxUtils.bind(this,function(){var C=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
+k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()});null!=b?this.isModified()?this.ui.confirm(l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(l,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+e)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
-DrawioFile.prototype.handleFileError=function(b,d){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,d):(this.isModified()&&this.addUnsavedStatus(b),d?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
+DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,d){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),l=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),B=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,l,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,l,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),l)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,l,B):this.invalidChecksum?this.showRefreshDialog(k,l,this.getErrorMessage(b)):d?this.showConflictDialog(B,p):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(k,l)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var d=null!=b?null!=b.error?b.error.message:b.message:null;null==d&&null!=b&&b.code==App.ERROR_TIMEOUT&&(d=mxResources.get("timeout"));return d};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(d){this.ui.stopSanityCheck();
-null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(d){this.handleFileError(d)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var d=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(d):this.sync.createToken(d,mxUtils.bind(this,function(k){b(d,k)}),mxUtils.bind(this,function(){b(d)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,d,k,l,B){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,d,k,l,B)}catch(S){this.invalidChecksum=this.inConflictState=
+DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),l=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),C=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,l,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,l,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),l)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,l,C):this.invalidChecksum?this.showRefreshDialog(k,l,this.getErrorMessage(b)):e?this.showConflictDialog(C,p):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(k,l)}))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck();
+null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
+DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,e,k,l,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,l,C)}catch(S){this.invalidChecksum=this.inConflictState=
!0;this.descriptorChanged();null!=l&&l(S);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,S);else{var E=this.getCurrentUser(),M=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),M,S)}}catch(H){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,d,k,l){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<d?b:0;this.clearAutosave();var B=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==B&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",B,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
-p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=l&&l(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",B,"delay",b,"saving",this.savingFile);this.autosaveThread=B};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+DrawioFile.prototype.autosave=function(b,e,k,l){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var C=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==C&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
+p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=l&&l(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}catch(E){null!=l&&l(E)}}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
-DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,d){if(null!=b&&null!=d){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=d.lastIndexOf(".");return b===(0<k?d.substring(k):"")}return b==d};
+DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=e.lastIndexOf(".");return b===(0<k?e.substring(k):"")}return b==e};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,d){b([])};DrawioFile.prototype.addComment=function(b,d,k){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,d){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,d)};LocalFile=function(b,d,k,l,B,p){DrawioFile.call(this,b,d);this.title=k;this.mode=l?null:App.MODE_DEVICE;this.fileHandle=B;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
-LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,d,k){this.saveAs(this.title,d,k)};LocalFile.prototype.saveAs=function(b,d,k){this.saveFile(b,!1,d,k)};LocalFile.prototype.saveAs=function(b,d,k){this.saveFile(b,!1,d,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
-LocalFile.prototype.getLatestVersion=function(b,d){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,d)};
-LocalFile.prototype.saveFile=function(b,d,k,l,B){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;B||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),M=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),S=mxUtils.bind(this,function(H){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var K=mxUtils.bind(this,
-function(e){this.savingFile=!1;null!=l&&l({error:e})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(e){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[f],"conflict",this.desc.lastModified!=f.lastModified);this.desc.lastModified==f.lastModified?e.write(p?this.ui.base64ToBlob(H,"image/png"):H).then(mxUtils.bind(this,function(){e.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){try{var v=this.desc;this.savingFile=!1;this.desc=g;this.fileSaved(E,v,M,K);this.removeDraft()}catch(y){K(y)}}),K)}),K)}),K):(this.inConflictState=!0,K())}),mxUtils.bind(this,function(f){this.invalidFileHandle=!0;K(f)}))}),K)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(H,b,p?"image/png":"text/xml",p);else if(H.length<MAX_REQUEST_SIZE){var Q=b.lastIndexOf(".");Q=0<Q?b.substring(Q+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+Q+"&xml="+encodeURIComponent(H)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(H)}));M()}});p?(d=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){S(H)}),l,this.ui.getCurrentFile()!=this?E:null,d.scale,d.border)):S(E)};
-LocalFile.prototype.rename=function(b,d,k){this.title=b;this.descriptorChanged();null!=d&&d()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
-{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,
-fontUrl:decodeURIComponent(Editor.sketchFontSource)}];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"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",
-gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},
-{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,l,C,p){DrawioFile.call(this,b,e);this.title=k;this.mode=l?null:App.MODE_DEVICE;this.fileHandle=C;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
+LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
+LocalFile.prototype.saveFile=function(b,e,k,l,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),M=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),S=mxUtils.bind(this,function(H){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var K=mxUtils.bind(this,
+function(d){this.savingFile=!1;null!=l&&l({error:d})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(d){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[f],"conflict",this.desc.lastModified!=f.lastModified);this.desc.lastModified==f.lastModified?d.write(p?this.ui.base64ToBlob(H,"image/png"):H).then(mxUtils.bind(this,function(){d.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){try{var v=this.desc;this.savingFile=!1;this.desc=g;this.fileSaved(E,v,M,K);this.removeDraft()}catch(x){K(x)}}),K)}),K)}),K):(this.inConflictState=!0,K())}),mxUtils.bind(this,function(f){this.invalidFileHandle=!0;K(f)}))}),K)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(H,b,p?"image/png":"text/xml",p);else if(H.length<MAX_REQUEST_SIZE){var Q=b.lastIndexOf(".");Q=0<Q?b.substring(Q+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+Q+"&xml="+encodeURIComponent(H)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(H)}));M()}});p?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){S(H)}),l,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):S(E)};
+LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];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"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},
+commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",
+fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.userImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+";
Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==";
@@ -3127,31 +3128,31 @@ Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP/////
Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=";
Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
-Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
-"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
-F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==
-mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
-{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
-dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
-dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&
-0==q.edges.length&&F.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},
-isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"fillOpacity",
-dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
-defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,F){return F.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,F){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
-{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,F){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=q&&(F.isSwimlane(q)||0<F.model.getChildCount(q))},
-isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,F){var T=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=T&&(F.isContainer(T)&&"0"!=q.style.collapsible||!F.isContainer(T)&&"1"==q.style.collapsible)},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length&&!F.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,F){F=F.editorUi.editor.graph.model;return 0<q.vertices.length?F.isVertex(F.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,F){q=0<q.vertices.length?F.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{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(q,F){var T=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return F.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==T||T==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,F){return 0<q.vertices.length&&
-F.editorUi.editor.graph.isContainer(q.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.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.enableSimpleTheme="1"==urlParams["live-ui"];
+Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=
+null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",
+type:"float",min:0,defVal:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
+"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==
+mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",
+type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},
+{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},
+{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==
+mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",
+dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",
+dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,
+F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:
+null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&
+0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",
+defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},
+{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,F){return F.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,F){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",
+dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",
+dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,F){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;
+return null!=q&&(F.isSwimlane(q)||0<F.model.getChildCount(q))},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,F){var T=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=T&&(F.isContainer(T)&&"0"!=q.style.collapsible||!F.isContainer(T)&&"1"==q.style.collapsible)},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",
+dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length&&!F.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,F){F=F.editorUi.editor.graph.model;return 0<q.vertices.length?F.isVertex(F.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",
+defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,F){q=0<q.vertices.length?F.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{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(q,F){var T=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return F.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==T||T==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,
+F){return 0<q.vertices.length&&F.editorUi.editor.graph.isContainer(q.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(q){var F=rough.canvas({getContext:function(){return q}});F.draw=function(T){var aa=T.sets||[];T=T.options||this.getDefaultOptions();for(var U=0;U<aa.length;U++){var da=aa[U];switch(da.type){case "path":null!=T.stroke&&this._drawToContext(q,da,T);break;case "fillPath":this._drawToContext(q,da,T);break;case "fillSketch":this.fillSketch(q,da,T)}}};F.fillSketch=function(T,aa,U){var da=q.state.strokeColor,fa=q.state.strokeWidth,na=q.state.strokeAlpha,sa=q.state.dashed,
za=U.fillWeight;0>za&&(za=U.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(U.fill||"");q.setStrokeWidth(za);q.setDashed(!1);this._drawToContext(T,aa,U);q.setDashed(sa);q.setStrokeWidth(fa);q.setStrokeColor(da);q.setStrokeAlpha(na)};F._drawToContext=function(T,aa,U){T.begin();for(var da=0;da<aa.ops.length;da++){var fa=aa.ops[da],na=fa.data;switch(fa.op){case "move":T.moveTo(na[0],na[1]);break;case "bcurveTo":T.curveTo(na[0],na[1],na[2],na[3],na[4],na[5]);break;case "lineTo":T.lineTo(na[0],
na[1])}}T.end();"fillPath"===aa.type&&U.filled?T.fill():T.stroke()};return F};(function(){function q(da,fa,na){this.canvas=da;this.rc=fa;this.shape=na;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=
@@ -3190,101 +3191,103 @@ new mxRectangle(0,0,F,T),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultP
q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(F=parseInt(q.sidebarTitleSize),!isNaN(F)&&0<F?Sidebar.prototype.sidebarTitleSize=F:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(F=parseInt(q.autosaveDelay),!isNaN(F)&&0<F?DrawioFile.prototype.autosaveDelay=F:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var F=document.getElementsByTagName("script")[0];if(null!=F&&null!=F.parentNode){var T=document.createElement("style");
T.setAttribute("type","text/css");T.appendChild(document.createTextNode(q));F.parentNode.insertBefore(T,F);q=q.split("url(");for(T=1;T<q.length;T++){var aa=q[T].indexOf(")");aa=Editor.trimCssUrl(q[T].substring(0,aa));var U=document.createElement("link");U.setAttribute("rel","preload");U.setAttribute("href",aa);U.setAttribute("as","font");U.setAttribute("crossorigin","");F.parentNode.insertBefore(U,F)}}}};Editor.trimCssUrl=function(q){return q.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(q){q=null!=q?q:Editor.GUID_LENGTH;for(var F=[],T=0;T<q;T++)F.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return F.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(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var F=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(F)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[F]),Error(mxResources.get("notADiagramFile")+" ("+F+")");if("mxGraphModel"==q.nodeName){F=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=F&&""!=
-F)F!=this.graph.currentStyle&&(T=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=T&&(aa=new mxCodec(T.ownerDocument),aa.decode(T,this.graph.getStylesheet())));else{var T=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=T){var aa=new mxCodec(T.ownerDocument);aa.decode(T,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||
-"1"==q.getAttribute("math");F=q.getAttribute("backgroundImage");null!=F?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(F)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(F=q.getAttribute("extFonts"))try{for(F=F.split("|").map(function(U){U=U.split("^");return{name:U[0],url:U[1]}}),T=0;T<F.length;T++)this.graph.addExtFont(F[T].name,
-F[T].url)}catch(U){console.log("ExtFonts format error: "+U.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 d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,F){q=null!=q?q:!0;var T=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&T.setAttribute("style",
-this.graph.currentStyle);var aa=this.graph.getBackgroundImageObject(this.graph.backgroundImage,F);null!=aa&&T.setAttribute("backgroundImage",JSON.stringify(aa));T.setAttribute("math",this.graph.mathEnabled?"1":"0");T.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(aa=this.graph.extFonts.map(function(U){return U.name+"^"+U.url}),T.setAttribute("extFonts",aa.join("|")));return T};Editor.prototype.isDataSvg=function(q){try{var F=mxUtils.parseXml(q).documentElement.getAttribute("content");
-if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var T=mxUtils.parseXml(F).documentElement;return"mxfile"==T.nodeName||"mxGraphModel"==T.nodeName}}catch(aa){}return!1};Editor.prototype.extractGraphModel=function(q,F,T){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
-"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var l=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){l.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
-function(q,F){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(U){try{MathJax.typesetClear([U]),MathJax.typeset([U]),Editor.onMathJaxDone()}catch(da){MathJax.typesetClear([U]),null!=da.retry?da.retry.then(function(){MathJax.typesetPromise([U]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+da.toString())}};window.MathJax=null!=F?F:{options:{skipHtmlTags:{"[+]":["text"]}},
-loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var T=Editor.prototype.init;
-Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(da,fa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};F=document.getElementsByTagName("script");if(null!=F&&0<F.length){var aa=document.createElement("script");aa.setAttribute("type","text/javascript");aa.setAttribute("src",q);F[0].parentNode.appendChild(aa)}}};
-Editor.prototype.csvToArray=function(q){if(0<q.length){var F="",T=[""],aa=0,U=!0,da;q=$jscomp.makeIterator(q);for(da=q.next();!da.done;da=q.next())da=da.value,'"'===da?(U&&da===F&&(T[aa]+=da),U=!U):","===da&&U?da=T[++aa]="":T[aa]+=da,F=da;return T}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var F=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);
-F=/\.png$/i.test(q)||/\.pdf$/i.test(q)||F;var T="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+T+(F?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.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(q)||"https://raw.githubusercontent.com/"===
-q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var F=q.convert,T=this;q.convert=function(aa){if(null!=aa){var U="http://"==aa.substring(0,7)||"https://"==aa.substring(0,8);U&&!navigator.onLine?aa=Editor.svgBrokenImage.src:!U||aa.substring(0,q.baseUrl.length)==q.baseUrl||T.crossOriginImages&&T.isCorsEnabledForUrl(aa)?"chrome-extension://"==
-aa.substring(0,19)||mxClient.IS_CHROMEAPP||(aa=F.apply(this,arguments)):aa=PROXY_URL+"?url="+encodeURIComponent(aa)}return aa};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,F){try{var T=!0,aa=window.setTimeout(mxUtils.bind(this,function(){T=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(da){window.clearTimeout(aa);
-T&&F(Editor.createSvgDataUri(da.getText()))}),function(){window.clearTimeout(aa);T&&F(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(aa);if(T)try{var da=document.createElement("canvas"),fa=da.getContext("2d");da.height=U.height;da.width=U.width;fa.drawImage(U,0,0);F(da.toDataURL())}catch(na){F(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(aa);T&&F(Editor.svgBrokenImage.src)};U.src=
-q}}catch(da){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,F,T,aa){null==aa&&(aa=this.createImageUrlConverter());var U=0,da=T||{};T=mxUtils.bind(this,function(fa,na){fa=q.getElementsByTagName(fa);for(var sa=0;sa<fa.length;sa++)mxUtils.bind(this,function(za){try{if(null!=za){var ua=aa.convert(za.getAttribute(na));if(null!=ua&&"data:"!=ua.substring(0,5)){var Ba=da[ua];null==Ba?(U++,this.convertImageToDataUri(ua,function(oa){null!=oa&&(da[ua]=oa,za.setAttribute(na,oa));U--;
-0==U&&F(q)})):za.setAttribute(na,Ba)}else null!=ua&&za.setAttribute(na,ua)}}catch(oa){}})(fa[sa])});T("image","xlink:href");T("img","src");0==U&&F(q)};Editor.base64Encode=function(q){for(var F="",T=0,aa=q.length,U,da,fa;T<aa;){U=q.charCodeAt(T++)&255;if(T==aa){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4);F+="==";break}da=q.charCodeAt(T++);if(T==aa){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
-2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(da&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2);F+="=";break}fa=q.charCodeAt(T++);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(da&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2|(fa&192)>>
-6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(fa&63)}return F};Editor.prototype.loadUrl=function(q,F,T,aa,U,da,fa,na){try{var sa=!fa&&(aa||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));U=null!=U?U:!0;var za=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(ua){if(200<=ua.getStatus()&&299>=ua.getStatus()){if(null!=F){var Ba=ua.getText();if(sa){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){ua=mxUtilsBinaryToArray(ua.request.responseBody).toArray();Ba=Array(ua.length);for(var oa=0;oa<ua.length;oa++)Ba[oa]=String.fromCharCode(ua[oa]);Ba=Ba.join("")}da=null!=da?da:"data:image/png;base64,";Ba=da+Editor.base64Encode(Ba)}F(Ba)}}else null!=T&&(0==ua.getStatus()?T({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?T({code:ua.getStatus()},ua):T({message:mxResources.get("error")+" "+ua.getStatus()},ua))}),function(ua){null!=T&&
-T({message:mxResources.get("error")+" "+ua.getStatus()})},sa,this.timeout,function(){U&&null!=T&&T({code:App.ERROR_TIMEOUT,retry:za})},na)});za()}catch(ua){null!=T&&T(ua)}};Editor.prototype.absoluteCssFonts=function(q){var F=null;if(null!=q){var T=q.split("url(");if(0<T.length){F=[T[0]];q=window.location.pathname;var aa=null!=q?q.lastIndexOf("/"):-1;0<=aa&&(q=q.substring(0,aa+1));aa=document.getElementsByTagName("base");var U=null;null!=aa&&0<aa.length&&(U=aa[0].getAttribute("href"));for(var da=1;da<
-T.length;da++)if(aa=T[da].indexOf(")"),0<aa){var fa=Editor.trimCssUrl(T[da].substring(0,aa));this.graph.isRelativeUrl(fa)&&(fa=null!=U?U+fa:window.location.protocol+"//"+window.location.hostname+("/"==fa.charAt(0)?"":q)+fa);F.push('url("'+fa+'"'+T[da].substring(aa))}else F.push(T[da])}else F=[q]}return null!=F?F.join(""):null};Editor.prototype.mapFontUrl=function(q,F,T){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));T(q,F)};Editor.prototype.embedCssFonts=
-function(q,F){var T=q.split("url("),aa=0;null==this.cachedFonts&&(this.cachedFonts={});var U=mxUtils.bind(this,function(){if(0==aa){for(var sa=[T[0]],za=1;za<T.length;za++){var ua=T[za].indexOf(")");sa.push('url("');sa.push(this.cachedFonts[Editor.trimCssUrl(T[za].substring(0,ua))]);sa.push('"'+T[za].substring(ua))}F(sa.join(""))}});if(0<T.length){for(q=1;q<T.length;q++){var da=T[q].indexOf(")"),fa=null,na=T[q].indexOf("format(",da);0<na&&(fa=Editor.trimCssUrl(T[q].substring(na+7,T[q].indexOf(")",
-na))));mxUtils.bind(this,function(sa){if(null==this.cachedFonts[sa]){this.cachedFonts[sa]=sa;aa++;var za="application/x-font-ttf";if("svg"==fa||/(\.svg)($|\?)/i.test(sa))za="image/svg+xml";else if("otf"==fa||"embedded-opentype"==fa||/(\.otf)($|\?)/i.test(sa))za="application/x-font-opentype";else if("woff"==fa||/(\.woff)($|\?)/i.test(sa))za="application/font-woff";else if("woff2"==fa||/(\.woff2)($|\?)/i.test(sa))za="application/font-woff2";else if("eot"==fa||/(\.eot)($|\?)/i.test(sa))za="application/vnd.ms-fontobject";
-else if("sfnt"==fa||/(\.sfnt)($|\?)/i.test(sa))za="application/font-sfnt";this.mapFontUrl(za,sa,mxUtils.bind(this,function(ua,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(oa){this.cachedFonts[sa]=oa;aa--;U()}),mxUtils.bind(this,function(oa){aa--;U()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(T[q].substring(0,da)),fa)}U()}else F(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss=
-F;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(q[F]=Graph.fontMapping[F]);return q};Editor.prototype.embedExtFonts=function(q){var F=this.graph.getCustomFonts();if(0<F.length){var T=[],aa=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var U=mxUtils.bind(this,function(){0==aa&&this.embedCssFonts(T.join(""),q)}),da=0;da<F.length;da++)mxUtils.bind(this,function(fa,
-na){Graph.isCssFontUrl(na)?null==this.cachedGoogleFonts[na]?(aa++,this.loadUrl(na,mxUtils.bind(this,function(sa){this.cachedGoogleFonts[na]=sa;T.push(sa+"\n");aa--;U()}),mxUtils.bind(this,function(sa){aa--;T.push("@import url("+na+");\n");U()}))):T.push(this.cachedGoogleFonts[na]+"\n"):T.push('@font-face {font-family: "'+fa+'";src: url("'+na+'")}\n')})(F[da].name,F[da].url);U()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var F=document.getElementsByTagName("style"),
-T=0;T<F.length;T++){var aa=mxUtils.getTextContent(F[T]);0>aa.indexOf("mxPageSelector")&&0<aa.indexOf("MathJax")&&q[0].appendChild(F[T].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,F){F=null!=F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var T=q.getElementsByTagName("defs"),aa=q.ownerDocument;0==T.length?(T=null!=aa.createElementNS?aa.createElementNS(mxConstants.NS_SVG,"defs"):aa.createElement("defs"),null!=q.firstChild?q.insertBefore(T,q.firstChild):q.appendChild(T)):T=T[0];q=null!=
-aa.createElementNS?aa.createElementNS(mxConstants.NS_SVG,"style"):aa.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,F);T.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,F,T){var aa=mxClient.IS_FF?8192:16384;return Math.min(T,Math.min(aa/q,aa/F))};Editor.prototype.exportToCanvas=function(q,F,T,aa,U,da,fa,na,sa,za,ua,Ba,oa,Aa,ya,La,Oa,Na){try{da=null!=
-da?da:!0;fa=null!=fa?fa:!0;Ba=null!=Ba?Ba:this.graph;oa=null!=oa?oa:0;var Ia=sa?null:Ba.background;Ia==mxConstants.NONE&&(Ia=null);null==Ia&&(Ia=aa);null==Ia&&0==sa&&(Ia=La?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,oa,Aa,null,fa,null,null,null,za,null,La,Oa,Na),mxUtils.bind(this,function(wa){try{var ab=new Image;ab.onload=mxUtils.bind(this,function(){try{var x=function(){mxClient.IS_SF?window.setTimeout(function(){ba.drawImage(ab,0,0);q(O,wa)},0):(ba.drawImage(ab,
-0,0),q(O,wa))},O=document.createElement("canvas"),P=parseInt(wa.getAttribute("width")),X=parseInt(wa.getAttribute("height"));na=null!=na?na:1;null!=F&&(na=da?Math.min(1,Math.min(3*F/(4*X),F/P)):F/P);na=this.getMaxCanvasScale(P,X,na);P=Math.ceil(na*P);X=Math.ceil(na*X);O.setAttribute("width",P);O.setAttribute("height",X);var ba=O.getContext("2d");null!=Ia&&(ba.beginPath(),ba.rect(0,0,P,X),ba.fillStyle=Ia,ba.fill());1!=na&&ba.scale(na,na);if(ya){var W=Ba.view,ea=W.scale;W.scale=1;var ta=btoa(unescape(encodeURIComponent(W.createSvgGrid(W.gridColor))));
-W.scale=ea;ta="data:image/svg+xml;base64,"+ta;var qa=Ba.gridSize*W.gridSteps*na,va=Ba.getGraphBounds(),Ea=W.translate.x*ea,Ca=W.translate.y*ea,Ma=Ea+(va.x-Ea)/ea-oa,Sa=Ca+(va.y-Ca)/ea-oa,Qa=new Image;Qa.onload=function(){try{for(var Fa=-Math.round(qa-mxUtils.mod((Ea-Ma)*na,qa)),Ka=-Math.round(qa-mxUtils.mod((Ca-Sa)*na,qa));Fa<P;Fa+=qa)for(var Pa=Ka;Pa<X;Pa+=qa)ba.drawImage(Qa,Fa/na,Pa/na);x()}catch($a){null!=U&&U($a)}};Qa.onerror=function(Fa){null!=U&&U(Fa)};Qa.src=ta}else x()}catch(Fa){null!=U&&
-U(Fa)}});ab.onerror=function(x){null!=U&&U(x)};za&&this.graph.addSvgShadow(wa);this.graph.mathEnabled&&this.addMathCss(wa);var Ya=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(wa,this.resolvedFontCss),ab.src=Editor.createSvgDataUri(mxUtils.getXml(wa))}catch(x){null!=U&&U(x)}});this.embedExtFonts(mxUtils.bind(this,function(x){try{null!=x&&this.addFontCss(wa,x),this.loadFonts(Ya)}catch(O){null!=U&&U(O)}}))}catch(x){null!=U&&U(x)}}),T,ua)}catch(wa){null!=U&&U(wa)}};Editor.crcTable=
-[];for(var B=0;256>B;B++)for(var p=B,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[B]=p;Editor.updateCRC=function(q,F,T,aa){for(var U=0;U<aa;U++)q=Editor.crcTable[(q^F.charCodeAt(T+U))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,T=0;T<q.length;T++)F=F>>>8^Editor.crcTable[(F^q.charCodeAt(T))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,T,aa,U){function da(ua,Ba){var oa=sa;sa+=Ba;return ua.substring(oa,sa)}function fa(ua){ua=da(ua,4);return ua.charCodeAt(3)+
-(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function na(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var sa=0;if(da(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=U&&U();else if(da(q,4),"IHDR"!=da(q,4))null!=U&&U();else{da(q,17);U=q.substring(0,sa);do{var za=fa(q);if("IDAT"==da(q,4)){U=q.substring(0,sa-8);"pHYs"==F&&"dpi"==T?(T=Math.round(aa/.0254),
-T=na(T)+na(T)+String.fromCharCode(1)):T=T+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+aa;aa=4294967295;aa=Editor.updateCRC(aa,F,0,4);aa=Editor.updateCRC(aa,T,0,T.length);U+=na(T.length)+F+T+na(aa^4294967295);U+=q.substring(sa-8,q.length);break}U+=q.substring(sa-8,sa-4+za);da(q,za);da(q,4)}while(za);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var M=
-ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,F){M.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var T=null;null!=q.editor.graph.getModel().getParent(F)?T=F.getId():null!=q.currentPage&&(T=
-q.currentPage.getId());return T});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var K=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?K.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();
-return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var Q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=Q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,T=F.editor.graph,aa=this.createOption(mxResources.get("shadow"),function(){return T.shadowVisible},function(U){var da=new ChangePageSetup(F);da.ignoreColor=!0;
-da.ignoreImage=!0;da.shadowVisible=U;T.model.execute(da)},{install:function(U){this.listener=function(){U(T.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(aa.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(aa,60));q.appendChild(aa)}return q};var e=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=e.apply(this,arguments);
-var F=this.editorUi,T=F.editor.graph;if(T.isEnabled()){var aa=F.getCurrentFile();if(null!=aa&&aa.isAutosaveOptional()){var U=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(fa){F.editor.setAutosave(fa);F.editor.autosave&&aa.isModified()&&aa.fileChanged()},{install:function(fa){this.listener=function(){fa(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});q.appendChild(U)}}if(this.isMathOptionVisible()&&
-T.isEnabled()&&"undefined"!==typeof MathJax){U=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return T.mathEnabled},function(fa){F.actions.get("mathematicalTypesetting").funct()},{install:function(fa){this.listener=function(){fa(T.mathEnabled)};F.addListener("mathEnabledChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});U.style.paddingTop="5px";q.appendChild(U);var da=F.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");da.style.position=
-"relative";da.style.marginLeft="6px";da.style.top="2px";U.appendChild(da)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
-[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
-dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
-type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
-min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
-{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
-type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
-{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
-{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
-font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
-stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,F,T){if(null!=F){var aa=function(da){if(null!=da)if(T)for(var fa=0;fa<da.length;fa++)F[da[fa].name]=da[fa];else for(var na in F){var sa=!1;for(fa=0;fa<da.length;fa++)if(da[fa].name==na&&da[fa].type==F[na].type){sa=!0;break}sa||
-delete F[na]}},U=this.editorUi.editor.graph.view.getState(q);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),aa(U.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{aa(JSON.parse(q))}catch(da){}}};var f=
-StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var F={},T=q.vertices,aa=q.edges,U=0;U<T.length;U++)this.findCommonProperties(T[U],F,0==U);for(U=0;U<aa.length;U++)this.findCommonProperties(aa[U],F,0==T.length&&0==U);null!=Object.getOwnPropertyNames&&
-0<Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,q))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,F,T){function aa(ba,W,ea,ta){Ba.getModel().beginUpdate();try{var qa=[],va=[];if(null!=ea.index){for(var Ea=[],Ca=ea.parentRow.nextSibling;Ca&&
-Ca.getAttribute("data-pName")==ba;)Ea.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;ea.index<Ea.length?null!=ta?Ea.splice(ta,1):Ea[ea.index]=W:Ea.push(W);null!=ea.size&&Ea.length>ea.size&&(Ea=Ea.slice(0,ea.size));W=Ea.join(",");null!=ea.countProperty&&(Ba.setCellStyles(ea.countProperty,Ea.length,Ba.getSelectionCells()),qa.push(ea.countProperty),va.push(Ea.length))}Ba.setCellStyles(ba,W,Ba.getSelectionCells());qa.push(ba);va.push(W);if(null!=ea.dependentProps)for(ba=0;ba<ea.dependentProps.length;ba++){var Ma=
-ea.dependentPropsDefVal[ba],Sa=ea.dependentPropsVals[ba];if(Sa.length>W)Sa=Sa.slice(0,W);else for(var Qa=Sa.length;Qa<W;Qa++)Sa.push(Ma);Sa=Sa.join(",");Ba.setCellStyles(ea.dependentProps[ba],Sa,Ba.getSelectionCells());qa.push(ea.dependentProps[ba]);va.push(Sa)}if("function"==typeof ea.onChange)ea.onChange(Ba,W);ua.editorUi.fireEvent(new mxEventObject("styleChanged","keys",qa,"values",va,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function U(ba,W,ea){var ta=mxUtils.getOffset(q,
-!0),qa=mxUtils.getOffset(ba,!0);W.style.position="absolute";W.style.left=qa.x-ta.x+"px";W.style.top=qa.y-ta.y+"px";W.style.width=ba.offsetWidth+"px";W.style.height=ba.offsetHeight-(ea?4:0)+"px";W.style.zIndex=5}function da(ba,W,ea){var ta=document.createElement("div");ta.style.width="32px";ta.style.height="4px";ta.style.margin="2px";ta.style.border="1px solid black";ta.style.background=W&&"none"!=W?W:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ua,function(qa){this.editorUi.pickColor(W,
-function(va){ta.style.background="none"==va?"url('"+Dialog.prototype.noColorImage+"')":va;aa(ba,va,ea)});mxEvent.consume(qa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ta);return btn}function fa(ba,W,ea,ta,qa,va,Ea){null!=W&&(W=W.split(","),oa.push({name:ba,values:W,type:ea,defVal:ta,countProperty:qa,parentRow:va,isDeletable:!0,flipBkg:Ea}));btn=mxUtils.button("+",mxUtils.bind(ua,function(Ca){for(var Ma=va,Sa=0;null!=Ma.nextSibling;)if(Ma.nextSibling.getAttribute("data-pName")==
-ba)Ma=Ma.nextSibling,Sa++;else break;var Qa={type:ea,parentRow:va,index:Sa,isDeletable:!0,defVal:ta,countProperty:qa};Sa=za(ba,"",Qa,0==Sa%2,Ea);aa(ba,ta,Qa);Ma.parentNode.insertBefore(Sa,Ma.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function na(ba,W,ea,ta,qa,va,Ea){if(0<qa){var Ca=Array(qa);W=null!=W?W.split(","):[];for(var Ma=0;Ma<qa;Ma++)Ca[Ma]=null!=W[Ma]?W[Ma]:null!=ta?ta:"";oa.push({name:ba,values:Ca,type:ea,defVal:ta,
-parentRow:va,flipBkg:Ea,size:qa})}return document.createElement("div")}function sa(ba,W,ea){var ta=document.createElement("input");ta.type="checkbox";ta.checked="1"==W;mxEvent.addListener(ta,"change",function(){aa(ba,ta.checked?"1":"0",ea)});return ta}function za(ba,W,ea,ta,qa){var va=ea.dispName,Ea=ea.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(qa?"Dark":"")+(ta?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",ba);Ca.setAttribute("data-pValue",W);ta=!1;null!=ea.index&&
-(Ca.setAttribute("data-index",ea.index),va=(null!=va?va:"")+"["+ea.index+"]",ta=!0);var Ma=document.createElement("td");Ma.className="gePropRowCell";va=mxResources.get(va,null,va);mxUtils.write(Ma,va);Ma.setAttribute("title",va);ta&&(Ma.style.textAlign="right");Ca.appendChild(Ma);Ma=document.createElement("td");Ma.className="gePropRowCell";if("color"==Ea)Ma.appendChild(da(ba,W,ea));else if("bool"==Ea||"boolean"==Ea)Ma.appendChild(sa(ba,W,ea));else if("enum"==Ea){var Sa=ea.enumList;for(qa=0;qa<Sa.length;qa++)if(va=
-Sa[qa],va.val==W){mxUtils.write(Ma,mxResources.get(va.dispName,null,va.dispName));break}mxEvent.addListener(Ma,"click",mxUtils.bind(ua,function(){var Qa=document.createElement("select");U(Ma,Qa);for(var Fa=0;Fa<Sa.length;Fa++){var Ka=Sa[Fa],Pa=document.createElement("option");Pa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Pa,mxResources.get(Ka.dispName,null,Ka.dispName));Qa.appendChild(Pa)}Qa.value=W;q.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var $a=mxUtils.htmlEntities(Qa.value);
-aa(ba,$a,ea)});Qa.focus();mxEvent.addListener(Qa,"blur",function(){q.removeChild(Qa)})}))}else"dynamicArr"==Ea?Ma.appendChild(fa(ba,W,ea.subType,ea.subDefVal,ea.countProperty,Ca,qa)):"staticArr"==Ea?Ma.appendChild(na(ba,W,ea.subType,ea.subDefVal,ea.size,Ca,qa)):"readOnly"==Ea?(qa=document.createElement("input"),qa.setAttribute("readonly",""),qa.value=W,qa.style.width="96px",qa.style.borderWidth="0px",Ma.appendChild(qa)):(Ma.innerHTML=mxUtils.htmlEntities(decodeURIComponent(W)),mxEvent.addListener(Ma,
-"click",mxUtils.bind(ua,function(){function Qa(){var Ka=Fa.value;Ka=0==Ka.length&&"string"!=Ea?0:Ka;ea.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",Ea="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ea.min&&Ka<ea.min?Ka=ea.min:null!=ea.max&&Ka>ea.max&&(Ka=ea.max);Ka=encodeURIComponent(("int"==Ea?parseInt(Ka):Ka)+"");aa(ba,Ka,ea)}var Fa=document.createElement("input");U(Ma,Fa,!0);Fa.value=decodeURIComponent(W);Fa.className="gePropEditor";"int"!=Ea&&"float"!=Ea||ea.allowAuto||
-(Fa.type="number",Fa.step="int"==Ea?"1":"any",null!=ea.min&&(Fa.min=parseFloat(ea.min)),null!=ea.max&&(Fa.max=parseFloat(ea.max)));q.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ka){13==Ka.keyCode&&Qa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Qa()})})));ea.isDeletable&&(qa=mxUtils.button("-",mxUtils.bind(ua,function(Qa){aa(ba,"",ea,ea.index);mxEvent.consume(Qa)})),qa.style.height="16px",qa.style.width="25px",qa.style.float="right",qa.className="geColorBtn",Ma.appendChild(qa));
-Ca.appendChild(Ma);return Ca}var ua=this,Ba=this.editorUi.editor.graph,oa=[];q.style.position="relative";q.style.padding="0";var Aa=document.createElement("table");Aa.className="geProperties";Aa.style.whiteSpace="nowrap";Aa.style.width="100%";var ya=document.createElement("tr");ya.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";var Oa=document.createElement("img");Oa.src=Sidebar.prototype.expandedImage;Oa.style.verticalAlign="middle";La.appendChild(Oa);
-mxUtils.write(La,mxResources.get("property"));ya.style.cursor="pointer";var Na=function(){var ba=Aa.querySelectorAll(".gePropNonHeaderRow");if(ua.editorUi.propertiesCollapsed){Oa.src=Sidebar.prototype.collapsedImage;var W="none";for(var ea=q.childNodes.length-1;0<=ea;ea--)try{var ta=q.childNodes[ea],qa=ta.nodeName.toUpperCase();"INPUT"!=qa&&"SELECT"!=qa||q.removeChild(ta)}catch(va){}}else Oa.src=Sidebar.prototype.expandedImage,W="";for(ea=0;ea<ba.length;ea++)ba[ea].style.display=W};mxEvent.addListener(ya,
-"click",function(){ua.editorUi.propertiesCollapsed=!ua.editorUi.propertiesCollapsed;Na()});ya.appendChild(La);La=document.createElement("th");La.className="gePropHeaderCell";La.innerHTML=mxResources.get("value");ya.appendChild(La);Aa.appendChild(ya);var Ia=!1,wa=!1;ya=null;1==T.vertices.length&&0==T.edges.length?ya=T.vertices[0].id:0==T.vertices.length&&1==T.edges.length&&(ya=T.edges[0].id);null!=ya&&Aa.appendChild(za("id",mxUtils.htmlEntities(ya),{dispName:"ID",type:"readOnly"},!0,!1));for(var ab in F)if(ya=
-F[ab],"function"!=typeof ya.isVisible||ya.isVisible(T,this)){var Ya=null!=T.style[ab]?mxUtils.htmlEntities(T.style[ab]+""):null!=ya.getDefaultValue?ya.getDefaultValue(T,this):ya.defVal;if("separator"==ya.type)wa=!wa;else{if("staticArr"==ya.type)ya.size=parseInt(T.style[ya.sizeProperty]||F[ya.sizeProperty].defVal)||0;else if(null!=ya.dependentProps){var x=ya.dependentProps,O=[],P=[];for(La=0;La<x.length;La++){var X=T.style[x[La]];P.push(F[x[La]].subDefVal);O.push(null!=X?X.split(","):[])}ya.dependentPropsDefVal=
-P;ya.dependentPropsVals=O}Aa.appendChild(za(ab,Ya,ya,Ia,wa));Ia=!Ia}}for(La=0;La<oa.length;La++)for(ya=oa[La],F=ya.parentRow,T=0;T<ya.values.length;T++)ab=za(ya.name,ya.values[T],{type:ya.type,parentRow:ya.parentRow,isDeletable:ya.isDeletable,index:T,defVal:ya.defVal,countProperty:ya.countProperty,size:ya.size},0==T%2,ya.flipBkg),F.parentNode.insertBefore(ab,F.nextSibling),F=ab;q.appendChild(Aa);Na();return q};StyleFormatPanel.prototype.addStyles=function(q){function F(ya){mxEvent.addListener(ya,
-"mouseenter",function(){ya.style.opacity="1"});mxEvent.addListener(ya,"mouseleave",function(){ya.style.opacity="0.5"})}var T=this.editorUi,aa=T.editor.graph,U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.paddingLeft="24px";U.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(U);var da="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
-fa=document.createElement("div");fa.style.whiteSpace="nowrap";fa.style.position="relative";fa.style.textAlign="center";fa.style.width="210px";for(var na=[],sa=0;sa<this.defaultColorSchemes.length;sa++){var za=document.createElement("div");za.style.display="inline-block";za.style.width="6px";za.style.height="6px";za.style.marginLeft="4px";za.style.marginRight="3px";za.style.borderRadius="3px";za.style.cursor="pointer";za.style.background="transparent";za.style.border="1px solid #b5b6b7";mxUtils.bind(this,
-function(ya){mxEvent.addListener(za,"click",mxUtils.bind(this,function(){ua(ya)}))})(sa);na.push(za);fa.appendChild(za)}var ua=mxUtils.bind(this,function(ya){null!=na[ya]&&(null!=this.format.currentScheme&&null!=na[this.format.currentScheme]&&(na[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ya,Ba(this.defaultColorSchemes[this.format.currentScheme]),na[this.format.currentScheme].style.background="#84d7ff")}),Ba=mxUtils.bind(this,function(ya){var La=mxUtils.bind(this,
-function(Na){var Ia=mxUtils.button("",mxUtils.bind(this,function(Ya){aa.getModel().beginUpdate();try{for(var x=T.getSelectionState().cells,O=0;O<x.length;O++){for(var P=aa.getModel().getStyle(x[O]),X=0;X<da.length;X++)P=mxUtils.removeStylename(P,da[X]);var ba=aa.getModel().isVertex(x[O])?aa.defaultVertexStyle:aa.defaultEdgeStyle;null!=Na?(mxEvent.isShiftDown(Ya)||(P=""==Na.fill?mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,Na.fill||mxUtils.getValue(ba,
-mxConstants.STYLE_FILLCOLOR,null)),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,Na.gradient||mxUtils.getValue(ba,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ya)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ya)||!aa.getModel().isVertex(x[O])||(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,Na.font||mxUtils.getValue(ba,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ya)||(P=""==Na.stroke?mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,
-Na.stroke||mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,null)))):(P=mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_FILLCOLOR,"#ffffff")),P=mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,"#000000")),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_GRADIENTCOLOR,null)),aa.getModel().isVertex(x[O])&&(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ba,
-mxConstants.STYLE_FONTCOLOR,null))));aa.getModel().setStyle(x[O],P)}}finally{aa.getModel().endUpdate()}}));Ia.className="geStyleButton";Ia.style.width="36px";Ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ia.style.margin="0px 6px 6px 0px";if(null!=Na){var wa="1"==urlParams.sketch?"2px solid":"1px solid";null!=Na.border&&(wa=Na.border);null!=Na.gradient?mxClient.IS_IE&&10>document.documentMode?Ia.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Na.fill+"', EndColorStr='"+
-Na.gradient+"', GradientType=0)":Ia.style.backgroundImage="linear-gradient("+Na.fill+" 0px,"+Na.gradient+" 100%)":Na.fill==mxConstants.NONE?Ia.style.background="url('"+Dialog.prototype.noColorImage+"')":Ia.style.backgroundColor=""==Na.fill?mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Na.fill||mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ia.style.border=Na.stroke==
-mxConstants.NONE?wa+" transparent":""==Na.stroke?wa+" "+mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):wa+" "+(Na.stroke||mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Na.title&&Ia.setAttribute("title",Na.title)}else{wa=mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ab=mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
-"#000000");Ia.style.backgroundColor=wa;Ia.style.border="1px solid "+ab}Ia.style.borderRadius="0";U.appendChild(Ia)});U.innerText="";for(var Oa=0;Oa<ya.length;Oa++)0<Oa&&0==mxUtils.mod(Oa,4)&&mxUtils.br(U),La(ya[Oa])});null==this.format.currentScheme?ua(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ua(this.format.currentScheme);sa=10>=this.defaultColorSchemes.length?28:8;var oa=document.createElement("div");oa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+sa+"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=);";
+"g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var F=[],T=0;T<q;T++)F.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return F.join("")};Editor.updateStatusInterval=1E4;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.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(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var F=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(F)throw EditorUi.debug("Editor.setGraphXml ParserError",
+[this],"node",[q],"cause",[F]),Error(mxResources.get("notADiagramFile")+" ("+F+")");if("mxGraphModel"==q.nodeName){F=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=F&&""!=F)F!=this.graph.currentStyle&&(T=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=T&&(aa=new mxCodec(T.ownerDocument),aa.decode(T,this.graph.getStylesheet())));else{var T=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
+"/default-old.xml").getDocumentElement();if(null!=T){var aa=new mxCodec(T.ownerDocument);aa.decode(T,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||"1"==q.getAttribute("math");F=q.getAttribute("backgroundImage");null!=F?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(F)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(F=q.getAttribute("extFonts"))try{for(F=F.split("|").map(function(U){U=U.split("^");return{name:U[0],url:U[1]}}),T=0;T<F.length;T++)this.graph.addExtFont(F[T].name,F[T].url)}catch(U){console.log("ExtFonts format error: "+U.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(q,F){q=null!=q?q:!0;var T=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&T.setAttribute("style",this.graph.currentStyle);var aa=this.graph.getBackgroundImageObject(this.graph.backgroundImage,F);null!=aa&&T.setAttribute("backgroundImage",JSON.stringify(aa));T.setAttribute("math",this.graph.mathEnabled?"1":"0");T.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=
+this.graph.extFonts&&0<this.graph.extFonts.length&&(aa=this.graph.extFonts.map(function(U){return U.name+"^"+U.url}),T.setAttribute("extFonts",aa.join("|")));return T};Editor.prototype.isDataSvg=function(q){try{var F=mxUtils.parseXml(q).documentElement.getAttribute("content");if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var T=mxUtils.parseXml(F).documentElement;
+return"mxfile"==T.nodeName||"mxGraphModel"==T.nodeName}}catch(aa){}return!1};Editor.prototype.extractGraphModel=function(q,F,T){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};
+var l=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){l.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(q,F){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(U){try{MathJax.typesetClear([U]),MathJax.typeset([U]),
+Editor.onMathJaxDone()}catch(da){MathJax.typesetClear([U]),null!=da.retry?da.retry.then(function(){MathJax.typesetPromise([U]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+da.toString())}};window.MathJax=null!=F?F:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};
+Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(da,fa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
+U);this.graph.addListener(mxEvent.REFRESH,U)};F=document.getElementsByTagName("script");if(null!=F&&0<F.length){var aa=document.createElement("script");aa.setAttribute("type","text/javascript");aa.setAttribute("src",q);F[0].parentNode.appendChild(aa)}}};Editor.prototype.csvToArray=function(q){if(0<q.length){var F="",T=[""],aa=0,U=!0,da;q=$jscomp.makeIterator(q);for(da=q.next();!da.done;da=q.next())da=da.value,'"'===da?(U&&da===F&&(T[aa]+=da),U=!U):","===da&&U?da=T[++aa]="":T[aa]+=da,F=da;return T}return[]};
+Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var F=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);F=/\.png$/i.test(q)||/\.pdf$/i.test(q)||F;var T="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+T+(F?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
+q.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(q)||"https://raw.githubusercontent.com/"===q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var F=
+q.convert,T=this;q.convert=function(aa){if(null!=aa){var U="http://"==aa.substring(0,7)||"https://"==aa.substring(0,8);U&&!navigator.onLine?aa=Editor.svgBrokenImage.src:!U||aa.substring(0,q.baseUrl.length)==q.baseUrl||T.crossOriginImages&&T.isCorsEnabledForUrl(aa)?"chrome-extension://"==aa.substring(0,19)||mxClient.IS_CHROMEAPP||(aa=F.apply(this,arguments)):aa=PROXY_URL+"?url="+encodeURIComponent(aa)}return aa};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};
+Editor.prototype.convertImageToDataUri=function(q,F){try{var T=!0,aa=window.setTimeout(mxUtils.bind(this,function(){T=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(da){window.clearTimeout(aa);T&&F(Editor.createSvgDataUri(da.getText()))}),function(){window.clearTimeout(aa);T&&F(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(aa);if(T)try{var da=
+document.createElement("canvas"),fa=da.getContext("2d");da.height=U.height;da.width=U.width;fa.drawImage(U,0,0);F(da.toDataURL())}catch(na){F(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(aa);T&&F(Editor.svgBrokenImage.src)};U.src=q}}catch(da){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,F,T,aa){null==aa&&(aa=this.createImageUrlConverter());var U=0,da=T||{};T=mxUtils.bind(this,function(fa,na){fa=q.getElementsByTagName(fa);for(var sa=0;sa<fa.length;sa++)mxUtils.bind(this,
+function(za){try{if(null!=za){var ua=aa.convert(za.getAttribute(na));if(null!=ua&&"data:"!=ua.substring(0,5)){var Ba=da[ua];null==Ba?(U++,this.convertImageToDataUri(ua,function(oa){null!=oa&&(da[ua]=oa,za.setAttribute(na,oa));U--;0==U&&F(q)})):za.setAttribute(na,Ba)}else null!=ua&&za.setAttribute(na,ua)}}catch(oa){}})(fa[sa])});T("image","xlink:href");T("img","src");0==U&&F(q)};Editor.base64Encode=function(q){for(var F="",T=0,aa=q.length,U,da,fa;T<aa;){U=q.charCodeAt(T++)&255;if(T==aa){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
+2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4);F+="==";break}da=q.charCodeAt(T++);if(T==aa){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(da&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2);F+="=";break}fa=q.charCodeAt(T++);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
+2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(da&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2|(fa&192)>>6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(fa&63)}return F};Editor.prototype.loadUrl=function(q,F,T,aa,U,da,fa,na){try{var sa=!fa&&(aa||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));U=null!=U?U:!0;var za=
+mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(ua){if(200<=ua.getStatus()&&299>=ua.getStatus()){if(null!=F){var Ba=ua.getText();if(sa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){ua=mxUtilsBinaryToArray(ua.request.responseBody).toArray();Ba=Array(ua.length);for(var oa=0;oa<ua.length;oa++)Ba[oa]=String.fromCharCode(ua[oa]);Ba=Ba.join("")}da=null!=da?da:"data:image/png;base64,";Ba=da+Editor.base64Encode(Ba)}F(Ba)}}else null!=
+T&&(0==ua.getStatus()?T({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?T({code:ua.getStatus()},ua):T({message:mxResources.get("error")+" "+ua.getStatus()},ua))}),function(ua){null!=T&&T({message:mxResources.get("error")+" "+ua.getStatus()})},sa,this.timeout,function(){U&&null!=T&&T({code:App.ERROR_TIMEOUT,retry:za})},na)});za()}catch(ua){null!=T&&T(ua)}};Editor.prototype.absoluteCssFonts=function(q){var F=null;if(null!=q){var T=q.split("url(");if(0<T.length){F=[T[0]];q=window.location.pathname;
+var aa=null!=q?q.lastIndexOf("/"):-1;0<=aa&&(q=q.substring(0,aa+1));aa=document.getElementsByTagName("base");var U=null;null!=aa&&0<aa.length&&(U=aa[0].getAttribute("href"));for(var da=1;da<T.length;da++)if(aa=T[da].indexOf(")"),0<aa){var fa=Editor.trimCssUrl(T[da].substring(0,aa));this.graph.isRelativeUrl(fa)&&(fa=null!=U?U+fa:window.location.protocol+"//"+window.location.hostname+("/"==fa.charAt(0)?"":q)+fa);F.push('url("'+fa+'"'+T[da].substring(aa))}else F.push(T[da])}else F=[q]}return null!=F?
+F.join(""):null};Editor.prototype.mapFontUrl=function(q,F,T){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));T(q,F)};Editor.prototype.embedCssFonts=function(q,F){var T=q.split("url("),aa=0;null==this.cachedFonts&&(this.cachedFonts={});var U=mxUtils.bind(this,function(){if(0==aa){for(var sa=[T[0]],za=1;za<T.length;za++){var ua=T[za].indexOf(")");sa.push('url("');sa.push(this.cachedFonts[Editor.trimCssUrl(T[za].substring(0,ua))]);sa.push('"'+T[za].substring(ua))}F(sa.join(""))}});
+if(0<T.length){for(q=1;q<T.length;q++){var da=T[q].indexOf(")"),fa=null,na=T[q].indexOf("format(",da);0<na&&(fa=Editor.trimCssUrl(T[q].substring(na+7,T[q].indexOf(")",na))));mxUtils.bind(this,function(sa){if(null==this.cachedFonts[sa]){this.cachedFonts[sa]=sa;aa++;var za="application/x-font-ttf";if("svg"==fa||/(\.svg)($|\?)/i.test(sa))za="image/svg+xml";else if("otf"==fa||"embedded-opentype"==fa||/(\.otf)($|\?)/i.test(sa))za="application/x-font-opentype";else if("woff"==fa||/(\.woff)($|\?)/i.test(sa))za=
+"application/font-woff";else if("woff2"==fa||/(\.woff2)($|\?)/i.test(sa))za="application/font-woff2";else if("eot"==fa||/(\.eot)($|\?)/i.test(sa))za="application/vnd.ms-fontobject";else if("sfnt"==fa||/(\.sfnt)($|\?)/i.test(sa))za="application/font-sfnt";this.mapFontUrl(za,sa,mxUtils.bind(this,function(ua,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(oa){this.cachedFonts[sa]=oa;aa--;U()}),mxUtils.bind(this,function(oa){aa--;U()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(T[q].substring(0,
+da)),fa)}U()}else F(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss=F;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(q[F]=Graph.fontMapping[F]);return q};Editor.prototype.embedExtFonts=function(q){var F=this.graph.getCustomFonts();if(0<F.length){var T=[],aa=0;null==this.cachedGoogleFonts&&
+(this.cachedGoogleFonts=this.createGoogleFontCache());for(var U=mxUtils.bind(this,function(){0==aa&&this.embedCssFonts(T.join(""),q)}),da=0;da<F.length;da++)mxUtils.bind(this,function(fa,na){Graph.isCssFontUrl(na)?null==this.cachedGoogleFonts[na]?(aa++,this.loadUrl(na,mxUtils.bind(this,function(sa){this.cachedGoogleFonts[na]=sa;T.push(sa+"\n");aa--;U()}),mxUtils.bind(this,function(sa){aa--;T.push("@import url("+na+");\n");U()}))):T.push(this.cachedGoogleFonts[na]+"\n"):T.push('@font-face {font-family: "'+
+fa+'";src: url("'+na+'")}\n')})(F[da].name,F[da].url);U()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var F=document.getElementsByTagName("style"),T=0;T<F.length;T++){var aa=mxUtils.getTextContent(F[T]);0>aa.indexOf("mxPageSelector")&&0<aa.indexOf("MathJax")&&q[0].appendChild(F[T].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,F){F=null!=F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var T=q.getElementsByTagName("defs"),
+aa=q.ownerDocument;0==T.length?(T=null!=aa.createElementNS?aa.createElementNS(mxConstants.NS_SVG,"defs"):aa.createElement("defs"),null!=q.firstChild?q.insertBefore(T,q.firstChild):q.appendChild(T)):T=T[0];q=null!=aa.createElementNS?aa.createElementNS(mxConstants.NS_SVG,"style"):aa.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,F);T.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=
+function(q,F,T){var aa=mxClient.IS_FF?8192:16384;return Math.min(T,Math.min(aa/q,aa/F))};Editor.prototype.exportToCanvas=function(q,F,T,aa,U,da,fa,na,sa,za,ua,Ba,oa,Aa,ya,La,Oa,Na){try{da=null!=da?da:!0;fa=null!=fa?fa:!0;Ba=null!=Ba?Ba:this.graph;oa=null!=oa?oa:0;var Ia=sa?null:Ba.background;Ia==mxConstants.NONE&&(Ia=null);null==Ia&&(Ia=aa);null==Ia&&0==sa&&(Ia=La?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,oa,Aa,null,fa,null,null,null,za,null,La,Oa,Na),
+mxUtils.bind(this,function(wa){try{var ab=new Image;ab.onload=mxUtils.bind(this,function(){try{var y=function(){mxClient.IS_SF?window.setTimeout(function(){ba.drawImage(ab,0,0);q(O,wa)},0):(ba.drawImage(ab,0,0),q(O,wa))},O=document.createElement("canvas"),P=parseInt(wa.getAttribute("width")),X=parseInt(wa.getAttribute("height"));na=null!=na?na:1;null!=F&&(na=da?Math.min(1,Math.min(3*F/(4*X),F/P)):F/P);na=this.getMaxCanvasScale(P,X,na);P=Math.ceil(na*P);X=Math.ceil(na*X);O.setAttribute("width",P);
+O.setAttribute("height",X);var ba=O.getContext("2d");null!=Ia&&(ba.beginPath(),ba.rect(0,0,P,X),ba.fillStyle=Ia,ba.fill());1!=na&&ba.scale(na,na);if(ya){var W=Ba.view,ea=W.scale;W.scale=1;var ta=btoa(unescape(encodeURIComponent(W.createSvgGrid(W.gridColor))));W.scale=ea;ta="data:image/svg+xml;base64,"+ta;var qa=Ba.gridSize*W.gridSteps*na,va=Ba.getGraphBounds(),Ea=W.translate.x*ea,Ca=W.translate.y*ea,Ma=Ea+(va.x-Ea)/ea-oa,Sa=Ca+(va.y-Ca)/ea-oa,Qa=new Image;Qa.onload=function(){try{for(var Fa=-Math.round(qa-
+mxUtils.mod((Ea-Ma)*na,qa)),Ka=-Math.round(qa-mxUtils.mod((Ca-Sa)*na,qa));Fa<P;Fa+=qa)for(var Pa=Ka;Pa<X;Pa+=qa)ba.drawImage(Qa,Fa/na,Pa/na);y()}catch($a){null!=U&&U($a)}};Qa.onerror=function(Fa){null!=U&&U(Fa)};Qa.src=ta}else y()}catch(Fa){null!=U&&U(Fa)}});ab.onerror=function(y){null!=U&&U(y)};za&&this.graph.addSvgShadow(wa);this.graph.mathEnabled&&this.addMathCss(wa);var Ya=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(wa,this.resolvedFontCss),ab.src=Editor.createSvgDataUri(mxUtils.getXml(wa))}catch(y){null!=
+U&&U(y)}});this.embedExtFonts(mxUtils.bind(this,function(y){try{null!=y&&this.addFontCss(wa,y),this.loadFonts(Ya)}catch(O){null!=U&&U(O)}}))}catch(y){null!=U&&U(y)}}),T,ua)}catch(wa){null!=U&&U(wa)}};Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=p;Editor.updateCRC=function(q,F,T,aa){for(var U=0;U<aa;U++)q=Editor.crcTable[(q^F.charCodeAt(T+U))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,T=0;T<q.length;T++)F=F>>>
+8^Editor.crcTable[(F^q.charCodeAt(T))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,T,aa,U){function da(ua,Ba){var oa=sa;sa+=Ba;return ua.substring(oa,sa)}function fa(ua){ua=da(ua,4);return ua.charCodeAt(3)+(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function na(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var sa=0;if(da(q,8)!=String.fromCharCode(137)+"PNG"+
+String.fromCharCode(13,10,26,10))null!=U&&U();else if(da(q,4),"IHDR"!=da(q,4))null!=U&&U();else{da(q,17);U=q.substring(0,sa);do{var za=fa(q);if("IDAT"==da(q,4)){U=q.substring(0,sa-8);"pHYs"==F&&"dpi"==T?(T=Math.round(aa/.0254),T=na(T)+na(T)+String.fromCharCode(1)):T=T+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+aa;aa=4294967295;aa=Editor.updateCRC(aa,F,0,4);aa=Editor.updateCRC(aa,T,0,T.length);U+=na(T.length)+F+T+na(aa^4294967295);U+=q.substring(sa-8,q.length);break}U+=q.substring(sa-
+8,sa-4+za);da(q,za);da(q,4)}while(za);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var M=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,F){M.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var T=null;null!=q.editor.graph.getModel().getParent(F)?T=F.getId():null!=q.currentPage&&(T=q.currentPage.getId());return T});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var K=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
+"1"==urlParams.embed||this.editorUi.editor.chromeless?K.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var Q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=Q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=
+this.editorUi,T=F.editor.graph,aa=this.createOption(mxResources.get("shadow"),function(){return T.shadowVisible},function(U){var da=new ChangePageSetup(F);da.ignoreColor=!0;da.ignoreImage=!0;da.shadowVisible=U;T.model.execute(da)},{install:function(U){this.listener=function(){U(T.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(aa.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),
+mxUtils.setOpacity(aa,60));q.appendChild(aa)}return q};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=d.apply(this,arguments);var F=this.editorUi,T=F.editor.graph;if(T.isEnabled()){var aa=F.getCurrentFile();if(null!=aa&&aa.isAutosaveOptional()){var U=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(fa){F.editor.setAutosave(fa);F.editor.autosave&&aa.isModified()&&aa.fileChanged()},{install:function(fa){this.listener=
+function(){fa(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});q.appendChild(U)}}if(this.isMathOptionVisible()&&T.isEnabled()&&"undefined"!==typeof MathJax){U=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return T.mathEnabled},function(fa){F.actions.get("mathematicalTypesetting").funct()},{install:function(fa){this.listener=function(){fa(T.mathEnabled)};F.addListener("mathEnabledChanged",
+this.listener)},destroy:function(){F.removeListener(this.listener)}});U.style.paddingTop="5px";q.appendChild(U);var da=F.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");da.style.position="relative";da.style.marginLeft="6px";da.style.top="2px";U.appendChild(da)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
+type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",
+type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},
+{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,
+defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",
+min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",
+dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",
+min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",
+type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",
+dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];
+mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
+type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
+type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
+type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
+font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
+{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
+function(q,F,T){if(null!=F){var aa=function(da){if(null!=da)if(T)for(var fa=0;fa<da.length;fa++)F[da[fa].name]=da[fa];else for(var na in F){var sa=!1;for(fa=0;fa<da.length;fa++)if(da[fa].name==na&&da[fa].type==F[na].type){sa=!0;break}sa||delete F[na]}},U=this.editorUi.editor.graph.view.getState(q);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,
+Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),aa(U.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{aa(JSON.parse(q))}catch(da){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var F=
+{},T=q.vertices,aa=q.edges,U=0;U<T.length;U++)this.findCommonProperties(T[U],F,0==U);for(U=0;U<aa.length;U++)this.findCommonProperties(aa[U],F,0==T.length&&0==U);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,q))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(q,F,T){function aa(ba,W,ea,ta){Ba.getModel().beginUpdate();try{var qa=[],va=[];if(null!=ea.index){for(var Ea=[],Ca=ea.parentRow.nextSibling;Ca&&Ca.getAttribute("data-pName")==ba;)Ea.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;ea.index<Ea.length?null!=ta?Ea.splice(ta,1):Ea[ea.index]=W:Ea.push(W);null!=ea.size&&Ea.length>ea.size&&(Ea=Ea.slice(0,ea.size));W=Ea.join(",");null!=ea.countProperty&&(Ba.setCellStyles(ea.countProperty,Ea.length,
+Ba.getSelectionCells()),qa.push(ea.countProperty),va.push(Ea.length))}Ba.setCellStyles(ba,W,Ba.getSelectionCells());qa.push(ba);va.push(W);if(null!=ea.dependentProps)for(ba=0;ba<ea.dependentProps.length;ba++){var Ma=ea.dependentPropsDefVal[ba],Sa=ea.dependentPropsVals[ba];if(Sa.length>W)Sa=Sa.slice(0,W);else for(var Qa=Sa.length;Qa<W;Qa++)Sa.push(Ma);Sa=Sa.join(",");Ba.setCellStyles(ea.dependentProps[ba],Sa,Ba.getSelectionCells());qa.push(ea.dependentProps[ba]);va.push(Sa)}if("function"==typeof ea.onChange)ea.onChange(Ba,
+W);ua.editorUi.fireEvent(new mxEventObject("styleChanged","keys",qa,"values",va,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function U(ba,W,ea){var ta=mxUtils.getOffset(q,!0),qa=mxUtils.getOffset(ba,!0);W.style.position="absolute";W.style.left=qa.x-ta.x+"px";W.style.top=qa.y-ta.y+"px";W.style.width=ba.offsetWidth+"px";W.style.height=ba.offsetHeight-(ea?4:0)+"px";W.style.zIndex=5}function da(ba,W,ea){var ta=document.createElement("div");ta.style.width="32px";ta.style.height=
+"4px";ta.style.margin="2px";ta.style.border="1px solid black";ta.style.background=W&&"none"!=W?W:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ua,function(qa){this.editorUi.pickColor(W,function(va){ta.style.background="none"==va?"url('"+Dialog.prototype.noColorImage+"')":va;aa(ba,va,ea)});mxEvent.consume(qa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ta);return btn}function fa(ba,W,ea,ta,qa,va,Ea){null!=W&&(W=W.split(","),
+oa.push({name:ba,values:W,type:ea,defVal:ta,countProperty:qa,parentRow:va,isDeletable:!0,flipBkg:Ea}));btn=mxUtils.button("+",mxUtils.bind(ua,function(Ca){for(var Ma=va,Sa=0;null!=Ma.nextSibling;)if(Ma.nextSibling.getAttribute("data-pName")==ba)Ma=Ma.nextSibling,Sa++;else break;var Qa={type:ea,parentRow:va,index:Sa,isDeletable:!0,defVal:ta,countProperty:qa};Sa=za(ba,"",Qa,0==Sa%2,Ea);aa(ba,ta,Qa);Ma.parentNode.insertBefore(Sa,Ma.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function na(ba,W,ea,ta,qa,va,Ea){if(0<qa){var Ca=Array(qa);W=null!=W?W.split(","):[];for(var Ma=0;Ma<qa;Ma++)Ca[Ma]=null!=W[Ma]?W[Ma]:null!=ta?ta:"";oa.push({name:ba,values:Ca,type:ea,defVal:ta,parentRow:va,flipBkg:Ea,size:qa})}return document.createElement("div")}function sa(ba,W,ea){var ta=document.createElement("input");ta.type="checkbox";ta.checked="1"==W;mxEvent.addListener(ta,"change",function(){aa(ba,ta.checked?"1":"0",ea)});return ta}function za(ba,
+W,ea,ta,qa){var va=ea.dispName,Ea=ea.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(qa?"Dark":"")+(ta?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",ba);Ca.setAttribute("data-pValue",W);ta=!1;null!=ea.index&&(Ca.setAttribute("data-index",ea.index),va=(null!=va?va:"")+"["+ea.index+"]",ta=!0);var Ma=document.createElement("td");Ma.className="gePropRowCell";va=mxResources.get(va,null,va);mxUtils.write(Ma,va);Ma.setAttribute("title",va);ta&&(Ma.style.textAlign="right");Ca.appendChild(Ma);
+Ma=document.createElement("td");Ma.className="gePropRowCell";if("color"==Ea)Ma.appendChild(da(ba,W,ea));else if("bool"==Ea||"boolean"==Ea)Ma.appendChild(sa(ba,W,ea));else if("enum"==Ea){var Sa=ea.enumList;for(qa=0;qa<Sa.length;qa++)if(va=Sa[qa],va.val==W){mxUtils.write(Ma,mxResources.get(va.dispName,null,va.dispName));break}mxEvent.addListener(Ma,"click",mxUtils.bind(ua,function(){var Qa=document.createElement("select");U(Ma,Qa);for(var Fa=0;Fa<Sa.length;Fa++){var Ka=Sa[Fa],Pa=document.createElement("option");
+Pa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Pa,mxResources.get(Ka.dispName,null,Ka.dispName));Qa.appendChild(Pa)}Qa.value=W;q.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var $a=mxUtils.htmlEntities(Qa.value);aa(ba,$a,ea)});Qa.focus();mxEvent.addListener(Qa,"blur",function(){q.removeChild(Qa)})}))}else"dynamicArr"==Ea?Ma.appendChild(fa(ba,W,ea.subType,ea.subDefVal,ea.countProperty,Ca,qa)):"staticArr"==Ea?Ma.appendChild(na(ba,W,ea.subType,ea.subDefVal,ea.size,Ca,qa)):"readOnly"==
+Ea?(qa=document.createElement("input"),qa.setAttribute("readonly",""),qa.value=W,qa.style.width="96px",qa.style.borderWidth="0px",Ma.appendChild(qa)):(Ma.innerHTML=mxUtils.htmlEntities(decodeURIComponent(W)),mxEvent.addListener(Ma,"click",mxUtils.bind(ua,function(){function Qa(){var Ka=Fa.value;Ka=0==Ka.length&&"string"!=Ea?0:Ka;ea.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",Ea="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ea.min&&Ka<ea.min?Ka=ea.min:null!=ea.max&&
+Ka>ea.max&&(Ka=ea.max);Ka=encodeURIComponent(("int"==Ea?parseInt(Ka):Ka)+"");aa(ba,Ka,ea)}var Fa=document.createElement("input");U(Ma,Fa,!0);Fa.value=decodeURIComponent(W);Fa.className="gePropEditor";"int"!=Ea&&"float"!=Ea||ea.allowAuto||(Fa.type="number",Fa.step="int"==Ea?"1":"any",null!=ea.min&&(Fa.min=parseFloat(ea.min)),null!=ea.max&&(Fa.max=parseFloat(ea.max)));q.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ka){13==Ka.keyCode&&Qa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Qa()})})));
+ea.isDeletable&&(qa=mxUtils.button("-",mxUtils.bind(ua,function(Qa){aa(ba,"",ea,ea.index);mxEvent.consume(Qa)})),qa.style.height="16px",qa.style.width="25px",qa.style.float="right",qa.className="geColorBtn",Ma.appendChild(qa));Ca.appendChild(Ma);return Ca}var ua=this,Ba=this.editorUi.editor.graph,oa=[];q.style.position="relative";q.style.padding="0";var Aa=document.createElement("table");Aa.className="geProperties";Aa.style.whiteSpace="nowrap";Aa.style.width="100%";var ya=document.createElement("tr");
+ya.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";var Oa=document.createElement("img");Oa.src=Sidebar.prototype.expandedImage;Oa.style.verticalAlign="middle";La.appendChild(Oa);mxUtils.write(La,mxResources.get("property"));ya.style.cursor="pointer";var Na=function(){var ba=Aa.querySelectorAll(".gePropNonHeaderRow");if(ua.editorUi.propertiesCollapsed){Oa.src=Sidebar.prototype.collapsedImage;var W="none";for(var ea=q.childNodes.length-1;0<=ea;ea--)try{var ta=
+q.childNodes[ea],qa=ta.nodeName.toUpperCase();"INPUT"!=qa&&"SELECT"!=qa||q.removeChild(ta)}catch(va){}}else Oa.src=Sidebar.prototype.expandedImage,W="";for(ea=0;ea<ba.length;ea++)ba[ea].style.display=W};mxEvent.addListener(ya,"click",function(){ua.editorUi.propertiesCollapsed=!ua.editorUi.propertiesCollapsed;Na()});ya.appendChild(La);La=document.createElement("th");La.className="gePropHeaderCell";La.innerHTML=mxResources.get("value");ya.appendChild(La);Aa.appendChild(ya);var Ia=!1,wa=!1;ya=null;1==
+T.vertices.length&&0==T.edges.length?ya=T.vertices[0].id:0==T.vertices.length&&1==T.edges.length&&(ya=T.edges[0].id);null!=ya&&Aa.appendChild(za("id",mxUtils.htmlEntities(ya),{dispName:"ID",type:"readOnly"},!0,!1));for(var ab in F)if(ya=F[ab],"function"!=typeof ya.isVisible||ya.isVisible(T,this)){var Ya=null!=T.style[ab]?mxUtils.htmlEntities(T.style[ab]+""):null!=ya.getDefaultValue?ya.getDefaultValue(T,this):ya.defVal;if("separator"==ya.type)wa=!wa;else{if("staticArr"==ya.type)ya.size=parseInt(T.style[ya.sizeProperty]||
+F[ya.sizeProperty].defVal)||0;else if(null!=ya.dependentProps){var y=ya.dependentProps,O=[],P=[];for(La=0;La<y.length;La++){var X=T.style[y[La]];P.push(F[y[La]].subDefVal);O.push(null!=X?X.split(","):[])}ya.dependentPropsDefVal=P;ya.dependentPropsVals=O}Aa.appendChild(za(ab,Ya,ya,Ia,wa));Ia=!Ia}}for(La=0;La<oa.length;La++)for(ya=oa[La],F=ya.parentRow,T=0;T<ya.values.length;T++)ab=za(ya.name,ya.values[T],{type:ya.type,parentRow:ya.parentRow,isDeletable:ya.isDeletable,index:T,defVal:ya.defVal,countProperty:ya.countProperty,
+size:ya.size},0==T%2,ya.flipBkg),F.parentNode.insertBefore(ab,F.nextSibling),F=ab;q.appendChild(Aa);Na();return q};StyleFormatPanel.prototype.addStyles=function(q){function F(ya){mxEvent.addListener(ya,"mouseenter",function(){ya.style.opacity="1"});mxEvent.addListener(ya,"mouseleave",function(){ya.style.opacity="0.5"})}var T=this.editorUi,aa=T.editor.graph,U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.paddingLeft="24px";U.style.paddingRight="20px";q.style.paddingLeft="16px";
+q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(U);var da="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),fa=document.createElement("div");fa.style.whiteSpace="nowrap";fa.style.position="relative";fa.style.textAlign="center";fa.style.width="210px";for(var na=[],sa=0;sa<this.defaultColorSchemes.length;sa++){var za=document.createElement("div");za.style.display=
+"inline-block";za.style.width="6px";za.style.height="6px";za.style.marginLeft="4px";za.style.marginRight="3px";za.style.borderRadius="3px";za.style.cursor="pointer";za.style.background="transparent";za.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ya){mxEvent.addListener(za,"click",mxUtils.bind(this,function(){ua(ya)}))})(sa);na.push(za);fa.appendChild(za)}var ua=mxUtils.bind(this,function(ya){null!=na[ya]&&(null!=this.format.currentScheme&&null!=na[this.format.currentScheme]&&(na[this.format.currentScheme].style.background=
+"transparent"),this.format.currentScheme=ya,Ba(this.defaultColorSchemes[this.format.currentScheme]),na[this.format.currentScheme].style.background="#84d7ff")}),Ba=mxUtils.bind(this,function(ya){var La=mxUtils.bind(this,function(Na){var Ia=mxUtils.button("",mxUtils.bind(this,function(Ya){aa.getModel().beginUpdate();try{for(var y=T.getSelectionState().cells,O=0;O<y.length;O++){for(var P=aa.getModel().getStyle(y[O]),X=0;X<da.length;X++)P=mxUtils.removeStylename(P,da[X]);var ba=aa.getModel().isVertex(y[O])?
+aa.defaultVertexStyle:aa.defaultEdgeStyle;null!=Na?(mxEvent.isShiftDown(Ya)||(P=""==Na.fill?mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,Na.fill||mxUtils.getValue(ba,mxConstants.STYLE_FILLCOLOR,null)),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,Na.gradient||mxUtils.getValue(ba,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ya)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ya)||!aa.getModel().isVertex(y[O])||(P=mxUtils.setStyle(P,
+mxConstants.STYLE_FONTCOLOR,Na.font||mxUtils.getValue(ba,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ya)||(P=""==Na.stroke?mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,Na.stroke||mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,null)))):(P=mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_FILLCOLOR,"#ffffff")),P=mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,
+"#000000")),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_GRADIENTCOLOR,null)),aa.getModel().isVertex(y[O])&&(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_FONTCOLOR,null))));aa.getModel().setStyle(y[O],P)}}finally{aa.getModel().endUpdate()}}));Ia.className="geStyleButton";Ia.style.width="36px";Ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ia.style.margin="0px 6px 6px 0px";if(null!=Na){var wa=
+"1"==urlParams.sketch?"2px solid":"1px solid";null!=Na.border&&(wa=Na.border);null!=Na.gradient?mxClient.IS_IE&&10>document.documentMode?Ia.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Na.fill+"', EndColorStr='"+Na.gradient+"', GradientType=0)":Ia.style.backgroundImage="linear-gradient("+Na.fill+" 0px,"+Na.gradient+" 100%)":Na.fill==mxConstants.NONE?Ia.style.background="url('"+Dialog.prototype.noColorImage+"')":Ia.style.backgroundColor=""==Na.fill?mxUtils.getValue(aa.defaultVertexStyle,
+mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Na.fill||mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ia.style.border=Na.stroke==mxConstants.NONE?wa+" transparent":""==Na.stroke?wa+" "+mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):wa+" "+(Na.stroke||mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?
+"#ffffff":Editor.darkColor));null!=Na.title&&Ia.setAttribute("title",Na.title)}else{wa=mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ab=mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ia.style.backgroundColor=wa;Ia.style.border="1px solid "+ab}Ia.style.borderRadius="0";U.appendChild(Ia)});U.innerText="";for(var Oa=0;Oa<ya.length;Oa++)0<Oa&&0==mxUtils.mod(Oa,4)&&mxUtils.br(U),La(ya[Oa])});null==this.format.currentScheme?ua(Editor.isDarkMode()?
+1:"1"==urlParams.sketch?5:0):ua(this.format.currentScheme);sa=10>=this.defaultColorSchemes.length?28:8;var oa=document.createElement("div");oa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+sa+"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(oa,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+sa+"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&&(q.appendChild(oa),q.appendChild(Aa));mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));F(oa);F(Aa);Ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(fa);return q};StyleFormatPanel.prototype.addEditOps=function(q){var F=this.editorUi.getSelectionState(),T=this.editorUi.editor.graph,aa=null;1==F.cells.length&&(aa=mxUtils.button(mxResources.get("editStyle"),
mxUtils.bind(this,function(U){this.editorUi.actions.get("editStyle").funct()})),aa.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),aa.style.width="210px",aa.style.marginBottom="2px",q.appendChild(aa));T=1==F.cells.length?T.view.getState(F.cells[0]):null;null!=T&&null!=T.shape&&null!=T.shape.stencil?(F=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(U){this.editorUi.actions.get("editShape").funct()})),F.setAttribute("title",
@@ -3296,14 +3299,14 @@ T();return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowe
mxConstants.STYLE_FONTFAMILY,null);null!=T&&Graph.addFont(T,decodeURIComponent(F))}}return q};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 v=Graph.prototype.init;Graph.prototype.init=function(){function q(U){F=U}v.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(U){F=null});this.isMouseInsertPoint=function(){return null!=
F};var T=this.getInsertPoint;this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):T.apply(this,arguments)};var aa=this.layoutManager.getLayout;this.layoutManager.getLayout=function(U){var da=this.graph.getCellStyle(U);if(null!=da&&"rack"==da.childLayout){var fa=new mxStackLayout(this.graph,!1);fa.gridSize=null!=da.rackUnitSize?parseFloat(da.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;fa.marginLeft=da.marginLeft||0;fa.marginRight=da.marginRight||
-0;fa.marginTop=da.marginTop||0;fa.marginBottom=da.marginBottom||0;fa.allowGaps=da.allowGaps||0;fa.horizontal="1"==mxUtils.getValue(da,"horizontalRack","0");fa.resizeParent=!1;fa.fill=!0;return fa}return aa.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(y.apply(this,arguments))};var C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,
-F,T,aa,U,da,fa,na,sa,za,ua){C.apply(this,arguments);Graph.processFontAttributes(ua)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,T){function aa(){for(var ya=fa.getSelectionCells(),La=[],Oa=0;Oa<ya.length;Oa++)fa.isCellVisible(ya[Oa])&&La.push(ya[Oa]);fa.setSelectionCells(La)}function U(ya){fa.setHiddenTags(ya?[]:na.slice());
-aa();fa.refresh()}function da(ya,La){za.innerText="";if(0<ya.length){var Oa=document.createElement("table");Oa.setAttribute("cellpadding","2");Oa.style.boxSizing="border-box";Oa.style.tableLayout="fixed";Oa.style.width="100%";var Na=document.createElement("tbody");if(null!=ya&&0<ya.length)for(var Ia=0;Ia<ya.length;Ia++)(function(wa){var ab=0>mxUtils.indexOf(fa.hiddenTags,wa),Ya=document.createElement("tr"),x=document.createElement("td");x.style.align="center";x.style.width="16px";var O=document.createElement("img");
-O.setAttribute("src",ab?Editor.visibleImage:Editor.hiddenImage);O.setAttribute("title",mxResources.get(ab?"hideIt":"show",[wa]));mxUtils.setOpacity(O,ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";x.appendChild(O);mxEvent.addListener(O,"click",function(X){mxEvent.isShiftDown(X)?U(0<=mxUtils.indexOf(fa.hiddenTags,wa)):(fa.toggleHiddenTag(wa),aa(),fa.refresh());mxEvent.consume(X)});Ya.appendChild(x);x=document.createElement("td");
-x.style.overflow="hidden";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.verticalAlign="middle";x.style.cursor="pointer";x.setAttribute("title",wa);a=document.createElement("a");mxUtils.write(a,wa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ab?100:40);x.appendChild(a);mxEvent.addListener(x,"click",function(X){if(mxEvent.isShiftDown(X)){U(!0);var ba=fa.getCellsForTags([wa],null,null,!0);fa.isEnabled()?fa.setSelectionCells(ba):fa.highlightCells(ba)}else if(ab&&
-0<fa.hiddenTags.length)U(!0);else{ba=na.slice();var W=mxUtils.indexOf(ba,wa);ba.splice(W,1);fa.setHiddenTags(ba);aa();fa.refresh()}mxEvent.consume(X)});Ya.appendChild(x);if(fa.isEnabled()){x=document.createElement("td");x.style.verticalAlign="middle";x.style.textAlign="center";x.style.width="18px";if(null==La){x.style.align="center";x.style.width="16px";O=document.createElement("img");O.setAttribute("src",Editor.crossImage);O.setAttribute("title",mxResources.get("removeIt",[wa]));mxUtils.setOpacity(O,
-ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";mxEvent.addListener(O,"click",function(X){var ba=mxUtils.indexOf(na,wa);0<=ba&&na.splice(ba,1);fa.removeTagsForCells(fa.model.getDescendants(fa.model.getRoot()),[wa]);fa.refresh();mxEvent.consume(X)});x.appendChild(O)}else{var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px";P.defaultChecked=null!=La&&0<=mxUtils.indexOf(La,
-wa);P.checked=P.defaultChecked;P.style.background="transparent";P.setAttribute("title",mxResources.get(P.defaultChecked?"removeIt":"add",[wa]));mxEvent.addListener(P,"change",function(X){P.checked?fa.addTagsForCells(fa.getSelectionCells(),[wa]):fa.removeTagsForCells(fa.getSelectionCells(),[wa]);mxEvent.consume(X)});x.appendChild(P)}Ya.appendChild(x)}Na.appendChild(Ya)})(ya[Ia]);Oa.appendChild(Na);za.appendChild(Oa)}}var fa=this,na=fa.hiddenTags.slice(),sa=document.createElement("div");sa.style.userSelect=
+0;fa.marginTop=da.marginTop||0;fa.marginBottom=da.marginBottom||0;fa.allowGaps=da.allowGaps||0;fa.horizontal="1"==mxUtils.getValue(da,"horizontalRack","0");fa.resizeParent=!1;fa.fill=!0;return fa}return aa.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(x.apply(this,arguments))};var B=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,
+F,T,aa,U,da,fa,na,sa,za,ua){B.apply(this,arguments);Graph.processFontAttributes(ua)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,T){function aa(){for(var ya=fa.getSelectionCells(),La=[],Oa=0;Oa<ya.length;Oa++)fa.isCellVisible(ya[Oa])&&La.push(ya[Oa]);fa.setSelectionCells(La)}function U(ya){fa.setHiddenTags(ya?[]:na.slice());
+aa();fa.refresh()}function da(ya,La){za.innerText="";if(0<ya.length){var Oa=document.createElement("table");Oa.setAttribute("cellpadding","2");Oa.style.boxSizing="border-box";Oa.style.tableLayout="fixed";Oa.style.width="100%";var Na=document.createElement("tbody");if(null!=ya&&0<ya.length)for(var Ia=0;Ia<ya.length;Ia++)(function(wa){var ab=0>mxUtils.indexOf(fa.hiddenTags,wa),Ya=document.createElement("tr"),y=document.createElement("td");y.style.align="center";y.style.width="16px";var O=document.createElement("img");
+O.setAttribute("src",ab?Editor.visibleImage:Editor.hiddenImage);O.setAttribute("title",mxResources.get(ab?"hideIt":"show",[wa]));mxUtils.setOpacity(O,ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";y.appendChild(O);mxEvent.addListener(O,"click",function(X){mxEvent.isShiftDown(X)?U(0<=mxUtils.indexOf(fa.hiddenTags,wa)):(fa.toggleHiddenTag(wa),aa(),fa.refresh());mxEvent.consume(X)});Ya.appendChild(y);y=document.createElement("td");
+y.style.overflow="hidden";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.verticalAlign="middle";y.style.cursor="pointer";y.setAttribute("title",wa);a=document.createElement("a");mxUtils.write(a,wa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ab?100:40);y.appendChild(a);mxEvent.addListener(y,"click",function(X){if(mxEvent.isShiftDown(X)){U(!0);var ba=fa.getCellsForTags([wa],null,null,!0);fa.isEnabled()?fa.setSelectionCells(ba):fa.highlightCells(ba)}else if(ab&&
+0<fa.hiddenTags.length)U(!0);else{ba=na.slice();var W=mxUtils.indexOf(ba,wa);ba.splice(W,1);fa.setHiddenTags(ba);aa();fa.refresh()}mxEvent.consume(X)});Ya.appendChild(y);if(fa.isEnabled()){y=document.createElement("td");y.style.verticalAlign="middle";y.style.textAlign="center";y.style.width="18px";if(null==La){y.style.align="center";y.style.width="16px";O=document.createElement("img");O.setAttribute("src",Editor.crossImage);O.setAttribute("title",mxResources.get("removeIt",[wa]));mxUtils.setOpacity(O,
+ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";mxEvent.addListener(O,"click",function(X){var ba=mxUtils.indexOf(na,wa);0<=ba&&na.splice(ba,1);fa.removeTagsForCells(fa.model.getDescendants(fa.model.getRoot()),[wa]);fa.refresh();mxEvent.consume(X)});y.appendChild(O)}else{var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px";P.defaultChecked=null!=La&&0<=mxUtils.indexOf(La,
+wa);P.checked=P.defaultChecked;P.style.background="transparent";P.setAttribute("title",mxResources.get(P.defaultChecked?"removeIt":"add",[wa]));mxEvent.addListener(P,"change",function(X){P.checked?fa.addTagsForCells(fa.getSelectionCells(),[wa]):fa.removeTagsForCells(fa.getSelectionCells(),[wa]);mxEvent.consume(X)});y.appendChild(P)}Ya.appendChild(y)}Na.appendChild(Ya)})(ya[Ia]);Oa.appendChild(Na);za.appendChild(Oa)}}var fa=this,na=fa.hiddenTags.slice(),sa=document.createElement("div");sa.style.userSelect=
"none";sa.style.overflow="hidden";sa.style.padding="10px";sa.style.height="100%";var za=document.createElement("div");za.style.boxSizing="border-box";za.style.borderRadius="4px";za.style.userSelect="none";za.style.overflow="auto";za.style.position="absolute";za.style.left="10px";za.style.right="10px";za.style.top="10px";za.style.border=fa.isEnabled()?"1px solid #808080":"none";za.style.bottom=fa.isEnabled()?"48px":"10px";sa.appendChild(za);var ua=mxUtils.button(mxResources.get("reset"),function(ya){fa.setHiddenTags([]);
mxEvent.isShiftDown(ya)||(na=fa.hiddenTags.slice());aa();fa.refresh()});ua.setAttribute("title",mxResources.get("reset"));ua.className="geBtn";ua.style.margin="0 4px 0 0";var Ba=mxUtils.button(mxResources.get("add"),function(){null!=T&&T(na,function(ya){na=ya;oa()})});Ba.setAttribute("title",mxResources.get("add"));Ba.className="geBtn";Ba.style.margin="0";fa.addListener(mxEvent.ROOT,function(){na=fa.hiddenTags.slice()});var oa=mxUtils.bind(this,function(ya,La){if(q()){ya=fa.getAllTags();for(La=0;La<
ya.length;La++)0>mxUtils.indexOf(na,ya[La])&&na.push(ya[La]);na.sort();fa.isSelectionEmpty()?da(na):da(na,fa.getCommonTagsForCells(fa.getSelectionCells()))}});fa.selectionModel.addListener(mxEvent.CHANGE,oa);fa.model.addListener(mxEvent.CHANGE,oa);fa.addListener(mxEvent.REFRESH,oa);var Aa=document.createElement("div");Aa.style.boxSizing="border-box";Aa.style.whiteSpace="nowrap";Aa.style.position="absolute";Aa.style.overflow="hidden";Aa.style.bottom="0px";Aa.style.height="42px";Aa.style.right="10px";
@@ -3311,8 +3314,8 @@ Aa.style.left="10px";fa.isEnabled()&&(Aa.appendChild(ua),Aa.appendChild(Ba),sa.a
F);for(var aa=0;aa<T.length;aa++)T[aa].getAttribute("face")==q&&T[aa].getAttribute("data-font-src")!=F&&T[aa].setAttribute("data-font-src",F)}};var D=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return D.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));
if(null!=q)for(var F in q)this.globalVars[F]=q[F]}catch(T){null!=window.console&&console.log("Error in vars URL parameter: "+T)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var F=N.apply(this,arguments);null==F&&null!=this.globalVars&&(F=this.globalVars[q]);return F};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=
this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var G=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,F,T,aa,U,da,fa,na,sa,za,ua,Ba,oa,Aa){var ya=null,La=null,Oa=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ya=this.stylesheet,La=this.shapeForegroundColor,Oa=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 Na=G.apply(this,arguments),Ia=this.getCustomFonts();if(ua&&0<Ia.length){var wa=Na.ownerDocument,ab=null!=wa.createElementNS?wa.createElementNS(mxConstants.NS_SVG,"style"):wa.createElement("style");null!=wa.setAttributeNS?ab.setAttributeNS("type","text/css"):ab.setAttribute("type","text/css");for(var Ya="",x="",O=0;O<Ia.length;O++){var P=
-Ia[O].name,X=Ia[O].url;Graph.isCssFontUrl(X)?Ya+="@import url("+X+");\n":x+='@font-face {\nfont-family: "'+P+'";\nsrc: url("'+X+'");\n}\n'}ab.appendChild(wa.createTextNode(Ya+x));Na.getElementsByTagName("defs")[0].appendChild(ab)}this.mathEnabled&&(document.body.appendChild(Na),Editor.MathJaxRender(Na),Na.parentNode.removeChild(Na));null!=ya&&(this.shapeBackgroundColor=Oa,this.shapeForegroundColor=La,this.stylesheet=ya,this.refresh());return Na};var ia=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
+"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Na=G.apply(this,arguments),Ia=this.getCustomFonts();if(ua&&0<Ia.length){var wa=Na.ownerDocument,ab=null!=wa.createElementNS?wa.createElementNS(mxConstants.NS_SVG,"style"):wa.createElement("style");null!=wa.setAttributeNS?ab.setAttributeNS("type","text/css"):ab.setAttribute("type","text/css");for(var Ya="",y="",O=0;O<Ia.length;O++){var P=
+Ia[O].name,X=Ia[O].url;Graph.isCssFontUrl(X)?Ya+="@import url("+X+");\n":y+='@font-face {\nfont-family: "'+P+'";\nsrc: url("'+X+'");\n}\n'}ab.appendChild(wa.createTextNode(Ya+y));Na.getElementsByTagName("defs")[0].appendChild(ab)}this.mathEnabled&&(document.body.appendChild(Na),Editor.MathJaxRender(Na),Na.parentNode.removeChild(Na));null!=ya&&(this.shapeBackgroundColor=Oa,this.shapeForegroundColor=La,this.stylesheet=ya,this.refresh());return Na};var ia=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
function(q){ia.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var ka=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ka.apply(this,arguments);this.enumerationState=0};var ja=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ja.apply(this,
arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var F="1"==mxUtils.getValue(q.style,"enumerate",0);F&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):F||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);F=q.secondLabel;if(null!=F){var T=q.view.scale,aa=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*T,q.y+4*T,0,0):mxRectangle.fromPoint(q.view.getPoint(q));F.bounds.equals(q)&&F.value==aa&&F.scale==T||(F.bounds=q,F.value=aa,F.scale=
@@ -3372,590 +3375,594 @@ fa.appendChild(F);var oa=Ba.cloneNode(!0);fa.appendChild(oa);mxEvent.addListener
!0):ua.checked=!0;mxUtils.br(fa);var Aa=document.createElement("input");Aa.setAttribute("value","all");Aa.setAttribute("type","radio");Aa.style.marginRight="8px";U.isSelectionEmpty()&&Aa.setAttribute("disabled","disabled");var ya=document.createElement("div");ya.style.marginBottom="10px";1==na?(Aa.setAttribute("type","checkbox"),Aa.style.marginBottom="12px",ya.appendChild(Aa)):(Aa.setAttribute("name","pages-printdialog"),Aa.style.marginBottom="8px",fa.appendChild(Aa));F=document.createElement("span");
mxUtils.write(F,mxResources.get("selectionOnly"));Aa.parentNode.appendChild(F);1==na&&mxUtils.br(Aa.parentNode);var La=document.createElement("input");La.style.marginRight="8px";La.setAttribute("value","adjust");La.setAttribute("type","radio");La.setAttribute("name","printZoom");ya.appendChild(La);F=document.createElement("span");mxUtils.write(F,mxResources.get("adjustTo"));ya.appendChild(F);var Oa=document.createElement("input");Oa.style.cssText="margin:0 8px 0 8px;";Oa.setAttribute("value","100 %");
Oa.style.width="50px";ya.appendChild(Oa);mxEvent.addListener(Oa,"focus",function(){La.checked=!0});da.appendChild(ya);fa=fa.cloneNode(!1);var Na=La.cloneNode(!0);Na.setAttribute("value","fit");La.setAttribute("checked","checked");F=document.createElement("div");F.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";F.appendChild(Na);fa.appendChild(F);ya=document.createElement("table");ya.style.display="inline-block";var Ia=document.createElement("tbody"),wa=document.createElement("tr"),
-ab=wa.cloneNode(!0),Ya=document.createElement("td"),x=Ya.cloneNode(!0),O=Ya.cloneNode(!0),P=Ya.cloneNode(!0),X=Ya.cloneNode(!0),ba=Ya.cloneNode(!0);Ya.style.textAlign="right";P.style.textAlign="right";mxUtils.write(Ya,mxResources.get("fitTo"));var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","1");W.setAttribute("min","1");W.setAttribute("type","number");W.style.width="40px";x.appendChild(W);F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsAcross"));
-O.appendChild(F);mxUtils.write(P,mxResources.get("fitToBy"));var ea=W.cloneNode(!0);X.appendChild(ea);mxEvent.addListener(W,"focus",function(){Na.checked=!0});mxEvent.addListener(ea,"focus",function(){Na.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));ba.appendChild(F);wa.appendChild(Ya);wa.appendChild(x);wa.appendChild(O);ab.appendChild(P);ab.appendChild(X);ab.appendChild(ba);Ia.appendChild(wa);Ia.appendChild(ab);ya.appendChild(Ia);fa.appendChild(ya);
+ab=wa.cloneNode(!0),Ya=document.createElement("td"),y=Ya.cloneNode(!0),O=Ya.cloneNode(!0),P=Ya.cloneNode(!0),X=Ya.cloneNode(!0),ba=Ya.cloneNode(!0);Ya.style.textAlign="right";P.style.textAlign="right";mxUtils.write(Ya,mxResources.get("fitTo"));var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","1");W.setAttribute("min","1");W.setAttribute("type","number");W.style.width="40px";y.appendChild(W);F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsAcross"));
+O.appendChild(F);mxUtils.write(P,mxResources.get("fitToBy"));var ea=W.cloneNode(!0);X.appendChild(ea);mxEvent.addListener(W,"focus",function(){Na.checked=!0});mxEvent.addListener(ea,"focus",function(){Na.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));ba.appendChild(F);wa.appendChild(Ya);wa.appendChild(y);wa.appendChild(O);ab.appendChild(P);ab.appendChild(X);ab.appendChild(ba);Ia.appendChild(wa);Ia.appendChild(ab);ya.appendChild(Ia);fa.appendChild(ya);
da.appendChild(fa);fa=document.createElement("div");F=document.createElement("div");F.style.fontWeight="bold";F.style.marginBottom="12px";mxUtils.write(F,mxResources.get("paperSize"));fa.appendChild(F);F=document.createElement("div");F.style.marginBottom="12px";var ta=PageSetupDialog.addPageFormatPanel(F,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);fa.appendChild(F);F=document.createElement("span");mxUtils.write(F,mxResources.get("pageScale"));fa.appendChild(F);var qa=
document.createElement("input");qa.style.cssText="margin:0 8px 0 8px;";qa.setAttribute("value","100 %");qa.style.width="60px";fa.appendChild(qa);da.appendChild(fa);F=document.createElement("div");F.style.cssText="text-align:right;margin:48px 0 0 0;";fa=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});fa.className="geBtn";q.editor.cancelFirst&&F.appendChild(fa);q.isOffline()||(ya=mxUtils.button(mxResources.get("help"),function(){U.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
ya.className="geBtn",F.appendChild(ya));PrintDialog.previewEnabled&&(ya=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();aa(!1)}),ya.className="geBtn",F.appendChild(ya));ya=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();aa(!0)});ya.className="geBtn gePrimaryBtn";F.appendChild(ya);q.editor.cancelFirst||F.appendChild(fa);da.appendChild(F);this.container=da};var Y=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 q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}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 Y.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 Z=document.createElement("canvas"),la=new Image;la.onload=function(){try{Z.getContext("2d").drawImage(la,
0,0);var q=Z.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};la.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
-(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(d,k,l){l.ui=d.ui;return k};b.afterDecode=function(d,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);null!=l.mathEnabled&&(l.mathEnabled=!l.mathEnabled);null!=l.shadowVisible&&(l.shadowVisible=!l.shadowVisible);return l};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,k,l){l.ui=d.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.4.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};b.afterDecode=function(e,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);null!=l.mathEnabled&&(l.mathEnabled=!l.mathEnabled);null!=l.shadowVisible&&(l.shadowVisible=!l.shadowVisible);return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.4.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=
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(e,f,g,v,y,C,I){C=null!=C?C:0<=e.indexOf("NetworkError")||0<=e.indexOf("SecurityError")||0<=e.indexOf("NS_ERROR_FAILURE")||0<=e.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(e!=EditorUi.lastErrorMessage&&(null==e||null==f||-1==e.indexOf("Script error")&&-1==e.indexOf("extension"))&&null!=e&&0>e.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=e;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(e);(new Image).src=D+"/log?severity="+C+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(e)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=v?":colno:"+
-encodeURIComponent(v):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(N){}try{I||null==window.console||console.error(C,e,f,g,v,y)}catch(N){}};EditorUi.logEvent=function(e){if("1"==urlParams.dev)EditorUi.debug("logEvent",e);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=e?"&data="+encodeURIComponent(JSON.stringify(e)):"")}catch(g){}};EditorUi.sendReport=
-function(e,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",e);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,e.length>f&&(e=e.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(e))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var e=[(new Date).toISOString()],f=0;f<arguments.length;f++)e.push(arguments[f]);console.log.apply(console,
-e)}}catch(g){}};EditorUi.removeChildNodes=function(e){for(;null!=e.firstChild;)e.removeChild(e.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,v,x,B,I){B=null!=B?B: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&&
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";x=null!=x?x:Error(d);(new Image).src=D+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=v?":colno:"+
+encodeURIComponent(v):"")+(null!=x&&null!=x.stack?"&stack="+encodeURIComponent(x.stack):"")}}catch(N){}try{I||null==window.console||console.error(B,d,f,g,v,x)}catch(N){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
+function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
+d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
-!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var e=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!e.getContext||!e.getContext("2d"))}catch(y){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var y=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(C){}};g.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(y){}try{f=document.createElement("canvas");f.width=f.height=1;var v=f.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==v.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(e,f,g){return this.editor.graph.openLink(e,f,g)};EditorUi.prototype.showSplash=function(e){};EditorUi.prototype.getLocalData=function(e,f){f(localStorage.getItem(e))};EditorUi.prototype.setLocalData=function(e,f,g){localStorage.setItem(e,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(e,f){localStorage.removeItem(e);f()};EditorUi.prototype.setShareCursorPosition=function(e){this.shareCursorPosition=
-e;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(e){this.showRemoteCursors=e;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(e){this.editor.graph.mathEnabled=e;this.editor.updateGraphComponents();this.editor.graph.refresh();
-this.editor.graph.defaultMathEnabled=e;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(e){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(e){return this.isOfflineApp()||!navigator.onLine||!e&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(e,f,g){var v=null==e||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=y.spin;y.spin=function(D,N){var G=!1;this.active||(C.call(this,D),this.active=!0,null!=N&&(v&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,e=document.body.clientWidth/2-2),G=document.createElement("div"),
-G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,e)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=N.substring(N.length-3,N.length)&&"!"!=N.charAt(N.length-1)&&(N+="..."),G.innerHTML=N,D.appendChild(G),y.status=G),this.pause=mxUtils.bind(this,function(){var ia=function(){};this.active&&(ia=mxUtils.bind(this,function(){this.spin(D,N)}));this.stop();return ia}),G=!0);return G};var I=y.stop;y.stop=function(){I.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
-return y};EditorUi.prototype.isCompatibleString=function(e){try{var f=mxUtils.parseXml(e),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(v){}return!1};EditorUi.prototype.isVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&
-3==e.charCodeAt(2)&&4==e.charCodeAt(3)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&3==e.charCodeAt(2)&&6==e.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||60==e.charCodeAt(0)&&63==e.charCodeAt(1)&&120==e.charCodeAt(2)&&109==e.charCodeAt(3)&&108==e.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(e){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,v=this.editor.graph,y=this;f.getFunction=function(C){if(v.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var I=y.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<I&&y.movePage(I,I-1)};if(38==C.keyCode)return function(){0<I&&y.movePage(I,0)};if(39==C.keyCode)return function(){I<y.pages.length-1&&y.movePage(I,
-I+1)};if(40==C.keyCode)return function(){I<y.pages.length-1&&y.movePage(I,y.pages.length-1)}}else if(mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)){if(37==C.keyCode)return function(){0<I&&y.selectNextPage(!1)};if(38==C.keyCode)return function(){0<I&&y.selectPage(y.pages[0])};if(39==C.keyCode)return function(){I<y.pages.length-1&&y.selectNextPage(!0)};if(40==C.keyCode)return function(){I<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=C.keyCode&&90>=C.keyCode)||
-v.isSelectionEmpty()||mxEvent.isAltDown(C)||mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)?g.apply(this,arguments):null}}return f};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(e){var f=d.apply(this,arguments);if(null==f)try{var g=e.indexOf("&lt;mxfile ");if(0<=g){var v=e.lastIndexOf("&lt;/mxfile&gt;");v>g&&(f=e.substring(g,v+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
-""))}else{var y=mxUtils.parseXml(e),C=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(I){}return f};EditorUi.prototype.validateFileData=function(e){if(null!=e&&0<e.length){var f=e.indexOf('<meta charset="utf-8">');0<=f&&(e=e.slice(0,f)+'<meta charset="utf-8"/>'+e.slice(f+23-1,e.length));e=Graph.zapGremlins(e)}return e};EditorUi.prototype.replaceFileData=function(e){e=this.validateFileData(e);
-e=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null;var f=null!=e?this.editor.extractGraphModel(e,!0):null;null!=f&&(e=f);if(null!=e){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,v=e.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<v.length||1==v.length&&v[0].hasAttribute("name")){this.fileNode=e;this.pages=null!=this.pages?this.pages:[];for(var y=v.length-1;0<=y;y--){var C=this.updatePageRoot(new DiagramPage(v[y]));null==C.getName()&&
-C.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,C,0==y?C:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(e),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(e,f,g,v,y,C,I,D,N,G,ia){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;N=null!=N?N:!0;var ka=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ja="_blank";else ka=ja=v;if(null==e)return"";var ca=e;if("mxfile"!=ca.nodeName.toLowerCase()){if(ia){var pa=e.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());
-pa.appendChild(e)}else{pa=Graph.zapGremlins(mxUtils.getXml(e));ca=Graph.compress(pa);if(Graph.decompress(ca)!=pa)return pa;pa=e.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());mxUtils.setTextContent(pa,ca)}ca=e.ownerDocument.createElement("mxfile");ca.appendChild(pa)}G?(ca=ca.cloneNode(!0),ca.removeAttribute("modified"),ca.removeAttribute("host"),ca.removeAttribute("agent"),ca.removeAttribute("etag"),ca.removeAttribute("userAgent"),ca.removeAttribute("version"),ca.removeAttribute("editor"),
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(x){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var x=
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=x&&6<x.length}catch(B){}};g.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(x){}try{f=document.createElement("canvas");f.width=f.height=1;var v=f.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==v.match("image/jpeg")}catch(x){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
+d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
+EditorUi.prototype.createSpinner=function(d,f,g){var v=null==d||null==f;g=null!=g?g:24;var x=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),B=x.spin;x.spin=function(D,N){var G=!1;this.active||(B.call(this,D),this.active=!0,null!=N&&(v&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
+G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=N.substring(N.length-3,N.length)&&"!"!=N.charAt(N.length-1)&&(N+="..."),G.innerHTML=N,D.appendChild(G),x.status=G),this.pause=mxUtils.bind(this,function(){var ia=function(){};this.active&&(ia=mxUtils.bind(this,function(){this.spin(D,N)}));this.stop();return ia}),G=!0);return G};var I=x.stop;x.stop=function(){I.call(this);this.active=!1;null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status);x.status=null};x.pause=function(){return function(){}};
+return x};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(v){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
+3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
+EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,v=this.editor.graph,x=this;f.getFunction=function(B){if(v.isSelectionEmpty()&&null!=x.pages&&0<x.pages.length){var I=x.getSelectedPageIndex();if(mxEvent.isShiftDown(B)){if(37==B.keyCode)return function(){0<I&&x.movePage(I,I-1)};if(38==B.keyCode)return function(){0<I&&x.movePage(I,0)};if(39==B.keyCode)return function(){I<x.pages.length-1&&x.movePage(I,
+I+1)};if(40==B.keyCode)return function(){I<x.pages.length-1&&x.movePage(I,x.pages.length-1)}}else if(mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)){if(37==B.keyCode)return function(){0<I&&x.selectNextPage(!1)};if(38==B.keyCode)return function(){0<I&&x.selectPage(x.pages[0])};if(39==B.keyCode)return function(){I<x.pages.length-1&&x.selectNextPage(!0)};if(40==B.keyCode)return function(){I<x.pages.length-1&&x.selectPage(x.pages[x.pages.length-1])}}}return!(65<=B.keyCode&&90>=B.keyCode)||
+v.isSelectionEmpty()||mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)||mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var v=d.lastIndexOf("&lt;/mxfile&gt;");v>g&&(f=d.substring(g,v+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var x=mxUtils.parseXml(d),B=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=B?mxUtils.getXml(B):""}}catch(I){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
+d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,v=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<v.length||1==v.length&&v[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var x=v.length-1;0<=x;x--){var B=this.updatePageRoot(new DiagramPage(v[x]));null==B.getName()&&
+B.setName(mxResources.get("pageWithNumber",[x+1]));f.model.execute(new ChangePage(this,B,0==x?B:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=g)for(x=0;x<g.length;x++)f.model.execute(new ChangePage(this,g[x],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,v,x,B,I,D,N,G,ia){f=null!=f?f:this.editor.graph;x=null!=x?x:!1;N=null!=N?N:!0;var ka=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ja="_blank";else ka=ja=v;if(null==d)return"";var ca=d;if("mxfile"!=ca.nodeName.toLowerCase()){if(ia){var pa=d.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());
+pa.appendChild(d)}else{pa=Graph.zapGremlins(mxUtils.getXml(d));ca=Graph.compress(pa);if(Graph.decompress(ca)!=pa)return pa;pa=d.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());mxUtils.setTextContent(pa,ca)}ca=d.ownerDocument.createElement("mxfile");ca.appendChild(pa)}G?(ca=ca.cloneNode(!0),ca.removeAttribute("modified"),ca.removeAttribute("host"),ca.removeAttribute("agent"),ca.removeAttribute("etag"),ca.removeAttribute("userAgent"),ca.removeAttribute("version"),ca.removeAttribute("editor"),
ca.removeAttribute("type")):(ca.removeAttribute("userAgent"),ca.removeAttribute("version"),ca.removeAttribute("editor"),ca.removeAttribute("pages"),ca.removeAttribute("type"),mxClient.IS_CHROMEAPP?ca.setAttribute("host","Chrome"):EditorUi.isElectronApp?ca.setAttribute("host","Electron"):ca.setAttribute("host",window.location.hostname),ca.setAttribute("modified",(new Date).toISOString()),ca.setAttribute("agent",navigator.appVersion),ca.setAttribute("version",EditorUi.VERSION),ca.setAttribute("etag",
-Editor.guid()),e=null!=g?g.getMode():this.mode,null!=e&&ca.setAttribute("type",e),1<ca.getElementsByTagName("diagram").length&&null!=this.pages&&ca.setAttribute("pages",this.pages.length));ia=ia?mxUtils.getPrettyXml(ca):mxUtils.getXml(ca);if(!C&&!y&&(I||null!=g&&/(\.html)$/i.test(g.getTitle())))ia=this.getHtml2(mxUtils.getXml(ca),f,null!=g?g.getTitle():null,ja,ka);else if(C||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(v=null),
-ia=this.getEmbeddedSvg(ia,f,v,null,D,N,ka);return ia};EditorUi.prototype.getXmlFileData=function(e,f,g,v){e=null!=e?e:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(e,v);if(e&&null!=this.fileNode&&null!=this.currentPage)if(e=function(N){var G=N.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(N)),N=N.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&N.appendChild(mxUtils.parseXml(G).documentElement))):
-null==G||g?N=N.cloneNode(!0):(N=N.cloneNode(!1),mxUtils.setTextContent(N,Graph.compressNode(G)));y.appendChild(N)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)e(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],I=C.node;if(C!=this.currentPage)if(C.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,
-D,null,v);EditorUi.removeChildNodes(I);mxUtils.setTextContent(I,Graph.compressNode(D));delete C.needsUpdate}else v&&(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&
-null!=C.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(C.root)),this.editor.graph.saveViewState(C.viewState,D,null,v),I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(D))));e(I)}return y};EditorUi.prototype.anonymizeString=function(e,f){for(var g=[],v=0;v<e.length;v++){var y=e.charAt(v);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
-Math.random()))):y.toUpperCase()!=y?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(y)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(e){if(null!=e[EditorUi.DIFF_INSERT])for(var f=0;f<e[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(e[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
-e[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(C){e[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=e[EditorUi.DIFF_UPDATE]){for(var v in e[EditorUi.DIFF_UPDATE]){var y=e[EditorUi.DIFF_UPDATE][v];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(C){var I=y.cells[C];if(null!=I){for(var D in I)null!=I[D].value&&(I[D].value="["+I[D].value.length+"]"),null!=I[D].xmlValue&&(I[D].xmlValue="["+I[D].xmlValue.length+"]"),null!=I[D].style&&(I[D].style=
-"["+I[D].style.length+"]"),mxUtils.isEmptyObject(I[D])&&delete I[D];mxUtils.isEmptyObject(I)&&delete y.cells[C]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete e[EditorUi.DIFF_UPDATE][v]}mxUtils.isEmptyObject(e[EditorUi.DIFF_UPDATE])&&delete e[EditorUi.DIFF_UPDATE]}return e};EditorUi.prototype.anonymizeAttributes=function(e,f){if(null!=e.attributes)for(var g=0;g<e.attributes.length;g++)"as"!=e.attributes[g].name&&
-e.setAttribute(e.attributes[g].name,this.anonymizeString(e.attributes[g].value,f));if(null!=e.childNodes)for(g=0;g<e.childNodes.length;g++)this.anonymizeAttributes(e.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(e,f){f=e.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
-"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return e};EditorUi.prototype.synchronizeCurrentFile=function(e){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!e&&f.invalidChecksum?
-f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),e?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(e,f,g,v,y,C,I,
-D,N,G,ia){y=null!=y?y:!0;C=null!=C?C:!1;var ka=this.editor.graph;if(f||!e&&null!=N&&/(\.svg)$/i.test(N.getTitle())){var ja=null!=ka.themes&&"darkTheme"==ka.defaultThemeName;G=!1;if(ja||null!=this.pages&&this.currentPage!=this.pages[0]){var ca=ka.getGlobalVariable;ka=this.createTemporaryGraph(ja?ka.getDefaultStylesheet():ka.getStylesheet());ka.setBackgroundImage=this.editor.graph.setBackgroundImage;ka.background=this.editor.graph.background;var pa=this.pages[0];this.currentPage==pa?ka.setBackgroundImage(this.editor.graph.backgroundImage):
-null!=pa.viewState&&null!=pa.viewState&&ka.setBackgroundImage(pa.viewState.backgroundImage);ka.getGlobalVariable=function(ra){return"page"==ra?pa.getName():"pagenumber"==ra?1:ca.apply(this,arguments)};document.body.appendChild(ka.container);ka.model.setRoot(pa.root)}}I=null!=I?I:this.getXmlFileData(y,C,G,ia);N=null!=N?N:this.getCurrentFile();e=this.createFileData(I,ka,N,window.location.href,e,f,g,v,y,D,G);ka!=this.editor.graph&&ka.container.parentNode.removeChild(ka.container);return e};EditorUi.prototype.getHtml=
-function(e,f,g,v,y,C){C=null!=C?C:!0;var I=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var N=f.view.scale;C=Math.floor(I.x/N-f.view.translate.x);N=Math.floor(I.y/N-f.view.translate.y);I=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));e.setAttribute("x0",C);e.setAttribute("y0",N)}null!=e&&(e.setAttribute("pan","1"),e.setAttribute("zoom","1"),e.setAttribute("resize",
-"0"),e.setAttribute("fit","0"),e.setAttribute("border","20"),e.setAttribute("links","1"),null!=v&&e.setAttribute("edit",v));null!=y&&(y=y.replace(/&/g,"&amp;"));e=null!=e?Graph.zapGremlins(mxUtils.getXml(e)):"";v=Graph.compress(e);Graph.decompress(v)!=e&&(v=encodeURIComponent(e));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?
-"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+v+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(e,f,g,v,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.replace(/&/g,"&amp;"));e={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(e),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage));
-return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(e))+'"></div>\n'+(null==y?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(e){e=this.validateFileData(e);this.pages=this.fileNode=this.currentPage=null;var f=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:
-null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[e],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");e=null!=f?this.editor.extractGraphModel(f,!0):null;null!=e&&(f=e);if(null!=f&&"mxfile"==f.nodeName&&(e=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var v=0;v<e.length;v++)null==
-e[v].getAttribute("id")&&e[v].setAttribute("id",v),f=new DiagramPage(e[v]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[v+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(v=0;v<y.length;v++)f[y[v]]=!0;var C=this.editor.graph.getModel(),I=C.getChildren(C.root);for(v=0;v<I.length;v++){var D=I[v];C.setVisible(D,f[D.id]||!1)}}catch(N){}};EditorUi.prototype.getBaseFilename=function(e){var f=
-this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!e&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(e,f,g,v,y,C,I,D,N,G,ia,ka){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var ja=this.getBaseFilename("remoteSvg"==e?!1:!y),ca=ja+("xml"==e||"pdf"==e&&ia?".drawio":"")+"."+e;if("xml"==e){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,v,y,null,null,null,f);this.saveData(ca,e,pa,"text/xml")}else if("html"==e)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,ja),this.saveData(ca,e,pa,"text/html");else if("svg"!=e&&"xmlsvg"!=e||!this.spinner.spin(document.body,
-mxResources.get("export"))){if("xmlpng"==e)ca=ja+".png";else if("jpeg"==e)ca=ja+".jpg";else if("remoteSvg"==e){ca=ja+".svg";e="svg";var ra=parseInt(N);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<ra){var L=this.editor.graph,V=L.getGraphBounds();var R=Math.ceil(V.width*D/L.view.scale+2*ra);var Y=Math.ceil(V.height*D/L.view.scale+2*ra)}}this.saveRequest(ca,e,mxUtils.bind(this,function(T,aa){try{var U=this.editor.graph.pageVisible;0==C&&(this.editor.graph.pageVisible=C);var da=this.createDownloadRequest(T,
-e,v,aa,I,y,D,N,G,ia,ka,R,Y);this.editor.graph.pageVisible=U;return da}catch(fa){this.handleError(fa)}}))}else{var Z=null,la=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(ca,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==e){var q=this.editor.graph.background;if(I||q==mxConstants.NONE)q=null;var F=this.editor.graph.getSvg(q,null,null,null,null,v);g&&
-this.editor.graph.addSvgShadow(F);this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();la(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else ca=ja+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();la(T)}),v)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){var ca=this.editor.graph,pa=ca.getGraphBounds();g=this.getFileData(!0,null,null,
-null,g,0==C?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var ra="",L="";if(pa.width*pa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=ia?L="&from="+ia.from+"&to="+ia.to:0==C&&(L="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){ra="&from="+C;break}C=ca.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?
-y||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;y={globalVars:ca.getExportVariables()};N&&(y.grid={size:ca.gridSize,steps:ca.view.gridSteps,color:ca.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+L+"&bg="+(null!=C?C:mxConstants.NONE)+"&base64="+v+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=e?"&filename="+encodeURIComponent(e):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=I?
-"&scale="+I:"")+(null!=D?"&border="+D:"")+(ka&&isFinite(ka)?"&w="+ka:"")+(ja&&isFinite(ja)?"&h="+ja:""))};EditorUi.prototype.setMode=function(e,f){this.mode=e};EditorUi.prototype.loadDescriptor=function(e,f,g){var v=window.location.hash,y=mxUtils.bind(this,function(I){var D=null!=e.data?e.data:"";null!=I&&0<I.length&&(0<D.length&&(D+="\n"),D+=I);I=new LocalFile(this,"csv"!=e.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);
-I.getHash=function(){return v};this.fileLoaded(I);"csv"==e.format&&this.importCsv(D,mxUtils.bind(this,function(ja){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=e.update){var N=null!=e.interval?parseInt(e.interval):6E4,G=null,ia=mxUtils.bind(this,function(){var ja=this.currentPage;mxUtils.post(e.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ca){ja===this.currentPage&&(200<=ca.getStatus()&&
-300>=ca.getStatus()?(this.updateDiagram(ca.getText()),ka()):this.handleError({message:mxResources.get("error")+" "+ca.getStatus()}))}),mxUtils.bind(this,function(ca){this.handleError(ca)}))}),ka=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(ia,N)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ka();ia()}));ka();ia()}null!=f&&f()});if(null!=e.url&&0<e.url.length){var C=this.editor.getProxiedUrl(e.url);this.editor.loadUrl(C,mxUtils.bind(this,function(I){y(I)}),
-mxUtils.bind(this,function(I){null!=g&&g(I)}))}else y("")};EditorUi.prototype.updateDiagram=function(e){function f(Y){var Z=new mxCellOverlay(Y.image||y.warningImage,Y.tooltip,Y.align,Y.valign,Y.offset);Z.addListener(mxEvent.CLICK,function(la,q){v.alert(Y.tooltip)});return Z}var g=null,v=this;if(null!=e&&0<e.length&&(g=mxUtils.parseXml(e),e=null!=g?g.documentElement:null,null!=e&&"updates"==e.nodeName)){var y=this.editor.graph,C=y.getModel();C.beginUpdate();var I=null;try{for(e=e.firstChild;null!=
-e;){if("update"==e.nodeName){var D=C.getCell(e.getAttribute("id"));if(null!=D){try{var N=e.getAttribute("value");if(null!=N){var G=mxUtils.parseXml(N).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))C.setValue(D,G);else for(var ia=G.attributes,ka=0;ka<ia.length;ka++)y.setAttributeForCell(D,ia[ka].nodeName,0<ia[ka].nodeValue.length?ia[ka].nodeValue:null)}}catch(Y){null!=window.console&&console.log("Error in value for "+D.id+": "+Y)}try{var ja=e.getAttribute("style");null!=ja&&y.model.setStyle(D,
-ja)}catch(Y){null!=window.console&&console.log("Error in style for "+D.id+": "+Y)}try{var ca=e.getAttribute("icon");if(null!=ca){var pa=0<ca.length?JSON.parse(ca):null;null!=pa&&pa.append||y.removeCellOverlays(D);null!=pa&&y.addCellOverlay(D,f(pa))}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}try{var ra=e.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var L=y.getCellGeometry(D);if(null!=L){L=L.clone();for(key in ra){var V=parseFloat(ra[key]);"dx"==key?L.x+=
-V:"dy"==key?L.y+=V:"dw"==key?L.width+=V:"dh"==key?L.height+=V:L[key]=parseFloat(ra[key])}y.model.setGeometry(D,L)}}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}}}else if("model"==e.nodeName){for(var R=e.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(new mxCodec(e.firstChild)).decode(R,C)}else if("view"==e.nodeName){if(e.hasAttribute("scale")&&(y.view.scale=parseFloat(e.getAttribute("scale"))),e.hasAttribute("dx")||e.hasAttribute("dy"))y.view.translate=
-new mxPoint(parseFloat(e.getAttribute("dx")||0),parseFloat(e.getAttribute("dy")||0))}else"fit"==e.nodeName&&(I=e.hasAttribute("max-scale")?parseFloat(e.getAttribute("max-scale")):1);e=e.nextSibling}}finally{C.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return g};EditorUi.prototype.getCopyFilename=function(e,f){var g=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;e="";var v=g.lastIndexOf(".");0<=v&&(e=g.substring(v),g=g.substring(0,v));if(f){f=g;var y=new Date;
-g=y.getFullYear();v=y.getMonth()+1;var C=y.getDate(),I=y.getHours(),D=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+v+"-"+C+"-"+I+"-"+D+"-"+y))}return g=mxResources.get("copyOf",[g])+e};EditorUi.prototype.fileLoaded=function(e,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var v=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
-var y=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});
-if(null!=e)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(e);e.addListener("descriptorChanged",this.descriptorChangedListener);e.addListener("contentChanged",this.descriptorChangedListener);e.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(e.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();e.isEditable()?e.isModified()?(e.addUnsavedStatus(),
-null!=e.backupPatch&&e.patch([e.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
-v=!0;if(!this.isOffline()&&null!=e.getMode()){var C="1"==urlParams.sketch?"sketch":uiTheme;if(null==C)C="default";else if("sketch"==C||"min"==C)C+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:e.getMode().toUpperCase()+"-OPEN-FILE-"+e.getHash(),action:"size_"+e.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+C})}EditorUi.debug("File.opened",[e]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
-e.getMode()&&e.getMode()!=App.MODE_DEVICE&&null!=e.getMode())try{this.addRecent({id:e.getHash(),title:e.getTitle(),mode:e.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=e)try{e.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=e?e.getHash():"none"),action:"message_"+I.message,label:"stack_"+I.stack})}catch(D){}e=mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?e():this.handleError(I,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else y();return v};EditorUi.prototype.getHashValueForPages=function(e,f){var g=0,v=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<e.length;C++){this.updatePageRoot(e[C]);var I=
-e[C].node.cloneNode(!1);I.removeAttribute("name");v.root=e[C].root;var D=y.encode(v);this.editor.graph.saveViewState(e[C].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");I.appendChild(D);null!=f&&(f.eltCount+=I.getElementsByTagName("*").length,f.nodeCount+=I.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(I,function(N,G,ia,ka){return!ka||"mxGeometry"!=N.nodeName&&"mxPoint"!=N.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ka&&"mxCell"==N.nodeName&&
-"previous"==G?null:ia:Math.round(ia)},f)<<0}return g};EditorUi.prototype.hashValue=function(e,f,g){var v=0;if(null!=e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName&&"function"===typeof e.getAttribute){null!=e.nodeName&&(v^=this.hashValue(e.nodeName,f,g));if(null!=e.attributes){null!=g&&(g.attrCount+=e.attributes.length);for(var y=0;y<e.attributes.length;y++){var C=e.attributes[y].name,I=null!=f?f(e,C,e.attributes[y].value,!0):e.attributes[y].value;null!=I&&(v^=this.hashValue(C,
-f,g)+this.hashValue(I,f,g))}}if(null!=e.childNodes)for(y=0;y<e.childNodes.length;y++)v=(v<<5)-v+this.hashValue(e.childNodes[y],f,g)<<0}else if(null!=e&&"function"!==typeof e){e=String(e);f=0;null!=g&&(g.byteCount+=e.length);for(y=0;y<e.length;y++)f=(f<<5)-f+e.charCodeAt(y)<<0;v^=f}return v};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(e,f,g,v,y,C,I){};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(e){null==e&&(e=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,e,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(e){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(e));f.appendChild(g);
-return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(e){null!=e&&(this.removeLibrarySidebar(e.getHash()),e.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(e.getHash()),".scratchpad"==e.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(e){var f=this.sidebar.palettes[e];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[e]}};EditorUi.prototype.repositionLibrary=function(e){var f=this.sidebar.container;
-if(null==e){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(e=g[g.length-1].nextSibling)}e=null!=e?e:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var v=g.previousSibling;f.insertBefore(g,e);f.insertBefore(v,g)};EditorUi.prototype.loadLibrary=function(e,f){var g=mxUtils.parseXml(e.getData());if("mxlibrary"==g.documentElement.nodeName){var v=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(e,v,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(e){return""};EditorUi.prototype.libraryLoaded=function(e,f,g,v){if(null!=this.sidebar){e.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(e.getHash());".scratchpad"==e.title&&(this.scratchpad=e);var y=this.sidebar.palettes[e.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(e.getHash());var C=null,I=mxUtils.bind(this,function(R,Y){0==R.length&&e.isEditable()?
-(null==C&&(C=document.createElement("div"),C.className="geDropTarget",mxUtils.write(C,mxResources.get("dragElementsHere"))),Y.appendChild(C)):this.addLibraryEntries(R,Y)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=e.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(e.getHash(),g,null!=v?v:!0,mxUtils.bind(this,function(R){I(f,R)}));this.repositionLibrary(y);var N=D.parentNode.previousSibling;v=N.getAttribute("title");
-null!=v&&0<v.length&&".scratchpad"!=e.title&&N.setAttribute("title",this.getLibraryStorageHint(e)+"\n"+v);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";N.style.position="relative";var ia=document.createElement("img");ia.className="geAdaptiveAsset";ia.setAttribute("src",Editor.crossImage);ia.setAttribute("title",mxResources.get("close"));ia.setAttribute("valign","absmiddle");ia.setAttribute("border",
-"0");ia.style.position="relative";ia.style.top="2px";ia.style.width="14px";ia.style.cursor="pointer";ia.style.margin="0 3px";var ka=null;if(".scratchpad"!=e.title||this.closableScratchpad)G.appendChild(ia),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(R){if(!mxEvent.isConsumed(R)){var Y=mxUtils.bind(this,function(){this.closeLibrary(e)});null!=ka?this.confirm(mxResources.get("allChangesLost"),null,Y,mxResources.get("cancel"),mxResources.get("discardChanges")):Y();mxEvent.consume(R)}}));
-if(e.isEditable()){var ja=this.editor.graph,ca=null,pa=mxUtils.bind(this,function(R){this.showLibraryDialog(e.getTitle(),D,f,e,e.getMode());mxEvent.consume(R)}),ra=mxUtils.bind(this,function(R){e.setModified(!0);e.isAutosave()?(null!=ca&&null!=ca.parentNode&&ca.parentNode.removeChild(ca),ca=ia.cloneNode(!1),ca.setAttribute("src",Editor.spinImage),ca.setAttribute("title",mxResources.get("saving")),ca.style.cursor="default",ca.style.marginRight="2px",ca.style.marginTop="-2px",G.insertBefore(ca,G.firstChild),
-N.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(e.getTitle(),f,e,e.getMode(),!0,!0,function(){null!=ca&&null!=ca.parentNode&&(ca.parentNode.removeChild(ca),N.style.paddingRight=18*G.childNodes.length+"px")})):null==ka&&(ka=ia.cloneNode(!1),ka.setAttribute("src",Editor.saveImage),ka.setAttribute("title",mxResources.get("save")),G.insertBefore(ka,G.firstChild),mxEvent.addListener(ka,"click",mxUtils.bind(this,function(Y){this.saveLibrary(e.getTitle(),f,e,e.getMode(),e.constructor==
-LocalLibrary,!0,function(){null==ka||e.isModified()||(N.style.paddingRight=18*G.childNodes.length+"px",ka.parentNode.removeChild(ka),ka=null)});mxEvent.consume(Y)})),N.style.paddingRight=18*G.childNodes.length+"px")}),L=mxUtils.bind(this,function(R,Y,Z,la){R=ja.cloneCells(mxUtils.sortCells(ja.model.getTopmostCells(R)));for(var q=0;q<R.length;q++){var F=ja.getCellGeometry(R[q]);null!=F&&F.translate(-Y.x,-Y.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(R,Y.width,Y.height,la||"",!0,null,
-!1));R={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(R))),w:Y.width,h:Y.height};null!=la&&(R.title=la);f.push(R);ra(Z);null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null)}),V=mxUtils.bind(this,function(R){if(ja.isSelectionEmpty())ja.getRubberband().isActive()?(ja.getRubberband().execute(R),ja.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Y=ja.getSelectionCells(),Z=ja.view.getBounds(Y),
+Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&ca.setAttribute("type",d),1<ca.getElementsByTagName("diagram").length&&null!=this.pages&&ca.setAttribute("pages",this.pages.length));ia=ia?mxUtils.getPrettyXml(ca):mxUtils.getXml(ca);if(!B&&!x&&(I||null!=g&&/(\.html)$/i.test(g.getTitle())))ia=this.getHtml2(mxUtils.getXml(ca),f,null!=g?g.getTitle():null,ja,ka);else if(B||!x&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(v=null),
+ia=this.getEmbeddedSvg(ia,f,v,null,D,N,ka);return ia};EditorUi.prototype.getXmlFileData=function(d,f,g,v){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var x=this.editor.getGraphXml(d,v);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(N){var G=N.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(N)),N=N.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&N.appendChild(mxUtils.parseXml(G).documentElement))):
+null==G||g?N=N.cloneNode(!0):(N=N.cloneNode(!1),mxUtils.setTextContent(N,Graph.compressNode(G)));x.appendChild(N)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(x)),x=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var B=this.pages[f],I=B.node;if(B!=this.currentPage)if(B.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(B.root));this.editor.graph.saveViewState(B.viewState,
+D,null,v);EditorUi.removeChildNodes(I);mxUtils.setTextContent(I,Graph.compressNode(D));delete B.needsUpdate}else v&&(this.updatePageRoot(B),null!=B.viewState.backgroundImage&&(null!=B.viewState.backgroundImage.originalSrc?B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.originalSrc,B):Graph.isPageLink(B.viewState.backgroundImage.src)&&(B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.src,B))),null!=B.viewState.backgroundImage&&
+null!=B.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(B.root)),this.editor.graph.saveViewState(B.viewState,D,null,v),I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(D))));d(I)}return x};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],v=0;v<d.length;v++){var x=d.charAt(v);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?g.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?g.push(String.fromCharCode(65+Math.round(25*
+Math.random()))):x.toUpperCase()!=x?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
+d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(B){d[EditorUi.DIFF_INSERT][f].data=B.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var v in d[EditorUi.DIFF_UPDATE]){var x=d[EditorUi.DIFF_UPDATE][v];null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(f=mxUtils.bind(this,function(B){var I=x.cells[B];if(null!=I){for(var D in I)null!=I[D].value&&(I[D].value="["+I[D].value.length+"]"),null!=I[D].xmlValue&&(I[D].xmlValue="["+I[D].xmlValue.length+"]"),null!=I[D].style&&(I[D].style=
+"["+I[D].style.length+"]"),mxUtils.isEmptyObject(I[D])&&delete I[D];mxUtils.isEmptyObject(I)&&delete x.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete d[EditorUi.DIFF_UPDATE][v]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
+d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
+"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
+f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,v,x,B,I,
+D,N,G,ia){x=null!=x?x:!0;B=null!=B?B:!1;var ka=this.editor.graph;if(f||!d&&null!=N&&/(\.svg)$/i.test(N.getTitle())){var ja=null!=ka.themes&&"darkTheme"==ka.defaultThemeName;G=!1;if(ja||null!=this.pages&&this.currentPage!=this.pages[0]){var ca=ka.getGlobalVariable;ka=this.createTemporaryGraph(ja?ka.getDefaultStylesheet():ka.getStylesheet());ka.setBackgroundImage=this.editor.graph.setBackgroundImage;ka.background=this.editor.graph.background;var pa=this.pages[0];this.currentPage==pa?ka.setBackgroundImage(this.editor.graph.backgroundImage):
+null!=pa.viewState&&null!=pa.viewState&&ka.setBackgroundImage(pa.viewState.backgroundImage);ka.getGlobalVariable=function(ra){return"page"==ra?pa.getName():"pagenumber"==ra?1:ca.apply(this,arguments)};document.body.appendChild(ka.container);ka.model.setRoot(pa.root)}}I=null!=I?I:this.getXmlFileData(x,B,G,ia);N=null!=N?N:this.getCurrentFile();d=this.createFileData(I,ka,N,window.location.href,d,f,g,v,x,D,G);ka!=this.editor.graph&&ka.container.parentNode.removeChild(ka.container);return d};EditorUi.prototype.getHtml=
+function(d,f,g,v,x,B){B=null!=B?B:!0;var I=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=B?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var N=f.view.scale;B=Math.floor(I.x/N-f.view.translate.x);N=Math.floor(I.y/N-f.view.translate.y);I=f.background;null==x&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",B);d.setAttribute("y0",N)}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!=v&&d.setAttribute("edit",v));null!=x&&(x=x.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";v=Graph.compress(d);Graph.decompress(v)!=d&&(v=encodeURIComponent(d));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=g?
+"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+v+"</div>\n</div>\n"+(null==x?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,v,x){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));
+return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==x?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:
+null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var v=0;v<d.length;v++)null==
+d[v].getAttribute("id")&&d[v].setAttribute("id",v),f=new DiagramPage(d[v]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[v+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var x=urlParams["layer-ids"].split(" ");f={};for(v=0;v<x.length;v++)f[x[v]]=!0;var B=this.editor.graph.getModel(),I=B.getChildren(B.root);for(v=0;v<I.length;v++){var D=I[v];B.setVisible(D,f[D.id]||!1)}}catch(N){}};EditorUi.prototype.getBaseFilename=function(d){var f=
+this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
+function(d,f,g,v,x,B,I,D,N,G,ia,ka){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var ja=this.getBaseFilename("remoteSvg"==d?!1:!x),ca=ja+("xml"==d||"pdf"==d&&ia?".drawio":"")+"."+d;if("xml"==d){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,v,x,null,null,null,f);this.saveData(ca,d,pa,"text/xml")}else if("html"==d)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,ja),this.saveData(ca,d,pa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,
+mxResources.get("export"))){if("xmlpng"==d)ca=ja+".png";else if("jpeg"==d)ca=ja+".jpg";else if("remoteSvg"==d){ca=ja+".svg";d="svg";var ra=parseInt(N);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<ra){var L=this.editor.graph,V=L.getGraphBounds();var R=Math.ceil(V.width*D/L.view.scale+2*ra);var Y=Math.ceil(V.height*D/L.view.scale+2*ra)}}this.saveRequest(ca,d,mxUtils.bind(this,function(T,aa){try{var U=this.editor.graph.pageVisible;0==B&&(this.editor.graph.pageVisible=B);var da=this.createDownloadRequest(T,
+d,v,aa,I,x,D,N,G,ia,ka,R,Y);this.editor.graph.pageVisible=U;return da}catch(fa){this.handleError(fa)}}))}else{var Z=null,la=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(ca,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==d){var q=this.editor.graph.background;if(I||q==mxConstants.NONE)q=null;var F=this.editor.graph.getSvg(q,null,null,null,null,v);g&&
+this.editor.graph.addSvgShadow(F);this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();la(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else ca=ja+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();la(T)}),v)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja){var ca=this.editor.graph,pa=ca.getGraphBounds();g=this.getFileData(!0,null,null,
+null,g,0==B?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var ra="",L="";if(pa.width*pa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=ia?L="&from="+ia.from+"&to="+ia.to:0==B&&(L="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(B=0;B<this.pages.length;B++)if(this.pages[B]==this.currentPage){ra="&from="+B;break}B=ca.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!x?
+x||null!=B&&B!=mxConstants.NONE||(B="#ffffff"):B=mxConstants.NONE;x={globalVars:ca.getExportVariables()};N&&(x.grid={size:ca.gridSize,steps:ca.view.gridSteps,color:ca.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+L+"&bg="+(null!=B?B:mxConstants.NONE)+"&base64="+v+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(x))+(null!=I?
+"&scale="+I:"")+(null!=D?"&border="+D:"")+(ka&&isFinite(ka)?"&w="+ka:"")+(ja&&isFinite(ja)?"&h="+ja:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var v=window.location.hash,x=mxUtils.bind(this,function(I){var D=null!=d.data?d.data:"";null!=I&&0<I.length&&(0<D.length&&(D+="\n"),D+=I);I=new LocalFile(this,"csv"!=d.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);
+I.getHash=function(){return v};this.fileLoaded(I);"csv"==d.format&&this.importCsv(D,mxUtils.bind(this,function(ja){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var N=null!=d.interval?parseInt(d.interval):6E4,G=null,ia=mxUtils.bind(this,function(){var ja=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ca){ja===this.currentPage&&(200<=ca.getStatus()&&
+300>=ca.getStatus()?(this.updateDiagram(ca.getText()),ka()):this.handleError({message:mxResources.get("error")+" "+ca.getStatus()}))}),mxUtils.bind(this,function(ca){this.handleError(ca)}))}),ka=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(ia,N)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ka();ia()}));ka();ia()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var B=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(B,mxUtils.bind(this,function(I){x(I)}),
+mxUtils.bind(this,function(I){null!=g&&g(I)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function f(Y){var Z=new mxCellOverlay(Y.image||x.warningImage,Y.tooltip,Y.align,Y.valign,Y.offset);Z.addListener(mxEvent.CLICK,function(la,q){v.alert(Y.tooltip)});return Z}var g=null,v=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,B=x.getModel();B.beginUpdate();var I=null;try{for(d=d.firstChild;null!=
+d;){if("update"==d.nodeName){var D=B.getCell(d.getAttribute("id"));if(null!=D){try{var N=d.getAttribute("value");if(null!=N){var G=mxUtils.parseXml(N).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))B.setValue(D,G);else for(var ia=G.attributes,ka=0;ka<ia.length;ka++)x.setAttributeForCell(D,ia[ka].nodeName,0<ia[ka].nodeValue.length?ia[ka].nodeValue:null)}}catch(Y){null!=window.console&&console.log("Error in value for "+D.id+": "+Y)}try{var ja=d.getAttribute("style");null!=ja&&x.model.setStyle(D,
+ja)}catch(Y){null!=window.console&&console.log("Error in style for "+D.id+": "+Y)}try{var ca=d.getAttribute("icon");if(null!=ca){var pa=0<ca.length?JSON.parse(ca):null;null!=pa&&pa.append||x.removeCellOverlays(D);null!=pa&&x.addCellOverlay(D,f(pa))}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}try{var ra=d.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var L=x.getCellGeometry(D);if(null!=L){L=L.clone();for(key in ra){var V=parseFloat(ra[key]);"dx"==key?L.x+=
+V:"dy"==key?L.y+=V:"dw"==key?L.width+=V:"dh"==key?L.height+=V:L[key]=parseFloat(ra[key])}x.model.setGeometry(D,L)}}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}}}else if("model"==d.nodeName){for(var R=d.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(new mxCodec(d.firstChild)).decode(R,B)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(x.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))x.view.translate=
+new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(I=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{B.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var v=g.lastIndexOf(".");0<=v&&(d=g.substring(v),g=g.substring(0,v));if(f){f=g;var x=new Date;
+g=x.getFullYear();v=x.getMonth()+1;var B=x.getDate(),I=x.getHours(),D=x.getMinutes();x=x.getSeconds();g=f+(" "+(g+"-"+v+"-"+B+"-"+I+"-"+D+"-"+x))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var v=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
+var x=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});
+if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),
+null!=d.backupPatch&&d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
+v=!0;if(!this.isOffline()&&null!=d.getMode()){var B="1"==urlParams.sketch?"sketch":uiTheme;if(null==B)B="default";else if("sketch"==B||"min"==B)B+=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_"+B})}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(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=d)try{d.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+I.message,label:"stack_"+I.stack})}catch(D){}d=mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||x():x()});f?d():this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else x();return v};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,v=new mxGraphModel,x=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var B=0;B<d.length;B++){this.updatePageRoot(d[B]);var I=
+d[B].node.cloneNode(!1);I.removeAttribute("name");v.root=d[B].root;var D=x.encode(v);this.editor.graph.saveViewState(d[B].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");I.appendChild(D);null!=f&&(f.eltCount+=I.getElementsByTagName("*").length,f.nodeCount+=I.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(I,function(N,G,ia,ka){return!ka||"mxGeometry"!=N.nodeName&&"mxPoint"!=N.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ka&&"mxCell"==N.nodeName&&
+"previous"==G?null:ia:Math.round(ia)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var v=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(v^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var x=0;x<d.attributes.length;x++){var B=d.attributes[x].name,I=null!=f?f(d,B,d.attributes[x].value,!0):d.attributes[x].value;null!=I&&(v^=this.hashValue(B,
+f,g)+this.hashValue(I,f,g))}}if(null!=d.childNodes)for(x=0;x<d.childNodes.length;x++)v=(v<<5)-v+this.hashValue(d.childNodes[x],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(x=0;x<d.length;x++)f=(f<<5)-f+d.charCodeAt(x)<<0;v^=f}return v};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,v,x,B,I){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
+return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
+if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var v=g.previousSibling;f.insertBefore(g,d);f.insertBefore(v,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var v=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,v,g.documentElement.getAttribute("title"),
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,v){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var B=null,I=mxUtils.bind(this,function(R,Y){0==R.length&&d.isEditable()?
+(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),Y.appendChild(B)):this.addLibraryEntries(R,Y)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),g,null!=v?v:!0,mxUtils.bind(this,function(R){I(f,R)}));this.repositionLibrary(x);var N=D.parentNode.previousSibling;v=N.getAttribute("title");
+null!=v&&0<v.length&&".scratchpad"!=d.title&&N.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+v);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";N.style.position="relative";var ia=document.createElement("img");ia.className="geAdaptiveAsset";ia.setAttribute("src",Editor.crossImage);ia.setAttribute("title",mxResources.get("close"));ia.setAttribute("valign","absmiddle");ia.setAttribute("border",
+"0");ia.style.position="relative";ia.style.top="2px";ia.style.width="14px";ia.style.cursor="pointer";ia.style.margin="0 3px";var ka=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(ia),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(R){if(!mxEvent.isConsumed(R)){var Y=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=ka?this.confirm(mxResources.get("allChangesLost"),null,Y,mxResources.get("cancel"),mxResources.get("discardChanges")):Y();mxEvent.consume(R)}}));
+if(d.isEditable()){var ja=this.editor.graph,ca=null,pa=mxUtils.bind(this,function(R){this.showLibraryDialog(d.getTitle(),D,f,d,d.getMode());mxEvent.consume(R)}),ra=mxUtils.bind(this,function(R){d.setModified(!0);d.isAutosave()?(null!=ca&&null!=ca.parentNode&&ca.parentNode.removeChild(ca),ca=ia.cloneNode(!1),ca.setAttribute("src",Editor.spinImage),ca.setAttribute("title",mxResources.get("saving")),ca.style.cursor="default",ca.style.marginRight="2px",ca.style.marginTop="-2px",G.insertBefore(ca,G.firstChild),
+N.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=ca&&null!=ca.parentNode&&(ca.parentNode.removeChild(ca),N.style.paddingRight=18*G.childNodes.length+"px")})):null==ka&&(ka=ia.cloneNode(!1),ka.setAttribute("src",Editor.saveImage),ka.setAttribute("title",mxResources.get("save")),G.insertBefore(ka,G.firstChild),mxEvent.addListener(ka,"click",mxUtils.bind(this,function(Y){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==
+LocalLibrary,!0,function(){null==ka||d.isModified()||(N.style.paddingRight=18*G.childNodes.length+"px",ka.parentNode.removeChild(ka),ka=null)});mxEvent.consume(Y)})),N.style.paddingRight=18*G.childNodes.length+"px")}),L=mxUtils.bind(this,function(R,Y,Z,la){R=ja.cloneCells(mxUtils.sortCells(ja.model.getTopmostCells(R)));for(var q=0;q<R.length;q++){var F=ja.getCellGeometry(R[q]);null!=F&&F.translate(-Y.x,-Y.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(R,Y.width,Y.height,la||"",!0,null,
+!1));R={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(R))),w:Y.width,h:Y.height};null!=la&&(R.title=la);f.push(R);ra(Z);null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)}),V=mxUtils.bind(this,function(R){if(ja.isSelectionEmpty())ja.getRubberband().isActive()?(ja.getRubberband().execute(R),ja.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Y=ja.getSelectionCells(),Z=ja.view.getBounds(Y),
la=ja.view.scale;Z.x/=la;Z.y/=la;Z.width/=la;Z.height/=la;Z.x-=ja.view.translate.x;Z.y-=ja.view.translate.y;L(Y,Z)}mxEvent.consume(R)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(R){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler.first&&(ja.graphHandler.suspend(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="#f1f3f4",D.style.cursor="copy",ja.panningManager.stop(),ja.autoScroll=!1,mxEvent.consume(R))}),
mxUtils.bind(this,function(R){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,ja.panningManager.stop(),ja.graphHandler.reset(),ja.isMouseDown=!1,ja.autoScroll=!0,V(R),mxEvent.consume(R))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(R){ja.isMouseDown&&null!=ja.graphHandler.first&&(ja.graphHandler.resume(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="visible"),
D.style.backgroundColor="",D.style.cursor="",ja.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){D.style.backgroundColor="#f1f3f4";R.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();R.stopPropagation();R.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){D.style.cursor="";D.style.backgroundColor="";0<R.dataTransfer.files.length&&this.importFiles(R.dataTransfer.files,0,0,this.maxImageSize,
-mxUtils.bind(this,function(Y,Z,la,q,F,T,aa,U,da){if(null!=Y&&"image/"==Z.substring(0,6))Y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Y),Y=[new mxCell("",new mxGeometry(0,0,F,T),Y)],Y[0].vertex=!0,L(Y,new mxRectangle(0,0,F,T),R,mxEvent.isAltDown(R)?null:aa.substring(0,aa.lastIndexOf(".")).replace(/_/g," ")),null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null);else{var fa=!1,na=mxUtils.bind(this,function(sa,
+mxUtils.bind(this,function(Y,Z,la,q,F,T,aa,U,da){if(null!=Y&&"image/"==Z.substring(0,6))Y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Y),Y=[new mxCell("",new mxGeometry(0,0,F,T),Y)],Y[0].vertex=!0,L(Y,new mxRectangle(0,0,F,T),R,mxEvent.isAltDown(R)?null:aa.substring(0,aa.lastIndexOf(".")).replace(/_/g," ")),null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null);else{var fa=!1,na=mxUtils.bind(this,function(sa,
za){null!=sa&&"application/pdf"==za&&(za=Editor.extractGraphModelFromPdf(sa),null!=za&&0<za.length&&(sa=za));if(null!=sa)if(sa=mxUtils.parseXml(sa),"mxlibrary"==sa.documentElement.nodeName)try{var ua=JSON.parse(mxUtils.getTextContent(sa.documentElement));I(ua,D);f=f.concat(ua);ra(R);this.spinner.stop();fa=!0}catch(ya){}else if("mxfile"==sa.documentElement.nodeName)try{var Ba=sa.documentElement.getElementsByTagName("diagram");for(ua=0;ua<Ba.length;ua++){var oa=this.stringToCells(Editor.getDiagramNodeXml(Ba[ua])),
-Aa=this.editor.graph.getBoundingBoxFromGeometry(oa);L(oa,new mxRectangle(0,0,Aa.width,Aa.height),R)}fa=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null)});null!=da&&null!=aa&&(/(\.v(dx|sdx?))($|\?)/i.test(aa)||/(\.vs(x|sx?))($|\?)/i.test(aa))?this.importVisio(da,function(sa){na(sa,"text/xml")},null,aa):(new XMLHttpRequest).upload&&
+Aa=this.editor.graph.getBoundingBoxFromGeometry(oa);L(oa,new mxRectangle(0,0,Aa.width,Aa.height),R)}fa=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=null)});null!=da&&null!=aa&&(/(\.v(dx|sdx?))($|\?)/i.test(aa)||/(\.vs(x|sx?))($|\?)/i.test(aa))?this.importVisio(da,function(sa){na(sa,"text/xml")},null,aa):(new XMLHttpRequest).upload&&
this.isRemoteFileFormat(Y,aa)&&null!=da?this.isExternalDataComms()?this.parseFile(da,mxUtils.bind(this,function(sa){4==sa.readyState&&(this.spinner.stop(),200<=sa.status&&299>=sa.status?na(sa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==sa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(Y,Z)}}));R.stopPropagation();R.preventDefault()})),
mxEvent.addListener(D,"dragleave",function(R){D.style.cursor="";D.style.backgroundColor="";R.stopPropagation();R.preventDefault()}));ia=ia.cloneNode(!1);ia.setAttribute("src",Editor.editImage);ia.setAttribute("title",mxResources.get("edit"));G.insertBefore(ia,G.firstChild);mxEvent.addListener(ia,"click",pa);mxEvent.addListener(D,"dblclick",function(R){mxEvent.getSource(R)==D&&pa(R)});v=ia.cloneNode(!1);v.setAttribute("src",Editor.plusImage);v.setAttribute("title",mxResources.get("add"));G.insertBefore(v,
-G.firstChild);mxEvent.addListener(v,"click",V);this.isOffline()||".scratchpad"!=e.title||null==EditorUi.scratchpadHelpLink||(v=document.createElement("span"),v.setAttribute("title",mxResources.get("help")),v.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(v,"?"),mxEvent.addGestureListeners(v,mxUtils.bind(this,function(R){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(R)})),G.insertBefore(v,G.firstChild))}N.appendChild(G);N.style.paddingRight=
-18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(e,f){for(var g=0;g<e.length;g++){var v=e[g],y=v.data;if(null!=y){y=this.convertDataUri(y);var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==v.aspect&&(C+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(C+"image="+y,v.w,v.h,"",v.title||"",!1,null,!0))}else null!=v.xml&&(y=this.stringToCells(Graph.decompress(v.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,
-v.w,v.h,v.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(e){return null!=e?e[mxLanguage]||e.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=
+G.firstChild);mxEvent.addListener(v,"click",V);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(v=document.createElement("span"),v.setAttribute("title",mxResources.get("help")),v.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(v,"?"),mxEvent.addGestureListeners(v,mxUtils.bind(this,function(R){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(R)})),G.insertBefore(v,G.firstChild))}N.appendChild(G);N.style.paddingRight=
+18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var v=d[g],x=v.data;if(null!=x){x=this.convertDataUri(x);var B="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==v.aspect&&(B+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(B+"image="+x,v.w,v.h,"",v.title||"",!1,null,!0))}else null!=v.xml&&(x=this.stringToCells(Graph.decompress(v.xml)),0<x.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(x,
+v.w,v.h,v.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);"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",
-targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(e,f,g,v,y,C,I){e=new ImageDialog(this,e,f,g,v,y,C,I);this.showDialog(e.container,Graph.fileSupport?480:360,Graph.fileSupport?
-200:90,!0,!0);e.init()};EditorUi.prototype.showBackgroundImageDialog=function(e,f){e=null!=e?e:mxUtils.bind(this,function(g,v){v||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});e=new BackgroundImageDialog(this,e,f);this.showDialog(e.container,400,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(e,f,g,v,y){e=new LibraryDialog(this,e,f,g,v,y);this.showDialog(e.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&
-"1"!=urlParams.embed&&this.showSplash()}));e.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(e){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var e=this.createDiv("geSidebarContainer geSidebarFooter");e.style.position="absolute";e.style.overflow="hidden";var f=document.createElement("a");
+targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,v,x,B,I){d=new ImageDialog(this,d,f,g,v,x,B,I);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?
+200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,v){v||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,v,x){d=new LibraryDialog(this,d,f,g,v,x);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(B){B&&null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");
f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(v){v.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(v){this.actions.get("shapes").funct();
-mxEvent.consume(v)}));e.appendChild(f);return e};EditorUi.prototype.handleError=function(e,f,g,v,y,C,I){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=null!=e&&null!=e.error?e.error:e;if(null!=e&&("1"==urlParams.test||null!=e.stack)&&null!=e.message)try{I?null!=window.console&&console.error("EditorUi.handleError:",e):EditorUi.logError("Caught: "+(""==e.message&&null!=e.name)?e.name:e.message,e.filename,e.lineNumber,e.columnNumber,e,"INFO")}catch(ca){}if(null!=
-N||null!=f){I=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),ia=null;f=null!=f?f:mxResources.get("error");if(null!=N){null!=N.retry&&(G=mxResources.get("cancel"),ia=function(){D();N.retry()});if(404==N.code||404==N.status||403==N.code){I=403==N.code?null!=N.message?mxUtils.htmlEntities(N.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
-this.drive.user.displayName+", "+this.drive.user.email+")":""));var ka=null!=y?null:null!=C?C:window.location.hash;if(null!=ka&&("#G"==ka.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ka.substring(0,45))&&(null!=e&&null!=e.error&&(null!=e.error.errors&&0<e.error.errors.length&&"fileAccess"==e.error.errors[0].reason||null!=e.error.data&&0<e.error.data.length&&"fileAccess"==e.error.data[0].reason)||404==N.code||404==N.status)){ka="#U"==ka.substring(0,2)?ka.substring(45,ka.lastIndexOf("%26ex")):
-ka.substring(2);this.showError(f,I,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ka);this.handleError(e,f,g,v,y)}),ia,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){V.innerText="";for(var R=0;R<pa.length;R++){var Y=document.createElement("option");mxUtils.write(Y,pa[R].displayName);Y.value=R;V.appendChild(Y);Y=document.createElement("option");Y.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(Y,
+mxEvent.consume(v)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,v,x,B,I){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{I?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(ca){}if(null!=
+N||null!=f){I=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),ia=null;f=null!=f?f:mxResources.get("error");if(null!=N){null!=N.retry&&(G=mxResources.get("cancel"),ia=function(){D();N.retry()});if(404==N.code||404==N.status||403==N.code){I=403==N.code?null!=N.message?mxUtils.htmlEntities(N.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
+this.drive.user.displayName+", "+this.drive.user.email+")":""));var ka=null!=x?null:null!=B?B:window.location.hash;if(null!=ka&&("#G"==ka.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ka.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==N.code||404==N.status)){ka="#U"==ka.substring(0,2)?ka.substring(45,ka.lastIndexOf("%26ex")):
+ka.substring(2);this.showError(f,I,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ka);this.handleError(d,f,g,v,x)}),ia,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){V.innerText="";for(var R=0;R<pa.length;R++){var Y=document.createElement("option");mxUtils.write(Y,pa[R].displayName);Y.value=R;V.appendChild(Y);Y=document.createElement("option");Y.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(Y,
"<"+pa[R].email+">");Y.setAttribute("disabled","disabled");V.appendChild(Y)}Y=document.createElement("option");mxUtils.write(Y,mxResources.get("addAccount"));Y.value=pa.length;V.appendChild(Y)}var pa=this.drive.getUsersList(),ra=document.createElement("div"),L=document.createElement("span");L.style.marginTop="6px";mxUtils.write(L,mxResources.get("changeUser")+": ");ra.appendChild(L);var V=document.createElement("select");V.style.width="200px";ca();mxEvent.addListener(V,"change",mxUtils.bind(this,
function(){var R=V.value,Y=pa.length!=R;Y&&this.drive.setUser(pa[R]);this.drive.authorize(Y,mxUtils.bind(this,function(){Y||(pa=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ra.appendChild(V);ra=new CustomDialog(this,ra,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ra.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=
-N.message?I=""==N.message&&null!=N.name?mxUtils.htmlEntities(N.name):mxUtils.htmlEntities(N.message):null!=N.response&&null!=N.response.error?I=mxUtils.htmlEntities(N.response.error):"undefined"!==typeof window.App&&(N.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout")):N.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof N&&0<N.length&&(I=mxUtils.htmlEntities(N)))}var ja=C=null;null!=N&&null!=N.helpLink?(C=mxResources.get("help"),ja=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(N.helpLink)})):null!=N&&null!=N.ownerEmail&&(C=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+C+": "+N.ownerEmail+")"),ja=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(N.ownerEmail))}));this.showError(f,I,G,g,ia,null,null,C,ja,null,null,null,v?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(e,f,g){e=new ErrorDialog(this,null,e,mxResources.get("ok"),f);this.showDialog(e.container,g||340,100,!0,
-!1);e.init()};EditorUi.prototype.confirm=function(e,f,g,v,y,C){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(e.length/50));e=new ConfirmDialog(this,e,function(){I();null!=f&&f()},function(){I();null!=g&&g()},v,y,null,null,null,null,D);this.showDialog(e.container,340,46+D,!0,C);e.init()};EditorUi.prototype.showBanner=function(e,f,g,v){var y=!1;if(!(this.bannerShowing||this["hideBanner"+e]||isLocalStorage&&null!=mxSettings.settings&&
-null!=mxSettings.settings["close"+e])){var C=document.createElement("div");C.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(C.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(C.style,"transition","all 1s ease");C.className="geBtn gePrimaryBtn";
-y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";C.appendChild(y);y=document.createElement("img");y.setAttribute("src",Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(v?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
-C.appendChild(y);mxUtils.write(C,f);document.body.appendChild(C);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("id","geDoNotShowAgainCheckbox");I.style.marginRight="6px";if(!v){f.appendChild(I);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);
-C.style.paddingBottom="30px";C.appendChild(f)}var N=mxUtils.bind(this,function(){null!=C.parentNode&&(C.parentNode.removeChild(C),this.bannerShowing=!1,I.checked||v)&&(this["hideBanner"+e]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+e]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(ia){mxEvent.consume(ia);N()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){N()}),1E3)});mxEvent.addListener(C,"click",mxUtils.bind(this,function(ia){var ka=mxEvent.getSource(ia);ka!=I&&ka!=D?(null!=g&&g(),N(),mxEvent.consume(ia)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(e){null!=e&&(e.opened=new Date);this.currentFile=e};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
-function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(e,f,g,v){e=e.toDataURL("image/"+g);if(null!=e&&6<e.length)null!=f&&(e=Editor.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f))),0<v&&(e=Editor.writeGraphModelToPng(e,"pHYs","dpi",v));else throw{message:mxResources.get("unknownError")};return e};EditorUi.prototype.saveCanvas=function(e,f,g,v,y){var C="jpeg"==g?"jpg":g;v=this.getBaseFilename(v)+(null!=f?".drawio":"")+"."+C;e=this.createImageDataUri(e,
-f,g,y);this.saveData(v,C,e.substring(e.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(e,f){e=new TextareaDialog(this,e,f,null,null,mxResources.get("close"));this.showDialog(e.container,620,460,
-!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(e,f,g,v,y,C){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)e=v?this.base64ToBlob(e,g):new Blob([e],{type:g}),navigator.msSaveOrOpenBlob(e,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(e,!0):(g.document.write(e),
-g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",e):this.openInNewWindow(e,g,v);else{var I=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(D?parseInt(D[2],10):
-!1)?!1:C}if(C||this.isOffline()){I.href=URL.createObjectURL(v?this.base64ToBlob(e,g):new Blob([e],{type:g}));C?I.download=f:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(N){}}else this.createEchoRequest(e,f,g,v,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(e,f,g,v,y,C){e="xml="+encodeURIComponent(e);return new mxXmlRequest(SAVE_URL,e+(null!=
-g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(v?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(e,f){f=f||"";e=atob(e);for(var g=e.length,v=Math.ceil(g/1024),y=Array(v),C=0;C<v;++C){for(var I=1024*C,D=Math.min(I+1024,g),N=Array(D-I),G=0;I<D;++G,++I)N[G]=e[I].charCodeAt(0);y[C]=new Uint8Array(N)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(e,f,g,v,y,C,I,D){C=null!=C?C:!1;I=null!=I?I:"vsdx"!=
-y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(C);isLocalStorage&&y++;var N=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,ia){try{if("_blank"==ia)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(e,g,v);else if(null!=g&&"text/html"==g.substring(0,9)){var ka=new EmbedDialog(this,e);this.showDialog(ka.container,450,240,!0,!0);ka.init()}else{var ja=window.open("about:blank");null==ja?mxUtils.popup(e,!0):(ja.document.write("<pre>"+mxUtils.htmlEntities(e,
-!1)+"</pre>"),ja.document.close())}else ia==App.MODE_DEVICE||"download"==ia?this.doSaveLocalFile(e,G,g,v,null,D):null!=G&&0<G.length&&this.pickFolder(ia,mxUtils.bind(this,function(ca){try{this.exportFile(e,G,g,v,ia,ca)}catch(pa){this.handleError(pa)}}))}catch(ca){this.handleError(ca)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,C,I,null,1<y,N,e,g,v);C=this.isServices(y)?y>N?390:280:160;this.showDialog(f.container,420,C,!0,!0);f.init()};
-EditorUi.prototype.openInNewWindow=function(e,f,g){var v=window.open("about:blank");null==v||null==v.document?mxUtils.popup(e,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(e=g?e:btoa(unescape(encodeURIComponent(e))),v.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+e+'"/></html>')):v.document.write("<html>"+e+"</html>"):v.document.write("<html><pre>"+mxUtils.htmlEntities(e,!1)+"</pre></html>"),v.document.close())};var l=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(e){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=e(mxUtils.bind(this,function(v){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
+N.message?I=""==N.message&&null!=N.name?mxUtils.htmlEntities(N.name):mxUtils.htmlEntities(N.message):null!=N.response&&null!=N.response.error?I=mxUtils.htmlEntities(N.response.error):"undefined"!==typeof window.App&&(N.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout")):N.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof N&&0<N.length&&(I=mxUtils.htmlEntities(N)))}var ja=B=null;null!=N&&null!=N.helpLink?(B=mxResources.get("help"),ja=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(N.helpLink)})):null!=N&&null!=N.ownerEmail&&(B=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+B+": "+N.ownerEmail+")"),ja=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(N.ownerEmail))}));this.showError(f,I,G,g,ia,null,null,B,ja,null,null,null,v?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,
+!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,v,x,B){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){I();null!=f&&f()},function(){I();null!=g&&g()},v,x,null,null,null,null,D);this.showDialog(d.container,340,46+D,!0,B);d.init()};EditorUi.prototype.showBanner=function(d,f,g,v){var x=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&
+null!=mxSettings.settings["close"+d])){var B=document.createElement("div");B.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(B.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(B.style,"transition","all 1s ease");B.className="geBtn gePrimaryBtn";
+x=document.createElement("img");x.setAttribute("src",IMAGE_PATH+"/logo.png");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";B.appendChild(x);x=document.createElement("img");x.setAttribute("src",Dialog.prototype.closeImage);x.setAttribute("title",mxResources.get(v?"doNotShowAgain":"close"));x.setAttribute("border","0");x.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+B.appendChild(x);mxUtils.write(B,f);document.body.appendChild(B);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("id","geDoNotShowAgainCheckbox");I.style.marginRight="6px";if(!v){f.appendChild(I);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);
+B.style.paddingBottom="30px";B.appendChild(f)}var N=mxUtils.bind(this,function(){null!=B.parentNode&&(B.parentNode.removeChild(B),this.bannerShowing=!1,I.checked||v)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(x,"click",mxUtils.bind(this,function(ia){mxEvent.consume(ia);N()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){N()}),1E3)});mxEvent.addListener(B,"click",mxUtils.bind(this,function(ia){var ka=mxEvent.getSource(ia);ka!=I&&ka!=D?(null!=g&&g(),N(),mxEvent.consume(ia)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);x=!0}return x};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,v){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<v&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",v));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,v,x){var B="jpeg"==g?"jpg":g;v=this.getBaseFilename(v)+(null!=f?".drawio":"")+"."+B;d=this.createImageDataUri(d,
+f,g,x);this.saveData(v,B,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,
+!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,v,x,B){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=B?B:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=v?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),
+g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,v);else{var I=document.createElement("a");B=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);B=65==(D?parseInt(D[2],10):
+!1)?!1:B}if(B||this.isOffline()){I.href=URL.createObjectURL(v?this.base64ToBlob(d,g):new Blob([d],{type:g}));B?I.download=f:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(N){}}else this.createEchoRequest(d,f,g,v,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,v,x,B){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=
+g?"&mime="+g:"")+(null!=x?"&format="+x:"")+(null!=B?"&base64="+B:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(v?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,v=Math.ceil(g/1024),x=Array(v),B=0;B<v;++B){for(var I=1024*B,D=Math.min(I+1024,g),N=Array(D-I),G=0;I<D;++G,++I)N[G]=d[I].charCodeAt(0);x[B]=new Uint8Array(N)}return new Blob(x,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,v,x,B,I,D){B=null!=B?B:!1;I=null!=I?I:"vsdx"!=
+x&&(!mxClient.IS_IOS||!navigator.standalone);x=this.getServiceCount(B);isLocalStorage&&x++;var N=4>=x?2:6<x?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,ia){try{if("_blank"==ia)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,v);else if(null!=g&&"text/html"==g.substring(0,9)){var ka=new EmbedDialog(this,d);this.showDialog(ka.container,450,240,!0,!0);ka.init()}else{var ja=window.open("about:blank");null==ja?mxUtils.popup(d,!0):(ja.document.write("<pre>"+mxUtils.htmlEntities(d,
+!1)+"</pre>"),ja.document.close())}else ia==App.MODE_DEVICE||"download"==ia?this.doSaveLocalFile(d,G,g,v,null,D):null!=G&&0<G.length&&this.pickFolder(ia,mxUtils.bind(this,function(ca){try{this.exportFile(d,G,g,v,ia,ca)}catch(pa){this.handleError(pa)}}))}catch(ca){this.handleError(ca)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,B,I,null,1<x,N,d,g,v);B=this.isServices(x)?x>N?390:280:160;this.showDialog(f.container,420,B,!0,!0);f.init()};
+EditorUi.prototype.openInNewWindow=function(d,f,g){var v=window.open("about:blank");null==v||null==v.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),v.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):v.document.write("<html>"+d+"</html>"):v.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),v.document.close())};var l=EditorUi.prototype.addChromelessToolbarItems;
+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(v){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=
Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;
-mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var y=f.getBoundingClientRect();this.tagsDialog.style.left=y.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=y.zIndex;document.body.appendChild(this.tagsDialog);
+mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var x=f.getBoundingClientRect();this.tagsDialog.style.left=x.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=x.zIndex;document.body.appendChild(this.tagsDialog);
this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(v)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var v=this.editor.graph.getAllTags();f.style.display=0<v.length?"":"none"}))}l.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=
null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,
-"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=e(mxUtils.bind(this,function(v){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&
-(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var C=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
-"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=C.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";C=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=C.zIndex;var I=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,function(v){var x=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",x);null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)x.apply(this);else{this.exportDialog=document.createElement("div");var B=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=B.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";B=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=B.zIndex;var I=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});I.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(D){I.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var N=this.createImageDataUri(D,null,"png");D=document.createElement("img");D.style.maxWidth="140px";D.style.maxHeight="140px";D.style.cursor="pointer";D.style.backgroundColor="white";D.setAttribute("title",mxResources.get("openInNewWindow"));
-D.setAttribute("border","0");D.setAttribute("src",N);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(N.substring(N.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(v)}),
-Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(e,f,g,v,y){this.isLocalFileSave()?this.saveLocalFile(g,e,v,y,f):this.saveRequest(e,f,mxUtils.bind(this,function(C,I){return this.createEchoRequest(g,C,v,y,f,I)}),g,y,v)};EditorUi.prototype.saveRequest=function(e,f,g,v,y,C,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var D=this.getServiceCount(!1);isLocalStorage&&D++;var N=4>=D?2:6<D?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(G,ia){if("_blank"==
-ia||null!=G&&0<G.length){var ka=g("_blank"==ia?null:G,ia==App.MODE_DEVICE||"download"==ia||null==ia||"_blank"==ia?"0":"1");null!=ka&&(ia==App.MODE_DEVICE||"download"==ia||"_blank"==ia?ka.simulate(document,"_blank"):this.pickFolder(ia,mxUtils.bind(this,function(ja){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=v)try{this.exportFile(v,G,C,!0,ia,ja)}catch(ca){this.handleError(ca)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ka.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=ka.getStatus()&&299>=ka.getStatus())try{this.exportFile(ka.getText(),G,C,!0,ia,ja)}catch(ca){this.handleError(ca)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(ca){this.spinner.stop();this.handleError(ca)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,I,null,1<D,N,v,C,y);D=this.isServices(D)?4<D?390:280:160;this.showDialog(e.container,420,D,!0,!0);e.init()};EditorUi.prototype.isServices=
-function(e){return 1!=e};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(e,f,g,v,y,C){};EditorUi.prototype.pickFolder=function(e,f,g){f(null)};EditorUi.prototype.exportSvg=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja,ca){if(this.spinner.spin(document.body,mxResources.get("export")))try{var pa=this.editor.graph.isSelectionEmpty();g=null!=g?g:pa;var ra=f?null:this.editor.graph.background;ra==mxConstants.NONE&&(ra=null);null==ra&&0==f&&(ra=ia?
-this.editor.graph.defaultPageBackgroundColor:"#ffffff");var L=this.editor.graph.getSvg(ra,e,I,D,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ja,ia,ka);v&&this.editor.graph.addSvgShadow(L);var V=this.getBaseFilename()+(y?".drawio":"")+".svg";ca=null!=ca?ca:mxUtils.bind(this,function(Z){this.isLocalFileSave()||Z.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
-function(){mxUtils.popup(Z)}))});var R=mxUtils.bind(this,function(Z){this.spinner.stop();y&&Z.setAttribute("content",this.getFileData(!0,null,null,null,g,N,null,null,null,!1));ca(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))});this.editor.graph.mathEnabled&&this.editor.addMathCss(L);var Y=mxUtils.bind(this,function(Z){C?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Z,R,this.thumbImageCache)):R(Z)});ja?this.embedFonts(L,
-Y):(this.editor.addFontCss(L),Y(L))}catch(Z){this.handleError(Z)}};EditorUi.prototype.addRadiobox=function(e,f,g,v,y,C,I){return this.addCheckbox(e,g,v,y,C,I,!0,f)};EditorUi.prototype.addCheckbox=function(e,f,g,v,y,C,I,D){C=null!=C?C:!0;var N=document.createElement("input");N.style.marginRight="8px";N.style.marginTop="16px";N.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();N.id=I;null!=D&&N.setAttribute("name",D);g&&(N.setAttribute("checked","checked"),N.defaultChecked=!0);
-v&&N.setAttribute("disabled","disabled");C&&(e.appendChild(N),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",I),e.appendChild(g),y||mxUtils.br(e));return N};EditorUi.prototype.addEditButton=function(e,f){var g=this.addCheckbox(e,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var v=this.getCurrentFile(),y="";null!=v&&v.getMode()!=App.MODE_DEVICE&&v.getMode()!=App.MODE_BROWSER&&(y=window.location.href);var C=document.createElement("select");C.style.maxWidth=
-"200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("makeCopy"));C.appendChild(v);v=document.createElement("option");v.setAttribute("value","custom");mxUtils.write(v,mxResources.get("custom")+"...");C.appendChild(v);e.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==C.value){var I=new FilenameDialog(this,y,mxResources.get("ok"),
-function(D){null!=D?y=D:C.value="blank"},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(e);return{getLink:function(){return g.checked?"blank"===C.value?"_blank":y:null},getEditInput:function(){return g},getEditSelect:function(){return C}}};EditorUi.prototype.addLinkSection=
-function(e,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=C&&C!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=C):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(D)}mxUtils.write(e,mxResources.get("links")+":");var v=document.createElement("select");v.style.width=
-"100px";v.style.padding="0px";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));v.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));v.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y,mxResources.get("openInThisWindow"));v.appendChild(y);
-f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),v.appendChild(f));e.appendChild(v);mxUtils.write(e,mxResources.get("borderColor")+":");var C="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(C||"none",function(N){C=N;g()});mxEvent.consume(D)}));g();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width=
-"22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";e.appendChild(I);mxUtils.br(e);return{getColor:function(){return C},getTarget:function(){return v.value},focus:function(){v.focus()}}};EditorUi.prototype.createUrlParameters=function(e,f,g,v,y,C,I){I=null!=I?I:[];v&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||I.push("lightbox=1"),"auto"!=e&&I.push("target="+e),null!=f&&f!=mxConstants.NONE&&
-I.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&I.push("edit="+encodeURIComponent(y)),C&&I.push("layers=1"),this.editor.graph.foldingEnabled&&I.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&I.push("page-id="+this.currentPage.getId());return I};EditorUi.prototype.createLink=function(e,f,g,v,y,C,I,D,N,G){N=this.createUrlParameters(e,f,g,v,y,C,N);e=this.getCurrentFile();f=!0;null!=I?g="#U"+encodeURIComponent(I):(e=this.getCurrentFile(),
-D||null==e||e.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+e.getHash(),f=!1));f&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&N.push("title="+encodeURIComponent(e.getTitle()));G&&1<g.length&&(N.push("open="+g.substring(1)),g="");return(v&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<N.length?"?"+N.join("&"):"")+g};EditorUi.prototype.createHtml=function(e,f,g,v,y,C,I,D,N,G,ia,ka){this.getBasenames();var ja={};""!=y&&y!=mxConstants.NONE&&(ja.highlight=y);"auto"!==v&&(ja.target=v);G||(ja.lightbox=!1);ja.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(ja.zoom=g/100);g=[];I&&(g.push("pages"),ja.resize=!0,null!=this.pages&&null!=this.currentPage&&(ja.page=mxUtils.indexOf(this.pages,this.currentPage)));
-f&&(g.push("zoom"),ja.resize=!0);D&&g.push("layers");N&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ja.toolbar=g.join(" "));null!=ia&&0<ia.length&&(ja.edit=ia);null!=e?ja.url=e:ja.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ja))+'"></div>';e=null!=e?"&fetch="+encodeURIComponent(e):"";ka(f,'<script type="text/javascript" src="'+(0<e.length?
-("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+e:"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(e,f,g,v){var y=document.createElement("div");y.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-y.appendChild(C);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");C=D.cloneNode(!0);C.setAttribute("value","copy");I.appendChild(C);var N=document.createElement("span");mxUtils.write(N,mxResources.get("includeCopyOfMyDiagram"));
+D.setAttribute("border","0");D.setAttribute("src",N);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(N.substring(N.indexOf(",")+1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",x);document.body.appendChild(this.exportDialog)}mxEvent.consume(v)}),
+Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,v,x){this.isLocalFileSave()?this.saveLocalFile(g,d,v,x,f):this.saveRequest(d,f,mxUtils.bind(this,function(B,I){return this.createEchoRequest(g,B,v,x,f,I)}),g,x,v)};EditorUi.prototype.saveRequest=function(d,f,g,v,x,B,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var D=this.getServiceCount(!1);isLocalStorage&&D++;var N=4>=D?2:6<D?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,ia){if("_blank"==
+ia||null!=G&&0<G.length){var ka=g("_blank"==ia?null:G,ia==App.MODE_DEVICE||"download"==ia||null==ia||"_blank"==ia?"0":"1");null!=ka&&(ia==App.MODE_DEVICE||"download"==ia||"_blank"==ia?ka.simulate(document,"_blank"):this.pickFolder(ia,mxUtils.bind(this,function(ja){B=null!=B?B:"pdf"==f?"application/pdf":"image/"+f;if(null!=v)try{this.exportFile(v,G,B,!0,ia,ja)}catch(ca){this.handleError(ca)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ka.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=ka.getStatus()&&299>=ka.getStatus())try{this.exportFile(ka.getText(),G,B,!0,ia,ja)}catch(ca){this.handleError(ca)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(ca){this.spinner.stop();this.handleError(ca)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,I,null,1<D,N,v,B,x);D=this.isServices(D)?4<D?390:280:160;this.showDialog(d.container,420,D,!0,!0);d.init()};EditorUi.prototype.isServices=
+function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,v,x,B){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja,ca){if(this.spinner.spin(document.body,mxResources.get("export")))try{var pa=this.editor.graph.isSelectionEmpty();g=null!=g?g:pa;var ra=f?null:this.editor.graph.background;ra==mxConstants.NONE&&(ra=null);null==ra&&0==f&&(ra=ia?
+this.editor.graph.defaultPageBackgroundColor:"#ffffff");var L=this.editor.graph.getSvg(ra,d,I,D,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ja,ia,ka);v&&this.editor.graph.addSvgShadow(L);var V=this.getBaseFilename()+(x?".drawio":"")+".svg";ca=null!=ca?ca:mxUtils.bind(this,function(Z){this.isLocalFileSave()||Z.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
+function(){mxUtils.popup(Z)}))});var R=mxUtils.bind(this,function(Z){this.spinner.stop();x&&Z.setAttribute("content",this.getFileData(!0,null,null,null,g,N,null,null,null,!1));ca(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))});this.editor.graph.mathEnabled&&this.editor.addMathCss(L);var Y=mxUtils.bind(this,function(Z){B?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Z,R,this.thumbImageCache)):R(Z)});ja?this.embedFonts(L,
+Y):(this.editor.addFontCss(L),Y(L))}catch(Z){this.handleError(Z)}};EditorUi.prototype.addRadiobox=function(d,f,g,v,x,B,I){return this.addCheckbox(d,g,v,x,B,I,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,v,x,B,I,D){B=null!=B?B:!0;var N=document.createElement("input");N.style.marginRight="8px";N.style.marginTop="16px";N.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();N.id=I;null!=D&&N.setAttribute("name",D);g&&(N.setAttribute("checked","checked"),N.defaultChecked=!0);
+v&&N.setAttribute("disabled","disabled");B&&(d.appendChild(N),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",I),d.appendChild(g),x||mxUtils.br(d));return N};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var v=this.getCurrentFile(),x="";null!=v&&v.getMode()!=App.MODE_DEVICE&&v.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var B=document.createElement("select");B.style.maxWidth=
+"200px";B.style.width="auto";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("makeCopy"));B.appendChild(v);v=document.createElement("option");v.setAttribute("value","custom");mxUtils.write(v,mxResources.get("custom")+"...");B.appendChild(v);d.appendChild(B);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){if("custom"==B.value){var I=new FilenameDialog(this,x,mxResources.get("ok"),
+function(D){null!=D?x=D:B.value="blank"},mxResources.get("url"),null,null,null,null,function(){B.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===B.value?"_blank":x:null},getEditInput:function(){return g},getEditSelect:function(){return B}}};EditorUi.prototype.addLinkSection=
+function(d,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=B&&B!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=B):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(D)}mxUtils.write(d,mxResources.get("links")+":");var v=document.createElement("select");v.style.width=
+"100px";v.style.padding="0px";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";var x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));v.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));v.appendChild(x);x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));v.appendChild(x);
+f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),v.appendChild(f));d.appendChild(v);mxUtils.write(d,mxResources.get("borderColor")+":");var B="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(B||"none",function(N){B=N;g()});mxEvent.consume(D)}));g();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width=
+"22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";d.appendChild(I);mxUtils.br(d);return{getColor:function(){return B},getTarget:function(){return v.value},focus:function(){v.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,v,x,B,I){I=null!=I?I:[];v&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||I.push("lightbox=1"),"auto"!=d&&I.push("target="+d),null!=f&&f!=mxConstants.NONE&&
+I.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=x&&0<x.length&&I.push("edit="+encodeURIComponent(x)),B&&I.push("layers=1"),this.editor.graph.foldingEnabled&&I.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&I.push("page-id="+this.currentPage.getId());return I};EditorUi.prototype.createLink=function(d,f,g,v,x,B,I,D,N,G){N=this.createUrlParameters(d,f,g,v,x,B,N);d=this.getCurrentFile();f=!0;null!=I?g="#U"+encodeURIComponent(I):(d=this.getCurrentFile(),
+D||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&N.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(N.push("open="+g.substring(1)),g="");return(v&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<N.length?"?"+N.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,v,x,B,I,D,N,G,ia,ka){this.getBasenames();var ja={};""!=x&&x!=mxConstants.NONE&&(ja.highlight=x);"auto"!==v&&(ja.target=v);G||(ja.lightbox=!1);ja.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(ja.zoom=g/100);g=[];I&&(g.push("pages"),ja.resize=!0,null!=this.pages&&null!=this.currentPage&&(ja.page=mxUtils.indexOf(this.pages,this.currentPage)));
+f&&(g.push("zoom"),ja.resize=!0);D&&g.push("layers");N&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ja.toolbar=g.join(" "));null!=ia&&0<ia.length&&(ja.edit=ia);null!=d?ja.url=d:ja.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(B?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ja))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";ka(f,'<script type="text/javascript" src="'+(0<d.length?
+("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,v){var x=document.createElement("div");x.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("html"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+x.appendChild(B);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");B=D.cloneNode(!0);B.setAttribute("value","copy");I.appendChild(B);var N=document.createElement("span");mxUtils.write(N,mxResources.get("includeCopyOfMyDiagram"));
I.appendChild(N);mxUtils.br(I);I.appendChild(D);N=document.createElement("span");mxUtils.write(N,mxResources.get("publicDiagramUrl"));I.appendChild(N);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(N=document.createElement("a"),N.style.paddingLeft="12px",N.style.color="gray",N.style.cursor="pointer",mxUtils.write(N,mxResources.get("share")),I.appendChild(N),mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));
-C.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");y.appendChild(I);var ia=this.addLinkSection(y),ka=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var ja=document.createElement("input");ja.setAttribute("type","text");ja.style.marginRight="16px";ja.style.width="60px";ja.style.marginLeft="4px";ja.style.marginRight="12px";ja.value="100%";y.appendChild(ja);var ca=this.addCheckbox(y,mxResources.get("fit"),!0);I=null!=this.pages&&1<this.pages.length;
-var pa=pa=this.addCheckbox(y,mxResources.get("allPages"),I,!I),ra=this.addCheckbox(y,mxResources.get("layers"),!0),L=this.addCheckbox(y,mxResources.get("tags"),!0),V=this.addCheckbox(y,mxResources.get("lightbox"),!0),R=null;I=380;if(EditorUi.enableHtmlEditOption){R=this.addEditButton(y,V);var Y=R.getEditInput();Y.style.marginBottom="16px";I+=50;mxEvent.addListener(V,"change",function(){V.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled");Y.checked&&V.checked?R.getEditSelect().removeAttribute("disabled"):
-R.getEditSelect().setAttribute("disabled","disabled")})}e=new CustomDialog(this,y,mxUtils.bind(this,function(){v(D.checked?g:null,ka.checked,ja.value,ia.getTarget(),ia.getColor(),ca.checked,pa.checked,ra.checked,L.checked,V.checked,null!=R?R.getLink():null)}),null,e,f);this.showDialog(e.container,340,I,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(e,f,g,v,y,C,I,D){var N=document.createElement("div");N.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,
-e||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";N.appendChild(G);var ia=this.getCurrentFile();e=0;if(null==ia||ia.constructor!=window.DriveFile||f)I=null!=I?I:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{e=80;I=null!=I?I:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+B.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");x.appendChild(I);var ia=this.addLinkSection(x),ka=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var ja=document.createElement("input");ja.setAttribute("type","text");ja.style.marginRight="16px";ja.style.width="60px";ja.style.marginLeft="4px";ja.style.marginRight="12px";ja.value="100%";x.appendChild(ja);var ca=this.addCheckbox(x,mxResources.get("fit"),!0);I=null!=this.pages&&1<this.pages.length;
+var pa=pa=this.addCheckbox(x,mxResources.get("allPages"),I,!I),ra=this.addCheckbox(x,mxResources.get("layers"),!0),L=this.addCheckbox(x,mxResources.get("tags"),!0),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),R=null;I=380;if(EditorUi.enableHtmlEditOption){R=this.addEditButton(x,V);var Y=R.getEditInput();Y.style.marginBottom="16px";I+=50;mxEvent.addListener(V,"change",function(){V.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled");Y.checked&&V.checked?R.getEditSelect().removeAttribute("disabled"):
+R.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,x,mxUtils.bind(this,function(){v(D.checked?g:null,ka.checked,ja.value,ia.getTarget(),ia.getColor(),ca.checked,pa.checked,ra.checked,L.checked,V.checked,null!=R?R.getLink():null)}),null,d,f);this.showDialog(d.container,340,I,!0,!0);B.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,v,x,B,I,D){var N=document.createElement("div");N.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,
+d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";N.appendChild(G);var ia=this.getCurrentFile();d=0;if(null==ia||ia.constructor!=window.DriveFile||f)I=null!=I?I:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;I=null!=I?I:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
var ka=document.createElement("div");ka.style.whiteSpace="normal";mxUtils.write(ka,mxResources.get("linkAccountRequired"));G.appendChild(ka);ka=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(ia.getId())}));ka.style.marginTop="12px";ka.className="geBtn";G.appendChild(ka);N.appendChild(G);ka=document.createElement("a");ka.style.paddingLeft="12px";ka.style.color="gray";ka.style.fontSize="11px";ka.style.cursor="pointer";mxUtils.write(ka,mxResources.get("check"));
-G.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(la){this.spinner.stop();la=new ErrorDialog(this,null,mxResources.get(null!=la?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(la.container,300,80,!0,!1);la.init()}))}))}var ja=null,ca=null;if(null!=g||null!=v)e+=30,mxUtils.write(N,mxResources.get("width")+":"),ja=
-document.createElement("input"),ja.setAttribute("type","text"),ja.style.marginRight="16px",ja.style.width="50px",ja.style.marginLeft="6px",ja.style.marginRight="16px",ja.style.marginBottom="10px",ja.value="100%",N.appendChild(ja),mxUtils.write(N,mxResources.get("height")+":"),ca=document.createElement("input"),ca.setAttribute("type","text"),ca.style.width="50px",ca.style.marginLeft="6px",ca.style.marginBottom="10px",ca.value=v+"px",N.appendChild(ca),mxUtils.br(N);var pa=this.addLinkSection(N,C);g=
-null!=this.pages&&1<this.pages.length;var ra=null;if(null==ia||ia.constructor!=window.DriveFile||f)ra=this.addCheckbox(N,mxResources.get("allPages"),g,!g);var L=this.addCheckbox(N,mxResources.get("lightbox"),!0,null,null,!C),V=this.addEditButton(N,L),R=V.getEditInput();C&&(R.style.marginLeft=L.style.marginLeft,L.style.display="none",e-=20);var Y=this.addCheckbox(N,mxResources.get("layers"),!0);Y.style.marginLeft=R.style.marginLeft;Y.style.marginTop="8px";var Z=this.addCheckbox(N,mxResources.get("tags"),
-!0);Z.style.marginLeft=R.style.marginLeft;Z.style.marginBottom="16px";Z.style.marginTop="16px";mxEvent.addListener(L,"change",function(){L.checked?(Y.removeAttribute("disabled"),R.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"));R.checked&&L.checked?V.getEditSelect().removeAttribute("disabled"):V.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,N,mxUtils.bind(this,function(){y(pa.getTarget(),pa.getColor(),null==
-ra?!0:ra.checked,L.checked,V.getLink(),Y.checked,null!=ja?ja.value:null,null!=ca?ca.value:null,Z.checked)}),null,mxResources.get("create"),I,D);this.showDialog(f.container,340,300+e,!0,!0);null!=ja?(ja.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)):pa.focus()};EditorUi.prototype.showRemoteExportDialog=function(e,f,g,v,y){var C=document.createElement("div");C.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,
-mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";C.appendChild(I);if(y){mxUtils.write(C,mxResources.get("zoom")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=this.lastExportZoom||"100%";C.appendChild(D);mxUtils.write(C,mxResources.get("borderWidth")+":");var N=document.createElement("input");N.setAttribute("type",
-"text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.value=this.lastExportBorder||"0";C.appendChild(N);mxUtils.br(C)}var G=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ia=v?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ka=v?null:this.addCheckbox(C,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=ka&&
-(ka.style.marginBottom="16px");e=new CustomDialog(this,C,mxUtils.bind(this,function(){var ja=parseInt(D.value)/100||1,ca=parseInt(N.value)||0;g(!G.checked,null!=ia?ia.checked:!1,null!=ka?ka.checked:!1,ja,ca)}),null,e,f);this.showDialog(e.container,300,(y?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(e,f,g,v,y,C,I,D,N){I=null!=I?I:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var ia=this.editor.graph,ka="jpeg"==D?220:300,ja=document.createElement("h3");
-mxUtils.write(ja,e);ja.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ja);mxUtils.write(G,mxResources.get("zoom")+":");var ca=document.createElement("input");ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value=this.lastExportZoom||"100%";G.appendChild(ca);mxUtils.write(G,mxResources.get("borderWidth")+":");var pa=document.createElement("input");pa.setAttribute("type",
+G.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(la){this.spinner.stop();la=new ErrorDialog(this,null,mxResources.get(null!=la?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(la.container,300,80,!0,!1);la.init()}))}))}var ja=null,ca=null;if(null!=g||null!=v)d+=30,mxUtils.write(N,mxResources.get("width")+":"),ja=
+document.createElement("input"),ja.setAttribute("type","text"),ja.style.marginRight="16px",ja.style.width="50px",ja.style.marginLeft="6px",ja.style.marginRight="16px",ja.style.marginBottom="10px",ja.value="100%",N.appendChild(ja),mxUtils.write(N,mxResources.get("height")+":"),ca=document.createElement("input"),ca.setAttribute("type","text"),ca.style.width="50px",ca.style.marginLeft="6px",ca.style.marginBottom="10px",ca.value=v+"px",N.appendChild(ca),mxUtils.br(N);var pa=this.addLinkSection(N,B);g=
+null!=this.pages&&1<this.pages.length;var ra=null;if(null==ia||ia.constructor!=window.DriveFile||f)ra=this.addCheckbox(N,mxResources.get("allPages"),g,!g);var L=this.addCheckbox(N,mxResources.get("lightbox"),!0,null,null,!B),V=this.addEditButton(N,L),R=V.getEditInput();B&&(R.style.marginLeft=L.style.marginLeft,L.style.display="none",d-=20);var Y=this.addCheckbox(N,mxResources.get("layers"),!0);Y.style.marginLeft=R.style.marginLeft;Y.style.marginTop="8px";var Z=this.addCheckbox(N,mxResources.get("tags"),
+!0);Z.style.marginLeft=R.style.marginLeft;Z.style.marginBottom="16px";Z.style.marginTop="16px";mxEvent.addListener(L,"change",function(){L.checked?(Y.removeAttribute("disabled"),R.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"));R.checked&&L.checked?V.getEditSelect().removeAttribute("disabled"):V.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,N,mxUtils.bind(this,function(){x(pa.getTarget(),pa.getColor(),null==
+ra?!0:ra.checked,L.checked,V.getLink(),Y.checked,null!=ja?ja.value:null,null!=ca?ca.value:null,Z.checked)}),null,mxResources.get("create"),I,D);this.showDialog(f.container,340,300+d,!0,!0);null!=ja?(ja.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)):pa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,v,x){var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,
+mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(x?"10":"4")+"px";B.appendChild(I);if(x){mxUtils.write(B,mxResources.get("zoom")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=this.lastExportZoom||"100%";B.appendChild(D);mxUtils.write(B,mxResources.get("borderWidth")+":");var N=document.createElement("input");N.setAttribute("type",
+"text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.value=this.lastExportBorder||"0";B.appendChild(N);mxUtils.br(B)}var G=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ia=v?null:this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ka=v?null:this.addCheckbox(B,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=ka&&
+(ka.style.marginBottom="16px");d=new CustomDialog(this,B,mxUtils.bind(this,function(){var ja=parseInt(D.value)/100||1,ca=parseInt(N.value)||0;g(!G.checked,null!=ia?ia.checked:!1,null!=ka?ka.checked:!1,ja,ca)}),null,d,f);this.showDialog(d.container,300,(x?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,v,x,B,I,D,N){I=null!=I?I:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var ia=this.editor.graph,ka="jpeg"==D?220:300,ja=document.createElement("h3");
+mxUtils.write(ja,d);ja.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ja);mxUtils.write(G,mxResources.get("zoom")+":");var ca=document.createElement("input");ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value=this.lastExportZoom||"100%";G.appendChild(ca);mxUtils.write(G,mxResources.get("borderWidth")+":");var pa=document.createElement("input");pa.setAttribute("type",
"text");pa.style.marginRight="16px";pa.style.width="60px";pa.style.marginLeft="4px";pa.value=this.lastExportBorder||"0";G.appendChild(pa);mxUtils.br(G);var ra=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,ia.isSelectionEmpty()),L=document.createElement("input");L.style.marginTop="16px";L.style.marginRight="8px";L.style.marginLeft="24px";L.setAttribute("disabled","disabled");L.setAttribute("type","checkbox");var V=document.createElement("select");V.style.marginTop="16px";V.style.marginLeft=
-"8px";e=["selectionOnly","diagram","page"];var R={};for(ja=0;ja<e.length;ja++)if(!ia.isSelectionEmpty()||"selectionOnly"!=e[ja]){var Y=document.createElement("option");mxUtils.write(Y,mxResources.get(e[ja]));Y.setAttribute("value",e[ja]);V.appendChild(Y);R[e[ja]]=Y}N?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(V),mxUtils.br(G),ka+=26,mxEvent.addListener(V,"change",function(){"selectionOnly"==V.value&&(ra.checked=!0)})):C&&(G.appendChild(L),mxUtils.write(G,mxResources.get("crop")),
+"8px";d=["selectionOnly","diagram","page"];var R={};for(ja=0;ja<d.length;ja++)if(!ia.isSelectionEmpty()||"selectionOnly"!=d[ja]){var Y=document.createElement("option");mxUtils.write(Y,mxResources.get(d[ja]));Y.setAttribute("value",d[ja]);V.appendChild(Y);R[d[ja]]=Y}N?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(V),mxUtils.br(G),ka+=26,mxEvent.addListener(V,"change",function(){"selectionOnly"==V.value&&(ra.checked=!0)})):B&&(G.appendChild(L),mxUtils.write(G,mxResources.get("crop")),
mxUtils.br(G),ka+=30,mxEvent.addListener(ra,"change",function(){ra.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")}));ia.isSelectionEmpty()?N&&(ra.style.display="none",ra.nextSibling.style.display="none",ra.nextSibling.nextSibling.style.display="none",ka-=30):(V.value="diagram",L.setAttribute("checked","checked"),L.defaultChecked=!0,mxEvent.addListener(ra,"change",function(){V.value=ra.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(G,mxResources.get("transparentBackground"),
!1,null,null,"jpeg"!=D),la=null;Editor.isDarkMode()&&(la=this.addCheckbox(G,mxResources.get("dark"),!0),ka+=26);var q=this.addCheckbox(G,mxResources.get("shadow"),ia.shadowVisible),F=null;if("png"==D||"jpeg"==D)F=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ka+=30;var T=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),I,null,null,"jpeg"!=D);T.style.marginBottom="16px";var aa=document.createElement("input");aa.style.marginBottom="16px";aa.style.marginRight=
-"8px";aa.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||aa.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";U.className="geBtn";C=document.createElement("option");C.setAttribute("value","none");mxUtils.write(C,mxResources.get("noChange"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","embedFonts");mxUtils.write(C,
-mxResources.get("embedFonts"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","lblToSvg");mxUtils.write(C,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(C);mxEvent.addListener(U,"change",mxUtils.bind(this,function(){"lblToSvg"==U.value?(aa.checked=!0,aa.setAttribute("disabled","disabled"),R.page.style.display="none","page"==V.value&&(V.value="diagram"),q.checked=!1,q.setAttribute("disabled","disabled"),fa.style.display="inline-block",
+"8px";aa.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||aa.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";U.className="geBtn";B=document.createElement("option");B.setAttribute("value","none");mxUtils.write(B,mxResources.get("noChange"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","embedFonts");mxUtils.write(B,
+mxResources.get("embedFonts"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","lblToSvg");mxUtils.write(B,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(B);mxEvent.addListener(U,"change",mxUtils.bind(this,function(){"lblToSvg"==U.value?(aa.checked=!0,aa.setAttribute("disabled","disabled"),R.page.style.display="none","page"==V.value&&(V.value="diagram"),q.checked=!1,q.setAttribute("disabled","disabled"),fa.style.display="inline-block",
da.style.display="none"):"disabled"==aa.getAttribute("disabled")&&(aa.checked=!1,aa.removeAttribute("disabled"),q.removeAttribute("disabled"),R.page.style.display="",fa.style.display="none",da.style.display="")}));f&&(G.appendChild(aa),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(U),mxUtils.br(G),ka+=60);var da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginRight=
"10px";da.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));da.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));da.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));da.appendChild(f);var fa=document.createElement("div");mxUtils.write(fa,mxResources.get("LinksLost"));
-fa.style.margin="7px";fa.style.display="none";"svg"==D&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(da),G.appendChild(fa),mxUtils.br(G),mxUtils.br(G),ka+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=ca.value;y(ca.value,Z.checked,!ra.checked,q.checked,T.checked,aa.checked,pa.value,L.checked,!1,da.value,null!=F?F.checked:null,null!=la?la.checked:null,V.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,g,v);this.showDialog(g.container,
-340,ka,!0,!0,null,null,null,null,!0);ca.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(e,f,g,v,y){var C=document.createElement("div");C.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(D)}var N=this.addCheckbox(C,mxResources.get("fit"),
-!0),G=this.addCheckbox(C,mxResources.get("shadow"),I.shadowVisible&&v,!v),ia=this.addCheckbox(C,g),ka=this.addCheckbox(C,mxResources.get("lightbox"),!0),ja=this.addEditButton(C,ka),ca=ja.getEditInput(),pa=1<I.model.getChildCount(I.model.getRoot()),ra=this.addCheckbox(C,mxResources.get("layers"),pa,!pa);ra.style.marginLeft=ca.style.marginLeft;ra.style.marginBottom="12px";ra.style.marginTop="8px";mxEvent.addListener(ka,"change",function(){ka.checked?(pa&&ra.removeAttribute("disabled"),ca.removeAttribute("disabled")):
-(ra.setAttribute("disabled","disabled"),ca.setAttribute("disabled","disabled"));ca.checked&&ka.checked?ja.getEditSelect().removeAttribute("disabled"):ja.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){e(N.checked,G.checked,ia.checked,ka.checked,ja.getLink(),ra.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(e,f,g,v,y,C,I,D){function N(ca){var pa=" ",ra=
-"";v&&(pa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=ia?"&page="+ia:"")+(y?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");e&&(ra+="max-width:100%;");var L=
+fa.style.margin="7px";fa.style.display="none";"svg"==D&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(da),G.appendChild(fa),mxUtils.br(G),mxUtils.br(G),ka+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=ca.value;x(ca.value,Z.checked,!ra.checked,q.checked,T.checked,aa.checked,pa.value,L.checked,!1,da.value,null!=F?F.checked:null,null!=la?la.checked:null,V.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,g,v);this.showDialog(g.container,
+340,ka,!0,!0,null,null,null,null,!0);ca.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,v,x){var B=document.createElement("div");B.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";B.appendChild(D)}var N=this.addCheckbox(B,mxResources.get("fit"),
+!0),G=this.addCheckbox(B,mxResources.get("shadow"),I.shadowVisible&&v,!v),ia=this.addCheckbox(B,g),ka=this.addCheckbox(B,mxResources.get("lightbox"),!0),ja=this.addEditButton(B,ka),ca=ja.getEditInput(),pa=1<I.model.getChildCount(I.model.getRoot()),ra=this.addCheckbox(B,mxResources.get("layers"),pa,!pa);ra.style.marginLeft=ca.style.marginLeft;ra.style.marginBottom="12px";ra.style.marginTop="8px";mxEvent.addListener(ka,"change",function(){ka.checked?(pa&&ra.removeAttribute("disabled"),ca.removeAttribute("disabled")):
+(ra.setAttribute("disabled","disabled"),ca.setAttribute("disabled","disabled"));ca.checked&&ka.checked?ja.getEditSelect().removeAttribute("disabled"):ja.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,B,mxUtils.bind(this,function(){d(N.checked,G.checked,ia.checked,ka.checked,ja.getLink(),ra.checked)}),null,mxResources.get("embed"),x);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,v,x,B,I,D){function N(ca){var pa=" ",ra=
+"";v&&(pa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=ia?"&page="+ia:"")+(x?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");d&&(ra+="max-width:100%;");var L=
"";g&&(L=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');I('<img src="'+ca+'"'+L+(""!=ra?' style="'+ra+'"':"")+pa+"/>")}var G=this.editor.graph.getGraphBounds(),ia=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ca){var pa=v?this.getFileData(!0):null;ca=this.createImageDataUri(ca,pa,"png");N(ca)}),null,null,null,mxUtils.bind(this,function(ca){D({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,
null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ka="";g&&(ka="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ja=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(v?"1":"0")+ka+"&xml="+encodeURIComponent(f));ja.send(mxUtils.bind(this,function(){200<=ja.getStatus()&&299>=ja.getStatus()?N("data:image/png;base64,"+ja.getText()):D({message:mxResources.get("unknownError")})}))}else D({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(e,f,g,v,y,C,I){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),N=D.getElementsByTagName("a");if(null!=N)for(var G=0;G<N.length;G++){var ia=N[G].getAttribute("href");null!=ia&&"#"==ia.charAt(0)&&"_blank"==N[G].getAttribute("target")&&N[G].removeAttribute("target")}v&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var ka=" ",ja="";v&&(ka="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"+(y?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ja+="cursor:pointer;");e&&(ja+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(ca){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ca))+'"'+(""!=ja?' style="'+ja+'"':"")+ka+"/>")}))}else ja="",v&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ja+="cursor:pointer;"),e&&(e=parseInt(D.getAttribute("width")),y=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+e+" "+y),ja+="max-width:100%;max-height:"+y+"px;",D.removeAttribute("height")),""!=ja&&D.setAttribute("style",ja),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),I(mxUtils.getXml(D))};EditorUi.prototype.timeSince=
-function(e){e=Math.floor((new Date-e)/1E3);var f=Math.floor(e/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(e/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(e/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(e/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(e/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(e,f){if(null!=e){var g=null;if("diagram"==
-e.nodeName)g=e;else if("mxfile"==e.nodeName){var v=e.getElementsByTagName("diagram");if(0<v.length){g=v[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:y.apply(this,arguments)}}}null!=g&&(e=Editor.parseDiagramNode(g))}v=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(e)}catch(C){}finally{this.editor.graph=v}return e};EditorUi.prototype.getPngFileProperties=function(e){var f=
-1,g=0;if(null!=e){if(e.hasAttribute("scale")){var v=parseFloat(e.getAttribute("scale"));!isNaN(v)&&0<v&&(f=v)}e.hasAttribute("border")&&(v=parseInt(e.getAttribute("border")),!isNaN(v)&&0<v&&(g=v))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(e,f,g,v,y){try{var C=this.editor.graph,I=null!=C.themes&&"darkTheme"==C.defaultThemeName,D=null;if(null!=g&&0<g.length)C=this.createTemporaryGraph(I?C.getDefaultStylesheet():C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),C),D=g;else if(I||null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(I?C.getDefaultStylesheet():C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&C.setBackgroundImage(G.viewState.backgroundImage);C.getGlobalVariable=function(ia){return"page"==ia?G.getName():"pagenumber"==ia?1:N.apply(this,
-arguments)};document.body.appendChild(C.container);C.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ia){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ka=ia.toDataURL("image/png");ka=Editor.writeGraphModelToPng(ka,"tEXt","mxfile",encodeURIComponent(D));e(ka.substring(ka.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(ja){null!=f&&f(ja)}}),null,null,null,mxUtils.bind(this,function(ia){null!=
-f&&f(ia)}),null,null,v,null,C.shadowVisible,null,C,y,null,null,null,"diagram",null)}catch(ia){null!=f&&f(ia)}};EditorUi.prototype.getEmbeddedSvg=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){D=null!=D?D:!0;ia=null!=ia?ia:0;I=null!=N?N:f.background;I==mxConstants.NONE&&(I=null);C=f.getSvg(I,G,ia,null,null,C,null,null,null,f.shadowVisible||ka,null,ja,"diagram");(f.shadowVisible||ka)&&f.addSvgShadow(C,null,null,0==ia);null!=e&&C.setAttribute("content",e);null!=g&&C.setAttribute("resource",g);var ca=mxUtils.bind(this,
-function(pa){pa=(v?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(pa);null!=y&&y(pa);return pa});f.mathEnabled&&this.editor.addMathCss(C);if(null!=y)this.embedFonts(C,mxUtils.bind(this,function(pa){D?this.editor.convertImages(pa,mxUtils.bind(this,function(ra){ca(ra)})):ca(pa)}));else return ca(C)};EditorUi.prototype.embedFonts=function(e,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(e,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(e,g),f(e)}catch(v){f(e)}}))}catch(g){f(e)}}))};EditorUi.prototype.exportImage=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){N=null!=N?N:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ca=this.editor.graph.isSelectionEmpty();g=null!=g?g:ca;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(pa){this.spinner.stop();
-try{this.saveCanvas(pa,y?this.getFileData(!0,null,null,null,g,D):null,N,null==this.pages||0==this.pages.length,ia)}catch(ra){this.handleError(ra)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(pa){this.spinner.stop();this.handleError(pa)}),null,g,e||1,f,v,null,null,C,I,G,ka,ja)}catch(pa){this.spinner.stop(),this.handleError(pa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(e){return this.editor.isCorsEnabledForUrl(e)};EditorUi.prototype.importXml=function(e,f,g,v,y,C,I){f=null!=
-f?f:0;g=null!=g?g:0;var D=[];try{var N=this.editor.graph;if(null!=e&&0<e.length){N.model.beginUpdate();try{var G=mxUtils.parseXml(e);e={};var ia=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=ia&&"mxfile"==ia.nodeName&&null!=this.pages){var ka=ia.getElementsByTagName("diagram");if(1==ka.length&&!C){if(ia=Editor.parseDiagramNode(ka[0]),null!=this.currentPage&&(e[ka[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ja=ka[0].getAttribute("name");null!=
-ja&&""!=ja&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ja))}}else if(0<ka.length){C=[];var ca=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(e[ka[0].getAttribute("id")]=this.pages[0].getId(),ia=Editor.parseDiagramNode(ka[0]),v=!1,ca=1);for(;ca<ka.length;ca++){var pa=ka[ca].getAttribute("id");ka[ca].removeAttribute("id");var ra=this.updatePageRoot(new DiagramPage(ka[ca]));e[pa]=ka[ca].getAttribute("id");var L=this.pages.length;null==ra.getName()&&ra.setName(mxResources.get("pageWithNumber",
-[L+1]));N.model.execute(new ChangePage(this,ra,ra,L,!0));C.push(ra)}this.updatePageLinks(e,C)}}if(null!=ia&&"mxGraphModel"===ia.nodeName){D=N.importGraphModel(ia,f,g,v);if(null!=D)for(ca=0;ca<D.length;ca++)this.updatePageLinksForCell(e,D[ca]);var V=N.parseBackgroundImage(ia.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(e,V);var R=new ChangePageSetup(this,null,V);R.ignoreColor=!0;N.model.execute(R)}}I&&this.insertHandler(D,null,null,N.defaultVertexStyle,
-N.defaultEdgeStyle,!1,!0)}finally{N.model.endUpdate()}}}catch(Y){if(y)throw Y;this.handleError(Y)}return D};EditorUi.prototype.updatePageLinks=function(e,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(e,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(e,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(e,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=e[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc=
-"data:page/id,"+g)}}catch(v){}};EditorUi.prototype.updatePageLinksForCell=function(e,f){var g=document.createElement("div"),v=this.editor.graph,y=v.getLinkForCell(f);null!=y&&v.setLinkForCell(f,this.updatePageLink(e,y));if(v.isHtmlLabel(f)){g.innerHTML=v.sanitizeHtml(v.getLabel(f));for(var C=g.getElementsByTagName("a"),I=!1,D=0;D<C.length;D++)y=C[D].getAttribute("href"),null!=y&&(C[D].setAttribute("href",this.updatePageLink(e,y)),I=!0);I&&v.labelChanged(f,g.innerHTML)}for(D=0;D<v.model.getChildCount(f);D++)this.updatePageLinksForCell(e,
-v.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=function(e,f){if(Graph.isPageLink(f)){var g=e[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var v=JSON.parse(f.substring(17));if(null!=v.actions){for(var y=0;y<v.actions.length;y++){var C=v.actions[y];if(null!=C.open&&Graph.isPageLink(C.open)){var I=C.open.substring(C.open.indexOf(",")+1);g=e[I];null!=g?C.open="data:page/id,"+g:null==this.getPageById(I)&&delete C.open}}f=
-"data:action/json,"+JSON.stringify(v)}}catch(D){}return f};EditorUi.prototype.isRemoteVisioFormat=function(e){return/(\.v(sd|dx))($|\?)/i.test(e)||/(\.vs(s|x))($|\?)/i.test(e)};EditorUi.prototype.importVisio=function(e,f,g,v,y){v=null!=v?v:e.name;g=null!=g?g:mxUtils.bind(this,function(I){this.handleError(I)});var C=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(v);try{var D="UNKNOWN-VISIO",N=v.lastIndexOf(".");if(0<=N&&N<v.length)D=v.substring(N+
-1).toUpperCase();else{var G=v.lastIndexOf("/");0<=G&&G<v.length&&(v=v.substring(G+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+v,label:I?"remote":"local"})}catch(ka){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",e,v);var ia=new XMLHttpRequest;ia.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":
-""));ia.responseType="blob";this.addRemoteServiceSecurityCheck(ia);null!=y&&ia.setRequestHeader("x-convert-custom",y);ia.onreadystatechange=mxUtils.bind(this,function(){if(4==ia.readyState)if(200<=ia.status&&299>=ia.status)try{var ka=ia.response;if("text/xml"==ka.type){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(ca){try{f(ca.target.result)}catch(pa){g({message:mxResources.get("errorLoadingFile")})}});ja.readAsText(ka)}else this.doImportVisio(ka,f,g,v)}catch(ca){g(ca)}else try{""==ia.responseType||
-"text"==ia.responseType?g({message:ia.responseText}):(ja=new FileReader,ja.onload=function(){g({message:JSON.parse(ja.result).Message})},ja.readAsText(ia.response))}catch(ca){g({})}});ia.send(I)}else try{this.doImportVisio(e,f,g,v)}catch(ka){g(ka)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",C))};EditorUi.prototype.importGraphML=
-function(e,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(e,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?v():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",v))};EditorUi.prototype.exportVisio=function(e){var f=mxUtils.bind(this,
-function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(e)||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(e,
-f,g){var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y=JSON.parse(e);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+e.length}),null!=window.console&&"1"==urlParams.test){var C=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&C.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var I=0;I<y.svgThumbs.length;I++)C.push(Editor.createSvgDataUri(y.svgThumbs[I]));null!=
-y.thumb&&C.push(y.thumb);console.log.apply(console,C)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(v,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",v)})})})}):mxscript("js/extensions.min.js",v))};EditorUi.prototype.generateMermaidImage=function(e,f,g,v){var y=this,C=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),e,function(I){try{if(mxClient.IS_IE||mxClient.IS_IE11)I=
-I.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(I).getElementsByTagName("svg");if(0<D.length){var N=parseFloat(D[0].getAttribute("width")),G=parseFloat(D[0].getAttribute("height"));if(isNaN(N)||isNaN(G))try{var ia=D[0].getAttribute("viewBox").split(/\s+/);N=parseFloat(ia[2]);G=parseFloat(ia[3])}catch(ka){N=N||100,G=G||100}g(y.convertDataUri(Editor.createSvgDataUri(I)),N,G)}else v({message:mxResources.get("invalidInput")})}catch(ka){v(ka)}})}catch(I){v(I)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?C():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",C):mxscript("js/extensions.min.js",C))};EditorUi.prototype.generatePlantUmlImage=function(e,f,g,v){function y(D,N,G){c1=D>>2;c2=(D&3)<<4|N>>4;c3=(N&15)<<2|G>>6;c4=G&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+
-D);D-=26;return 0==D?"-":1==D?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(D){r="";for(i=0;i<D.length;i+=3)r=i+2==D.length?r+y(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+y(D.charCodeAt(i),0,0):r+y(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(e))),!0);"txt"!=f&&(I.responseType="blob");I.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==
+EditorUi.prototype.createEmbedSvg=function(d,f,g,v,x,B,I){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),N=D.getElementsByTagName("a");if(null!=N)for(var G=0;G<N.length;G++){var ia=N[G].getAttribute("href");null!=ia&&"#"==ia.charAt(0)&&"_blank"==N[G].getAttribute("target")&&N[G].removeAttribute("target")}v&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var ka=" ",ja="";v&&(ka="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"+(x?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",ja+="cursor:pointer;");d&&(ja+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(ca){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ca))+'"'+(""!=ja?' style="'+ja+'"':"")+ka+"/>")}))}else ja="",v&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(x?"&edit=_blank":"")+(B?"&layers=1":"")+"');}}})(this);"),ja+="cursor:pointer;"),d&&(d=parseInt(D.getAttribute("width")),x=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+d+" "+x),ja+="max-width:100%;max-height:"+x+"px;",D.removeAttribute("height")),""!=ja&&D.setAttribute("style",ja),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),I(mxUtils.getXml(D))};EditorUi.prototype.timeSince=
+function(d){d=Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==
+d.nodeName)g=d;else if("mxfile"==d.nodeName){var v=d.getElementsByTagName("diagram");if(0<v.length){g=v[0];var x=f.getGlobalVariable;f.getGlobalVariable=function(B){return"page"==B?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==B?1:x.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}v=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(B){}finally{this.editor.graph=v}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
+1,g=0;if(null!=d){if(d.hasAttribute("scale")){var v=parseFloat(d.getAttribute("scale"));!isNaN(v)&&0<v&&(f=v)}d.hasAttribute("border")&&(v=parseInt(d.getAttribute("border")),!isNaN(v)&&0<v&&(g=v))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,v,x){try{var B=this.editor.graph,I=null!=B.themes&&"darkTheme"==B.defaultThemeName,D=null;if(null!=g&&0<g.length)B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet()),document.body.appendChild(B.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),B),D=g;else if(I||null!=this.pages&&this.currentPage!=this.pages[0]){B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet());var N=B.getGlobalVariable;B.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?B.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&B.setBackgroundImage(G.viewState.backgroundImage);B.getGlobalVariable=function(ia){return"page"==ia?G.getName():"pagenumber"==ia?1:N.apply(this,
+arguments)};document.body.appendChild(B.container);B.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ia){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ka=ia.toDataURL("image/png");ka=Editor.writeGraphModelToPng(ka,"tEXt","mxfile",encodeURIComponent(D));d(ka.substring(ka.lastIndexOf(",")+1));B!=this.editor.graph&&B.container.parentNode.removeChild(B.container)}catch(ja){null!=f&&f(ja)}}),null,null,null,mxUtils.bind(this,function(ia){null!=
+f&&f(ia)}),null,null,v,null,B.shadowVisible,null,B,x,null,null,null,"diagram",null)}catch(ia){null!=f&&f(ia)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja){D=null!=D?D:!0;ia=null!=ia?ia:0;I=null!=N?N:f.background;I==mxConstants.NONE&&(I=null);B=f.getSvg(I,G,ia,null,null,B,null,null,null,f.shadowVisible||ka,null,ja,"diagram");(f.shadowVisible||ka)&&f.addSvgShadow(B,null,null,0==ia);null!=d&&B.setAttribute("content",d);null!=g&&B.setAttribute("resource",g);var ca=mxUtils.bind(this,
+function(pa){pa=(v?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(pa);null!=x&&x(pa);return pa});f.mathEnabled&&this.editor.addMathCss(B);if(null!=x)this.embedFonts(B,mxUtils.bind(this,function(pa){D?this.editor.convertImages(pa,mxUtils.bind(this,function(ra){ca(ra)})):ca(pa)}));else return ca(B)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(v){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja){N=null!=N?N:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ca=this.editor.graph.isSelectionEmpty();g=null!=g?g:ca;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(pa){this.spinner.stop();
+try{this.saveCanvas(pa,x?this.getFileData(!0,null,null,null,g,D):null,N,null==this.pages||0==this.pages.length,ia)}catch(ra){this.handleError(ra)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(pa){this.spinner.stop();this.handleError(pa)}),null,g,d||1,f,v,null,null,B,I,G,ka,ja)}catch(pa){this.spinner.stop(),this.handleError(pa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,v,x,B,I){f=null!=
+f?f:0;g=null!=g?g:0;var D=[];try{var N=this.editor.graph;if(null!=d&&0<d.length){N.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var ia=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=ia&&"mxfile"==ia.nodeName&&null!=this.pages){var ka=ia.getElementsByTagName("diagram");if(1==ka.length&&!B){if(ia=Editor.parseDiagramNode(ka[0]),null!=this.currentPage&&(d[ka[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ja=ka[0].getAttribute("name");null!=
+ja&&""!=ja&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ja))}}else if(0<ka.length){B=[];var ca=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[ka[0].getAttribute("id")]=this.pages[0].getId(),ia=Editor.parseDiagramNode(ka[0]),v=!1,ca=1);for(;ca<ka.length;ca++){var pa=ka[ca].getAttribute("id");ka[ca].removeAttribute("id");var ra=this.updatePageRoot(new DiagramPage(ka[ca]));d[pa]=ka[ca].getAttribute("id");var L=this.pages.length;null==ra.getName()&&ra.setName(mxResources.get("pageWithNumber",
+[L+1]));N.model.execute(new ChangePage(this,ra,ra,L,!0));B.push(ra)}this.updatePageLinks(d,B)}}if(null!=ia&&"mxGraphModel"===ia.nodeName){D=N.importGraphModel(ia,f,g,v);if(null!=D)for(ca=0;ca<D.length;ca++)this.updatePageLinksForCell(d,D[ca]);var V=N.parseBackgroundImage(ia.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(d,V);var R=new ChangePageSetup(this,null,V);R.ignoreColor=!0;N.model.execute(R)}}I&&this.insertHandler(D,null,null,N.defaultVertexStyle,
+N.defaultEdgeStyle,!1,!0)}finally{N.model.endUpdate()}}}catch(Y){if(x)throw Y;this.handleError(Y)}return D};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc=
+"data:page/id,"+g)}}catch(v){}};EditorUi.prototype.updatePageLinksForCell=function(d,f){var g=document.createElement("div"),v=this.editor.graph,x=v.getLinkForCell(f);null!=x&&v.setLinkForCell(f,this.updatePageLink(d,x));if(v.isHtmlLabel(f)){g.innerHTML=v.sanitizeHtml(v.getLabel(f));for(var B=g.getElementsByTagName("a"),I=!1,D=0;D<B.length;D++)x=B[D].getAttribute("href"),null!=x&&(B[D].setAttribute("href",this.updatePageLink(d,x)),I=!0);I&&v.labelChanged(f,g.innerHTML)}for(D=0;D<v.model.getChildCount(f);D++)this.updatePageLinksForCell(d,
+v.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var v=JSON.parse(f.substring(17));if(null!=v.actions){for(var x=0;x<v.actions.length;x++){var B=v.actions[x];if(null!=B.open&&Graph.isPageLink(B.open)){var I=B.open.substring(B.open.indexOf(",")+1);g=d[I];null!=g?B.open="data:page/id,"+g:null==this.getPageById(I)&&delete B.open}}f=
+"data:action/json,"+JSON.stringify(v)}}catch(D){}return f};EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,v,x){v=null!=v?v:d.name;g=null!=g?g:mxUtils.bind(this,function(I){this.handleError(I)});var B=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(v);try{var D="UNKNOWN-VISIO",N=v.lastIndexOf(".");if(0<=N&&N<v.length)D=v.substring(N+
+1).toUpperCase();else{var G=v.lastIndexOf("/");0<=G&&G<v.length&&(v=v.substring(G+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+v,label:I?"remote":"local"})}catch(ka){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",d,v);var ia=new XMLHttpRequest;ia.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":
+""));ia.responseType="blob";this.addRemoteServiceSecurityCheck(ia);null!=x&&ia.setRequestHeader("x-convert-custom",x);ia.onreadystatechange=mxUtils.bind(this,function(){if(4==ia.readyState)if(200<=ia.status&&299>=ia.status)try{var ka=ia.response;if("text/xml"==ka.type){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(ca){try{f(ca.target.result)}catch(pa){g({message:mxResources.get("errorLoadingFile")})}});ja.readAsText(ka)}else this.doImportVisio(ka,f,g,v)}catch(ca){g(ca)}else try{""==ia.responseType||
+"text"==ia.responseType?g({message:ia.responseText}):(ja=new FileReader,ja.onload=function(){g({message:JSON.parse(ja.result).Message})},ja.readAsText(ia.response))}catch(ca){g({})}});ia.send(I)}else try{this.doImportVisio(d,f,g,v)}catch(ka){g(ka)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",B))};EditorUi.prototype.importGraphML=
+function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(x){this.handleError(x)});var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(x){g(x)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?v():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",v))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,
+f,g){var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var x=JSON.parse(d);f(LucidImporter.importState(x));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var B=[(new Date).toISOString(),"convertLucidChart",x];null!=x.state&&B.push(JSON.parse(x.state));if(null!=x.svgThumbs)for(var I=0;I<x.svgThumbs.length;I++)B.push(Editor.createSvgDataUri(x.svgThumbs[I]));null!=
+x.thumb&&B.push(x.thumb);console.log.apply(console,B)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(v,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",v)})})})}):mxscript("js/extensions.min.js",v))};EditorUi.prototype.generateMermaidImage=function(d,f,g,v){var x=this,B=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(I){try{if(mxClient.IS_IE||mxClient.IS_IE11)I=
+I.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(I).getElementsByTagName("svg");if(0<D.length){var N=parseFloat(D[0].getAttribute("width")),G=parseFloat(D[0].getAttribute("height"));if(isNaN(N)||isNaN(G))try{var ia=D[0].getAttribute("viewBox").split(/\s+/);N=parseFloat(ia[2]);G=parseFloat(ia[3])}catch(ka){N=N||100,G=G||100}g(x.convertDataUri(Editor.createSvgDataUri(I)),N,G)}else v({message:mxResources.get("invalidInput")})}catch(ka){v(ka)}})}catch(I){v(I)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?B():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",B):mxscript("js/extensions.min.js",B))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,v){function x(D,N,G){c1=D>>2;c2=(D&3)<<4|N>>4;c3=(N&15)<<2|G>>6;c4=G&63;r="";r+=B(c1&63);r+=B(c2&63);r+=B(c3&63);return r+=B(c4&63)}function B(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+
+D);D-=26;return 0==D?"-":1==D?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(D){r="";for(i=0;i<D.length;i+=3)r=i+2==D.length?r+x(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+x(D.charCodeAt(i),0,0):r+x(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(I.responseType="blob");I.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==
f)g(this.response);else{var N=new FileReader;N.readAsDataURL(this.response);N.onloadend=function(G){var ia=new Image;ia.onload=function(){try{var ka=ia.width,ja=ia.height;if(0==ka&&0==ja){var ca=N.result,pa=ca.indexOf(","),ra=decodeURIComponent(escape(atob(ca.substring(pa+1)))),L=mxUtils.parseXml(ra).getElementsByTagName("svg");0<L.length&&(ka=parseFloat(L[0].getAttribute("width")),ja=parseFloat(L[0].getAttribute("height")))}g(N.result,ka,ja)}catch(V){v(V)}};ia.src=N.result};N.onerror=function(G){v(G)}}else v(D)};
-I.onerror=function(D){v(D)};I.send()};EditorUi.prototype.insertAsPreText=function(e,f,g){var v=this.editor.graph,y=null;v.getModel().beginUpdate();try{y=v.insertVertex(null,null,"<pre>"+e+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),v.updateCellSize(y,!0)}finally{v.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(e,f,g,v,y,C,I,D){C=null!=C?C:!0;I=null!=I?I:!0;if(null!=e)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e))this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(e.replace(/\s+/g," "),mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ja.responseText,f,g,!0))}));else if("data:"==e.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e))){var N=this.editor.graph;if("data:application/pdf;base64,"==e.substring(0,28)){var G=Editor.extractGraphModelFromPdf(e);if(null!=
-G&&0<G.length)return this.importXml(G,f,g,C,!0,D)}if(Editor.isPngDataUrl(e)&&(G=Editor.extractGraphModelFromPng(e),null!=G&&0<G.length))return this.importXml(G,f,g,C,!0,D);if("data:image/svg+xml;"==e.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==e.substring(0,26)?(G=e.substring(e.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(e.substring(e.indexOf(",")+1));var ia=this.importXml(G,f,g,C,!0,D);if(0<ia.length)return ia}catch(ja){}this.loadImage(e,
-mxUtils.bind(this,function(ja){if("data:"==e.substring(0,5))this.resizeImage(ja,e,mxUtils.bind(this,function(ra,L,V){N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),L,V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ra)+";"))}),I,this.maxImageSize);else{var ca=Math.min(1,Math.min(this.maxImageSize/ja.width,this.maxImageSize/ja.height)),pa=Math.round(ja.width*ca);ja=Math.round(ja.height*
-ca);N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),pa,ja,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+e+";"))}}),mxUtils.bind(this,function(){var ja=null;N.getModel().beginUpdate();try{ja=N.insertVertex(N.getDefaultParent(),null,e,N.snap(f),N.snap(g),1,1,"text;"+(v?"html=1;":"")),N.updateCellSize(ja),N.fireEvent(new mxEventObject("textInserted","cells",[ja]))}finally{N.getModel().endUpdate()}N.setSelectionCell(ja)}))}else{e=
-Graph.zapGremlins(mxUtils.trim(e));if(this.isCompatibleString(e))return this.importXml(e,f,g,C,null,D);if(0<e.length)if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(ja){this.editor.graph.setSelectionCells(this.importXml(ja,f,g,C,null,D))}),mxUtils.bind(this,function(ja){this.handleError(ja)}));else{N=this.editor.graph;y=null;N.getModel().beginUpdate();try{y=N.insertVertex(N.getDefaultParent(),null,"",N.snap(f),N.snap(g),1,1,"text;whiteSpace=wrap;"+(v?"html=1;":""));
-N.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==e.charAt(0)&&e.indexOf(">")==e.length-1&&(e=mxUtils.htmlEntities(e));e.length>this.maxTextBytes&&(e=e.substring(0,this.maxTextBytes)+"...");y.value=e;N.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var ka=N.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=ka.width;y.geometry.height=ka.height}Graph.isLink(y.value)&&N.setLinkForCell(y,y.value);y.geometry.width+=N.gridSize;y.geometry.height+=
-N.gridSize}finally{N.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(e){var f=-1;do e/=1024,f++;while(1024<e);return Math.max(e,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(e){if("data:"==e.substring(0,5)){var f=e.indexOf(";");0<f&&(e=e.substring(0,f)+e.substring(e.indexOf(",",f+1)))}return e};EditorUi.prototype.isRemoteFileFormat=function(e,f){return/("contentType":\s*"application\/gliffy\+json")/.test(e)};
-EditorUi.prototype.isLucidChartData=function(e){return null!=e&&('{"state":"{\\"Properties\\":'==e.substring(0,26)||'{"Properties":'==e.substring(0,14))};EditorUi.prototype.importLocalFile=function(e,f){if(e&&Graph.fileSupport){if(null==this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display=
-"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,D){StorageFile.listFiles(this,"F",I,D)});window.openBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.getFileContent(this,I,D,N)});window.deleteBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.deleteFile(this,I,D,N)});if(!f){var v=Editor.useLocalStorage;Editor.useLocalStorage=!e}window.openFile=
+I.onerror=function(D){v(D)};I.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var v=this.editor.graph,x=null;v.getModel().beginUpdate();try{x=v.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),v.updateCellSize(x,!0)}finally{v.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(d,f,g,v,x,B,I,D){B=null!=B?B:!0;I=null!=I?I:!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(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ja.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var N=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=
+G&&0<G.length)return this.importXml(G,f,g,B,!0,D)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,f,g,B,!0,D);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var ia=this.importXml(G,f,g,B,!0,D);if(0<ia.length)return ia}catch(ja){}this.loadImage(d,
+mxUtils.bind(this,function(ja){if("data:"==d.substring(0,5))this.resizeImage(ja,d,mxUtils.bind(this,function(ra,L,V){N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),L,V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ra)+";"))}),I,this.maxImageSize);else{var ca=Math.min(1,Math.min(this.maxImageSize/ja.width,this.maxImageSize/ja.height)),pa=Math.round(ja.width*ca);ja=Math.round(ja.height*
+ca);N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),pa,ja,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var ja=null;N.getModel().beginUpdate();try{ja=N.insertVertex(N.getDefaultParent(),null,d,N.snap(f),N.snap(g),1,1,"text;"+(v?"html=1;":"")),N.updateCellSize(ja),N.fireEvent(new mxEventObject("textInserted","cells",[ja]))}finally{N.getModel().endUpdate()}N.setSelectionCell(ja)}))}else{d=
+Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,B,null,D);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(ja){this.editor.graph.setSelectionCells(this.importXml(ja,f,g,B,null,D))}),mxUtils.bind(this,function(ja){this.handleError(ja)}));else{N=this.editor.graph;x=null;N.getModel().beginUpdate();try{x=N.insertVertex(N.getDefaultParent(),null,"",N.snap(f),N.snap(g),1,1,"text;whiteSpace=wrap;"+(v?"html=1;":""));
+N.fireEvent(new mxEventObject("textInserted","cells",[x]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");x.value=d;N.updateCellSize(x);if(0<this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ka=N.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ka.width;x.geometry.height=ka.height}Graph.isLink(x.value)&&N.setLinkForCell(x,x.value);x.geometry.width+=N.gridSize;x.geometry.height+=
+N.gridSize}finally{N.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};
+EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display=
+"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,D){StorageFile.listFiles(this,"F",I,D)});window.openBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.getFileContent(this,I,D,N)});window.deleteBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.deleteFile(this,I,D,N)});if(!f){var v=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
new OpenFile(mxUtils.bind(this,function(I){this.hideDialog(I)}));window.openFile.setConsumer(mxUtils.bind(this,function(I,D){null!=D&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(D)?(I=new Blob([I],{type:"application/octet-stream"}),this.importVisio(I,mxUtils.bind(this,function(N){this.importXml(N,0,0,!0)}),null,D)):this.editor.graph.setSelectionCells(this.importXml(I,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
-function(){window.openFile=null});if(!f){var y=this.dialog,C=y.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=v;C.apply(y,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(e,f,g){var v=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(e).then(function(C){if(mxUtils.isEmptyObject(C.files))g();else{var I=0,D,N=!1;C.forEach(function(G,ia){G=
-ia.name.toLowerCase();"diagram/diagram.xml"==G?(N=!0,ia.async("string").then(function(ka){0==ka.indexOf("<mxfile ")?f(ka):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>I&&(I=G,D=ia))});0<I?D.async("string").then(function(G){(new XMLHttpRequest).upload&&v.isRemoteFileFormat(G,e.name)?v.isOffline()?v.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):v.parseFileData(G,mxUtils.bind(this,function(ia){4==ia.readyState&&(200<=ia.status&&299>=ia.status?f(ia.responseText):
-g())}),e.name):g()}):N||g()}},function(C){g(C)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(e,f,g,v,y,C,I,D,N,G,ia,ka){G=null!=G?G:!0;var ja=!1,ca=null,pa=mxUtils.bind(this,function(ra){var L=null;null!=ra&&"<mxlibrary"==ra.substring(0,10)?this.loadLibrary(new LocalLibrary(this,ra,I)):L=this.importXml(ra,g,v,G,null,null!=ka?mxEvent.isControlDown(ka):null);null!=
-D&&D(L)});"image"==f.substring(0,5)?(N=!1,"image/png"==f.substring(0,9)&&(f=ia?null:this.extractGraphModelFromPng(e),null!=f&&0<f.length&&(ca=this.importXml(f,g,v,G,null,null!=ka?mxEvent.isControlDown(ka):null),N=!0)),N||(f=this.editor.graph,N=e.indexOf(";"),0<N&&(e=e.substring(0,N)+e.substring(e.indexOf(",",N+1))),G&&f.isGridEnabled()&&(g=f.snap(g),v=f.snap(v)),ca=[f.insertVertex(null,null,"",g,v,y,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-e+";")])):/(\.*<graphml )/.test(e)?(ja=!0,this.importGraphML(e,pa)):null!=N&&null!=I&&(/(\.v(dx|sdx?))($|\?)/i.test(I)||/(\.vs(x|sx?))($|\?)/i.test(I))?(ja=!0,this.importVisio(N,pa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ja=!0,y=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?pa(ra.responseText):null!=D&&D(null))}),null!=e?this.parseFileData(e,y,I):this.parseFile(N,
-y,I)):0==e.indexOf("PK")&&null!=N?(ja=!0,this.importZipFile(N,pa,mxUtils.bind(this,function(){ca=this.insertTextAt(this.validateFileData(e),g,v,!0,null,G);D(ca)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ca=this.insertTextAt(this.validateFileData(e),g,v,!0,null,G,null,null!=ka?mxEvent.isControlDown(ka):null));ja||null==D||D(ca);return ca};EditorUi.prototype.importFiles=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){v=null!=v?v:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var ca=
-null!=f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var ra=!1;if(!mxClient.IS_CHROMEAPP&&null!=e)for(var L=ia||this.resampleThreshold,V=0;V<e.length;V++)if("image/svg"!==e[V].type.substring(0,9)&&"image/"===e[V].type.substring(0,6)&&e[V].size>L){ra=!0;break}var R=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.gridSize;y=null!=y?y:mxUtils.bind(this,function(U,da,fa,na,sa,za,ua,Ba,oa){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
-U,ua)),null):"atlassian"!=this.getServiceName()&&"1"!=urlParams.embed&&this.isCompatibleString(U)&&1==e.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,U,ua,!0)),null):this.importFile(U,da,fa,na,sa,za,ua,Ba,oa,ca,ka,ja)}catch(Aa){return this.handleError(Aa),null}});C=null!=C?C:mxUtils.bind(this,function(U){Y.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var la=e.length,q=la,F=[],T=mxUtils.bind(this,function(U,
-da){F[U]=da;if(0==--q){this.spinner.stop();if(null!=D)D(F);else{var fa=[];Y.getModel().beginUpdate();try{for(U=0;U<F.length;U++){var na=F[U]();null!=na&&(fa=fa.concat(na))}}finally{Y.getModel().endUpdate()}}C(fa)}}),aa=0;aa<la;aa++)mxUtils.bind(this,function(U){var da=e[U];if(null!=da){var fa=new FileReader;fa.onload=mxUtils.bind(this,function(na){if(null==I||I(da))if("image/"==da.type.substring(0,6))if("image/svg"==da.type.substring(0,9)){var sa=Graph.clipSvgDataUri(na.target.result),za=sa.indexOf(",");
-za=decodeURIComponent(escape(atob(sa.substring(za+1))));var ua=mxUtils.parseXml(za);za=ua.getElementsByTagName("svg");if(0<za.length){za=za[0];var Ba=ka?null:za.getAttribute("content");null!=Ba&&"<"!=Ba.charAt(0)&&"%"!=Ba.charAt(0)&&(Ba=unescape(window.atob?atob(Ba):Base64.decode(Ba,!0)));null!=Ba&&"%"==Ba.charAt(0)&&(Ba=decodeURIComponent(Ba));null==Ba||"<mxfile "!==Ba.substring(0,8)&&"<mxGraphModel "!==Ba.substring(0,14)?T(U,mxUtils.bind(this,function(){try{if(null!=ua){var ya=ua.getElementsByTagName("svg");
-if(0<ya.length){var La=ya[0],Oa=La.getAttribute("width"),Na=La.getAttribute("height");Oa=null!=Oa&&"%"!=Oa.charAt(Oa.length-1)?parseFloat(Oa):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Ia=La.getAttribute("viewBox");if(null==Ia||0==Ia.length)La.setAttribute("viewBox","0 0 "+Oa+" "+Na);else if(isNaN(Oa)||isNaN(Na)){var wa=Ia.split(" ");3<wa.length&&(Oa=parseFloat(wa[2]),Na=parseFloat(wa[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(La));var ab=Math.min(1,Math.min(v/Math.max(1,
-Oa)),v/Math.max(1,Na)),Ya=y(sa,da.type,f+U*Z,g+U*Z,Math.max(1,Math.round(Oa*ab)),Math.max(1,Math.round(Na*ab)),da.name);if(isNaN(Oa)||isNaN(Na)){var x=new Image;x.onload=mxUtils.bind(this,function(){Oa=Math.max(1,x.width);Na=Math.max(1,x.height);Ya[0].geometry.width=Oa;Ya[0].geometry.height=Na;La.setAttribute("viewBox","0 0 "+Oa+" "+Na);sa=Editor.createSvgDataUri(mxUtils.getXml(La));var O=sa.indexOf(";");0<O&&(sa=sa.substring(0,O)+sa.substring(sa.indexOf(",",O+1)));Y.setCellStyles("image",sa,[Ya[0]])});
-x.src=Editor.createSvgDataUri(mxUtils.getXml(La))}return Ya}}}catch(O){}return null})):T(U,mxUtils.bind(this,function(){return y(Ba,"text/xml",f+U*Z,g+U*Z,0,0,da.name)}))}else T(U,mxUtils.bind(this,function(){return null}))}else{za=!1;if("image/png"==da.type){var oa=ka?null:this.extractGraphModelFromPng(na.target.result);if(null!=oa&&0<oa.length){var Aa=new Image;Aa.src=na.target.result;T(U,mxUtils.bind(this,function(){return y(oa,"text/xml",f+U*Z,g+U*Z,Aa.width,Aa.height,da.name)}));za=!0}}za||(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(na.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,na.target.result,mxUtils.bind(this,function(La,Oa,Na){T(U,mxUtils.bind(this,function(){if(null!=La&&La.length<G){var Ia=pa&&this.isResampleImageSize(da.size,ia)?
-Math.min(1,Math.min(v/Oa,v/Na)):1;return y(La,da.type,f+U*Z,g+U*Z,Math.round(Oa*Ia),Math.round(Na*Ia),da.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,v,ia,da.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=na.target.result,y(sa,da.type,f+U*Z,g+U*Z,240,160,da.name,function(ya){T(U,function(){return ya})},da)});/(\.v(dx|sdx?))($|\?)/i.test(da.name)||/(\.vs(x|sx?))($|\?)/i.test(da.name)?y(null,
-da.type,f+U*Z,g+U*Z,240,160,da.name,function(na){T(U,function(){return na})},da):"image"==da.type.substring(0,5)||"application/pdf"==da.type?fa.readAsDataURL(da):fa.readAsText(da)}})(aa)});if(ra){ra=[];for(V=0;V<e.length;V++)ra.push(e[V]);e=ra;this.confirmImageResize(function(Y){pa=Y;R()},N)}else R()};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(e,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},v=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(C,I){if(C||f)mxSettings.setResizeImages(C?I:null),mxSettings.save();g();e(I)};null==v||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){y(C,!0)},function(C){y(C,!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):y(!1,v)};EditorUi.prototype.parseFile=function(e,f,g){g=null!=g?g:e.name;var v=new FileReader;v.onload=mxUtils.bind(this,function(){this.parseFileData(v.result,f,g)});v.readAsText(e)};EditorUi.prototype.parseFileData=function(e,f,g){var v=new XMLHttpRequest;v.open("POST",OPEN_URL);v.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
-v.onreadystatechange=function(){f(v)};v.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(e));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(e,f){f=null!=f?f:this.resampleThreshold;return e>f};EditorUi.prototype.resizeImage=function(e,f,g,v,y,C,I){y=null!=y?y:this.maxImageSize;var D=Math.max(1,e.width),N=Math.max(1,e.height);if(v&&this.isResampleImageSize(null!=I?I:f.length,C))try{var G=
-Math.max(D/y,N/y);if(1<G){var ia=Math.round(D/G),ka=Math.round(N/G),ja=document.createElement("canvas");ja.width=ia;ja.height=ka;ja.getContext("2d").drawImage(e,0,0,ia,ka);var ca=ja.toDataURL();if(ca.length<f.length){var pa=document.createElement("canvas");pa.width=ia;pa.height=ka;var ra=pa.toDataURL();ca!==ra&&(f=ca,D=ia,N=ka)}}}catch(L){}g(f,D,N)};EditorUi.prototype.extractGraphModelFromPng=function(e){return Editor.extractGraphModelFromPng(e)};EditorUi.prototype.loadImage=function(e,f,g){try{var v=
-new Image;v.onload=function(){v.width=0<v.width?v.width:120;v.height=0<v.height?v.height:120;f(v)};null!=g&&(v.onerror=g);v.src=e}catch(y){if(null!=g)g(y);else throw y;}};EditorUi.prototype.getDefaultSketchMode=function(){var e="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:e)};var B=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 e=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(L){var V=L.getEvent();return null==L.getState()&&!mxEvent.isMouseEvent(V)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(V)&&
-(null==L.getState()||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V))});f.cellEditor.editPlantUmlData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(e,mxResources.get("plantUml")+":",Y.data,function(Z){null!=Z&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generatePlantUmlImage(Z,Y.format,function(la,q,F){e.spinner.stop();f.getModel().beginUpdate();try{if("txt"==Y.format)f.labelChanged(L,"<pre>"+la+"</pre>"),f.updateCellSize(L,!0);else{f.setCellStyles("image",e.convertDataUri(la),
-[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=q,T.height=F,f.cellsResized([L],[T],!1))}f.setAttributeForCell(L,"plantUmlData",JSON.stringify({data:Z,format:Y.format}))}finally{f.getModel().endUpdate()}},function(la){e.handleError(la)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(e,mxResources.get("mermaid")+":",Y.data,function(Z){null!=Z&&e.spinner.spin(document.body,mxResources.get("inserting"))&&
-e.generateMermaidImage(Z,Y.config,function(la,q,F){e.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",la,[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=Math.max(T.width,q),T.height=Math.max(T.height,F),f.cellsResized([L],[T],!1));f.setAttributeForCell(L,"mermaidData",JSON.stringify({data:Z,config:Y.config},null,2))}finally{f.getModel().endUpdate()}},function(la){e.handleError(la)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};var g=f.cellEditor.startEditing;
-f.cellEditor.startEditing=function(L,V){try{var R=this.graph.getAttributeForCell(L,"plantUmlData");if(null!=R)this.editPlantUmlData(L,V,R);else if(R=this.graph.getAttributeForCell(L,"mermaidData"),null!=R)this.editMermaidData(L,V,R);else{var Y=f.getCellStyle(L);"1"==mxUtils.getValue(Y,"metaEdit","0")?e.showDataDialog(L):g.apply(this,arguments)}}catch(Z){e.handleError(Z)}};f.getLinkTitle=function(L){return e.getLinkTitle(L)};f.customLinkClicked=function(L){var V=!1;try{e.handleCustomLink(L),V=!0}catch(R){e.handleError(R)}return V};
-var v=f.parseBackgroundImage;f.parseBackgroundImage=function(L){var V=v.apply(this,arguments);null!=V&&null!=V.src&&Graph.isPageLink(V.src)&&(V={originalSrc:V.src});return V};var y=f.setBackgroundImage;f.setBackgroundImage=function(L){null!=L&&null!=L.originalSrc&&(L=e.createImageForPageLink(L.originalSrc,e.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,
-function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(L,V){L=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=L){var R=L.indexOf(",");if(0<R)for(L=L.substring(R+1),V=V.getProperty("patches"),R=0;R<V.length;R++)if(null!=V[R][EditorUi.DIFF_UPDATE]&&null!=V[R][EditorUi.DIFF_UPDATE][L]||null!=V[R][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(V[R][EditorUi.DIFF_REMOVE],L)){f.refreshBackgroundImage();break}}}));var C=f.getBackgroundImageObject;
-f.getBackgroundImageObject=function(L,V){var R=C.apply(this,arguments);if(null!=R&&null!=R.originalSrc)if(!V)R={src:R.originalSrc};else if(V&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var Y=this.stylesheet,Z=this.shapeForegroundColor,la=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";R=e.createImageForPageLink(R.originalSrc);this.shapeBackgroundColor=la;this.shapeForegroundColor=Z;this.stylesheet=
-Y}return R};var I=this.clearDefaultStyle;this.clearDefaultStyle=function(){I.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 D=e.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(L){L=null!=
-L?L:"";"1"==urlParams.dev&&(L+=(0<L.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var N=f.addClickHandler;f.addClickHandler=function(L,V,R){var Y=V;V=function(Z,la){if(null==la){var q=mxEvent.getSource(Z);"a"==q.nodeName.toLowerCase()&&(la=q.getAttribute("href"))}null!=la&&f.isCustomLink(la)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(la)&&mxEvent.consume(Z);null!=Y&&Y(Z,la)};N.call(this,L,V,R)};B.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,
-null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(L,V,R){e.editor.graph.isSelectionEmpty()?G.apply(this,arguments):e.menus.addMenuItems(L,"delete - cut copy copyAsImage - duplicate".split(" "),null,R)}}e.actions.get("print").funct=function(){e.showDialog((new PrintDialog(e)).container,360,null!=e.pages&&1<e.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var ia=f.getExportVariables;f.getExportVariables=
-function(){var L=ia.apply(this,arguments),V=e.getCurrentFile();null!=V&&(L.filename=V.getTitle());L.pagecount=null!=e.pages?e.pages.length:1;L.page=null!=e.currentPage?e.currentPage.getName():"";L.pagenumber=null!=e.pages&&null!=e.currentPage?mxUtils.indexOf(e.pages,e.currentPage)+1:1;return L};var ka=f.getGlobalVariable;f.getGlobalVariable=function(L){var V=e.getCurrentFile();return"filename"==L&&null!=V?V.getTitle():"page"==L&&null!=e.currentPage?e.currentPage.getName():"pagenumber"==L?null!=e.currentPage&&
-null!=e.pages?mxUtils.indexOf(e.pages,e.currentPage)+1:1:"pagecount"==L?null!=e.pages?e.pages.length:1:ka.apply(this,arguments)};var ja=f.labelLinkClicked;f.labelLinkClicked=function(L,V,R){var Y=V.getAttribute("href");if(null==Y||!f.isCustomLink(Y)||!mxEvent.isTouchEvent(R)&&mxEvent.isPopupTrigger(R))ja.apply(this,arguments);else{if(!f.isEnabled()||null!=L&&f.isCellLocked(L.cell))f.customLinkClicked(Y),f.getRubberband().reset();mxEvent.consume(R)}};this.editor.getOrCreateFilename=function(){var L=
-e.defaultFilename,V=e.getCurrentFile();null!=V&&(L=null!=V.getTitle()?V.getTitle():L);return L};var ca=this.actions.get("print");ca.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ca.visible=ca.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,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",
-mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(L){var V=f.cellEditor.text2,R=null;null!=V&&(mxEvent.addListener(V,"dragleave",function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);Y.stopPropagation();Y.preventDefault()}),mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==R&&(!mxClient.IS_IE||10<document.documentMode)&&(R=this.highlightElement(V));
-Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(V,"drop",mxUtils.bind(this,function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);if(0<Y.dataTransfer.files.length)this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,function(la,q,F,T,aa,U){f.insertImage(la,aa,U)},function(){},function(la){return"image/"==la.type.substring(0,6)},function(la){for(var q=0;q<la.length;q++)la[q]()},mxEvent.isControlDown(Y));else if(0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")){var Z=
-Y.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)?this.loadImage(decodeURIComponent(Z),mxUtils.bind(this,function(la){var q=Math.max(1,la.width);la=Math.max(1,la.height);var F=this.maxImageSize;F=Math.min(1,Math.min(F/Math.max(1,q)),F/Math.max(1,la));f.insertImage(decodeURIComponent(Z),q*F,la*F)})):document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(Y.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,
-Y.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(Y.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"));Y.stopPropagation();Y.preventDefault()})))}));this.isSettingsEnabled()&&(ca=this.editor.graph.view,ca.setUnit(mxSettings.getUnit()),ca.addListener("unitChanged",function(L,V){mxSettings.setUnit(V.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,ca.unit),this.refresh());if("1"==urlParams.styledev){ca=document.getElementById("geFooter");null!=ca&&(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)})),ca.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(L,V){0<this.editor.graph.getSelectionCount()?(L=this.editor.graph.getSelectionCell(),L=this.editor.graph.getModel().getStyle(L),this.styleInput.value=L||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));
-var pa=this.isSelectionAllowed;this.isSelectionAllowed=function(L){return mxEvent.getSource(L)==this.styleInput?!0:pa.apply(this,arguments)}}ca=document.getElementById("geInfo");null!=ca&&ca.parentNode.removeChild(ca);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var ra=null;mxEvent.addListener(f.container,"dragleave",function(L){f.isEnabled()&&(null!=ra&&(ra.parentNode.removeChild(ra),ra=null),L.stopPropagation(),L.preventDefault())});mxEvent.addListener(f.container,"dragover",
-mxUtils.bind(this,function(L){null==ra&&(!mxClient.IS_IE||10<document.documentMode)&&(ra=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();L.stopPropagation();L.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(L){null!=ra&&(ra.parentNode.removeChild(ra),ra=null);if(f.isEnabled()){var V=mxUtils.convertPoint(f.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),R=L.dataTransfer.files,Y=f.view.translate,Z=f.view.scale,la=V.x/Z-
-Y.x,q=V.y/Z-Y.y;if(0<R.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(L)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(R,!0)):(mxEvent.isAltDown(L)&&(q=la=null),this.importFiles(R,la,q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(L),null,null,mxEvent.isShiftDown(L),L));else{mxEvent.isAltDown(L)&&(q=la=0);var F=0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")?L.dataTransfer.getData("text/uri-list"):null;V=this.extractGraphModelFromEvent(L,
-null!=this.pages);if(null!=V)f.setSelectionCells(this.importXml(V,la,q,!0));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")){var T=L.dataTransfer.getData("text/html");V=document.createElement("div");V.innerHTML=f.sanitizeHtml(T);var aa=null;R=V.getElementsByTagName("img");null!=R&&1==R.length?(T=R[0].getAttribute("src"),null==T&&(T=R[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)||(aa=!0)):(R=V.getElementsByTagName("a"),null!=R&&1==R.length?T=R[0].getAttribute("href"):
-(V=V.getElementsByTagName("pre"),null!=V&&1==V.length&&(T=mxUtils.getTextContent(V[0]))));var U=!0,da=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(T,la,q,!0,aa,null,U,mxEvent.isControlDown(L)))});aa&&null!=T&&T.length>this.resampleThreshold?this.confirmImageResize(function(fa){U=fa;da()},mxEvent.isControlDown(L)):da()}else null!=F&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(fa){var na=Math.max(1,fa.width);fa=Math.max(1,
-fa.height);var sa=this.maxImageSize;sa=Math.min(1,Math.min(sa/Math.max(1,na)),sa/Math.max(1,fa));f.setSelectionCell(f.insertVertex(null,null,"",la,q,na*sa,fa*sa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+F+";"))}),mxUtils.bind(this,function(fa){f.setSelectionCells(this.insertTextAt(F,la,q,!0))})):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(L.dataTransfer.getData("text/plain"),
-la,q,!0))}}L.stopPropagation();L.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();ca=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",ca);this.addListener("sketchModeChanged",ca);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.refresh()}));f.addListener("enabledChanged",mxUtils.bind(this,
-function(){f.isEnabled()||this.hideShapePicker()}));"simple"==Editor.currentTheme&&(Editor.currentTheme="",this.doSetCurrentTheme("simple",0));mxClient.IS_IE||mxClient.IS_IE11||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(ca=!1,this.isSettingsEnabled()&&(ca="auto"==mxSettings.settings.darkMode||"auto"==urlParams.dark?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches:!0===mxSettings.settings.darkMode),(ca||"dark"==uiTheme||
-"1"==urlParams.dark)&&this.setDarkMode(!0));this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var e=this.editor.graph;e.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,v=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,5)){v=!0;break}if(!v){var C=g.items;for(index in C){var I=C[index];if("file"===I.kind){if(e.isEditing())this.importFiles([I.getAsFile()],
-0,0,this.maxImageSize,function(N,G,ia,ka,ja,ca){e.insertImage(N,ja,ca)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var G=0;G<N.length;G++)N[G]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([I.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(N){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function e(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",
-!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize=
-"1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var I=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||
-"TEXTAREA"==I.nodeName||224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||v||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(g),v=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=I)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var I=C.keyCode;window.setTimeout(mxUtils.bind(this,
-function(){!v||224!=I&&17!=I&&91!=I&&93!=I||(v=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),e()}catch(I){this.handleError(I)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),e()}catch(I){this.handleError(I)}}));
-mxEvent.addListener(g,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=C.clipboardData&&this.pasteCells(C,g,!0,!0),!mxEvent.isConsumed(C))){var I=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=I;f.container.scrollTop=D;this.pasteCells(C,g,!1,!0)}),0)}}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==
-g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(e,f){mxSettings.setUi(e);(f=this.doSetCurrentTheme(e)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(e,f){function g(ka){return""==ka||"dark"==ka||"kennedy"==ka||null==ka}var v=Editor.currentTheme;e=g(e)?"default":e;v=g(v)?"default":v;var y="simple"==v&&"default"==e||"default"==v&&"simple"==e;if(y&&!this.themeSwitching){Editor.currentTheme=e;this.themeSwitching=!0;
-var C=this.editor.graph.view.translate,I=C.x,D=C.y,N=mxUtils.getOffset(this.editor.graph.container),G=this.editor.graph.container.scrollLeft-N.x,ia=this.editor.graph.container.scrollTop-N.y;f=null!=f?f:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"simple"==v&&"default"==e?(this.sidebarFooterContainer.style.display=
-"block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==v&&"simple"==e&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display=
-"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(e);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();var ka=this.editor.graph.view.scale;N=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=G+N.x+(C.x-I)*ka;this.editor.graph.container.scrollTop=ia+N.y+(C.y-D)*
-ka;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),f)}),f)}),f)}),0)}return y};EditorUi.prototype.installStatusMinimizer=function(e){e=null!=e?e:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(){""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-block")}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,
-function(){f||(this.statusContainer.style.display="none")}));var g=mxUtils.bind(this,function(){if("simple"==Editor.currentTheme||"1"==urlParams.sketch){var v=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=v&&null!=v.getAttribute("class");if(!f&&null!=v){v=v.getAttribute("title");var y=this.getCurrentFile();y=null!=y?y.savingStatusKey:DrawioFile.prototype.savingStatusKey;v==mxResources.get(y)+"..."&&
-(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(y))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";v=26>e.clientWidth;e.style.visibility=v&&""==this.editor.getStatus()?"hidden":"";if(v||f)this.statusContainer.style.display="inline-block",f=!0}});this.editor.addListener("statusChanged",g);g()};EditorUi.prototype.switchTheme=function(e){"default"==e&&(null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex=
-"1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer)),this.toggleCompactMode(!0));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();
-this.switchThemeConstants(e);this.switchCssForTheme(e);this.createWrapperForTheme(e);this.createPickerMenuForTheme(e);this.createMainMenuForTheme(e);this.createMenubarForTheme(e);this.createFooterMenuForTheme(e);this.sidebarContainer.style.display="";"simple"==e&&(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),
-this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%");null!=this.format&&(e="default"==e||"atlas"==e,this.format.showCloseButton!=e&&(this.format.showCloseButton=e,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=
-this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&
-(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(e){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=e);"simple"==e?(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,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),f.defaultEdgeLength=120,null==urlParams.grid&&(f.defaultGridEnabled=
-!1),null==urlParams.pv&&(f.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(e){"simple"==e?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=
-Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(e){"simple"==e?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),
-this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(e){"simple"==e&&null==this.sketchMainMenuElt&&(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText=
-"position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",
-Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(e){if("simple"==e&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
-e=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";e.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var v=null!=this.pages?this.pages.length:1,y=this.getPageIndex(this.currentPage);y=null!=y?y+1:1;var C=this.currentPage.getId();
-f.setAttribute("title",this.currentPage.getName()+" ("+y+"/"+v+")"+(null!=C?" ["+C+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
-g);this.editor.addListener("pagesPatched",g);g();e.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));g=this.createMenu("viewZoom");g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";e.appendChild(g);mxUtils.bind(this,function(v){mxEvent.addListener(v,"click",
-mxUtils.bind(this,function(C){mxEvent.isAltDown(C)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var y=mxUtils.bind(this,function(){v.innerText="";mxUtils.write(v,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,y);this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",
-y)})(g);e.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(e){if("simple"==e&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
+function(){window.openFile=null});if(!f){var x=this.dialog,B=x.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=v;B.apply(x,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var v=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(B){if(mxUtils.isEmptyObject(B.files))g();else{var I=0,D,N=!1;B.forEach(function(G,ia){G=
+ia.name.toLowerCase();"diagram/diagram.xml"==G?(N=!0,ia.async("string").then(function(ka){0==ka.indexOf("<mxfile ")?f(ka):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>I&&(I=G,D=ia))});0<I?D.async("string").then(function(G){(new XMLHttpRequest).upload&&v.isRemoteFileFormat(G,d.name)?v.isOffline()?v.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):v.parseFileData(G,mxUtils.bind(this,function(ia){4==ia.readyState&&(200<=ia.status&&299>=ia.status?f(ia.responseText):
+g())}),d.name):g()}):N||g()}},function(B){g(B)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.importFile=function(d,f,g,v,x,B,I,D,N,G,ia,ka){G=null!=G?G:!0;var ja=!1,ca=null,pa=mxUtils.bind(this,function(ra){var L=null;null!=ra&&"<mxlibrary"==ra.substring(0,10)?this.loadLibrary(new LocalLibrary(this,ra,I)):L=this.importXml(ra,g,v,G,null,null!=ka?mxEvent.isControlDown(ka):null);null!=
+D&&D(L)});"image"==f.substring(0,5)?(N=!1,"image/png"==f.substring(0,9)&&(f=ia?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(ca=this.importXml(f,g,v,G,null,null!=ka?mxEvent.isControlDown(ka):null),N=!0)),N||(f=this.editor.graph,N=d.indexOf(";"),0<N&&(d=d.substring(0,N)+d.substring(d.indexOf(",",N+1))),G&&f.isGridEnabled()&&(g=f.snap(g),v=f.snap(v)),ca=[f.insertVertex(null,null,"",g,v,x,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";")])):/(\.*<graphml )/.test(d)?(ja=!0,this.importGraphML(d,pa)):null!=N&&null!=I&&(/(\.v(dx|sdx?))($|\?)/i.test(I)||/(\.vs(x|sx?))($|\?)/i.test(I))?(ja=!0,this.importVisio(N,pa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ja=!0,x=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?pa(ra.responseText):null!=D&&(D(null),this.showError(mxResources.get("error"),413==
+ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,x,I):this.parseFile(N,x,I)):0==d.indexOf("PK")&&null!=N?(ja=!0,this.importZipFile(N,pa,mxUtils.bind(this,function(){ca=this.insertTextAt(this.validateFileData(d),g,v,!0,null,G);D(ca)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ca=this.insertTextAt(this.validateFileData(d),g,v,!0,null,G,null,null!=ka?mxEvent.isControlDown(ka):null));ja||null==D||D(ca);return ca};EditorUi.prototype.importFiles=
+function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja){v=null!=v?v:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var ca=null!=f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var ra=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var L=ia||this.resampleThreshold,V=0;V<d.length;V++)if("image/svg"!==d[V].type.substring(0,9)&&"image/"===d[V].type.substring(0,6)&&d[V].size>L){ra=!0;break}var R=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.gridSize;x=null!=x?x:mxUtils.bind(this,function(U,da,fa,na,sa,za,ua,Ba,oa){try{return null!=
+U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,ua)),null):"atlassian"!=this.getServiceName()&&"1"!=urlParams.embed&&this.isCompatibleString(U)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,U,ua,!0)),null):this.importFile(U,da,fa,na,sa,za,ua,Ba,oa,ca,ka,ja)}catch(Aa){return this.handleError(Aa),null}});B=null!=B?B:mxUtils.bind(this,function(U){Y.setSelectionCells(U)});if(this.spinner.spin(document.body,
+mxResources.get("loading")))for(var la=d.length,q=la,F=[],T=mxUtils.bind(this,function(U,da){F[U]=da;if(0==--q){this.spinner.stop();if(null!=D)D(F);else{var fa=[];Y.getModel().beginUpdate();try{for(U=0;U<F.length;U++){var na=F[U]();null!=na&&(fa=fa.concat(na))}}finally{Y.getModel().endUpdate()}}B(fa)}}),aa=0;aa<la;aa++)mxUtils.bind(this,function(U){var da=d[U];if(null!=da){var fa=new FileReader;fa.onload=mxUtils.bind(this,function(na){if(null==I||I(da))if("image/"==da.type.substring(0,6))if("image/svg"==
+da.type.substring(0,9)){var sa=Graph.clipSvgDataUri(na.target.result),za=sa.indexOf(",");za=decodeURIComponent(escape(atob(sa.substring(za+1))));var ua=mxUtils.parseXml(za);za=ua.getElementsByTagName("svg");if(0<za.length){za=za[0];var Ba=ka?null:za.getAttribute("content");null!=Ba&&"<"!=Ba.charAt(0)&&"%"!=Ba.charAt(0)&&(Ba=unescape(window.atob?atob(Ba):Base64.decode(Ba,!0)));null!=Ba&&"%"==Ba.charAt(0)&&(Ba=decodeURIComponent(Ba));null==Ba||"<mxfile "!==Ba.substring(0,8)&&"<mxGraphModel "!==Ba.substring(0,
+14)?T(U,mxUtils.bind(this,function(){try{if(null!=ua){var ya=ua.getElementsByTagName("svg");if(0<ya.length){var La=ya[0],Oa=La.getAttribute("width"),Na=La.getAttribute("height");Oa=null!=Oa&&"%"!=Oa.charAt(Oa.length-1)?parseFloat(Oa):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Ia=La.getAttribute("viewBox");if(null==Ia||0==Ia.length)La.setAttribute("viewBox","0 0 "+Oa+" "+Na);else if(isNaN(Oa)||isNaN(Na)){var wa=Ia.split(" ");3<wa.length&&(Oa=parseFloat(wa[2]),Na=parseFloat(wa[3]))}sa=
+Editor.createSvgDataUri(mxUtils.getXml(La));var ab=Math.min(1,Math.min(v/Math.max(1,Oa)),v/Math.max(1,Na)),Ya=x(sa,da.type,f+U*Z,g+U*Z,Math.max(1,Math.round(Oa*ab)),Math.max(1,Math.round(Na*ab)),da.name);if(isNaN(Oa)||isNaN(Na)){var y=new Image;y.onload=mxUtils.bind(this,function(){Oa=Math.max(1,y.width);Na=Math.max(1,y.height);Ya[0].geometry.width=Oa;Ya[0].geometry.height=Na;La.setAttribute("viewBox","0 0 "+Oa+" "+Na);sa=Editor.createSvgDataUri(mxUtils.getXml(La));var O=sa.indexOf(";");0<O&&(sa=
+sa.substring(0,O)+sa.substring(sa.indexOf(",",O+1)));Y.setCellStyles("image",sa,[Ya[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(La))}return Ya}}}catch(O){}return null})):T(U,mxUtils.bind(this,function(){return x(Ba,"text/xml",f+U*Z,g+U*Z,0,0,da.name)}))}else T(U,mxUtils.bind(this,function(){return null}))}else{za=!1;if("image/png"==da.type){var oa=ka?null:this.extractGraphModelFromPng(na.target.result);if(null!=oa&&0<oa.length){var Aa=new Image;Aa.src=na.target.result;T(U,mxUtils.bind(this,
+function(){return x(oa,"text/xml",f+U*Z,g+U*Z,Aa.width,Aa.height,da.name)}));za=!0}}za||(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(na.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,na.target.result,mxUtils.bind(this,function(La,Oa,
+Na){T(U,mxUtils.bind(this,function(){if(null!=La&&La.length<G){var Ia=pa&&this.isResampleImageSize(da.size,ia)?Math.min(1,Math.min(v/Oa,v/Na)):1;return x(La,da.type,f+U*Z,g+U*Z,Math.round(Oa*Ia),Math.round(Na*Ia),da.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,v,ia,da.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=na.target.result,x(sa,da.type,f+U*Z,g+U*Z,240,160,da.name,function(ya){T(U,
+function(){return ya})},da)});/(\.v(dx|sdx?))($|\?)/i.test(da.name)||/(\.vs(x|sx?))($|\?)/i.test(da.name)?x(null,da.type,f+U*Z,g+U*Z,240,160,da.name,function(na){T(U,function(){return na})},da):"image"==da.type.substring(0,5)||"application/pdf"==da.type?fa.readAsDataURL(da):fa.readAsText(da)}})(aa)});if(ra){ra=[];for(V=0;V<d.length;V++)ra.push(d[V]);d=ra;this.confirmImageResize(function(Y){pa=Y;R()},N)}else R()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
+this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},v=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(B,I){if(B||f)mxSettings.setResizeImages(B?I:null),mxSettings.save();g();d(I)};null==v||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(B){x(B,
+!0)},function(B){x(B,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):x(!1,v)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var v=new FileReader;v.onload=mxUtils.bind(this,function(){this.parseFileData(v.result,f,g)});v.readAsText(d)};EditorUi.prototype.parseFileData=
+function(d,f,g){var v=new XMLHttpRequest;v.open("POST",OPEN_URL);v.setRequestHeader("Content-Type","application/x-www-form-urlencoded");v.onreadystatechange=function(){f(v)};v.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,v,x,B,
+I){x=null!=x?x:this.maxImageSize;var D=Math.max(1,d.width),N=Math.max(1,d.height);if(v&&this.isResampleImageSize(null!=I?I:f.length,B))try{var G=Math.max(D/x,N/x);if(1<G){var ia=Math.round(D/G),ka=Math.round(N/G),ja=document.createElement("canvas");ja.width=ia;ja.height=ka;ja.getContext("2d").drawImage(d,0,0,ia,ka);var ca=ja.toDataURL();if(ca.length<f.length){var pa=document.createElement("canvas");pa.width=ia;pa.height=ka;var ra=pa.toDataURL();ca!==ra&&(f=ca,D=ia,N=ka)}}}catch(L){}g(f,D,N)};EditorUi.prototype.extractGraphModelFromPng=
+function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var v=new Image;v.onload=function(){v.width=0<v.width?v.width:120;v.height=0<v.height?v.height:120;f(v)};null!=g&&(v.onerror=g);v.src=d}catch(x){if(null!=g)g(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=
+mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(L){var V=L.getEvent();
+return null==L.getState()&&!mxEvent.isMouseEvent(V)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(V)&&(null==L.getState()||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V))});f.cellEditor.editPlantUmlData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(d,mxResources.get("plantUml")+":",Y.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Z,Y.format,function(la,q,F){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==Y.format)f.labelChanged(L,
+"<pre>"+la+"</pre>"),f.updateCellSize(L,!0);else{f.setCellStyles("image",d.convertDataUri(la),[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=q,T.height=F,f.cellsResized([L],[T],!1))}f.setAttributeForCell(L,"plantUmlData",JSON.stringify({data:Z,format:Y.format}))}finally{f.getModel().endUpdate()}},function(la){d.handleError(la)})},null,null,400,220);d.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(d,
+mxResources.get("mermaid")+":",Y.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(Z,Y.config,function(la,q,F){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",la,[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=Math.max(T.width,q),T.height=Math.max(T.height,F),f.cellsResized([L],[T],!1));f.setAttributeForCell(L,"mermaidData",JSON.stringify({data:Z,config:Y.config},null,2))}finally{f.getModel().endUpdate()}},
+function(la){d.handleError(la)})},null,null,400,220);d.showDialog(V.container,420,300,!0,!0);V.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(L,V){try{var R=this.graph.getAttributeForCell(L,"plantUmlData");if(null!=R)this.editPlantUmlData(L,V,R);else if(R=this.graph.getAttributeForCell(L,"mermaidData"),null!=R)this.editMermaidData(L,V,R);else{var Y=f.getCellStyle(L);"1"==mxUtils.getValue(Y,"metaEdit","0")?d.showDataDialog(L):g.apply(this,arguments)}}catch(Z){d.handleError(Z)}};
+f.getLinkTitle=function(L){return d.getLinkTitle(L)};f.customLinkClicked=function(L){var V=!1;try{d.handleCustomLink(L),V=!0}catch(R){d.handleError(R)}return V};var v=f.parseBackgroundImage;f.parseBackgroundImage=function(L){var V=v.apply(this,arguments);null!=V&&null!=V.src&&Graph.isPageLink(V.src)&&(V={originalSrc:V.src});return V};var x=f.setBackgroundImage;f.setBackgroundImage=function(L){null!=L&&null!=L.originalSrc&&(L=d.createImageForPageLink(L.originalSrc,d.currentPage,this));x.apply(this,
+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(L,V){L=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=L){var R=L.indexOf(",");if(0<R)for(L=L.substring(R+1),V=V.getProperty("patches"),R=0;R<V.length;R++)if(null!=V[R][EditorUi.DIFF_UPDATE]&&null!=V[R][EditorUi.DIFF_UPDATE][L]||
+null!=V[R][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(V[R][EditorUi.DIFF_REMOVE],L)){f.refreshBackgroundImage();break}}}));var B=f.getBackgroundImageObject;f.getBackgroundImageObject=function(L,V){var R=B.apply(this,arguments);if(null!=R&&null!=R.originalSrc)if(!V)R={src:R.originalSrc};else if(V&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var Y=this.stylesheet,Z=this.shapeForegroundColor,la=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor=
+"#ffffff";this.shapeForegroundColor="#000000";R=d.createImageForPageLink(R.originalSrc);this.shapeBackgroundColor=la;this.shapeForegroundColor=Z;this.stylesheet=Y}return R};var I=this.clearDefaultStyle;this.clearDefaultStyle=function(){I.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 D=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(L){L=null!=L?L:"";"1"==urlParams.dev&&(L+=(0<L.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var N=f.addClickHandler;f.addClickHandler=function(L,V,R){var Y=V;V=function(Z,la){if(null==la){var q=mxEvent.getSource(Z);"a"==q.nodeName.toLowerCase()&&(la=q.getAttribute("href"))}null!=la&&f.isCustomLink(la)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(la)&&mxEvent.consume(Z);
+null!=Y&&Y(Z,la)};N.call(this,L,V,R)};C.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(L,V,R){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(L,"delete - cut copy copyAsImage - duplicate".split(" "),null,R)}}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 ia=f.getExportVariables;f.getExportVariables=function(){var L=ia.apply(this,arguments),V=d.getCurrentFile();null!=V&&(L.filename=V.getTitle());L.pagecount=null!=d.pages?d.pages.length:1;L.page=null!=d.currentPage?d.currentPage.getName():"";L.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return L};var ka=f.getGlobalVariable;f.getGlobalVariable=function(L){var V=
+d.getCurrentFile();return"filename"==L&&null!=V?V.getTitle():"page"==L&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==L?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==L?null!=d.pages?d.pages.length:1:ka.apply(this,arguments)};var ja=f.labelLinkClicked;f.labelLinkClicked=function(L,V,R){var Y=V.getAttribute("href");if(null==Y||!f.isCustomLink(Y)||!mxEvent.isTouchEvent(R)&&mxEvent.isPopupTrigger(R))ja.apply(this,arguments);else{if(!f.isEnabled()||
+null!=L&&f.isCellLocked(L.cell))f.customLinkClicked(Y),f.getRubberband().reset();mxEvent.consume(R)}};this.editor.getOrCreateFilename=function(){var L=d.defaultFilename,V=d.getCurrentFile();null!=V&&(L=null!=V.getTitle()?V.getTitle():L);return L};var ca=this.actions.get("print");ca.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ca.visible=ca.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,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,
+!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(L){var V=f.cellEditor.text2,R=null;null!=V&&(mxEvent.addListener(V,"dragleave",function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);Y.stopPropagation();
+Y.preventDefault()}),mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==R&&(!mxClient.IS_IE||10<document.documentMode)&&(R=this.highlightElement(V));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(V,"drop",mxUtils.bind(this,function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);if(0<Y.dataTransfer.files.length)this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,function(la,q,F,T,aa,U){f.insertImage(la,aa,U)},function(){},function(la){return"image/"==la.type.substring(0,
+6)},function(la){for(var q=0;q<la.length;q++)la[q]()},mxEvent.isControlDown(Y));else if(0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")){var Z=Y.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)?this.loadImage(decodeURIComponent(Z),mxUtils.bind(this,function(la){var q=Math.max(1,la.width);la=Math.max(1,la.height);var F=this.maxImageSize;F=Math.min(1,Math.min(F/Math.max(1,q)),F/Math.max(1,la));f.insertImage(decodeURIComponent(Z),q*F,la*F)})):document.execCommand("insertHTML",
+!1,Y.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(Y.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(Y.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"));Y.stopPropagation();Y.preventDefault()})))}));this.isSettingsEnabled()&&(ca=this.editor.graph.view,ca.setUnit(mxSettings.getUnit()),ca.addListener("unitChanged",function(L,V){mxSettings.setUnit(V.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,ca.unit),this.refresh());if("1"==urlParams.styledev){ca=document.getElementById("geFooter");null!=ca&&(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)})),ca.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(L,V){0<this.editor.graph.getSelectionCount()?(L=this.editor.graph.getSelectionCell(),
+L=this.editor.graph.getModel().getStyle(L),this.styleInput.value=L||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var pa=this.isSelectionAllowed;this.isSelectionAllowed=function(L){return mxEvent.getSource(L)==this.styleInput?!0:pa.apply(this,arguments)}}ca=document.getElementById("geInfo");null!=ca&&ca.parentNode.removeChild(ca);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var ra=null;mxEvent.addListener(f.container,"dragleave",
+function(L){f.isEnabled()&&(null!=ra&&(ra.parentNode.removeChild(ra),ra=null),L.stopPropagation(),L.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(L){null==ra&&(!mxClient.IS_IE||10<document.documentMode)&&(ra=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();L.stopPropagation();L.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(L){null!=ra&&(ra.parentNode.removeChild(ra),ra=null);if(f.isEnabled()){var V=
+mxUtils.convertPoint(f.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),R=L.dataTransfer.files,Y=f.view.translate,Z=f.view.scale,la=V.x/Z-Y.x,q=V.y/Z-Y.y;if(0<R.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(L)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(R,!0)):(mxEvent.isAltDown(L)&&(q=la=null),this.importFiles(R,la,q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(L),null,null,mxEvent.isShiftDown(L),L));else{mxEvent.isAltDown(L)&&
+(q=la=0);var F=0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")?L.dataTransfer.getData("text/uri-list"):null;V=this.extractGraphModelFromEvent(L,null!=this.pages);if(null!=V)f.setSelectionCells(this.importXml(V,la,q,!0));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")){var T=L.dataTransfer.getData("text/html");V=document.createElement("div");V.innerHTML=f.sanitizeHtml(T);var aa=null;R=V.getElementsByTagName("img");null!=R&&1==R.length?(T=R[0].getAttribute("src"),null==T&&(T=R[0].getAttribute("srcset")),
+/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)||(aa=!0)):(R=V.getElementsByTagName("a"),null!=R&&1==R.length?T=R[0].getAttribute("href"):(V=V.getElementsByTagName("pre"),null!=V&&1==V.length&&(T=mxUtils.getTextContent(V[0]))));var U=!0,da=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(T,la,q,!0,aa,null,U,mxEvent.isControlDown(L)))});aa&&null!=T&&T.length>this.resampleThreshold?this.confirmImageResize(function(fa){U=fa;da()},mxEvent.isControlDown(L)):da()}else null!=F&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?
+this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(fa){var na=Math.max(1,fa.width);fa=Math.max(1,fa.height);var sa=this.maxImageSize;sa=Math.min(1,Math.min(sa/Math.max(1,na)),sa/Math.max(1,fa));f.setSelectionCell(f.insertVertex(null,null,"",la,q,na*sa,fa*sa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+F+";"))}),mxUtils.bind(this,function(fa){f.setSelectionCells(this.insertTextAt(F,la,q,!0))})):0<=mxUtils.indexOf(L.dataTransfer.types,
+"text/plain")&&f.setSelectionCells(this.insertTextAt(L.dataTransfer.getData("text/plain"),la,q,!0))}}L.stopPropagation();L.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();ca=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",ca);this.addListener("sketchModeChanged",ca);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();
+this.refresh()}));f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));"simple"==Editor.currentTheme&&(Editor.currentTheme="",this.doSetCurrentTheme("simple",0));mxClient.IS_IE||mxClient.IS_IE11||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(ca=!1,this.isSettingsEnabled()&&(ca="auto"==mxSettings.settings.darkMode||"auto"==urlParams.dark?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches:
+!0===mxSettings.settings.darkMode),(ca||"dark"==uiTheme||"1"==urlParams.dark)&&this.setDarkMode(!0));this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,v=!1,x=0;x<g.types.length;x++)if("text/"===g.types[x].substring(0,5)){v=!0;break}if(!v){var B=g.items;for(index in B){var I=
+B[index];if("file"===I.kind){if(d.isEditing())this.importFiles([I.getAsFile()],0,0,this.maxImageSize,function(N,G,ia,ka,ja,ca){d.insertImage(N,ja,ca)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var G=0;G<N.length;G++)N[G]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([I.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(N){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML=
+"&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow=
+"hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(B){var I=mxEvent.getSource(B);null==f.container||!f.isEnabled()||f.isMouseDown||
+f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||"TEXTAREA"==I.nodeName||224!=B.keyCode&&(mxClient.IS_MAC||17!=B.keyCode)&&(!mxClient.IS_MAC||91!=B.keyCode&&93!=B.keyCode)||v||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",B=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(g),v=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=B,f.container.scrollTop=I)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
+function(B){var I=B.keyCode;window.setTimeout(mxUtils.bind(this,function(){!v||224!=I&&17!=I&&91!=I&&93!=I||(v=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(B){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(I){this.handleError(I)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(B){if(f.isEnabled())try{mxClipboard.copy(f),
+this.copyCells(g,!0),d()}catch(I){this.handleError(I)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(B){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=B.clipboardData&&this.pasteCells(B,g,!0,!0),!mxEvent.isConsumed(B))){var I=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=I;f.container.scrollTop=D;this.pasteCells(B,g,!1,!0)}),0)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=
+function(B){return mxEvent.getSource(B)==g?!0:x.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d,f){function g(ka){return""==ka||"dark"==ka||"kennedy"==ka||null==ka}var v=Editor.currentTheme;d=g(d)?"default":d;v=g(v)?"default":v;var x="simple"==v&&"default"==d||"default"==v&&"simple"==d;if(x&&!this.themeSwitching){Editor.currentTheme=
+d;this.themeSwitching=!0;var B=this.editor.graph.view.translate,I=B.x,D=B.y,N=mxUtils.getOffset(this.editor.graph.container),G=this.editor.graph.container.scrollLeft-N.x,ia=this.editor.graph.container.scrollTop-N.y;f=null!=f?f:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"simple"==v&&"default"==d?(this.sidebarFooterContainer.style.display=
+"block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==v&&"simple"==d&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display=
+"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.graph.refresh();var ka=this.editor.graph.view.scale;N=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=G+N.x+(B.x-I)*ka;this.editor.graph.container.scrollTop=ia+N.y+(B.y-D)*ka;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),f)}),f)}),f)}),0)}return x};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-block")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){f||(this.statusContainer.style.display="none")}));
+var g=mxUtils.bind(this,function(){if("simple"==Editor.currentTheme||"1"==urlParams.sketch){var v=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=v&&null!=v.getAttribute("class");if(!f&&null!=v){v=v.getAttribute("title");var x=this.getCurrentFile();x=null!=x?x.savingStatusKey:DrawioFile.prototype.savingStatusKey;v==mxResources.get(x)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(x))+
+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";v=26>d.clientWidth;d.style.visibility=v&&""==this.editor.getStatus()?"hidden":"";if(v||f)this.statusContainer.style.display="inline-block",f=!0}});this.editor.addListener("statusChanged",g);g()};EditorUi.prototype.switchTheme=function(d){"default"==d&&(null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&
+this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer)),this.toggleCompactMode(!0));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);
+this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display="";"simple"==d&&(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom=
+"63px",this.sidebarContainer.style.width="100%");null!=this.format&&(d="default"==d||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&
+(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),
+this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(d){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=d);"simple"==d?(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,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),f.defaultEdgeLength=120,null==urlParams.grid&&(f.defaultGridEnabled=!1),null==urlParams.pv&&(f.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=
+mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(d){"simple"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),
+this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"simple"==d?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,
+this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(d){"simple"==d&&null==this.sketchMainMenuElt&&(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
+this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(d){if("simple"==d&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=
+document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";d=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";
+d.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var v=null!=this.pages?this.pages.length:1,x=this.getPageIndex(this.currentPage);x=null!=x?x+1:1;var B=this.currentPage.getId();f.setAttribute("title",this.currentPage.getName()+" ("+x+"/"+v+")"+(null!=B?" ["+B+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",
+g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",g);this.editor.addListener("pagesPatched",g);g();d.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));g=this.createMenu("viewZoom");g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";
+d.appendChild(g);mxUtils.bind(this,function(v){mxEvent.addListener(v,"click",mxUtils.bind(this,function(B){mxEvent.isAltDown(B)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(B)):mxEvent.isShiftDown(B)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(B))}));var x=mxUtils.bind(this,function(){v.innerText="";mxUtils.write(v,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,x);this.editor.addListener("resetGraphView",
+x);this.editor.addListener("pageSelected",x)})(g);d.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(d){if("simple"==d&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;max-height:100%;width:48px;z-index:1;box-sizing:border-box;transform:translate(0, -50%);top:50%;user-select:none;";
var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var v=this.createMenuItem("insertFreehand",Editor.freehandImage,
-!0);v.style.paddingLeft="12px";v.style.backgroundSize="";v.style.width="26px";v.style.height="30px";v.style.opacity="0.7";var y=this.createMenu("insert",Editor.shapesImage);y.style.backgroundSize="";y.style.marginBottom="4px";y.style.display="block";y.style.width="30px";y.style.height="30px";y.style.padding="4px";y.style.opacity="0.7";var C=!1,I=mxUtils.bind(this,function(){f.innerText="";if(!C){var D=function(G,ia,ka,ja){null!=ia&&G.setAttribute("title",ia);G.style.cursor="pointer";G.style.margin=
+!0);v.style.paddingLeft="12px";v.style.backgroundSize="";v.style.width="26px";v.style.height="30px";v.style.opacity="0.7";var x=this.createMenu("insert",Editor.shapesImage);x.style.backgroundSize="";x.style.marginBottom="4px";x.style.display="block";x.style.width="30px";x.style.height="30px";x.style.padding="4px";x.style.opacity="0.7";var B=!1,I=mxUtils.bind(this,function(){f.innerText="";if(!B){var D=function(G,ia,ka,ja){null!=ia&&G.setAttribute("title",ia);G.style.cursor="pointer";G.style.margin=
"8px 0px";G.style.display="block";f.appendChild(G);null!=ja&&(G.style.position="relative",G.style.overflow="visible",ia=document.createElement("div"),ia.style.position="absolute",ia.style.fontSize="8px",ia.style.left="32px",ia.style.top="28px",mxUtils.write(ia,ja),G.appendChild(ia));return G};D(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
" (A)",null,"A");D(this.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")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");D(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");D(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var N=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");N.geometry.setTerminalPoint(new mxPoint(0,0),!0);N.geometry.setTerminalPoint(new mxPoint(N.geometry.width,0),!1);N.geometry.points=
[];N.geometry.relative=!0;N.edge=!0;D(this.sidebar.createEdgeTemplateFromCells([N],N.geometry.width,N.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");N=N.clone();N.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";N.geometry.width=this.editor.graph.defaultEdgeLength+20;N.geometry.setTerminalPoint(new mxPoint(0,20),!0);N.geometry.setTerminalPoint(new mxPoint(N.geometry.width,20),!1);
-D(this.sidebar.createEdgeTemplateFromCells([N],N.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(v,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(y)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){C?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
-g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",C=!1,I()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",C=!0)}));this.addListener("darkModeChanged",
-I);this.addListener("sketchModeChanged",I);I();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(e){"simple"==e?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="display:flex;position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;flex-wrap:nowrap;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;max-width:calc(100% - 170px);min-width:40px;justify-content:flex-end;align-items:center;",
-this.sketchWrapperElt.appendChild(this.sketchMenubarElt),"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&this.installStatusMinimizer(this.sketchMenubarElt)),null!=this.statusContainer&&(this.statusContainer.style.flexShrink="1",this.statusContainer.style.overflow="hidden",this.sketchMenubarElt.appendChild(this.statusContainer)),null!=this.userElement&&(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement)),e=this.menubar.langIcon,
-null!=e&&(e.style.position="",e.style.height="21px",e.style.width="21px",e.style.flexShrink="0",this.sketchMenubarElt.appendChild(e)),null!=this.buttonContainer&&(this.buttonContainer.style.flexShrink="0",this.buttonContainer.style.padding="0px",this.buttonContainer.style.position="",this.sketchMenubarElt.appendChild(this.buttonContainer))):(null!=this.statusContainer&&(this.menubar.container.appendChild(this.statusContainer),this.statusContainer.style.flexShrink="",this.statusContainer.style.overflow=
-""),null!=this.userElement&&(this.userElement.style.flexShrink="",this.userElement.style.top="3px",this.menubarContainer.appendChild(this.userElement)),e=this.menubar.langIcon,null!=e&&(e.style.position="absolute",e.style.height="18px",e.style.width="18px",e.style.flexShrink="",this.menubarContainer.parentNode.insertBefore(e,this.menubarContainer)))};EditorUi.prototype.createMenu=function(e,f){var g=this.menus.get(e),v=this.menubar.addMenu(mxResources.get(e),g.funct);v.className="geToolbarButton";
-v.style.display="inline-block";v.style.cursor="pointer";v.style.height="24px";v.setAttribute("title",mxResources.get(e));this.menus.menuCreated(g,v,"geToolbarButton");null!=f&&(v.style.backgroundImage="url("+f+")",v.style.backgroundPosition="center center",v.style.backgroundRepeat="no-repeat",v.style.backgroundSize="100% 100%",v.style.width="24px",v.innerText="");return v};EditorUi.prototype.createMenuItem=function(e,f,g){var v=document.createElement("a");v.className="geToolbarButton";v.setAttribute("title",
-mxResources.get(e));v.style.backgroundImage="url("+f+")";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";v.style.backgroundSize="100% 100%";v.style.display="inline-block";v.style.cursor="pointer";v.style.marginLeft="6px";v.style.width="24px";v.style.height="24px";var y=this.actions.get(e);null!=y&&(mxEvent.addListener(v,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(v,"click",function(C){"disabled"!=
-v.getAttribute("disabled")&&y.funct(C);mxEvent.consume(C)}),g||(e=function(){y.isEnabled()?(v.removeAttribute("disabled"),v.style.cursor="pointer"):(v.setAttribute("disabled","disabled"),v.style.cursor="default");v.style.opacity=y.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",e),y.addListener("stateChanged",e),e()));return v};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var e=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==
-urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),e,f,240,g,mxUtils.bind(this,function(v){v.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};
-var p=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(e){var f=this.formatWindow;null!=f?f.window.setVisible(null!=e?e:!this.isFormatPanelVisible()):p.apply(this,arguments)};var E=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var e=this.formatWindow;return null!=e?e.window.isVisible():E.apply(this,arguments)};var M=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){if(null!=this.sketchWrapperElt&&null!=
-this.sketchWrapperElt.parentNode){e=null!=e?e:!0;var f=this.getDiagramContainerOffset();this.diagramContainer.style.left=f.x+"px";this.diagramContainer.style.top=f.y+"px";this.diagramContainer.style.right="0";this.diagramContainer.style.bottom="0";e&&this.editor.graph.sizeDidChange()}else M.apply(this,arguments)};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var e=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
-650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?66:10,"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,e-6,f-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
-0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(e){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(e);null==urlParams.rough&&(mxSettings.settings.sketchMode=e,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+
-(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
-"html > body > div > .geToolbarContainer { box-shadow:0px 2px 10px #e0e0e0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
+D(this.sidebar.createEdgeTemplateFromCells([N],N.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(v,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(x)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){B?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="48px",f.style.top="50%",f.style.bottom="",f.style.height="",
+g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.width="100%",g.style.height="14px",B=!1,I()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.width="auto",f.style.bottom="12px",f.style.padding="0px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.width="24px",g.style.height="24px",B=!0)}));this.addListener("darkModeChanged",
+I);this.addListener("sketchModeChanged",I);I();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(d){"simple"==d?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="display:flex;position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;flex-wrap:nowrap;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;max-width:calc(100% - 170px);min-width:40px;justify-content:flex-end;align-items:center;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt),d=mxUtils.bind(this,function(){var f=58>this.sketchPickerMenuElt.offsetTop-this.sketchPickerMenuElt.offsetHeight/2;this.sketchMainMenuElt.style.left=f?"70px":"10px";this.sketchMenubarElt.style.maxWidth=f?"calc(100% - 230px)":"calc(100% - 170px)"}),d(),mxEvent.addListener(window,"resize",d)),null!=this.statusContainer&&(this.statusContainer.style.flexShrink="1",this.sketchMenubarElt.appendChild(this.statusContainer)),null!=this.userElement&&
+(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement)),d=this.menubar.langIcon,null!=d&&(d.style.position="",d.style.height="21px",d.style.width="21px",d.style.flexShrink="0",this.sketchMenubarElt.appendChild(d)),null!=this.buttonContainer&&(this.buttonContainer.style.flexShrink="0",this.buttonContainer.style.padding="0px",this.buttonContainer.style.position="",this.sketchMenubarElt.appendChild(this.buttonContainer))):(null!=this.statusContainer&&
+(this.menubar.container.appendChild(this.statusContainer),this.statusContainer.style.flexShrink="",this.statusContainer.style.overflow=""),null!=this.userElement&&(this.userElement.style.flexShrink="",this.userElement.style.top="3px",this.menubarContainer.appendChild(this.userElement)),d=this.menubar.langIcon,null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.flexShrink="",this.menubarContainer.parentNode.insertBefore(d,this.menubarContainer)))};EditorUi.prototype.createMenu=
+function(d,f,g){g=null!=g?g:"geToolbarButton";var v=this.menus.get(d),x=this.menubar.addMenu(mxResources.get(d),v.funct);x.className=g;x.style.display="inline-block";x.style.cursor="pointer";x.style.height="24px";x.setAttribute("title",mxResources.get(d));this.menus.menuCreated(v,x,g);null!=f&&(x.style.backgroundImage="url("+f+")",x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize="100% 100%",x.style.width="24px",x.innerText="");return x};EditorUi.prototype.createToolbarButton=
+function(d,f,g,v){v=null!=v?v:24;var x=document.createElement("a");x.className="geToolbarButton geAdaptiveAsset";x.setAttribute("title",f);x.style.backgroundImage="url("+d+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="100% 100%";x.style.display="inline-block";x.style.cursor="pointer";x.style.marginLeft="6px";x.style.width=v+"px";x.style.height=v+"px";null!=g&&(mxEvent.addListener(x,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
+function(B){B.preventDefault()})),mxEvent.addListener(x,"click",function(B){"disabled"!=x.getAttribute("disabled")&&g(B);mxEvent.consume(B)}));return x};EditorUi.prototype.createMenuItem=function(d,f,g){var v=this.actions.get(d),x=null!=v?v.funct:null,B=this.createToolbarButton(f,mxResources.get(d),x);null==v||g||(d=function(){v.isEnabled()?(B.removeAttribute("disabled"),B.style.cursor="pointer"):(B.setAttribute("disabled","disabled"),B.style.cursor="default");B.style.opacity=v.isEnabled()?"":"0.2"},
+this.editor.graph.addListener("enabledChanged",d),v.addListener("stateChanged",d),d());return B};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,f,240,g,mxUtils.bind(this,
+function(v){v.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};var p=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var f=this.formatWindow;null!=f?f.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):p.apply(this,arguments)};var E=EditorUi.prototype.isFormatPanelVisible;
+EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():E.apply(this,arguments)};var M=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){d=null!=d?d:!0;var f=this.getDiagramContainerOffset();this.diagramContainer.style.left=f.x+"px";this.diagramContainer.style.top=f.y+"px";this.diagramContainer.style.right="0";this.diagramContainer.style.bottom="0";d&&this.editor.graph.sizeDidChange()}else M.apply(this,
+arguments)};EditorUi.prototype.createShapesPanel=function(d){var f=document.createElement("div");f.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;";f.className="geTitle";var g=document.createElement("span");g.style.fontSize="18px";g.style.marginRight="5px";g.innerHTML="+";f.appendChild(g);mxUtils.write(f,mxResources.get("moreShapes"));d.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,
+function(){this.actions.get("shapes").funct()}));g=mxUtils.bind(this,function(v,x){v=this.createMenu(v,null,"geTitle");v.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;";d.appendChild(v);return v});!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?f.style.bottom="0":null!=this.actions.get("newLibrary")?(f=document.createElement("div"),f.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+f.className="geTitle",g=document.createElement("span"),g.style.cssText="position:relative;top:6px;",mxUtils.write(g,mxResources.get("newLibrary")),f.appendChild(g),d.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.borderLeft="1px solid lightgray",g=g.cloneNode(!1),mxUtils.write(g,mxResources.get("openLibrary")),f.appendChild(g),d.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct)):(f=g("newLibrary",
+mxResources.get("newLibrary")),f.style.boxSizing="border-box",f.style.paddingRight="6px",f.style.paddingLeft="6px",f.style.height="32px",f.style.left="0",f=g("openLibraryFrom",mxResources.get("openLibraryFrom")),f.style.borderLeft="1px solid lightgray",f.style.boxSizing="border-box",f.style.paddingRight="6px",f.style.paddingLeft="6px",f.style.height="32px",f.style.left="50%");d.appendChild(this.sidebarContainer);d.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==
+this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?66:10,"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,d-6,f-6,mxUtils.bind(this,function(g){this.createShapesPanel(g)}));
+this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());
+this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+"html > body > div > .geToolbarContainer { box-shadow:0px 2px 10px #e0e0e0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html body .geStatus > *:not([class]) { vertical-align:top; }html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }html body .geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+
"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(e){this.doSetDarkMode(e);this.fireEvent(new mxEventObject("darkModeChanged"))};var S=document.createElement("link");S.setAttribute("rel","stylesheet");S.setAttribute("href",STYLE_PATH+"/dark.css");S.setAttribute("charset","UTF-8");S.setAttribute("type","text/css");
-EditorUi.prototype.doSetDarkMode=function(e){if(Editor.darkMode!=e){var f=this.editor.graph;Editor.darkMode=e;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":
-"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&(e=this.actions.layersWindow.window.isVisible(),
-this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,e&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=f.defaultPageBorderColor;
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(d){this.doSetDarkMode(d);this.fireEvent(new mxEventObject("darkModeChanged"))};var S=document.createElement("link");S.setAttribute("rel","stylesheet");S.setAttribute("href",STYLE_PATH+"/dark.css");S.setAttribute("charset","UTF-8");S.setAttribute("type","text/css");
+EditorUi.prototype.doSetDarkMode=function(d){if(Editor.darkMode!=d){var f=this.editor.graph;Editor.darkMode=d;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":
+"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&(d=this.actions.layersWindow.window.isVisible(),
+this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,d&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=f.defaultPageBorderColor;
Graph.prototype.shapeBackgroundColor=f.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=f.shapeForegroundColor;Graph.prototype.defaultThemeName=f.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=
Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==S.parentNode&&document.getElementsByTagName("head")[0].appendChild(S):
-null!=S.parentNode&&S.parentNode.removeChild(S)}};EditorUi.prototype.setPagesVisible=function(e){Editor.pagesVisible!=e&&(Editor.pagesVisible=e,mxSettings.settings.pagesVisible=e,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(e,f){this.sidebar.sidebarTitles!=e&&(this.sidebar.sidebarTitles=e,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=e,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
-EditorUi.prototype.setInlineFullscreen=function(e){Editor.inlineFullscreen!=e&&(Editor.inlineFullscreen=e,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(e){Editor.sketchMode!=
-e&&(Editor.sketchMode=e,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var e=this.editor.graph;e.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)e.defaultEdgeStyle.fontSize=null,e.defaultVertexStyle.fontSize=
-null;else{e.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;e.defaultEdgeStyle.fontSize=f}"simple"==Editor.currentTheme&&(e.defaultEdgeStyle.edgeStyle="none",e.defaultEdgeStyle.curved="1",e.defaultEdgeStyle.rounded="0",e.defaultEdgeStyle.jettySize="auto",e.defaultEdgeStyle.orthogonalLoop="1",e.defaultEdgeStyle.endArrow="open",e.defaultEdgeStyle.endSize="14",e.defaultEdgeStyle.startSize="14",e.defaultEdgeStyle.sourcePerimeterSpacing="8",e.defaultEdgeStyle.targetPerimeterSpacing=
-"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),e.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,e.defaultVertexStyle.fontSource=Editor.sketchFontSource,e.defaultVertexStyle.hachureGap="4",e.defaultVertexStyle.sketch="1",e.defaultVertexStyle.jiggle="2",e.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,e.defaultEdgeStyle.fontSource=Editor.sketchFontSource,e.defaultEdgeStyle.sketch="1",e.defaultEdgeStyle.jiggle="2",e.defaultEdgeStyle.hachureGap=
-"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(e){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(e)){var g=e.indexOf(",");0<g&&(f=this.getPageById(e.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==e.substring(0,5)&&(f=mxResources.get("action"));return f};
-EditorUi.prototype.handleCustomLink=function(e){if(Graph.isPageLink(e)){var f=e.indexOf(",");if(e=this.getPageById(e.substring(f+1)))this.selectPage(e);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(e)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
-ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(e){e.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(e,
-f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(e=f.getProperty("customFonts"),this.menus.customFonts=e,mxSettings.setCustomFonts(e));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(e,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
-null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(e,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
-mxUtils.bind(this,function(e,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(e,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
-this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(e,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(v,y){try{this.spinner.stop();var C=this.createImageDataUri(v,f,"png"),I=parseInt(y.getAttribute("width")),D=parseInt(y.getAttribute("height"));this.writeImageToClipboard(C,I,D,mxUtils.bind(this,function(N){this.handleError(N)}))}catch(N){this.handleError(N)}}),null,null,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!1,null,0<e.length?e:null)}catch(v){this.handleError(v)}};EditorUi.prototype.writeImageToClipboard=function(e,f,g,v){var y=this.base64ToBlob(e.substring(e.indexOf(",")+1),"image/png");e=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+e+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([e])["catch"](v)};EditorUi.prototype.copyCells=function(e,f){var g=this.editor.graph;if(g.isSelectionEmpty())e.innerText="";else{var v=
-mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(v));mxUtils.setTextContent(e,encodeURIComponent(y));f?(g.removeCells(v,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);e.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var e=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(e=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
-f=mxUtils.getXml(f.encodeCells(e)),navigator.clipboard.writeText(f))}return e};EditorUi.prototype.pasteXml=function(e,f,g,v){var y=this.editor.graph,C=null;y.lastPasteXml==e?y.pasteCounter++:(y.lastPasteXml=e,y.pasteCounter=0);var I=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(e))C=this.importXml(e,I,I),y.setSelectionCells(C);else if(f&&1==y.getSelectionCount()){I=y.getStartEditingCell(y.getSelectionCell(),v);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==y.getCurrentCellStyle(I)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,
-e,[I]);else{y.model.beginUpdate();try{y.labelChanged(I,e),Graph.isLink(e)&&y.setLinkForCell(I,e)}finally{y.model.endUpdate()}}y.setSelectionCell(I)}else C=y.getInsertPoint(),y.isMouseInsertPoint()&&(I=0,y.lastPasteXml==e&&0<y.pasteCounter&&y.pasteCounter--),C=this.insertTextAt(e,C.x+I,C.y+I,!0),y.setSelectionCells(C);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return C};EditorUi.prototype.pasteCells=
-function(e,f,g,v){if(!mxEvent.isConsumed(e)){var y=f,C=!1;if(g&&null!=e.clipboardData&&e.clipboardData.getData){var I=e.clipboardData.getData("text/plain"),D=!1;if(null!=I&&0<I.length&&"%3CmxGraphModel%3E"==I.substring(0,18))try{var N=decodeURIComponent(I);this.isCompatibleString(N)&&(D=!0,I=N)}catch(pa){}D=D?null:e.clipboardData.getData("text/html");null!=D&&0<D.length?(y=this.parseHtmlData(D),C="text/plain"!=y.getAttribute("data-type")):null!=I&&0<I.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,
-D))}I=y.getElementsByTagName("span");if(null!=I&&0<I.length&&"application/vnd.lucid.chart.objects"===I[0].getAttribute("data-lucid-type"))g=I[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(pa){var ra=this.editor.graph;ra.lastPasteXml==pa?ra.pasteCounter++:(ra.lastPasteXml=pa,ra.pasteCounter=0);var L=ra.pasteCounter*ra.gridSize;ra.setSelectionCells(this.importXml(pa,L,L));ra.scrollCellToVisible(ra.getSelectionCell())}),mxUtils.bind(this,
-function(pa){this.handleError(pa)})),mxEvent.consume(e));else{var G=C?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),ia=!1;try{var ka=G.lastIndexOf("%3E");0<=ka&&ka<G.length-3&&(G=G.substring(0,ka+3))}catch(pa){}try{I=y.getElementsByTagName("span"),(N=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(G))&&(this.isCompatibleString(N)||0==N.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ia=!0,G=N)}catch(pa){}try{if(null!=
-G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ja=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,v,ia,e)}catch(pa){console.log("Miro import error:",pa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ja):ja()}else this.pasteXml(G,v,ia,e);try{mxEvent.consume(e)}catch(pa){}}else if(!g){var ca=this.editor.graph;ca.lastPasteXml=null;ca.pasteCounter=0}}catch(pa){this.handleError(pa)}}}f.innerHTML=
-"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(e){if(Graph.fileSupport)for(var f=null,g=0;g<e.length;g++)mxEvent.addListener(e[g],"dragleave",function(v){null!=f&&(f.parentNode.removeChild(f),f=null);v.stopPropagation();v.preventDefault()}),mxEvent.addListener(e[g],"dragover",mxUtils.bind(this,function(v){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());v.stopPropagation();v.preventDefault()})),
-mxEvent.addListener(e[g],"drop",mxUtils.bind(this,function(v){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<v.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(v.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(v)&&!mxEvent.isShiftDown(v)):this.openFiles(v.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(v);if(null==y){var C=null!=v.dataTransfer?v.dataTransfer:
-v.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?y=C.getData("Text"):(y=null,y=0<=mxUtils.indexOf(C.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=y&&0<y.length?(C=document.createElement("div"),C.innerHTML=this.editor.graph.sanitizeHtml(y),C=C.getElementsByTagName("img"),0<C.length&&(y=C[0].getAttribute("src"))):0<=mxUtils.indexOf(C.types,"text/plain")&&(y=C.getData("text/plain"))),
-null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(I){200<=I.getStatus()&&299>=I.getStatus()&&this.openLocalFile(I.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash=
-"#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}v.stopPropagation();v.preventDefault()}))};EditorUi.prototype.highlightElement=function(e){var f=0,g=0;if(null==e){var v=document.body;var y=document.documentElement;var C=(v.clientWidth||y.clientWidth)-3;v=Math.max(v.clientHeight||0,y.clientHeight)-3}else f=e.offsetTop,g=e.offsetLeft,C=e.clientWidth,
-v=e.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,C-3)+"px";y.style.height=Math.max(0,v-3)+"px";null!=e&&e.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(e){e=mxUtils.parseXml(e);
-var f=this.editor.extractGraphModel(e.documentElement);e=[];if(null!=f){var g=new mxCodec(f.ownerDocument),v=new mxGraphModel;g.decode(f,v);f=v.getChildAt(v.getRoot(),0);for(g=0;g<v.getChildCount(f);g++)e.push(v.getChildAt(f,g))}return e};EditorUi.prototype.openFileHandle=function(e,f,g,v,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var C=mxUtils.bind(this,function(D){f=0<=
-f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,v)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();
-C(D)}));else if(/(\.*<graphml )/.test(e))this.importGraphML(e,mxUtils.bind(this,function(D){this.spinner.stop();C(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),200<=D.status&&299>=D.status?C(D.responseText):this.handleError({message:mxResources.get(413==D.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(e))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(e,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,v)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==e.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
-this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,e,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==e.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();C(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(e,f,v)}));else{if("image/png"==g.type.substring(0,9))e=this.extractGraphModelFromPng(e);else if("application/pdf"==g.type){var I=Editor.extractGraphModelFromPdf(e);null!=I&&(y=null,v=!0,
-e=I)}this.spinner.stop();this.openLocalFile(e,f,v,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(e,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<e.length;g++)mxUtils.bind(this,function(v){var y=new FileReader;y.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,v.name,v,f)}catch(I){this.handleError(I)}});y.onerror=mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==v.type.substring(0,
-5)&&"application/pdf"!==v.type||"image/svg"===v.type.substring(0,9)?y.readAsText(v):y.readAsDataURL(v)})(e[g])};EditorUi.prototype.openLocalFile=function(e,f,g,v,y){var C=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(e);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,e,f||this.defaultFilename,g,v,y))});if(null!=
-e&&0<e.length)null==C||!C.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)&&null!=C&&C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(e,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=C&&C.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var e={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,e);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),e);f=[];for(var g in e)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(e,f){function g(I){if(null!=
-I){var D=I.lastIndexOf(".");0<D&&(I=I.substring(D+1,I.length));null==f[I]&&(f[I]=!0)}}var v=this.editor.graph,y=v.getCellStyle(e);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));v.model.isEdge(e)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=v.model.getChildCount(e);for(var C=0;C<y;C++)this.addBasenamesForCell(v.model.getChildAt(e,C),f)};EditorUi.prototype.setGraphEnabled=function(e){this.diagramContainer.style.visibility=
-e?"":"hidden";this.formatContainer.style.visibility=e?"":"hidden";this.sidebarFooterContainer.style.display=e?"":"none";this.sidebarContainer.style.display=e?"":"none";this.hsplit.style.display=e?"":"none";this.editor.graph.setEnabled(e);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=e?"":"hidden",this.ruler.vRuler.container.style.visibility=e?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=e?"":"hidden");e||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
-null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var e=
-!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,v,y){e||(e=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var I=C.model.cells,D;for(D in I){var N=I[D];null!=N&&null!=N.style&&(N.style+=";sketch=1;"+(-1==N.style.indexOf("fontFamily=")||-1<N.style.indexOf("fontFamily=Helvetica;")?
-"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=v?v:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
-function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(e,f){null!=e?e.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(e){var f=this.editor.graph;return{event:e,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
-scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(e){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var v=f.background;if(null==v||v==mxConstants.NONE)v=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",
-point:this.embedExitPoint,exit:null!=e?!e:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,v,1,this.embedExportBorder)}else e||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");e||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
-function(e){var f=null,g=!1,v=!1,y=null,C=mxUtils.bind(this,function(N,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(N){if(N.source==(window.opener||window.parent)){var G=N.data,ia=null,ka=mxUtils.bind(this,function(oa){if(null!=oa&&"function"===
-typeof oa.charAt&&"<"!=oa.charAt(0))try{Editor.isPngDataUrl(oa)?oa=Editor.extractGraphModelFromPng(oa):"data:image/svg+xml;base64,"==oa.substring(0,26)?oa=atob(oa.substring(26)):"data:image/svg+xml;utf8,"==oa.substring(0,24)&&(oa=oa.substring(24)),null!=oa&&("%"==oa.charAt(0)?oa=decodeURIComponent(oa):"<"!=oa.charAt(0)&&(oa=Graph.decompress(oa)))}catch(Aa){}return oa});if("json"==urlParams.proto){var ja=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[N],"data",
-[G])}catch(oa){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var ca=new FilenameDialog(this,G.defaultValue||"",null!=
-G.okKey?mxResources.get(G.okKey):G.ok,function(oa){null!=oa?I.postMessage(JSON.stringify({event:"prompt",value:oa,message:G}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(ca.container,300,80,!0,!1);ca.init();return}if("draft"==G.action){var pa=ka(G.xml);this.spinner.stop();ca=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),pa,mxUtils.bind(this,function(){this.hideDialog();
-I.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(ca.container,640,480,!0,!1,mxUtils.bind(this,function(oa){oa&&
-this.actions.get("exit").funct()}));try{ca.init()}catch(oa){I.postMessage(JSON.stringify({event:"draft",error:oa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var ra=1==G.enableRecent,L=1==G.enableSearch,V=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var R=this.getCurrentUser(),Y=new TemplatesDialog(this,function(oa,Aa,ya){oa=oa||this.emptyDiagramXml;I.postMessage(JSON.stringify({event:"template",xml:oa,blank:oa==this.emptyDiagramXml,
-name:Aa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=R?R.id:null,ra?mxUtils.bind(this,function(oa,Aa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,oa,Aa)}):null,L?mxUtils.bind(this,function(oa,Aa,ya,La){this.remoteInvoke("searchDiagrams",[oa,La],null,Aa,ya)}):null,mxUtils.bind(this,function(oa,Aa,ya){this.remoteInvoke("getFileContent",[oa.url],null,Aa,ya)}),null,
-V?mxUtils.bind(this,function(oa){this.remoteInvoke("getCustomTemplates",null,null,oa,function(){oa({},0)})}):null,!1,!1,!0,!0);this.showDialog(Y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}ca=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(oa,Aa,ya,La){oa=oa||this.emptyDiagramXml;null!=G.callback?I.postMessage(JSON.stringify({event:"template",xml:oa,blank:oa==this.emptyDiagramXml,name:Aa,tempUrl:ya,libs:La,builtIn:!0,message:G}),"*"):
-(e(oa,N,oa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ra?mxUtils.bind(this,function(oa){this.remoteInvoke("getRecentDiagrams",[null],null,oa,function(){oa(null,"Network Error!")})}):null,L?mxUtils.bind(this,function(oa,Aa){this.remoteInvoke("searchDiagrams",[oa,null],null,Aa,function(){Aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(oa,Aa,ya){I.postMessage(JSON.stringify({event:"template",docUrl:oa,info:Aa,
-name:ya}),"*")}),null,null,V?mxUtils.bind(this,function(oa){this.remoteInvoke("getCustomTemplates",null,null,oa,function(){oa({},0)})}):null,1==G.withoutType);this.showDialog(ca.container,620,460,!0,!1,mxUtils.bind(this,function(oa){this.sidebar.hideTooltip();oa&&this.actions.get("exit").funct()}));ca.init();return}if("textContent"==G.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:Z,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?
-this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var la=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,la):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=
-G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var q=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var F=this.editor.graph,T=mxUtils.bind(this,function(oa){this.editor.graph.setEnabled(!0);this.spinner.stop();var Aa=this.createLoadMessage("export");Aa.format=
-G.format;Aa.message=G;Aa.data=oa;Aa.xml=q;I.postMessage(JSON.stringify(Aa),"*")}),aa=mxUtils.bind(this,function(oa){null==oa&&(oa=Editor.blankImage);"xmlpng"==G.format&&(oa=Editor.writeGraphModelToPng(oa,"tEXt","mxfile",encodeURIComponent(q)));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container);T(oa)}),U=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var da=mxUtils.bind(this,function(){if(null!=this.pages&&
-this.currentPage.getId()!=U){var oa=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());for(var Aa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==U){Aa=this.updatePageRoot(this.pages[ya]);break}null==Aa&&(Aa=this.currentPage);F.getGlobalVariable=function(Ia){return"page"==Ia?Aa.getName():"pagenumber"==Ia?1:oa.apply(this,arguments)};document.body.appendChild(F.container);F.model.setRoot(Aa.root)}if(null!=G.layerIds){var La=F.model,Oa=La.getChildCells(La.getRoot()),Na={};for(ya=
-0;ya<G.layerIds.length;ya++)Na[G.layerIds[ya]]=!0;for(ya=0;ya<Oa.length;ya++)La.setVisible(Oa[ya],Na[Oa[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){aa(Ia.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){aa(null)}),null,null,G.scale,G.transparent,G.shadow,null,F,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(q),g=!1);da()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":
-"0")+(null!=U?"&pageId="+U:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(q))).send(mxUtils.bind(this,function(oa){200<=oa.getStatus()&&299>=oa.getStatus()?T("data:image/png;base64,"+oa.getText()):aa(null)}),mxUtils.bind(this,function(){aa(null)}))}}else if(da=mxUtils.bind(this,function(){var oa=this.createLoadMessage("export");oa.message=G;if("html2"==G.format||
-"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Aa=this.getXmlFileData();oa.xml=mxUtils.getXml(Aa);oa.data=this.getFileData(null,null,!0,null,null,null,Aa);oa.format=G.format}else if("html"==G.format)Aa=this.editor.getGraphXml(),oa.data=this.getHtml(Aa,this.editor.graph),oa.xml=mxUtils.getXml(Aa),oa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Aa=null!=G.background?G.background:this.editor.graph.background;Aa==mxConstants.NONE&&(Aa=null);oa.xml=
-this.getFileData(!0,null,null,null,null,null,null,null,null,!1);oa.format="svg";var ya=mxUtils.bind(this,function(La){this.editor.graph.setEnabled(!0);this.spinner.stop();oa.data=Editor.createSvgDataUri(La);I.postMessage(JSON.stringify(oa),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(oa.xml,this.editor.graph,null,!0,ya,null,null,G.embedImages,Aa,G.scale,G.border,G.shadow,G.keepTheme);
-else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Aa=this.editor.graph.getSvg(Aa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Aa),this.embedFonts(Aa,mxUtils.bind(this,function(La){G.embedImages||null==G.embedImages?this.editor.convertImages(La,mxUtils.bind(this,
-function(Oa){ya(mxUtils.getXml(Oa))})):ya(mxUtils.getXml(La))}));return}I.postMessage(JSON.stringify(oa),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var fa=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){fa.apply(this,arguments);da()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||da()}else da();return}if("load"==G.action){ja=G.toSketch;v=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=
-G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var na=Editor.sketchMode;this.doSetSketchMode(G.rough);na!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&this.setDarkMode(G.dark);null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=
+null!=S.parentNode&&S.parentNode.removeChild(S)}};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=
+d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)d.defaultEdgeStyle.fontSize=null,d.defaultVertexStyle.fontSize=
+null;else{d.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;d.defaultEdgeStyle.fontSize=f}"simple"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing=
+"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.jiggle="2",d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.jiggle="2",d.defaultEdgeStyle.hachureGap=
+"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};
+EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
+ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,
+f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
+mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(v,x){try{this.spinner.stop();var B=this.createImageDataUri(v,f,"png"),I=parseInt(x.getAttribute("width")),D=parseInt(x.getAttribute("height"));this.writeImageToClipboard(B,I,D,mxUtils.bind(this,function(N){this.handleError(N)}))}catch(N){this.handleError(N)}}),null,null,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(v){this.handleError(v)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,v){var x=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":x,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](v)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var v=
+mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),x=mxUtils.getXml(g.encodeCells(v));mxUtils.setTextContent(d,encodeURIComponent(x));f?(g.removeCells(v,!1),g.lastPasteXml=null):(g.lastPasteXml=x,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
+f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,v){var x=this.editor.graph,B=null;x.lastPasteXml==d?x.pasteCounter++:(x.lastPasteXml=d,x.pasteCounter=0);var I=x.pasteCounter*x.gridSize;if(g||this.isCompatibleString(d))B=this.importXml(d,I,I),x.setSelectionCells(B);else if(f&&1==x.getSelectionCount()){I=x.getStartEditingCell(x.getSelectionCell(),v);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==x.getCurrentCellStyle(I)[mxConstants.STYLE_SHAPE])x.setCellStyles(mxConstants.STYLE_IMAGE,
+d,[I]);else{x.model.beginUpdate();try{x.labelChanged(I,d),Graph.isLink(d)&&x.setLinkForCell(I,d)}finally{x.model.endUpdate()}}x.setSelectionCell(I)}else B=x.getInsertPoint(),x.isMouseInsertPoint()&&(I=0,x.lastPasteXml==d&&0<x.pasteCounter&&x.pasteCounter--),B=this.insertTextAt(d,B.x+I,B.y+I,!0),x.setSelectionCells(B);x.isSelectionEmpty()||(x.scrollCellToVisible(x.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(x.view.getState(x.getSelectionCell())));return B};EditorUi.prototype.pasteCells=
+function(d,f,g,v){if(!mxEvent.isConsumed(d)){var x=f,B=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var I=d.clipboardData.getData("text/plain"),D=!1;if(null!=I&&0<I.length&&"%3CmxGraphModel%3E"==I.substring(0,18))try{var N=decodeURIComponent(I);this.isCompatibleString(N)&&(D=!0,I=N)}catch(pa){}D=D?null:d.clipboardData.getData("text/html");null!=D&&0<D.length?(x=this.parseHtmlData(D),B="text/plain"!=x.getAttribute("data-type")):null!=I&&0<I.length&&(x=document.createElement("div"),mxUtils.setTextContent(x,
+D))}I=x.getElementsByTagName("span");if(null!=I&&0<I.length&&"application/vnd.lucid.chart.objects"===I[0].getAttribute("data-lucid-type"))g=I[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(pa){var ra=this.editor.graph;ra.lastPasteXml==pa?ra.pasteCounter++:(ra.lastPasteXml=pa,ra.pasteCounter=0);var L=ra.pasteCounter*ra.gridSize;ra.setSelectionCells(this.importXml(pa,L,L));ra.scrollCellToVisible(ra.getSelectionCell())}),mxUtils.bind(this,
+function(pa){this.handleError(pa)})),mxEvent.consume(d));else{var G=B?x.innerHTML:mxUtils.trim(null==x.innerText?mxUtils.getTextContent(x):x.innerText),ia=!1;try{var ka=G.lastIndexOf("%3E");0<=ka&&ka<G.length-3&&(G=G.substring(0,ka+3))}catch(pa){}try{I=x.getElementsByTagName("span"),(N=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(G))&&(this.isCompatibleString(N)||0==N.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ia=!0,G=N)}catch(pa){}try{if(null!=
+G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ja=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,v,ia,d)}catch(pa){console.log("Miro import error:",pa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ja):ja()}else this.pasteXml(G,v,ia,d);try{mxEvent.consume(d)}catch(pa){}}else if(!g){var ca=this.editor.graph;ca.lastPasteXml=null;ca.pasteCounter=0}}catch(pa){this.handleError(pa)}}}f.innerHTML=
+"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(v){null!=f&&(f.parentNode.removeChild(f),f=null);v.stopPropagation();v.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(v){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());v.stopPropagation();v.preventDefault()})),
+mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(v){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<v.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(v.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(v)&&!mxEvent.isShiftDown(v)):this.openFiles(v.dataTransfer.files,!0);else{var x=this.extractGraphModelFromEvent(v);if(null==x){var B=null!=v.dataTransfer?v.dataTransfer:
+v.clipboardData;null!=B&&(10==document.documentMode||11==document.documentMode?x=B.getData("Text"):(x=null,x=0<=mxUtils.indexOf(B.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(B.types,"text/html")?B.getData("text/html"):null,null!=x&&0<x.length?(B=document.createElement("div"),B.innerHTML=this.editor.graph.sanitizeHtml(x),B=B.getElementsByTagName("img"),0<B.length&&(x=B[0].getAttribute("src"))):0<=mxUtils.indexOf(B.types,"text/plain")&&(x=B.getData("text/plain"))),
+null!=x&&(Editor.isPngDataUrl(x)?(x=Editor.extractGraphModelFromPng(x),null!=x&&0<x.length&&this.openLocalFile(x,null,!0)):this.isRemoteFileFormat(x)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(x))).send(mxUtils.bind(this,function(I){200<=I.getStatus()&&299>=I.getStatus()?this.openLocalFile(I.getText(),null,!0):this.showError(mxResources.get("error"),413==I.getStatus()?mxResources.get("diagramTooLarge"):
+mxResources.get("unknownError"))})):/^https?:\/\//.test(x)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(x):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,!0)}v.stopPropagation();v.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var v=document.body;var x=document.documentElement;var B=(v.clientWidth||
+x.clientWidth)-3;v=Math.max(v.clientHeight||0,x.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,B=d.clientWidth,v=d.clientHeight;x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";x.style.pointerEvents="none";x.style.position="absolute";x.style.top=f+"px";x.style.left=g+"px";x.style.width=Math.max(0,B-3)+"px";x.style.height=Math.max(0,v-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):
+document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),v=new mxGraphModel;g.decode(f,v);f=v.getChildAt(v.getRoot(),0);for(g=0;g<v.getChildCount(f);g++)d.push(v.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,v,x){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
+/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var B=mxUtils.bind(this,function(D){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,v)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
+/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),
+200<=D.status&&299>=D.status?B(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,v)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,v)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
+g.type){var I=Editor.extractGraphModelFromPdf(d);null!=I&&(x=null,v=!0,d=I)}this.spinner.stop();this.openLocalFile(d,f,v,x,null!=x?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(v){var x=new FileReader;x.onload=mxUtils.bind(this,function(B){try{this.openFileHandle(B.target.result,v.name,v,f)}catch(I){this.handleError(I)}});x.onerror=mxUtils.bind(this,function(B){this.spinner.stop();
+this.handleError(B);window.openFile=null});"image"!==v.type.substring(0,5)&&"application/pdf"!==v.type||"image/svg"===v.type.substring(0,9)?x.readAsText(v):x.readAsDataURL(v)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,v,x){var B=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+d,f||this.defaultFilename,g,v,x))});if(null!=d&&0<d.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
+B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
+function(d,f){function g(I){if(null!=I){var D=I.lastIndexOf(".");0<D&&(I=I.substring(D+1,I.length));null==f[I]&&(f[I]=!0)}}var v=this.editor.graph,x=v.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(x[mxConstants.STYLE_SHAPE]));v.model.isEdge(d)&&(g(mxMarker.getPackageForType(x[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(x[mxConstants.STYLE_ENDARROW])));x=v.model.getChildCount(d);for(var B=0;B<x;B++)this.addBasenamesForCell(v.model.getChildAt(d,B),f)};EditorUi.prototype.setGraphEnabled=
+function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
+d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,v,x){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(x)try{var B=this.editor.graph;B.setGridEnabled(!1);B.pageVisible=!1;var I=B.model.cells,D;for(D in I){var N=I[D];null!=
+N&&null!=N.style&&(N.style+=";sketch=1;"+(-1==N.style.indexOf("fontFamily=")||-1<N.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=v?v:!1;this.updateUi();
+window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
+pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var v=f.background;if(null==v||v==mxConstants.NONE)v=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
+null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(x){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,v,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,v=!1,x=null,B=mxUtils.bind(this,function(N,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,B);mxEvent.addListener(window,"message",mxUtils.bind(this,function(N){if(N.source==
+(window.opener||window.parent)){var G=N.data,ia=null,ka=mxUtils.bind(this,function(oa){if(null!=oa&&"function"===typeof oa.charAt&&"<"!=oa.charAt(0))try{Editor.isPngDataUrl(oa)?oa=Editor.extractGraphModelFromPng(oa):"data:image/svg+xml;base64,"==oa.substring(0,26)?oa=atob(oa.substring(26)):"data:image/svg+xml;utf8,"==oa.substring(0,24)&&(oa=oa.substring(24)),null!=oa&&("%"==oa.charAt(0)?oa=decodeURIComponent(oa):"<"!=oa.charAt(0)&&(oa=Graph.decompress(oa)))}catch(Aa){}return oa});if("json"==urlParams.proto){var ja=
+!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[N],"data",[G])}catch(oa){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==
+G.action){this.spinner.stop();var ca=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(oa){null!=oa?I.postMessage(JSON.stringify({event:"prompt",value:oa,message:G}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(ca.container,300,80,!0,!1);ca.init();return}if("draft"==G.action){var pa=ka(G.xml);this.spinner.stop();ca=new DraftDialog(this,mxResources.get("draftFound",
+[G.name||this.defaultFilename]),pa,mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),
+"*")}):null);this.showDialog(ca.container,640,480,!0,!1,mxUtils.bind(this,function(oa){oa&&this.actions.get("exit").funct()}));try{ca.init()}catch(oa){I.postMessage(JSON.stringify({event:"draft",error:oa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var ra=1==G.enableRecent,L=1==G.enableSearch,V=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var R=this.getCurrentUser(),Y=new TemplatesDialog(this,function(oa,Aa,ya){oa=oa||this.emptyDiagramXml;
+I.postMessage(JSON.stringify({event:"template",xml:oa,blank:oa==this.emptyDiagramXml,name:Aa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=R?R.id:null,ra?mxUtils.bind(this,function(oa,Aa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,oa,Aa)}):null,L?mxUtils.bind(this,function(oa,Aa,ya,La){this.remoteInvoke("searchDiagrams",[oa,La],null,Aa,ya)}):null,mxUtils.bind(this,
+function(oa,Aa,ya){this.remoteInvoke("getFileContent",[oa.url],null,Aa,ya)}),null,V?mxUtils.bind(this,function(oa){this.remoteInvoke("getCustomTemplates",null,null,oa,function(){oa({},0)})}):null,!1,!1,!0,!0);this.showDialog(Y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}ca=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(oa,Aa,ya,La){oa=oa||this.emptyDiagramXml;null!=G.callback?I.postMessage(JSON.stringify({event:"template",xml:oa,blank:oa==
+this.emptyDiagramXml,name:Aa,tempUrl:ya,libs:La,builtIn:!0,message:G}),"*"):(d(oa,N,oa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ra?mxUtils.bind(this,function(oa){this.remoteInvoke("getRecentDiagrams",[null],null,oa,function(){oa(null,"Network Error!")})}):null,L?mxUtils.bind(this,function(oa,Aa){this.remoteInvoke("searchDiagrams",[oa,null],null,Aa,function(){Aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(oa,
+Aa,ya){I.postMessage(JSON.stringify({event:"template",docUrl:oa,info:Aa,name:ya}),"*")}),null,null,V?mxUtils.bind(this,function(oa){this.remoteInvoke("getCustomTemplates",null,null,oa,function(){oa({},0)})}):null,1==G.withoutType);this.showDialog(ca.container,620,460,!0,!1,mxUtils.bind(this,function(oa){this.sidebar.hideTooltip();oa&&this.actions.get("exit").funct()}));ca.init();return}if("textContent"==G.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",
+data:Z,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var la=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,la):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();
+return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var q=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var F=this.editor.graph,T=mxUtils.bind(this,function(oa){this.editor.graph.setEnabled(!0);
+this.spinner.stop();var Aa=this.createLoadMessage("export");Aa.format=G.format;Aa.message=G;Aa.data=oa;Aa.xml=q;I.postMessage(JSON.stringify(Aa),"*")}),aa=mxUtils.bind(this,function(oa){null==oa&&(oa=Editor.blankImage);"xmlpng"==G.format&&(oa=Editor.writeGraphModelToPng(oa,"tEXt","mxfile",encodeURIComponent(q)));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container);T(oa)}),U=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var da=
+mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var oa=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());for(var Aa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==U){Aa=this.updatePageRoot(this.pages[ya]);break}null==Aa&&(Aa=this.currentPage);F.getGlobalVariable=function(Ia){return"page"==Ia?Aa.getName():"pagenumber"==Ia?1:oa.apply(this,arguments)};document.body.appendChild(F.container);F.model.setRoot(Aa.root)}if(null!=G.layerIds){var La=
+F.model,Oa=La.getChildCells(La.getRoot()),Na={};for(ya=0;ya<G.layerIds.length;ya++)Na[G.layerIds[ya]]=!0;for(ya=0;ya<Oa.length;ya++)La.setVisible(Oa[ya],Na[Oa[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){aa(Ia.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){aa(null)}),null,null,G.scale,G.transparent,G.shadow,null,F,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(q),g=!1);da()}else(new mxXmlRequest(EXPORT_URL,
+"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(q))).send(mxUtils.bind(this,function(oa){200<=oa.getStatus()&&299>=oa.getStatus()?T("data:image/png;base64,"+oa.getText()):aa(null)}),mxUtils.bind(this,function(){aa(null)}))}}else if(da=mxUtils.bind(this,function(){var oa=this.createLoadMessage("export");
+oa.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Aa=this.getXmlFileData();oa.xml=mxUtils.getXml(Aa);oa.data=this.getFileData(null,null,!0,null,null,null,Aa);oa.format=G.format}else if("html"==G.format)Aa=this.editor.getGraphXml(),oa.data=this.getHtml(Aa,this.editor.graph),oa.xml=mxUtils.getXml(Aa),oa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Aa=null!=G.background?G.background:this.editor.graph.background;Aa==
+mxConstants.NONE&&(Aa=null);oa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);oa.format="svg";var ya=mxUtils.bind(this,function(La){this.editor.graph.setEnabled(!0);this.spinner.stop();oa.data=Editor.createSvgDataUri(La);I.postMessage(JSON.stringify(oa),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(oa.xml,this.editor.graph,null,!0,ya,null,null,G.embedImages,
+Aa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Aa=this.editor.graph.getSvg(Aa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Aa),this.embedFonts(Aa,mxUtils.bind(this,function(La){G.embedImages||null==G.embedImages?this.editor.convertImages(La,
+mxUtils.bind(this,function(Oa){ya(mxUtils.getXml(Oa))})):ya(mxUtils.getXml(La))}));return}I.postMessage(JSON.stringify(oa),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var fa=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){fa.apply(this,arguments);da()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||da()}else da();return}if("load"==G.action){ja=G.toSketch;v=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=
+G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var na=Editor.sketchMode;this.doSetSketchMode(G.rough);na!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&this.setDarkMode(G.dark);null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=
G.viewport);this.embedExitPoint=null;if(null!=G.rect){var sa=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";ia=mxUtils.bind(this,function(){var oa=this.editor.graph,Aa=oa.maxFitScale;oa.maxFitScale=
G.maxFitScale;oa.fit(2*sa);oa.maxFitScale=Aa;oa.container.scrollTop-=2*sa;oa.container.scrollLeft-=2*sa;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(pa=document.createElement("span"),mxUtils.write(pa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(pa),this.embedFilenameSpan=
pa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(oa){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var za=this.getCurrentFile();null!=za&&(pa=ka(G.xml),null!=pa&&""!=pa&&za.mergeFile(new LocalFile(this,pa),function(){I.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(oa){I.postMessage(JSON.stringify({event:"merge",message:G,error:oa}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(I):
-"remoteInvoke"==G.action?this.handleRemoteInvoke(G,N.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(oa){this.handleError(oa)}}var ua=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ba=mxUtils.bind(this,function(oa,Aa){g=!0;try{e(oa,Aa,null,ja)}catch(ya){this.handleError(ya)}g=
-!1;null!=urlParams.modified&&this.editor.setStatus("");y=ua();v&&null==f&&(f=mxUtils.bind(this,function(ya,La){ya=ua();ya==y||g||(La=this.createLoadMessage("autosave"),La.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(La),"*"));y=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",
+"remoteInvoke"==G.action?this.handleRemoteInvoke(G,N.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(oa){this.handleError(oa)}}var ua=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ba=mxUtils.bind(this,function(oa,Aa){g=!0;try{d(oa,Aa,null,ja)}catch(ya){this.handleError(ya)}g=
+!1;null!=urlParams.modified&&this.editor.setStatus("");x=ua();v&&null==f&&(f=mxUtils.bind(this,function(ya,La){ya=ua();ya==x||g||(La=this.createLoadMessage("autosave"),La.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(La),"*"));x=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",
f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Aa=this.createLoadMessage("load"),Aa.xml=oa,I.postMessage(JSON.stringify(Aa),"*");null!=ia&&ia()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,
-34)?(ka="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(oa){Ba(oa,N)},mxUtils.bind(this,function(oa){this.handleError(oa)}),ka)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(oa){4==oa.readyState&&200<=oa.status&&299>=oa.status&&
-"<mxGraphModel"==oa.responseText.substring(0,13)&&Ba(oa.responseText,N)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(oa){Ba(oa)}),mxUtils.bind(this,function(oa){this.handleError(oa)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ka(G),Ba(G,N)):this.loadDescriptor(G,mxUtils.bind(this,function(oa){Ba(ua(),N)}),mxUtils.bind(this,function(oa){this.handleError(oa,mxResources.get("errorLoadingFile"))}))}}));
-var I=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(C,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(N,G,ia){D.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:N,target:G,allowOpener:ia}),"*")}}};EditorUi.prototype.createEmbedButton=function(e,f,g,v){var y="simple"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement(y?
-"a":"button");C.setAttribute("title",e+(null!=g?" ("+g+")":""));C.style.marginLeft="6px";mxUtils.write(C,e);y?(C.className="geMenuItem"+(v?" gePrimaryBtn":""),C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(v?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){if("1"!=urlParams.embedInline){var e=document.createElement("div");e.style.display="inline-block";document.createElement("button").className="geBigButton";
-"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&e.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,null,!0)):(e.appendChild(this.createEmbedButton(mxResources.get("save"),this.actions.get("save").funct,Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&e.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct)));"1"!=urlParams.noExitBtn&&
-e.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"==Editor.currentTheme||"min"==Editor.currentTheme?null!=this.buttonContainer&&(e.style.position="relative","simple"!=Editor.currentTheme&&(e.style.marginRight="4px","1"!=urlParams.sketch?(e.style.marginTop="6px",this.buttonContainer.style.top="6px"):this.buttonContainer.style.top="0px"),this.buttonContainer.appendChild(e),this.editor.fireEvent(new mxEventObject("statusChanged"))):
-null!=this.menubar&&(e.style.position="absolute",e.style.padding="2px",e.style.right="62px",this.toolbar.container.appendChild(e),this.toolbar.staticElements.push(e))}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(e){this.importCsv(e)}),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(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();e()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
-function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(e,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(e,f)}))};EditorUi.prototype.doImportCsv=function(e,f){try{var g=e.split("\n"),v=[],y=[],C=[],I={};if(0<g.length){var D={},N=this.editor.graph,G=null,ia=null,ka=null,ja=null,ca=null,pa=null,ra=null,L="whiteSpace=wrap;html=1;",
-V=null,R=null,Y="",Z="auto",la="auto",q=!1,F=null,T=null,aa=40,U=40,da=100,fa=0,na=mxUtils.bind(this,function(){null!=f?f(Ma):(N.setSelectionCells(Ma),N.scrollCellToVisible(N.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=N.getFreeInsertPoint(),za=sa.x,ua=sa.y;sa=ua;var Ba=null,oa="auto";R=null;for(var Aa=[],ya=null,La=null,Oa=0;Oa<g.length&&"#"==g[Oa].charAt(0);){e=g[Oa].replace(/\r$/,"");for(Oa++;Oa<g.length&&
-"\\"==e.charAt(e.length-1)&&"#"==g[Oa].charAt(0);)e=e.substring(0,e.length-1)+mxUtils.trim(g[Oa].substring(1)),Oa++;if("#"!=e.charAt(1)){var Na=e.indexOf(":");if(0<Na){var Ia=mxUtils.trim(e.substring(1,Na)),wa=mxUtils.trim(e.substring(Na+1));"label"==Ia?Ba=N.sanitizeHtml(wa):"labelname"==Ia&&0<wa.length&&"-"!=wa?ca=wa:"labels"==Ia&&0<wa.length&&"-"!=wa?ra=JSON.parse(wa):"style"==Ia?ia=wa:"parentstyle"==Ia?L=wa:"unknownStyle"==Ia&&"-"!=wa?pa=wa:"stylename"==Ia&&0<wa.length&&"-"!=wa?ja=wa:"styles"==
-Ia&&0<wa.length&&"-"!=wa?ka=JSON.parse(wa):"vars"==Ia&&0<wa.length&&"-"!=wa?G=JSON.parse(wa):"identity"==Ia&&0<wa.length&&"-"!=wa?V=wa:"parent"==Ia&&0<wa.length&&"-"!=wa?R=wa:"namespace"==Ia&&0<wa.length&&"-"!=wa?Y=wa:"width"==Ia?Z=wa:"height"==Ia?la=wa:"collapsed"==Ia&&"-"!=wa?q="true"==wa:"left"==Ia&&0<wa.length?F=wa:"top"==Ia&&0<wa.length?T=wa:"ignore"==Ia?La=wa.split(","):"connect"==Ia?Aa.push(JSON.parse(wa)):"link"==Ia?ya=wa:"padding"==Ia?fa=parseFloat(wa):"edgespacing"==Ia?aa=parseFloat(wa):
-"nodespacing"==Ia?U=parseFloat(wa):"levelspacing"==Ia?da=parseFloat(wa):"layout"==Ia&&(oa=wa)}}}if(null==g[Oa])throw Error(mxResources.get("invalidOrMissingFile"));var ab=this.editor.csvToArray(g[Oa].replace(/\r$/,""));Na=e=null;Ia=[];for(wa=0;wa<ab.length;wa++)V==ab[wa]&&(e=wa),R==ab[wa]&&(Na=wa),Ia.push(mxUtils.trim(ab[wa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ia[0]+"%");if(null!=Aa)for(var Ya=0;Ya<Aa.length;Ya++)null==D[Aa[Ya].to]&&(D[Aa[Ya].to]={});
-V=[];for(wa=Oa+1;wa<g.length;wa++){var x=this.editor.csvToArray(g[wa].replace(/\r$/,""));if(null==x){var O=40<g[wa].length?g[wa].substring(0,40)+"...":g[wa];throw Error(O+" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<x.length&&V.push(x)}N.model.beginUpdate();try{for(wa=0;wa<V.length;wa++){x=V[wa];var P=null,X=null!=e?Y+x[e]:null;g=!1;null!=X&&(P=N.model.getCell(X),g=null==P||0<=mxUtils.indexOf(v,P));var ba=new mxCell(Ba,new mxGeometry(za,sa,0,0),ia||"whiteSpace=wrap;html=1;");ba.collapsed=
-q;ba.vertex=!0;ba.id=X;null==P||g||N.model.setCollapsed(P,q);for(var W=0;W<x.length;W++)N.setAttributeForCell(ba,Ia[W],x[W]),null==P||g||N.setAttributeForCell(P,Ia[W],x[W]);if(null!=ca&&null!=ra){var ea=ra[ba.getAttribute(ca)];null!=ea&&(N.labelChanged(ba,ea),null==P||g||N.cellLabelChanged(P,ea))}if(null!=ja&&null!=ka){var ta=ka[ba.getAttribute(ja)];null!=ta&&(ba.style=ta)}N.setAttributeForCell(ba,"placeholders","1");ba.style=N.replacePlaceholders(ba,ba.style,G);null==P||g?N.fireEvent(new mxEventObject("cellsInserted",
-"cells",[ba])):(N.model.setStyle(P,ba.style),0>mxUtils.indexOf(C,P)&&C.push(P),N.fireEvent(new mxEventObject("cellsInserted","cells",[P])));g=null!=P;P=ba;if(!g)for(Ya=0;Ya<Aa.length;Ya++)D[Aa[Ya].to][P.getAttribute(Aa[Ya].to)]=P;null!=ya&&"link"!=ya&&(N.setLinkForCell(P,P.getAttribute(ya)),N.setAttributeForCell(P,ya,null));var qa=this.editor.graph.getPreferredSizeForCell(P);R=null!=Na?N.model.getCell(Y+x[Na]):null;if(P.vertex){O=null!=R?0:za;Oa=null!=R?0:ua;null!=F&&null!=P.getAttribute(F)&&(P.geometry.x=
-O+parseFloat(P.getAttribute(F)));null!=T&&null!=P.getAttribute(T)&&(P.geometry.y=Oa+parseFloat(P.getAttribute(T)));var va="@"==Z.charAt(0)?P.getAttribute(Z.substring(1)):null;P.geometry.width=null!=va&&"auto"!=va?parseFloat(P.getAttribute(Z.substring(1))):"auto"==Z||"auto"==va?qa.width+fa:parseFloat(Z);var Ea="@"==la.charAt(0)?P.getAttribute(la.substring(1)):null;P.geometry.height=null!=Ea&&"auto"!=Ea?parseFloat(Ea):"auto"==la||"auto"==Ea?qa.height+fa:parseFloat(la);sa+=P.geometry.height+U}g?(null==
-I[X]&&(I[X]=[]),I[X].push(P)):(v.push(P),null!=R?(R.style=N.replacePlaceholders(R,L,G),N.addCell(P,R),y.push(R)):C.push(N.addCell(P)))}for(wa=0;wa<y.length;wa++)va="@"==Z.charAt(0)?y[wa].getAttribute(Z.substring(1)):null,Ea="@"==la.charAt(0)?y[wa].getAttribute(la.substring(1)):null,"auto"!=Z&&"auto"!=va||"auto"!=la&&"auto"!=Ea||N.updateGroupBounds([y[wa]],fa,!0);var Ca=C.slice(),Ma=C.slice();for(Ya=0;Ya<Aa.length;Ya++){var Sa=Aa[Ya];for(wa=0;wa<v.length;wa++){P=v[wa];var Qa=mxUtils.bind(this,function(Xa,
-Za,fb){var hb=Za.getAttribute(fb.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var qb=0;qb<hb.length;qb++){var kb=D[fb.to][hb[qb]];if(null==kb&&null!=pa){kb=new mxCell(hb[qb],new mxGeometry(za,ua,0,0),pa);kb.style=N.replacePlaceholders(Za,kb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(kb);kb.geometry.width=ib.width+fa;kb.geometry.height=ib.height+fa;D[fb.to][hb[qb]]=kb;kb.vertex=!0;kb.id=hb[qb];C.push(N.addCell(kb))}if(null!=kb){ib=fb.label;null!=fb.fromlabel&&(ib=(Za.getAttribute(fb.fromlabel)||
-"")+(ib||""));null!=fb.sourcelabel&&(ib=N.replacePlaceholders(Za,fb.sourcelabel,G)+(ib||""));null!=fb.tolabel&&(ib=(ib||"")+(kb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(ib=(ib||"")+N.replacePlaceholders(kb,fb.targetlabel,G));var ub="target"==fb.placeholders==!fb.invert?kb:Xa;ub=null!=fb.style?N.replacePlaceholders(ub,fb.style,G):N.createCurrentEdgeStyle();ib=N.insertEdge(null,null,ib||"",fb.invert?kb:Xa,fb.invert?Xa:kb,ub);if(null!=fb.labels)for(ub=0;ub<fb.labels.length;ub++){var ob=
-fb.labels[ub],nb=new mxCell(ob.label||ub,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");nb.vertex=!0;nb.connectable=!1;nb.geometry.relative=!0;null!=ob.placeholders&&(nb.value=N.replacePlaceholders("target"==ob.placeholders==!fb.invert?kb:Xa,nb.value,G));if(null!=ob.dx||null!=ob.dy)nb.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);ib.insert(nb)}Ma.push(ib);mxUtils.remove(fb.invert?Xa:kb,Ca)}}}});Qa(P,P,Sa);if(null!=I[P.id])for(W=0;W<I[P.id].length;W++)Qa(P,
-I[P.id][W],Sa)}}if(null!=La)for(wa=0;wa<v.length;wa++)for(P=v[wa],W=0;W<La.length;W++)N.setAttributeForCell(P,mxUtils.trim(La[W]),null);if(0<C.length){var Fa=new mxParallelEdgeLayout(N);Fa.spacing=aa;Fa.checkOverlap=!0;var Ka=function(){0<Fa.spacing&&Fa.execute(N.getDefaultParent());for(var Xa=0;Xa<C.length;Xa++){var Za=N.getCellGeometry(C[Xa]);Za.x=Math.round(N.snap(Za.x));Za.y=Math.round(N.snap(Za.y));"auto"==Z&&(Za.width=Math.round(N.snap(Za.width)));"auto"==la&&(Za.height=Math.round(N.snap(Za.height)))}};
-if("["==oa.charAt(0)){var Pa=na;N.view.validate();this.executeLayouts(N.createLayouts(JSON.parse(oa)),function(){Ka();Pa()});na=null}else if("circle"==oa){var $a=new mxCircleLayout(N);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var eb=$a.isVertexIgnored;$a.isVertexIgnored=function(Xa){return eb.apply(this,arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){$a.execute(N.getDefaultParent());Ka()},!0,na);na=null}else if("horizontaltree"==oa||"verticaltree"==oa||"auto"==oa&&Ma.length==2*C.length-
-1&&1==Ca.length){N.view.validate();var cb=new mxCompactTreeLayout(N,"horizontaltree"==oa);cb.levelDistance=U;cb.edgeRouting=!1;cb.resetEdges=!1;this.executeLayout(function(){cb.execute(N.getDefaultParent(),0<Ca.length?Ca[0]:null)},!0,na);na=null}else if("horizontalflow"==oa||"verticalflow"==oa||"auto"==oa&&1==Ca.length){N.view.validate();var db=new mxHierarchicalLayout(N,"horizontalflow"==oa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);db.intraCellSpacing=U;db.parallelEdgeSpacing=aa;db.interRankCellSpacing=
-da;db.disableEdgeStyle=!1;this.executeLayout(function(){db.execute(N.getDefaultParent(),Ma);N.moveCells(Ma,za,ua)},!0,na);na=null}else if("orgchart"==oa){N.view.validate();var rb=new mxOrgChartLayout(N,2,da,U),mb=rb.isVertexIgnored;rb.isVertexIgnored=function(Xa){return mb.apply(this,arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){rb.execute(N.getDefaultParent());Ka()},!0,na);na=null}else if("organic"==oa||"auto"==oa&&Ma.length>C.length){N.view.validate();var vb=new mxFastOrganicLayout(N);
-vb.forceConstant=3*U;vb.disableEdgeStyle=!1;vb.resetEdges=!1;var Bb=vb.isVertexIgnored;vb.isVertexIgnored=function(Xa){return Bb.apply(this,arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){vb.execute(N.getDefaultParent());Ka()},!0,na);na=null}}this.hideDialog()}finally{N.model.endUpdate()}null!=na&&na()}}catch(Xa){this.handleError(Xa)}};EditorUi.prototype.getSearch=function(e){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=e&&0<window.location.search.length){var g=
-"?",v;for(v in urlParams)0>mxUtils.indexOf(e,v)&&null!=urlParams[v]&&(f+=g+v+"="+urlParams[v],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(e){e=null!=e?e:window.location.pathname;var f=0<e.indexOf("?")?1:0;if("1"==urlParams.offline)e+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),v;for(v in urlParams)0>mxUtils.indexOf(g,v)&&(e=0==f?e+"?":e+"&",null!=urlParams[v]&&(e+=v+"="+
-urlParams[v],f++))}return e};EditorUi.prototype.showLinkDialog=function(e,f,g,v,y){e=new LinkDialog(this,e,f,g,!0,v,y);this.showDialog(e.container,560,130,!0,!0);e.init()};EditorUi.prototype.getServiceCount=function(e){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;e&&isLocalStorage&&"1"==urlParams.browser&&
-f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var e=this.getCurrentFile(),f=null!=e||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==e||e.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);
-g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));e="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("toggleDarkMode").setEnabled("atlas"!=
-uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&e);this.actions.get("redo").setEnabled(this.canRedo()&&e);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(e);this.menus.get("arrange").setEnabled(e);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(e),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(e));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=
-function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var e=this.getCurrentFile();return null!=e&&e.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var H=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(e){var f=H.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));
-this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var e=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),v=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(v);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(v);this.actions.get("editData").setEnabled(e.isEnabled());
-this.actions.get("shadowVisible").setEnabled(v);this.actions.get("connectionArrows").setEnabled(v);this.actions.get("connectionPoints").setEnabled(v);this.actions.get("copyStyle").setEnabled(v&&!e.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(v&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(v);this.actions.get("createRevision").setEnabled(v);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=
-f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(v&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==
-urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(e.isEnabled()?"/"+mxResources.get("replace"):"");e=e.view.getState(e.getSelectionCell());this.actions.get("editShape").setEnabled(v&&null!=e&&null!=e.shape&&null!=e.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=
-this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(e,f,g,v,y,C,I,D){var N=e.editor.graph;if("xml"==g)e.hideDialog(),e.saveData(f,"xml",mxUtils.getXml(e.editor.getGraphXml()),"text/xml");else if("svg"==g)e.hideDialog(),e.saveData(f,"svg",mxUtils.getXml(N.getSvg(v,y,C)),"image/svg+xml");else{var G=e.getFileData(!0,
-null,null,null,null,!0),ia=N.getGraphBounds(),ka=Math.floor(ia.width*y/N.view.scale),ja=Math.floor(ia.height*y/N.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ka*ja<MAX_AREA)if(e.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!e.isExportToCanvas()){var ca={globalVars:N.getExportVariables()};D&&(ca.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});e.saveRequest(f,g,function(pa,ra){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(ra||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):
-"")+"&extras="+encodeURIComponent(JSON.stringify(ca))+(0<I?"&dpi="+I:"")+"&bg="+(null!=v?v:"none")+"&w="+ka+"&h="+ja+"&border="+C+"&xml="+encodeURIComponent(G))})}else"png"==g?e.exportImage(y,null==v||"none"==v,!0,!1,!1,C,!0,!1,null,D,I):e.exportImage(y,!1,!0,!1,!1,C,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var e=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var v=
-e;this.currentPage!=this.pages[g]&&(v=this.createTemporaryGraph(e.getStylesheet()),this.updatePageRoot(this.pages[g]),v.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+v.getIndexableText()+" "}else f=e.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(e){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxUtils.htmlEntities(e));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-g.appendChild(v);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var I=mxSettings.getCustomLibraries();for(e=0;e<I.length;e++){var D=I[e];if("R"==D.substring(0,1)){var N=JSON.parse(decodeURIComponent(D.substring(1)));C[N[0]]={id:N[0],title:N[1],downloadUrl:N[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){y.innerText=
-"";if(0==G.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var ia=0;ia<G.length;ia++){var ka=G[ia];C[ka.id]&&(f[ka.id]=ka);var ja=this.addCheckbox(y,ka.title,C[ka.id]);(function(ca,pa){mxEvent.addListener(pa,"change",function(){this.checked?f[ca.id]=ca:delete f[ca.id]})})(ka,ja)}},mxUtils.bind(this,function(G){y.innerText="";var ia=document.createElement("div");ia.style.padding="8px";ia.style.textAlign=
-"center";mxUtils.write(ia,mxResources.get("error")+": ");mxUtils.write(ia,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));y.appendChild(ia)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,ia;for(ia in f)null==C[ia]&&(G++,mxUtils.bind(this,function(ka){this.remoteInvoke("getFileContent",[ka.downloadUrl],null,mxUtils.bind(this,function(ja){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
-ja,ka))}catch(ca){this.handleError(ca,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ia]));for(ia in C)f[ia]||this.closeLibrary(new RemoteLibrary(this,null,C[ia]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
-getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(e){this.remoteWin=e;for(var f=0;f<this.remoteInvokeQueue.length;f++)e.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=
-function(e){var f=e.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));e.error?g.error&&g.error(e.error.errResp):g.callback&&g.callback.apply(this,e.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(e,f,g,v,y){var C=!0,I=window.setTimeout(mxUtils.bind(this,function(){C=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(I);
-C&&v.apply(this,arguments)}),N=mxUtils.bind(this,function(){window.clearTimeout(I);C&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,error:N});e=JSON.stringify({event:"remoteInvoke",funtionName:e,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(e,"*"):this.remoteInvokeQueue.push(e)};EditorUi.prototype.handleRemoteInvoke=function(e,f){var g=mxUtils.bind(this,function(G,ia){var ka={event:"remoteInvokeResponse",
-msgMarkers:e.msgMarkers};null!=ia?ka.error={errResp:ia}:null!=G&&(ka.resp=G);this.remoteWin.postMessage(JSON.stringify(ka),"*")});try{var v=e.funtionName,y=this.remoteInvokableFns[v];if(null!=y&&"function"===typeof this[v]){if(y.allowedDomains){for(var C=!1,I=0;I<y.allowedDomains.length;I++)if(f=="https://"+y.allowedDomains[I]){C=!0;break}if(!C){g(null,"Invalid Call: "+v+" is not allowed.");return}}var D=e.functionArgs;Array.isArray(D)||(D=[]);if(y.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),
-D.push(function(G){g(null,G||"Unkown Error")}),this[v].apply(this,D);else{var N=this[v].apply(this,D);g([N])}}else g(null,"Invalid Call: "+v+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(e,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var v=g.open("database",2);v.onupgradeneeded=function(y){try{var C=v.result;1>y.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});
-2>y.oldVersion&&(C.createObjectStore("files",{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=f&&f(I)}};v.onsuccess=mxUtils.bind(this,function(y){var C=v.result;this.database=C;EditorUi.migrateStorageFiles&&(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if(!I||
-"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(D);var N=!0,G=!1,ia,ka=0,ja=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ca=mxUtils.bind(this,function(){ka++;pa()}),pa=mxUtils.bind(this,function(){try{if(ka>=
-ia.length)ja();else{var L=ia[ka];StorageFile.getFileContent(this,L,mxUtils.bind(this,function(V){null==V||".scratchpad"==L&&V==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[L]}),"*"):ca()}),ca)}}catch(V){console.log(V)}}),ra=mxUtils.bind(this,function(L){try{this.setDatabaseItem(null,[{title:L.title,size:L.data.length,lastModified:Date.now(),type:L.isLib?"L":"F"},{title:L.title,data:L.data}],ca,ca,["filesInfo",
-"files"])}catch(V){console.log(V)}});I=mxUtils.bind(this,function(L){try{if(L.source==D.contentWindow){var V={};try{V=JSON.parse(L.data)}catch(R){}"init"==V.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=V.event||G||(N?null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?(ia=V.resp[0],N=!1,pa()):ja():null!=V.resp&&0<V.resp.length&&
-null!=V.resp[0]?ra(V.resp[0]):ca())}}catch(R){console.log(R)}});window.addEventListener("message",I)}})));e(C);C.onversionchange=function(){C.close()}});v.onerror=f;v.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else e(this.database)};EditorUi.prototype.setDatabaseItem=function(e,f,g,v,y){this.openDatabase(mxUtils.bind(this,function(C){try{y=y||"objects";Array.isArray(y)||(y=[y],e=[e],f=[f]);var I=C.transaction(y,"readwrite");I.oncomplete=g;I.onerror=v;for(C=0;C<y.length;C++)I.objectStore(y[C]).put(null!=
-e&&null!=e[C]?{key:e[C],data:f[C]}:f[C])}catch(D){null!=v&&v(D)}}),v)};EditorUi.prototype.removeDatabaseItem=function(e,f,g,v){this.openDatabase(mxUtils.bind(this,function(y){v=v||"objects";Array.isArray(v)||(v=[v],e=[e]);y=y.transaction(v,"readwrite");y.oncomplete=f;y.onerror=g;for(var C=0;C<v.length;C++)y.objectStore(v[C]).delete(e[C])}),g)};EditorUi.prototype.getDatabaseItem=function(e,f,g,v){this.openDatabase(mxUtils.bind(this,function(y){try{v=v||"objects";var C=y.transaction([v],"readonly").objectStore(v).get(e);
-C.onsuccess=function(){f(C.result)};C.onerror=g}catch(I){null!=g&&g(I)}}),g)};EditorUi.prototype.getDatabaseItems=function(e,f,g){this.openDatabase(mxUtils.bind(this,function(v){try{g=g||"objects";var y=v.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),C=[];y.onsuccess=function(I){null==I.target.result?e(C):(C.push(I.target.result.value),I.target.result.continue())};y.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(e,f,g){this.openDatabase(mxUtils.bind(this,
-function(v){try{g=g||"objects";var y=v.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){e(y.result)};y.onerror=f}catch(C){null!=f&&f(C)}}),f)};EditorUi.prototype.commentsSupported=function(){var e=this.getCurrentFile();return null!=e?e.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var e=this.getCurrentFile();return null!=
-e?e.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(e,f){var g=this.getCurrentFile();null!=g?g.getComments(e,f):e([])};EditorUi.prototype.addComment=function(e,f,g){var v=this.getCurrentFile();null!=v?v.addComment(e,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var e=this.getCurrentFile();return null!=e?e.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var e=this.getCurrentFile();return null!=e?e.canComment():!0};EditorUi.prototype.newComment=
-function(e,f){var g=this.getCurrentFile();return null!=g?g.newComment(e,f):new DrawioComment(this,null,e,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var e=this.getCurrentFile();return null!=e&&e.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(e,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(e,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var e=this.getCurrentFile();
-return null!=e&&(e.constructor==DriveFile&&e.isEditable()||e.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(e){e.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(e,f,g,v,y,C,I,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(e,f,g,v,y,C,I,D)};EditorUi.prototype.loadFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");
-return this.editor.loadFonts(e)};EditorUi.prototype.createSvgDataUri=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(e)};EditorUi.prototype.embedCssFonts=function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(e,f)};EditorUi.prototype.embedExtFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(e)};EditorUi.prototype.exportToCanvas=function(e,
-f,g,v,y,C,I,D,N,G,ia,ka,ja,ca,pa,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(e,f,g,v,y,C,I,D,N,G,ia,ka,ja,ca,pa,ra)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(e,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(e,f,g,v)};EditorUi.prototype.convertImageToDataUri=
-function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(e,f)};EditorUi.prototype.base64Encode=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(e)};EditorUi.prototype.updateCRC=function(e,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(e,f,g,v)};EditorUi.prototype.crc32=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(e)};
-EditorUi.prototype.writeGraphModelToPng=function(e,f,g,v,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(e,f,g,v,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var e=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),v=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<v.length){var y="<mxfile "===
-v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12);v="<mxlibrary>"===v.substring(0,11);(y||v)&&e.push(g)}}return e};EditorUi.prototype.getLocalStorageFile=function(e){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(e);return{title:e,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,d,k,l,B,p){function E(){for(var ca=I.getElementsByTagName("div"),pa=0,ra=0;ra<ca.length;ra++)"none"!=ca[ra].style.display&&ca[ra].parentNode==I&&pa++;D.style.display=0==pa?"block":"none"}function M(ca,pa,ra,L){function V(){pa.removeChild(Z);pa.removeChild(la);Y.style.display="block";R.style.display="block"}v={div:pa,comment:ca,saveCallback:ra,deleteOnCancel:L};var R=pa.querySelector(".geCommentTxt"),Y=pa.querySelector(".geCommentActionsList"),Z=document.createElement("textarea");
+34)?(ka="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(oa){Ba(oa,N)},mxUtils.bind(this,function(oa){this.handleError(oa)}),ka)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(oa){4==oa.readyState&&(200<=oa.status&&299>=oa.status&&
+"<mxGraphModel"==oa.responseText.substring(0,13)?Ba(oa.responseText,N):this.handleError({message:413==oa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(oa){Ba(oa)}),mxUtils.bind(this,function(oa){this.handleError(oa)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ka(G),Ba(G,N)):this.loadDescriptor(G,mxUtils.bind(this,
+function(oa){Ba(ua(),N)}),mxUtils.bind(this,function(oa){this.handleError(oa,mxResources.get("errorLoadingFile"))}))}}));var I=window.opener||window.parent;B="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(B,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(N,G,ia){D.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:N,target:G,allowOpener:ia}),"*")}}};EditorUi.prototype.createEmbedButton=
+function(d,f,g,v){var x="simple"==Editor.currentTheme||"min"==Editor.currentTheme,B=document.createElement(x?"a":"button");B.setAttribute("title",d+(null!=g?" ("+g+")":""));B.style.marginLeft="6px";mxUtils.write(B,d);x?(B.className="geMenuItem"+(v?" gePrimaryBtn":""),B.style.marginLeft="8px",B.style.padding="6px"):B.className="geBigButton"+(v?"":" geBigStandardButton");mxEvent.addListener(B,"click",f);return B};EditorUi.prototype.addEmbedButtons=function(){if("1"!=urlParams.embedInline){var d=document.createElement("div");
+d.style.display="inline-block";document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&d.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,null,!0)):(d.appendChild(this.createEmbedButton(mxResources.get("save"),this.actions.get("save").funct,Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&d.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),
+this.actions.get("saveAndExit").funct)));"1"!=urlParams.noExitBtn&&d.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"==Editor.currentTheme||"min"==Editor.currentTheme?null!=this.buttonContainer&&(d.style.position="relative","simple"!=Editor.currentTheme&&(d.style.marginRight="4px","1"!=urlParams.sketch?(d.style.marginTop="6px",this.buttonContainer.style.top="6px"):this.buttonContainer.style.top=
+"0px"),this.buttonContainer.appendChild(d),this.editor.fireEvent(new mxEventObject("statusChanged"))):null!=this.menubar&&(d.style.position="absolute",d.style.padding="2px",d.style.right="62px",this.toolbar.container.appendChild(d),this.toolbar.staticElements.push(d))}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,
+620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&
+(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),
+v=[],x=[],B=[],I={};if(0<g.length){var D={},N=this.editor.graph,G=null,ia=null,ka=null,ja=null,ca=null,pa=null,ra=null,L="whiteSpace=wrap;html=1;",V=null,R=null,Y="",Z="auto",la="auto",q=!1,F=null,T=null,aa=40,U=40,da=100,fa=0,na=mxUtils.bind(this,function(){null!=f?f(Ma):(N.setSelectionCells(Ma),N.scrollCellToVisible(N.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=N.getFreeInsertPoint(),za=sa.x,ua=sa.y;sa=ua;var Ba=
+null,oa="auto";R=null;for(var Aa=[],ya=null,La=null,Oa=0;Oa<g.length&&"#"==g[Oa].charAt(0);){d=g[Oa].replace(/\r$/,"");for(Oa++;Oa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Oa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Oa].substring(1)),Oa++;if("#"!=d.charAt(1)){var Na=d.indexOf(":");if(0<Na){var Ia=mxUtils.trim(d.substring(1,Na)),wa=mxUtils.trim(d.substring(Na+1));"label"==Ia?Ba=N.sanitizeHtml(wa):"labelname"==Ia&&0<wa.length&&"-"!=wa?ca=wa:"labels"==Ia&&0<wa.length&&"-"!=wa?ra=JSON.parse(wa):
+"style"==Ia?ia=wa:"parentstyle"==Ia?L=wa:"unknownStyle"==Ia&&"-"!=wa?pa=wa:"stylename"==Ia&&0<wa.length&&"-"!=wa?ja=wa:"styles"==Ia&&0<wa.length&&"-"!=wa?ka=JSON.parse(wa):"vars"==Ia&&0<wa.length&&"-"!=wa?G=JSON.parse(wa):"identity"==Ia&&0<wa.length&&"-"!=wa?V=wa:"parent"==Ia&&0<wa.length&&"-"!=wa?R=wa:"namespace"==Ia&&0<wa.length&&"-"!=wa?Y=wa:"width"==Ia?Z=wa:"height"==Ia?la=wa:"collapsed"==Ia&&"-"!=wa?q="true"==wa:"left"==Ia&&0<wa.length?F=wa:"top"==Ia&&0<wa.length?T=wa:"ignore"==Ia?La=wa.split(","):
+"connect"==Ia?Aa.push(JSON.parse(wa)):"link"==Ia?ya=wa:"padding"==Ia?fa=parseFloat(wa):"edgespacing"==Ia?aa=parseFloat(wa):"nodespacing"==Ia?U=parseFloat(wa):"levelspacing"==Ia?da=parseFloat(wa):"layout"==Ia&&(oa=wa)}}}if(null==g[Oa])throw Error(mxResources.get("invalidOrMissingFile"));var ab=this.editor.csvToArray(g[Oa].replace(/\r$/,""));Na=d=null;Ia=[];for(wa=0;wa<ab.length;wa++)V==ab[wa]&&(d=wa),R==ab[wa]&&(Na=wa),Ia.push(mxUtils.trim(ab[wa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,
+""));null==Ba&&(Ba="%"+Ia[0]+"%");if(null!=Aa)for(var Ya=0;Ya<Aa.length;Ya++)null==D[Aa[Ya].to]&&(D[Aa[Ya].to]={});V=[];for(wa=Oa+1;wa<g.length;wa++){var y=this.editor.csvToArray(g[wa].replace(/\r$/,""));if(null==y){var O=40<g[wa].length?g[wa].substring(0,40)+"...":g[wa];throw Error(O+" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<y.length&&V.push(y)}N.model.beginUpdate();try{for(wa=0;wa<V.length;wa++){y=V[wa];var P=null,X=null!=d?Y+y[d]:null;g=!1;null!=X&&(P=N.model.getCell(X),g=
+null==P||0<=mxUtils.indexOf(v,P));var ba=new mxCell(Ba,new mxGeometry(za,sa,0,0),ia||"whiteSpace=wrap;html=1;");ba.collapsed=q;ba.vertex=!0;ba.id=X;null==P||g||N.model.setCollapsed(P,q);for(var W=0;W<y.length;W++)N.setAttributeForCell(ba,Ia[W],y[W]),null==P||g||N.setAttributeForCell(P,Ia[W],y[W]);if(null!=ca&&null!=ra){var ea=ra[ba.getAttribute(ca)];null!=ea&&(N.labelChanged(ba,ea),null==P||g||N.cellLabelChanged(P,ea))}if(null!=ja&&null!=ka){var ta=ka[ba.getAttribute(ja)];null!=ta&&(ba.style=ta)}N.setAttributeForCell(ba,
+"placeholders","1");ba.style=N.replacePlaceholders(ba,ba.style,G);null==P||g?N.fireEvent(new mxEventObject("cellsInserted","cells",[ba])):(N.model.setStyle(P,ba.style),0>mxUtils.indexOf(B,P)&&B.push(P),N.fireEvent(new mxEventObject("cellsInserted","cells",[P])));g=null!=P;P=ba;if(!g)for(Ya=0;Ya<Aa.length;Ya++)D[Aa[Ya].to][P.getAttribute(Aa[Ya].to)]=P;null!=ya&&"link"!=ya&&(N.setLinkForCell(P,P.getAttribute(ya)),N.setAttributeForCell(P,ya,null));var qa=this.editor.graph.getPreferredSizeForCell(P);
+R=null!=Na?N.model.getCell(Y+y[Na]):null;if(P.vertex){O=null!=R?0:za;Oa=null!=R?0:ua;null!=F&&null!=P.getAttribute(F)&&(P.geometry.x=O+parseFloat(P.getAttribute(F)));null!=T&&null!=P.getAttribute(T)&&(P.geometry.y=Oa+parseFloat(P.getAttribute(T)));var va="@"==Z.charAt(0)?P.getAttribute(Z.substring(1)):null;P.geometry.width=null!=va&&"auto"!=va?parseFloat(P.getAttribute(Z.substring(1))):"auto"==Z||"auto"==va?qa.width+fa:parseFloat(Z);var Ea="@"==la.charAt(0)?P.getAttribute(la.substring(1)):null;P.geometry.height=
+null!=Ea&&"auto"!=Ea?parseFloat(Ea):"auto"==la||"auto"==Ea?qa.height+fa:parseFloat(la);sa+=P.geometry.height+U}g?(null==I[X]&&(I[X]=[]),I[X].push(P)):(v.push(P),null!=R?(R.style=N.replacePlaceholders(R,L,G),N.addCell(P,R),x.push(R)):B.push(N.addCell(P)))}for(wa=0;wa<x.length;wa++)va="@"==Z.charAt(0)?x[wa].getAttribute(Z.substring(1)):null,Ea="@"==la.charAt(0)?x[wa].getAttribute(la.substring(1)):null,"auto"!=Z&&"auto"!=va||"auto"!=la&&"auto"!=Ea||N.updateGroupBounds([x[wa]],fa,!0);var Ca=B.slice(),
+Ma=B.slice();for(Ya=0;Ya<Aa.length;Ya++){var Sa=Aa[Ya];for(wa=0;wa<v.length;wa++){P=v[wa];var Qa=mxUtils.bind(this,function(Xa,Za,fb){var hb=Za.getAttribute(fb.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var qb=0;qb<hb.length;qb++){var kb=D[fb.to][hb[qb]];if(null==kb&&null!=pa){kb=new mxCell(hb[qb],new mxGeometry(za,ua,0,0),pa);kb.style=N.replacePlaceholders(Za,kb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(kb);kb.geometry.width=ib.width+fa;kb.geometry.height=ib.height+fa;D[fb.to][hb[qb]]=
+kb;kb.vertex=!0;kb.id=hb[qb];B.push(N.addCell(kb))}if(null!=kb){ib=fb.label;null!=fb.fromlabel&&(ib=(Za.getAttribute(fb.fromlabel)||"")+(ib||""));null!=fb.sourcelabel&&(ib=N.replacePlaceholders(Za,fb.sourcelabel,G)+(ib||""));null!=fb.tolabel&&(ib=(ib||"")+(kb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(ib=(ib||"")+N.replacePlaceholders(kb,fb.targetlabel,G));var ub="target"==fb.placeholders==!fb.invert?kb:Xa;ub=null!=fb.style?N.replacePlaceholders(ub,fb.style,G):N.createCurrentEdgeStyle();
+ib=N.insertEdge(null,null,ib||"",fb.invert?kb:Xa,fb.invert?Xa:kb,ub);if(null!=fb.labels)for(ub=0;ub<fb.labels.length;ub++){var ob=fb.labels[ub],nb=new mxCell(ob.label||ub,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");nb.vertex=!0;nb.connectable=!1;nb.geometry.relative=!0;null!=ob.placeholders&&(nb.value=N.replacePlaceholders("target"==ob.placeholders==!fb.invert?kb:Xa,nb.value,G));if(null!=ob.dx||null!=ob.dy)nb.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=
+ob.dy?ob.dy:0);ib.insert(nb)}Ma.push(ib);mxUtils.remove(fb.invert?Xa:kb,Ca)}}}});Qa(P,P,Sa);if(null!=I[P.id])for(W=0;W<I[P.id].length;W++)Qa(P,I[P.id][W],Sa)}}if(null!=La)for(wa=0;wa<v.length;wa++)for(P=v[wa],W=0;W<La.length;W++)N.setAttributeForCell(P,mxUtils.trim(La[W]),null);if(0<B.length){var Fa=new mxParallelEdgeLayout(N);Fa.spacing=aa;Fa.checkOverlap=!0;var Ka=function(){0<Fa.spacing&&Fa.execute(N.getDefaultParent());for(var Xa=0;Xa<B.length;Xa++){var Za=N.getCellGeometry(B[Xa]);Za.x=Math.round(N.snap(Za.x));
+Za.y=Math.round(N.snap(Za.y));"auto"==Z&&(Za.width=Math.round(N.snap(Za.width)));"auto"==la&&(Za.height=Math.round(N.snap(Za.height)))}};if("["==oa.charAt(0)){var Pa=na;N.view.validate();this.executeLayouts(N.createLayouts(JSON.parse(oa)),function(){Ka();Pa()});na=null}else if("circle"==oa){var $a=new mxCircleLayout(N);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var eb=$a.isVertexIgnored;$a.isVertexIgnored=function(Xa){return eb.apply(this,arguments)||0>mxUtils.indexOf(B,Xa)};this.executeLayout(function(){$a.execute(N.getDefaultParent());
+Ka()},!0,na);na=null}else if("horizontaltree"==oa||"verticaltree"==oa||"auto"==oa&&Ma.length==2*B.length-1&&1==Ca.length){N.view.validate();var cb=new mxCompactTreeLayout(N,"horizontaltree"==oa);cb.levelDistance=U;cb.edgeRouting=!1;cb.resetEdges=!1;this.executeLayout(function(){cb.execute(N.getDefaultParent(),0<Ca.length?Ca[0]:null)},!0,na);na=null}else if("horizontalflow"==oa||"verticalflow"==oa||"auto"==oa&&1==Ca.length){N.view.validate();var db=new mxHierarchicalLayout(N,"horizontalflow"==oa?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);db.intraCellSpacing=U;db.parallelEdgeSpacing=aa;db.interRankCellSpacing=da;db.disableEdgeStyle=!1;this.executeLayout(function(){db.execute(N.getDefaultParent(),Ma);N.moveCells(Ma,za,ua)},!0,na);na=null}else if("orgchart"==oa){N.view.validate();var rb=new mxOrgChartLayout(N,2,da,U),mb=rb.isVertexIgnored;rb.isVertexIgnored=function(Xa){return mb.apply(this,arguments)||0>mxUtils.indexOf(B,Xa)};this.executeLayout(function(){rb.execute(N.getDefaultParent());Ka()},!0,na);na=
+null}else if("organic"==oa||"auto"==oa&&Ma.length>B.length){N.view.validate();var vb=new mxFastOrganicLayout(N);vb.forceConstant=3*U;vb.disableEdgeStyle=!1;vb.resetEdges=!1;var Bb=vb.isVertexIgnored;vb.isVertexIgnored=function(Xa){return Bb.apply(this,arguments)||0>mxUtils.indexOf(B,Xa)};this.executeLayout(function(){vb.execute(N.getDefaultParent());Ka()},!0,na);na=null}}this.hideDialog()}finally{N.model.endUpdate()}null!=na&&na()}}catch(Xa){this.handleError(Xa)}};EditorUi.prototype.getSearch=function(d){var f=
+"";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",v;for(v in urlParams)0>mxUtils.indexOf(d,v)&&null!=urlParams[v]&&(f+=g+v+"="+urlParams[v],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+v;for(v in urlParams)0>mxUtils.indexOf(g,v)&&(d=0==f?d+"?":d+"&",null!=urlParams[v]&&(d+=v+"="+urlParams[v],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,v,x){d=new LinkDialog(this,d,f,g,!0,v,x);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
+this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
+this.actions.get("resetView").setEnabled(f);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&
+this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var H=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
+function(d){var f=H.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),v=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(v);this.actions.get("autosave").setEnabled(null!=
+f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(v);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(v);this.actions.get("connectionArrows").setEnabled(v);this.actions.get("connectionPoints").setEnabled(v);this.actions.get("copyStyle").setEnabled(v&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(v&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(v);
+this.actions.get("createRevision").setEnabled(v);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(v&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(v&&null!=
+d&&null!=d.shape&&null!=d.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,v,x,B,I,D){var N=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");
+else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(N.getSvg(v,x,B)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),ia=N.getGraphBounds(),ka=Math.floor(ia.width*x/N.view.scale),ja=Math.floor(ia.height*x/N.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ka*ja<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var ca={globalVars:N.getExportVariables()};D&&(ca.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});d.saveRequest(f,
+g,function(pa,ra){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(ra||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):"")+"&extras="+encodeURIComponent(JSON.stringify(ca))+(0<I?"&dpi="+I:"")+"&bg="+(null!=v?v:"none")+"&w="+ka+"&h="+ja+"&border="+B+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(x,null==v||"none"==v,!0,!1,!1,B,!0,!1,null,D,I):d.exportImage(x,!1,!0,!1,!1,B,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=
+function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var v=d;this.currentPage!=this.pages[g]&&(v=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),v.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+v.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");
+g.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxUtils.htmlEntities(d));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(v);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var B={};try{var I=mxSettings.getCustomLibraries();for(d=0;d<I.length;d++){var D=I[d];if("R"==
+D.substring(0,1)){var N=JSON.parse(decodeURIComponent(D.substring(1)));B[N[0]]={id:N[0],title:N[1],downloadUrl:N[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){x.innerText="";if(0==G.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var ia=0;ia<G.length;ia++){var ka=G[ia];B[ka.id]&&(f[ka.id]=ka);var ja=this.addCheckbox(x,ka.title,B[ka.id]);(function(ca,pa){mxEvent.addListener(pa,
+"change",function(){this.checked?f[ca.id]=ca:delete f[ca.id]})})(ka,ja)}},mxUtils.bind(this,function(G){x.innerText="";var ia=document.createElement("div");ia.style.padding="8px";ia.style.textAlign="center";mxUtils.write(ia,mxResources.get("error")+": ");mxUtils.write(ia,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));x.appendChild(ia)}));g.appendChild(x);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,
+ia;for(ia in f)null==B[ia]&&(G++,mxUtils.bind(this,function(ka){this.remoteInvoke("getFileContent",[ka.downloadUrl],null,mxUtils.bind(this,function(ja){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ja,ka))}catch(ca){this.handleError(ca,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ia]));for(ia in B)f[ia]||this.closeLibrary(new RemoteLibrary(this,null,B[ia]));
+0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];
+EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,
+d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,v,x){var B=!0,I=window.setTimeout(mxUtils.bind(this,function(){B=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(I);B&&v.apply(this,arguments)}),N=mxUtils.bind(this,function(){window.clearTimeout(I);B&&x.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,
+error:N});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,ia){var ka={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=ia?ka.error={errResp:ia}:null!=G&&(ka.resp=G);this.remoteWin.postMessage(JSON.stringify(ka),"*")});try{var v=d.funtionName,x=this.remoteInvokableFns[v];if(null!=x&&
+"function"===typeof this[v]){if(x.allowedDomains){for(var B=!1,I=0;I<x.allowedDomains.length;I++)if(f=="https://"+x.allowedDomains[I]){B=!0;break}if(!B){g(null,"Invalid Call: "+v+" is not allowed.");return}}var D=d.functionArgs;Array.isArray(D)||(D=[]);if(x.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),D.push(function(G){g(null,G||"Unkown Error")}),this[v].apply(this,D);else{var N=this[v].apply(this,D);g([N])}}else g(null,"Invalid Call: "+v+" is not found.")}catch(G){g(null,
+"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var v=g.open("database",2);v.onupgradeneeded=function(x){try{var B=v.result;1>x.oldVersion&&B.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(B.createObjectStore("files",{keyPath:"title"}),B.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=
+f&&f(I)}};v.onsuccess=mxUtils.bind(this,function(x){var B=v.result;this.database=B;EditorUi.migrateStorageFiles&&(StorageFile.migrate(B),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if(!I||"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
+urlParams.forceMigration);document.body.appendChild(D);var N=!0,G=!1,ia,ka=0,ja=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ca=mxUtils.bind(this,function(){ka++;pa()}),pa=mxUtils.bind(this,function(){try{if(ka>=ia.length)ja();else{var L=ia[ka];StorageFile.getFileContent(this,L,mxUtils.bind(this,function(V){null==V||".scratchpad"==L&&V==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[L]}),"*"):ca()}),ca)}}catch(V){console.log(V)}}),ra=mxUtils.bind(this,function(L){try{this.setDatabaseItem(null,[{title:L.title,size:L.data.length,lastModified:Date.now(),type:L.isLib?"L":"F"},{title:L.title,data:L.data}],ca,ca,["filesInfo","files"])}catch(V){console.log(V)}});I=mxUtils.bind(this,function(L){try{if(L.source==D.contentWindow){var V={};try{V=JSON.parse(L.data)}catch(R){}"init"==V.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=V.event||G||(N?null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?(ia=V.resp[0],N=!1,pa()):ja():null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?ra(V.resp[0]):ca())}}catch(R){console.log(R)}});window.addEventListener("message",I)}})));d(B);B.onversionchange=function(){B.close()}});v.onerror=f;v.onblocked=function(){}}catch(x){null!=f&&f(x)}else null!=f&&f()}else d(this.database)};
+EditorUi.prototype.setDatabaseItem=function(d,f,g,v,x){this.openDatabase(mxUtils.bind(this,function(B){try{x=x||"objects";Array.isArray(x)||(x=[x],d=[d],f=[f]);var I=B.transaction(x,"readwrite");I.oncomplete=g;I.onerror=v;for(B=0;B<x.length;B++)I.objectStore(x[B]).put(null!=d&&null!=d[B]?{key:d[B],data:f[B]}:f[B])}catch(D){null!=v&&v(D)}}),v)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,v){this.openDatabase(mxUtils.bind(this,function(x){v=v||"objects";Array.isArray(v)||(v=[v],d=[d]);x=x.transaction(v,
+"readwrite");x.oncomplete=f;x.onerror=g;for(var B=0;B<v.length;B++)x.objectStore(v[B]).delete(d[B])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,v){this.openDatabase(mxUtils.bind(this,function(x){try{v=v||"objects";var B=x.transaction([v],"readonly").objectStore(v).get(d);B.onsuccess=function(){f(B.result)};B.onerror=g}catch(I){null!=g&&g(I)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(v){try{g=g||"objects";var x=v.transaction([g],
+"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),B=[];x.onsuccess=function(I){null==I.target.result?d(B):(B.push(I.target.result.value),I.target.result.continue())};x.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(v){try{g=g||"objects";var x=v.transaction([g],"readonly").objectStore(g).getAllKeys();x.onsuccess=function(){d(x.result)};x.onerror=f}catch(B){null!=f&&f(B)}}),f)};EditorUi.prototype.commentsSupported=
+function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var v=this.getCurrentFile();
+null!=v?v.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();
+return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,v,x,B,I,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,v,x,B,I,D)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja,ca,pa,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,v,x,B,I,D,N,G,ia,ka,ja,ca,pa,ra)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,v)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=
+function(d,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,v)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,v,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,v,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),v=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<v.length){var x="<mxfile "===v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12);v="<mxlibrary>"===v.substring(0,11);(x||v)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,e,k,l,C,p){function E(){for(var ca=I.getElementsByTagName("div"),pa=0,ra=0;ra<ca.length;ra++)"none"!=ca[ra].style.display&&ca[ra].parentNode==I&&pa++;D.style.display=0==pa?"block":"none"}function M(ca,pa,ra,L){function V(){pa.removeChild(Z);pa.removeChild(la);Y.style.display="block";R.style.display="block"}v={div:pa,comment:ca,saveCallback:ra,deleteOnCancel:L};var R=pa.querySelector(".geCommentTxt"),Y=pa.querySelector(".geCommentActionsList"),Z=document.createElement("textarea");
Z.className="geCommentEditTxtArea";Z.style.minHeight=R.offsetHeight+"px";Z.value=ca.content;pa.insertBefore(Z,R);var la=document.createElement("div");la.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){L?(pa.parentNode.removeChild(pa),E()):V();v=null});q.className="geCommentEditBtn";la.appendChild(q);var F=mxUtils.button(mxResources.get("save"),function(){R.innerText="";ca.content=Z.value;mxUtils.write(R,ca.content);V();ra(ca);v=null});mxEvent.addListener(Z,
"keydown",mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(F.click(),mxEvent.consume(T)):27==T.keyCode&&(q.click(),mxEvent.consume(T)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";la.appendChild(F);pa.insertBefore(la,R);Y.style.display="none";R.style.display="none";Z.focus()}function S(ca,pa){pa.innerText="";ca=new Date(ca.modifiedDate);var ra=b.timeSince(ca);null==ra&&(ra=mxResources.get("lessThanAMinute"));
-mxUtils.write(pa,mxResources.get("timeAgo",[ra],"{1} ago"));pa.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function H(ca){var pa=document.createElement("img");pa.className="geCommentBusyImg";pa.src=IMAGE_PATH+"/spin.gif";ca.appendChild(pa);ca.busyImg=pa}function K(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function Q(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function e(ca,pa,ra,L,V){function R(U,da,fa){var na=document.createElement("li");na.className=
+mxUtils.write(pa,mxResources.get("timeAgo",[ra],"{1} ago"));pa.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function H(ca){var pa=document.createElement("img");pa.className="geCommentBusyImg";pa.src=IMAGE_PATH+"/spin.gif";ca.appendChild(pa);ca.busyImg=pa}function K(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function Q(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function d(ca,pa,ra,L,V){function R(U,da,fa){var na=document.createElement("li");na.className=
"geCommentAction";var sa=document.createElement("a");sa.className="geCommentActionLnk";mxUtils.write(sa,U);na.appendChild(sa);mxEvent.addListener(sa,"click",function(za){da(za,ca);za.preventDefault();mxEvent.consume(za)});aa.appendChild(na);fa&&(na.style.display="none")}function Y(){function U(na){da.push(fa);if(null!=na.replies)for(var sa=0;sa<na.replies.length;sa++)fa=fa.nextSibling,U(na.replies[sa])}var da=[],fa=la;U(ca);return{pdiv:fa,replies:da}}function Z(U,da,fa,na,sa){function za(){H(Aa);
-ca.addReply(oa,function(ya){oa.id=ya;ca.replies.push(oa);Q(Aa);fa&&fa()},function(ya){ua();K(Aa);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},na,sa)}function ua(){M(oa,Aa,function(ya){za()},!0)}var Ba=Y().pdiv,oa=b.newComment(U,b.getCurrentUser());oa.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var Aa=e(oa,ca.replies,Ba,L+1);da?ua():za()}if(V||!ca.isResolved){D.style.display="none";var la=document.createElement("div");la.className="geCommentContainer";
+ca.addReply(oa,function(ya){oa.id=ya;ca.replies.push(oa);Q(Aa);fa&&fa()},function(ya){ua();K(Aa);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},na,sa)}function ua(){M(oa,Aa,function(ya){za()},!0)}var Ba=Y().pdiv,oa=b.newComment(U,b.getCurrentUser());oa.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var Aa=d(oa,ca.replies,Ba,L+1);da?ua():za()}if(V||!ca.isResolved){D.style.display="none";var la=document.createElement("div");la.className="geCommentContainer";
la.setAttribute("data-commentId",ca.id);la.style.marginLeft=20*L+5+"px";ca.isResolved&&!Editor.isDarkMode()&&(la.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=ca.user.pictureUrl||Editor.userImage;q.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";q.appendChild(F);var T=document.createElement("div");T.className="geCommentUsername";mxUtils.write(T,
ca.user.displayName||"");F.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ca.id);S(ca,T);F.appendChild(T);la.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,ca.content||"");la.appendChild(q);ca.isLocked&&(la.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var aa=document.createElement("ul");aa.className="geCommentActionsList";q.appendChild(aa);f||ca.isLocked||0!=
L&&!g||R(mxResources.get("reply"),function(){Z("",!0)},ca.isResolved);F=b.getCurrentUser();null==F||F.id!=ca.user.id||f||ca.isLocked||(R(mxResources.get("edit"),function(){function U(){M(ca,la,function(){H(la);ca.editComment(ca.content,function(){Q(la)},function(da){K(la);U();b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}U()},ca.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(la);ca.deleteComment(function(U){if(!0===
U){U=la.querySelector(".geCommentTxt");U.innerText="";mxUtils.write(U,mxResources.get("msgDeleted"));var da=la.querySelectorAll(".geCommentAction");for(U=0;U<da.length;U++)da[U].parentNode.removeChild(da[U]);Q(la);la.style.opacity="0.5"}else{da=Y(ca).replies;for(U=0;U<da.length;U++)I.removeChild(da[U]);for(U=0;U<pa.length;U++)if(pa[U]==ca){pa.splice(U,1);break}D.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(U){K(la);b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
ca.isResolved));f||ca.isLocked||0!=L||R(ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(U){function da(){var fa=U.target;fa.innerText="";ca.isResolved=!ca.isResolved;mxUtils.write(fa,ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=ca.isResolved?"none":"",sa=Y(ca).replies,za=Editor.isDarkMode()?"transparent":ca.isResolved?"ghostWhite":"white",ua=0;ua<sa.length;ua++){sa[ua].style.backgroundColor=za;for(var Ba=sa[ua].querySelectorAll(".geCommentAction"),
-oa=0;oa<Ba.length;oa++)Ba[oa]!=fa.parentNode&&(Ba[oa].style.display=na);ia||(sa[ua].style.display="none")}E()}ca.isResolved?Z(mxResources.get("reOpened")+": ",!0,da,!1,!0):Z(mxResources.get("markedAsResolved"),!1,da,!0)});la.appendChild(q);null!=ra?I.insertBefore(la,ra.nextSibling):I.appendChild(la);for(ra=0;null!=ca.replies&&ra<ca.replies.length;ra++)q=ca.replies[ra],q.isResolved=ca.isResolved,e(q,ca.replies,null,L+1,V);null!=v&&(v.comment.id==ca.id?(V=ca.content,ca.content=v.comment.content,M(ca,
-la,v.saveCallback,v.deleteOnCancel),ca.content=V):null==v.comment.id&&v.comment.pCommentId==ca.id&&(I.appendChild(v.div),M(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return la}}var f=!b.canComment(),g=b.canReplyToReplies(),v=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var C=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.backgroundColor=Editor.isDarkMode()?
-Dialog.backdropColor:"whiteSmoke";I.style.bottom=parseInt(C)+7+"px";y.appendChild(I);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(D,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=C;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C=document.createElement("a");
-C.className="geButton";if(!f){var G=C.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(ca){function pa(){M(ra,L,function(V){H(L);b.addComment(V,function(R){V.id=R;ka.push(V);Q(L)},function(R){K(L);pa();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ra=b.newComment("",b.getCurrentUser()),L=e(ra,ka,null,0);
-pa();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G)}G=C.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));G.className="geAdaptiveAsset";var ia=!1;mxEvent.addListener(G,"click",function(ca){this.className=(ia=!ia)?"geButton geCheckedBtn":"geButton";ja();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G);b.commentsRefreshNeeded()&&(G=C.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+
-'/update16.png" style="width: 16px; padding: 2px;">',G.setAttribute("title",mxResources.get("refresh")),G.className="geAdaptiveAsset",mxEvent.addListener(G,"click",function(ca){ja();ca.preventDefault();mxEvent.consume(ca)}),N.appendChild(G));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geAdaptiveAsset",mxEvent.addListener(C,"click",function(ca){p();ca.preventDefault();
-mxEvent.consume(ca)}),N.appendChild(C));y.appendChild(N);var ka=[],ja=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var ca=v.div.querySelector(".geCommentEditTxtArea"),pa=v.div.querySelector(".geCommentEditBtns");v.comment.content=ca.value;ca.parentNode.removeChild(ca);pa.parentNode.removeChild(pa)}catch(ra){b.handleError(ra)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
-"...</div>";g=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ra){function L(V){if(null!=V){V.sort(function(Y,Z){return new Date(Y.modifiedDate)-new Date(Z.modifiedDate)});for(var R=0;R<V.length;R++)L(V[R].replies)}}ra.sort(function(V,R){return new Date(V.modifiedDate)-new Date(R.modifiedDate)});I.innerText="";I.appendChild(D);D.style.display="block";ka=ra;for(ra=0;ra<ka.length;ra++)L(ka[ra].replies),e(ka[ra],ka,null,0,ia);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&
+oa=0;oa<Ba.length;oa++)Ba[oa]!=fa.parentNode&&(Ba[oa].style.display=na);ia||(sa[ua].style.display="none")}E()}ca.isResolved?Z(mxResources.get("reOpened")+": ",!0,da,!1,!0):Z(mxResources.get("markedAsResolved"),!1,da,!0)});la.appendChild(q);null!=ra?I.insertBefore(la,ra.nextSibling):I.appendChild(la);for(ra=0;null!=ca.replies&&ra<ca.replies.length;ra++)q=ca.replies[ra],q.isResolved=ca.isResolved,d(q,ca.replies,null,L+1,V);null!=v&&(v.comment.id==ca.id?(V=ca.content,ca.content=v.comment.content,M(ca,
+la,v.saveCallback,v.deleteOnCancel),ca.content=V):null==v.comment.id&&v.comment.pCommentId==ca.id&&(I.appendChild(v.div),M(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return la}}var f=!b.canComment(),g=b.canReplyToReplies(),v=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var B=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";I.style.bottom=parseInt(B)+7+"px";x.appendChild(I);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(D,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=B;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B=document.createElement("a");
+B.className="geButton";if(!f){var G=B.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(ca){function pa(){M(ra,L,function(V){H(L);b.addComment(V,function(R){V.id=R;ka.push(V);Q(L)},function(R){K(L);pa();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ra=b.newComment("",b.getCurrentUser()),L=d(ra,ka,null,0);
+pa();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G)}G=B.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));G.className="geAdaptiveAsset";var ia=!1;mxEvent.addListener(G,"click",function(ca){this.className=(ia=!ia)?"geButton geCheckedBtn":"geButton";ja();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G);b.commentsRefreshNeeded()&&(G=B.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+
+'/update16.png" style="width: 16px; padding: 2px;">',G.setAttribute("title",mxResources.get("refresh")),G.className="geAdaptiveAsset",mxEvent.addListener(G,"click",function(ca){ja();ca.preventDefault();mxEvent.consume(ca)}),N.appendChild(G));b.commentsSaveNeeded()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geAdaptiveAsset",mxEvent.addListener(B,"click",function(ca){p();ca.preventDefault();
+mxEvent.consume(ca)}),N.appendChild(B));x.appendChild(N);var ka=[],ja=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var ca=v.div.querySelector(".geCommentEditTxtArea"),pa=v.div.querySelector(".geCommentEditBtns");v.comment.content=ca.value;ca.parentNode.removeChild(ca);pa.parentNode.removeChild(pa)}catch(ra){b.handleError(ra)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+"...</div>";g=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ra){function L(V){if(null!=V){V.sort(function(Y,Z){return new Date(Y.modifiedDate)-new Date(Z.modifiedDate)});for(var R=0;R<V.length;R++)L(V[R].replies)}}ra.sort(function(V,R){return new Date(V.modifiedDate)-new Date(R.modifiedDate)});I.innerText="";I.appendChild(D);D.style.display="block";ka=ra;for(ra=0;ra<ka.length;ra++)L(ka[ra].replies),d(ka[ra],ka,null,0,ia);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&
(I.appendChild(v.div),M(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(ra){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ra&&ra.message?": "+ra.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ja();this.refreshComments=ja;N=mxUtils.bind(this,function(){function ca(R){var Y=ra[R.id];if(null!=Y)for(S(R,Y),Y=0;null!=R.replies&&Y<R.replies.length;Y++)ca(R.replies[Y])}if(this.window.isVisible()){for(var pa=I.querySelectorAll(".geCommentDate"),
-ra={},L=0;L<pa.length;L++){var V=pa[L];ra[V.getAttribute("data-commentId")]=V}for(L=0;L<ka.length;L++)ca(ka[L])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),y,d,k,l,B,!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,d,k,l,B,p,E,M,S,H,K){var Q=document.createElement("div");Q.style.textAlign="center";K=null!=K?K:44;var e=document.createElement("div");e.style.padding="6px";e.style.overflow="auto";e.style.maxHeight=K+"px";e.style.lineHeight="1.2em";mxUtils.write(e,d);Q.appendChild(e);null!=H&&(e=document.createElement("div"),e.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",H),e.appendChild(d),Q.appendChild(e));H=document.createElement("div");
-H.style.textAlign="center";H.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l(f.checked)});p.className="geBtn";null!=M&&(p.innerHTML=M+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&H.appendChild(p);var g=mxUtils.button(B||mxResources.get("ok"),function(){b.hideDialog();null!=k&&
-k(f.checked)});H.appendChild(g);null!=E?(g.innerHTML=E+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(p);Q.appendChild(H);S?(H.style.marginTop="10px",e=document.createElement("p"),e.style.marginTop="20px",e.style.marginBottom="0px",e.appendChild(f),B=document.createElement("span"),mxUtils.write(B," "+mxResources.get("rememberThisSetting")),
-e.appendChild(B),Q.appendChild(e),mxEvent.addListener(B,"click",function(v){f.checked=!f.checked;mxEvent.consume(v)})):H.style.marginTop="12px";this.init=function(){g.focus()};this.container=Q};function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):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,d,k){this.ui=b;this.page=d;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(b,d,k){this.ui=b;this.oldIndex=d;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(b,d,k){this.ui=b;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=k&&(d.viewState=k,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var d=this.ui.editor,k=d.graph,l=Graph.compressNode(d.getGraphXml(!0));mxUtils.setTextContent(b.node,l);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
-k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,d,k,l,B){SelectPage.call(this,b,k);this.relatedPage=d;this.index=l;this.previousIndex=null;this.noSelect=B}mxUtils.extend(ChangePage,SelectPage);
+ra={},L=0;L<pa.length;L++){var V=pa[L];ra[V.getAttribute("data-commentId")]=V}for(L=0;L<ka.length;L++)ca(ka[L])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),x,e,k,l,C,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
+b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,l,C,p,E,M,S,H,K){var Q=document.createElement("div");Q.style.textAlign="center";K=null!=K?K:44;var d=document.createElement("div");d.style.padding="6px";d.style.overflow="auto";d.style.maxHeight=K+"px";d.style.lineHeight="1.2em";mxUtils.write(d,e);Q.appendChild(d);null!=H&&(d=document.createElement("div"),d.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",H),d.appendChild(e),Q.appendChild(d));H=document.createElement("div");
+H.style.textAlign="center";H.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l(f.checked)});p.className="geBtn";null!=M&&(p.innerHTML=M+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&H.appendChild(p);var g=mxUtils.button(C||mxResources.get("ok"),function(){b.hideDialog();null!=k&&
+k(f.checked)});H.appendChild(g);null!=E?(g.innerHTML=E+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(p);Q.appendChild(H);S?(H.style.marginTop="10px",d=document.createElement("p"),d.style.marginTop="20px",d.style.marginBottom="0px",d.appendChild(f),C=document.createElement("span"),mxUtils.write(C," "+mxResources.get("rememberThisSetting")),
+d.appendChild(C),Q.appendChild(d),mxEvent.addListener(C,"click",function(v){f.checked=!f.checked;mxEvent.consume(v)})):H.style.marginTop="12px";this.init=function(){g.focus()};this.container=Q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var e=this.ui.editor,k=e.graph,l=Graph.compressNode(e.getGraphXml(!0));mxUtils.setTextContent(b.node,l);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
+k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(b,e,k,l,C){SelectPage.call(this,b,k);this.relatedPage=e;this.index=l;this.previousIndex=null;this.noSelect=C}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var d=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){d=k;break}return d};EditorUi.prototype.getPageById=function(b,d){d=null!=d?d:this.pages;if(null!=d)for(var k=0;k<d.length;k++)if(d[k].getId()==b)return d[k];return null};
-EditorUi.prototype.createImageForPageLink=function(b,d,k){var l=b.indexOf(","),B=null;0<l&&(l=this.getPageById(b.substring(l+1)),null!=l&&l!=d&&(B=this.getImageForPage(l,d,k),B.originalSrc=b));null==B&&(B={originalSrc:b});return B};
-EditorUi.prototype.getImageForPage=function(b,d,k){k=null!=k?k:this.editor.graph;var l=k.getGlobalVariable,B=this.createTemporaryGraph(k.getStylesheet());B.defaultPageBackgroundColor=k.defaultPageBackgroundColor;B.shapeBackgroundColor=k.shapeBackgroundColor;B.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=d?d:this.currentPage);B.getGlobalVariable=function(M){return"pagenumber"==M?p+1:"page"==M&&null!=d?d.getName():l.apply(this,arguments)};document.body.appendChild(B.container);
-this.updatePageRoot(b);B.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=B.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=B.getGraphBounds();document.body.removeChild(B.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,d=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var B=
-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";B!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(b.view,arguments)});var k=null,l=mxUtils.bind(this,function(){this.updateTabContainer();var B=this.currentPage;null!=B&&B!=k&&(null==B.viewState||null==B.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
-(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+B.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+B.viewState.scrollTop),k=B);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(B,
-p){B=p.getProperty("edit").changes;for(p=0;p<B.length;p++)if(B[p]instanceof SelectPage||B[p]instanceof RenamePage||B[p]instanceof MovePage||B[p]instanceof mxRootChange){l();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(b,d,k){b=null!=b?this.getPageById(b.getId()):null;var l=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,d):(l.setViewState(d),this.editor.updateGraphComponents(),l.view.revalidate(),l.sizeDidChange()),l.container.scrollLeft=l.view.translate.x*l.view.scale+d.scrollLeft,l.container.scrollTop=l.view.translate.y*l.view.scale+d.scrollTop,l.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var d=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),l=parseFloat(b.getAttribute("pageWidth")),B=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),M=b.getAttribute("extFonts");if(M)try{M=M.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(l)||isNaN(B)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,l,B),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:M||[]}};
-Graph.prototype.saveViewState=function(b,d,k,l){k||(d.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),d.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),d.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),d.setAttribute("connect",null==b||b.connect?"1":"0"),d.setAttribute("arrows",null==b||b.arrows?"1":"0"),d.setAttribute("fold",
-null==b||b.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(d.setAttribute("pageWidth",k.width),d.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&d.setAttribute("background",b.background),l=this.getBackgroundImageObject(b.backgroundImage,l),null!=l&&d.setAttribute("backgroundImage",
-JSON.stringify(l)));d.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");d.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&d.setAttribute("extFonts",b.extFonts.map(function(B){return B.name+"^"+B.url}).join("|"))};
+EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
+EditorUi.prototype.createImageForPageLink=function(b,e,k){var l=b.indexOf(","),C=null;0<l&&(l=this.getPageById(b.substring(l+1)),null!=l&&l!=e&&(C=this.getImageForPage(l,e,k),C.originalSrc=b));null==C&&(C={originalSrc:b});return C};
+EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var l=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(M){return"pagenumber"==M?p+1:"page"==M&&null!=e?e.getName():l.apply(this,arguments)};document.body.appendChild(C.container);
+this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var C=
+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";C!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,l=mxUtils.bind(this,function(){this.updateTabContainer();var C=this.currentPage;null!=C&&C!=k&&(null==C.viewState||null==C.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+C.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+C.viewState.scrollTop),k=C);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,
+p){C=p.getProperty("edit").changes;for(p=0;p<C.length;p++)if(C[p]instanceof SelectPage||C[p]instanceof RenamePage||C[p]instanceof MovePage||C[p]instanceof mxRootChange){l();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var l=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(l.setViewState(e),this.editor.updateGraphComponents(),l.view.revalidate(),l.sizeDidChange()),l.container.scrollLeft=l.view.translate.x*l.view.scale+e.scrollLeft,l.container.scrollTop=l.view.translate.y*l.view.scale+e.scrollTop,l.restoreSelection(k))};
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),l=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),M=b.getAttribute("extFonts");if(M)try{M=M.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(l)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,l,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:M||[]}};
+Graph.prototype.saveViewState=function(b,e,k,l){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
+null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),l=this.getBackgroundImageObject(b.backgroundImage,l),null!=l&&e.setAttribute("backgroundImage",
+JSON.stringify(l)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(C){return C.name+"^"+C.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
-Graph.prototype.setViewState=function(b,d){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(d&&null!=k)for(d=0;d<k.length;d++){var l=document.getElementById("extFont_"+k[d].name);null!=l&&l.parentNode.removeChild(l)}for(d=0;d<this.extFonts.length;d++)this.addExtFont(this.extFonts[d].name,this.extFonts[d].url,
+Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=k)for(e=0;e<k.length;e++){var l=document.getElementById("extFont_"+k[e].name);null!=l&&l.parentNode.removeChild(l)}for(e=0;e<this.extFonts.length;e++)this.addExtFont(this.extFonts[e].name,this.extFonts[e].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled=
!0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,d,k){if(b&&d){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:d});var l="extFont_"+b;if(null==document.getElementById(l))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,l);else{document.getElementsByTagName("head");var B=document.createElement("style");B.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+d+'");\n}'));B.setAttribute("id",l);document.getElementsByTagName("head")[0].appendChild(B)}if(!k){null==
-this.extFonts&&(this.extFonts=[]);k=this.extFonts;l=!0;for(B=0;B<k.length;B++)if(k[B].name==b){l=!1;break}l&&this.extFonts.push({name:b,url:d})}}};
-EditorUi.prototype.updatePageRoot=function(b,d){if(null==b.root){d=this.editor.extractGraphModel(b.node,null,d);var k=Editor.extractParserError(d);if(k)throw Error(k);null!=d?(b.graphModelNode=d,b.viewState=this.editor.graph.createViewState(d),k=new mxCodec(d.ownerDocument),b.root=k.decode(d).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){d=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(d))throw Error(k);null!=d&&(b.graphModelNode=
-d)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,d,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var l=this.editor.graph.model.createUndoableEdit();l.ignoreEdit=!0;var B=new SelectPage(this,b,k);B.execute();l.add(B);l.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",l))}}catch(p){this.handleError(p)}};
-EditorUi.prototype.selectNextPage=function(b){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),b?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,d){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),d=null!=d?d:this.pages.length,d=new ChangePage(this,b,b,d),this.editor.graph.model.execute(d));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,d){d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),d);d.setName(null!=b?b:this.createPageName());this.initDiagramNode(d);return d};EditorUi.prototype.createPageName=function(){for(var b={},d=0;d<this.pages.length;d++){var k=this.pages[d].getName();null!=k&&0<k.length&&(b[k]=k)}d=this.pages.length;do k=mxResources.get("pageWithNumber",[++d]);while(null!=b[k]);return k};
-EditorUi.prototype.removePage=function(b){try{var d=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(d.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var l=this.currentPage;l==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,l=this.pages[k]):1>=this.pages.length&&(l=this.insertPage(),d.model.execute(new RenamePage(this,l,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,b,l))}finally{d.model.endUpdate()}}}catch(B){this.handleError(B)}return b};
-EditorUi.prototype.duplicatePage=function(b,d){var k=null;try{var l=this.editor.graph;if(l.isEnabled()){l.isEditing()&&l.stopEditing();var B=b.node.cloneNode(!1);B.removeAttribute("id");var p={},E=l.createCellLookup([l.model.root]);k=new DiagramPage(B);k.root=l.cloneCell(l.model.root,null,p);var M=new mxGraphModel;M.prefix=Editor.guid()+"-";M.setRoot(k.root);l.updateCustomLinks(l.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?l.getViewState():b.viewState;this.initDiagramNode(k);
-k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(d);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return k};EditorUi.prototype.initDiagramNode=function(b){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,d);mxUtils.setTextContent(b.node,Graph.compressNode(d))};
-EditorUi.prototype.clonePages=function(b){for(var d=[],k=0;k<b.length;k++)d.push(this.clonePage(b[k]));return d};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var d=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;d.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);d.root=this.editor.graph.model.cloneCell(b.root,null,!0);return d};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return b};EditorUi.prototype.movePage=function(b,d){this.editor.graph.model.execute(new MovePage(this,b,d))};
+Graph.prototype.addExtFont=function(b,e,k){if(b&&e){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:e});var l="extFont_"+b;if(null==document.getElementById(l))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,l);else{document.getElementsByTagName("head");var C=document.createElement("style");C.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));C.setAttribute("id",l);document.getElementsByTagName("head")[0].appendChild(C)}if(!k){null==
+this.extFonts&&(this.extFonts=[]);k=this.extFonts;l=!0;for(C=0;C<k.length;C++)if(k[C].name==b){l=!1;break}l&&this.extFonts.push({name:b,url:e})}}};
+EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){e=this.editor.extractGraphModel(b.node,null,e);var k=Editor.extractParserError(e);if(k)throw Error(k);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),k=new mxCodec(e.ownerDocument),b.root=k.decode(e).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(e))throw Error(k);null!=e&&(b.graphModelNode=
+e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
+EditorUi.prototype.selectPage=function(b,e,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var l=this.editor.graph.model.createUndoableEdit();l.ignoreEdit=!0;var C=new SelectPage(this,b,k);C.execute();l.add(C);l.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",l))}}catch(p){this.handleError(p)}};
+EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};
+EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
+EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var l=this.currentPage;l==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,l=this.pages[k]):1>=this.pages.length&&(l=this.insertPage(),e.model.execute(new RenamePage(this,l,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,l))}finally{e.model.endUpdate()}}}catch(C){this.handleError(C)}return b};
+EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var l=this.editor.graph;if(l.isEnabled()){l.isEditing()&&l.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},E=l.createCellLookup([l.model.root]);k=new DiagramPage(C);k.root=l.cloneCell(l.model.root,null,p);var M=new mxGraphModel;M.prefix=Editor.guid()+"-";M.setRoot(k.root);l.updateCustomLinks(l.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?l.getViewState():b.viewState;this.initDiagramNode(k);
+k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
+EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display="inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="13px";d.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,l=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),B=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(H,K){this.pages[H]==this.currentPage?(K.className="geActivePage",K.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):K.className="geInactivePage";K.setAttribute("draggable","true");mxEvent.addListener(K,"dragstart",mxUtils.bind(this,function(Q){b.isEnabled()?(mxClient.IS_FF&&Q.dataTransfer.setData("Text","<diagram/>"),B=H):mxEvent.consume(Q)}));mxEvent.addListener(K,"dragend",mxUtils.bind(this,function(Q){B=null;Q.stopPropagation();
-Q.preventDefault()}));mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Q){null!=B&&(Q.dataTransfer.dropEffect="move");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Q){null!=B&&H!=B&&this.movePage(B,H);Q.stopPropagation();Q.preventDefault()}));d.appendChild(K)})(p,this.createTabForPage(this.pages[p],l,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(d);l=this.createPageMenuTab();this.tabContainer.appendChild(l);
-l=null;this.isPageInsertTabVisible()&&(l=this.createPageInsertTab(),this.tabContainer.appendChild(l));if(d.clientWidth>this.tabContainer.clientWidth-k){null!=l&&(l.style.position="absolute",l.style.right="0px",d.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var M=this.createControlTab(4,"&nbsp;&#10095;");M.style.position="absolute";
-M.style.right=this.editor.chromeless?"0px":"29px";M.style.fontSize="13pt";this.tabContainer.appendChild(M);var S=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=S+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(H){d.scrollLeft-=Math.max(20,S-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(M,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(H)}));mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(M,
-d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(M,"click",mxUtils.bind(this,function(H){d.scrollLeft+=Math.max(20,S-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(M,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(H)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(b){var d=document.createElement("div");d.style.display="inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.textAlign="center";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="12px 4px 8px 4px";d.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";d.style.borderTopStyle="none";d.style.borderBottomStyle="none";d.style.backgroundColor=
-this.tabContainer.style.backgroundColor;d.style.cursor="move";d.style.color="gray";b&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(d.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(k){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return d};
-EditorUi.prototype.createControlTab=function(b,d,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=d;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
-EditorUi.prototype.createPageMenuTab=function(b,d){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
-var B=new mxPopupMenu(mxUtils.bind(this,function(M,S){var H=mxUtils.bind(this,function(){for(var f=0;f<this.pages.length;f++)mxUtils.bind(this,function(g){var v=M.addItem(this.getShortPageName(this.pages[g]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[g])}),S),y=this.pages[g].getId();v.setAttribute("title",this.pages[g].getName()+" ("+(g+1)+"/"+this.pages.length+")"+(null!=y?" ["+y+"]":""));this.pages[g]==this.currentPage&&M.addCheckmark(v,Editor.checkmarkImage)})(f)}),K=mxUtils.bind(this,
-function(){M.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),S)});d||H();if(this.editor.graph.isEnabled()){d||(M.addSeparator(S),K());var Q=this.currentPage;if(null!=Q){M.addSeparator(S);var e=this.getShortPageName(Q);M.addItem(mxResources.get("removeIt",[e]),null,mxUtils.bind(this,function(){this.removePage(Q)}),S);M.addItem(mxResources.get("renameIt",[e]),null,mxUtils.bind(this,function(){this.renamePage(Q,Q.getName())}),S);d||M.addSeparator(S);M.addItem(mxResources.get("duplicateIt",
-[e]),null,mxUtils.bind(this,function(){this.duplicatePage(Q,mxResources.get("copyOf",[Q.getName()]))}),S)}}d&&(M.addSeparator(S),K(),M.addSeparator(S),H())}));B.div.className+=" geMenubarMenu";B.smartSeparators=!0;B.showDisabled=!0;B.autoExpand=!0;B.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(B,arguments);B.destroy()});var p=mxEvent.getClientX(l),E=mxEvent.getClientY(l);B.popup(p,E,null,l);this.setCurrentMenu(B);mxEvent.consume(l)}));return b};
-EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var d=b.getElementsByTagName("div")[0];d.style.display="inline-block";d.style.width="21px";d.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,d,k,l){k=this.createTab(k);var B=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",B+(null!=p?" ("+p+")":"")+" ["+l+"]");mxUtils.write(k,B);k.style.maxWidth=d+"px";k.style.width=d+"px";this.addTabListeners(b,k);42<d&&(k.style.textOverflow="ellipsis");return k};
-EditorUi.prototype.addTabListeners=function(b,d){mxEvent.disableContextMenu(d);var k=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var l=!1,B=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(p){l=null!=this.currentMenu;B=b==this.currentPage;k.isMouseDown||B||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&B||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!l){var E=new mxPopupMenu(this.createPageMenu(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.resetCurrentMenu();E.destroy()});var M=mxEvent.getClientX(p),S=mxEvent.getClientY(p);E.popup(M,S,null,p);this.setCurrentMenu(E,d)}mxEvent.consume(p)}}))};
-EditorUi.prototype.getLinkForPage=function(b,d,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var l=this.getCurrentFile();if(null!=l&&l.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var B=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));B+=(0==B.length?"?":"&")+"page-id="+b.getId();null!=d&&(B+="&"+d.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+B+"#"+l.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,d){return mxUtils.bind(this,function(k,l){var B=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),l);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),l);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,d)}),l);null!=this.getLinkForPage(b)&&(k.addSeparator(l),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,M,S,H,K){p=this.createUrlParameters(p,E,M,S,H,K);M||p.push("hide-pages=1");B.isSelectionEmpty()||(M=B.getBoundingBox(B.getSelectionCells()),E=B.view.translate,H=B.view.scale,M.width/=H,M.height/=H,M.x=M.x/H-E.x,M.y=M.y/H-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(M.x),y:Math.round(M.y),width:Math.round(M.width),height:Math.round(M.height),border:100}))));
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,l=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
+1),C=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(H,K){this.pages[H]==this.currentPage?(K.className="geActivePage",K.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):K.className="geInactivePage";K.setAttribute("draggable","true");mxEvent.addListener(K,"dragstart",mxUtils.bind(this,function(Q){b.isEnabled()?(mxClient.IS_FF&&Q.dataTransfer.setData("Text","<diagram/>"),C=H):mxEvent.consume(Q)}));mxEvent.addListener(K,"dragend",mxUtils.bind(this,function(Q){C=null;Q.stopPropagation();
+Q.preventDefault()}));mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Q){null!=C&&(Q.dataTransfer.dropEffect="move");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Q){null!=C&&H!=C&&this.movePage(C,H);Q.stopPropagation();Q.preventDefault()}));e.appendChild(K)})(p,this.createTabForPage(this.pages[p],l,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);l=this.createPageMenuTab();this.tabContainer.appendChild(l);
+l=null;this.isPageInsertTabVisible()&&(l=this.createPageInsertTab(),this.tabContainer.appendChild(l));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=l&&(l.style.position="absolute",l.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var M=this.createControlTab(4,"&nbsp;&#10095;");M.style.position="absolute";
+M.style.right=this.editor.chromeless?"0px":"29px";M.style.fontSize="13pt";this.tabContainer.appendChild(M);var S=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=S+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(H){e.scrollLeft-=Math.max(20,S-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(M,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(H)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(M,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(M,"click",mxUtils.bind(this,function(H){e.scrollLeft+=Math.max(20,S-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(M,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(H)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
+this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
+EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
+EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
+var C=new mxPopupMenu(mxUtils.bind(this,function(M,S){var H=mxUtils.bind(this,function(){for(var f=0;f<this.pages.length;f++)mxUtils.bind(this,function(g){var v=M.addItem(this.getShortPageName(this.pages[g]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[g])}),S),x=this.pages[g].getId();v.setAttribute("title",this.pages[g].getName()+" ("+(g+1)+"/"+this.pages.length+")"+(null!=x?" ["+x+"]":""));this.pages[g]==this.currentPage&&M.addCheckmark(v,Editor.checkmarkImage)})(f)}),K=mxUtils.bind(this,
+function(){M.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),S)});e||H();if(this.editor.graph.isEnabled()){e||(M.addSeparator(S),K());var Q=this.currentPage;if(null!=Q){M.addSeparator(S);var d=this.getShortPageName(Q);M.addItem(mxResources.get("removeIt",[d]),null,mxUtils.bind(this,function(){this.removePage(Q)}),S);M.addItem(mxResources.get("renameIt",[d]),null,mxUtils.bind(this,function(){this.renamePage(Q,Q.getName())}),S);e||M.addSeparator(S);M.addItem(mxResources.get("duplicateIt",
+[d]),null,mxUtils.bind(this,function(){this.duplicatePage(Q,mxResources.get("copyOf",[Q.getName()]))}),S)}}e&&(M.addSeparator(S),K(),M.addSeparator(S),H())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(l),E=mxEvent.getClientY(l);C.popup(p,E,null,l);this.setCurrentMenu(C);mxEvent.consume(l)}));return b};
+EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
+EditorUi.prototype.createTabForPage=function(b,e,k,l){k=this.createTab(k);var C=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",C+(null!=p?" ("+p+")":"")+" ["+l+"]");mxUtils.write(k,C);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var l=!1,C=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){l=null!=this.currentMenu;C=b==this.currentPage;k.isMouseDown||C||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&C||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!l){var E=new mxPopupMenu(this.createPageMenu(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.resetCurrentMenu();E.destroy()});var M=mxEvent.getClientX(p),S=mxEvent.getClientY(p);E.popup(M,S,null,p);this.setCurrentMenu(E,e)}mxEvent.consume(p)}}))};
+EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var l=this.getCurrentFile();if(null!=l&&l.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var C=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));C+=(0==C.length?"?":"&")+"page-id="+b.getId();null!=e&&(C+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+C+"#"+l.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,l){var C=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),l);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),l);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),l);null!=this.getLinkForPage(b)&&(k.addSeparator(l),k.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,M,S,H,K){p=this.createUrlParameters(p,E,M,S,H,K);M||p.push("hide-pages=1");C.isSelectionEmpty()||(M=C.getBoundingBox(C.getSelectionCells()),E=C.view.translate,H=C.view.scale,M.width/=H,M.height/=H,M.x=M.x/H-E.x,M.y=M.y/H-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(M.x),y:Math.round(M.y),width:Math.round(M.width),height:Math.round(M.height),border:100}))));
S=new EmbedDialog(this,this.getLinkForPage(b,p,S));this.showDialog(S.container,450,240,!0,!0);S.init()}))})));k.addSeparator(l);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),l);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(l),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),l))})};(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(d,k,l){l.ui=d.ui;return k};b.afterDecode=function(d,k,l){d=l.oldIndex;l.oldIndex=l.newIndex;l.newIndex=d;return l};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(d,k,l){l.ui=d.ui;return k};b.afterDecode=function(d,k,l){d=l.previous;l.previous=l.name;l.name=d;return l};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(d,k,l){l.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(l.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(B,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,B)?p:void 0})),null!=k.relatedPage.root&&d.encodeCell(k.relatedPage.root,
-l));return l};b.beforeDecode=function(d,k,l){l.ui=d.ui;l.relatedPage=l.ui.getPageById(k.getAttribute("relatedPage"));if(null==l.relatedPage){var B=k.ownerDocument.createElement("diagram");B.setAttribute("id",k.getAttribute("relatedPage"));B.setAttribute("name",k.getAttribute("name"));l.relatedPage=new DiagramPage(B);B=k.getAttribute("viewState");null!=B&&(l.relatedPage.viewState=JSON.parse(B),k.removeAttribute("viewState"));k=k.cloneNode(!0);B=k.firstChild;if(null!=B)for(l.relatedPage.root=d.decodeCell(B,
-!1),l=B.nextSibling,B.parentNode.removeChild(B),B=l;null!=B;){l=B.nextSibling;if(B.nodeType==mxConstants.NODETYPE_ELEMENT){var p=B.getAttribute("id");null==d.lookup(p)&&d.decodeCell(B)}B.parentNode.removeChild(B);B=l}}return k};b.afterDecode=function(d,k,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(l,B,p,E,M){B=null!=B?B:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),l));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),H=0;H<p.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[H]),"treeFolding","0")&&this.foldTreeCell(l,p[H]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
-function(l,B){this.model.beginUpdate();try{var p=[];this.traverse(B,!0,mxUtils.bind(this,function(M,S){var H=null!=S&&this.isTreeEdge(S);H&&p.push(S);M==B||null!=S&&!H||p.push(M);return(null==S||H)&&(M==B||!this.model.isCollapsed(M))}));this.model.setCollapsed(B,l);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!l)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(l){return!this.isEdgeIgnored(l)};Graph.prototype.getTreeEdges=function(l,B,p,E,M,S){return this.model.filterCells(this.getEdges(l,
-B,p,E,M,S),mxUtils.bind(this,function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(l,B){return this.getTreeEdges(l,B,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(l,B){return this.getTreeEdges(l,B,!1,!0,!1)};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function l(L){return v.isVertex(L)&&p(L)}function B(L){var V=
+!0,!0))}),l))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};b.afterDecode=function(e,k,l){e=l.oldIndex;l.oldIndex=l.newIndex;l.newIndex=e;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};b.afterDecode=function(e,k,l){e=l.previous;l.previous=l.name;l.name=e;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,l){l.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(l.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(C,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,C)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
+l));return l};b.beforeDecode=function(e,k,l){l.ui=e.ui;l.relatedPage=l.ui.getPageById(k.getAttribute("relatedPage"));if(null==l.relatedPage){var C=k.ownerDocument.createElement("diagram");C.setAttribute("id",k.getAttribute("relatedPage"));C.setAttribute("name",k.getAttribute("name"));l.relatedPage=new DiagramPage(C);C=k.getAttribute("viewState");null!=C&&(l.relatedPage.viewState=JSON.parse(C),k.removeAttribute("viewState"));k=k.cloneNode(!0);C=k.firstChild;if(null!=C)for(l.relatedPage.root=e.decodeCell(C,
+!1),l=C.nextSibling,C.parentNode.removeChild(C),C=l;null!=C;){l=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=l}}return k};b.afterDecode=function(e,k,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(l,C,p,E,M){C=null!=C?C:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),l));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),H=0;H<p.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[H]),"treeFolding","0")&&this.foldTreeCell(l,p[H]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
+function(l,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(M,S){var H=null!=S&&this.isTreeEdge(S);H&&p.push(S);M==C||null!=S&&!H||p.push(M);return(null==S||H)&&(M==C||!this.model.isCollapsed(M))}));this.model.setCollapsed(C,l);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!l)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(l){return!this.isEdgeIgnored(l)};Graph.prototype.getTreeEdges=function(l,C,p,E,M,S){return this.model.filterCells(this.getEdges(l,
+C,p,E,M,S),mxUtils.bind(this,function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(l,C){return this.getTreeEdges(l,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(l,C){return this.getTreeEdges(l,C,!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 l(L){return v.isVertex(L)&&p(L)}function C(L){var V=
!1;null!=L&&(V="1"==g.getCurrentCellStyle(L).treeMoving);return V}function p(L){var V=!1;null!=L&&(L=v.getParent(L),V=g.view.getState(L),V="tree"==(null!=V?V.style:g.getCellStyle(L)).containerType);return V}function E(L){var V=!1;null!=L&&(L=v.getParent(L),V=g.view.getState(L),g.view.getState(L),V=null!=(null!=V?V.style:g.getCellStyle(L)).childLayout);return V}function M(L){L=g.view.getState(L);if(null!=L){var V=g.getIncomingTreeEdges(L.cell);if(0<V.length&&(V=g.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==L.y&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==L.y+L.height&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>L.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(L,V){V=null!=V?V:!0;g.model.beginUpdate();try{var R=g.model.getParent(L),Y=g.getIncomingTreeEdges(L),Z=g.cloneCells([Y[0],L]);g.model.setTerminal(Z[0],g.model.getTerminal(Y[0],
!0),!0);var la=M(L),q=R.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?Z[1].geometry.x+=V?L.geometry.width+10:-Z[1].geometry.width-10:Z[1].geometry.y+=V?L.geometry.height+10:-Z[1].geometry.height-10;g.view.currentRoot!=R&&(Z[1].geometry.x-=q.x,Z[1].geometry.y-=q.y);var F=g.view.getState(L),T=g.view.scale;if(null!=F){var aa=mxRectangle.fromRectangle(F);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?aa.x+=(V?L.geometry.width+10:-Z[1].geometry.width-10)*T:
@@ -3966,78 +3973,78 @@ L.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?F=0:V==mxConstants.DIRECTION
g.model.getTerminal(la[0],!1)){g.model.setTerminal(la[0],la[1],!1);var q=g.getCellStyle(la[1]).newEdgeStyle;if(null!=q)try{var F=JSON.parse(q),T;for(T in F)g.setCellStyles(T,F[T],[la[0]]),"edgeStyle"==T&&"elbowEdgeStyle"==F[T]&&g.setCellStyles("elbow",Z==mxConstants.DIRECTION_SOUTH||Z==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(sa){}}Y=g.getOutgoingTreeEdges(L);var aa=R.geometry;V=[];g.view.currentRoot==R&&(aa=new mxRectangle);for(q=0;q<Y.length;q++){var U=g.model.getTerminal(Y[q],
!1);null!=U&&V.push(U)}var da=g.view.getBounds(V),fa=g.view.translate,na=g.view.scale;Z==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==da?L.geometry.x+(L.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/na-fa.x-aa.x+10,la[1].geometry.y+=la[1].geometry.height-aa.y+40):Z==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==da?L.geometry.x+(L.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/na-fa.x+-aa.x+10,la[1].geometry.y-=la[1].geometry.height+aa.y+40):(la[1].geometry.x=Z==mxConstants.DIRECTION_WEST?
la[1].geometry.x-(la[1].geometry.width+aa.x+40):la[1].geometry.x+(la[1].geometry.width-aa.x+40),la[1].geometry.y=null==da?L.geometry.y+(L.geometry.height-la[1].geometry.height)/2:(da.y+da.height)/na-fa.y+-aa.y+10);return g.addCells(la,R)}finally{g.model.endUpdate()}}function Q(L,V,R){L=g.getOutgoingTreeEdges(L);R=g.view.getState(R);var Y=[];if(null!=R&&null!=L){for(var Z=0;Z<L.length;Z++){var la=g.view.getState(g.model.getTerminal(L[Z],!1));null!=la&&(!V&&Math.min(la.x+la.width,R.x+R.width)>=Math.max(la.x,
-R.x)||V&&Math.min(la.y+la.height,R.y+R.height)>=Math.max(la.y,R.y))&&Y.push(la)}Y.sort(function(q,F){return V?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return Y}function e(L,V){var R=M(L),Y=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST)==Y&&R!=V?f.actions.get("selectParent").funct():R==V?(V=g.getOutgoingTreeEdges(L),null!=V&&0<V.length&&g.setSelectionCell(g.model.getTerminal(V[0],!1))):(R=g.getIncomingTreeEdges(L),
-null!=R&&0<R.length&&(Y=Q(g.model.getTerminal(R[0],!0),Y,L),L=g.view.getState(L),null!=L&&(L=mxUtils.indexOf(Y,L),0<=L&&(L+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=Y.length-1&&g.setSelectionCell(Y[L].cell)))))}var f=this,g=f.editor.graph,v=g.getModel(),y=f.menus.createPopupMenu;f.menus.createPopupMenu=function(L,V,R){y.apply(this,arguments);if(1==g.getSelectionCount()){V=g.getSelectionCell();var Y=g.getOutgoingTreeEdges(V);L.addSeparator();0<Y.length&&(l(g.getSelectionCell())&&
+R.x)||V&&Math.min(la.y+la.height,R.y+R.height)>=Math.max(la.y,R.y))&&Y.push(la)}Y.sort(function(q,F){return V?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return Y}function d(L,V){var R=M(L),Y=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST)==Y&&R!=V?f.actions.get("selectParent").funct():R==V?(V=g.getOutgoingTreeEdges(L),null!=V&&0<V.length&&g.setSelectionCell(g.model.getTerminal(V[0],!1))):(R=g.getIncomingTreeEdges(L),
+null!=R&&0<R.length&&(Y=Q(g.model.getTerminal(R[0],!0),Y,L),L=g.view.getState(L),null!=L&&(L=mxUtils.indexOf(Y,L),0<=L&&(L+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=Y.length-1&&g.setSelectionCell(Y[L].cell)))))}var f=this,g=f.editor.graph,v=g.getModel(),x=f.menus.createPopupMenu;f.menus.createPopupMenu=function(L,V,R){x.apply(this,arguments);if(1==g.getSelectionCount()){V=g.getSelectionCell();var Y=g.getOutgoingTreeEdges(V);L.addSeparator();0<Y.length&&(l(g.getSelectionCell())&&
this.addMenuItems(L,["selectChildren"],null,R),this.addMenuItems(L,["selectDescendants"],null,R));l(g.getSelectionCell())?(L.addSeparator(),0<g.getIncomingTreeEdges(V).length&&this.addMenuItems(L,["selectSiblings","selectParent"],null,R)):0<g.model.getEdgeCount(V)&&this.addMenuItems(L,["selectConnections"],null,R)}};f.actions.addAction("selectChildren",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var L=g.getSelectionCell();L=g.getOutgoingTreeEdges(L);if(null!=L){for(var V=[],R=0;R<L.length;R++)V.push(g.model.getTerminal(L[R],
!1));g.setSelectionCells(V)}}},null,null,"Alt+Shift+X");f.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var L=g.getSelectionCell();L=g.getIncomingTreeEdges(L);if(null!=L&&0<L.length&&(L=g.getOutgoingTreeEdges(g.model.getTerminal(L[0],!0)),null!=L)){for(var V=[],R=0;R<L.length;R++)V.push(g.model.getTerminal(L[R],!1));g.setSelectionCells(V)}}},null,null,"Alt+Shift+S");f.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var L=
g.getSelectionCell();L=g.getIncomingTreeEdges(L);null!=L&&0<L.length&&g.setSelectionCell(g.model.getTerminal(L[0],!0))}},null,null,"Alt+Shift+P");f.actions.addAction("selectDescendants",function(L,V){L=g.getSelectionCell();if(g.isEnabled()&&g.model.isVertex(L)){if(null!=V&&mxEvent.isAltDown(V))g.setSelectionCells(g.model.getTreeEdges(L,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var R=[];g.traverse(L,!0,function(Y,Z){var la=null!=Z&&g.isTreeEdge(Z);la&&R.push(Z);null!=
-Z&&!la||null!=V&&mxEvent.isShiftDown(V)||R.push(Y);return null==Z||la})}g.setSelectionCells(R)}},null,null,"Alt+Shift+D");var C=g.removeCells;g.removeCells=function(L,V){V=null!=V?V:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));V&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var R=[],Y=0;Y<L.length;Y++){var Z=L[Y];v.isEdge(Z)&&p(Z)&&(R.push(Z),Z=v.getTerminal(Z,!1));if(l(Z)){var la=[];g.traverse(Z,!0,function(q,F){var T=null!=F&&g.isTreeEdge(F);T&&la.push(F);(null==F||T)&&
-la.push(q);return null==F||T});0<la.length&&(R=R.concat(la),Z=g.getIncomingTreeEdges(L[Y]),L=L.concat(Z))}else null!=Z&&R.push(L[Y])}L=R;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(L,V,R){return l(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,R))};var I=g.duplicateCells;g.duplicateCells=function(L,V){L=null!=L?L:this.getSelectionCells();for(var R=L.slice(0),Y=0;Y<R.length;Y++){var Z=g.view.getState(R[Y]);if(null!=Z&&l(Z.cell)){var la=g.getIncomingTreeEdges(Z.cell);
+Z&&!la||null!=V&&mxEvent.isShiftDown(V)||R.push(Y);return null==Z||la})}g.setSelectionCells(R)}},null,null,"Alt+Shift+D");var B=g.removeCells;g.removeCells=function(L,V){V=null!=V?V:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));V&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var R=[],Y=0;Y<L.length;Y++){var Z=L[Y];v.isEdge(Z)&&p(Z)&&(R.push(Z),Z=v.getTerminal(Z,!1));if(l(Z)){var la=[];g.traverse(Z,!0,function(q,F){var T=null!=F&&g.isTreeEdge(F);T&&la.push(F);(null==F||T)&&
+la.push(q);return null==F||T});0<la.length&&(R=R.concat(la),Z=g.getIncomingTreeEdges(L[Y]),L=L.concat(Z))}else null!=Z&&R.push(L[Y])}L=R;return B.apply(this,arguments)};f.hoverIcons.getStateAt=function(L,V,R){return l(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,R))};var I=g.duplicateCells;g.duplicateCells=function(L,V){L=null!=L?L:this.getSelectionCells();for(var R=L.slice(0),Y=0;Y<R.length;Y++){var Z=g.view.getState(R[Y]);if(null!=Z&&l(Z.cell)){var la=g.getIncomingTreeEdges(Z.cell);
for(Z=0;Z<la.length;Z++)mxUtils.remove(la[Z],L)}}this.model.beginUpdate();try{var q=I.call(this,L,V);if(q.length==L.length)for(Y=0;Y<L.length;Y++)if(l(L[Y])){var F=g.getIncomingTreeEdges(q[Y]);la=g.getIncomingTreeEdges(L[Y]);if(0==F.length&&0<la.length){var T=this.cloneCell(la[0]);this.addEdge(T,g.getDefaultParent(),this.model.getTerminal(la[0],!0),q[Y])}}}finally{this.model.endUpdate()}return q};var D=g.moveCells;g.moveCells=function(L,V,R,Y,Z,la,q){var F=null;this.model.beginUpdate();try{var T=
Z,aa=this.getCurrentCellStyle(Z);if(null!=L&&l(Z)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(var U=0;U<L.length;U++)if(l(L[U])||g.model.isEdge(L[U])&&null==g.model.getTerminal(L[U],!0)){Z=g.model.getParent(L[U]);break}if(null!=T&&Z!=T&&null!=this.view.getState(L[0])){var da=g.getIncomingTreeEdges(L[0]);if(0<da.length){var fa=g.view.getState(g.model.getTerminal(da[0],!0));if(null!=fa){var na=g.view.getState(T);null!=na&&(V=(na.getCenterX()-fa.getCenterX())/g.view.scale,R=(na.getCenterY()-fa.getCenterY())/
g.view.scale)}}}}F=D.apply(this,arguments);if(null!=F&&null!=L&&F.length==L.length)for(U=0;U<F.length;U++)if(this.model.isEdge(F[U]))l(T)&&0>mxUtils.indexOf(F,this.model.getTerminal(F[U],!0))&&this.model.setTerminal(F[U],T,!0);else if(l(L[U])&&(da=g.getIncomingTreeEdges(L[U]),0<da.length))if(!Y)l(T)&&0>mxUtils.indexOf(L,this.model.getTerminal(da[0],!0))&&this.model.setTerminal(da[0],T,!0);else if(0==g.getIncomingTreeEdges(F[U]).length){aa=T;if(null==aa||aa==g.model.getParent(L[U]))aa=g.model.getTerminal(da[0],
!0);Y=this.cloneCell(da[0]);this.addEdge(Y,g.getDefaultParent(),aa,F[U])}}finally{this.model.endUpdate()}return F};if(null!=f.sidebar){var N=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(L,V,R,Y){var Z=g.model,la=null;Z.beginUpdate();try{if(la=N.apply(this,arguments),l(L))for(var q=0;q<la.length;q++)if(Z.isEdge(la[q])&&null==Z.getTerminal(la[q],!0)){Z.setTerminal(la[q],L,!0);var F=g.getCellGeometry(la[q]);F.points=null;null!=F.getTerminalPoint(!0)&&F.setTerminalPoint(null,!0)}}finally{Z.endUpdate()}return la}}var G=
{88:f.actions.get("selectChildren"),84:f.actions.get("selectSubtree"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ia=f.onKeyDown;f.onKeyDown=function(L){try{if(g.isEnabled()&&!g.isEditing()&&l(g.getSelectionCell())&&1==g.getSelectionCount()){var V=null;0<g.getIncomingTreeEdges(g.getSelectionCell()).length&&(9==L.which?V=mxEvent.isShiftDown(L)?H(g.getSelectionCell()):K(g.getSelectionCell()):13==L.which&&(V=S(g.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=V&&0<V.length)1==
-V.length&&g.model.isEdge(V[0])?g.setSelectionCell(g.model.getTerminal(V[0],!1)):g.setSelectionCell(V[V.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var R=G[L.keyCode];null!=R&&(R.funct(L),mxEvent.consume(L))}else 37==L.keyCode?(e(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(e(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),
-mxEvent.consume(L)):39==L.keyCode?(e(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(e(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(Y){f.handleError(Y)}mxEvent.isConsumed(L)||ia.apply(this,arguments)};var ka=g.connectVertex;g.connectVertex=function(L,V,R,Y,Z,la,q){var F=g.getIncomingTreeEdges(L);if(l(L)){var T=M(L),aa=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,U=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
-return T==V||0==F.length?K(L,V):aa==U?H(L):S(L,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return ka.apply(this,arguments)};g.getSubtree=function(L){var V=[L];!B(L)&&!l(L)||E(L)||g.traverse(L,!0,function(R,Y){var Z=null!=Y&&g.isTreeEdge(Y);Z&&0>mxUtils.indexOf(V,Y)&&V.push(Y);(null==Y||Z)&&0>mxUtils.indexOf(V,R)&&V.push(R);return null==Y||Z});return V};var ja=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ja.apply(this,arguments);(B(this.state.cell)||l(this.state.cell))&&
+V.length&&g.model.isEdge(V[0])?g.setSelectionCell(g.model.getTerminal(V[0],!1)):g.setSelectionCell(V[V.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var R=G[L.keyCode];null!=R&&(R.funct(L),mxEvent.consume(L))}else 37==L.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),
+mxEvent.consume(L)):39==L.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(d(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(Y){f.handleError(Y)}mxEvent.isConsumed(L)||ia.apply(this,arguments)};var ka=g.connectVertex;g.connectVertex=function(L,V,R,Y,Z,la,q){var F=g.getIncomingTreeEdges(L);if(l(L)){var T=M(L),aa=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,U=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
+return T==V||0==F.length?K(L,V):aa==U?H(L):S(L,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return ka.apply(this,arguments)};g.getSubtree=function(L){var V=[L];!C(L)&&!l(L)||E(L)||g.traverse(L,!0,function(R,Y){var Z=null!=Y&&g.isTreeEdge(Y);Z&&0>mxUtils.indexOf(V,Y)&&V.push(Y);(null==Y||Z)&&0>mxUtils.indexOf(V,R)&&V.push(R);return null==Y||Z});return V};var ja=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ja.apply(this,arguments);(C(this.state.cell)||l(this.state.cell))&&
!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(L){this.graph.graphHandler.start(this.state.cell,
mxEvent.getClientX(L),mxEvent.getClientY(L),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(L);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(L)})))};var ca=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ca.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 pa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){pa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(L,V){ra.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
-typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var l=k.apply(this,arguments),B=this.graph;return l.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var l=k.apply(this,arguments),C=this.graph;return l.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
E.vertex=!0;var M=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');M.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);M.insertEdge(S,!1);p.insert(S);p.insert(E);p.insert(M);return sb.createVertexTemplateFromCells([p],p.geometry.width,
p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var M=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};');M.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);M.insertEdge(S,!1);
var H=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');H.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);var Q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');Q.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-e.geometry.relative=!0;e.edge=!0;E.insertEdge(e,!0);Q.insertEdge(e,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var g=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;E.insertEdge(g,!0);f.insertEdge(g,!1);p.insert(S);p.insert(K);p.insert(e);p.insert(g);p.insert(E);p.insert(M);p.insert(H);p.insert(Q);p.insert(f);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);var Q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');Q.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+d.geometry.relative=!0;d.edge=!0;E.insertEdge(d,!0);Q.insertEdge(d,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var g=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;E.insertEdge(g,!0);f.insertEdge(g,!1);p.insert(S);p.insert(K);p.insert(d);p.insert(g);p.insert(E);p.insert(M);p.insert(H);p.insert(Q);p.insert(f);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-p.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var M=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+p.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var M=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
M.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);M.insertEdge(S,!1);var H=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);p.insert(S);p.insert(K);p.insert(E);p.insert(M);p.insert(H);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.setAttributeForCell(p,"treeRoot",
+K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);p.insert(S);p.insert(K);p.insert(E);p.insert(M);p.insert(H);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var M=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");M.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");S.geometry.setTerminalPoint(new mxPoint(110,-40),!0);S.geometry.relative=
!0;S.edge=!0;M.insertEdge(S,!1);return sb.createVertexTemplateFromCells([E,S,p,M],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(g,v){if(EditorUi.windowed){var y=g.editor.graph;y.popupMenuHandler.hideMenu();if(null==g.formatWindow){v="1"==urlParams.sketch?Math.max(10,g.diagramContainer.clientWidth-244):Math.max(10,g.diagramContainer.clientWidth-248);var C="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;y="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,y.container.clientHeight-10);g.formatWindow=new WrapperWindow(g,mxResources.get("format"),v,C,240,y,
+EditorUi.initMinimalTheme=function(){function b(g,v){if(EditorUi.windowed){var x=g.editor.graph;x.popupMenuHandler.hideMenu();if(null==g.formatWindow){v="1"==urlParams.sketch?Math.max(10,g.diagramContainer.clientWidth-244):Math.max(10,g.diagramContainer.clientWidth-248);var B="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;x="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,x.container.clientHeight-10);g.formatWindow=new WrapperWindow(g,mxResources.get("format"),v,B,240,x,
function(I){g.createFormat(I).init()});g.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){g.formatWindow.window.fit()}));g.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else g.formatWindow.window.setVisible(null!=v?v:!g.formatWindow.window.isVisible())}else null==g.formatElt&&(g.formatElt=g.createSidebarContainer(),g.createFormat(g.formatElt).init(),g.formatElt.style.border="none",g.formatElt.style.width="240px",g.formatElt.style.borderLeft="1px solid gray",
-g.formatElt.style.right="0px"),y=g.diagramContainer.parentNode,null!=g.formatElt.parentNode?(g.formatElt.parentNode.removeChild(g.formatElt),y.style.right="0px"):(y.parentNode.appendChild(g.formatElt),y.style.right=g.formatElt.style.width)}function d(g,v){function y(N,G){var ia=g.menus.get(N);N=D.addMenu(G,mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}));N.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;";
-N.className="geTitle";v.appendChild(N);return N}var C=document.createElement("div");C.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;";C.className="geTitle";var I=document.createElement("span");I.style.fontSize="18px";I.style.marginRight="5px";I.innerHTML="+";C.appendChild(I);mxUtils.write(C,mxResources.get("moreShapes"));v.appendChild(C);mxEvent.addListener(C,"click",function(){g.actions.get("shapes").funct()});
-var D=new Menubar(g,v);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?C.style.bottom="0":null!=g.actions.get("newLibrary")?(C=document.createElement("div"),C.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",C.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("newLibrary")),C.appendChild(I),
-v.appendChild(C),mxEvent.addListener(C,"click",g.actions.get("newLibrary").funct),C=document.createElement("div"),C.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;",C.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("openLibrary")),C.appendChild(I),v.appendChild(C),mxEvent.addListener(C,
-"click",g.actions.get("openLibrary").funct)):(C=y("newLibrary",mxResources.get("newLibrary")),C.style.boxSizing="border-box",C.style.paddingRight="6px",C.style.paddingLeft="6px",C.style.height="32px",C.style.left="0",C=y("openLibraryFrom",mxResources.get("openLibraryFrom")),C.style.borderLeft="1px solid lightgray",C.style.boxSizing="border-box",C.style.paddingRight="6px",C.style.paddingLeft="6px",C.style.height="32px",C.style.left="50%");v.appendChild(g.sidebar.container);v.style.overflow="hidden"}
-function k(g,v){if(EditorUi.windowed){var y=g.editor.graph;y.popupMenuHandler.hideMenu();if(null==g.sidebarWindow){v=Math.min(y.container.clientWidth-10,218);var C="1"==urlParams.embedInline?650:Math.min(y.container.clientHeight-40,650);g.sidebarWindow=new WrapperWindow(g,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(y.container.clientHeight-C)/2):56,v-6,C-6,function(I){d(g,I)});g.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){g.sidebarWindow.window.fit()}));g.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);g.sidebarWindow.window.setVisible(!0);isLocalStorage&&g.getLocalData("sidebar",function(I){g.sidebar.showEntries(I,null,!0)});g.restoreLibraries()}else g.sidebarWindow.window.setVisible(null!=v?v:!g.sidebarWindow.window.isVisible())}else null==g.sidebarElt&&(g.sidebarElt=g.createSidebarContainer(),d(g,g.sidebarElt),g.sidebarElt.style.border="none",g.sidebarElt.style.width="210px",
-g.sidebarElt.style.borderRight="1px solid gray"),y=g.diagramContainer.parentNode,null!=g.sidebarElt.parentNode?(g.sidebarElt.parentNode.removeChild(g.sidebarElt),y.style.left="0px"):(y.parentNode.appendChild(g.sidebarElt),y.style.left=g.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var l=0;try{l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(g){}Menus.prototype.autoPopup=
+g.formatElt.style.right="0px"),x=g.diagramContainer.parentNode,null!=g.formatElt.parentNode?(g.formatElt.parentNode.removeChild(g.formatElt),x.style.right="0px"):(x.parentNode.appendChild(g.formatElt),x.style.right=g.formatElt.style.width)}function e(g,v){function x(N,G){var ia=g.menus.get(N);N=D.addMenu(G,mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}));N.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;";
+N.className="geTitle";v.appendChild(N);return N}var B=document.createElement("div");B.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;";B.className="geTitle";var I=document.createElement("span");I.style.fontSize="18px";I.style.marginRight="5px";I.innerHTML="+";B.appendChild(I);mxUtils.write(B,mxResources.get("moreShapes"));v.appendChild(B);mxEvent.addListener(B,"click",function(){g.actions.get("shapes").funct()});
+var D=new Menubar(g,v);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?B.style.bottom="0":null!=g.actions.get("newLibrary")?(B=document.createElement("div"),B.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",B.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("newLibrary")),B.appendChild(I),
+v.appendChild(B),mxEvent.addListener(B,"click",g.actions.get("newLibrary").funct),B=document.createElement("div"),B.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;",B.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("openLibrary")),B.appendChild(I),v.appendChild(B),mxEvent.addListener(B,
+"click",g.actions.get("openLibrary").funct)):(B=x("newLibrary",mxResources.get("newLibrary")),B.style.boxSizing="border-box",B.style.paddingRight="6px",B.style.paddingLeft="6px",B.style.height="32px",B.style.left="0",B=x("openLibraryFrom",mxResources.get("openLibraryFrom")),B.style.borderLeft="1px solid lightgray",B.style.boxSizing="border-box",B.style.paddingRight="6px",B.style.paddingLeft="6px",B.style.height="32px",B.style.left="50%");v.appendChild(g.sidebar.container);v.style.overflow="hidden"}
+function k(g,v){if(EditorUi.windowed){var x=g.editor.graph;x.popupMenuHandler.hideMenu();if(null==g.sidebarWindow){v=Math.min(x.container.clientWidth-10,218);var B="1"==urlParams.embedInline?650:Math.min(x.container.clientHeight-40,650);g.sidebarWindow=new WrapperWindow(g,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(x.container.clientHeight-B)/2):56,v-6,B-6,function(I){e(g,I)});g.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){g.sidebarWindow.window.fit()}));g.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);g.sidebarWindow.window.setVisible(!0);isLocalStorage&&g.getLocalData("sidebar",function(I){g.sidebar.showEntries(I,null,!0)});g.restoreLibraries()}else g.sidebarWindow.window.setVisible(null!=v?v:!g.sidebarWindow.window.isVisible())}else null==g.sidebarElt&&(g.sidebarElt=g.createSidebarContainer(),e(g,g.sidebarElt),g.sidebarElt.style.border="none",g.sidebarElt.style.width="210px",
+g.sidebarElt.style.borderRight="1px solid gray"),x=g.diagramContainer.parentNode,null!=g.sidebarElt.parentNode?(g.sidebarElt.parentNode.removeChild(g.sidebarElt),x.style.left="0px"):(x.parentNode.appendChild(g.sidebarElt),x.style.left=g.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var l=0;try{l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(g){}Menus.prototype.autoPopup=
!1;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;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
-Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var B=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");B.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(g,v){null!=v.shortcut&&900>l&&!mxClient.IS_IOS?g.firstChild.nextSibling.setAttribute("title",v.shortcut):E.apply(this,arguments)};var M=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(g,v,y){var C=this.editorUi.editor.graph;g.smartSeparators=!0;M.apply(this,arguments);"1"==urlParams.sketch?C.isEnabled()&&(g.addSeparator(),1==C.getSelectionCount()&&this.addMenuItems(g,
-["-","lockUnlock"],null,y)):1==C.getSelectionCount()?(C.isCellFoldable(C.getSelectionCell())&&this.addMenuItems(g,C.isCellCollapsed(v)?["expand"]:["collapse"],null,y),this.addMenuItems(g,["collapsible","-","lockUnlock","enterGroup"],null,y),g.addSeparator(),this.addSubmenu("layout",g)):C.isSelectionEmpty()&&C.isEnabled()?(g.addSeparator(),this.addMenuItems(g,["editData"],null,y),g.addSeparator(),this.addSubmenu("layout",g),this.addSubmenu("insert",g),this.addMenuItems(g,["-","exitGroup"],null,y)):
-C.isEnabled()&&this.addMenuItems(g,["-","lockUnlock"],null,y)};var S=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(g,v,y){S.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(g,["copyAsImage"],null,y)};EditorUi.prototype.toggleFormatPanel=function(g){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=g?g:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=
+Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var C=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");C.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
+this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(g,v){null!=v.shortcut&&900>l&&!mxClient.IS_IOS?g.firstChild.nextSibling.setAttribute("title",v.shortcut):E.apply(this,arguments)};var M=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(g,v,x){var B=this.editorUi.editor.graph;g.smartSeparators=!0;M.apply(this,arguments);"1"==urlParams.sketch?B.isEnabled()&&(g.addSeparator(),1==B.getSelectionCount()&&this.addMenuItems(g,
+["-","lockUnlock"],null,x)):1==B.getSelectionCount()?(B.isCellFoldable(B.getSelectionCell())&&this.addMenuItems(g,B.isCellCollapsed(v)?["expand"]:["collapse"],null,x),this.addMenuItems(g,["collapsible","-","lockUnlock","enterGroup"],null,x),g.addSeparator(),this.addSubmenu("layout",g)):B.isSelectionEmpty()&&B.isEnabled()?(g.addSeparator(),this.addMenuItems(g,["editData"],null,x),g.addSeparator(),this.addSubmenu("layout",g),this.addSubmenu("insert",g),this.addMenuItems(g,["-","exitGroup"],null,x)):
+B.isEnabled()&&this.addMenuItems(g,["-","lockUnlock"],null,x)};var S=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(g,v,x){S.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(g,["copyAsImage"],null,x)};EditorUi.prototype.toggleFormatPanel=function(g){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=g?g:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=
this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var H=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();H.apply(this,arguments)};var K=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(g){K.apply(this,arguments);if(g){var v=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=v&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&
this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=v||"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 Q=Menus.prototype.init;Menus.prototype.init=function(){Q.apply(this,arguments);var g=this.editorUi,v=g.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),
function(D){g.setPagesVisible(!Editor.pagesVisible)}));v.setToggleAction(!0);v.setSelectedCallback(function(){return Editor.pagesVisible});g.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(g)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!g.isOffline()&&g.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var D=new ParseDialog(g,mxResources.get("plantUml")+"...","plantUml");g.showDialog(D.container,620,420,!0,!1);D.init()}));
-g.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var D=new ParseDialog(g,mxResources.get("mermaid")+"...","mermaid");g.showDialog(D.container,620,420,!0,!1);D.init()}));var y=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(D,N){var G=this.editorUi.editor.graph,ia=G.getSelectionCell();y.call(this,D,ia,null,N);this.addMenuItems(D,["editTooltip"],N);G.model.isVertex(ia)&&this.addMenuItems(D,["editGeometry"],N);this.addMenuItems(D,["-",
-"edit"],N)})));this.addPopupMenuCellEditItems=function(D,N,G,ia){D.addSeparator();this.addSubmenu("editCell",D,ia,mxResources.get("edit"))};var C="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),I=function(D,N,G,ia){D.addItem(G,null,mxUtils.bind(this,function(){var ka=new CreateGraphDialog(g,G,ia);g.showDialog(ka.container,620,420,!0,!1);ka.init()}),N)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(D,N){for(var G=0;G<C.length;G++)"-"==
-C[G]?D.addSeparator(N):I(D,N,mxResources.get(C[G])+"...",C[G])})))};EditorUi.prototype.installFormatToolbar=function(g){var v=this.editor.graph,y=document.createElement("div");y.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%;";v.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,I){0<v.getSelectionCount()?(g.appendChild(y),y.innerHTML=
-"Selected: "+v.getSelectionCount()):null!=y.parentNode&&y.parentNode.removeChild(y)}))};var e=!1;EditorUi.prototype.initFormatWindow=function(){if(!e&&null!=this.formatWindow){e=!0;var g=this.formatWindow.window.toggleMinimized,v=240;this.formatWindow.window.toggleMinimized=function(){g.apply(this,arguments);this.minimized?(v=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+v-140+"px"):(this.div.style.width=
-v+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-v+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(y){mxEvent.getSource(y)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){function g(W,ea,ta){var qa=D.menus.get(W),va=ka.addMenu(mxResources.get(W),mxUtils.bind(this,function(){qa.funct.apply(this,
+g.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var D=new ParseDialog(g,mxResources.get("mermaid")+"...","mermaid");g.showDialog(D.container,620,420,!0,!1);D.init()}));var x=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(D,N){var G=this.editorUi.editor.graph,ia=G.getSelectionCell();x.call(this,D,ia,null,N);this.addMenuItems(D,["editTooltip"],N);G.model.isVertex(ia)&&this.addMenuItems(D,["editGeometry"],N);this.addMenuItems(D,["-",
+"edit"],N)})));this.addPopupMenuCellEditItems=function(D,N,G,ia){D.addSeparator();this.addSubmenu("editCell",D,ia,mxResources.get("edit"))};var B="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),I=function(D,N,G,ia){D.addItem(G,null,mxUtils.bind(this,function(){var ka=new CreateGraphDialog(g,G,ia);g.showDialog(ka.container,620,420,!0,!1);ka.init()}),N)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(D,N){for(var G=0;G<B.length;G++)"-"==
+B[G]?D.addSeparator(N):I(D,N,mxResources.get(B[G])+"...",B[G])})))};EditorUi.prototype.installFormatToolbar=function(g){var v=this.editor.graph,x=document.createElement("div");x.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%;";v.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(B,I){0<v.getSelectionCount()?(g.appendChild(x),x.innerHTML=
+"Selected: "+v.getSelectionCount()):null!=x.parentNode&&x.parentNode.removeChild(x)}))};var d=!1;EditorUi.prototype.initFormatWindow=function(){if(!d&&null!=this.formatWindow){d=!0;var g=this.formatWindow.window.toggleMinimized,v=240;this.formatWindow.window.toggleMinimized=function(){g.apply(this,arguments);this.minimized?(v=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+v-140+"px"):(this.div.style.width=
+v+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-v+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(x){mxEvent.getSource(x)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){function g(W,ea,ta){var qa=D.menus.get(W),va=ka.addMenu(mxResources.get(W),mxUtils.bind(this,function(){qa.funct.apply(this,
arguments)}),ia);va.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";va.style.display="inline-block";va.style.boxSizing="border-box";va.style.top="6px";va.style.marginRight="6px";va.style.height="30px";va.style.paddingTop="6px";va.style.paddingBottom="6px";va.style.cursor="pointer";va.setAttribute("title",mxResources.get(W));D.menus.menuCreated(qa,va,"geMenuItem");null!=ta?(va.style.backgroundImage="url("+ta+")",va.style.backgroundPosition="center center",va.style.backgroundRepeat="no-repeat",
va.style.backgroundSize="24px 24px",va.style.width="34px",va.innerText=""):ea||(va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",va.style.backgroundPosition="right 6px center",va.style.backgroundRepeat="no-repeat",va.style.paddingRight="22px");return va}function v(W,ea,ta,qa,va,Ea){var Ca=document.createElement("a");Ca.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ca.style.display="inline-block";Ca.style.boxSizing="border-box";Ca.style.height="30px";Ca.style.padding=
"6px";Ca.style.position="relative";Ca.style.verticalAlign="top";Ca.style.top="0px";"1"==urlParams.sketch&&(Ca.style.borderStyle="none",Ca.style.boxShadow="none",Ca.style.padding="6px",Ca.style.margin="0px");null!=D.statusContainer?G.insertBefore(Ca,D.statusContainer):G.appendChild(Ca);null!=Ea?(Ca.style.backgroundImage="url("+Ea+")",Ca.style.backgroundPosition="center center",Ca.style.backgroundRepeat="no-repeat",Ca.style.backgroundSize="24px 24px",Ca.style.width="34px"):mxUtils.write(Ca,W);mxEvent.addListener(Ca,
mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ma){Ma.preventDefault()}));mxEvent.addListener(Ca,"click",function(Ma){"disabled"!=Ca.getAttribute("disabled")&&ea(Ma);mxEvent.consume(Ma)});null==ta&&(Ca.style.marginRight="4px");null!=qa&&Ca.setAttribute("title",qa);null!=va&&(W=function(){va.isEnabled()?(Ca.removeAttribute("disabled"),Ca.style.cursor="pointer"):(Ca.setAttribute("disabled","disabled"),Ca.style.cursor="default")},va.addListener("stateChanged",W),N.addListener("enabledChanged",
-W),W());return Ca}function y(W,ea,ta){ta=document.createElement("div");ta.className="geMenuItem";ta.style.display="inline-block";ta.style.verticalAlign="top";ta.style.marginRight="6px";ta.style.padding="0 4px 0 4px";ta.style.height="30px";ta.style.position="relative";ta.style.top="0px";"1"==urlParams.sketch&&(ta.style.boxShadow="none");for(var qa=0;qa<W.length;qa++)null!=W[qa]&&("1"==urlParams.sketch&&(W[qa].style.padding="10px 8px",W[qa].style.width="30px"),W[qa].style.margin="0px",W[qa].style.boxShadow=
-"none",ta.appendChild(W[qa]));null!=ea&&mxUtils.setOpacity(ta,ea);null!=D.statusContainer&&"1"!=urlParams.sketch?G.insertBefore(ta,D.statusContainer):G.appendChild(ta);return ta}function C(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Y.style.left=58>R.offsetTop-R.offsetHeight/2?"70px":"10px");else{for(var W=G.firstChild;null!=W;){var ea=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=ea}ia=G.firstChild;l=window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth;W=1E3>l||"1"==urlParams.sketch;var ta=null;W||(ta=g("diagram"));ea=W?g("diagram",null,Editor.menuImage):null;null!=ea&&(ta=ea);y([ta,v(mxResources.get("shapes"),D.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),D.actions.get("image"),W?Editor.shapesImage:null),v(mxResources.get("format"),D.actions.get("format").funct,null,mxResources.get("format")+" ("+D.actions.get("format").shortcut+")",D.actions.get("image"),W?Editor.formatImage:null)],W?60:null);ea=g("insert",
-!0,W?L:null);y([ea,v(mxResources.get("delete"),D.actions.get("delete").funct,null,mxResources.get("delete"),D.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);411<=l&&(y([oa,Aa],60),520<=l&&y([ab,640<=l?v("",na.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",na,Editor.zoomInImage):null,640<=l?v("",sa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",sa,Editor.zoomOutImage):null],60))}null!=ta&&(mxEvent.disableContextMenu(ta),mxEvent.addGestureListeners(ta,mxUtils.bind(this,
-function(qa){(mxEvent.isShiftDown(qa)||mxEvent.isAltDown(qa)||mxEvent.isMetaDown(qa)||mxEvent.isControlDown(qa)||mxEvent.isPopupTrigger(qa))&&D.appIconClicked(qa)}),null,null));ea=D.menus.get("language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=l&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==x&&(ea=ka.addMenu("",ea.funct),ea.setAttribute("title","language"),ea.className="geToolbarButton",ea.style.backgroundImage="url("+Editor.globeImage+")",ea.style.backgroundPosition=
-"center center",ea.style.backgroundRepeat="no-repeat",ea.style.backgroundSize="22px 22px",ea.style.position="absolute",ea.style.height="24px",ea.style.width="24px",ea.style.zIndex="1",ea.style.right="8px",ea.style.cursor="pointer",ea.style.top="12px",G.appendChild(ea),x=ea),D.buttonContainer.style.paddingRight="34px"):(D.buttonContainer.style.paddingRight="0px",null!=x&&(x.parentNode.removeChild(x),x=null))}f.apply(this,arguments);var I=document.createElement("div");I.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+W),W());return Ca}function x(W,ea,ta){ta=document.createElement("div");ta.className="geMenuItem";ta.style.display="inline-block";ta.style.verticalAlign="top";ta.style.marginRight="6px";ta.style.padding="0 4px 0 4px";ta.style.height="30px";ta.style.position="relative";ta.style.top="0px";"1"==urlParams.sketch&&(ta.style.boxShadow="none");for(var qa=0;qa<W.length;qa++)null!=W[qa]&&("1"==urlParams.sketch&&(W[qa].style.padding="10px 8px",W[qa].style.width="30px"),W[qa].style.margin="0px",W[qa].style.boxShadow=
+"none",ta.appendChild(W[qa]));null!=ea&&mxUtils.setOpacity(ta,ea);null!=D.statusContainer&&"1"!=urlParams.sketch?G.insertBefore(ta,D.statusContainer):G.appendChild(ta);return ta}function B(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Y.style.left=58>R.offsetTop-R.offsetHeight/2?"70px":"10px");else{for(var W=G.firstChild;null!=W;){var ea=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=ea}ia=G.firstChild;l=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;W=1E3>l||"1"==urlParams.sketch;var ta=null;W||(ta=g("diagram"));ea=W?g("diagram",null,Editor.menuImage):null;null!=ea&&(ta=ea);x([ta,v(mxResources.get("shapes"),D.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),D.actions.get("image"),W?Editor.shapesImage:null),v(mxResources.get("format"),D.actions.get("format").funct,null,mxResources.get("format")+" ("+D.actions.get("format").shortcut+")",D.actions.get("image"),W?Editor.formatImage:null)],W?60:null);ea=g("insert",
+!0,W?L:null);x([ea,v(mxResources.get("delete"),D.actions.get("delete").funct,null,mxResources.get("delete"),D.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);411<=l&&(x([oa,Aa],60),520<=l&&x([ab,640<=l?v("",na.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",na,Editor.zoomInImage):null,640<=l?v("",sa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",sa,Editor.zoomOutImage):null],60))}null!=ta&&(mxEvent.disableContextMenu(ta),mxEvent.addGestureListeners(ta,mxUtils.bind(this,
+function(qa){(mxEvent.isShiftDown(qa)||mxEvent.isAltDown(qa)||mxEvent.isMetaDown(qa)||mxEvent.isControlDown(qa)||mxEvent.isPopupTrigger(qa))&&D.appIconClicked(qa)}),null,null));ea=D.menus.get("language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=l&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==y&&(ea=ka.addMenu("",ea.funct),ea.setAttribute("title","language"),ea.className="geToolbarButton",ea.style.backgroundImage="url("+Editor.globeImage+")",ea.style.backgroundPosition=
+"center center",ea.style.backgroundRepeat="no-repeat",ea.style.backgroundSize="22px 22px",ea.style.position="absolute",ea.style.height="24px",ea.style.width="24px",ea.style.zIndex="1",ea.style.right="8px",ea.style.cursor="pointer",ea.style.top="12px",G.appendChild(ea),y=ea),D.buttonContainer.style.paddingRight="34px"):(D.buttonContainer.style.paddingRight="0px",null!=y&&(y.parentNode.removeChild(y),y=null))}f.apply(this,arguments);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<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,
!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var D=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==D.embedViewport)mxUtils.fit(this.div);else{var W=parseInt(this.div.offsetLeft),ea=parseInt(this.div.offsetWidth),ta=D.embedViewport.x+D.embedViewport.width,qa=parseInt(this.div.offsetTop),va=parseInt(this.div.offsetHeight),Ea=D.embedViewport.y+
D.embedViewport.height;this.div.style.left=Math.max(D.embedViewport.x,Math.min(W,ta-ea))+"px";this.div.style.top=Math.max(D.embedViewport.y,Math.min(qa,Ea-va))+"px";this.div.style.height=Math.min(D.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(D.embedViewport.width,parseInt(this.div.style.width))+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),I=window.innerHeight||
@@ -4075,87 +4082,87 @@ mxClient.IS_POINTER&&(R.style.touchAction="none");pa.appendChild(R);window.setTi
ra.funct);wa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");wa.style.whiteSpace="nowrap";wa.style.paddingRight="10px";wa.style.textDecoration="none";wa.style.textDecoration="none";wa.style.overflow="hidden";wa.style.visibility="hidden";wa.style.textAlign="center";wa.style.cursor="pointer";wa.style.height=parseInt(D.tabContainerHeight)-1+"px";wa.style.lineHeight=parseInt(D.tabContainerHeight)+1+"px";wa.style.position="absolute";wa.style.display="block";wa.style.fontSize="12px";wa.style.width=
"59px";wa.style.right="0px";wa.style.bottom="0px";wa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";wa.style.backgroundPosition="right 6px center";wa.style.backgroundRepeat="no-repeat";pa.appendChild(wa)}(function(W){mxEvent.addListener(W,"click",fa);var ea=mxUtils.bind(this,function(){W.innerText="";mxUtils.write(W,Math.round(100*D.editor.graph.view.scale)+"%")});D.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);D.editor.addListener("resetGraphView",ea);D.editor.addListener("pageSelected",
ea)})(wa);var Ya=D.setGraphEnabled;D.setGraphEnabled=function(){Ya.apply(this,arguments);null!=this.tabContainer&&(wa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==V?this.tabContainerHeight+"px":"0px")}}pa.appendChild(G);pa.appendChild(D.diagramContainer);I.appendChild(pa);D.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&b(this,!0);null==V&&pa.appendChild(D.tabContainer);
-var x=null;C();mxEvent.addListener(window,"resize",function(){C();null!=D.sidebarWindow&&D.sidebarWindow.window.fit();null!=D.formatWindow&&D.formatWindow.window.fit();null!=D.actions.outlineWindow&&D.actions.outlineWindow.window.fit();null!=D.actions.layersWindow&&D.actions.layersWindow.window.fit();null!=D.menus.tagsWindow&&D.menus.tagsWindow.window.fit();null!=D.menus.findWindow&&D.menus.findWindow.window.fit();null!=D.menus.findReplaceWindow&&D.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor=
+var y=null;B();mxEvent.addListener(window,"resize",function(){B();null!=D.sidebarWindow&&D.sidebarWindow.window.fit();null!=D.formatWindow&&D.formatWindow.window.fit();null!=D.actions.outlineWindow&&D.actions.outlineWindow.window.fit();null!=D.actions.layersWindow&&D.actions.layersWindow.window.fit();null!=D.menus.tagsWindow&&D.menus.tagsWindow.window.fit();null!=D.menus.findWindow&&D.menus.findWindow.window.fit();null!=D.menus.findReplaceWindow&&D.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor=
"text";R.style.transform="";mxEvent.addGestureListeners(D.diagramContainer.parentNode,function(W){mxEvent.getSource(W)==D.diagramContainer.parentNode&&(D.embedExitPoint=new mxPoint(mxEvent.getClientX(W),mxEvent.getClientY(W)),D.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";D.diagramContainer.parentNode.appendChild(I);
D.bottomResizer=I;var O=null,P=null,X=null,ba=null;mxEvent.addGestureListeners(I,function(W){ba=parseInt(D.diagramContainer.style.height);P=mxEvent.getClientY(W);N.popupMenuHandler.hideMenu();mxEvent.consume(W)});I=I.cloneNode(!1);I.style.cursor="col-resize";D.diagramContainer.parentNode.appendChild(I);D.rightResizer=I;mxEvent.addGestureListeners(I,function(W){X=parseInt(D.diagramContainer.style.width);O=mxEvent.getClientX(W);N.popupMenuHandler.hideMenu();mxEvent.consume(W)});mxEvent.addGestureListeners(document.body,
null,function(W){var ea=!1;null!=O&&(D.diagramContainer.style.width=Math.max(20,X+mxEvent.getClientX(W)-O)+"px",ea=!0);null!=P&&(D.diagramContainer.style.height=Math.max(20,ba+mxEvent.getClientY(W)-P)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:D.diagramContainer.getBoundingClientRect()}),"*"),Z(),D.refresh())},function(W){null==O&&null==P||mxEvent.consume(W);P=O=null});this.diagramContainer.style.borderRadius=
-"4px";document.body.style.backgroundColor="transparent";D.bottomResizer.style.visibility="hidden";D.rightResizer.style.visibility="hidden";Y.style.visibility="hidden";V.style.visibility="hidden";R.style.display="none"}"1"==urlParams.prefetchFonts&&D.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,d,k,l,B,p,E){this.file=b;this.id=d;this.content=k;this.modifiedDate=l;this.createdDate=B;this.isResolved=p;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,d,k,l,B){d()};DrawioComment.prototype.editComment=function(b,d,k){d()};DrawioComment.prototype.deleteComment=function(b,d){b()};DrawioUser=function(b,d,k,l,B){this.id=b;this.email=d;this.displayName=k;this.pictureUrl=l;this.locale=B};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,d,k){this.init(b,d,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
+"4px";document.body.style.backgroundColor="transparent";D.bottomResizer.style.visibility="hidden";D.rightResizer.style.visibility="hidden";Y.style.visibility="hidden";V.style.visibility="hidden";R.style.display="none"}"1"==urlParams.prefetchFonts&&D.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,l,C,p,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=l;this.createdDate=C;this.isResolved=p;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,l,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,l,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=l;this.locale=C};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
-GraphViewer.prototype.init=function(b,d,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
+GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?
-this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=d&&(this.xmlDocument=d.ownerDocument,this.xmlNode=d,this.xml=mxUtils.getXml(d),null!=b)){var l=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
-!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var v=this.view.graphBounds,y=this.view.translate;E.setAttribute("viewBox",v.x+y.x-this.panDx+" "+(v.y+y.y-this.panDy)+
+this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var l=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
+!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var v=this.view.graphBounds,x=this.view.translate;E.setAttribute("viewBox",v.x+x.x-this.panDx+" "+(v.y+x.y-this.panDy)+
" "+(v.width+1)+" "+(v.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",v))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(v){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
-this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=d&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var M=this;this.graph.getImageFromBundles=function(v){return M.getImageUrl(v)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var S=this.xmlNode.getElementsByTagName("diagram");if(0<
-S.length){if(null!=this.pageId)for(var H=0;H<S.length;H++)if(this.pageId==S[H].getAttribute("id")){this.currentPage=H;break}var K=this.graph.getGlobalVariable;M=this;this.graph.getGlobalVariable=function(v){var y=S[M.currentPage];return"page"==v?y.getAttribute("name")||"Page-"+(M.currentPage+1):"pagenumber"==v?M.currentPage+1:"pagecount"==v?S.length:K.apply(this,arguments)}}}this.diagrams=[];var Q=null;this.selectPage=function(v){this.handlingResize||(this.currentPage=mxUtils.mod(v,this.diagrams.length),
-this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(v){v=this.getIndexById(v);var y=0<=v;y&&this.selectPage(v);return y};H=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=Q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),Q=this.xmlNode)});var e=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(v){if(null!=v&&Graph.isPageLink(v.src)){var y=v.src,
-C=y.indexOf(",");0<C&&(C=M.getIndexById(y.substring(C+1)),0<=C&&(v=M.getImageForGraphModel(Editor.parseDiagramNode(M.diagrams[C])),v.originalSrc=y))}e.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(v){var y=f.apply(this,arguments);v=this.backgroundImage;if(null!=v){var C=this.view.translate,I=this.view.scale;y=mxRectangle.fromRectangle(y);y.add(new mxRectangle((C.x+v.x)*I,(C.y+v.y)*I,v.width*I,v.height*I))}return y};this.addListener("xmlNodeChanged",H);H();
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var M=this;this.graph.getImageFromBundles=function(v){return M.getImageUrl(v)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var S=this.xmlNode.getElementsByTagName("diagram");if(0<
+S.length){if(null!=this.pageId)for(var H=0;H<S.length;H++)if(this.pageId==S[H].getAttribute("id")){this.currentPage=H;break}var K=this.graph.getGlobalVariable;M=this;this.graph.getGlobalVariable=function(v){var x=S[M.currentPage];return"page"==v?x.getAttribute("name")||"Page-"+(M.currentPage+1):"pagenumber"==v?M.currentPage+1:"pagecount"==v?S.length:K.apply(this,arguments)}}}this.diagrams=[];var Q=null;this.selectPage=function(v){this.handlingResize||(this.currentPage=mxUtils.mod(v,this.diagrams.length),
+this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(v){v=this.getIndexById(v);var x=0<=v;x&&this.selectPage(v);return x};H=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=Q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),Q=this.xmlNode)});var d=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(v){if(null!=v&&Graph.isPageLink(v.src)){var x=v.src,
+B=x.indexOf(",");0<B&&(B=M.getIndexById(x.substring(B+1)),0<=B&&(v=M.getImageForGraphModel(Editor.parseDiagramNode(M.diagrams[B])),v.originalSrc=x))}d.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(v){var x=f.apply(this,arguments);v=this.backgroundImage;if(null!=v){var B=this.view.translate,I=this.view.scale;x=mxRectangle.fromRectangle(x);x.add(new mxRectangle((B.x+v.x)*I,(B.y+v.y)*I,v.width*I,v.height*I))}return x};this.addListener("xmlNodeChanged",H);H();
urlParams.page=M.currentPage;H=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,H=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(v){return!mxEvent.isPopupTrigger(v.getEvent())&&"auto"==this.graph.container.style.overflow},
this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);
-this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=H&&this.setLayersVisible(H);this.graph.customLinkClicked=function(v){if(Graph.isPageLink(v)){var y=v.indexOf(",");M.selectPageById(v.substring(y+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(v);return!0};var g=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
-!0;return g.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var B=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),l())}));p.observe(B,{attributes:!0})}else l()}};
+this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=H&&this.setLayersVisible(H);this.graph.customLinkClicked=function(v){if(Graph.isPageLink(v)){var x=v.indexOf(",");M.selectPageById(v.substring(x+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(v);return!0};var g=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
+!0;return g.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),l())}));p.observe(C,{attributes:!0})}else l()}};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
-GraphViewer.prototype.getImageForGraphModel=function(b){var d=Graph.createOffscreenGraph(this.graph.getStylesheet());d.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(d.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;d.model.setRoot(b);b=d.getSvg();var k=d.getGraphBounds();document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
-GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var d=0;d<this.diagrams.length;d++)if(this.diagrams[d].getAttribute("id")==b)return d;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
+GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
+GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var d=!0;if(!this.autoOrigin){var k=[],l=this.graph.getModel();l.beginUpdate();try{for(var B=0;B<l.getChildCount(l.root);B++){var p=l.getChildAt(l.root,B);d=d&&l.isVisible(p);k.push(l.isVisible(p));l.setVisible(p,null!=b?b[B]:!0)}}finally{l.endUpdate()}}return d?null:k};
-GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var d=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),d=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
-{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d&&this.setLayersVisible(d)}};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,d=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var l=mxUtils.bind(this,function(){if(!k){k=!0;var M=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?M.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){M=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
+GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],l=this.graph.getModel();l.beginUpdate();try{for(var C=0;C<l.getChildCount(l.root);C++){var p=l.getChildAt(l.root,C);e=e&&l.isVisible(p);k.push(l.isVisible(p));l.setVisible(p,null!=b?b[C]:!0)}}finally{l.endUpdate()}}return e?null:k};
+GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
+{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var l=mxUtils.bind(this,function(){if(!k){k=!0;var M=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?M.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){M=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};M={left:M.left-S.left,top:M.top-S.top,bottom:M.bottom-S.top,right:M.right-S.left};this.toolbar.style.left=M.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=M.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=M.top+1+"px"):this.toolbar.style.top=M.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),B=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(M){var S=b.offsetWidth;S==B||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=M?M:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},B=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
-!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",l),this.graph.addListener("size",l)):new ResizeSensor(this.graph.container,l));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,d.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,d.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=B=null;l=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",l):new ResizeSensor(this.graph.container,l))}else 9>=document.documentMode||this.graph.addListener("size",
-l);var E=mxUtils.bind(this,function(M){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var H=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==M&&this.allowZoomOut&&(this.allowZoomIn||d.width+2*this.graph.border>b.offsetWidth||d.height+2*this.graph.border>H)?(M=null,null!=H&&d.height+2*this.graph.border>H-2&&(M=(H-2*this.graph.border-2)/d.height),this.fitGraph(M)):this.widthIsEmpty||
-null!=M||0!=this.graphConfig.resize||""==b.style.height?(M=null!=M?M:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-d.x/this.graph.view.scale)+M.x,Math.floor(this.graph.border-d.y/this.graph.view.scale)+M.y),B=b.offsetWidth):this.graph.center((!this.widthIsEmpty||d.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(M){d=this.graph.getGraphBounds();B=null;E(M)}};
-GraphViewer.prototype.crop=function(){var b=this.graph,d=b.getGraphBounds(),k=b.border,l=b.view.scale;b.view.setTranslate(null!=d.x?Math.floor(b.view.translate.x-d.x/l+k):k,null!=d.y?Math.floor(b.view.translate.y-d.y/l+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,d){b.style.width=d+"px"};GraphViewer.prototype.updateContainerHeight=function(b,d){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=d+"px"};
-GraphViewer.prototype.showLayers=function(b,d){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var l=this.graphConfig.layerIds,B=null!=l&&0<l.length,p=!1;if(0<k.length||B||null!=d){d=null!=d?d.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==d){d=!1;p={};if(B)for(var M=0;M<l.length;M++){var S=b.getCell(l[M]);null!=S&&(d=!0,p[S.id]=!0)}else for(M=0;M<k.length;M++)S=b.getChildAt(b.root,parseInt(k[M])),null!=S&&(d=!0,p[S.id]=!0);for(M=0;d&&
-M<E;M++)S=b.getChildAt(b.root,M),b.setVisible(S,p[S.id]||!1)}else for(M=0;M<E;M++)b.setVisible(b.getChildAt(b.root,M),d.isVisible(d.getChildAt(d.root,M)))}finally{b.endUpdate()}p=!0}return p};
-GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var d=b.ownerDocument.createElement("div");d.style.position="absolute";d.style.overflow="hidden";d.style.boxSizing="border-box";d.style.whiteSpace="nowrap";d.style.textAlign="left";d.style.zIndex=this.toolbarZIndex;d.style.backgroundColor="#eee";
-d.style.height=this.toolbarHeight+"px";this.toolbar=d;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(d.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(d,30);var k=null,l=null,B=mxUtils.bind(this,function(ja){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);k=null;l=window.setTimeout(mxUtils.bind(this,function(){d.style.display="none";
-l=null}),100)}),ja||200)}),p=mxUtils.bind(this,function(ja){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);d.style.display="";mxUtils.setOpacity(d,ja||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||(p(30),B())}));mxEvent.addListener(d,mxClient.IS_POINTER?"pointermove":"mousemove",function(ja){mxEvent.consume(ja)});mxEvent.addListener(d,"mouseenter",
-mxUtils.bind(this,function(ja){p(100)}));mxEvent.addListener(d,"mousemove",mxUtils.bind(this,function(ja){p(100);mxEvent.consume(ja)}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||p(30)}));var E=this.graph,M=E.getTolerance();E.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ja,ca){this.startX=ca.getGraphX();this.startY=ca.getGraphY();this.scrollLeft=E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(ja,
-ca){},mouseUp:function(ja,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<M&&Math.abs(this.scrollTop-E.container.scrollTop)<M&&Math.abs(this.startX-ca.getGraphX())<M&&Math.abs(this.startY-ca.getGraphY())<M&&(0<parseFloat(d.style.opacity||0)?B():p(30))}})}for(var S=this.toolbarItems,H=0,K=mxUtils.bind(this,function(ja,ca,pa,ra){ja=this.createToolbarButton(ja,ca,pa,ra);d.appendChild(ja);H++;return ja}),Q=null,e=null,f=null,g=null,v=0;v<S.length;v++){var y=S[v];
-if("pages"==y){g=b.ownerDocument.createElement("div");g.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(g,70);var C=K(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");C.style.borderRightStyle="none";C.style.paddingLeft="0px";C.style.paddingRight="0px";d.appendChild(g);var I=K(mxUtils.bind(this,
-function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");I.style.paddingLeft="0px";I.style.paddingRight="0px";y=mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";C.style.display=g.style.display;I.style.display=g.style.display});this.addListener("graphChanged",y);y()}else if("zoom"==y)this.zoomEnabled&&(K(mxUtils.bind(this,function(){this.graph.zoomOut()}),
-Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),K(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),K(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==y){if(this.layersEnabled){var D=this.graph.getModel(),N=K(mxUtils.bind(this,function(ja){if(null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(M){var S=b.offsetWidth;S==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=M?M:this.graphConfig.zoom||
+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",l),this.graph.addListener("size",l)):new ResizeSensor(this.graph.container,l));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=C=null;l=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",l):new ResizeSensor(this.graph.container,l))}else 9>=document.documentMode||this.graph.addListener("size",
+l);var E=mxUtils.bind(this,function(M){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var H=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==M&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>H)?(M=null,null!=H&&e.height+2*this.graph.border>H-2&&(M=(H-2*this.graph.border-2)/e.height),this.fitGraph(M)):this.widthIsEmpty||
+null!=M||0!=this.graphConfig.resize||""==b.style.height?(M=null!=M?M:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+M.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+M.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(M){e=this.graph.getGraphBounds();C=null;E(M)}};
+GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,l=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/l+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/l+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
+GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var l=this.graphConfig.layerIds,C=null!=l&&0<l.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var M=0;M<l.length;M++){var S=b.getCell(l[M]);null!=S&&(e=!0,p[S.id]=!0)}else for(M=0;M<k.length;M++)S=b.getChildAt(b.root,parseInt(k[M])),null!=S&&(e=!0,p[S.id]=!0);for(M=0;e&&
+M<E;M++)S=b.getChildAt(b.root,M),b.setVisible(S,p[S.id]||!1)}else for(M=0;M<E;M++)b.setVisible(b.getChildAt(b.root,M),e.isVisible(e.getChildAt(e.root,M)))}finally{b.endUpdate()}p=!0}return p};
+GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";
+e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,l=null,C=mxUtils.bind(this,function(ja){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;l=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
+l=null}),100)}),ja||200)}),p=mxUtils.bind(this,function(ja){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ja||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ja){mxEvent.consume(ja)});mxEvent.addListener(e,"mouseenter",
+mxUtils.bind(this,function(ja){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ja){p(100);mxEvent.consume(ja)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||p(30)}));var E=this.graph,M=E.getTolerance();E.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ja,ca){this.startX=ca.getGraphX();this.startY=ca.getGraphY();this.scrollLeft=E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(ja,
+ca){},mouseUp:function(ja,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<M&&Math.abs(this.scrollTop-E.container.scrollTop)<M&&Math.abs(this.startX-ca.getGraphX())<M&&Math.abs(this.startY-ca.getGraphY())<M&&(0<parseFloat(e.style.opacity||0)?C():p(30))}})}for(var S=this.toolbarItems,H=0,K=mxUtils.bind(this,function(ja,ca,pa,ra){ja=this.createToolbarButton(ja,ca,pa,ra);e.appendChild(ja);H++;return ja}),Q=null,d=null,f=null,g=null,v=0;v<S.length;v++){var x=S[v];
+if("pages"==x){g=b.ownerDocument.createElement("div");g.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(g,70);var B=K(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");B.style.borderRightStyle="none";B.style.paddingLeft="0px";B.style.paddingRight="0px";e.appendChild(g);var I=K(mxUtils.bind(this,
+function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");I.style.paddingLeft="0px";I.style.paddingRight="0px";x=mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";B.style.display=g.style.display;I.style.display=g.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(K(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),K(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),K(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==x){if(this.layersEnabled){var D=this.graph.getModel(),N=K(mxUtils.bind(this,function(ja){if(null!=
Q)Q.parentNode.removeChild(Q),Q=null;else{Q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var pa=this.graph.getGraphBounds(),ra=this.graph.view;0>pa.x||0>pa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ra.translate.clone(),scale:ra.scale}):null!=this.graph.originalViewState&&0<pa.x/ra.scale+this.graph.originalViewState.translate.x-ra.translate.x&&0<pa.y/ra.scale+this.graph.originalViewState.translate.y-
ra.translate.y&&(ra.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ra.translate.clone(),scale:ra.scale})}}));mxEvent.addListener(Q,"mouseleave",function(){Q.parentNode.removeChild(Q);Q=null});ja=N.getBoundingClientRect();Q.style.width="140px";Q.style.padding="2px 0px 2px 0px";Q.style.border="1px solid #d0d0d0";Q.style.backgroundColor="#eee";Q.style.fontFamily=Editor.defaultHtmlFont;
Q.style.fontSize="11px";Q.style.overflowY="auto";Q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";Q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(Q,80);var ca=mxUtils.getDocumentScrollOrigin(document);Q.style.left=ca.x+ja.left-1+"px";Q.style.top=ca.y+ja.bottom-2+"px";document.body.appendChild(Q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){N.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});N.style.display=
-1<D.getChildCount(D.root)?"inline-block":"none"}}else if("tags"==y){if(this.tagsEnabled){var G=K(mxUtils.bind(this,function(ja){null==e&&(e=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),e.div.getElementsByTagName("div")[0].style.position="",e.div.style.maxHeight="160px",e.div.style.maxWidth="120px",e.div.style.padding="2px",e.div.style.overflow="auto",e.div.style.height="auto",e.div.style.position="fixed",e.div.style.fontFamily=Editor.defaultHtmlFont,e.div.style.fontSize="11px",
-e.div.style.backgroundColor="#eee",e.div.style.color="#000",e.div.style.border="1px solid #d0d0d0",e.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(e.div,80));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=e.div;mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});ja=G.getBoundingClientRect();var ca=mxUtils.getDocumentScrollOrigin(document);f.style.left=ca.x+ja.left-1+"px";f.style.top=ca.y+ja.bottom-2+"px";document.body.appendChild(f);e.refresh()}}),Editor.tagsImage,
-mxResources.get("tags")||"Tags");D.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==y?this.lightboxEnabled&&K(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(y=this.graphConfig["toolbar-buttons"][y],null!=y&&(y.elem=K(null==
-y.enabled||y.enabled?y.handler:function(){},y.image,y.title,y.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*H);null!=this.graphConfig.title&&(S=b.ownerDocument.createElement("div"),S.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",S.setAttribute("title",this.graphConfig.title),mxUtils.write(S,this.graphConfig.title),mxUtils.setOpacity(S,70),
-d.appendChild(S),this.filename=S);this.minToolbarWidth=34*H;var ia=b.style.border,ka=mxUtils.bind(this,function(){d.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";d.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ja=b.getBoundingClientRect(),ca=mxUtils.getScrollOrigin(document.body);ca="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ca.x,top:-ca.y};ja={left:ja.left-
-ca.left,top:ja.top-ca.top,bottom:ja.bottom-ca.top,right:ja.right-ca.left};d.style.left=ja.left+"px";"bottom"==this.graphConfig["toolbar-position"]?d.style.top=ja.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(d.style.marginTop=-this.toolbarHeight+"px",d.style.top=ja.top+1+"px"):d.style.top=ja.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(d);var pa=mxUtils.bind(this,function(){null!=d.parentNode&&d.parentNode.removeChild(d);null!=
-Q&&(Q.parentNode.removeChild(Q),Q=null);b.style.border=ia});mxEvent.addListener(document,"mousemove",function(ra){for(ra=mxEvent.getSource(ra);null!=ra;){if(ra==b||ra==d||ra==Q)return;ra=ra.parentNode}pa()});mxEvent.addListener(document.body,"mouseleave",function(ra){pa()})}else d.style.top=-this.toolbarHeight+"px",b.appendChild(d)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ka):ka();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-d.parentNode&&ka()})).observe(b)};
-GraphViewer.prototype.createToolbarButton=function(b,d,k,l){var B=document.createElement("div");B.style.borderRight="1px solid #d0d0d0";B.style.padding="3px 6px 3px 6px";mxEvent.addListener(B,"click",b);null!=k&&B.setAttribute("title",k);B.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="18px";null==l||l?(mxEvent.addListener(B,"mouseenter",function(){B.style.backgroundColor="#ddd"}),mxEvent.addListener(B,"mouseleave",
-function(){B.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),B.style.cursor="pointer"):mxUtils.setOpacity(B,30);B.appendChild(b);return B};GraphViewer.prototype.disableButton=function(b){var d=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=d&&(mxUtils.setOpacity(d.elem,30),mxEvent.removeListener(d.elem,"click",d.handler),mxEvent.addListener(d.elem,"mouseenter",function(){d.elem.style.backgroundColor="#eee"}))};
-GraphViewer.prototype.addClickHandler=function(b,d){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,l){if(null==l)for(var B=mxEvent.getSource(k);B!=b.container&&null!=B&&null==l;)"a"==B.nodeName.toLowerCase()&&(l=B.getAttribute("href")),B=B.parentNode;null!=d?null==l||b.isCustomLink(l)?mxEvent.consume(k):b.isExternalProtocol(l)||b.isBlankLink(l)||window.setTimeout(function(){d.destroy()},0):null!=l&&null==d&&b.isCustomLink(l)&&
-(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(l)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=d||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
-GraphViewer.prototype.showLightbox=function(b,d,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=d?d:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
+1<D.getChildCount(D.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var G=K(mxUtils.bind(this,function(ja){null==d&&(d=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),d.div.getElementsByTagName("div")[0].style.position="",d.div.style.maxHeight="160px",d.div.style.maxWidth="120px",d.div.style.padding="2px",d.div.style.overflow="auto",d.div.style.height="auto",d.div.style.position="fixed",d.div.style.fontFamily=Editor.defaultHtmlFont,d.div.style.fontSize="11px",
+d.div.style.backgroundColor="#eee",d.div.style.color="#000",d.div.style.border="1px solid #d0d0d0",d.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(d.div,80));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=d.div;mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});ja=G.getBoundingClientRect();var ca=mxUtils.getDocumentScrollOrigin(document);f.style.left=ca.x+ja.left-1+"px";f.style.top=ca.y+ja.bottom-2+"px";document.body.appendChild(f);d.refresh()}}),Editor.tagsImage,
+mxResources.get("tags")||"Tags");D.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==x?this.lightboxEnabled&&K(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=x&&(x.elem=K(null==
+x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*H);null!=this.graphConfig.title&&(S=b.ownerDocument.createElement("div"),S.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",S.setAttribute("title",this.graphConfig.title),mxUtils.write(S,this.graphConfig.title),mxUtils.setOpacity(S,70),
+e.appendChild(S),this.filename=S);this.minToolbarWidth=34*H;var ia=b.style.border,ka=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ja=b.getBoundingClientRect(),ca=mxUtils.getScrollOrigin(document.body);ca="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ca.x,top:-ca.y};ja={left:ja.left-
+ca.left,top:ja.top-ca.top,bottom:ja.bottom-ca.top,right:ja.right-ca.left};e.style.left=ja.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ja.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ja.top+1+"px"):e.style.top=ja.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var pa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
+Q&&(Q.parentNode.removeChild(Q),Q=null);b.style.border=ia});mxEvent.addListener(document,"mousemove",function(ra){for(ra=mxEvent.getSource(ra);null!=ra;){if(ra==b||ra==e||ra==Q)return;ra=ra.parentNode}pa()});mxEvent.addListener(document.body,"mouseleave",function(ra){pa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ka):ka();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+e.parentNode&&ka()})).observe(b)};
+GraphViewer.prototype.createToolbarButton=function(b,e,k,l){var C=document.createElement("div");C.style.borderRight="1px solid #d0d0d0";C.style.padding="3px 6px 3px 6px";mxEvent.addListener(C,"click",b);null!=k&&C.setAttribute("title",k);C.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==l||l?(mxEvent.addListener(C,"mouseenter",function(){C.style.backgroundColor="#ddd"}),mxEvent.addListener(C,"mouseleave",
+function(){C.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),C.style.cursor="pointer"):mxUtils.setOpacity(C,30);C.appendChild(b);return C};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
+GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,l){if(null==l)for(var C=mxEvent.getSource(k);C!=b.container&&null!=C&&null==l;)"a"==C.nodeName.toLowerCase()&&(l=C.getAttribute("href")),C=C.parentNode;null!=e?null==l||b.isCustomLink(l)?mxEvent.consume(k):b.isExternalProtocol(l)||b.isBlankLink(l)||window.setTimeout(function(){e.destroy()},0):null!=l&&null==e&&b.isCustomLink(l)&&
+(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(l)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=e||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.showLightbox=function(b,e,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(k.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(l){"ready"==l.data&&l.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):k.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(k.dev=
"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(k)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
-GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("src",Editor.closeBlackImage);d.style.cssText="position:fixed;top:32px;right:32px;";d.style.cursor="pointer";
-mxEvent.addListener(d,"click",function(){l.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
+GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
+mxEvent.addListener(e,"click",function(){l.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var l=new EditorUi(new Editor(!0),document.createElement("div"),!0);l.editor.editBlankUrl=this.editBlankUrl;l.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-l.refresh=function(){};var B=mxUtils.bind(this,function(Q){27==Q.keyCode&&l.destroy()}),p=this.initialOverflow,E=l.destroy;l.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",B);document.body.removeChild(b);document.body.removeChild(d);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var M=l.editor.graph,S=M.container;S.style.overflow="hidden";this.lightboxChrome?(S.style.border="1px solid #c0c0c0",S.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",B)):(b.style.display="none",d.style.display="none");var H=this;M.getImageFromBundles=function(Q){return H.getImageUrl(Q)};var K=l.createTemporaryGraph;l.createTemporaryGraph=function(){var Q=K.apply(this,arguments);Q.getImageFromBundles=function(e){return H.getImageUrl(e)};return Q};this.graphConfig.move&&(M.isMoveCellsEvent=function(Q){return!0});mxUtils.setPrefixedStyle(S.style,"border-radius","4px");S.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(S.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(S.style,"transition","all .25s ease-in-out"));this.addClickHandler(M,l);window.setTimeout(mxUtils.bind(this,function(){S.style.outline="none";S.style.zIndex=this.lightboxZIndex;d.style.zIndex=this.lightboxZIndex;document.body.appendChild(S);document.body.appendChild(d);l.setFileData(this.xml);mxUtils.setPrefixedStyle(S.style,"transform","rotateY(0deg)");l.chromelessToolbar.style.bottom=
+l.refresh=function(){};var C=mxUtils.bind(this,function(Q){27==Q.keyCode&&l.destroy()}),p=this.initialOverflow,E=l.destroy;l.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var M=l.editor.graph,S=M.container;S.style.overflow="hidden";this.lightboxChrome?(S.style.border="1px solid #c0c0c0",S.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",C)):(b.style.display="none",e.style.display="none");var H=this;M.getImageFromBundles=function(Q){return H.getImageUrl(Q)};var K=l.createTemporaryGraph;l.createTemporaryGraph=function(){var Q=K.apply(this,arguments);Q.getImageFromBundles=function(d){return H.getImageUrl(d)};return Q};this.graphConfig.move&&(M.isMoveCellsEvent=function(Q){return!0});mxUtils.setPrefixedStyle(S.style,"border-radius","4px");S.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(S.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(S.style,"transition","all .25s ease-in-out"));this.addClickHandler(M,l);window.setTimeout(mxUtils.bind(this,function(){S.style.outline="none";S.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(S);document.body.appendChild(e);l.setFileData(this.xml);mxUtils.setPrefixedStyle(S.style,"transform","rotateY(0deg)");l.chromelessToolbar.style.bottom=
"60px";l.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(l.chromelessToolbar);l.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});l.lightboxFit();l.chromelessResize();this.showLayers(M,this.graph);mxEvent.addListener(b,"click",function(){l.destroy()})}),0);return l};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
-GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(d){try{d.innerText="",GraphViewer.createViewerForElement(d)}catch(k){d.innerText=k.message,null!=window.console&&console.error(k)}})};
-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var d=document.getElementsByClassName(b);b=[];for(var k=0;k<d.length;k++)b.push(d[k]);return b}var l=document.getElementsByTagName("*");d=[];for(k=0;k<l.length;k++){var B=l[k].className;null!=B&&0<B.length&&(B=B.split(" "),0<=mxUtils.indexOf(B,b)&&d.push(l[k]))}return d};
-GraphViewer.createViewerForElement=function(b,d){var k=b.getAttribute("data-mxgraph");if(null!=k){var l=JSON.parse(k),B=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,l);null!=d&&d(p)};null!=l.url?GraphViewer.getUrl(l.url,function(p){B(p)}):B(l.xml)}};
-GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(d){}};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,d,k){if(null!=GraphViewer.cachedUrls[b])d(GraphViewer.cachedUrls[b]);else{var l=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;l.open("GET",b);l.onload=function(){d(null!=l.getText?l.getText():l.responseText)};l.onerror=k;l.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},d=function(k,l){function B(){this.q=[];this.add=function(f){this.q.push(f)};var Q,e;this.call=function(){Q=0;for(e=this.q.length;Q<e;Q++)this.q[Q].call()}}function p(Q,e){return Q.currentStyle?Q.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(Q,null).getPropertyValue(e):Q.style[e]}function E(Q,e){if(!Q.resizedAttached)Q.resizedAttached=
-new B,Q.resizedAttached.add(e);else if(Q.resizedAttached){Q.resizedAttached.add(e);return}Q.resizeSensor=document.createElement("div");Q.resizeSensor.className="resize-sensor";Q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";Q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-Q.appendChild(Q.resizeSensor);"static"==p(Q,"position")&&(Q.style.position="relative");var f=Q.resizeSensor.childNodes[0],g=f.childNodes[0],v=Q.resizeSensor.childNodes[1],y=function(){g.style.width="100000px";g.style.height="100000px";f.scrollLeft=1E5;f.scrollTop=1E5;v.scrollLeft=1E5;v.scrollTop=1E5};y();var C=!1,I=function(){Q.resizedAttached&&(C&&(Q.resizedAttached.call(),C=!1),b(I))};b(I);var D,N,G,ia;e=function(){if((G=Q.offsetWidth)!=D||(ia=Q.offsetHeight)!=N)C=!0,D=G,N=ia;y()};var ka=function(ja,
-ca,pa){ja.attachEvent?ja.attachEvent("on"+ca,pa):ja.addEventListener(ca,pa)};ka(f,"scroll",e);ka(v,"scroll",e)}var M=function(){GraphViewer.resizeSensorEnabled&&l()},S=Object.prototype.toString.call(k),H="[object Array]"===S||"[object NodeList]"===S||"[object HTMLCollection]"===S||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(H){S=0;for(var K=k.length;S<K;S++)E(k[S],M)}else E(k,M);this.detach=function(){if(H)for(var Q=0,e=k.length;Q<e;Q++)d.detach(k[Q]);
-else d.detach(k)}};d.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=d})();
+GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})};
+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var l=document.getElementsByTagName("*");e=[];for(k=0;k<l.length;k++){var C=l[k].className;null!=C&&0<C.length&&(C=C.split(" "),0<=mxUtils.indexOf(C,b)&&e.push(l[k]))}return e};
+GraphViewer.createViewerForElement=function(b,e){var k=b.getAttribute("data-mxgraph");if(null!=k){var l=JSON.parse(k),C=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,l);null!=e&&e(p)};null!=l.url?GraphViewer.getUrl(l.url,function(p){C(p)}):C(l.xml)}};
+GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(e){}};
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var l=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;l.open("GET",b);l.onload=function(){e(null!=l.getText?l.getText():l.responseText)};l.onerror=k;l.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,l){function C(){this.q=[];this.add=function(f){this.q.push(f)};var Q,d;this.call=function(){Q=0;for(d=this.q.length;Q<d;Q++)this.q[Q].call()}}function p(Q,d){return Q.currentStyle?Q.currentStyle[d]:window.getComputedStyle?window.getComputedStyle(Q,null).getPropertyValue(d):Q.style[d]}function E(Q,d){if(!Q.resizedAttached)Q.resizedAttached=
+new C,Q.resizedAttached.add(d);else if(Q.resizedAttached){Q.resizedAttached.add(d);return}Q.resizeSensor=document.createElement("div");Q.resizeSensor.className="resize-sensor";Q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";Q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+Q.appendChild(Q.resizeSensor);"static"==p(Q,"position")&&(Q.style.position="relative");var f=Q.resizeSensor.childNodes[0],g=f.childNodes[0],v=Q.resizeSensor.childNodes[1],x=function(){g.style.width="100000px";g.style.height="100000px";f.scrollLeft=1E5;f.scrollTop=1E5;v.scrollLeft=1E5;v.scrollTop=1E5};x();var B=!1,I=function(){Q.resizedAttached&&(B&&(Q.resizedAttached.call(),B=!1),b(I))};b(I);var D,N,G,ia;d=function(){if((G=Q.offsetWidth)!=D||(ia=Q.offsetHeight)!=N)B=!0,D=G,N=ia;x()};var ka=function(ja,
+ca,pa){ja.attachEvent?ja.attachEvent("on"+ca,pa):ja.addEventListener(ca,pa)};ka(f,"scroll",d);ka(v,"scroll",d)}var M=function(){GraphViewer.resizeSensorEnabled&&l()},S=Object.prototype.toString.call(k),H="[object Array]"===S||"[object NodeList]"===S||"[object HTMLCollection]"===S||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(H){S=0;for(var K=k.length;S<K;S++)E(k[S],M)}else E(k,M);this.detach=function(){if(H)for(var Q=0,d=k.length;Q<d;Q++)e.detach(k[Q]);
+else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index 2bb2b322..b70eee22 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"20.4.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+var mxClient={VERSION:"20.4.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/"),
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]"!==
@@ -315,7 +315,7 @@ mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGrad
mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement(e==mxConstants.DIRECTION_RADIAL?"radialGradient":"linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");
e=this.createElement("stop");e.setAttribute("offset","0%");e.style.stopColor=a;e.style.stopOpacity=c;f.appendChild(e);e=this.createElement("stop");e.setAttribute("offset","100%");e.style.stopColor=b;e.style.stopOpacity=d;f.appendChild(e);return f};mxSvgCanvas2D.prototype.createFillPatternId=function(a,b,c){c=mxUtils.rgba2hex(c);"#"==c.charAt(0)&&(c=c.substring(1));return("mx-pattern-"+a+"-"+b+"-"+c).toLowerCase()};
mxSvgCanvas2D.prototype.getFillPattern=function(a,b,c,d){var e=this.createFillPatternId(a,b,c),f=this.fillPatterns[e];if(null==f){var g=this.root.ownerSVGElement,k=0,l=e+"-"+k;if(null!=g)for(f=g.ownerDocument.getElementById(l);null!=f&&f.ownerSVGElement!=g;)l=e+"-"+k++,f=g.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;if(null==f){switch(a){case "hatch":f=this.createHatchPattern(b,c,d);break;case "dots":f=this.createDotsPattern(b,c,d);break;case "cross-hatch":f=this.createCrossHatchPattern(b,
-c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return"ERROR"}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
+c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return null}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
mxSvgCanvas2D.prototype.createHatchPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1","0");e.setAttribute("x2","0");e.setAttribute("y2",c);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
a);d.appendChild(e);return d};
mxSvgCanvas2D.prototype.createDashedPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1",c/4);e.setAttribute("x2","0");e.setAttribute("y2",3*c/4);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
@@ -329,7 +329,7 @@ mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(nu
c.setAttribute("transform",d.transform);this.pointerEvents?c.setAttribute("pointer-events",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute("pointer-events","none");d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&(!a||null==d.fillColor)&&this.addTolerance(c);("rect"!=c.nodeName&&"path"!=c.nodeName&&"ellipse"!=c.nodeName||"none"!=c.getAttribute("fill")&&"transparent"!=c.getAttribute("fill")||"none"!=c.getAttribute("stroke")||"none"!=
c.getAttribute("pointer-events"))&&this.root.appendChild(c);this.node=null}};mxSvgCanvas2D.prototype.addTolerance=function(a){this.root.appendChild(this.createTolerance(a))};
mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);var b=!1;if(null!=a.fillColor)if(null!=a.gradientColor&&a.gradientColor!=mxConstants.NONE){b=!0;var c=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection);if(this.root.ownerDocument==document&&this.useAbsoluteIds){var d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");d="url("+d+"#"+c+
-")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();b||null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?this.node.setAttribute("fill",d):(a=this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale),this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")"))};
+")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();a=null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?null:this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale);b||null==a?this.node.setAttribute("fill",d):this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")")};
mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};
mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",String(a.strokeColor).toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);var b=this.getCurrentStrokeWidth();1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern((a.fixDash?1:a.strokeWidth)*a.scale))};
mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null==a.miterLimit||this.styleEnabled&&10==a.miterLimit||this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
diff --git a/src/main/webapp/resources/dia.txt b/src/main/webapp/resources/dia.txt
index e254e7a3..a003ec61 100644
--- a/src/main/webapp/resources/dia.txt
+++ b/src/main/webapp/resources/dia.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_am.txt b/src/main/webapp/resources/dia_am.txt
index e769145d..78bcc185 100644
--- a/src/main/webapp/resources/dia_am.txt
+++ b/src/main/webapp/resources/dia_am.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_ar.txt b/src/main/webapp/resources/dia_ar.txt
index 4794386f..93310064 100644
--- a/src/main/webapp/resources/dia_ar.txt
+++ b/src/main/webapp/resources/dia_ar.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_bg.txt b/src/main/webapp/resources/dia_bg.txt
index 2f3a6020..bb2fb6f1 100644
--- a/src/main/webapp/resources/dia_bg.txt
+++ b/src/main/webapp/resources/dia_bg.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_bn.txt b/src/main/webapp/resources/dia_bn.txt
index 4edabd11..22ecb2e5 100644
--- a/src/main/webapp/resources/dia_bn.txt
+++ b/src/main/webapp/resources/dia_bn.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_bs.txt b/src/main/webapp/resources/dia_bs.txt
index 78f12647..e11835c6 100644
--- a/src/main/webapp/resources/dia_bs.txt
+++ b/src/main/webapp/resources/dia_bs.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_ca.txt b/src/main/webapp/resources/dia_ca.txt
index d7b4d477..1d9a9d17 100644
--- a/src/main/webapp/resources/dia_ca.txt
+++ b/src/main/webapp/resources/dia_ca.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=Si aquesta instància inclou més de 100.000 pàgines, é
choosePageIDsFile=Trieu el fitxer csv d'identificadors de pàgina actuals
chooseDrawioPsgesFile=Trieu pàgines amb el fitxer csv de diagrames draw.io
private=Privat
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_cs.txt b/src/main/webapp/resources/dia_cs.txt
index ecc05e72..7180b790 100644
--- a/src/main/webapp/resources/dia_cs.txt
+++ b/src/main/webapp/resources/dia_cs.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_da.txt b/src/main/webapp/resources/dia_da.txt
index 44369acc..74aec750 100644
--- a/src/main/webapp/resources/dia_da.txt
+++ b/src/main/webapp/resources/dia_da.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_de.txt b/src/main/webapp/resources/dia_de.txt
index 628e64a1..33d2b0c3 100644
--- a/src/main/webapp/resources/dia_de.txt
+++ b/src/main/webapp/resources/dia_de.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_el.txt b/src/main/webapp/resources/dia_el.txt
index 28f95070..93e6c128 100644
--- a/src/main/webapp/resources/dia_el.txt
+++ b/src/main/webapp/resources/dia_el.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_eo.txt b/src/main/webapp/resources/dia_eo.txt
index 789d766c..59c6c82f 100644
--- a/src/main/webapp/resources/dia_eo.txt
+++ b/src/main/webapp/resources/dia_eo.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_es.txt b/src/main/webapp/resources/dia_es.txt
index 4b786690..bb48ab43 100644
--- a/src/main/webapp/resources/dia_es.txt
+++ b/src/main/webapp/resources/dia_es.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_et.txt b/src/main/webapp/resources/dia_et.txt
index 75bca5e1..949da5e1 100644
--- a/src/main/webapp/resources/dia_et.txt
+++ b/src/main/webapp/resources/dia_et.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_eu.txt b/src/main/webapp/resources/dia_eu.txt
index 4c21a0c2..210e750d 100644
--- a/src/main/webapp/resources/dia_eu.txt
+++ b/src/main/webapp/resources/dia_eu.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=Instantzia honek 100.000 orrialde baino gehiago baditu, a
choosePageIDsFile=Aukeratu uneko orriaren IDak csv fitxategia
chooseDrawioPsgesFile=Aukeratu draw.io diagramak csv fitxategia duten orrialdeak
private=Pribatua
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_fa.txt b/src/main/webapp/resources/dia_fa.txt
index d8c98f32..2a219b0e 100644
--- a/src/main/webapp/resources/dia_fa.txt
+++ b/src/main/webapp/resources/dia_fa.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_fi.txt b/src/main/webapp/resources/dia_fi.txt
index f58584f4..15e99024 100644
--- a/src/main/webapp/resources/dia_fi.txt
+++ b/src/main/webapp/resources/dia_fi.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=Jos tämä ilmentymä sisältää yli 100 000 sivua, on n
choosePageIDsFile=Valitse nykyisten sivutunnusten csv-tiedosto
chooseDrawioPsgesFile=Valitse sivut draw.io-kaavioiden csv-tiedostolla
private=Yksityinen
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_fil.txt b/src/main/webapp/resources/dia_fil.txt
index 9e60c6b1..b87ac29f 100644
--- a/src/main/webapp/resources/dia_fil.txt
+++ b/src/main/webapp/resources/dia_fil.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txt
index ed4a1b5b..c57d741c 100644
--- a/src/main/webapp/resources/dia_fr.txt
+++ b/src/main/webapp/resources/dia_fr.txt
@@ -344,7 +344,7 @@ formatVssx=VSSX
formatXmlPlain=XML (Texte normal)
formatXml=XML
forum=Forum d'aide
-freehand=Freehand
+freehand=Main levée
fromTemplate=Depuis un modèle
fromTemplateUrl=A partir d'une URL de modèle
fromText=A partir d'un texte
@@ -429,7 +429,7 @@ ios=iOS
italic=Italique
kennedy=Kennedy
keyboardShortcuts=Raccourcis clavier
-labels=Labels
+labels=Étiquettes
layers=Couches
landscape=Paysage
language=Langue
@@ -702,8 +702,8 @@ simple=Simple
simpleArrow=Flèche simple
simpleViewer=Affichage simple
size=Taille
-sketch=Sketch
-snapToGrid=Snap to Grid
+sketch=Croquis
+snapToGrid=Accrocher à la grille
solid=Uni
sourceSpacing=Espacement de la source
south=Sud
@@ -839,8 +839,8 @@ folderEmpty=Dossier vide
recent=Récent
sharedWithMe=Partagé avec moi
sharepointSites=Sharepoint Sites
-errorFetchingFolder=Error fetching folder items
-errorAuthOD=Error authenticating to OneDrive
+errorFetchingFolder=Erreur de récupération des éléments du dossier
+errorAuthOD=Erreur d'authentification à OneDrive
officeMainHeader=Adds draw.io diagrams to your document.
officeStepsHeader=This add-in performs the following steps:
officeStep1=Connects to Microsoft OneDrive, Google Drive or your device.
@@ -859,7 +859,7 @@ selectChildren=Sélectionner les enfants
selectSiblings=Sélectionner les co-latéraux
selectParent=Sélectionner le parent
selectDescendants=Sélectionner les descendants
-lastSaved=Last saved {1} ago
+lastSaved=Dernière sauvegarde il y a {1}
resolve=Résoudre
reopen=Ré-ouvrir
showResolved=Show Resolved
@@ -876,7 +876,7 @@ confAnchor=Confluence Page Anchor
confTimeout=The connection has timed out
confSrvTakeTooLong=The server at {1} is taking too long to respond.
confCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page
-confSaveTry=Please save the page and try again.
+confSaveTry=Veuillez sauvegarder la page et réessayer.
confCannotGetID=Unable to determine page ID
confContactAdmin=Please contact your Confluence administrator.
readErr=Lire l'erreur
@@ -1062,7 +1062,7 @@ invalidSel=Invalid selection
diagNameEmptyErr=Diagram name cannot be empty
openDiagram=Open Diagram
newDiagram=New diagram
-editable=Editable
+editable=Modifiable
confAReimportStarted=Re-import {1} diagrams started...
spaceFilter=Filter by spaces
curViewState=Current Viewer State
@@ -1169,8 +1169,8 @@ diagramEdited={1} diagram "{2}" edited
confDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?
confDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?
owner=Propriétaire
-repository=Repository
-branch=Branch
+repository=Dépôt
+branch=Branche
meters=Mètres
teamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)
contactOwner=Contacter le propriétaire
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Privé
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_gl.txt b/src/main/webapp/resources/dia_gl.txt
index a625f22d..7453bec5 100644
--- a/src/main/webapp/resources/dia_gl.txt
+++ b/src/main/webapp/resources/dia_gl.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_gu.txt b/src/main/webapp/resources/dia_gu.txt
index 761b39ac..9bc74192 100644
--- a/src/main/webapp/resources/dia_gu.txt
+++ b/src/main/webapp/resources/dia_gu.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_he.txt b/src/main/webapp/resources/dia_he.txt
index 2c48b773..43f48f7c 100644
--- a/src/main/webapp/resources/dia_he.txt
+++ b/src/main/webapp/resources/dia_he.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_hi.txt b/src/main/webapp/resources/dia_hi.txt
index 56864648..c9a0aaec 100644
--- a/src/main/webapp/resources/dia_hi.txt
+++ b/src/main/webapp/resources/dia_hi.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_hr.txt b/src/main/webapp/resources/dia_hr.txt
index e1ab280d..934573a9 100644
--- a/src/main/webapp/resources/dia_hr.txt
+++ b/src/main/webapp/resources/dia_hr.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_hu.txt b/src/main/webapp/resources/dia_hu.txt
index 3b91eb61..ffa11379 100644
--- a/src/main/webapp/resources/dia_hu.txt
+++ b/src/main/webapp/resources/dia_hu.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_i18n.txt b/src/main/webapp/resources/dia_i18n.txt
index 0b265ba2..d00d3e30 100644
--- a/src/main/webapp/resources/dia_i18n.txt
+++ b/src/main/webapp/resources/dia_i18n.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=confAHugeInstancesDesc
choosePageIDsFile=choosePageIDsFile
chooseDrawioPsgesFile=chooseDrawioPsgesFile
private=private
+diagramTooLarge=diagramTooLarge
+selectAdminUsers=selectAdminUsers
diff --git a/src/main/webapp/resources/dia_id.txt b/src/main/webapp/resources/dia_id.txt
index f296a110..d38aa34a 100644
--- a/src/main/webapp/resources/dia_id.txt
+++ b/src/main/webapp/resources/dia_id.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_it.txt b/src/main/webapp/resources/dia_it.txt
index 48f46f23..e600d4c5 100644
--- a/src/main/webapp/resources/dia_it.txt
+++ b/src/main/webapp/resources/dia_it.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_ja.txt b/src/main/webapp/resources/dia_ja.txt
index 36c9a2cd..f2eebca0 100644
--- a/src/main/webapp/resources/dia_ja.txt
+++ b/src/main/webapp/resources/dia_ja.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_kn.txt b/src/main/webapp/resources/dia_kn.txt
index 74f5a6f3..72c3154f 100644
--- a/src/main/webapp/resources/dia_kn.txt
+++ b/src/main/webapp/resources/dia_kn.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_ko.txt b/src/main/webapp/resources/dia_ko.txt
index 4b403389..e02b81d3 100644
--- a/src/main/webapp/resources/dia_ko.txt
+++ b/src/main/webapp/resources/dia_ko.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_lt.txt b/src/main/webapp/resources/dia_lt.txt
index 7048d691..78c9f29c 100644
--- a/src/main/webapp/resources/dia_lt.txt
+++ b/src/main/webapp/resources/dia_lt.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_lv.txt b/src/main/webapp/resources/dia_lv.txt
index 41a9f59a..26284e67 100644
--- a/src/main/webapp/resources/dia_lv.txt
+++ b/src/main/webapp/resources/dia_lv.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_ml.txt b/src/main/webapp/resources/dia_ml.txt
index b7e726c1..330e584c 100644
--- a/src/main/webapp/resources/dia_ml.txt
+++ b/src/main/webapp/resources/dia_ml.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_mr.txt b/src/main/webapp/resources/dia_mr.txt
index 4c24d28e..0ec32ed0 100644
--- a/src/main/webapp/resources/dia_mr.txt
+++ b/src/main/webapp/resources/dia_mr.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_ms.txt b/src/main/webapp/resources/dia_ms.txt
index 81589d06..444063c4 100644
--- a/src/main/webapp/resources/dia_ms.txt
+++ b/src/main/webapp/resources/dia_ms.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_my.txt b/src/main/webapp/resources/dia_my.txt
index e254e7a3..a003ec61 100644
--- a/src/main/webapp/resources/dia_my.txt
+++ b/src/main/webapp/resources/dia_my.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_nl.txt b/src/main/webapp/resources/dia_nl.txt
index 924a82c6..c4b77f3b 100644
--- a/src/main/webapp/resources/dia_nl.txt
+++ b/src/main/webapp/resources/dia_nl.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=Als dit exemplaar meer dan 100.000 pagina's bevat, is het
choosePageIDsFile=Kies het huidige pagina-ID's csv-bestand
chooseDrawioPsgesFile=Kies pagina's met draw.io diagrammen csv-bestand
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_no.txt b/src/main/webapp/resources/dia_no.txt
index 7b1c1069..2b3b7b94 100644
--- a/src/main/webapp/resources/dia_no.txt
+++ b/src/main/webapp/resources/dia_no.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_pl.txt b/src/main/webapp/resources/dia_pl.txt
index a09ed3b3..d66091f3 100644
--- a/src/main/webapp/resources/dia_pl.txt
+++ b/src/main/webapp/resources/dia_pl.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_pt-br.txt b/src/main/webapp/resources/dia_pt-br.txt
index 27231ad7..20d652f7 100644
--- a/src/main/webapp/resources/dia_pt-br.txt
+++ b/src/main/webapp/resources/dia_pt-br.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_pt.txt b/src/main/webapp/resources/dia_pt.txt
index f5670007..5a8b4c8b 100644
--- a/src/main/webapp/resources/dia_pt.txt
+++ b/src/main/webapp/resources/dia_pt.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_ro.txt b/src/main/webapp/resources/dia_ro.txt
index ed0493b3..e6c5fec3 100644
--- a/src/main/webapp/resources/dia_ro.txt
+++ b/src/main/webapp/resources/dia_ro.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_ru.txt b/src/main/webapp/resources/dia_ru.txt
index ecb5492b..da5d8d13 100644
--- a/src/main/webapp/resources/dia_ru.txt
+++ b/src/main/webapp/resources/dia_ru.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_si.txt b/src/main/webapp/resources/dia_si.txt
index e254e7a3..a003ec61 100644
--- a/src/main/webapp/resources/dia_si.txt
+++ b/src/main/webapp/resources/dia_si.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_sk.txt b/src/main/webapp/resources/dia_sk.txt
index 6fe63a41..1fdd9195 100644
--- a/src/main/webapp/resources/dia_sk.txt
+++ b/src/main/webapp/resources/dia_sk.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_sl.txt b/src/main/webapp/resources/dia_sl.txt
index a929a373..913083f5 100644
--- a/src/main/webapp/resources/dia_sl.txt
+++ b/src/main/webapp/resources/dia_sl.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_sr.txt b/src/main/webapp/resources/dia_sr.txt
index a078229f..4a52614a 100644
--- a/src/main/webapp/resources/dia_sr.txt
+++ b/src/main/webapp/resources/dia_sr.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_sv.txt b/src/main/webapp/resources/dia_sv.txt
index 3e9afaac..141f1842 100644
--- a/src/main/webapp/resources/dia_sv.txt
+++ b/src/main/webapp/resources/dia_sv.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_sw.txt b/src/main/webapp/resources/dia_sw.txt
index 1646dd5a..28b692f9 100644
--- a/src/main/webapp/resources/dia_sw.txt
+++ b/src/main/webapp/resources/dia_sw.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_ta.txt b/src/main/webapp/resources/dia_ta.txt
index 682edfb9..76d762da 100644
--- a/src/main/webapp/resources/dia_ta.txt
+++ b/src/main/webapp/resources/dia_ta.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_te.txt b/src/main/webapp/resources/dia_te.txt
index c327e8f3..8ecf35dc 100644
--- a/src/main/webapp/resources/dia_te.txt
+++ b/src/main/webapp/resources/dia_te.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_th.txt b/src/main/webapp/resources/dia_th.txt
index f6656845..39be37db 100644
--- a/src/main/webapp/resources/dia_th.txt
+++ b/src/main/webapp/resources/dia_th.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_tr.txt b/src/main/webapp/resources/dia_tr.txt
index bac3b7f0..f1479b61 100644
--- a/src/main/webapp/resources/dia_tr.txt
+++ b/src/main/webapp/resources/dia_tr.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_uk.txt b/src/main/webapp/resources/dia_uk.txt
index 0b8ae05b..f01d86c6 100644
--- a/src/main/webapp/resources/dia_uk.txt
+++ b/src/main/webapp/resources/dia_uk.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_vi.txt b/src/main/webapp/resources/dia_vi.txt
index 4037a70a..5df14f70 100644
--- a/src/main/webapp/resources/dia_vi.txt
+++ b/src/main/webapp/resources/dia_vi.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_zh-tw.txt b/src/main/webapp/resources/dia_zh-tw.txt
index d084358e..af7346a8 100644
--- a/src/main/webapp/resources/dia_zh-tw.txt
+++ b/src/main/webapp/resources/dia_zh-tw.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/resources/dia_zh.txt b/src/main/webapp/resources/dia_zh.txt
index 8a7067e0..26996cd7 100644
--- a/src/main/webapp/resources/dia_zh.txt
+++ b/src/main/webapp/resources/dia_zh.txt
@@ -1209,3 +1209,5 @@ confAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to
choosePageIDsFile=Choose current page IDs csv file
chooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file
private=Private
+diagramTooLarge=The diagram is too large, please reduce its size and try again.
+selectAdminUsers=Select Admin Users
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index afef9712..05ee0394 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,c,a)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(c.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=a(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-99ba3a23"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"0c72c10ce4f6dc0cd60ea5fc67af339d"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"01ce998337c8ff54a55d9b4cf2d4ee0d"},{url:"js/shapes-14-6-5.min.js",revision:"5f31b0ee8f38bb810dca0906e86300f2"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"a3dcf8caa10e3ad0af9f1bac2830896b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"82382637a172995bcca50dac433be3bd"},{url:"styles/atlas.css",revision:"47f4071d6d5308d3469de007d510ea12"},{url:"styles/dark.css",revision:"06d77cbda9c3ebf49e244567f20e5dbc"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"37511af47eaafe0b275f1fc53734a6fd"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"36146c8b69293c22554aa861de8a5e71"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"631d8903db804bcbe95d0e4c1f7f3a97"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"6d39042068933e66a725e22af6d2986b"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"15188e7f36099d5e2ad0fafe4f783f44"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c14807286438f2236b44c9fb78eb4bb3"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"9835a94d469af27db7dbfecf6d434ebc"},{url:"connect/confluence/includeDiagram.html",revision:"1f2e4d088a8a1525ba047239643f3f4f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_am.txt",revision:"28ac9e18c8a09680714c474d7312b79b"},{url:"resources/dia_ar.txt",revision:"e6372c6fd658fe2f57ec33e55820a20b"},{url:"resources/dia_bg.txt",revision:"943ce2c53ecd94f5395a2d9c889af908"},{url:"resources/dia_bn.txt",revision:"d1cf44cc4b9b72f76d55d6dc5022cdc9"},{url:"resources/dia_bs.txt",revision:"039ab75e9330bb0e3f8d9e98cfbe3dab"},{url:"resources/dia_ca.txt",revision:"08bfff57add6f970a8225abd3e0a9d65"},{url:"resources/dia_cs.txt",revision:"376b21e08a50c1a3cd12461dc8ae4137"},{url:"resources/dia_da.txt",revision:"331e73df843d992999b7b15e846f9ea9"},{url:"resources/dia_de.txt",revision:"ff3c17c59852cdaec7815b798fd8e176"},{url:"resources/dia_el.txt",revision:"16c64fde35cf6dc8530651c39df83eba"},{url:"resources/dia_eo.txt",revision:"b4c5f45691abf8f4d6ac7d721d6790f5"},{url:"resources/dia_es.txt",revision:"808abd0f3bc5cc76f2882742a2b9fb77"},{url:"resources/dia_et.txt",revision:"9fd5d06f519256e4913feea4a9739eff"},{url:"resources/dia_eu.txt",revision:"7c7596c99a5a0cedc0b6cba6559c4940"},{url:"resources/dia_fa.txt",revision:"3e3cbd19c527489dfda1f8e630c988ae"},{url:"resources/dia_fi.txt",revision:"1e50042342615a524810e680b9b8620b"},{url:"resources/dia_fil.txt",revision:"8cc7d2ea86d9826f1c3e022f018c03cd"},{url:"resources/dia_fr.txt",revision:"464d0f8c831309061d3b29cee94fdf1b"},{url:"resources/dia_gl.txt",revision:"210c259d3999c9a69babec4657e41ca7"},{url:"resources/dia_gu.txt",revision:"ec928ded61681856c7cf597007e813e6"},{url:"resources/dia_he.txt",revision:"1574e96fe2a62a079855dddeff8ed525"},{url:"resources/dia_hi.txt",revision:"6a6468379a5c34f729a7aefe7e89ee51"},{url:"resources/dia_hr.txt",revision:"11410eaeccedd4bc69bb9b4f9b2f2333"},{url:"resources/dia_hu.txt",revision:"76020f3a0d4cc235e2e8b46e38654f13"},{url:"resources/dia_id.txt",revision:"9a4ef05dfb8084dc3badaea323920e1b"},{url:"resources/dia_it.txt",revision:"bfd27e3d624bc04b5900e8312a43cc53"},{url:"resources/dia_ja.txt",revision:"70ab707c2be3e7d6a3a3f842f7a3634b"},{url:"resources/dia_kn.txt",revision:"7010d08f01632c36b6fa0e8797f90757"},{url:"resources/dia_ko.txt",revision:"7cd9ed0c6977e012f78f029e2aa34c44"},{url:"resources/dia_lt.txt",revision:"a86d4b49a7ba3c63232bc73ff09ada10"},{url:"resources/dia_lv.txt",revision:"11977900dfe9818ec8dc875660b98506"},{url:"resources/dia_ml.txt",revision:"6c293d98312d34ba69b5ac2f5a76e383"},{url:"resources/dia_mr.txt",revision:"a5195f46b671284a6f4ae440274c2e85"},{url:"resources/dia_ms.txt",revision:"74b3057d958779d892246ee63188c6c6"},{url:"resources/dia_my.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_nl.txt",revision:"56cbe24705df20d692d622d29b3533ea"},{url:"resources/dia_no.txt",revision:"30df0498ebcc2eb59f81b1d691b69ff1"},{url:"resources/dia_pl.txt",revision:"b514a4ec516d8184ad2ff4a65a60cda5"},{url:"resources/dia_pt-br.txt",revision:"e1f66224e2d2d470fbd1322d9d9456a4"},{url:"resources/dia_pt.txt",revision:"5565ccf82e7cfe9e2e121774610eda45"},{url:"resources/dia_ro.txt",revision:"151ee594248acdbe158e88842cb2ff7a"},{url:"resources/dia_ru.txt",revision:"631a424b62199bbe1367a965f87812ee"},{url:"resources/dia_si.txt",revision:"b4882fa73042c95c33e2b0d423f3489a"},{url:"resources/dia_sk.txt",revision:"99f16f5c7664920e2654dc6e5376e25e"},{url:"resources/dia_sl.txt",revision:"3c02f3678d513130dedefdfe343947e0"},{url:"resources/dia_sr.txt",revision:"09bd67f9ec4fc5d3be6f0c8a7d5e659b"},{url:"resources/dia_sv.txt",revision:"dff62533d217d37f125611646e2f6c95"},{url:"resources/dia_sw.txt",revision:"7ec1bc477d8da9df5cbf875b14ce194d"},{url:"resources/dia_ta.txt",revision:"75c252159b55a44128bea76a28067a24"},{url:"resources/dia_te.txt",revision:"b07781b7a16832b05e5fb8314b20557d"},{url:"resources/dia_th.txt",revision:"51ac0a933b02010c21267dd35355f99b"},{url:"resources/dia_tr.txt",revision:"f1fc3b9d9c9f6cc16cb8479f6aece146"},{url:"resources/dia_uk.txt",revision:"cff00ca7d00c63f3c4034c31bf07d593"},{url:"resources/dia_vi.txt",revision:"51794054cc1717fc8b3fd033f3f56669"},{url:"resources/dia_zh-tw.txt",revision:"8b826b67aa047030a3bc97fc7759ec30"},{url:"resources/dia_zh.txt",revision:"28f6868d073105e3365f87342fc6c6d8"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-99ba3a23"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"e95a5507a4168085e163e6655870244e"},{url:"js/extensions.min.js",revision:"a6b272e834a0a5032db20b0c99ec7ce6"},{url:"js/stencils.min.js",revision:"01ce998337c8ff54a55d9b4cf2d4ee0d"},{url:"js/shapes-14-6-5.min.js",revision:"a96cd0313eb634ec44f4fc94d8cc0785"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"a3dcf8caa10e3ad0af9f1bac2830896b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"a41acc9feab7d6280efd862deeab6812"},{url:"styles/atlas.css",revision:"47f4071d6d5308d3469de007d510ea12"},{url:"styles/dark.css",revision:"0db04afe3d4da079af9ef3e5298aad6b"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"9be8ae5743c54e2cbcdc722b9eb102a4"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"df9ba18d1f247c069258c13516f78a9d"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"36146c8b69293c22554aa861de8a5e71"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"631d8903db804bcbe95d0e4c1f7f3a97"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"6d39042068933e66a725e22af6d2986b"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"15188e7f36099d5e2ad0fafe4f783f44"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c14807286438f2236b44c9fb78eb4bb3"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"9835a94d469af27db7dbfecf6d434ebc"},{url:"connect/confluence/includeDiagram.html",revision:"1f2e4d088a8a1525ba047239643f3f4f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"ec6923c9e85fca4cc87313778f6aa5b0"},{url:"resources/dia_am.txt",revision:"05b547a97e23cd82b148e7d3c433afde"},{url:"resources/dia_ar.txt",revision:"59ab039cd5758dacd1e15712fb8b6509"},{url:"resources/dia_bg.txt",revision:"7d5ca9a5630c4f161626d1329d5fe2d7"},{url:"resources/dia_bn.txt",revision:"77f21abbf51d1623e1c1b0902d749b92"},{url:"resources/dia_bs.txt",revision:"38b6399a65ff2b1a7abb4837a830e0fb"},{url:"resources/dia_ca.txt",revision:"d018321e303214bdd3918c4823e89738"},{url:"resources/dia_cs.txt",revision:"8df5aee9ba07a172b1124e50d6475233"},{url:"resources/dia_da.txt",revision:"a6ee52dd37b1eb2330c585495a9dd011"},{url:"resources/dia_de.txt",revision:"21a17015bd78e1127e71f32d9b14a62f"},{url:"resources/dia_el.txt",revision:"775c2133374b7b56493aef8e88ab7a97"},{url:"resources/dia_eo.txt",revision:"2611d4b4215c74d334c4c27eeab82064"},{url:"resources/dia_es.txt",revision:"d7e7f538fb43fd83bddf5613dbc8d322"},{url:"resources/dia_et.txt",revision:"4088a2a0eb288aa34259ed917cc69c5c"},{url:"resources/dia_eu.txt",revision:"25f003b479cab698f367b7366804a3c9"},{url:"resources/dia_fa.txt",revision:"f688beed930b3bbb4d35916b3a892148"},{url:"resources/dia_fi.txt",revision:"a98d6c5d0169a5c6902db87f683587eb"},{url:"resources/dia_fil.txt",revision:"92f2d03881ee9b10aaf609a7594a5a66"},{url:"resources/dia_fr.txt",revision:"82a2f5a53106dbf9b997a9de2d5cccc1"},{url:"resources/dia_gl.txt",revision:"0ed13e03f0c8ef61c28eab172f725932"},{url:"resources/dia_gu.txt",revision:"848e0af84d41c62631997179a1703e9e"},{url:"resources/dia_he.txt",revision:"515bd70bd181345e85a13086319cc60e"},{url:"resources/dia_hi.txt",revision:"aee6182dbc55d6ac68f28a69e394f214"},{url:"resources/dia_hr.txt",revision:"a517d274f46ca0deb538632ee628979e"},{url:"resources/dia_hu.txt",revision:"25bd09434a9f66341dfb5c8156786792"},{url:"resources/dia_id.txt",revision:"c658033b15b194f6aa53f371b811b747"},{url:"resources/dia_it.txt",revision:"2ae9e6fb17fac6a13039afd77bc89179"},{url:"resources/dia_ja.txt",revision:"d833140dd078d0272429d81d61d90335"},{url:"resources/dia_kn.txt",revision:"c5198c60f526a1020e86c2e57353a0a9"},{url:"resources/dia_ko.txt",revision:"fc578511abae26fe29181d1529da6765"},{url:"resources/dia_lt.txt",revision:"d80012b8a753aad348da196330c5af52"},{url:"resources/dia_lv.txt",revision:"7f7b01e9ede5ed043a1a4530e41fac2b"},{url:"resources/dia_ml.txt",revision:"8e7a224afe49a0e42fed932c17684d38"},{url:"resources/dia_mr.txt",revision:"64e06956c002478cb4c37a014b82bb89"},{url:"resources/dia_ms.txt",revision:"35bc85b5d231aa702671d93253d6f238"},{url:"resources/dia_my.txt",revision:"ec6923c9e85fca4cc87313778f6aa5b0"},{url:"resources/dia_nl.txt",revision:"0e3d0f032b5d7d2799dcffb8cc3159fb"},{url:"resources/dia_no.txt",revision:"7df78d190146c173ec8f525ad0bba859"},{url:"resources/dia_pl.txt",revision:"720586a24da1e6c0156522372793781e"},{url:"resources/dia_pt-br.txt",revision:"0de632978bebb905b0100b72613ba0f4"},{url:"resources/dia_pt.txt",revision:"ac5c5997fa0f15fb1fdf0e07d0cdb3ad"},{url:"resources/dia_ro.txt",revision:"bab63d4d92dd628d1f802dc7037643f6"},{url:"resources/dia_ru.txt",revision:"ed17d9d9fe9d7dfbc9b072a7c64ccc64"},{url:"resources/dia_si.txt",revision:"ec6923c9e85fca4cc87313778f6aa5b0"},{url:"resources/dia_sk.txt",revision:"feb3e6ccc9f07034aa1c96d1252b44f1"},{url:"resources/dia_sl.txt",revision:"20fd00f32fa0935dd59122675eca7be9"},{url:"resources/dia_sr.txt",revision:"83d1a5df1668faccda9d0165e9258cd7"},{url:"resources/dia_sv.txt",revision:"4906c9be12231b57d2d00baf5c22f749"},{url:"resources/dia_sw.txt",revision:"6b3f8d2b56d2a7be7d23ff6a817bfcaf"},{url:"resources/dia_ta.txt",revision:"325ff4964925a42e173658175aedab7b"},{url:"resources/dia_te.txt",revision:"2f84e9c8224c02700608dd6880680a9b"},{url:"resources/dia_th.txt",revision:"1b80ce006b5cfab3fec8ae4f36d68614"},{url:"resources/dia_tr.txt",revision:"c144242cbed994fcd5a67e654955d1f7"},{url:"resources/dia_uk.txt",revision:"063513f8eccd3c417d653f50ded1854b"},{url:"resources/dia_vi.txt",revision:"537d46153462e51baaa1be720328699a"},{url:"resources/dia_zh-tw.txt",revision:"926f42147bde174073a166b5177839e8"},{url:"resources/dia_zh.txt",revision:"56f6a9a0959c6db35c74910885123f28"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index ecce4df3..609b531c 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../tmp/5468a3f754ae5d8beb97b21a5318b23e/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"0c72c10ce4f6dc0cd60ea5fc67af339d\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"01ce998337c8ff54a55d9b4cf2d4ee0d\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"5f31b0ee8f38bb810dca0906e86300f2\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"a3dcf8caa10e3ad0af9f1bac2830896b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"82382637a172995bcca50dac433be3bd\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"47f4071d6d5308d3469de007d510ea12\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"06d77cbda9c3ebf49e244567f20e5dbc\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"37511af47eaafe0b275f1fc53734a6fd\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"36146c8b69293c22554aa861de8a5e71\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"631d8903db804bcbe95d0e4c1f7f3a97\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"6d39042068933e66a725e22af6d2986b\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"15188e7f36099d5e2ad0fafe4f783f44\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c14807286438f2236b44c9fb78eb4bb3\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"9835a94d469af27db7dbfecf6d434ebc\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"1f2e4d088a8a1525ba047239643f3f4f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"28ac9e18c8a09680714c474d7312b79b\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e6372c6fd658fe2f57ec33e55820a20b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"943ce2c53ecd94f5395a2d9c889af908\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"d1cf44cc4b9b72f76d55d6dc5022cdc9\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"039ab75e9330bb0e3f8d9e98cfbe3dab\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"08bfff57add6f970a8225abd3e0a9d65\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"376b21e08a50c1a3cd12461dc8ae4137\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"331e73df843d992999b7b15e846f9ea9\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"ff3c17c59852cdaec7815b798fd8e176\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"16c64fde35cf6dc8530651c39df83eba\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"b4c5f45691abf8f4d6ac7d721d6790f5\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"808abd0f3bc5cc76f2882742a2b9fb77\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"9fd5d06f519256e4913feea4a9739eff\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"7c7596c99a5a0cedc0b6cba6559c4940\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"3e3cbd19c527489dfda1f8e630c988ae\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"1e50042342615a524810e680b9b8620b\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"8cc7d2ea86d9826f1c3e022f018c03cd\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"464d0f8c831309061d3b29cee94fdf1b\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"210c259d3999c9a69babec4657e41ca7\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"ec928ded61681856c7cf597007e813e6\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"1574e96fe2a62a079855dddeff8ed525\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"6a6468379a5c34f729a7aefe7e89ee51\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"11410eaeccedd4bc69bb9b4f9b2f2333\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"76020f3a0d4cc235e2e8b46e38654f13\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9a4ef05dfb8084dc3badaea323920e1b\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"bfd27e3d624bc04b5900e8312a43cc53\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"70ab707c2be3e7d6a3a3f842f7a3634b\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7010d08f01632c36b6fa0e8797f90757\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"7cd9ed0c6977e012f78f029e2aa34c44\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"a86d4b49a7ba3c63232bc73ff09ada10\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"11977900dfe9818ec8dc875660b98506\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"6c293d98312d34ba69b5ac2f5a76e383\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"a5195f46b671284a6f4ae440274c2e85\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"74b3057d958779d892246ee63188c6c6\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"56cbe24705df20d692d622d29b3533ea\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"30df0498ebcc2eb59f81b1d691b69ff1\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"b514a4ec516d8184ad2ff4a65a60cda5\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"e1f66224e2d2d470fbd1322d9d9456a4\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"5565ccf82e7cfe9e2e121774610eda45\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"151ee594248acdbe158e88842cb2ff7a\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"631a424b62199bbe1367a965f87812ee\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b4882fa73042c95c33e2b0d423f3489a\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"99f16f5c7664920e2654dc6e5376e25e\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"3c02f3678d513130dedefdfe343947e0\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"09bd67f9ec4fc5d3be6f0c8a7d5e659b\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"dff62533d217d37f125611646e2f6c95\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"7ec1bc477d8da9df5cbf875b14ce194d\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"75c252159b55a44128bea76a28067a24\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b07781b7a16832b05e5fb8314b20557d\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"51ac0a933b02010c21267dd35355f99b\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"f1fc3b9d9c9f6cc16cb8479f6aece146\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"cff00ca7d00c63f3c4034c31bf07d593\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"51794054cc1717fc8b3fd033f3f56669\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"8b826b67aa047030a3bc97fc7759ec30\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"28f6868d073105e3365f87342fc6c6d8\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../tmp/75a96ad59aadf2e39897ba32011d0aeb/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"e95a5507a4168085e163e6655870244e\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"a6b272e834a0a5032db20b0c99ec7ce6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"01ce998337c8ff54a55d9b4cf2d4ee0d\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"a96cd0313eb634ec44f4fc94d8cc0785\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"a3dcf8caa10e3ad0af9f1bac2830896b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"a41acc9feab7d6280efd862deeab6812\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"47f4071d6d5308d3469de007d510ea12\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"0db04afe3d4da079af9ef3e5298aad6b\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"9be8ae5743c54e2cbcdc722b9eb102a4\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"df9ba18d1f247c069258c13516f78a9d\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"36146c8b69293c22554aa861de8a5e71\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"631d8903db804bcbe95d0e4c1f7f3a97\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"6d39042068933e66a725e22af6d2986b\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"15188e7f36099d5e2ad0fafe4f783f44\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c14807286438f2236b44c9fb78eb4bb3\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"9835a94d469af27db7dbfecf6d434ebc\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"1f2e4d088a8a1525ba047239643f3f4f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"ec6923c9e85fca4cc87313778f6aa5b0\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"05b547a97e23cd82b148e7d3c433afde\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"59ab039cd5758dacd1e15712fb8b6509\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"7d5ca9a5630c4f161626d1329d5fe2d7\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"77f21abbf51d1623e1c1b0902d749b92\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"38b6399a65ff2b1a7abb4837a830e0fb\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d018321e303214bdd3918c4823e89738\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"8df5aee9ba07a172b1124e50d6475233\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"a6ee52dd37b1eb2330c585495a9dd011\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"21a17015bd78e1127e71f32d9b14a62f\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"775c2133374b7b56493aef8e88ab7a97\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"2611d4b4215c74d334c4c27eeab82064\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"d7e7f538fb43fd83bddf5613dbc8d322\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"4088a2a0eb288aa34259ed917cc69c5c\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"25f003b479cab698f367b7366804a3c9\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"f688beed930b3bbb4d35916b3a892148\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"a98d6c5d0169a5c6902db87f683587eb\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"92f2d03881ee9b10aaf609a7594a5a66\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"82a2f5a53106dbf9b997a9de2d5cccc1\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"0ed13e03f0c8ef61c28eab172f725932\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"848e0af84d41c62631997179a1703e9e\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"515bd70bd181345e85a13086319cc60e\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"aee6182dbc55d6ac68f28a69e394f214\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"a517d274f46ca0deb538632ee628979e\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"25bd09434a9f66341dfb5c8156786792\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"c658033b15b194f6aa53f371b811b747\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"2ae9e6fb17fac6a13039afd77bc89179\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"d833140dd078d0272429d81d61d90335\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"c5198c60f526a1020e86c2e57353a0a9\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"fc578511abae26fe29181d1529da6765\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"d80012b8a753aad348da196330c5af52\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"7f7b01e9ede5ed043a1a4530e41fac2b\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"8e7a224afe49a0e42fed932c17684d38\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"64e06956c002478cb4c37a014b82bb89\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"35bc85b5d231aa702671d93253d6f238\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"ec6923c9e85fca4cc87313778f6aa5b0\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"0e3d0f032b5d7d2799dcffb8cc3159fb\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"7df78d190146c173ec8f525ad0bba859\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"720586a24da1e6c0156522372793781e\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"0de632978bebb905b0100b72613ba0f4\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"ac5c5997fa0f15fb1fdf0e07d0cdb3ad\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"bab63d4d92dd628d1f802dc7037643f6\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"ed17d9d9fe9d7dfbc9b072a7c64ccc64\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"ec6923c9e85fca4cc87313778f6aa5b0\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"feb3e6ccc9f07034aa1c96d1252b44f1\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"20fd00f32fa0935dd59122675eca7be9\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"83d1a5df1668faccda9d0165e9258cd7\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"4906c9be12231b57d2d00baf5c22f749\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"6b3f8d2b56d2a7be7d23ff6a817bfcaf\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"325ff4964925a42e173658175aedab7b\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"2f84e9c8224c02700608dd6880680a9b\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"1b80ce006b5cfab3fec8ae4f36d68614\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"c144242cbed994fcd5a67e654955d1f7\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"063513f8eccd3c417d653f50ded1854b\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"537d46153462e51baaa1be720328699a\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"926f42147bde174073a166b5177839e8\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"56f6a9a0959c6db35c74910885123f28\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,aACN,IAWHC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,mCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
diff --git a/src/main/webapp/shapes/mxSysML.js b/src/main/webapp/shapes/mxSysML.js
index 54e0d790..e702019b 100644
--- a/src/main/webapp/shapes/mxSysML.js
+++ b/src/main/webapp/shapes/mxSysML.js
@@ -3142,3 +3142,128 @@ mxShapeSysMLUseCaseExtensionPoints.prototype.getConstraints = function(style, w,
return (constr);
};
+
+//**********************************************************************************************************************************************************
+//Port
+//**********************************************************************************************************************************************************
+/**
+* Extends mxShape.
+*/
+function mxShapeSysMLPort(bounds, fill, stroke, strokewidth)
+{
+ mxShape.call(this);
+ this.bounds = bounds;
+ this.fill = fill;
+ this.stroke = stroke;
+ this.strokewidth = (strokewidth != null) ? strokewidth : 1;
+};
+
+/**
+* Extends mxShape.
+*/
+mxUtils.extend(mxShapeSysMLPort, mxShape);
+
+mxShapeSysMLPort.prototype.cst = {
+ PORT : 'mxgraph.sysml.port'
+};
+
+mxShapeSysMLPort.prototype.customProperties = [
+ {name: 'sysMLPortType', dispName: 'Port Type', type: 'enum',
+ enumList:[
+ {val:'empty', dispName:'Empty'},
+ {val:'flowN', dispName:'Flow Up'},
+ {val:'flowE', dispName:'Flow Right'},
+ {val:'flowS', dispName:'Flow Down'},
+ {val:'flowW', dispName:'Flow Left'},
+ {val:'doubleH', dispName:'Double Horizontal'},
+ {val:'doubleV', dispName:'Double Vertical'}
+ ]}
+];
+
+/**
+* Function: paintVertexShape
+*
+* Paints the vertex shape.
+*/
+mxShapeSysMLPort.prototype.paintVertexShape = function(c, x, y, w, h)
+{
+ c.translate(x, y);
+ c.rect(0, 0, w, h);
+ c.fillAndStroke();
+ var portType = mxUtils.getValue(this.style, 'sysMLPortType', 'empty');
+
+ switch (portType)
+ {
+ case 'flowN' :
+ c.begin();
+ c.moveTo(0.25 * w, 0.5 * h);
+ c.lineTo(0.5 * w, 0.25 * h);
+ c.lineTo(0.75 * w, 0.5 * h);
+ c.moveTo(0.5 * w, 0.25 * h);
+ c.lineTo(0.5 * w, 0.75 * h);
+ c.stroke();
+ break;
+ case 'flowE' :
+ c.begin();
+ c.moveTo(0.5 * w, 0.25 * h);
+ c.lineTo(0.75 * w, 0.5 * h);
+ c.lineTo(0.5 * w, 0.75 * h);
+ c.moveTo(0.75 * w, 0.5 * h);
+ c.lineTo(0.25 * w, 0.5 * h);
+ c.stroke();
+ break;
+ case 'flowS' :
+ c.begin();
+ c.moveTo(0.25 * w, 0.5 * h);
+ c.lineTo(0.5 * w, 0.75 * h);
+ c.lineTo(0.75 * w, 0.5 * h);
+ c.moveTo(0.5 * w, 0.75 * h);
+ c.lineTo(0.5 * w, 0.25 * h);
+ c.stroke();
+ break;
+ case 'flowW' :
+ c.begin();
+ c.moveTo(0.5 * w, 0.25 * h);
+ c.lineTo(0.25 * w, 0.5 * h);
+ c.lineTo(0.5 * w, 0.75 * h);
+ c.moveTo(0.25 * w, 0.5 * h);
+ c.lineTo(0.75 * w, 0.5 * h);
+ c.stroke();
+ break;
+ case 'doubleH' :
+ c.begin();
+ c.moveTo(0.6 * w, 0.25 * h);
+ c.lineTo(0.85 * w, 0.5 * h);
+ c.lineTo(0.6 * w, 0.75 * h);
+ c.moveTo(0.4 * w, 0.25 * h);
+ c.lineTo(0.15 * w, 0.5 * h);
+ c.lineTo(0.4 * w, 0.75 * h);
+ c.stroke();
+ break;
+ case 'doubleV' :
+ c.begin();
+ c.moveTo(0.25 * w, 0.6 * h);
+ c.lineTo(0.5 * w, 0.85 * h);
+ c.lineTo(0.75 * w, 0.6 * h);
+ c.moveTo(0.25 * w, 0.4 * h);
+ c.lineTo(0.5 * w, 0.15 * h);
+ c.lineTo(0.75 * w, 0.4 * h);
+ c.stroke();
+ break;
+ }
+};
+
+mxCellRenderer.registerShape(mxShapeSysMLPort.prototype.cst.PORT, mxShapeSysMLPort);
+
+mxShapeSysMLPort.prototype.getConstraints = function(style, w, h)
+{
+ var constr = [];
+
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
+ constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
+
+ return (constr);
+};
+
diff --git a/src/main/webapp/shapes/rack/mxRack.js b/src/main/webapp/shapes/rack/mxRack.js
index 2814ecb1..191edaeb 100644
--- a/src/main/webapp/shapes/rack/mxRack.js
+++ b/src/main/webapp/shapes/rack/mxRack.js
@@ -658,6 +658,156 @@ mxRackRackCabinet.prototype.sideText = function(c, h, unitNum, unitH, fontSize,
};
//**********************************************************************************************************************************************************
+//Rack Cabinet
+//**********************************************************************************************************************************************************
+/**
+ * Extends mxShape.
+ */
+function mxRackRackCabinet2(bounds, fill, stroke, strokewidth)
+{
+ mxShape.call(this);
+ this.bounds = bounds;
+ this.fill = fill;
+ this.stroke = stroke;
+ this.strokewidth = (strokewidth != null) ? strokewidth : 1;
+};
+
+/**
+ * Extends mxShape.
+ */
+mxUtils.extend(mxRackRackCabinet2, mxShape);
+
+mxRackRackCabinet2.prototype.cst =
+{
+ SHAPE_RACK_RACK_CABINET : 'mxgraph.rackGeneral.rackCabinet2',
+ UNIT_NUM : 'unitNum',
+ UNIT_HEIGHT : 'rackUnitSize',
+ TEXT_COLOR : 'textColor',
+ NUM_DIR : 'numDir',
+ NUMBER_DISPLAY : 'numDisp',
+ ON : 'on',
+ OFF : 'off',
+ DIR_ASC : 'ascend',
+ DIR_DESC : 'descend',
+ TEXT_SIZE : 'textSize'
+};
+
+mxRackRackCabinet2.prototype.customProperties = [
+ {name: 'unitNum', dispName: 'Number of units', type: 'int', defVal: 12},
+ {name: 'startUnit', dispName: 'Starting unit', type: 'int', defVal: 1},
+ {name: 'rackUnitSize', dispName: 'Unit height', type: 'float', defVal: 14.8},
+ {name: 'fillColor2', dispName: 'Panel Color', type: 'color', defVal: '#ffffff'},
+ {name: 'textColor', dispName: 'Number text color', type: 'color', defVal: '#666666'},
+ {name: 'textSize', dispName: 'Text size', type: 'float', defVal: '12'},
+ {name: 'numDisp', dispName: 'Display Numbers', type: 'enum', defVal: 'descend',
+ enumList: [{val: 'off', dispName: 'Off'}, {val: 'ascend', dispName: 'Ascending'}, {val: 'descend', dispName: 'Descending'}],
+ onChange: function(graph, newValue)
+ {
+ graph.setCellStyles('marginLeft', (newValue == 'off') ? 9 : 33, graph.getSelectionCells());
+ }
+ }
+];
+
+
+/**
+ * Function: paintVertexShape
+ *
+ * Paints the vertex shape.
+ */
+mxRackRackCabinet2.prototype.paintVertexShape = function(c, x, y, w, h)
+{
+ var unitNum = parseFloat(mxUtils.getValue(this.style, mxRackRackCabinet2.prototype.cst.UNIT_NUM, '12'));
+ var unitH = parseFloat(mxUtils.getValue(this.style, mxRackRackCabinet2.prototype.cst.UNIT_HEIGHT, '14.8'));
+ var fontSize = parseFloat(mxUtils.getValue(this.style, mxRackRackCabinet2.prototype.cst.TEXT_SIZE, '12'));
+ var numDisp = mxUtils.getValue(this.style, mxRackRackCabinet2.prototype.cst.NUMBER_DISPLAY, mxRackRackCabinet2.prototype.cst.ON);
+
+ if (numDisp !== mxRackRackCabinet2.prototype.cst.OFF)
+ {
+ c.translate(x + fontSize * 2, y);
+ w = w - fontSize * 2;
+ }
+ else
+ {
+ c.translate(x, y);
+ };
+
+ var h = unitNum * unitH + 42;
+ this.background(c, w, h);
+ c.setShadow(false);
+ this.foreground(c, w, h);
+
+ if (numDisp !== mxRackRackCabinet2.prototype.cst.OFF)
+ {
+ this.sideText(c, h, unitNum, unitH, fontSize, numDisp);
+ };
+};
+
+mxRackRackCabinet2.prototype.background = function(c, w, h)
+{
+ var fillC = mxUtils.getValue(this.style, 'fillColor2', '#ffffff');
+ c.setFillColor(fillC);
+ c.rect(0, 0, w, h);
+ c.fillAndStroke();
+};
+
+mxRackRackCabinet2.prototype.foreground = function(c, w, h)
+{
+ var fillC = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, '#f4f4f4');
+ c.setFillColor(fillC);
+ c.rect(0, 0, w, 21);
+ c.fillAndStroke();
+ c.rect(0, h - 21, w, 21);
+ c.fillAndStroke();
+ c.rect(0, 21, 9, h - 42);
+ c.fillAndStroke();
+ c.rect(w - 9, 21, 9, h - 42);
+ c.fillAndStroke();
+ c.ellipse(2.5, 7.5, 6, 6);
+ c.stroke();
+ c.ellipse(w - 8.5, 7.5, 6, 6);
+ c.stroke();
+ c.ellipse(2.5, h - 13.5, 6, 6);
+ c.stroke();
+ c.ellipse(w - 8.5, h - 13.5, 6, 6);
+ c.stroke();
+};
+
+mxRackRackCabinet2.prototype.sideText = function(c, h, unitNum, unitH, fontSize, numDisp)
+{
+ var fontColor = mxUtils.getValue(this.style, mxRackRackCabinet2.prototype.cst.TEXT_COLOR, '#666666');
+ var startUnit = mxUtils.getValue(this.style, 'startUnit', 1);
+ c.setFontSize(fontSize);
+ c.setFontColor(fontColor);
+
+ if (numDisp === mxRackRackCabinet2.prototype.cst.DIR_ASC)
+ {
+ for (var i = 0; i < unitNum; i++)
+ {
+ c.text(-fontSize, 21 + unitH * 0.5 + i * unitH, 0, 0, (i + startUnit).toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
+ };
+ }
+ else if (numDisp === mxRackRackCabinet2.prototype.cst.DIR_DESC || numDisp === mxRackRackCabinet2.prototype.cst.DIR_ON)
+ {
+ for (var i = 0; i < unitNum; i++)
+ {
+ c.text(-fontSize, h - 21 - unitH * 0.5 - i * unitH, 0, 0, (i + startUnit).toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, null, 0, 0, 0);
+ };
+ };
+
+ c.setStrokeColor(fontColor);
+
+ c.begin();
+
+ for (var i = 0; i < unitNum + 1; i++)
+ {
+ c.moveTo(-2 * fontSize, 21 + i * unitH);
+ c.lineTo(0, 21 + i * unitH);
+ };
+
+ c.stroke();
+};
+
+//**********************************************************************************************************************************************************
//1U Horizontal Cable Duct
//**********************************************************************************************************************************************************
/**
@@ -1261,6 +1411,7 @@ mxRackCabinetLeg.prototype.background = function(c, w, h)
// New generic unit size implementations
mxCellRenderer.registerShape(mxRackContainer.prototype.cst.SHAPE_RACK_CONTAINER, mxRackContainer);
+mxCellRenderer.registerShape(mxRackRackCabinet2.prototype.cst.SHAPE_RACK_RACK_CABINET, mxRackRackCabinet2);
mxCellRenderer.registerShape(mxRackHorCableDuct.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT, mxRackHorCableDuct);
mxCellRenderer.registerShape(mxRackHorRoutingBank.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK, mxRackHorRoutingBank);
mxCellRenderer.registerShape(mxRackNeatPatch.prototype.cst.SHAPE_RACK_NEAT_PATCH, mxRackNeatPatch);
diff --git a/src/main/webapp/styles/dark.css b/src/main/webapp/styles/dark.css
index 30b02ecc..ed8a3f44 100644
--- a/src/main/webapp/styles/dark.css
+++ b/src/main/webapp/styles/dark.css
@@ -33,7 +33,7 @@ html body, html body .geFooterContainer, html body #geFooterItem1, html body tex
background:#2a2a2a;
color:#cccccc;
}
-html body a {
+html body a :not(.geStatus *) {
color:#337ab7;
}
html body div.mxRubberband {
@@ -168,12 +168,12 @@ html .geEditor ::-webkit-scrollbar-thumb {
html .geEditor ::-webkit-scrollbar-thumb:hover, .geHsplit:hover, .geVsplit:hover {
background-color:#a0a0a0;
}
-html body .geStatusAlert {
+html body a.geStatus .geStatusAlert {
background-color:#a20025;
border:1px solid #bd002b;
color:#fff !important;
}
-html body .geStatusAlert:hover {
+html body a.geStatus .geStatusAlert:hover {
background-color:#a20025;
border-color:#bd002b;
}
diff --git a/src/main/webapp/styles/grapheditor.css b/src/main/webapp/styles/grapheditor.css
index 22459fbf..0ab6ea53 100644
--- a/src/main/webapp/styles/grapheditor.css
+++ b/src/main/webapp/styles/grapheditor.css
@@ -94,8 +94,17 @@
font-size:12px;
}
a.geStatus {
+ white-space:nowrap;
+}
+a.geStatus:not(:empty) {
margin-right:8px;
}
+.geStatus *[data-action] {
+ cursor:pointer;
+}
+.geStatus *[data-action]:not([class]) {
+ text-decoration:underline;
+}
.geStatus img {
max-width:16px;
vertical-align:bottom;
@@ -1930,4 +1939,8 @@ table.geProperties tr td {
.geMaximized #max-button {
display: none;
-} \ No newline at end of file
+}
+[draggable="true"] {
+ transform: translate(0, 0);
+ z-index: 0;
+}